No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 

7547 líneas
284 KiB

  1. /*!
  2. * @license CreateJS
  3. * Visit http://createjs.com/ for documentation, updates and examples.
  4. *
  5. * Copyright (c) 2011-2015 gskinner.com, inc.
  6. *
  7. * Distributed under the terms of the MIT license.
  8. * http://www.opensource.org/licenses/mit-license.html
  9. *
  10. * This notice shall be included in all copies or substantial portions of the Software.
  11. */
  12. this.createjs = this.createjs || {},
  13. createjs.extend = function(a, b) {
  14. "use strict";
  15. function c() {
  16. this.constructor = a
  17. }
  18. return c.prototype = b.prototype,
  19. a.prototype = new c
  20. },
  21. this.createjs = this.createjs || {},
  22. createjs.promote = function(a, b) {
  23. "use strict";
  24. var c = a.prototype,
  25. d = Object.getPrototypeOf && Object.getPrototypeOf(c) || c.__proto__;
  26. if (d) {
  27. c[(b += "_") + "constructor"] = d.constructor;
  28. for (var e in d) c.hasOwnProperty(e) && "function" == typeof d[e] && (c[b + e] = d[e])
  29. }
  30. return a
  31. },
  32. this.createjs = this.createjs || {},
  33. createjs.indexOf = function(a, b) {
  34. "use strict";
  35. for (var c = 0,
  36. d = a.length; d > c; c++) if (b === a[c]) return c;
  37. return - 1
  38. },
  39. this.createjs = this.createjs || {},
  40. function() {
  41. "use strict";
  42. function a(a, b, c) {
  43. this.type = a,
  44. this.target = null,
  45. this.currentTarget = null,
  46. this.eventPhase = 0,
  47. this.bubbles = !!b,
  48. this.cancelable = !!c,
  49. this.timeStamp = (new Date).getTime(),
  50. this.defaultPrevented = !1,
  51. this.propagationStopped = !1,
  52. this.immediatePropagationStopped = !1,
  53. this.removed = !1
  54. }
  55. var b = a.prototype;
  56. b.preventDefault = function() {
  57. this.defaultPrevented = this.cancelable && !0
  58. },
  59. b.stopPropagation = function() {
  60. this.propagationStopped = !0
  61. },
  62. b.stopImmediatePropagation = function() {
  63. this.immediatePropagationStopped = this.propagationStopped = !0
  64. },
  65. b.remove = function() {
  66. this.removed = !0
  67. },
  68. b.clone = function() {
  69. return new a(this.type, this.bubbles, this.cancelable)
  70. },
  71. b.set = function(a) {
  72. for (var b in a) this[b] = a[b];
  73. return this
  74. },
  75. b.toString = function() {
  76. return "[Event (type=" + this.type + ")]"
  77. },
  78. createjs.Event = a
  79. } (),
  80. this.createjs = this.createjs || {},
  81. function() {
  82. "use strict";
  83. function a() {
  84. this._listeners = null,
  85. this._captureListeners = null
  86. }
  87. var b = a.prototype;
  88. a.initialize = function(a) {
  89. a.addEventListener = b.addEventListener,
  90. a.on = b.on,
  91. a.removeEventListener = a.off = b.removeEventListener,
  92. a.removeAllEventListeners = b.removeAllEventListeners,
  93. a.hasEventListener = b.hasEventListener,
  94. a.dispatchEvent = b.dispatchEvent,
  95. a._dispatchEvent = b._dispatchEvent,
  96. a.willTrigger = b.willTrigger
  97. },
  98. b.addEventListener = function(a, b, c) {
  99. var d;
  100. d = c ? this._captureListeners = this._captureListeners || {}: this._listeners = this._listeners || {};
  101. var e = d[a];
  102. return e && this.removeEventListener(a, b, c),
  103. e = d[a],
  104. e ? e.push(b) : d[a] = [b],
  105. b
  106. },
  107. b.on = function(a, b, c, d, e, f) {
  108. return b.handleEvent && (c = c || b, b = b.handleEvent),
  109. c = c || this,
  110. this.addEventListener(a,
  111. function(a) {
  112. b.call(c, a, e),
  113. d && a.remove()
  114. },
  115. f)
  116. },
  117. b.removeEventListener = function(a, b, c) {
  118. var d = c ? this._captureListeners: this._listeners;
  119. if (d) {
  120. var e = d[a];
  121. if (e) for (var f = 0,
  122. g = e.length; g > f; f++) if (e[f] == b) {
  123. 1 == g ? delete d[a] : e.splice(f, 1);
  124. break
  125. }
  126. }
  127. },
  128. b.off = b.removeEventListener,
  129. b.removeAllEventListeners = function(a) {
  130. a ? (this._listeners && delete this._listeners[a], this._captureListeners && delete this._captureListeners[a]) : this._listeners = this._captureListeners = null
  131. },
  132. b.dispatchEvent = function(a, b, c) {
  133. if ("string" == typeof a) {
  134. var d = this._listeners;
  135. if (! (b || d && d[a])) return ! 0;
  136. a = new createjs.Event(a, b, c)
  137. } else a.target && a.clone && (a = a.clone());
  138. try {
  139. a.target = this
  140. } catch(e) {}
  141. if (a.bubbles && this.parent) {
  142. for (var f = this,
  143. g = [f]; f.parent;) g.push(f = f.parent);
  144. var h, i = g.length;
  145. for (h = i - 1; h >= 0 && !a.propagationStopped; h--) g[h]._dispatchEvent(a, 1 + (0 == h));
  146. for (h = 1; i > h && !a.propagationStopped; h++) g[h]._dispatchEvent(a, 3)
  147. } else this._dispatchEvent(a, 2);
  148. return ! a.defaultPrevented
  149. },
  150. b.hasEventListener = function(a) {
  151. var b = this._listeners,
  152. c = this._captureListeners;
  153. return !! (b && b[a] || c && c[a])
  154. },
  155. b.willTrigger = function(a) {
  156. for (var b = this; b;) {
  157. if (b.hasEventListener(a)) return ! 0;
  158. b = b.parent
  159. }
  160. return ! 1
  161. },
  162. b.toString = function() {
  163. return "[EventDispatcher]"
  164. },
  165. b._dispatchEvent = function(a, b) {
  166. var c, d = 1 == b ? this._captureListeners: this._listeners;
  167. if (a && d) {
  168. var e = d[a.type];
  169. if (!e || !(c = e.length)) return;
  170. try {
  171. a.currentTarget = this
  172. } catch(f) {}
  173. try {
  174. a.eventPhase = b
  175. } catch(f) {}
  176. a.removed = !1,
  177. e = e.slice();
  178. for (var g = 0; c > g && !a.immediatePropagationStopped; g++) {
  179. var h = e[g];
  180. h.handleEvent ? h.handleEvent(a) : h(a),
  181. a.removed && (this.off(a.type, h, 1 == b), a.removed = !1)
  182. }
  183. }
  184. },
  185. createjs.EventDispatcher = a
  186. } (),
  187. this.createjs = this.createjs || {},
  188. function() {
  189. "use strict";
  190. function a() {
  191. throw "Ticker cannot be instantiated."
  192. }
  193. a.RAF_SYNCHED = "synched",
  194. a.RAF = "raf",
  195. a.TIMEOUT = "timeout",
  196. a.useRAF = !1,
  197. a.timingMode = null,
  198. a.maxDelta = 0,
  199. a.paused = !1,
  200. a.removeEventListener = null,
  201. a.removeAllEventListeners = null,
  202. a.dispatchEvent = null,
  203. a.hasEventListener = null,
  204. a._listeners = null,
  205. createjs.EventDispatcher.initialize(a),
  206. a._addEventListener = a.addEventListener,
  207. a.addEventListener = function() {
  208. return ! a._inited && a.init(),
  209. a._addEventListener.apply(a, arguments)
  210. },
  211. a._inited = !1,
  212. a._startTime = 0,
  213. a._pausedTime = 0,
  214. a._ticks = 0,
  215. a._pausedTicks = 0,
  216. a._interval = 50,
  217. a._lastTime = 0,
  218. a._times = null,
  219. a._tickTimes = null,
  220. a._timerId = null,
  221. a._raf = !0,
  222. a.setInterval = function(b) {
  223. a._interval = b,
  224. a._inited && a._setupTick()
  225. },
  226. a.getInterval = function() {
  227. return a._interval
  228. },
  229. a.setFPS = function(b) {
  230. a.setInterval(1e3 / b)
  231. },
  232. a.getFPS = function() {
  233. return 1e3 / a._interval
  234. };
  235. try {
  236. Object.defineProperties(a, {
  237. interval: {
  238. get: a.getInterval,
  239. set: a.setInterval
  240. },
  241. framerate: {
  242. get: a.getFPS,
  243. set: a.setFPS
  244. }
  245. })
  246. } catch(b) {
  247. console.log(b)
  248. }
  249. a.init = function() {
  250. a._inited || (a._inited = !0, a._times = [], a._tickTimes = [], a._startTime = a._getTime(), a._times.push(a._lastTime = 0), a.interval = a._interval)
  251. },
  252. a.reset = function() {
  253. if (a._raf) {
  254. var b = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame;
  255. b && b(a._timerId)
  256. } else clearTimeout(a._timerId);
  257. a.removeAllEventListeners("tick"),
  258. a._timerId = a._times = a._tickTimes = null,
  259. a._startTime = a._lastTime = a._ticks = 0,
  260. a._inited = !1
  261. },
  262. a.getMeasuredTickTime = function(b) {
  263. var c = 0,
  264. d = a._tickTimes;
  265. if (!d || d.length < 1) return - 1;
  266. b = Math.min(d.length, b || 0 | a.getFPS());
  267. for (var e = 0; b > e; e++) c += d[e];
  268. return c / b
  269. },
  270. a.getMeasuredFPS = function(b) {
  271. var c = a._times;
  272. return ! c || c.length < 2 ? -1 : (b = Math.min(c.length - 1, b || 0 | a.getFPS()), 1e3 / ((c[0] - c[b]) / b))
  273. },
  274. a.setPaused = function(b) {
  275. a.paused = b
  276. },
  277. a.getPaused = function() {
  278. return a.paused
  279. },
  280. a.getTime = function(b) {
  281. return a._startTime ? a._getTime() - (b ? a._pausedTime: 0) : -1
  282. },
  283. a.getEventTime = function(b) {
  284. return a._startTime ? (a._lastTime || a._startTime) - (b ? a._pausedTime: 0) : -1
  285. },
  286. a.getTicks = function(b) {
  287. return a._ticks - (b ? a._pausedTicks: 0)
  288. },
  289. a._handleSynch = function() {
  290. a._timerId = null,
  291. a._setupTick(),
  292. a._getTime() - a._lastTime >= .97 * (a._interval - 1) && a._tick()
  293. },
  294. a._handleRAF = function() {
  295. a._timerId = null,
  296. a._setupTick(),
  297. a._tick()
  298. },
  299. a._handleTimeout = function() {
  300. a._timerId = null,
  301. a._setupTick(),
  302. a._tick()
  303. },
  304. a._setupTick = function() {
  305. if (null == a._timerId) {
  306. var b = a.timingMode || a.useRAF && a.RAF_SYNCHED;
  307. if (b == a.RAF_SYNCHED || b == a.RAF) {
  308. var c = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame;
  309. if (c) return a._timerId = c(b == a.RAF ? a._handleRAF: a._handleSynch),
  310. void(a._raf = !0)
  311. }
  312. a._raf = !1,
  313. a._timerId = setTimeout(a._handleTimeout, a._interval)
  314. }
  315. },
  316. a._tick = function() {
  317. var b = a.paused,
  318. c = a._getTime(),
  319. d = c - a._lastTime;
  320. if (a._lastTime = c, a._ticks++, b && (a._pausedTicks++, a._pausedTime += d), a.hasEventListener("tick")) {
  321. var e = new createjs.Event("tick"),
  322. f = a.maxDelta;
  323. e.delta = f && d > f ? f: d,
  324. e.paused = b,
  325. e.time = c,
  326. e.runTime = c - a._pausedTime,
  327. a.dispatchEvent(e)
  328. }
  329. for (a._tickTimes.unshift(a._getTime() - c); a._tickTimes.length > 100;) a._tickTimes.pop();
  330. for (a._times.unshift(c); a._times.length > 100;) a._times.pop()
  331. };
  332. var c = window.performance && (performance.now || performance.mozNow || performance.msNow || performance.oNow || performance.webkitNow);
  333. a._getTime = function() {
  334. return (c && c.call(performance) || (new Date).getTime()) - a._startTime
  335. },
  336. createjs.Ticker = a
  337. } (),
  338. this.createjs = this.createjs || {},
  339. function() {
  340. "use strict";
  341. function a() {
  342. throw "UID cannot be instantiated"
  343. }
  344. a._nextID = 0,
  345. a.get = function() {
  346. return a._nextID++
  347. },
  348. createjs.UID = a
  349. } (),
  350. this.createjs = this.createjs || {},
  351. function() {
  352. "use strict";
  353. function a(a, b, c, d, e, f, g, h, i, j, k) {
  354. this.Event_constructor(a, b, c),
  355. this.stageX = d,
  356. this.stageY = e,
  357. this.rawX = null == i ? d: i,
  358. this.rawY = null == j ? e: j,
  359. this.nativeEvent = f,
  360. this.pointerID = g,
  361. this.primary = !!h,
  362. this.relatedTarget = k
  363. }
  364. var b = createjs.extend(a, createjs.Event);
  365. b._get_localX = function() {
  366. return this.currentTarget.globalToLocal(this.rawX, this.rawY).x
  367. },
  368. b._get_localY = function() {
  369. return this.currentTarget.globalToLocal(this.rawX, this.rawY).y
  370. },
  371. b._get_isTouch = function() {
  372. return - 1 !== this.pointerID
  373. };
  374. try {
  375. Object.defineProperties(b, {
  376. localX: {
  377. get: b._get_localX
  378. },
  379. localY: {
  380. get: b._get_localY
  381. },
  382. isTouch: {
  383. get: b._get_isTouch
  384. }
  385. })
  386. } catch(c) {}
  387. b.clone = function() {
  388. return new a(this.type, this.bubbles, this.cancelable, this.stageX, this.stageY, this.nativeEvent, this.pointerID, this.primary, this.rawX, this.rawY)
  389. },
  390. b.toString = function() {
  391. return "[MouseEvent (type=" + this.type + " stageX=" + this.stageX + " stageY=" + this.stageY + ")]"
  392. },
  393. createjs.MouseEvent = createjs.promote(a, "Event")
  394. } (),
  395. this.createjs = this.createjs || {},
  396. function() {
  397. "use strict";
  398. function a(a, b, c, d, e, f) {
  399. this.setValues(a, b, c, d, e, f)
  400. }
  401. var b = a.prototype;
  402. a.DEG_TO_RAD = Math.PI / 180,
  403. a.identity = null,
  404. b.setValues = function(a, b, c, d, e, f) {
  405. return this.a = null == a ? 1 : a,
  406. this.b = b || 0,
  407. this.c = c || 0,
  408. this.d = null == d ? 1 : d,
  409. this.tx = e || 0,
  410. this.ty = f || 0,
  411. this
  412. },
  413. b.append = function(a, b, c, d, e, f) {
  414. var g = this.a,
  415. h = this.b,
  416. i = this.c,
  417. j = this.d;
  418. return (1 != a || 0 != b || 0 != c || 1 != d) && (this.a = g * a + i * b, this.b = h * a + j * b, this.c = g * c + i * d, this.d = h * c + j * d),
  419. this.tx = g * e + i * f + this.tx,
  420. this.ty = h * e + j * f + this.ty,
  421. this
  422. },
  423. b.prepend = function(a, b, c, d, e, f) {
  424. var g = this.a,
  425. h = this.c,
  426. i = this.tx;
  427. return this.a = a * g + c * this.b,
  428. this.b = b * g + d * this.b,
  429. this.c = a * h + c * this.d,
  430. this.d = b * h + d * this.d,
  431. this.tx = a * i + c * this.ty + e,
  432. this.ty = b * i + d * this.ty + f,
  433. this
  434. },
  435. b.appendMatrix = function(a) {
  436. return this.append(a.a, a.b, a.c, a.d, a.tx, a.ty)
  437. },
  438. b.prependMatrix = function(a) {
  439. return this.prepend(a.a, a.b, a.c, a.d, a.tx, a.ty)
  440. },
  441. b.appendTransform = function(b, c, d, e, f, g, h, i, j) {
  442. if (f % 360) var k = f * a.DEG_TO_RAD,
  443. l = Math.cos(k),
  444. m = Math.sin(k);
  445. else l = 1,
  446. m = 0;
  447. return g || h ? (g *= a.DEG_TO_RAD, h *= a.DEG_TO_RAD, this.append(Math.cos(h), Math.sin(h), -Math.sin(g), Math.cos(g), b, c), this.append(l * d, m * d, -m * e, l * e, 0, 0)) : this.append(l * d, m * d, -m * e, l * e, b, c),
  448. (i || j) && (this.tx -= i * this.a + j * this.c, this.ty -= i * this.b + j * this.d),
  449. this
  450. },
  451. b.prependTransform = function(b, c, d, e, f, g, h, i, j) {
  452. if (f % 360) var k = f * a.DEG_TO_RAD,
  453. l = Math.cos(k),
  454. m = Math.sin(k);
  455. else l = 1,
  456. m = 0;
  457. return (i || j) && (this.tx -= i, this.ty -= j),
  458. g || h ? (g *= a.DEG_TO_RAD, h *= a.DEG_TO_RAD, this.prepend(l * d, m * d, -m * e, l * e, 0, 0), this.prepend(Math.cos(h), Math.sin(h), -Math.sin(g), Math.cos(g), b, c)) : this.prepend(l * d, m * d, -m * e, l * e, b, c),
  459. this
  460. },
  461. b.rotate = function(b) {
  462. b *= a.DEG_TO_RAD;
  463. var c = Math.cos(b),
  464. d = Math.sin(b),
  465. e = this.a,
  466. f = this.b;
  467. return this.a = e * c + this.c * d,
  468. this.b = f * c + this.d * d,
  469. this.c = -e * d + this.c * c,
  470. this.d = -f * d + this.d * c,
  471. this
  472. },
  473. b.skew = function(b, c) {
  474. return b *= a.DEG_TO_RAD,
  475. c *= a.DEG_TO_RAD,
  476. this.append(Math.cos(c), Math.sin(c), -Math.sin(b), Math.cos(b), 0, 0),
  477. this
  478. },
  479. b.scale = function(a, b) {
  480. return this.a *= a,
  481. this.b *= a,
  482. this.c *= b,
  483. this.d *= b,
  484. this
  485. },
  486. b.translate = function(a, b) {
  487. return this.tx += this.a * a + this.c * b,
  488. this.ty += this.b * a + this.d * b,
  489. this
  490. },
  491. b.identity = function() {
  492. return this.a = this.d = 1,
  493. this.b = this.c = this.tx = this.ty = 0,
  494. this
  495. },
  496. b.invert = function() {
  497. var a = this.a,
  498. b = this.b,
  499. c = this.c,
  500. d = this.d,
  501. e = this.tx,
  502. f = a * d - b * c;
  503. return this.a = d / f,
  504. this.b = -b / f,
  505. this.c = -c / f,
  506. this.d = a / f,
  507. this.tx = (c * this.ty - d * e) / f,
  508. this.ty = -(a * this.ty - b * e) / f,
  509. this
  510. },
  511. b.isIdentity = function() {
  512. return 0 === this.tx && 0 === this.ty && 1 === this.a && 0 === this.b && 0 === this.c && 1 === this.d
  513. },
  514. b.equals = function(a) {
  515. return this.tx === a.tx && this.ty === a.ty && this.a === a.a && this.b === a.b && this.c === a.c && this.d === a.d
  516. },
  517. b.transformPoint = function(a, b, c) {
  518. return c = c || {},
  519. c.x = a * this.a + b * this.c + this.tx,
  520. c.y = a * this.b + b * this.d + this.ty,
  521. c
  522. },
  523. b.decompose = function(b) {
  524. null == b && (b = {}),
  525. b.x = this.tx,
  526. b.y = this.ty,
  527. b.scaleX = Math.sqrt(this.a * this.a + this.b * this.b),
  528. b.scaleY = Math.sqrt(this.c * this.c + this.d * this.d);
  529. var c = Math.atan2( - this.c, this.d),
  530. d = Math.atan2(this.b, this.a),
  531. e = Math.abs(1 - c / d);
  532. return 1e-5 > e ? (b.rotation = d / a.DEG_TO_RAD, this.a < 0 && this.d >= 0 && (b.rotation += b.rotation <= 0 ? 180 : -180), b.skewX = b.skewY = 0) : (b.skewX = c / a.DEG_TO_RAD, b.skewY = d / a.DEG_TO_RAD),
  533. b
  534. },
  535. b.copy = function(a) {
  536. return this.setValues(a.a, a.b, a.c, a.d, a.tx, a.ty)
  537. },
  538. b.clone = function() {
  539. return new a(this.a, this.b, this.c, this.d, this.tx, this.ty)
  540. },
  541. b.toString = function() {
  542. return "[Matrix2D (a=" + this.a + " b=" + this.b + " c=" + this.c + " d=" + this.d + " tx=" + this.tx + " ty=" + this.ty + ")]"
  543. },
  544. a.identity = new a,
  545. createjs.Matrix2D = a
  546. } (),
  547. this.createjs = this.createjs || {},
  548. function() {
  549. "use strict";
  550. function a(a, b, c, d, e) {
  551. this.setValues(a, b, c, d, e)
  552. }
  553. var b = a.prototype;
  554. b.setValues = function(a, b, c, d, e) {
  555. return this.visible = null == a ? !0 : !!a,
  556. this.alpha = null == b ? 1 : b,
  557. this.shadow = c,
  558. this.compositeOperation = d,
  559. this.matrix = e || this.matrix && this.matrix.identity() || new createjs.Matrix2D,
  560. this
  561. },
  562. b.append = function(a, b, c, d, e) {
  563. return this.alpha *= b,
  564. this.shadow = c || this.shadow,
  565. this.compositeOperation = d || this.compositeOperation,
  566. this.visible = this.visible && a,
  567. e && this.matrix.appendMatrix(e),
  568. this
  569. },
  570. b.prepend = function(a, b, c, d, e) {
  571. return this.alpha *= b,
  572. this.shadow = this.shadow || c,
  573. this.compositeOperation = this.compositeOperation || d,
  574. this.visible = this.visible && a,
  575. e && this.matrix.prependMatrix(e),
  576. this
  577. },
  578. b.identity = function() {
  579. return this.visible = !0,
  580. this.alpha = 1,
  581. this.shadow = this.compositeOperation = null,
  582. this.matrix.identity(),
  583. this
  584. },
  585. b.clone = function() {
  586. return new a(this.alpha, this.shadow, this.compositeOperation, this.visible, this.matrix.clone())
  587. },
  588. createjs.DisplayProps = a
  589. } (),
  590. this.createjs = this.createjs || {},
  591. function() {
  592. "use strict";
  593. function a(a, b) {
  594. this.setValues(a, b)
  595. }
  596. var b = a.prototype;
  597. b.setValues = function(a, b) {
  598. return this.x = a || 0,
  599. this.y = b || 0,
  600. this
  601. },
  602. b.copy = function(a) {
  603. return this.x = a.x,
  604. this.y = a.y,
  605. this
  606. },
  607. b.clone = function() {
  608. return new a(this.x, this.y)
  609. },
  610. b.toString = function() {
  611. return "[Point (x=" + this.x + " y=" + this.y + ")]"
  612. },
  613. createjs.Point = a
  614. } (),
  615. this.createjs = this.createjs || {},
  616. function() {
  617. "use strict";
  618. function a(a, b, c, d) {
  619. this.setValues(a, b, c, d)
  620. }
  621. var b = a.prototype;
  622. b.setValues = function(a, b, c, d) {
  623. return this.x = a || 0,
  624. this.y = b || 0,
  625. this.width = c || 0,
  626. this.height = d || 0,
  627. this
  628. },
  629. b.extend = function(a, b, c, d) {
  630. return c = c || 0,
  631. d = d || 0,
  632. a + c > this.x + this.width && (this.width = a + c - this.x),
  633. b + d > this.y + this.height && (this.height = b + d - this.y),
  634. a < this.x && (this.width += this.x - a, this.x = a),
  635. b < this.y && (this.height += this.y - b, this.y = b),
  636. this
  637. },
  638. b.pad = function(a, b, c, d) {
  639. return this.x -= b,
  640. this.y -= a,
  641. this.width += b + d,
  642. this.height += a + c,
  643. this
  644. },
  645. b.copy = function(a) {
  646. return this.setValues(a.x, a.y, a.width, a.height)
  647. },
  648. b.contains = function(a, b, c, d) {
  649. return c = c || 0,
  650. d = d || 0,
  651. a >= this.x && a + c <= this.x + this.width && b >= this.y && b + d <= this.y + this.height
  652. },
  653. b.union = function(a) {
  654. return this.clone().extend(a.x, a.y, a.width, a.height)
  655. },
  656. b.intersection = function(b) {
  657. var c = b.x,
  658. d = b.y,
  659. e = c + b.width,
  660. f = d + b.height;
  661. return this.x > c && (c = this.x),
  662. this.y > d && (d = this.y),
  663. this.x + this.width < e && (e = this.x + this.width),
  664. this.y + this.height < f && (f = this.y + this.height),
  665. c >= e || d >= f ? null: new a(c, d, e - c, f - d)
  666. },
  667. b.intersects = function(a) {
  668. return a.x <= this.x + this.width && this.x <= a.x + a.width && a.y <= this.y + this.height && this.y <= a.y + a.height
  669. },
  670. b.isEmpty = function() {
  671. return this.width <= 0 || this.height <= 0
  672. },
  673. b.clone = function() {
  674. return new a(this.x, this.y, this.width, this.height)
  675. },
  676. b.toString = function() {
  677. return "[Rectangle (x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + ")]"
  678. },
  679. createjs.Rectangle = a
  680. } (),
  681. this.createjs = this.createjs || {},
  682. function() {
  683. "use strict";
  684. function a(a, b, c, d, e, f, g) {
  685. a.addEventListener && (this.target = a, this.overLabel = null == c ? "over": c, this.outLabel = null == b ? "out": b, this.downLabel = null == d ? "down": d, this.play = e, this._isPressed = !1, this._isOver = !1, this._enabled = !1, a.mouseChildren = !1, this.enabled = !0, this.handleEvent({}), f && (g && (f.actionsEnabled = !1, f.gotoAndStop && f.gotoAndStop(g)), a.hitArea = f))
  686. }
  687. var b = a.prototype;
  688. b.setEnabled = function(a) {
  689. if (a != this._enabled) {
  690. var b = this.target;
  691. this._enabled = a,
  692. a ? (b.cursor = "pointer", b.addEventListener("rollover", this), b.addEventListener("rollout", this), b.addEventListener("mousedown", this), b.addEventListener("pressup", this), b._reset && (b.__reset = b._reset, b._reset = this._reset)) : (b.cursor = null, b.removeEventListener("rollover", this), b.removeEventListener("rollout", this), b.removeEventListener("mousedown", this), b.removeEventListener("pressup", this), b.__reset && (b._reset = b.__reset, delete b.__reset))
  693. }
  694. },
  695. b.getEnabled = function() {
  696. return this._enabled
  697. };
  698. try {
  699. Object.defineProperties(b, {
  700. enabled: {
  701. get: b.getEnabled,
  702. set: b.setEnabled
  703. }
  704. })
  705. } catch(c) {}
  706. b.toString = function() {
  707. return "[ButtonHelper]"
  708. },
  709. b.handleEvent = function(a) {
  710. var b, c = this.target,
  711. d = a.type;
  712. "mousedown" == d ? (this._isPressed = !0, b = this.downLabel) : "pressup" == d ? (this._isPressed = !1, b = this._isOver ? this.overLabel: this.outLabel) : "rollover" == d ? (this._isOver = !0, b = this._isPressed ? this.downLabel: this.overLabel) : (this._isOver = !1, b = this._isPressed ? this.overLabel: this.outLabel),
  713. this.play ? c.gotoAndPlay && c.gotoAndPlay(b) : c.gotoAndStop && c.gotoAndStop(b)
  714. },
  715. b._reset = function() {
  716. var a = this.paused;
  717. this.__reset(),
  718. this.paused = a
  719. },
  720. createjs.ButtonHelper = a
  721. } (),
  722. this.createjs = this.createjs || {},
  723. function() {
  724. "use strict";
  725. function a(a, b, c, d) {
  726. this.color = a || "black",
  727. this.offsetX = b || 0,
  728. this.offsetY = c || 0,
  729. this.blur = d || 0
  730. }
  731. var b = a.prototype;
  732. a.identity = new a("transparent", 0, 0, 0),
  733. b.toString = function() {
  734. return "[Shadow]"
  735. },
  736. b.clone = function() {
  737. return new a(this.color, this.offsetX, this.offsetY, this.blur)
  738. },
  739. createjs.Shadow = a
  740. } (),
  741. this.createjs = this.createjs || {},
  742. function() {
  743. "use strict";
  744. function a(a) {
  745. this.EventDispatcher_constructor(),
  746. this.complete = !0,
  747. this.framerate = 0,
  748. this._animations = null,
  749. this._frames = null,
  750. this._images = null,
  751. this._data = null,
  752. this._loadCount = 0,
  753. this._frameHeight = 0,
  754. this._frameWidth = 0,
  755. this._numFrames = 0,
  756. this._regX = 0,
  757. this._regY = 0,
  758. this._spacing = 0,
  759. this._margin = 0,
  760. this._parseData(a)
  761. }
  762. var b = createjs.extend(a, createjs.EventDispatcher);
  763. b.getAnimations = function() {
  764. return this._animations.slice()
  765. };
  766. try {
  767. Object.defineProperties(b, {
  768. animations: {
  769. get: b.getAnimations
  770. }
  771. })
  772. } catch(c) {}
  773. b.getNumFrames = function(a) {
  774. if (null == a) return this._frames ? this._frames.length: this._numFrames || 0;
  775. var b = this._data[a];
  776. return null == b ? 0 : b.frames.length
  777. },
  778. b.getAnimation = function(a) {
  779. return this._data[a]
  780. },
  781. b.getFrame = function(a) {
  782. var b;
  783. return this._frames && (b = this._frames[a]) ? b: null
  784. },
  785. b.getFrameBounds = function(a, b) {
  786. var c = this.getFrame(a);
  787. return c ? (b || new createjs.Rectangle).setValues( - c.regX, -c.regY, c.rect.width, c.rect.height) : null
  788. },
  789. b.toString = function() {
  790. return "[SpriteSheet]"
  791. },
  792. b.clone = function() {
  793. throw "SpriteSheet cannot be cloned."
  794. },
  795. b._parseData = function(a) {
  796. var b, c, d, e;
  797. if (null != a) {
  798. if (this.framerate = a.framerate || 0, a.images && (c = a.images.length) > 0) for (e = this._images = [], b = 0; c > b; b++) {
  799. var f = a.images[b];
  800. if ("string" == typeof f) {
  801. var g = f;
  802. f = document.createElement("img"),
  803. f.src = g
  804. }
  805. e.push(f),
  806. f.getContext || f.naturalWidth || (this._loadCount++, this.complete = !1,
  807. function(a, b) {
  808. f.onload = function() {
  809. a._handleImageLoad(b)
  810. }
  811. } (this, g),
  812. function(a, b) {
  813. f.onerror = function() {
  814. a._handleImageError(b)
  815. }
  816. } (this, g))
  817. }
  818. if (null == a.frames);
  819. else if (Array.isArray(a.frames)) for (this._frames = [], e = a.frames, b = 0, c = e.length; c > b; b++) {
  820. var h = e[b];
  821. this._frames.push({
  822. image: this._images[h[4] ? h[4] : 0],
  823. rect: new createjs.Rectangle(h[0], h[1], h[2], h[3]),
  824. regX: h[5] || 0,
  825. regY: h[6] || 0
  826. })
  827. } else d = a.frames,
  828. this._frameWidth = d.width,
  829. this._frameHeight = d.height,
  830. this._regX = d.regX || 0,
  831. this._regY = d.regY || 0,
  832. this._spacing = d.spacing || 0,
  833. this._margin = d.margin || 0,
  834. this._numFrames = d.count,
  835. 0 == this._loadCount && this._calculateFrames();
  836. if (this._animations = [], null != (d = a.animations)) {
  837. this._data = {};
  838. var i;
  839. for (i in d) {
  840. var j = {
  841. name: i
  842. },
  843. k = d[i];
  844. if ("number" == typeof k) e = j.frames = [k];
  845. else if (Array.isArray(k)) if (1 == k.length) j.frames = [k[0]];
  846. else for (j.speed = k[3], j.next = k[2], e = j.frames = [], b = k[0]; b <= k[1]; b++) e.push(b);
  847. else {
  848. j.speed = k.speed,
  849. j.next = k.next;
  850. var l = k.frames;
  851. e = j.frames = "number" == typeof l ? [l] : l.slice(0)
  852. } (j.next === !0 || void 0 === j.next) && (j.next = i),
  853. (j.next === !1 || e.length < 2 && j.next == i) && (j.next = null),
  854. j.speed || (j.speed = 1),
  855. this._animations.push(i),
  856. this._data[i] = j
  857. }
  858. }
  859. }
  860. },
  861. b._handleImageLoad = function(a) {
  862. 0 == --this._loadCount && (this._calculateFrames(), this.complete = !0, this.dispatchEvent("complete"))
  863. },
  864. b._handleImageError = function(a) {
  865. var b = new createjs.Event("error");
  866. b.src = a,
  867. this.dispatchEvent(b),
  868. 0 == --this._loadCount && this.dispatchEvent("complete")
  869. },
  870. b._calculateFrames = function() {
  871. if (!this._frames && 0 != this._frameWidth) {
  872. this._frames = [];
  873. var a = this._numFrames || 1e5,
  874. b = 0,
  875. c = this._frameWidth,
  876. d = this._frameHeight,
  877. e = this._spacing,
  878. f = this._margin;
  879. a: for (var g = 0,
  880. h = this._images; g < h.length; g++) for (var i = h[g], j = i.width, k = i.height, l = f; k - f - d >= l;) {
  881. for (var m = f; j - f - c >= m;) {
  882. if (b >= a) break a;
  883. b++,
  884. this._frames.push({
  885. image: i,
  886. rect: new createjs.Rectangle(m, l, c, d),
  887. regX: this._regX,
  888. regY: this._regY
  889. }),
  890. m += c + e
  891. }
  892. l += d + e
  893. }
  894. this._numFrames = b
  895. }
  896. },
  897. createjs.SpriteSheet = createjs.promote(a, "EventDispatcher")
  898. } (),
  899. this.createjs = this.createjs || {},
  900. function() {
  901. "use strict";
  902. function a() {
  903. this.command = null,
  904. this._stroke = null,
  905. this._strokeStyle = null,
  906. this._oldStrokeStyle = null,
  907. this._strokeDash = null,
  908. this._oldStrokeDash = null,
  909. this._strokeIgnoreScale = !1,
  910. this._fill = null,
  911. this._instructions = [],
  912. this._commitIndex = 0,
  913. this._activeInstructions = [],
  914. this._dirty = !1,
  915. this._storeIndex = 0,
  916. this.clear()
  917. }
  918. var b = a.prototype,
  919. c = a;
  920. a.getRGB = function(a, b, c, d) {
  921. return null != a && null == c && (d = b, c = 255 & a, b = a >> 8 & 255, a = a >> 16 & 255),
  922. null == d ? "rgb(" + a + "," + b + "," + c + ")": "rgba(" + a + "," + b + "," + c + "," + d + ")"
  923. },
  924. a.getHSL = function(a, b, c, d) {
  925. return null == d ? "hsl(" + a % 360 + "," + b + "%," + c + "%)": "hsla(" + a % 360 + "," + b + "%," + c + "%," + d + ")"
  926. },
  927. a.BASE_64 = {
  928. A: 0,
  929. B: 1,
  930. C: 2,
  931. D: 3,
  932. E: 4,
  933. F: 5,
  934. G: 6,
  935. H: 7,
  936. I: 8,
  937. J: 9,
  938. K: 10,
  939. L: 11,
  940. M: 12,
  941. N: 13,
  942. O: 14,
  943. P: 15,
  944. Q: 16,
  945. R: 17,
  946. S: 18,
  947. T: 19,
  948. U: 20,
  949. V: 21,
  950. W: 22,
  951. X: 23,
  952. Y: 24,
  953. Z: 25,
  954. a: 26,
  955. b: 27,
  956. c: 28,
  957. d: 29,
  958. e: 30,
  959. f: 31,
  960. g: 32,
  961. h: 33,
  962. i: 34,
  963. j: 35,
  964. k: 36,
  965. l: 37,
  966. m: 38,
  967. n: 39,
  968. o: 40,
  969. p: 41,
  970. q: 42,
  971. r: 43,
  972. s: 44,
  973. t: 45,
  974. u: 46,
  975. v: 47,
  976. w: 48,
  977. x: 49,
  978. y: 50,
  979. z: 51,
  980. 0 : 52,
  981. 1 : 53,
  982. 2 : 54,
  983. 3 : 55,
  984. 4 : 56,
  985. 5 : 57,
  986. 6 : 58,
  987. 7 : 59,
  988. 8 : 60,
  989. 9 : 61,
  990. "+": 62,
  991. "/": 63
  992. },
  993. a.STROKE_CAPS_MAP = ["butt", "round", "square"],
  994. a.STROKE_JOINTS_MAP = ["miter", "round", "bevel"];
  995. var d = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  996. d.getContext && (a._ctx = d.getContext("2d"), d.width = d.height = 1),
  997. b.getInstructions = function() {
  998. return this._updateInstructions(),
  999. this._instructions
  1000. };
  1001. try {
  1002. Object.defineProperties(b, {
  1003. instructions: {
  1004. get: b.getInstructions
  1005. }
  1006. })
  1007. } catch(e) {}
  1008. b.isEmpty = function() {
  1009. return ! (this._instructions.length || this._activeInstructions.length)
  1010. },
  1011. b.draw = function(a, b) {
  1012. this._updateInstructions();
  1013. for (var c = this._instructions,
  1014. d = this._storeIndex,
  1015. e = c.length; e > d; d++) c[d].exec(a, b)
  1016. },
  1017. b.drawAsPath = function(a) {
  1018. this._updateInstructions();
  1019. for (var b, c = this._instructions,
  1020. d = this._storeIndex,
  1021. e = c.length; e > d; d++)(b = c[d]).path !== !1 && b.exec(a)
  1022. },
  1023. b.moveTo = function(a, b) {
  1024. return this.append(new c.MoveTo(a, b), !0)
  1025. },
  1026. b.lineTo = function(a, b) {
  1027. return this.append(new c.LineTo(a, b))
  1028. },
  1029. b.arcTo = function(a, b, d, e, f) {
  1030. return this.append(new c.ArcTo(a, b, d, e, f))
  1031. },
  1032. b.arc = function(a, b, d, e, f, g) {
  1033. return this.append(new c.Arc(a, b, d, e, f, g))
  1034. },
  1035. b.quadraticCurveTo = function(a, b, d, e) {
  1036. return this.append(new c.QuadraticCurveTo(a, b, d, e))
  1037. },
  1038. b.bezierCurveTo = function(a, b, d, e, f, g) {
  1039. return this.append(new c.BezierCurveTo(a, b, d, e, f, g))
  1040. },
  1041. b.rect = function(a, b, d, e) {
  1042. return this.append(new c.Rect(a, b, d, e))
  1043. },
  1044. b.closePath = function() {
  1045. return this._activeInstructions.length ? this.append(new c.ClosePath) : this
  1046. },
  1047. b.clear = function() {
  1048. return this._instructions.length = this._activeInstructions.length = this._commitIndex = 0,
  1049. this._strokeStyle = this._oldStrokeStyle = this._stroke = this._fill = this._strokeDash = this._oldStrokeDash = null,
  1050. this._dirty = this._strokeIgnoreScale = !1,
  1051. this
  1052. },
  1053. b.beginFill = function(a) {
  1054. return this._setFill(a ? new c.Fill(a) : null)
  1055. },
  1056. b.beginLinearGradientFill = function(a, b, d, e, f, g) {
  1057. return this._setFill((new c.Fill).linearGradient(a, b, d, e, f, g))
  1058. },
  1059. b.beginRadialGradientFill = function(a, b, d, e, f, g, h, i) {
  1060. return this._setFill((new c.Fill).radialGradient(a, b, d, e, f, g, h, i))
  1061. },
  1062. b.beginBitmapFill = function(a, b, d) {
  1063. return this._setFill(new c.Fill(null, d).bitmap(a, b))
  1064. },
  1065. b.endFill = function() {
  1066. return this.beginFill()
  1067. },
  1068. b.setStrokeStyle = function(a, b, d, e, f) {
  1069. return this._updateInstructions(!0),
  1070. this._strokeStyle = this.command = new c.StrokeStyle(a, b, d, e, f),
  1071. this._stroke && (this._stroke.ignoreScale = f),
  1072. this._strokeIgnoreScale = f,
  1073. this
  1074. },
  1075. b.setStrokeDash = function(a, b) {
  1076. return this._updateInstructions(!0),
  1077. this._strokeDash = this.command = new c.StrokeDash(a, b),
  1078. this
  1079. },
  1080. b.beginStroke = function(a) {
  1081. return this._setStroke(a ? new c.Stroke(a) : null)
  1082. },
  1083. b.beginLinearGradientStroke = function(a, b, d, e, f, g) {
  1084. return this._setStroke((new c.Stroke).linearGradient(a, b, d, e, f, g))
  1085. },
  1086. b.beginRadialGradientStroke = function(a, b, d, e, f, g, h, i) {
  1087. return this._setStroke((new c.Stroke).radialGradient(a, b, d, e, f, g, h, i))
  1088. },
  1089. b.beginBitmapStroke = function(a, b) {
  1090. return this._setStroke((new c.Stroke).bitmap(a, b))
  1091. },
  1092. b.endStroke = function() {
  1093. return this.beginStroke()
  1094. },
  1095. b.curveTo = b.quadraticCurveTo,
  1096. b.drawRect = b.rect,
  1097. b.drawRoundRect = function(a, b, c, d, e) {
  1098. return this.drawRoundRectComplex(a, b, c, d, e, e, e, e)
  1099. },
  1100. b.drawRoundRectComplex = function(a, b, d, e, f, g, h, i) {
  1101. return this.append(new c.RoundRect(a, b, d, e, f, g, h, i))
  1102. },
  1103. b.drawCircle = function(a, b, d) {
  1104. return this.append(new c.Circle(a, b, d))
  1105. },
  1106. b.drawEllipse = function(a, b, d, e) {
  1107. return this.append(new c.Ellipse(a, b, d, e))
  1108. },
  1109. b.drawPolyStar = function(a, b, d, e, f, g) {
  1110. return this.append(new c.PolyStar(a, b, d, e, f, g))
  1111. },
  1112. b.append = function(a, b) {
  1113. return this._activeInstructions.push(a),
  1114. this.command = a,
  1115. b || (this._dirty = !0),
  1116. this
  1117. },
  1118. b.decodePath = function(b) {
  1119. for (var c = [this.moveTo, this.lineTo, this.quadraticCurveTo, this.bezierCurveTo, this.closePath], d = [2, 2, 4, 6, 0], e = 0, f = b.length, g = [], h = 0, i = 0, j = a.BASE_64; f > e;) {
  1120. var k = b.charAt(e),
  1121. l = j[k],
  1122. m = l >> 3,
  1123. n = c[m];
  1124. if (!n || 3 & l) throw "bad path data (@" + e + "): " + k;
  1125. var o = d[m];
  1126. m || (h = i = 0),
  1127. g.length = 0,
  1128. e++;
  1129. for (var p = (l >> 2 & 1) + 2, q = 0; o > q; q++) {
  1130. var r = j[b.charAt(e)],
  1131. s = r >> 5 ? -1 : 1;
  1132. r = (31 & r) << 6 | j[b.charAt(e + 1)],
  1133. 3 == p && (r = r << 6 | j[b.charAt(e + 2)]),
  1134. r = s * r / 10,
  1135. q % 2 ? h = r += h: i = r += i,
  1136. g[q] = r,
  1137. e += p
  1138. }
  1139. n.apply(this, g)
  1140. }
  1141. return this
  1142. },
  1143. b.store = function() {
  1144. return this._updateInstructions(!0),
  1145. this._storeIndex = this._instructions.length,
  1146. this
  1147. },
  1148. b.unstore = function() {
  1149. return this._storeIndex = 0,
  1150. this
  1151. },
  1152. b.clone = function() {
  1153. var b = new a;
  1154. return b.command = this.command,
  1155. b._stroke = this._stroke,
  1156. b._strokeStyle = this._strokeStyle,
  1157. b._strokeDash = this._strokeDash,
  1158. b._strokeIgnoreScale = this._strokeIgnoreScale,
  1159. b._fill = this._fill,
  1160. b._instructions = this._instructions.slice(),
  1161. b._commitIndex = this._commitIndex,
  1162. b._activeInstructions = this._activeInstructions.slice(),
  1163. b._dirty = this._dirty,
  1164. b._storeIndex = this._storeIndex,
  1165. b
  1166. },
  1167. b.toString = function() {
  1168. return "[Graphics]"
  1169. },
  1170. b.mt = b.moveTo,
  1171. b.lt = b.lineTo,
  1172. b.at = b.arcTo,
  1173. b.bt = b.bezierCurveTo,
  1174. b.qt = b.quadraticCurveTo,
  1175. b.a = b.arc,
  1176. b.r = b.rect,
  1177. b.cp = b.closePath,
  1178. b.c = b.clear,
  1179. b.f = b.beginFill,
  1180. b.lf = b.beginLinearGradientFill,
  1181. b.rf = b.beginRadialGradientFill,
  1182. b.bf = b.beginBitmapFill,
  1183. b.ef = b.endFill,
  1184. b.ss = b.setStrokeStyle,
  1185. b.sd = b.setStrokeDash,
  1186. b.s = b.beginStroke,
  1187. b.ls = b.beginLinearGradientStroke,
  1188. b.rs = b.beginRadialGradientStroke,
  1189. b.bs = b.beginBitmapStroke,
  1190. b.es = b.endStroke,
  1191. b.dr = b.drawRect,
  1192. b.rr = b.drawRoundRect,
  1193. b.rc = b.drawRoundRectComplex,
  1194. b.dc = b.drawCircle,
  1195. b.de = b.drawEllipse,
  1196. b.dp = b.drawPolyStar,
  1197. b.p = b.decodePath,
  1198. b._updateInstructions = function(b) {
  1199. var c = this._instructions,
  1200. d = this._activeInstructions,
  1201. e = this._commitIndex;
  1202. if (this._dirty && d.length) {
  1203. c.length = e,
  1204. c.push(a.beginCmd);
  1205. var f = d.length,
  1206. g = c.length;
  1207. c.length = g + f;
  1208. for (var h = 0; f > h; h++) c[h + g] = d[h];
  1209. this._fill && c.push(this._fill),
  1210. this._stroke && (this._strokeDash !== this._oldStrokeDash && (this._oldStrokeDash = this._strokeDash, c.push(this._strokeDash)), this._strokeStyle !== this._oldStrokeStyle && (this._oldStrokeStyle = this._strokeStyle, c.push(this._strokeStyle)), c.push(this._stroke)),
  1211. this._dirty = !1
  1212. }
  1213. b && (d.length = 0, this._commitIndex = c.length)
  1214. },
  1215. b._setFill = function(a) {
  1216. return this._updateInstructions(!0),
  1217. this.command = this._fill = a,
  1218. this
  1219. },
  1220. b._setStroke = function(a) {
  1221. return this._updateInstructions(!0),
  1222. (this.command = this._stroke = a) && (a.ignoreScale = this._strokeIgnoreScale),
  1223. this
  1224. },
  1225. (c.LineTo = function(a, b) {
  1226. this.x = a,
  1227. this.y = b
  1228. }).prototype.exec = function(a) {
  1229. a.lineTo(this.x, this.y)
  1230. },
  1231. (c.MoveTo = function(a, b) {
  1232. this.x = a,
  1233. this.y = b
  1234. }).prototype.exec = function(a) {
  1235. a.moveTo(this.x, this.y)
  1236. },
  1237. (c.ArcTo = function(a, b, c, d, e) {
  1238. this.x1 = a,
  1239. this.y1 = b,
  1240. this.x2 = c,
  1241. this.y2 = d,
  1242. this.radius = e
  1243. }).prototype.exec = function(a) {
  1244. a.arcTo(this.x1, this.y1, this.x2, this.y2, this.radius)
  1245. },
  1246. (c.Arc = function(a, b, c, d, e, f) {
  1247. this.x = a,
  1248. this.y = b,
  1249. this.radius = c,
  1250. this.startAngle = d,
  1251. this.endAngle = e,
  1252. this.anticlockwise = !!f
  1253. }).prototype.exec = function(a) {
  1254. a.arc(this.x, this.y, this.radius, this.startAngle, this.endAngle, this.anticlockwise)
  1255. },
  1256. (c.QuadraticCurveTo = function(a, b, c, d) {
  1257. this.cpx = a,
  1258. this.cpy = b,
  1259. this.x = c,
  1260. this.y = d
  1261. }).prototype.exec = function(a) {
  1262. a.quadraticCurveTo(this.cpx, this.cpy, this.x, this.y)
  1263. },
  1264. (c.BezierCurveTo = function(a, b, c, d, e, f) {
  1265. this.cp1x = a,
  1266. this.cp1y = b,
  1267. this.cp2x = c,
  1268. this.cp2y = d,
  1269. this.x = e,
  1270. this.y = f
  1271. }).prototype.exec = function(a) {
  1272. a.bezierCurveTo(this.cp1x, this.cp1y, this.cp2x, this.cp2y, this.x, this.y)
  1273. },
  1274. (c.Rect = function(a, b, c, d) {
  1275. this.x = a,
  1276. this.y = b,
  1277. this.w = c,
  1278. this.h = d
  1279. }).prototype.exec = function(a) {
  1280. a.rect(this.x, this.y, this.w, this.h)
  1281. },
  1282. (c.ClosePath = function() {}).prototype.exec = function(a) {
  1283. a.closePath()
  1284. },
  1285. (c.BeginPath = function() {}).prototype.exec = function(a) {
  1286. a.beginPath()
  1287. },
  1288. b = (c.Fill = function(a, b) {
  1289. this.style = a,
  1290. this.matrix = b
  1291. }).prototype,
  1292. b.exec = function(a) {
  1293. if (this.style) {
  1294. a.fillStyle = this.style;
  1295. var b = this.matrix;
  1296. b && (a.save(), a.transform(b.a, b.b, b.c, b.d, b.tx, b.ty)),
  1297. a.fill(),
  1298. b && a.restore()
  1299. }
  1300. },
  1301. b.linearGradient = function(b, c, d, e, f, g) {
  1302. for (var h = this.style = a._ctx.createLinearGradient(d, e, f, g), i = 0, j = b.length; j > i; i++) h.addColorStop(c[i], b[i]);
  1303. return h.props = {
  1304. colors: b,
  1305. ratios: c,
  1306. x0: d,
  1307. y0: e,
  1308. x1: f,
  1309. y1: g,
  1310. type: "linear"
  1311. },
  1312. this
  1313. },
  1314. b.radialGradient = function(b, c, d, e, f, g, h, i) {
  1315. for (var j = this.style = a._ctx.createRadialGradient(d, e, f, g, h, i), k = 0, l = b.length; l > k; k++) j.addColorStop(c[k], b[k]);
  1316. return j.props = {
  1317. colors: b,
  1318. ratios: c,
  1319. x0: d,
  1320. y0: e,
  1321. r0: f,
  1322. x1: g,
  1323. y1: h,
  1324. r1: i,
  1325. type: "radial"
  1326. },
  1327. this
  1328. },
  1329. b.bitmap = function(b, c) {
  1330. if (b.naturalWidth || b.getContext || b.readyState >= 2) {
  1331. var d = this.style = a._ctx.createPattern(b, c || "");
  1332. d.props = {
  1333. image: b,
  1334. repetition: c,
  1335. type: "bitmap"
  1336. }
  1337. }
  1338. return this
  1339. },
  1340. b.path = !1,
  1341. b = (c.Stroke = function(a, b) {
  1342. this.style = a,
  1343. this.ignoreScale = b
  1344. }).prototype,
  1345. b.exec = function(a) {
  1346. this.style && (a.strokeStyle = this.style, this.ignoreScale && (a.save(), a.setTransform(1, 0, 0, 1, 0, 0)), a.stroke(), this.ignoreScale && a.restore())
  1347. },
  1348. b.linearGradient = c.Fill.prototype.linearGradient,
  1349. b.radialGradient = c.Fill.prototype.radialGradient,
  1350. b.bitmap = c.Fill.prototype.bitmap,
  1351. b.path = !1,
  1352. b = (c.StrokeStyle = function(a, b, c, d, e) {
  1353. this.width = a,
  1354. this.caps = b,
  1355. this.joints = c,
  1356. this.miterLimit = d,
  1357. this.ignoreScale = e
  1358. }).prototype,
  1359. b.exec = function(b) {
  1360. b.lineWidth = null == this.width ? "1": this.width,
  1361. b.lineCap = null == this.caps ? "butt": isNaN(this.caps) ? this.caps: a.STROKE_CAPS_MAP[this.caps],
  1362. b.lineJoin = null == this.joints ? "miter": isNaN(this.joints) ? this.joints: a.STROKE_JOINTS_MAP[this.joints],
  1363. b.miterLimit = null == this.miterLimit ? "10": this.miterLimit,
  1364. b.ignoreScale = null == this.ignoreScale ? !1 : this.ignoreScale
  1365. },
  1366. b.path = !1,
  1367. (c.StrokeDash = function(a, b) {
  1368. this.segments = a,
  1369. this.offset = b || 0
  1370. }).prototype.exec = function(a) {
  1371. a.setLineDash && (a.setLineDash(this.segments || c.StrokeDash.EMPTY_SEGMENTS), a.lineDashOffset = this.offset || 0)
  1372. },
  1373. c.StrokeDash.EMPTY_SEGMENTS = [],
  1374. (c.RoundRect = function(a, b, c, d, e, f, g, h) {
  1375. this.x = a,
  1376. this.y = b,
  1377. this.w = c,
  1378. this.h = d,
  1379. this.radiusTL = e,
  1380. this.radiusTR = f,
  1381. this.radiusBR = g,
  1382. this.radiusBL = h
  1383. }).prototype.exec = function(a) {
  1384. var b = (j > i ? i: j) / 2,
  1385. c = 0,
  1386. d = 0,
  1387. e = 0,
  1388. f = 0,
  1389. g = this.x,
  1390. h = this.y,
  1391. i = this.w,
  1392. j = this.h,
  1393. k = this.radiusTL,
  1394. l = this.radiusTR,
  1395. m = this.radiusBR,
  1396. n = this.radiusBL;
  1397. 0 > k && (k *= c = -1),
  1398. k > b && (k = b),
  1399. 0 > l && (l *= d = -1),
  1400. l > b && (l = b),
  1401. 0 > m && (m *= e = -1),
  1402. m > b && (m = b),
  1403. 0 > n && (n *= f = -1),
  1404. n > b && (n = b),
  1405. a.moveTo(g + i - l, h),
  1406. a.arcTo(g + i + l * d, h - l * d, g + i, h + l, l),
  1407. a.lineTo(g + i, h + j - m),
  1408. a.arcTo(g + i + m * e, h + j + m * e, g + i - m, h + j, m),
  1409. a.lineTo(g + n, h + j),
  1410. a.arcTo(g - n * f, h + j + n * f, g, h + j - n, n),
  1411. a.lineTo(g, h + k),
  1412. a.arcTo(g - k * c, h - k * c, g + k, h, k),
  1413. a.closePath()
  1414. },
  1415. (c.Circle = function(a, b, c) {
  1416. this.x = a,
  1417. this.y = b,
  1418. this.radius = c
  1419. }).prototype.exec = function(a) {
  1420. a.arc(this.x, this.y, this.radius, 0, 2 * Math.PI)
  1421. },
  1422. (c.Ellipse = function(a, b, c, d) {
  1423. this.x = a,
  1424. this.y = b,
  1425. this.w = c,
  1426. this.h = d
  1427. }).prototype.exec = function(a) {
  1428. var b = this.x,
  1429. c = this.y,
  1430. d = this.w,
  1431. e = this.h,
  1432. f = .5522848,
  1433. g = d / 2 * f,
  1434. h = e / 2 * f,
  1435. i = b + d,
  1436. j = c + e,
  1437. k = b + d / 2,
  1438. l = c + e / 2;
  1439. a.moveTo(b, l),
  1440. a.bezierCurveTo(b, l - h, k - g, c, k, c),
  1441. a.bezierCurveTo(k + g, c, i, l - h, i, l),
  1442. a.bezierCurveTo(i, l + h, k + g, j, k, j),
  1443. a.bezierCurveTo(k - g, j, b, l + h, b, l)
  1444. },
  1445. (c.PolyStar = function(a, b, c, d, e, f) {
  1446. this.x = a,
  1447. this.y = b,
  1448. this.radius = c,
  1449. this.sides = d,
  1450. this.pointSize = e,
  1451. this.angle = f
  1452. }).prototype.exec = function(a) {
  1453. var b = this.x,
  1454. c = this.y,
  1455. d = this.radius,
  1456. e = (this.angle || 0) / 180 * Math.PI,
  1457. f = this.sides,
  1458. g = 1 - (this.pointSize || 0),
  1459. h = Math.PI / f;
  1460. a.moveTo(b + Math.cos(e) * d, c + Math.sin(e) * d);
  1461. for (var i = 0; f > i; i++) e += h,
  1462. 1 != g && a.lineTo(b + Math.cos(e) * d * g, c + Math.sin(e) * d * g),
  1463. e += h,
  1464. a.lineTo(b + Math.cos(e) * d, c + Math.sin(e) * d);
  1465. a.closePath()
  1466. },
  1467. a.beginCmd = new c.BeginPath,
  1468. createjs.Graphics = a
  1469. } (),
  1470. this.createjs = this.createjs || {},
  1471. function() {
  1472. "use strict";
  1473. function a() {
  1474. this.EventDispatcher_constructor(),
  1475. this.alpha = 1,
  1476. this.cacheCanvas = null,
  1477. this.cacheID = 0,
  1478. this.id = createjs.UID.get(),
  1479. this.mouseEnabled = !0,
  1480. this.tickEnabled = !0,
  1481. this.name = null,
  1482. this.parent = null,
  1483. this.regX = 0,
  1484. this.regY = 0,
  1485. this.rotation = 0,
  1486. this.scaleX = 1,
  1487. this.scaleY = 1,
  1488. this.skewX = 0,
  1489. this.skewY = 0,
  1490. this.shadow = null,
  1491. this.visible = !0,
  1492. this.x = 0,
  1493. this.y = 0,
  1494. this.transformMatrix = null,
  1495. this.compositeOperation = null,
  1496. this.snapToPixel = !0,
  1497. this.filters = null,
  1498. this.mask = null,
  1499. this.hitArea = null,
  1500. this.cursor = null,
  1501. this._cacheOffsetX = 0,
  1502. this._cacheOffsetY = 0,
  1503. this._filterOffsetX = 0,
  1504. this._filterOffsetY = 0,
  1505. this._cacheScale = 1,
  1506. this._cacheDataURLID = 0,
  1507. this._cacheDataURL = null,
  1508. this._props = new createjs.DisplayProps,
  1509. this._rectangle = new createjs.Rectangle,
  1510. this._bounds = null
  1511. }
  1512. var b = createjs.extend(a, createjs.EventDispatcher);
  1513. a._MOUSE_EVENTS = ["click", "dblclick", "mousedown", "mouseout", "mouseover", "pressmove", "pressup", "rollout", "rollover"],
  1514. a.suppressCrossDomainErrors = !1,
  1515. a._snapToPixelEnabled = !1;
  1516. var c = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  1517. c.getContext && (a._hitTestCanvas = c, a._hitTestContext = c.getContext("2d"), c.width = c.height = 1),
  1518. a._nextCacheID = 1,
  1519. b.getStage = function() {
  1520. for (var a = this,
  1521. b = createjs.Stage; a.parent;) a = a.parent;
  1522. return a instanceof b ? a: null
  1523. };
  1524. try {
  1525. Object.defineProperties(b, {
  1526. stage: {
  1527. get: b.getStage
  1528. }
  1529. })
  1530. } catch(d) {}
  1531. b.isVisible = function() {
  1532. return !! (this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY)
  1533. },
  1534. b.draw = function(a, b) {
  1535. var c = this.cacheCanvas;
  1536. if (b || !c) return ! 1;
  1537. var d = this._cacheScale;
  1538. return a.drawImage(c, this._cacheOffsetX + this._filterOffsetX, this._cacheOffsetY + this._filterOffsetY, c.width / d, c.height / d),
  1539. !0
  1540. },
  1541. b.updateContext = function(b) {
  1542. var c = this,
  1543. d = c.mask,
  1544. e = c._props.matrix;
  1545. d && d.graphics && !d.graphics.isEmpty() && (d.getMatrix(e), b.transform(e.a, e.b, e.c, e.d, e.tx, e.ty), d.graphics.drawAsPath(b), b.clip(), e.invert(), b.transform(e.a, e.b, e.c, e.d, e.tx, e.ty)),
  1546. this.getMatrix(e);
  1547. var f = e.tx,
  1548. g = e.ty;
  1549. a._snapToPixelEnabled && c.snapToPixel && (f = f + (0 > f ? -.5 : .5) | 0, g = g + (0 > g ? -.5 : .5) | 0),
  1550. b.transform(e.a, e.b, e.c, e.d, f, g),
  1551. b.globalAlpha *= c.alpha,
  1552. c.compositeOperation && (b.globalCompositeOperation = c.compositeOperation),
  1553. c.shadow && this._applyShadow(b, c.shadow)
  1554. },
  1555. b.cache = function(a, b, c, d, e) {
  1556. e = e || 1,
  1557. this.cacheCanvas || (this.cacheCanvas = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas")),
  1558. this._cacheWidth = c,
  1559. this._cacheHeight = d,
  1560. this._cacheOffsetX = a,
  1561. this._cacheOffsetY = b,
  1562. this._cacheScale = e,
  1563. this.updateCache()
  1564. },
  1565. b.updateCache = function(b) {
  1566. var c = this.cacheCanvas;
  1567. if (!c) throw "cache() must be called before updateCache()";
  1568. var d = this._cacheScale,
  1569. e = this._cacheOffsetX * d,
  1570. f = this._cacheOffsetY * d,
  1571. g = this._cacheWidth,
  1572. h = this._cacheHeight,
  1573. i = c.getContext("2d"),
  1574. j = this._getFilterBounds();
  1575. e += this._filterOffsetX = j.x,
  1576. f += this._filterOffsetY = j.y,
  1577. g = Math.ceil(g * d) + j.width,
  1578. h = Math.ceil(h * d) + j.height,
  1579. g != c.width || h != c.height ? (c.width = g, c.height = h) : b || i.clearRect(0, 0, g + 1, h + 1),
  1580. i.save(),
  1581. i.globalCompositeOperation = b,
  1582. i.setTransform(d, 0, 0, d, -e, -f),
  1583. this.draw(i, !0),
  1584. this._applyFilters(),
  1585. i.restore(),
  1586. this.cacheID = a._nextCacheID++
  1587. },
  1588. b.uncache = function() {
  1589. this._cacheDataURL = this.cacheCanvas = null,
  1590. this.cacheID = this._cacheOffsetX = this._cacheOffsetY = this._filterOffsetX = this._filterOffsetY = 0,
  1591. this._cacheScale = 1
  1592. },
  1593. b.getCacheDataURL = function() {
  1594. return this.cacheCanvas ? (this.cacheID != this._cacheDataURLID && (this._cacheDataURL = this.cacheCanvas.toDataURL()), this._cacheDataURL) : null
  1595. },
  1596. b.localToGlobal = function(a, b, c) {
  1597. return this.getConcatenatedMatrix(this._props.matrix).transformPoint(a, b, c || new createjs.Point)
  1598. },
  1599. b.globalToLocal = function(a, b, c) {
  1600. return this.getConcatenatedMatrix(this._props.matrix).invert().transformPoint(a, b, c || new createjs.Point)
  1601. },
  1602. b.localToLocal = function(a, b, c, d) {
  1603. return d = this.localToGlobal(a, b, d),
  1604. c.globalToLocal(d.x, d.y, d)
  1605. },
  1606. b.setTransform = function(a, b, c, d, e, f, g, h, i) {
  1607. return this.x = a || 0,
  1608. this.y = b || 0,
  1609. this.scaleX = null == c ? 1 : c,
  1610. this.scaleY = null == d ? 1 : d,
  1611. this.rotation = e || 0,
  1612. this.skewX = f || 0,
  1613. this.skewY = g || 0,
  1614. this.regX = h || 0,
  1615. this.regY = i || 0,
  1616. this
  1617. },
  1618. b.getMatrix = function(a) {
  1619. var b = this,
  1620. c = a && a.identity() || new createjs.Matrix2D;
  1621. return b.transformMatrix ? c.copy(b.transformMatrix) : c.appendTransform(b.x, b.y, b.scaleX, b.scaleY, b.rotation, b.skewX, b.skewY, b.regX, b.regY)
  1622. },
  1623. b.getConcatenatedMatrix = function(a) {
  1624. for (var b = this,
  1625. c = this.getMatrix(a); b = b.parent;) c.prependMatrix(b.getMatrix(b._props.matrix));
  1626. return c
  1627. },
  1628. b.getConcatenatedDisplayProps = function(a) {
  1629. a = a ? a.identity() : new createjs.DisplayProps;
  1630. var b = this,
  1631. c = b.getMatrix(a.matrix);
  1632. do a.prepend(b.visible, b.alpha, b.shadow, b.compositeOperation),
  1633. b != this && c.prependMatrix(b.getMatrix(b._props.matrix));
  1634. while (b = b.parent);
  1635. return a
  1636. },
  1637. b.hitTest = function(b, c) {
  1638. var d = a._hitTestContext;
  1639. d.setTransform(1, 0, 0, 1, -b, -c),
  1640. this.draw(d);
  1641. var e = this._testHit(d);
  1642. return d.setTransform(1, 0, 0, 1, 0, 0),
  1643. d.clearRect(0, 0, 2, 2),
  1644. e
  1645. },
  1646. b.set = function(a) {
  1647. for (var b in a) this[b] = a[b];
  1648. return this
  1649. },
  1650. b.getBounds = function() {
  1651. if (this._bounds) return this._rectangle.copy(this._bounds);
  1652. var a = this.cacheCanvas;
  1653. if (a) {
  1654. var b = this._cacheScale;
  1655. return this._rectangle.setValues(this._cacheOffsetX, this._cacheOffsetY, a.width / b, a.height / b)
  1656. }
  1657. return null
  1658. },
  1659. b.getTransformedBounds = function() {
  1660. return this._getBounds()
  1661. },
  1662. b.setBounds = function(a, b, c, d) {
  1663. null == a && (this._bounds = a),
  1664. this._bounds = (this._bounds || new createjs.Rectangle).setValues(a, b, c, d)
  1665. },
  1666. b.clone = function() {
  1667. return this._cloneProps(new a)
  1668. },
  1669. b.toString = function() {
  1670. return "[DisplayObject (name=" + this.name + ")]"
  1671. },
  1672. b._cloneProps = function(a) {
  1673. return a.alpha = this.alpha,
  1674. a.mouseEnabled = this.mouseEnabled,
  1675. a.tickEnabled = this.tickEnabled,
  1676. a.name = this.name,
  1677. a.regX = this.regX,
  1678. a.regY = this.regY,
  1679. a.rotation = this.rotation,
  1680. a.scaleX = this.scaleX,
  1681. a.scaleY = this.scaleY,
  1682. a.shadow = this.shadow,
  1683. a.skewX = this.skewX,
  1684. a.skewY = this.skewY,
  1685. a.visible = this.visible,
  1686. a.x = this.x,
  1687. a.y = this.y,
  1688. a.compositeOperation = this.compositeOperation,
  1689. a.snapToPixel = this.snapToPixel,
  1690. a.filters = null == this.filters ? null: this.filters.slice(0),
  1691. a.mask = this.mask,
  1692. a.hitArea = this.hitArea,
  1693. a.cursor = this.cursor,
  1694. a._bounds = this._bounds,
  1695. a
  1696. },
  1697. b._applyShadow = function(a, b) {
  1698. b = b || Shadow.identity,
  1699. a.shadowColor = b.color,
  1700. a.shadowOffsetX = b.offsetX,
  1701. a.shadowOffsetY = b.offsetY,
  1702. a.shadowBlur = b.blur
  1703. },
  1704. b._tick = function(a) {
  1705. var b = this._listeners;
  1706. b && b.tick && (a.target = null, a.propagationStopped = a.immediatePropagationStopped = !1, this.dispatchEvent(a))
  1707. },
  1708. b._testHit = function(b) {
  1709. try {
  1710. var c = b.getImageData(0, 0, 1, 1).data[3] > 1
  1711. } catch(d) {
  1712. if (!a.suppressCrossDomainErrors) throw "An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images."
  1713. }
  1714. return c
  1715. },
  1716. b._applyFilters = function() {
  1717. if (this.filters && 0 != this.filters.length && this.cacheCanvas) for (var a = this.filters.length,
  1718. b = this.cacheCanvas.getContext("2d"), c = this.cacheCanvas.width, d = this.cacheCanvas.height, e = 0; a > e; e++) this.filters[e].applyFilter(b, 0, 0, c, d)
  1719. },
  1720. b._getFilterBounds = function(a) {
  1721. var b, c = this.filters,
  1722. d = this._rectangle.setValues(0, 0, 0, 0);
  1723. if (!c || !(b = c.length)) return d;
  1724. for (var e = 0; b > e; e++) {
  1725. var f = this.filters[e];
  1726. f.getBounds && f.getBounds(d)
  1727. }
  1728. return d
  1729. },
  1730. b._getBounds = function(a, b) {
  1731. return this._transformBounds(this.getBounds(), a, b)
  1732. },
  1733. b._transformBounds = function(a, b, c) {
  1734. if (!a) return a;
  1735. var d = a.x,
  1736. e = a.y,
  1737. f = a.width,
  1738. g = a.height,
  1739. h = this._props.matrix;
  1740. h = c ? h.identity() : this.getMatrix(h),
  1741. (d || e) && h.appendTransform(0, 0, 1, 1, 0, 0, 0, -d, -e),
  1742. b && h.prependMatrix(b);
  1743. var i = f * h.a,
  1744. j = f * h.b,
  1745. k = g * h.c,
  1746. l = g * h.d,
  1747. m = h.tx,
  1748. n = h.ty,
  1749. o = m,
  1750. p = m,
  1751. q = n,
  1752. r = n;
  1753. return (d = i + m) < o ? o = d: d > p && (p = d),
  1754. (d = i + k + m) < o ? o = d: d > p && (p = d),
  1755. (d = k + m) < o ? o = d: d > p && (p = d),
  1756. (e = j + n) < q ? q = e: e > r && (r = e),
  1757. (e = j + l + n) < q ? q = e: e > r && (r = e),
  1758. (e = l + n) < q ? q = e: e > r && (r = e),
  1759. a.setValues(o, q, p - o, r - q)
  1760. },
  1761. b._hasMouseEventListener = function() {
  1762. for (var b = a._MOUSE_EVENTS,
  1763. c = 0,
  1764. d = b.length; d > c; c++) if (this.hasEventListener(b[c])) return ! 0;
  1765. return !! this.cursor
  1766. },
  1767. createjs.DisplayObject = createjs.promote(a, "EventDispatcher")
  1768. } (),
  1769. this.createjs = this.createjs || {},
  1770. function() {
  1771. "use strict";
  1772. function a() {
  1773. this.DisplayObject_constructor(),
  1774. this.children = [],
  1775. this.mouseChildren = !0,
  1776. this.tickChildren = !0
  1777. }
  1778. var b = createjs.extend(a, createjs.DisplayObject);
  1779. b.getNumChildren = function() {
  1780. return this.children.length
  1781. };
  1782. try {
  1783. Object.defineProperties(b, {
  1784. numChildren: {
  1785. get: b.getNumChildren
  1786. }
  1787. })
  1788. } catch(c) {}
  1789. b.initialize = a,
  1790. b.isVisible = function() {
  1791. var a = this.cacheCanvas || this.children.length;
  1792. return !! (this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY && a)
  1793. },
  1794. b.draw = function(a, b) {
  1795. if (this.DisplayObject_draw(a, b)) return ! 0;
  1796. for (var c = this.children.slice(), d = 0, e = c.length; e > d; d++) {
  1797. var f = c[d];
  1798. f.isVisible() && (a.save(), f.updateContext(a), f.draw(a), a.restore())
  1799. }
  1800. return ! 0
  1801. },
  1802. b.addChild = function(a) {
  1803. if (null == a) return a;
  1804. var b = arguments.length;
  1805. if (b > 1) {
  1806. for (var c = 0; b > c; c++) this.addChild(arguments[c]);
  1807. return arguments[b - 1]
  1808. }
  1809. return a.parent && a.parent.removeChild(a),
  1810. a.parent = this,
  1811. this.children.push(a),
  1812. a.dispatchEvent("added"),
  1813. a
  1814. },
  1815. b.addChildAt = function(a, b) {
  1816. var c = arguments.length,
  1817. d = arguments[c - 1];
  1818. if (0 > d || d > this.children.length) return arguments[c - 2];
  1819. if (c > 2) {
  1820. for (var e = 0; c - 1 > e; e++) this.addChildAt(arguments[e], d + e);
  1821. return arguments[c - 2]
  1822. }
  1823. return a.parent && a.parent.removeChild(a),
  1824. a.parent = this,
  1825. this.children.splice(b, 0, a),
  1826. a.dispatchEvent("added"),
  1827. a
  1828. },
  1829. b.removeChild = function(a) {
  1830. var b = arguments.length;
  1831. if (b > 1) {
  1832. for (var c = !0,
  1833. d = 0; b > d; d++) c = c && this.removeChild(arguments[d]);
  1834. return c
  1835. }
  1836. return this.removeChildAt(createjs.indexOf(this.children, a))
  1837. },
  1838. b.removeChildAt = function(a) {
  1839. var b = arguments.length;
  1840. if (b > 1) {
  1841. for (var c = [], d = 0; b > d; d++) c[d] = arguments[d];
  1842. c.sort(function(a, b) {
  1843. return b - a
  1844. });
  1845. for (var e = !0,
  1846. d = 0; b > d; d++) e = e && this.removeChildAt(c[d]);
  1847. return e
  1848. }
  1849. if (0 > a || a > this.children.length - 1) return ! 1;
  1850. var f = this.children[a];
  1851. return f && (f.parent = null),
  1852. this.children.splice(a, 1),
  1853. f.dispatchEvent("removed"),
  1854. !0
  1855. },
  1856. b.removeAllChildren = function() {
  1857. for (var a = this.children; a.length;) this.removeChildAt(0)
  1858. },
  1859. b.getChildAt = function(a) {
  1860. return this.children[a]
  1861. },
  1862. b.getChildByName = function(a) {
  1863. for (var b = this.children,
  1864. c = 0,
  1865. d = b.length; d > c; c++) if (b[c].name == a) return b[c];
  1866. return null
  1867. },
  1868. b.sortChildren = function(a) {
  1869. this.children.sort(a)
  1870. },
  1871. b.getChildIndex = function(a) {
  1872. return createjs.indexOf(this.children, a)
  1873. },
  1874. b.swapChildrenAt = function(a, b) {
  1875. var c = this.children,
  1876. d = c[a],
  1877. e = c[b];
  1878. d && e && (c[a] = e, c[b] = d)
  1879. },
  1880. b.swapChildren = function(a, b) {
  1881. for (var c, d, e = this.children,
  1882. f = 0,
  1883. g = e.length; g > f && (e[f] == a && (c = f), e[f] == b && (d = f), null == c || null == d); f++);
  1884. f != g && (e[c] = b, e[d] = a)
  1885. },
  1886. b.setChildIndex = function(a, b) {
  1887. var c = this.children,
  1888. d = c.length;
  1889. if (! (a.parent != this || 0 > b || b >= d)) {
  1890. for (var e = 0; d > e && c[e] != a; e++);
  1891. e != d && e != b && (c.splice(e, 1), c.splice(b, 0, a))
  1892. }
  1893. },
  1894. b.contains = function(a) {
  1895. for (; a;) {
  1896. if (a == this) return ! 0;
  1897. a = a.parent
  1898. }
  1899. return ! 1
  1900. },
  1901. b.hitTest = function(a, b) {
  1902. return null != this.getObjectUnderPoint(a, b)
  1903. },
  1904. b.getObjectsUnderPoint = function(a, b, c) {
  1905. var d = [],
  1906. e = this.localToGlobal(a, b);
  1907. return this._getObjectsUnderPoint(e.x, e.y, d, c > 0, 1 == c),
  1908. d
  1909. },
  1910. b.getObjectUnderPoint = function(a, b, c) {
  1911. var d = this.localToGlobal(a, b);
  1912. return this._getObjectsUnderPoint(d.x, d.y, null, c > 0, 1 == c)
  1913. },
  1914. b.getBounds = function() {
  1915. return this._getBounds(null, !0)
  1916. },
  1917. b.getTransformedBounds = function() {
  1918. return this._getBounds()
  1919. },
  1920. b.clone = function(b) {
  1921. var c = this._cloneProps(new a);
  1922. return b && this._cloneChildren(c),
  1923. c
  1924. },
  1925. b.toString = function() {
  1926. return "[Container (name=" + this.name + ")]"
  1927. },
  1928. b._tick = function(a) {
  1929. if (this.tickChildren) for (var b = this.children.length - 1; b >= 0; b--) {
  1930. var c = this.children[b];
  1931. c.tickEnabled && c._tick && c._tick(a)
  1932. }
  1933. this.DisplayObject__tick(a)
  1934. },
  1935. b._cloneChildren = function(a) {
  1936. a.children.length && a.removeAllChildren();
  1937. for (var b = a.children,
  1938. c = 0,
  1939. d = this.children.length; d > c; c++) {
  1940. var e = this.children[c].clone(!0);
  1941. e.parent = a,
  1942. b.push(e)
  1943. }
  1944. },
  1945. b._getObjectsUnderPoint = function(b, c, d, e, f, g) {
  1946. if (g = g || 0, !g && !this._testMask(this, b, c)) return null;
  1947. var h, i = createjs.DisplayObject._hitTestContext;
  1948. f = f || e && this._hasMouseEventListener();
  1949. for (var j = this.children,
  1950. k = j.length,
  1951. l = k - 1; l >= 0; l--) {
  1952. var m = j[l],
  1953. n = m.hitArea;
  1954. if (m.visible && (n || m.isVisible()) && (!e || m.mouseEnabled) && (n || this._testMask(m, b, c))) if (!n && m instanceof a) {
  1955. var o = m._getObjectsUnderPoint(b, c, d, e, f, g + 1);
  1956. if (!d && o) return e && !this.mouseChildren ? this: o
  1957. } else {
  1958. if (e && !f && !m._hasMouseEventListener()) continue;
  1959. var p = m.getConcatenatedDisplayProps(m._props);
  1960. if (h = p.matrix, n && (h.appendMatrix(n.getMatrix(n._props.matrix)), p.alpha = n.alpha), i.globalAlpha = p.alpha, i.setTransform(h.a, h.b, h.c, h.d, h.tx - b, h.ty - c), (n || m).draw(i), !this._testHit(i)) continue;
  1961. if (i.setTransform(1, 0, 0, 1, 0, 0), i.clearRect(0, 0, 2, 2), !d) return e && !this.mouseChildren ? this: m;
  1962. d.push(m)
  1963. }
  1964. }
  1965. return null
  1966. },
  1967. b._testMask = function(a, b, c) {
  1968. var d = a.mask;
  1969. if (!d || !d.graphics || d.graphics.isEmpty()) return ! 0;
  1970. var e = this._props.matrix,
  1971. f = a.parent;
  1972. e = f ? f.getConcatenatedMatrix(e) : e.identity(),
  1973. e = d.getMatrix(d._props.matrix).prependMatrix(e);
  1974. var g = createjs.DisplayObject._hitTestContext;
  1975. return g.setTransform(e.a, e.b, e.c, e.d, e.tx - b, e.ty - c),
  1976. d.graphics.drawAsPath(g),
  1977. g.fillStyle = "#000",
  1978. g.fill(),
  1979. this._testHit(g) ? (g.setTransform(1, 0, 0, 1, 0, 0), g.clearRect(0, 0, 2, 2), !0) : !1
  1980. },
  1981. b._getBounds = function(a, b) {
  1982. var c = this.DisplayObject_getBounds();
  1983. if (c) return this._transformBounds(c, a, b);
  1984. var d = this._props.matrix;
  1985. d = b ? d.identity() : this.getMatrix(d),
  1986. a && d.prependMatrix(a);
  1987. for (var e = this.children.length,
  1988. f = null,
  1989. g = 0; e > g; g++) {
  1990. var h = this.children[g];
  1991. h.visible && (c = h._getBounds(d)) && (f ? f.extend(c.x, c.y, c.width, c.height) : f = c.clone())
  1992. }
  1993. return f
  1994. },
  1995. createjs.Container = createjs.promote(a, "DisplayObject")
  1996. } (),
  1997. this.createjs = this.createjs || {},
  1998. function() {
  1999. "use strict";
  2000. function a(a) {
  2001. this.Container_constructor(),
  2002. this.autoClear = !0,
  2003. this.canvas = "string" == typeof a ? document.getElementById(a) : a,
  2004. this.mouseX = 0,
  2005. this.mouseY = 0,
  2006. this.drawRect = null,
  2007. this.snapToPixelEnabled = !1,
  2008. this.mouseInBounds = !1,
  2009. this.tickOnUpdate = !0,
  2010. this.mouseMoveOutside = !1,
  2011. this.preventSelection = !0,
  2012. this._pointerData = {},
  2013. this._pointerCount = 0,
  2014. this._primaryPointerID = null,
  2015. this._mouseOverIntervalID = null,
  2016. this._nextStage = null,
  2017. this._prevStage = null,
  2018. this.enableDOMEvents(!0)
  2019. }
  2020. var b = createjs.extend(a, createjs.Container);
  2021. b._get_nextStage = function() {
  2022. return this._nextStage
  2023. },
  2024. b._set_nextStage = function(a) {
  2025. this._nextStage && (this._nextStage._prevStage = null),
  2026. a && (a._prevStage = this),
  2027. this._nextStage = a
  2028. };
  2029. try {
  2030. Object.defineProperties(b, {
  2031. nextStage: {
  2032. get: b._get_nextStage,
  2033. set: b._set_nextStage
  2034. }
  2035. })
  2036. } catch(c) {}
  2037. b.update = function(a) {
  2038. if (this.canvas && (this.tickOnUpdate && this.tick(a), this.dispatchEvent("drawstart", !1, !0) !== !1)) {
  2039. createjs.DisplayObject._snapToPixelEnabled = this.snapToPixelEnabled;
  2040. var b = this.drawRect,
  2041. c = this.canvas.getContext("2d");
  2042. c.setTransform(1, 0, 0, 1, 0, 0),
  2043. this.autoClear && (b ? c.clearRect(b.x, b.y, b.width, b.height) : c.clearRect(0, 0, this.canvas.width + 1, this.canvas.height + 1)),
  2044. c.save(),
  2045. this.drawRect && (c.beginPath(), c.rect(b.x, b.y, b.width, b.height), c.clip()),
  2046. this.updateContext(c),
  2047. this.draw(c, !1),
  2048. c.restore(),
  2049. this.dispatchEvent("drawend")
  2050. }
  2051. },
  2052. b.tick = function(a) {
  2053. if (this.tickEnabled && this.dispatchEvent("tickstart", !1, !0) !== !1) {
  2054. var b = new createjs.Event("tick");
  2055. if (a) for (var c in a) a.hasOwnProperty(c) && (b[c] = a[c]);
  2056. this._tick(b),
  2057. this.dispatchEvent("tickend")
  2058. }
  2059. },
  2060. b.handleEvent = function(a) {
  2061. "tick" == a.type && this.update(a)
  2062. },
  2063. b.clear = function() {
  2064. if (this.canvas) {
  2065. var a = this.canvas.getContext("2d");
  2066. a.setTransform(1, 0, 0, 1, 0, 0),
  2067. a.clearRect(0, 0, this.canvas.width + 1, this.canvas.height + 1)
  2068. }
  2069. },
  2070. b.toDataURL = function(a, b) {
  2071. var c, d = this.canvas.getContext("2d"),
  2072. e = this.canvas.width,
  2073. f = this.canvas.height;
  2074. if (a) {
  2075. c = d.getImageData(0, 0, e, f);
  2076. var g = d.globalCompositeOperation;
  2077. d.globalCompositeOperation = "destination-over",
  2078. d.fillStyle = a,
  2079. d.fillRect(0, 0, e, f)
  2080. }
  2081. var h = this.canvas.toDataURL(b || "image/png");
  2082. return a && (d.putImageData(c, 0, 0), d.globalCompositeOperation = g),
  2083. h
  2084. },
  2085. b.enableMouseOver = function(a) {
  2086. if (this._mouseOverIntervalID && (clearInterval(this._mouseOverIntervalID), this._mouseOverIntervalID = null, 0 == a && this._testMouseOver(!0)), null == a) a = 20;
  2087. else if (0 >= a) return;
  2088. var b = this;
  2089. this._mouseOverIntervalID = setInterval(function() {
  2090. b._testMouseOver()
  2091. },
  2092. 1e3 / Math.min(50, a))
  2093. },
  2094. b.enableDOMEvents = function(a) {
  2095. null == a && (a = !0);
  2096. var b, c, d = this._eventListeners;
  2097. if (!a && d) {
  2098. for (b in d) c = d[b],
  2099. c.t.removeEventListener(b, c.f, !1);
  2100. this._eventListeners = null
  2101. } else if (a && !d && this.canvas) {
  2102. var e = window.addEventListener ? window: document,
  2103. f = this;
  2104. d = this._eventListeners = {},
  2105. d.mouseup = {
  2106. t: e,
  2107. f: function(a) {
  2108. f._handleMouseUp(a)
  2109. }
  2110. },
  2111. d.mousemove = {
  2112. t: e,
  2113. f: function(a) {
  2114. f._handleMouseMove(a)
  2115. }
  2116. },
  2117. d.dblclick = {
  2118. t: this.canvas,
  2119. f: function(a) {
  2120. f._handleDoubleClick(a)
  2121. }
  2122. },
  2123. d.mousedown = {
  2124. t: this.canvas,
  2125. f: function(a) {
  2126. f._handleMouseDown(a)
  2127. }
  2128. };
  2129. for (b in d) c = d[b],
  2130. c.t.addEventListener(b, c.f, !1)
  2131. }
  2132. },
  2133. b.clone = function() {
  2134. throw "Stage cannot be cloned."
  2135. },
  2136. b.toString = function() {
  2137. return "[Stage (name=" + this.name + ")]"
  2138. },
  2139. b._getElementRect = function(a) {
  2140. var b;
  2141. try {
  2142. b = a.getBoundingClientRect()
  2143. } catch(c) {
  2144. b = {
  2145. top: a.offsetTop,
  2146. left: a.offsetLeft,
  2147. width: a.offsetWidth,
  2148. height: a.offsetHeight
  2149. }
  2150. }
  2151. var d = (window.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || document.body.clientLeft || 0),
  2152. e = (window.pageYOffset || document.scrollTop || 0) - (document.clientTop || document.body.clientTop || 0),
  2153. f = window.getComputedStyle ? getComputedStyle(a, null) : a.currentStyle,
  2154. g = parseInt(f.paddingLeft) + parseInt(f.borderLeftWidth),
  2155. h = parseInt(f.paddingTop) + parseInt(f.borderTopWidth),
  2156. i = parseInt(f.paddingRight) + parseInt(f.borderRightWidth),
  2157. j = parseInt(f.paddingBottom) + parseInt(f.borderBottomWidth);
  2158. return {
  2159. left: b.left + d + g,
  2160. right: b.right + d - i,
  2161. top: b.top + e + h,
  2162. bottom: b.bottom + e - j
  2163. }
  2164. },
  2165. b._getPointerData = function(a) {
  2166. var b = this._pointerData[a];
  2167. return b || (b = this._pointerData[a] = {
  2168. x: 0,
  2169. y: 0
  2170. }),
  2171. b
  2172. },
  2173. b._handleMouseMove = function(a) {
  2174. a || (a = window.event),
  2175. this._handlePointerMove( - 1, a, a.pageX, a.pageY)
  2176. },
  2177. b._handlePointerMove = function(a, b, c, d, e) {
  2178. if ((!this._prevStage || void 0 !== e) && this.canvas) {
  2179. var f = this._nextStage,
  2180. g = this._getPointerData(a),
  2181. h = g.inBounds;
  2182. this._updatePointerPosition(a, b, c, d),
  2183. (h || g.inBounds || this.mouseMoveOutside) && ( - 1 === a && g.inBounds == !h && this._dispatchMouseEvent(this, h ? "mouseleave": "mouseenter", !1, a, g, b), this._dispatchMouseEvent(this, "stagemousemove", !1, a, g, b), this._dispatchMouseEvent(g.target, "pressmove", !0, a, g, b)),
  2184. f && f._handlePointerMove(a, b, c, d, null)
  2185. }
  2186. },
  2187. b._updatePointerPosition = function(a, b, c, d) {
  2188. var e = this._getElementRect(this.canvas);
  2189. c -= e.left,
  2190. d -= e.top;
  2191. var f = this.canvas.width,
  2192. g = this.canvas.height;
  2193. c /= (e.right - e.left) / f,
  2194. d /= (e.bottom - e.top) / g;
  2195. var h = this._getPointerData(a); (h.inBounds = c >= 0 && d >= 0 && f - 1 >= c && g - 1 >= d) ? (h.x = c, h.y = d) : this.mouseMoveOutside && (h.x = 0 > c ? 0 : c > f - 1 ? f - 1 : c, h.y = 0 > d ? 0 : d > g - 1 ? g - 1 : d),
  2196. h.posEvtObj = b,
  2197. h.rawX = c,
  2198. h.rawY = d,
  2199. (a === this._primaryPointerID || -1 === a) && (this.mouseX = h.x, this.mouseY = h.y, this.mouseInBounds = h.inBounds)
  2200. },
  2201. b._handleMouseUp = function(a) {
  2202. this._handlePointerUp( - 1, a, !1)
  2203. },
  2204. b._handlePointerUp = function(a, b, c, d) {
  2205. var e = this._nextStage,
  2206. f = this._getPointerData(a);
  2207. if (!this._prevStage || void 0 !== d) {
  2208. var g = null,
  2209. h = f.target;
  2210. d || !h && !e || (g = this._getObjectsUnderPoint(f.x, f.y, null, !0)),
  2211. f.down && (this._dispatchMouseEvent(this, "stagemouseup", !1, a, f, b, g), f.down = !1),
  2212. g == h && this._dispatchMouseEvent(h, "click", !0, a, f, b),
  2213. this._dispatchMouseEvent(h, "pressup", !0, a, f, b),
  2214. c ? (a == this._primaryPointerID && (this._primaryPointerID = null), delete this._pointerData[a]) : f.target = null,
  2215. e && e._handlePointerUp(a, b, c, d || g && this)
  2216. }
  2217. },
  2218. b._handleMouseDown = function(a) {
  2219. this._handlePointerDown( - 1, a, a.pageX, a.pageY)
  2220. },
  2221. b._handlePointerDown = function(a, b, c, d, e) {
  2222. this.preventSelection && b.preventDefault(),
  2223. (null == this._primaryPointerID || -1 === a) && (this._primaryPointerID = a),
  2224. null != d && this._updatePointerPosition(a, b, c, d);
  2225. var f = null,
  2226. g = this._nextStage,
  2227. h = this._getPointerData(a);
  2228. e || (f = h.target = this._getObjectsUnderPoint(h.x, h.y, null, !0)),
  2229. h.inBounds && (this._dispatchMouseEvent(this, "stagemousedown", !1, a, h, b, f), h.down = !0),
  2230. this._dispatchMouseEvent(f, "mousedown", !0, a, h, b),
  2231. g && g._handlePointerDown(a, b, c, d, e || f && this)
  2232. },
  2233. b._testMouseOver = function(a, b, c) {
  2234. if (!this._prevStage || void 0 !== b) {
  2235. var d = this._nextStage;
  2236. if (!this._mouseOverIntervalID) return void(d && d._testMouseOver(a, b, c));
  2237. var e = this._getPointerData( - 1);
  2238. if (e && (a || this.mouseX != this._mouseOverX || this.mouseY != this._mouseOverY || !this.mouseInBounds)) {
  2239. var f, g, h, i = e.posEvtObj,
  2240. j = c || i && i.target == this.canvas,
  2241. k = null,
  2242. l = -1,
  2243. m = ""; ! b && (a || this.mouseInBounds && j) && (k = this._getObjectsUnderPoint(this.mouseX, this.mouseY, null, !0), this._mouseOverX = this.mouseX, this._mouseOverY = this.mouseY);
  2244. var n = this._mouseOverTarget || [],
  2245. o = n[n.length - 1],
  2246. p = this._mouseOverTarget = [];
  2247. for (f = k; f;) p.unshift(f),
  2248. m || (m = f.cursor),
  2249. f = f.parent;
  2250. for (this.canvas.style.cursor = m, !b && c && (c.canvas.style.cursor = m), g = 0, h = p.length; h > g && p[g] == n[g]; g++) l = g;
  2251. for (o != k && this._dispatchMouseEvent(o, "mouseout", !0, -1, e, i, k), g = n.length - 1; g > l; g--) this._dispatchMouseEvent(n[g], "rollout", !1, -1, e, i, k);
  2252. for (g = p.length - 1; g > l; g--) this._dispatchMouseEvent(p[g], "rollover", !1, -1, e, i, o);
  2253. o != k && this._dispatchMouseEvent(k, "mouseover", !0, -1, e, i, o),
  2254. d && d._testMouseOver(a, b || k && this, c || j && this)
  2255. }
  2256. }
  2257. },
  2258. b._handleDoubleClick = function(a, b) {
  2259. var c = null,
  2260. d = this._nextStage,
  2261. e = this._getPointerData( - 1);
  2262. b || (c = this._getObjectsUnderPoint(e.x, e.y, null, !0), this._dispatchMouseEvent(c, "dblclick", !0, -1, e, a)),
  2263. d && d._handleDoubleClick(a, b || c && this)
  2264. },
  2265. b._dispatchMouseEvent = function(a, b, c, d, e, f, g) {
  2266. if (a && (c || a.hasEventListener(b))) {
  2267. var h = new createjs.MouseEvent(b, c, !1, e.x, e.y, f, d, d === this._primaryPointerID || -1 === d, e.rawX, e.rawY, g);
  2268. a.dispatchEvent(h)
  2269. }
  2270. },
  2271. createjs.Stage = createjs.promote(a, "Container")
  2272. } (),
  2273. this.createjs = this.createjs || {},
  2274. function() {
  2275. function a(a) {
  2276. this.DisplayObject_constructor(),
  2277. "string" == typeof a ? (this.image = document.createElement("img"), this.image.src = a) : this.image = a,
  2278. this.sourceRect = null
  2279. }
  2280. var b = createjs.extend(a, createjs.DisplayObject);
  2281. b.initialize = a,
  2282. b.isVisible = function() {
  2283. var a = this.image,
  2284. b = this.cacheCanvas || a && (a.naturalWidth || a.getContext || a.readyState >= 2);
  2285. return !! (this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY && b)
  2286. },
  2287. b.draw = function(a, b) {
  2288. if (this.DisplayObject_draw(a, b) || !this.image) return ! 0;
  2289. var c = this.image,
  2290. d = this.sourceRect;
  2291. if (d) {
  2292. var e = d.x,
  2293. f = d.y,
  2294. g = e + d.width,
  2295. h = f + d.height,
  2296. i = 0,
  2297. j = 0,
  2298. k = c.width,
  2299. l = c.height;
  2300. 0 > e && (i -= e, e = 0),
  2301. g > k && (g = k),
  2302. 0 > f && (j -= f, f = 0),
  2303. h > l && (h = l),
  2304. a.drawImage(c, e, f, g - e, h - f, i, j, g - e, h - f)
  2305. } else a.drawImage(c, 0, 0);
  2306. return ! 0
  2307. },
  2308. b.getBounds = function() {
  2309. var a = this.DisplayObject_getBounds();
  2310. if (a) return a;
  2311. var b = this.image,
  2312. c = this.sourceRect || b,
  2313. d = b && (b.naturalWidth || b.getContext || b.readyState >= 2);
  2314. return d ? this._rectangle.setValues(0, 0, c.width, c.height) : null
  2315. },
  2316. b.clone = function() {
  2317. var b = new a(this.image);
  2318. return this.sourceRect && (b.sourceRect = this.sourceRect.clone()),
  2319. this._cloneProps(b),
  2320. b
  2321. },
  2322. b.toString = function() {
  2323. return "[Bitmap (name=" + this.name + ")]"
  2324. },
  2325. createjs.Bitmap = createjs.promote(a, "DisplayObject")
  2326. } (),
  2327. this.createjs = this.createjs || {},
  2328. function() {
  2329. "use strict";
  2330. function a(a, b) {
  2331. this.DisplayObject_constructor(),
  2332. this.currentFrame = 0,
  2333. this.currentAnimation = null,
  2334. this.paused = !0,
  2335. this.spriteSheet = a,
  2336. this.currentAnimationFrame = 0,
  2337. this.framerate = 0,
  2338. this._animation = null,
  2339. this._currentFrame = null,
  2340. this._skipAdvance = !1,
  2341. null != b && this.gotoAndPlay(b)
  2342. }
  2343. var b = createjs.extend(a, createjs.DisplayObject);
  2344. b.initialize = a,
  2345. b.isVisible = function() {
  2346. var a = this.cacheCanvas || this.spriteSheet.complete;
  2347. return !! (this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY && a)
  2348. },
  2349. b.draw = function(a, b) {
  2350. if (this.DisplayObject_draw(a, b)) return ! 0;
  2351. this._normalizeFrame();
  2352. var c = this.spriteSheet.getFrame(0 | this._currentFrame);
  2353. if (!c) return ! 1;
  2354. var d = c.rect;
  2355. return d.width && d.height && a.drawImage(c.image, d.x, d.y, d.width, d.height, -c.regX, -c.regY, d.width, d.height),
  2356. !0
  2357. },
  2358. b.play = function() {
  2359. this.paused = !1
  2360. },
  2361. b.stop = function() {
  2362. this.paused = !0
  2363. },
  2364. b.gotoAndPlay = function(a) {
  2365. this.paused = !1,
  2366. this._skipAdvance = !0,
  2367. this._goto(a)
  2368. },
  2369. b.gotoAndStop = function(a) {
  2370. this.paused = !0,
  2371. this._goto(a)
  2372. },
  2373. b.advance = function(a) {
  2374. var b = this.framerate || this.spriteSheet.framerate,
  2375. c = b && null != a ? a / (1e3 / b) : 1;
  2376. this._normalizeFrame(c)
  2377. },
  2378. b.getBounds = function() {
  2379. return this.DisplayObject_getBounds() || this.spriteSheet.getFrameBounds(this.currentFrame, this._rectangle)
  2380. },
  2381. b.clone = function() {
  2382. return this._cloneProps(new a(this.spriteSheet))
  2383. },
  2384. b.toString = function() {
  2385. return "[Sprite (name=" + this.name + ")]"
  2386. },
  2387. b._cloneProps = function(a) {
  2388. return this.DisplayObject__cloneProps(a),
  2389. a.currentFrame = this.currentFrame,
  2390. a.currentAnimation = this.currentAnimation,
  2391. a.paused = this.paused,
  2392. a.currentAnimationFrame = this.currentAnimationFrame,
  2393. a.framerate = this.framerate,
  2394. a._animation = this._animation,
  2395. a._currentFrame = this._currentFrame,
  2396. a._skipAdvance = this._skipAdvance,
  2397. a
  2398. },
  2399. b._tick = function(a) {
  2400. this.paused || (this._skipAdvance || this.advance(a && a.delta), this._skipAdvance = !1),
  2401. this.DisplayObject__tick(a)
  2402. },
  2403. b._normalizeFrame = function(a) {
  2404. a = a || 0;
  2405. var b, c = this._animation,
  2406. d = this.paused,
  2407. e = this._currentFrame;
  2408. if (c) {
  2409. var f = c.speed || 1,
  2410. g = this.currentAnimationFrame;
  2411. if (b = c.frames.length, g + a * f >= b) {
  2412. var h = c.next;
  2413. if (this._dispatchAnimationEnd(c, e, d, h, b - 1)) return;
  2414. if (h) return this._goto(h, a - (b - g) / f);
  2415. this.paused = !0,
  2416. g = c.frames.length - 1
  2417. } else g += a * f;
  2418. this.currentAnimationFrame = g,
  2419. this._currentFrame = c.frames[0 | g]
  2420. } else if (e = this._currentFrame += a, b = this.spriteSheet.getNumFrames(), e >= b && b > 0 && !this._dispatchAnimationEnd(c, e, d, b - 1) && (this._currentFrame -= b) >= b) return this._normalizeFrame();
  2421. e = 0 | this._currentFrame,
  2422. this.currentFrame != e && (this.currentFrame = e, this.dispatchEvent("change"))
  2423. },
  2424. b._dispatchAnimationEnd = function(a, b, c, d, e) {
  2425. var f = a ? a.name: null;
  2426. if (this.hasEventListener("animationend")) {
  2427. var g = new createjs.Event("animationend");
  2428. g.name = f,
  2429. g.next = d,
  2430. this.dispatchEvent(g)
  2431. }
  2432. var h = this._animation != a || this._currentFrame != b;
  2433. return h || c || !this.paused || (this.currentAnimationFrame = e, h = !0),
  2434. h
  2435. },
  2436. b._goto = function(a, b) {
  2437. if (this.currentAnimationFrame = 0, isNaN(a)) {
  2438. var c = this.spriteSheet.getAnimation(a);
  2439. c && (this._animation = c, this.currentAnimation = a, this._normalizeFrame(b))
  2440. } else this.currentAnimation = this._animation = null,
  2441. this._currentFrame = a,
  2442. this._normalizeFrame()
  2443. },
  2444. createjs.Sprite = createjs.promote(a, "DisplayObject")
  2445. } (),
  2446. this.createjs = this.createjs || {},
  2447. function() {
  2448. "use strict";
  2449. function a(a) {
  2450. this.DisplayObject_constructor(),
  2451. this.graphics = a ? a: new createjs.Graphics
  2452. }
  2453. var b = createjs.extend(a, createjs.DisplayObject);
  2454. b.isVisible = function() {
  2455. var a = this.cacheCanvas || this.graphics && !this.graphics.isEmpty();
  2456. return !! (this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY && a)
  2457. },
  2458. b.draw = function(a, b) {
  2459. return this.DisplayObject_draw(a, b) ? !0 : (this.graphics.draw(a, this), !0)
  2460. },
  2461. b.clone = function(b) {
  2462. var c = b && this.graphics ? this.graphics.clone() : this.graphics;
  2463. return this._cloneProps(new a(c))
  2464. },
  2465. b.toString = function() {
  2466. return "[Shape (name=" + this.name + ")]"
  2467. },
  2468. createjs.Shape = createjs.promote(a, "DisplayObject")
  2469. } (),
  2470. this.createjs = this.createjs || {},
  2471. function() {
  2472. "use strict";
  2473. function a(a, b, c) {
  2474. this.DisplayObject_constructor(),
  2475. this.text = a,
  2476. this.font = b,
  2477. this.color = c,
  2478. this.textAlign = "left",
  2479. this.textBaseline = "top",
  2480. this.maxWidth = null,
  2481. this.outline = 0,
  2482. this.lineHeight = 0,
  2483. this.lineWidth = null
  2484. }
  2485. var b = createjs.extend(a, createjs.DisplayObject),
  2486. c = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  2487. c.getContext && (a._workingContext = c.getContext("2d"), c.width = c.height = 1),
  2488. a.H_OFFSETS = {
  2489. start: 0,
  2490. left: 0,
  2491. center: -.5,
  2492. end: -1,
  2493. right: -1
  2494. },
  2495. a.V_OFFSETS = {
  2496. top: 0,
  2497. hanging: -.01,
  2498. middle: -.4,
  2499. alphabetic: -.8,
  2500. ideographic: -.85,
  2501. bottom: -1
  2502. },
  2503. b.isVisible = function() {
  2504. var a = this.cacheCanvas || null != this.text && "" !== this.text;
  2505. return !! (this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY && a)
  2506. },
  2507. b.draw = function(a, b) {
  2508. if (this.DisplayObject_draw(a, b)) return ! 0;
  2509. var c = this.color || "#000";
  2510. return this.outline ? (a.strokeStyle = c, a.lineWidth = 1 * this.outline) : a.fillStyle = c,
  2511. this._drawText(this._prepContext(a)),
  2512. !0
  2513. },
  2514. b.getMeasuredWidth = function() {
  2515. return this._getMeasuredWidth(this.text)
  2516. },
  2517. b.getMeasuredLineHeight = function() {
  2518. return 1.2 * this._getMeasuredWidth("M")
  2519. },
  2520. b.getMeasuredHeight = function() {
  2521. return this._drawText(null, {}).height
  2522. },
  2523. b.getBounds = function() {
  2524. var b = this.DisplayObject_getBounds();
  2525. if (b) return b;
  2526. if (null == this.text || "" === this.text) return null;
  2527. var c = this._drawText(null, {}),
  2528. d = this.maxWidth && this.maxWidth < c.width ? this.maxWidth: c.width,
  2529. e = d * a.H_OFFSETS[this.textAlign || "left"],
  2530. f = this.lineHeight || this.getMeasuredLineHeight(),
  2531. g = f * a.V_OFFSETS[this.textBaseline || "top"];
  2532. return this._rectangle.setValues(e, g, d, c.height)
  2533. },
  2534. b.getMetrics = function() {
  2535. var b = {
  2536. lines: []
  2537. };
  2538. return b.lineHeight = this.lineHeight || this.getMeasuredLineHeight(),
  2539. b.vOffset = b.lineHeight * a.V_OFFSETS[this.textBaseline || "top"],
  2540. this._drawText(null, b, b.lines)
  2541. },
  2542. b.clone = function() {
  2543. return this._cloneProps(new a(this.text, this.font, this.color))
  2544. },
  2545. b.toString = function() {
  2546. return "[Text (text=" + (this.text.length > 20 ? this.text.substr(0, 17) + "...": this.text) + ")]"
  2547. },
  2548. b._cloneProps = function(a) {
  2549. return this.DisplayObject__cloneProps(a),
  2550. a.textAlign = this.textAlign,
  2551. a.textBaseline = this.textBaseline,
  2552. a.maxWidth = this.maxWidth,
  2553. a.outline = this.outline,
  2554. a.lineHeight = this.lineHeight,
  2555. a.lineWidth = this.lineWidth,
  2556. a
  2557. },
  2558. b._prepContext = function(a) {
  2559. return a.font = this.font || "10px sans-serif",
  2560. a.textAlign = this.textAlign || "left",
  2561. a.textBaseline = this.textBaseline || "top",
  2562. a
  2563. },
  2564. b._drawText = function(b, c, d) {
  2565. var e = !!b;
  2566. e || (b = a._workingContext, b.save(), this._prepContext(b));
  2567. for (var f = this.lineHeight || this.getMeasuredLineHeight(), g = 0, h = 0, i = String(this.text).split(/(?:\r\n|\r|\n)/), j = 0, k = i.length; k > j; j++) {
  2568. var l = i[j],
  2569. m = null;
  2570. if (null != this.lineWidth && (m = b.measureText(l).width) > this.lineWidth) {
  2571. var n = l.split(/(\s)/);
  2572. l = n[0],
  2573. m = b.measureText(l).width;
  2574. for (var o = 1,
  2575. p = n.length; p > o; o += 2) {
  2576. var q = b.measureText(n[o] + n[o + 1]).width;
  2577. m + q > this.lineWidth ? (e && this._drawTextLine(b, l, h * f), d && d.push(l), m > g && (g = m), l = n[o + 1], m = b.measureText(l).width, h++) : (l += n[o] + n[o + 1], m += q)
  2578. }
  2579. }
  2580. e && this._drawTextLine(b, l, h * f),
  2581. d && d.push(l),
  2582. c && null == m && (m = b.measureText(l).width),
  2583. m > g && (g = m),
  2584. h++
  2585. }
  2586. return c && (c.width = g, c.height = h * f),
  2587. e || b.restore(),
  2588. c
  2589. },
  2590. b._drawTextLine = function(a, b, c) {
  2591. this.outline ? a.strokeText(b, 0, c, this.maxWidth || 65535) : a.fillText(b, 0, c, this.maxWidth || 65535)
  2592. },
  2593. b._getMeasuredWidth = function(b) {
  2594. var c = a._workingContext;
  2595. c.save();
  2596. var d = this._prepContext(c).measureText(b).width;
  2597. return c.restore(),
  2598. d
  2599. },
  2600. createjs.Text = createjs.promote(a, "DisplayObject")
  2601. } (),
  2602. this.createjs = this.createjs || {},
  2603. function() {
  2604. "use strict";
  2605. function a(a, b) {
  2606. this.Container_constructor(),
  2607. this.text = a || "",
  2608. this.spriteSheet = b,
  2609. this.lineHeight = 0,
  2610. this.letterSpacing = 0,
  2611. this.spaceWidth = 0,
  2612. this._oldProps = {
  2613. text: 0,
  2614. spriteSheet: 0,
  2615. lineHeight: 0,
  2616. letterSpacing: 0,
  2617. spaceWidth: 0
  2618. }
  2619. }
  2620. var b = createjs.extend(a, createjs.Container);
  2621. a.maxPoolSize = 100,
  2622. a._spritePool = [],
  2623. b.draw = function(a, b) {
  2624. this.DisplayObject_draw(a, b) || (this._updateText(), this.Container_draw(a, b))
  2625. },
  2626. b.getBounds = function() {
  2627. return this._updateText(),
  2628. this.Container_getBounds()
  2629. },
  2630. b.isVisible = function() {
  2631. var a = this.cacheCanvas || this.spriteSheet && this.spriteSheet.complete && this.text;
  2632. return !! (this.visible && this.alpha > 0 && 0 !== this.scaleX && 0 !== this.scaleY && a)
  2633. },
  2634. b.clone = function() {
  2635. return this._cloneProps(new a(this.text, this.spriteSheet))
  2636. },
  2637. b.addChild = b.addChildAt = b.removeChild = b.removeChildAt = b.removeAllChildren = function() {},
  2638. b._cloneProps = function(a) {
  2639. return this.Container__cloneProps(a),
  2640. a.lineHeight = this.lineHeight,
  2641. a.letterSpacing = this.letterSpacing,
  2642. a.spaceWidth = this.spaceWidth,
  2643. a
  2644. },
  2645. b._getFrameIndex = function(a, b) {
  2646. var c, d = b.getAnimation(a);
  2647. return d || (a != (c = a.toUpperCase()) || a != (c = a.toLowerCase()) || (c = null), c && (d = b.getAnimation(c))),
  2648. d && d.frames[0]
  2649. },
  2650. b._getFrame = function(a, b) {
  2651. var c = this._getFrameIndex(a, b);
  2652. return null == c ? c: b.getFrame(c)
  2653. },
  2654. b._getLineHeight = function(a) {
  2655. var b = this._getFrame("1", a) || this._getFrame("T", a) || this._getFrame("L", a) || a.getFrame(0);
  2656. return b ? b.rect.height: 1
  2657. },
  2658. b._getSpaceWidth = function(a) {
  2659. var b = this._getFrame("1", a) || this._getFrame("l", a) || this._getFrame("e", a) || this._getFrame("a", a) || a.getFrame(0);
  2660. return b ? b.rect.width: 1
  2661. },
  2662. b._updateText = function() {
  2663. var b, c = 0,
  2664. d = 0,
  2665. e = this._oldProps,
  2666. f = !1,
  2667. g = this.spaceWidth,
  2668. h = this.lineHeight,
  2669. i = this.spriteSheet,
  2670. j = a._spritePool,
  2671. k = this.children,
  2672. l = 0,
  2673. m = k.length;
  2674. for (var n in e) e[n] != this[n] && (e[n] = this[n], f = !0);
  2675. if (f) {
  2676. var o = !!this._getFrame(" ", i);
  2677. o || g || (g = this._getSpaceWidth(i)),
  2678. h || (h = this._getLineHeight(i));
  2679. for (var p = 0,
  2680. q = this.text.length; q > p; p++) {
  2681. var r = this.text.charAt(p);
  2682. if (" " != r || o) if ("\n" != r && "\r" != r) {
  2683. var s = this._getFrameIndex(r, i);
  2684. null != s && (m > l ? b = k[l] : (k.push(b = j.length ? j.pop() : new createjs.Sprite), b.parent = this, m++), b.spriteSheet = i, b.gotoAndStop(s), b.x = c, b.y = d, l++, c += b.getBounds().width + this.letterSpacing)
  2685. } else "\r" == r && "\n" == this.text.charAt(p + 1) && p++,
  2686. c = 0,
  2687. d += h;
  2688. else c += g
  2689. }
  2690. for (; m > l;) j.push(b = k.pop()),
  2691. b.parent = null,
  2692. m--;
  2693. j.length > a.maxPoolSize && (j.length = a.maxPoolSize)
  2694. }
  2695. },
  2696. createjs.BitmapText = createjs.promote(a, "Container")
  2697. } (),
  2698. this.createjs = this.createjs || {},
  2699. function() {
  2700. "use strict";
  2701. function a(b, c, d, e) {
  2702. this.Container_constructor(),
  2703. !a.inited && a.init(),
  2704. this.mode = b || a.INDEPENDENT,
  2705. this.startPosition = c || 0,
  2706. this.loop = d,
  2707. this.currentFrame = 0,
  2708. this.timeline = new createjs.Timeline(null, e, {
  2709. paused: !0,
  2710. position: c,
  2711. useTicks: !0
  2712. }),
  2713. this.paused = !1,
  2714. this.actionsEnabled = !0,
  2715. this.autoReset = !0,
  2716. this.frameBounds = this.frameBounds || null,
  2717. this.framerate = null,
  2718. this._synchOffset = 0,
  2719. this._prevPos = -1,
  2720. this._prevPosition = 0,
  2721. this._t = 0,
  2722. this._managed = {}
  2723. }
  2724. function b() {
  2725. throw "MovieClipPlugin cannot be instantiated."
  2726. }
  2727. var c = createjs.extend(a, createjs.Container);
  2728. a.INDEPENDENT = "independent",
  2729. a.SINGLE_FRAME = "single",
  2730. a.SYNCHED = "synched",
  2731. a.inited = !1,
  2732. a.init = function() {
  2733. a.inited || (b.install(), a.inited = !0)
  2734. },
  2735. c.getLabels = function() {
  2736. return this.timeline.getLabels()
  2737. },
  2738. c.getCurrentLabel = function() {
  2739. return this._updateTimeline(),
  2740. this.timeline.getCurrentLabel()
  2741. },
  2742. c.getDuration = function() {
  2743. return this.timeline.duration;
  2744. };
  2745. try {
  2746. Object.defineProperties(c, {
  2747. labels: {
  2748. get: c.getLabels
  2749. },
  2750. currentLabel: {
  2751. get: c.getCurrentLabel
  2752. },
  2753. totalFrames: {
  2754. get: c.getDuration
  2755. },
  2756. duration: {
  2757. get: c.getDuration
  2758. }
  2759. })
  2760. } catch(d) {}
  2761. c.initialize = a,
  2762. c.isVisible = function() {
  2763. return !! (this.visible && this.alpha > 0 && 0 != this.scaleX && 0 != this.scaleY)
  2764. },
  2765. c.draw = function(a, b) {
  2766. return this.DisplayObject_draw(a, b) ? !0 : (this._updateTimeline(), this.Container_draw(a, b), !0)
  2767. },
  2768. c.play = function() {
  2769. this.paused = !1
  2770. },
  2771. c.stop = function() {
  2772. this.paused = !0
  2773. },
  2774. c.gotoAndPlay = function(a) {
  2775. this.paused = !1,
  2776. this._goto(a)
  2777. },
  2778. c.gotoAndStop = function(a) {
  2779. this.paused = !0,
  2780. this._goto(a)
  2781. },
  2782. c.advance = function(b) {
  2783. var c = a.INDEPENDENT;
  2784. if (this.mode == c) {
  2785. for (var d = this,
  2786. e = d.framerate; (d = d.parent) && null == e;) d.mode == c && (e = d._framerate);
  2787. this._framerate = e;
  2788. var f = null != e && -1 != e && null != b ? b / (1e3 / e) + this._t: 1,
  2789. g = 0 | f;
  2790. for (this._t = f - g; ! this.paused && g--;) this._prevPosition = this._prevPos < 0 ? 0 : this._prevPosition + 1,
  2791. this._updateTimeline()
  2792. }
  2793. },
  2794. c.clone = function() {
  2795. throw "MovieClip cannot be cloned."
  2796. },
  2797. c.toString = function() {
  2798. return "[MovieClip (name=" + this.name + ")]"
  2799. },
  2800. c._tick = function(a) {
  2801. this.advance(a && a.delta),
  2802. this.Container__tick(a)
  2803. },
  2804. c._goto = function(a) {
  2805. var b = this.timeline.resolve(a);
  2806. null != b && ( - 1 == this._prevPos && (this._prevPos = NaN), this._prevPosition = b, this._t = 0, this._updateTimeline())
  2807. },
  2808. c._reset = function() {
  2809. this._prevPos = -1,
  2810. this._t = this.currentFrame = 0,
  2811. this.paused = !1
  2812. },
  2813. c._updateTimeline = function() {
  2814. var b = this.timeline,
  2815. c = this.mode != a.INDEPENDENT;
  2816. b.loop = null == this.loop ? !0 : this.loop;
  2817. var d = c ? this.startPosition + (this.mode == a.SINGLE_FRAME ? 0 : this._synchOffset) : this._prevPos < 0 ? 0 : this._prevPosition,
  2818. e = c || !this.actionsEnabled ? createjs.Tween.NONE: null;
  2819. if (this.currentFrame = b._calcPosition(d), b.setPosition(d, e), this._prevPosition = b._prevPosition, this._prevPos != b._prevPos) {
  2820. this.currentFrame = this._prevPos = b._prevPos;
  2821. for (var f in this._managed) this._managed[f] = 1;
  2822. for (var g = b._tweens,
  2823. h = 0,
  2824. i = g.length; i > h; h++) {
  2825. var j = g[h],
  2826. k = j._target;
  2827. if (k != this && !j.passive) {
  2828. var l = j._stepPosition;
  2829. k instanceof createjs.DisplayObject ? this._addManagedChild(k, l) : this._setState(k.state, l)
  2830. }
  2831. }
  2832. var m = this.children;
  2833. for (h = m.length - 1; h >= 0; h--) {
  2834. var n = m[h].id;
  2835. 1 == this._managed[n] && (this.removeChildAt(h), delete this._managed[n])
  2836. }
  2837. }
  2838. },
  2839. c._setState = function(a, b) {
  2840. if (a) for (var c = a.length - 1; c >= 0; c--) {
  2841. var d = a[c],
  2842. e = d.t,
  2843. f = d.p;
  2844. for (var g in f) e[g] = f[g];
  2845. this._addManagedChild(e, b)
  2846. }
  2847. },
  2848. c._addManagedChild = function(b, c) {
  2849. b._off || (this.addChildAt(b, 0), b instanceof a && (b._synchOffset = c, b.mode == a.INDEPENDENT && b.autoReset && !this._managed[b.id] && b._reset()), this._managed[b.id] = 2)
  2850. },
  2851. c._getBounds = function(a, b) {
  2852. var c = this.DisplayObject_getBounds();
  2853. return c || (this._updateTimeline(), this.frameBounds && (c = this._rectangle.copy(this.frameBounds[this.currentFrame]))),
  2854. c ? this._transformBounds(c, a, b) : this.Container__getBounds(a, b)
  2855. },
  2856. createjs.MovieClip = createjs.promote(a, "Container"),
  2857. b.priority = 100,
  2858. b.install = function() {
  2859. createjs.Tween.installPlugin(b, ["startPosition"])
  2860. },
  2861. b.init = function(a, b, c) {
  2862. return c
  2863. },
  2864. b.step = function() {},
  2865. b.tween = function(b, c, d, e, f, g, h, i) {
  2866. return b.target instanceof a ? 1 == g ? f[c] : e[c] : d
  2867. }
  2868. } (),
  2869. this.createjs = this.createjs || {},
  2870. function() {
  2871. "use strict";
  2872. function a() {
  2873. throw "SpriteSheetUtils cannot be instantiated"
  2874. }
  2875. var b = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  2876. b.getContext && (a._workingCanvas = b, a._workingContext = b.getContext("2d"), b.width = b.height = 1),
  2877. a.addFlippedFrames = function(b, c, d, e) {
  2878. if (c || d || e) {
  2879. var f = 0;
  2880. c && a._flip(b, ++f, !0, !1),
  2881. d && a._flip(b, ++f, !1, !0),
  2882. e && a._flip(b, ++f, !0, !0)
  2883. }
  2884. },
  2885. a.extractFrame = function(b, c) {
  2886. isNaN(c) && (c = b.getAnimation(c).frames[0]);
  2887. var d = b.getFrame(c);
  2888. if (!d) return null;
  2889. var e = d.rect,
  2890. f = a._workingCanvas;
  2891. f.width = e.width,
  2892. f.height = e.height,
  2893. a._workingContext.drawImage(d.image, e.x, e.y, e.width, e.height, 0, 0, e.width, e.height);
  2894. var g = document.createElement("img");
  2895. return g.src = f.toDataURL("image/png"),
  2896. g
  2897. },
  2898. a.mergeAlpha = function(a, b, c) {
  2899. c || (c = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas")),
  2900. c.width = Math.max(b.width, a.width),
  2901. c.height = Math.max(b.height, a.height);
  2902. var d = c.getContext("2d");
  2903. return d.save(),
  2904. d.drawImage(a, 0, 0),
  2905. d.globalCompositeOperation = "destination-in",
  2906. d.drawImage(b, 0, 0),
  2907. d.restore(),
  2908. c
  2909. },
  2910. a._flip = function(b, c, d, e) {
  2911. for (var f = b._images,
  2912. g = a._workingCanvas,
  2913. h = a._workingContext,
  2914. i = f.length / c,
  2915. j = 0; i > j; j++) {
  2916. var k = f[j];
  2917. k.__tmp = j,
  2918. h.setTransform(1, 0, 0, 1, 0, 0),
  2919. h.clearRect(0, 0, g.width + 1, g.height + 1),
  2920. g.width = k.width,
  2921. g.height = k.height,
  2922. h.setTransform(d ? -1 : 1, 0, 0, e ? -1 : 1, d ? k.width: 0, e ? k.height: 0),
  2923. h.drawImage(k, 0, 0);
  2924. var l = document.createElement("img");
  2925. l.src = g.toDataURL("image/png"),
  2926. l.width = k.width,
  2927. l.height = k.height,
  2928. f.push(l)
  2929. }
  2930. var m = b._frames,
  2931. n = m.length / c;
  2932. for (j = 0; n > j; j++) {
  2933. k = m[j];
  2934. var o = k.rect.clone();
  2935. l = f[k.image.__tmp + i * c];
  2936. var p = {
  2937. image: l,
  2938. rect: o,
  2939. regX: k.regX,
  2940. regY: k.regY
  2941. };
  2942. d && (o.x = l.width - o.x - o.width, p.regX = o.width - k.regX),
  2943. e && (o.y = l.height - o.y - o.height, p.regY = o.height - k.regY),
  2944. m.push(p)
  2945. }
  2946. var q = "_" + (d ? "h": "") + (e ? "v": ""),
  2947. r = b._animations,
  2948. s = b._data,
  2949. t = r.length / c;
  2950. for (j = 0; t > j; j++) {
  2951. var u = r[j];
  2952. k = s[u];
  2953. var v = {
  2954. name: u + q,
  2955. speed: k.speed,
  2956. next: k.next,
  2957. frames: []
  2958. };
  2959. k.next && (v.next += q),
  2960. m = k.frames;
  2961. for (var w = 0,
  2962. x = m.length; x > w; w++) v.frames.push(m[w] + n * c);
  2963. s[v.name] = v,
  2964. r.push(v.name)
  2965. }
  2966. },
  2967. createjs.SpriteSheetUtils = a
  2968. } (),
  2969. this.createjs = this.createjs || {},
  2970. function() {
  2971. "use strict";
  2972. function a(a) {
  2973. this.EventDispatcher_constructor(),
  2974. this.maxWidth = 2048,
  2975. this.maxHeight = 2048,
  2976. this.spriteSheet = null,
  2977. this.scale = 1,
  2978. this.padding = 1,
  2979. this.timeSlice = .3,
  2980. this.progress = -1,
  2981. this.framerate = a || 0,
  2982. this._frames = [],
  2983. this._animations = {},
  2984. this._data = null,
  2985. this._nextFrameIndex = 0,
  2986. this._index = 0,
  2987. this._timerID = null,
  2988. this._scale = 1
  2989. }
  2990. var b = createjs.extend(a, createjs.EventDispatcher);
  2991. a.ERR_DIMENSIONS = "frame dimensions exceed max spritesheet dimensions",
  2992. a.ERR_RUNNING = "a build is already running",
  2993. b.addFrame = function(b, c, d, e, f) {
  2994. if (this._data) throw a.ERR_RUNNING;
  2995. var g = c || b.bounds || b.nominalBounds;
  2996. return ! g && b.getBounds && (g = b.getBounds()),
  2997. g ? (d = d || 1, this._frames.push({
  2998. source: b,
  2999. sourceRect: g,
  3000. scale: d,
  3001. funct: e,
  3002. data: f,
  3003. index: this._frames.length,
  3004. height: g.height * d
  3005. }) - 1) : null
  3006. },
  3007. b.addAnimation = function(b, c, d, e) {
  3008. if (this._data) throw a.ERR_RUNNING;
  3009. this._animations[b] = {
  3010. frames: c,
  3011. next: d,
  3012. speed: e
  3013. }
  3014. },
  3015. b.addMovieClip = function(b, c, d, e, f, g) {
  3016. if (this._data) throw a.ERR_RUNNING;
  3017. var h = b.frameBounds,
  3018. i = c || b.bounds || b.nominalBounds;
  3019. if (!i && b.getBounds && (i = b.getBounds()), i || h) {
  3020. var j, k, l = this._frames.length,
  3021. m = b.timeline.duration;
  3022. for (j = 0; m > j; j++) {
  3023. var n = h && h[j] ? h[j] : i;
  3024. this.addFrame(b, n, d, this._setupMovieClipFrame, {
  3025. i: j,
  3026. f: e,
  3027. d: f
  3028. })
  3029. }
  3030. var o = b.timeline._labels,
  3031. p = [];
  3032. for (var q in o) p.push({
  3033. index: o[q],
  3034. label: q
  3035. });
  3036. if (p.length) for (p.sort(function(a, b) {
  3037. return a.index - b.index
  3038. }), j = 0, k = p.length; k > j; j++) {
  3039. for (var r = p[j].label, s = l + p[j].index, t = l + (j == k - 1 ? m: p[j + 1].index), u = [], v = s; t > v; v++) u.push(v); (!g || (r = g(r, b, s, t))) && this.addAnimation(r, u, !0)
  3040. }
  3041. }
  3042. },
  3043. b.build = function() {
  3044. if (this._data) throw a.ERR_RUNNING;
  3045. for (this._startBuild(); this._drawNext(););
  3046. return this._endBuild(),
  3047. this.spriteSheet
  3048. },
  3049. b.buildAsync = function(b) {
  3050. if (this._data) throw a.ERR_RUNNING;
  3051. this.timeSlice = b,
  3052. this._startBuild();
  3053. var c = this;
  3054. this._timerID = setTimeout(function() {
  3055. c._run()
  3056. },
  3057. 50 - 50 * Math.max(.01, Math.min(.99, this.timeSlice || .3)))
  3058. },
  3059. b.stopAsync = function() {
  3060. clearTimeout(this._timerID),
  3061. this._data = null
  3062. },
  3063. b.clone = function() {
  3064. throw "SpriteSheetBuilder cannot be cloned."
  3065. },
  3066. b.toString = function() {
  3067. return "[SpriteSheetBuilder]"
  3068. },
  3069. b._startBuild = function() {
  3070. var b = this.padding || 0;
  3071. this.progress = 0,
  3072. this.spriteSheet = null,
  3073. this._index = 0,
  3074. this._scale = this.scale;
  3075. var c = [];
  3076. this._data = {
  3077. images: [],
  3078. frames: c,
  3079. framerate: this.framerate,
  3080. animations: this._animations
  3081. };
  3082. var d = this._frames.slice();
  3083. if (d.sort(function(a, b) {
  3084. return a.height <= b.height ? -1 : 1
  3085. }), d[d.length - 1].height + 2 * b > this.maxHeight) throw a.ERR_DIMENSIONS;
  3086. for (var e = 0,
  3087. f = 0,
  3088. g = 0; d.length;) {
  3089. var h = this._fillRow(d, e, g, c, b);
  3090. if (h.w > f && (f = h.w), e += h.h, !h.h || !d.length) {
  3091. var i = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas");
  3092. i.width = this._getSize(f, this.maxWidth),
  3093. i.height = this._getSize(e, this.maxHeight),
  3094. this._data.images[g] = i,
  3095. h.h || (f = e = 0, g++)
  3096. }
  3097. }
  3098. },
  3099. b._setupMovieClipFrame = function(a, b) {
  3100. var c = a.actionsEnabled;
  3101. a.actionsEnabled = !1,
  3102. a.gotoAndStop(b.i),
  3103. a.actionsEnabled = c,
  3104. b.f && b.f(a, b.d, b.i)
  3105. },
  3106. b._getSize = function(a, b) {
  3107. for (var c = 4; Math.pow(2, ++c) < a;);
  3108. return Math.min(b, Math.pow(2, c))
  3109. },
  3110. b._fillRow = function(b, c, d, e, f) {
  3111. var g = this.maxWidth,
  3112. h = this.maxHeight;
  3113. c += f;
  3114. for (var i = h - c,
  3115. j = f,
  3116. k = 0,
  3117. l = b.length - 1; l >= 0; l--) {
  3118. var m = b[l],
  3119. n = this._scale * m.scale,
  3120. o = m.sourceRect,
  3121. p = m.source,
  3122. q = Math.floor(n * o.x - f),
  3123. r = Math.floor(n * o.y - f),
  3124. s = Math.ceil(n * o.height + 2 * f),
  3125. t = Math.ceil(n * o.width + 2 * f);
  3126. if (t > g) throw a.ERR_DIMENSIONS;
  3127. s > i || j + t > g || (m.img = d, m.rect = new createjs.Rectangle(j, c, t, s), k = k || s, b.splice(l, 1), e[m.index] = [j, c, t, s, d, Math.round( - q + n * p.regX - f), Math.round( - r + n * p.regY - f)], j += t)
  3128. }
  3129. return {
  3130. w: j,
  3131. h: k
  3132. }
  3133. },
  3134. b._endBuild = function() {
  3135. this.spriteSheet = new createjs.SpriteSheet(this._data),
  3136. this._data = null,
  3137. this.progress = 1,
  3138. this.dispatchEvent("complete")
  3139. },
  3140. b._run = function() {
  3141. for (var a = 50 * Math.max(.01, Math.min(.99, this.timeSlice || .3)), b = (new Date).getTime() + a, c = !1; b > (new Date).getTime();) if (!this._drawNext()) {
  3142. c = !0;
  3143. break
  3144. }
  3145. if (c) this._endBuild();
  3146. else {
  3147. var d = this;
  3148. this._timerID = setTimeout(function() {
  3149. d._run()
  3150. },
  3151. 50 - a)
  3152. }
  3153. var e = this.progress = this._index / this._frames.length;
  3154. if (this.hasEventListener("progress")) {
  3155. var f = new createjs.Event("progress");
  3156. f.progress = e,
  3157. this.dispatchEvent(f)
  3158. }
  3159. },
  3160. b._drawNext = function() {
  3161. var a = this._frames[this._index],
  3162. b = a.scale * this._scale,
  3163. c = a.rect,
  3164. d = a.sourceRect,
  3165. e = this._data.images[a.img],
  3166. f = e.getContext("2d");
  3167. return a.funct && a.funct(a.source, a.data),
  3168. f.save(),
  3169. f.beginPath(),
  3170. f.rect(c.x, c.y, c.width, c.height),
  3171. f.clip(),
  3172. f.translate(Math.ceil(c.x - d.x * b), Math.ceil(c.y - d.y * b)),
  3173. f.scale(b, b),
  3174. a.source.draw(f),
  3175. f.restore(),
  3176. ++this._index < this._frames.length
  3177. },
  3178. createjs.SpriteSheetBuilder = createjs.promote(a, "EventDispatcher")
  3179. } (),
  3180. this.createjs = this.createjs || {},
  3181. function() {
  3182. "use strict";
  3183. function a(a) {
  3184. this.DisplayObject_constructor(),
  3185. "string" == typeof a && (a = document.getElementById(a)),
  3186. this.mouseEnabled = !1;
  3187. var b = a.style;
  3188. b.position = "absolute",
  3189. b.transformOrigin = b.WebkitTransformOrigin = b.msTransformOrigin = b.MozTransformOrigin = b.OTransformOrigin = "0% 0%",
  3190. this.htmlElement = a,
  3191. this._oldProps = null
  3192. }
  3193. var b = createjs.extend(a, createjs.DisplayObject);
  3194. b.isVisible = function() {
  3195. return null != this.htmlElement
  3196. },
  3197. b.draw = function(a, b) {
  3198. return ! 0
  3199. },
  3200. b.cache = function() {},
  3201. b.uncache = function() {},
  3202. b.updateCache = function() {},
  3203. b.hitTest = function() {},
  3204. b.localToGlobal = function() {},
  3205. b.globalToLocal = function() {},
  3206. b.localToLocal = function() {},
  3207. b.clone = function() {
  3208. throw "DOMElement cannot be cloned."
  3209. },
  3210. b.toString = function() {
  3211. return "[DOMElement (name=" + this.name + ")]"
  3212. },
  3213. b._tick = function(a) {
  3214. var b = this.getStage();
  3215. b && b.on("drawend", this._handleDrawEnd, this, !0),
  3216. this.DisplayObject__tick(a)
  3217. },
  3218. b._handleDrawEnd = function(a) {
  3219. var b = this.htmlElement;
  3220. if (b) {
  3221. var c = b.style,
  3222. d = this.getConcatenatedDisplayProps(this._props),
  3223. e = d.matrix,
  3224. f = d.visible ? "visible": "hidden";
  3225. if (f != c.visibility && (c.visibility = f), d.visible) {
  3226. var g = this._oldProps,
  3227. h = g && g.matrix,
  3228. i = 1e4;
  3229. if (!h || !h.equals(e)) {
  3230. var j = "matrix(" + (e.a * i | 0) / i + "," + (e.b * i | 0) / i + "," + (e.c * i | 0) / i + "," + (e.d * i | 0) / i + "," + (e.tx + .5 | 0);
  3231. c.transform = c.WebkitTransform = c.OTransform = c.msTransform = j + "," + (e.ty + .5 | 0) + ")",
  3232. c.MozTransform = j + "px," + (e.ty + .5 | 0) + "px)",
  3233. g || (g = this._oldProps = new createjs.DisplayProps(!0, NaN)),
  3234. g.matrix.copy(e)
  3235. }
  3236. g.alpha != d.alpha && (c.opacity = "" + (d.alpha * i | 0) / i, g.alpha = d.alpha)
  3237. }
  3238. }
  3239. },
  3240. createjs.DOMElement = createjs.promote(a, "DisplayObject")
  3241. } (),
  3242. this.createjs = this.createjs || {},
  3243. function() {
  3244. "use strict";
  3245. function a() {}
  3246. var b = a.prototype;
  3247. b.getBounds = function(a) {
  3248. return a
  3249. },
  3250. b.applyFilter = function(a, b, c, d, e, f, g, h) {
  3251. f = f || a,
  3252. null == g && (g = b),
  3253. null == h && (h = c);
  3254. try {
  3255. var i = a.getImageData(b, c, d, e)
  3256. } catch(j) {
  3257. return ! 1
  3258. }
  3259. return this._applyFilter(i) ? (f.putImageData(i, g, h), !0) : !1
  3260. },
  3261. b.toString = function() {
  3262. return "[Filter]"
  3263. },
  3264. b.clone = function() {
  3265. return new a
  3266. },
  3267. b._applyFilter = function(a) {
  3268. return ! 0
  3269. },
  3270. createjs.Filter = a
  3271. } (),
  3272. this.createjs = this.createjs || {},
  3273. function() {
  3274. "use strict";
  3275. function a(a, b, c) { (isNaN(a) || 0 > a) && (a = 0),
  3276. (isNaN(b) || 0 > b) && (b = 0),
  3277. (isNaN(c) || 1 > c) && (c = 1),
  3278. this.blurX = 0 | a,
  3279. this.blurY = 0 | b,
  3280. this.quality = 0 | c
  3281. }
  3282. var b = createjs.extend(a, createjs.Filter);
  3283. a.MUL_TABLE = [1, 171, 205, 293, 57, 373, 79, 137, 241, 27, 391, 357, 41, 19, 283, 265, 497, 469, 443, 421, 25, 191, 365, 349, 335, 161, 155, 149, 9, 278, 269, 261, 505, 245, 475, 231, 449, 437, 213, 415, 405, 395, 193, 377, 369, 361, 353, 345, 169, 331, 325, 319, 313, 307, 301, 37, 145, 285, 281, 69, 271, 267, 263, 259, 509, 501, 493, 243, 479, 118, 465, 459, 113, 446, 55, 435, 429, 423, 209, 413, 51, 403, 199, 393, 97, 3, 379, 375, 371, 367, 363, 359, 355, 351, 347, 43, 85, 337, 333, 165, 327, 323, 5, 317, 157, 311, 77, 305, 303, 75, 297, 294, 73, 289, 287, 71, 141, 279, 277, 275, 68, 135, 67, 133, 33, 262, 260, 129, 511, 507, 503, 499, 495, 491, 61, 121, 481, 477, 237, 235, 467, 232, 115, 457, 227, 451, 7, 445, 221, 439, 218, 433, 215, 427, 425, 211, 419, 417, 207, 411, 409, 203, 202, 401, 399, 396, 197, 49, 389, 387, 385, 383, 95, 189, 47, 187, 93, 185, 23, 183, 91, 181, 45, 179, 89, 177, 11, 175, 87, 173, 345, 343, 341, 339, 337, 21, 167, 83, 331, 329, 327, 163, 81, 323, 321, 319, 159, 79, 315, 313, 39, 155, 309, 307, 153, 305, 303, 151, 75, 299, 149, 37, 295, 147, 73, 291, 145, 289, 287, 143, 285, 71, 141, 281, 35, 279, 139, 69, 275, 137, 273, 17, 271, 135, 269, 267, 133, 265, 33, 263, 131, 261, 130, 259, 129, 257, 1],
  3284. a.SHG_TABLE = [0, 9, 10, 11, 9, 12, 10, 11, 12, 9, 13, 13, 10, 9, 13, 13, 14, 14, 14, 14, 10, 13, 14, 14, 14, 13, 13, 13, 9, 14, 14, 14, 15, 14, 15, 14, 15, 15, 14, 15, 15, 15, 14, 15, 15, 15, 15, 15, 14, 15, 15, 15, 15, 15, 15, 12, 14, 15, 15, 13, 15, 15, 15, 15, 16, 16, 16, 15, 16, 14, 16, 16, 14, 16, 13, 16, 16, 16, 15, 16, 13, 16, 15, 16, 14, 9, 16, 16, 16, 16, 16, 16, 16, 16, 16, 13, 14, 16, 16, 15, 16, 16, 10, 16, 15, 16, 14, 16, 16, 14, 16, 16, 14, 16, 16, 14, 15, 16, 16, 16, 14, 15, 14, 15, 13, 16, 16, 15, 17, 17, 17, 17, 17, 17, 14, 15, 17, 17, 16, 16, 17, 16, 15, 17, 16, 17, 11, 17, 16, 17, 16, 17, 16, 17, 17, 16, 17, 17, 16, 17, 17, 16, 16, 17, 17, 17, 16, 14, 17, 17, 17, 17, 15, 16, 14, 16, 15, 16, 13, 16, 15, 16, 14, 16, 15, 16, 12, 16, 15, 16, 17, 17, 17, 17, 17, 13, 16, 15, 17, 17, 17, 16, 15, 17, 17, 17, 16, 15, 17, 17, 14, 16, 17, 17, 16, 17, 17, 16, 15, 17, 16, 14, 17, 16, 15, 17, 16, 17, 17, 16, 17, 15, 16, 17, 14, 17, 16, 15, 17, 16, 17, 13, 17, 16, 17, 17, 16, 17, 14, 17, 16, 17, 16, 17, 16, 17, 9],
  3285. b.getBounds = function(a) {
  3286. var b = 0 | this.blurX,
  3287. c = 0 | this.blurY;
  3288. if (0 >= b && 0 >= c) return a;
  3289. var d = Math.pow(this.quality, .2);
  3290. return (a || new createjs.Rectangle).pad(b * d + 1, c * d + 1, b * d + 1, c * d + 1)
  3291. },
  3292. b.clone = function() {
  3293. return new a(this.blurX, this.blurY, this.quality)
  3294. },
  3295. b.toString = function() {
  3296. return "[BlurFilter]"
  3297. },
  3298. b._applyFilter = function(b) {
  3299. var c = this.blurX >> 1;
  3300. if (isNaN(c) || 0 > c) return ! 1;
  3301. var d = this.blurY >> 1;
  3302. if (isNaN(d) || 0 > d) return ! 1;
  3303. if (0 == c && 0 == d) return ! 1;
  3304. var e = this.quality; (isNaN(e) || 1 > e) && (e = 1),
  3305. e |= 0,
  3306. e > 3 && (e = 3),
  3307. 1 > e && (e = 1);
  3308. var f = b.data,
  3309. g = 0,
  3310. h = 0,
  3311. i = 0,
  3312. j = 0,
  3313. k = 0,
  3314. l = 0,
  3315. m = 0,
  3316. n = 0,
  3317. o = 0,
  3318. p = 0,
  3319. q = 0,
  3320. r = 0,
  3321. s = 0,
  3322. t = 0,
  3323. u = 0,
  3324. v = c + c + 1 | 0,
  3325. w = d + d + 1 | 0,
  3326. x = 0 | b.width,
  3327. y = 0 | b.height,
  3328. z = x - 1 | 0,
  3329. A = y - 1 | 0,
  3330. B = c + 1 | 0,
  3331. C = d + 1 | 0,
  3332. D = {
  3333. r: 0,
  3334. b: 0,
  3335. g: 0,
  3336. a: 0
  3337. },
  3338. E = D;
  3339. for (i = 1; v > i; i++) E = E.n = {
  3340. r: 0,
  3341. b: 0,
  3342. g: 0,
  3343. a: 0
  3344. };
  3345. E.n = D;
  3346. var F = {
  3347. r: 0,
  3348. b: 0,
  3349. g: 0,
  3350. a: 0
  3351. },
  3352. G = F;
  3353. for (i = 1; w > i; i++) G = G.n = {
  3354. r: 0,
  3355. b: 0,
  3356. g: 0,
  3357. a: 0
  3358. };
  3359. G.n = F;
  3360. for (var H = null,
  3361. I = 0 | a.MUL_TABLE[c], J = 0 | a.SHG_TABLE[c], K = 0 | a.MUL_TABLE[d], L = 0 | a.SHG_TABLE[d]; e-->0;) {
  3362. m = l = 0;
  3363. var M = I,
  3364. N = J;
  3365. for (h = y; --h > -1;) {
  3366. for (n = B * (r = f[0 | l]), o = B * (s = f[l + 1 | 0]), p = B * (t = f[l + 2 | 0]), q = B * (u = f[l + 3 | 0]), E = D, i = B; --i > -1;) E.r = r,
  3367. E.g = s,
  3368. E.b = t,
  3369. E.a = u,
  3370. E = E.n;
  3371. for (i = 1; B > i; i++) j = l + ((i > z ? z: i) << 2) | 0,
  3372. n += E.r = f[j],
  3373. o += E.g = f[j + 1],
  3374. p += E.b = f[j + 2],
  3375. q += E.a = f[j + 3],
  3376. E = E.n;
  3377. for (H = D, g = 0; x > g; g++) f[l++] = n * M >>> N,
  3378. f[l++] = o * M >>> N,
  3379. f[l++] = p * M >>> N,
  3380. f[l++] = q * M >>> N,
  3381. j = m + ((j = g + c + 1) < z ? j: z) << 2,
  3382. n -= H.r - (H.r = f[j]),
  3383. o -= H.g - (H.g = f[j + 1]),
  3384. p -= H.b - (H.b = f[j + 2]),
  3385. q -= H.a - (H.a = f[j + 3]),
  3386. H = H.n;
  3387. m += x
  3388. }
  3389. for (M = K, N = L, g = 0; x > g; g++) {
  3390. for (l = g << 2 | 0, n = C * (r = f[l]) | 0, o = C * (s = f[l + 1 | 0]) | 0, p = C * (t = f[l + 2 | 0]) | 0, q = C * (u = f[l + 3 | 0]) | 0, G = F, i = 0; C > i; i++) G.r = r,
  3391. G.g = s,
  3392. G.b = t,
  3393. G.a = u,
  3394. G = G.n;
  3395. for (k = x, i = 1; d >= i; i++) l = k + g << 2,
  3396. n += G.r = f[l],
  3397. o += G.g = f[l + 1],
  3398. p += G.b = f[l + 2],
  3399. q += G.a = f[l + 3],
  3400. G = G.n,
  3401. A > i && (k += x);
  3402. if (l = g, H = F, e > 0) for (h = 0; y > h; h++) j = l << 2,
  3403. f[j + 3] = u = q * M >>> N,
  3404. u > 0 ? (f[j] = n * M >>> N, f[j + 1] = o * M >>> N, f[j + 2] = p * M >>> N) : f[j] = f[j + 1] = f[j + 2] = 0,
  3405. j = g + ((j = h + C) < A ? j: A) * x << 2,
  3406. n -= H.r - (H.r = f[j]),
  3407. o -= H.g - (H.g = f[j + 1]),
  3408. p -= H.b - (H.b = f[j + 2]),
  3409. q -= H.a - (H.a = f[j + 3]),
  3410. H = H.n,
  3411. l += x;
  3412. else for (h = 0; y > h; h++) j = l << 2,
  3413. f[j + 3] = u = q * M >>> N,
  3414. u > 0 ? (u = 255 / u, f[j] = (n * M >>> N) * u, f[j + 1] = (o * M >>> N) * u, f[j + 2] = (p * M >>> N) * u) : f[j] = f[j + 1] = f[j + 2] = 0,
  3415. j = g + ((j = h + C) < A ? j: A) * x << 2,
  3416. n -= H.r - (H.r = f[j]),
  3417. o -= H.g - (H.g = f[j + 1]),
  3418. p -= H.b - (H.b = f[j + 2]),
  3419. q -= H.a - (H.a = f[j + 3]),
  3420. H = H.n,
  3421. l += x
  3422. }
  3423. }
  3424. return ! 0
  3425. },
  3426. createjs.BlurFilter = createjs.promote(a, "Filter")
  3427. } (),
  3428. this.createjs = this.createjs || {},
  3429. function() {
  3430. "use strict";
  3431. function a(a) {
  3432. this.alphaMap = a,
  3433. this._alphaMap = null,
  3434. this._mapData = null
  3435. }
  3436. var b = createjs.extend(a, createjs.Filter);
  3437. b.clone = function() {
  3438. var b = new a(this.alphaMap);
  3439. return b._alphaMap = this._alphaMap,
  3440. b._mapData = this._mapData,
  3441. b
  3442. },
  3443. b.toString = function() {
  3444. return "[AlphaMapFilter]"
  3445. },
  3446. b._applyFilter = function(a) {
  3447. if (!this.alphaMap) return ! 0;
  3448. if (!this._prepAlphaMap()) return ! 1;
  3449. for (var b = a.data,
  3450. c = this._mapData,
  3451. d = 0,
  3452. e = b.length; e > d; d += 4) b[d + 3] = c[d] || 0;
  3453. return ! 0
  3454. },
  3455. b._prepAlphaMap = function() {
  3456. if (!this.alphaMap) return ! 1;
  3457. if (this.alphaMap == this._alphaMap && this._mapData) return ! 0;
  3458. this._mapData = null;
  3459. var a, b = this._alphaMap = this.alphaMap,
  3460. c = b;
  3461. b instanceof HTMLCanvasElement ? a = c.getContext("2d") : (c = createjs.createCanvas ? createjs.createCanvas() : document.createElement("canvas"), c.width = b.width, c.height = b.height, a = c.getContext("2d"), a.drawImage(b, 0, 0));
  3462. try {
  3463. var d = a.getImageData(0, 0, b.width, b.height)
  3464. } catch(e) {
  3465. return ! 1
  3466. }
  3467. return this._mapData = d.data,
  3468. !0
  3469. },
  3470. createjs.AlphaMapFilter = createjs.promote(a, "Filter")
  3471. } (),
  3472. this.createjs = this.createjs || {},
  3473. function() {
  3474. "use strict";
  3475. function a(a) {
  3476. this.mask = a
  3477. }
  3478. var b = createjs.extend(a, createjs.Filter);
  3479. b.applyFilter = function(a, b, c, d, e, f, g, h) {
  3480. return this.mask ? (f = f || a, null == g && (g = b), null == h && (h = c), f.save(), a != f ? !1 : (f.globalCompositeOperation = "destination-in", f.drawImage(this.mask, g, h), f.restore(), !0)) : !0
  3481. },
  3482. b.clone = function() {
  3483. return new a(this.mask)
  3484. },
  3485. b.toString = function() {
  3486. return "[AlphaMaskFilter]"
  3487. },
  3488. createjs.AlphaMaskFilter = createjs.promote(a, "Filter")
  3489. } (),
  3490. this.createjs = this.createjs || {},
  3491. function() {
  3492. "use strict";
  3493. function a(a, b, c, d, e, f, g, h) {
  3494. this.redMultiplier = null != a ? a: 1,
  3495. this.greenMultiplier = null != b ? b: 1,
  3496. this.blueMultiplier = null != c ? c: 1,
  3497. this.alphaMultiplier = null != d ? d: 1,
  3498. this.redOffset = e || 0,
  3499. this.greenOffset = f || 0,
  3500. this.blueOffset = g || 0,
  3501. this.alphaOffset = h || 0
  3502. }
  3503. var b = createjs.extend(a, createjs.Filter);
  3504. b.toString = function() {
  3505. return "[ColorFilter]"
  3506. },
  3507. b.clone = function() {
  3508. return new a(this.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier, this.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset)
  3509. },
  3510. b._applyFilter = function(a) {
  3511. for (var b = a.data,
  3512. c = b.length,
  3513. d = 0; c > d; d += 4) b[d] = b[d] * this.redMultiplier + this.redOffset,
  3514. b[d + 1] = b[d + 1] * this.greenMultiplier + this.greenOffset,
  3515. b[d + 2] = b[d + 2] * this.blueMultiplier + this.blueOffset,
  3516. b[d + 3] = b[d + 3] * this.alphaMultiplier + this.alphaOffset;
  3517. return ! 0
  3518. },
  3519. createjs.ColorFilter = createjs.promote(a, "Filter")
  3520. } (),
  3521. this.createjs = this.createjs || {},
  3522. function() {
  3523. "use strict";
  3524. function a(a, b, c, d) {
  3525. this.setColor(a, b, c, d)
  3526. }
  3527. var b = a.prototype;
  3528. a.DELTA_INDEX = [0, .01, .02, .04, .05, .06, .07, .08, .1, .11, .12, .14, .15, .16, .17, .18, .2, .21, .22, .24, .25, .27, .28, .3, .32, .34, .36, .38, .4, .42, .44, .46, .48, .5, .53, .56, .59, .62, .65, .68, .71, .74, .77, .8, .83, .86, .89, .92, .95, .98, 1, 1.06, 1.12, 1.18, 1.24, 1.3, 1.36, 1.42, 1.48, 1.54, 1.6, 1.66, 1.72, 1.78, 1.84, 1.9, 1.96, 2, 2.12, 2.25, 2.37, 2.5, 2.62, 2.75, 2.87, 3, 3.2, 3.4, 3.6, 3.8, 4, 4.3, 4.7, 4.9, 5, 5.5, 6, 6.5, 6.8, 7, 7.3, 7.5, 7.8, 8, 8.4, 8.7, 9, 9.4, 9.6, 9.8, 10],
  3529. a.IDENTITY_MATRIX = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1],
  3530. a.LENGTH = a.IDENTITY_MATRIX.length,
  3531. b.setColor = function(a, b, c, d) {
  3532. return this.reset().adjustColor(a, b, c, d)
  3533. },
  3534. b.reset = function() {
  3535. return this.copy(a.IDENTITY_MATRIX)
  3536. },
  3537. b.adjustColor = function(a, b, c, d) {
  3538. return this.adjustHue(d),
  3539. this.adjustContrast(b),
  3540. this.adjustBrightness(a),
  3541. this.adjustSaturation(c)
  3542. },
  3543. b.adjustBrightness = function(a) {
  3544. return 0 == a || isNaN(a) ? this: (a = this._cleanValue(a, 255), this._multiplyMatrix([1, 0, 0, 0, a, 0, 1, 0, 0, a, 0, 0, 1, 0, a, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]), this)
  3545. },
  3546. b.adjustContrast = function(b) {
  3547. if (0 == b || isNaN(b)) return this;
  3548. b = this._cleanValue(b, 100);
  3549. var c;
  3550. return 0 > b ? c = 127 + b / 100 * 127 : (c = b % 1, c = 0 == c ? a.DELTA_INDEX[b] : a.DELTA_INDEX[b << 0] * (1 - c) + a.DELTA_INDEX[(b << 0) + 1] * c, c = 127 * c + 127),
  3551. this._multiplyMatrix([c / 127, 0, 0, 0, .5 * (127 - c), 0, c / 127, 0, 0, .5 * (127 - c), 0, 0, c / 127, 0, .5 * (127 - c), 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]),
  3552. this
  3553. },
  3554. b.adjustSaturation = function(a) {
  3555. if (0 == a || isNaN(a)) return this;
  3556. a = this._cleanValue(a, 100);
  3557. var b = 1 + (a > 0 ? 3 * a / 100 : a / 100),
  3558. c = .3086,
  3559. d = .6094,
  3560. e = .082;
  3561. return this._multiplyMatrix([c * (1 - b) + b, d * (1 - b), e * (1 - b), 0, 0, c * (1 - b), d * (1 - b) + b, e * (1 - b), 0, 0, c * (1 - b), d * (1 - b), e * (1 - b) + b, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]),
  3562. this
  3563. },
  3564. b.adjustHue = function(a) {
  3565. if (0 == a || isNaN(a)) return this;
  3566. a = this._cleanValue(a, 180) / 180 * Math.PI;
  3567. var b = Math.cos(a),
  3568. c = Math.sin(a),
  3569. d = .213,
  3570. e = .715,
  3571. f = .072;
  3572. return this._multiplyMatrix([d + b * (1 - d) + c * -d, e + b * -e + c * -e, f + b * -f + c * (1 - f), 0, 0, d + b * -d + .143 * c, e + b * (1 - e) + .14 * c, f + b * -f + c * -.283, 0, 0, d + b * -d + c * -(1 - d), e + b * -e + c * e, f + b * (1 - f) + c * f, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1]),
  3573. this
  3574. },
  3575. b.concat = function(b) {
  3576. return b = this._fixMatrix(b),
  3577. b.length != a.LENGTH ? this: (this._multiplyMatrix(b), this)
  3578. },
  3579. b.clone = function() {
  3580. return (new a).copy(this)
  3581. },
  3582. b.toArray = function() {
  3583. for (var b = [], c = 0, d = a.LENGTH; d > c; c++) b[c] = this[c];
  3584. return b
  3585. },
  3586. b.copy = function(b) {
  3587. for (var c = a.LENGTH,
  3588. d = 0; c > d; d++) this[d] = b[d];
  3589. return this
  3590. },
  3591. b.toString = function() {
  3592. return "[ColorMatrix]"
  3593. },
  3594. b._multiplyMatrix = function(a) {
  3595. var b, c, d, e = [];
  3596. for (b = 0; 5 > b; b++) {
  3597. for (c = 0; 5 > c; c++) e[c] = this[c + 5 * b];
  3598. for (c = 0; 5 > c; c++) {
  3599. var f = 0;
  3600. for (d = 0; 5 > d; d++) f += a[c + 5 * d] * e[d];
  3601. this[c + 5 * b] = f
  3602. }
  3603. }
  3604. },
  3605. b._cleanValue = function(a, b) {
  3606. return Math.min(b, Math.max( - b, a))
  3607. },
  3608. b._fixMatrix = function(b) {
  3609. return b instanceof a && (b = b.toArray()),
  3610. b.length < a.LENGTH ? b = b.slice(0, b.length).concat(a.IDENTITY_MATRIX.slice(b.length, a.LENGTH)) : b.length > a.LENGTH && (b = b.slice(0, a.LENGTH)),
  3611. b
  3612. },
  3613. createjs.ColorMatrix = a
  3614. } (),
  3615. this.createjs = this.createjs || {},
  3616. function() {
  3617. "use strict";
  3618. function a(a) {
  3619. this.matrix = a
  3620. }
  3621. var b = createjs.extend(a, createjs.Filter);
  3622. b.toString = function() {
  3623. return "[ColorMatrixFilter]"
  3624. },
  3625. b.clone = function() {
  3626. return new a(this.matrix)
  3627. },
  3628. b._applyFilter = function(a) {
  3629. for (var b, c, d, e, f = a.data,
  3630. g = f.length,
  3631. h = this.matrix,
  3632. i = h[0], j = h[1], k = h[2], l = h[3], m = h[4], n = h[5], o = h[6], p = h[7], q = h[8], r = h[9], s = h[10], t = h[11], u = h[12], v = h[13], w = h[14], x = h[15], y = h[16], z = h[17], A = h[18], B = h[19], C = 0; g > C; C += 4) b = f[C],
  3633. c = f[C + 1],
  3634. d = f[C + 2],
  3635. e = f[C + 3],
  3636. f[C] = b * i + c * j + d * k + e * l + m,
  3637. f[C + 1] = b * n + c * o + d * p + e * q + r,
  3638. f[C + 2] = b * s + c * t + d * u + e * v + w,
  3639. f[C + 3] = b * x + c * y + d * z + e * A + B;
  3640. return ! 0
  3641. },
  3642. createjs.ColorMatrixFilter = createjs.promote(a, "Filter")
  3643. } (),
  3644. this.createjs = this.createjs || {},
  3645. function() {
  3646. "use strict";
  3647. function a() {
  3648. throw "Touch cannot be instantiated"
  3649. }
  3650. a.isSupported = function() {
  3651. return !! ("ontouchstart" in window || window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints > 0 || window.navigator.pointerEnabled && window.navigator.maxTouchPoints > 0)
  3652. },
  3653. a.enable = function(b, c, d) {
  3654. return b && b.canvas && a.isSupported() ? b.__touch ? !0 : (b.__touch = {
  3655. pointers: {},
  3656. multitouch: !c,
  3657. preventDefault: !d,
  3658. count: 0
  3659. },
  3660. "ontouchstart" in window ? a._IOS_enable(b) : (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) && a._IE_enable(b), !0) : !1
  3661. },
  3662. a.disable = function(b) {
  3663. b && ("ontouchstart" in window ? a._IOS_disable(b) : (window.navigator.msPointerEnabled || window.navigator.pointerEnabled) && a._IE_disable(b), delete b.__touch)
  3664. },
  3665. a._IOS_enable = function(b) {
  3666. var c = b.canvas,
  3667. d = b.__touch.f = function(c) {
  3668. a._IOS_handleEvent(b, c)
  3669. };
  3670. c.addEventListener("touchstart", d, !1),
  3671. c.addEventListener("touchmove", d, !1),
  3672. c.addEventListener("touchend", d, !1),
  3673. c.addEventListener("touchcancel", d, !1)
  3674. },
  3675. a._IOS_disable = function(a) {
  3676. var b = a.canvas;
  3677. if (b) {
  3678. var c = a.__touch.f;
  3679. b.removeEventListener("touchstart", c, !1),
  3680. b.removeEventListener("touchmove", c, !1),
  3681. b.removeEventListener("touchend", c, !1),
  3682. b.removeEventListener("touchcancel", c, !1)
  3683. }
  3684. },
  3685. a._IOS_handleEvent = function(a, b) {
  3686. if (a) {
  3687. a.__touch.preventDefault && b.preventDefault && b.preventDefault();
  3688. for (var c = b.changedTouches,
  3689. d = b.type,
  3690. e = 0,
  3691. f = c.length; f > e; e++) {
  3692. var g = c[e],
  3693. h = g.identifier;
  3694. g.target == a.canvas && ("touchstart" == d ? this._handleStart(a, h, b, g.pageX, g.pageY) : "touchmove" == d ? this._handleMove(a, h, b, g.pageX, g.pageY) : ("touchend" == d || "touchcancel" == d) && this._handleEnd(a, h, b))
  3695. }
  3696. }
  3697. },
  3698. a._IE_enable = function(b) {
  3699. var c = b.canvas,
  3700. d = b.__touch.f = function(c) {
  3701. a._IE_handleEvent(b, c)
  3702. };
  3703. void 0 === window.navigator.pointerEnabled ? (c.addEventListener("MSPointerDown", d, !1), window.addEventListener("MSPointerMove", d, !1), window.addEventListener("MSPointerUp", d, !1), window.addEventListener("MSPointerCancel", d, !1), b.__touch.preventDefault && (c.style.msTouchAction = "none")) : (c.addEventListener("pointerdown", d, !1), window.addEventListener("pointermove", d, !1), window.addEventListener("pointerup", d, !1), window.addEventListener("pointercancel", d, !1), b.__touch.preventDefault && (c.style.touchAction = "none")),
  3704. b.__touch.activeIDs = {}
  3705. },
  3706. a._IE_disable = function(a) {
  3707. var b = a.__touch.f;
  3708. void 0 === window.navigator.pointerEnabled ? (window.removeEventListener("MSPointerMove", b, !1), window.removeEventListener("MSPointerUp", b, !1), window.removeEventListener("MSPointerCancel", b, !1), a.canvas && a.canvas.removeEventListener("MSPointerDown", b, !1)) : (window.removeEventListener("pointermove", b, !1), window.removeEventListener("pointerup", b, !1), window.removeEventListener("pointercancel", b, !1), a.canvas && a.canvas.removeEventListener("pointerdown", b, !1))
  3709. },
  3710. a._IE_handleEvent = function(a, b) {
  3711. if (a) {
  3712. a.__touch.preventDefault && b.preventDefault && b.preventDefault();
  3713. var c = b.type,
  3714. d = b.pointerId,
  3715. e = a.__touch.activeIDs;
  3716. if ("MSPointerDown" == c || "pointerdown" == c) {
  3717. if (b.srcElement != a.canvas) return;
  3718. e[d] = !0,
  3719. this._handleStart(a, d, b, b.pageX, b.pageY)
  3720. } else e[d] && ("MSPointerMove" == c || "pointermove" == c ? this._handleMove(a, d, b, b.pageX, b.pageY) : ("MSPointerUp" == c || "MSPointerCancel" == c || "pointerup" == c || "pointercancel" == c) && (delete e[d], this._handleEnd(a, d, b)))
  3721. }
  3722. },
  3723. a._handleStart = function(a, b, c, d, e) {
  3724. var f = a.__touch;
  3725. if (f.multitouch || !f.count) {
  3726. var g = f.pointers;
  3727. g[b] || (g[b] = !0, f.count++, a._handlePointerDown(b, c, d, e))
  3728. }
  3729. },
  3730. a._handleMove = function(a, b, c, d, e) {
  3731. a.__touch.pointers[b] && a._handlePointerMove(b, c, d, e)
  3732. },
  3733. a._handleEnd = function(a, b, c) {
  3734. var d = a.__touch,
  3735. e = d.pointers;
  3736. e[b] && (d.count--, a._handlePointerUp(b, c, !0), delete e[b])
  3737. },
  3738. createjs.Touch = a
  3739. } (),
  3740. this.createjs = this.createjs || {},
  3741. function() {
  3742. "use strict";
  3743. var a = createjs.EaselJS = createjs.EaselJS || {};
  3744. a.version = "0.8.2",
  3745. a.buildDate = "Thu, 26 Nov 2015 20:44:34 GMT"
  3746. } (),
  3747. this.createjs = this.createjs || {},
  3748. function() {
  3749. "use strict";
  3750. var a = createjs.PreloadJS = createjs.PreloadJS || {};
  3751. a.version = "0.6.2",
  3752. a.buildDate = "Thu, 26 Nov 2015 20:44:31 GMT"
  3753. } (),
  3754. this.createjs = this.createjs || {},
  3755. function() {
  3756. "use strict";
  3757. createjs.proxy = function(a, b) {
  3758. var c = Array.prototype.slice.call(arguments, 2);
  3759. return function() {
  3760. return a.apply(b, Array.prototype.slice.call(arguments, 0).concat(c))
  3761. }
  3762. }
  3763. } (),
  3764. this.createjs = this.createjs || {},
  3765. function() {
  3766. "use strict";
  3767. function a(a, b, c) {
  3768. this.Event_constructor("error"),
  3769. this.title = a,
  3770. this.message = b,
  3771. this.data = c
  3772. }
  3773. var b = createjs.extend(a, createjs.Event);
  3774. b.clone = function() {
  3775. return new createjs.ErrorEvent(this.title, this.message, this.data)
  3776. },
  3777. createjs.ErrorEvent = createjs.promote(a, "Event")
  3778. } (),
  3779. this.createjs = this.createjs || {},
  3780. function(a) {
  3781. "use strict";
  3782. function b(a, b) {
  3783. this.Event_constructor("progress"),
  3784. this.loaded = a,
  3785. this.total = null == b ? 1 : b,
  3786. this.progress = 0 == b ? 0 : this.loaded / this.total
  3787. }
  3788. var c = createjs.extend(b, createjs.Event);
  3789. c.clone = function() {
  3790. return new createjs.ProgressEvent(this.loaded, this.total)
  3791. },
  3792. createjs.ProgressEvent = createjs.promote(b, "Event")
  3793. } (window),
  3794. function() {
  3795. function a(b, d) {
  3796. function f(a) {
  3797. if (f[a] !== q) return f[a];
  3798. var b;
  3799. if ("bug-string-char-index" == a) b = "a" != "a" [0];
  3800. else if ("json" == a) b = f("json-stringify") && f("json-parse");
  3801. else {
  3802. var c, e = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';
  3803. if ("json-stringify" == a) {
  3804. var i = d.stringify,
  3805. k = "function" == typeof i && t;
  3806. if (k) { (c = function() {
  3807. return 1
  3808. }).toJSON = c;
  3809. try {
  3810. k = "0" === i(0) && "0" === i(new g) && '""' == i(new h) && i(s) === q && i(q) === q && i() === q && "1" === i(c) && "[1]" == i([c]) && "[null]" == i([q]) && "null" == i(null) && "[null,null,null]" == i([q, s, null]) && i({
  3811. a: [c, !0, !1, null, "\x00\b\n\f\r "]
  3812. }) == e && "1" === i(null, c) && "[\n 1,\n 2\n]" == i([1, 2], null, 1) && '"-271821-04-20T00:00:00.000Z"' == i(new j( - 864e13)) && '"+275760-09-13T00:00:00.000Z"' == i(new j(864e13)) && '"-000001-01-01T00:00:00.000Z"' == i(new j( - 621987552e5)) && '"1969-12-31T23:59:59.999Z"' == i(new j( - 1))
  3813. } catch(l) {
  3814. k = !1
  3815. }
  3816. }
  3817. b = k
  3818. }
  3819. if ("json-parse" == a) {
  3820. var m = d.parse;
  3821. if ("function" == typeof m) try {
  3822. if (0 === m("0") && !m(!1)) {
  3823. c = m(e);
  3824. var n = 5 == c.a.length && 1 === c.a[0];
  3825. if (n) {
  3826. try {
  3827. n = !m('" "')
  3828. } catch(l) {}
  3829. if (n) try {
  3830. n = 1 !== m("01")
  3831. } catch(l) {}
  3832. if (n) try {
  3833. n = 1 !== m("1.")
  3834. } catch(l) {}
  3835. }
  3836. }
  3837. } catch(l) {
  3838. n = !1
  3839. }
  3840. b = n
  3841. }
  3842. }
  3843. return f[a] = !!b
  3844. }
  3845. b || (b = e.Object()),
  3846. d || (d = e.Object());
  3847. var g = b.Number || e.Number,
  3848. h = b.String || e.String,
  3849. i = b.Object || e.Object,
  3850. j = b.Date || e.Date,
  3851. k = b.SyntaxError || e.SyntaxError,
  3852. l = b.TypeError || e.TypeError,
  3853. m = b.Math || e.Math,
  3854. n = b.JSON || e.JSON;
  3855. "object" == typeof n && n && (d.stringify = n.stringify, d.parse = n.parse);
  3856. var o, p, q, r = i.prototype,
  3857. s = r.toString,
  3858. t = new j( - 0xc782b5b800cec);
  3859. try {
  3860. t = -109252 == t.getUTCFullYear() && 0 === t.getUTCMonth() && 1 === t.getUTCDate() && 10 == t.getUTCHours() && 37 == t.getUTCMinutes() && 6 == t.getUTCSeconds() && 708 == t.getUTCMilliseconds()
  3861. } catch(u) {}
  3862. if (!f("json")) {
  3863. var v = "[object Function]",
  3864. w = "[object Date]",
  3865. x = "[object Number]",
  3866. y = "[object String]",
  3867. z = "[object Array]",
  3868. A = "[object Boolean]",
  3869. B = f("bug-string-char-index");
  3870. if (!t) var C = m.floor,
  3871. D = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],
  3872. E = function(a, b) {
  3873. return D[b] + 365 * (a - 1970) + C((a - 1969 + (b = +(b > 1))) / 4) - C((a - 1901 + b) / 100) + C((a - 1601 + b) / 400)
  3874. };
  3875. if ((o = r.hasOwnProperty) || (o = function(a) {
  3876. var b, c = {};
  3877. return (c.__proto__ = null, c.__proto__ = {
  3878. toString: 1
  3879. },
  3880. c).toString != s ? o = function(a) {
  3881. var b = this.__proto__,
  3882. c = a in (this.__proto__ = null, this);
  3883. return this.__proto__ = b,
  3884. c
  3885. }: (b = c.constructor, o = function(a) {
  3886. var c = (this.constructor || b).prototype;
  3887. return a in this && !(a in c && this[a] === c[a])
  3888. }),
  3889. c = null,
  3890. o.call(this, a)
  3891. }), p = function(a, b) {
  3892. var d, e, f, g = 0; (d = function() {
  3893. this.valueOf = 0
  3894. }).prototype.valueOf = 0,
  3895. e = new d;
  3896. for (f in e) o.call(e, f) && g++;
  3897. return d = e = null,
  3898. g ? p = 2 == g ?
  3899. function(a, b) {
  3900. var c, d = {},
  3901. e = s.call(a) == v;
  3902. for (c in a) e && "prototype" == c || o.call(d, c) || !(d[c] = 1) || !o.call(a, c) || b(c)
  3903. }: function(a, b) {
  3904. var c, d, e = s.call(a) == v;
  3905. for (c in a) e && "prototype" == c || !o.call(a, c) || (d = "constructor" === c) || b(c); (d || o.call(a, c = "constructor")) && b(c)
  3906. }: (e = ["valueOf", "toString", "toLocaleString", "propertyIsEnumerable", "isPrototypeOf", "hasOwnProperty", "constructor"], p = function(a, b) {
  3907. var d, f, g = s.call(a) == v,
  3908. h = !g && "function" != typeof a.constructor && c[typeof a.hasOwnProperty] && a.hasOwnProperty || o;
  3909. for (d in a) g && "prototype" == d || !h.call(a, d) || b(d);
  3910. for (f = e.length; d = e[--f]; h.call(a, d) && b(d));
  3911. }),
  3912. p(a, b)
  3913. },
  3914. !f("json-stringify")) {
  3915. var F = {
  3916. 92 : "\\\\",
  3917. 34 : '\\"',
  3918. 8 : "\\b",
  3919. 12 : "\\f",
  3920. 10 : "\\n",
  3921. 13 : "\\r",
  3922. 9 : "\\t"
  3923. },
  3924. G = "000000",
  3925. H = function(a, b) {
  3926. return (G + (b || 0)).slice( - a)
  3927. },
  3928. I = "\\u00",
  3929. J = function(a) {
  3930. for (var b = '"',
  3931. c = 0,
  3932. d = a.length,
  3933. e = !B || d > 10,
  3934. f = e && (B ? a.split("") : a); d > c; c++) {
  3935. var g = a.charCodeAt(c);
  3936. switch (g) {
  3937. case 8:
  3938. case 9:
  3939. case 10:
  3940. case 12:
  3941. case 13:
  3942. case 34:
  3943. case 92:
  3944. b += F[g];
  3945. break;
  3946. default:
  3947. if (32 > g) {
  3948. b += I + H(2, g.toString(16));
  3949. break
  3950. }
  3951. b += e ? f[c] : a.charAt(c)
  3952. }
  3953. }
  3954. return b + '"'
  3955. },
  3956. K = function(a, b, c, d, e, f, g) {
  3957. var h, i, j, k, m, n, r, t, u, v, B, D, F, G, I, L;
  3958. try {
  3959. h = b[a]
  3960. } catch(M) {}
  3961. if ("object" == typeof h && h) if (i = s.call(h), i != w || o.call(h, "toJSON"))"function" == typeof h.toJSON && (i != x && i != y && i != z || o.call(h, "toJSON")) && (h = h.toJSON(a));
  3962. else if (h > -1 / 0 && 1 / 0 > h) {
  3963. if (E) {
  3964. for (m = C(h / 864e5), j = C(m / 365.2425) + 1970 - 1; E(j + 1, 0) <= m; j++);
  3965. for (k = C((m - E(j, 0)) / 30.42); E(j, k + 1) <= m; k++);
  3966. m = 1 + m - E(j, k),
  3967. n = (h % 864e5 + 864e5) % 864e5,
  3968. r = C(n / 36e5) % 24,
  3969. t = C(n / 6e4) % 60,
  3970. u = C(n / 1e3) % 60,
  3971. v = n % 1e3
  3972. } else j = h.getUTCFullYear(),
  3973. k = h.getUTCMonth(),
  3974. m = h.getUTCDate(),
  3975. r = h.getUTCHours(),
  3976. t = h.getUTCMinutes(),
  3977. u = h.getUTCSeconds(),
  3978. v = h.getUTCMilliseconds();
  3979. h = (0 >= j || j >= 1e4 ? (0 > j ? "-": "+") + H(6, 0 > j ? -j: j) : H(4, j)) + "-" + H(2, k + 1) + "-" + H(2, m) + "T" + H(2, r) + ":" + H(2, t) + ":" + H(2, u) + "." + H(3, v) + "Z"
  3980. } else h = null;
  3981. if (c && (h = c.call(b, a, h)), null === h) return "null";
  3982. if (i = s.call(h), i == A) return "" + h;
  3983. if (i == x) return h > -1 / 0 && 1 / 0 > h ? "" + h: "null";
  3984. if (i == y) return J("" + h);
  3985. if ("object" == typeof h) {
  3986. for (G = g.length; G--;) if (g[G] === h) throw l();
  3987. if (g.push(h), B = [], I = f, f += e, i == z) {
  3988. for (F = 0, G = h.length; G > F; F++) D = K(F, h, c, d, e, f, g),
  3989. B.push(D === q ? "null": D);
  3990. L = B.length ? e ? "[\n" + f + B.join(",\n" + f) + "\n" + I + "]": "[" + B.join(",") + "]": "[]"
  3991. } else p(d || h,
  3992. function(a) {
  3993. var b = K(a, h, c, d, e, f, g);
  3994. b !== q && B.push(J(a) + ":" + (e ? " ": "") + b)
  3995. }),
  3996. L = B.length ? e ? "{\n" + f + B.join(",\n" + f) + "\n" + I + "}": "{" + B.join(",") + "}": "{}";
  3997. return g.pop(),
  3998. L
  3999. }
  4000. };
  4001. d.stringify = function(a, b, d) {
  4002. var e, f, g, h;
  4003. if (c[typeof b] && b) if ((h = s.call(b)) == v) f = b;
  4004. else if (h == z) {
  4005. g = {};
  4006. for (var i, j = 0,
  4007. k = b.length; k > j; i = b[j++], h = s.call(i), (h == y || h == x) && (g[i] = 1));
  4008. }
  4009. if (d) if ((h = s.call(d)) == x) {
  4010. if ((d -= d % 1) > 0) for (e = "", d > 10 && (d = 10); e.length < d; e += " ");
  4011. } else h == y && (e = d.length <= 10 ? d: d.slice(0, 10));
  4012. return K("", (i = {},
  4013. i[""] = a, i), f, g, e, "", [])
  4014. }
  4015. }
  4016. if (!f("json-parse")) {
  4017. var L, M, N = h.fromCharCode,
  4018. O = {
  4019. 92 : "\\",
  4020. 34 : '"',
  4021. 47 : "/",
  4022. 98 : "\b",
  4023. 116 : " ",
  4024. 110 : "\n",
  4025. 102 : "\f",
  4026. 114 : "\r"
  4027. },
  4028. P = function() {
  4029. throw L = M = null,
  4030. k()
  4031. },
  4032. Q = function() {
  4033. for (var a, b, c, d, e, f = M,
  4034. g = f.length; g > L;) switch (e = f.charCodeAt(L)) {
  4035. case 9:
  4036. case 10:
  4037. case 13:
  4038. case 32:
  4039. L++;
  4040. break;
  4041. case 123:
  4042. case 125:
  4043. case 91:
  4044. case 93:
  4045. case 58:
  4046. case 44:
  4047. return a = B ? f.charAt(L) : f[L],
  4048. L++,
  4049. a;
  4050. case 34:
  4051. for (a = "@", L++; g > L;) if (e = f.charCodeAt(L), 32 > e) P();
  4052. else if (92 == e) switch (e = f.charCodeAt(++L)) {
  4053. case 92:
  4054. case 34:
  4055. case 47:
  4056. case 98:
  4057. case 116:
  4058. case 110:
  4059. case 102:
  4060. case 114:
  4061. a += O[e],
  4062. L++;
  4063. break;
  4064. case 117:
  4065. for (b = ++L, c = L + 4; c > L; L++) e = f.charCodeAt(L),
  4066. e >= 48 && 57 >= e || e >= 97 && 102 >= e || e >= 65 && 70 >= e || P();
  4067. a += N("0x" + f.slice(b, L));
  4068. break;
  4069. default:
  4070. P()
  4071. } else {
  4072. if (34 == e) break;
  4073. for (e = f.charCodeAt(L), b = L; e >= 32 && 92 != e && 34 != e;) e = f.charCodeAt(++L);
  4074. a += f.slice(b, L)
  4075. }
  4076. if (34 == f.charCodeAt(L)) return L++,
  4077. a;
  4078. P();
  4079. default:
  4080. if (b = L, 45 == e && (d = !0, e = f.charCodeAt(++L)), e >= 48 && 57 >= e) {
  4081. for (48 == e && (e = f.charCodeAt(L + 1), e >= 48 && 57 >= e) && P(), d = !1; g > L && (e = f.charCodeAt(L), e >= 48 && 57 >= e); L++);
  4082. if (46 == f.charCodeAt(L)) {
  4083. for (c = ++L; g > c && (e = f.charCodeAt(c), e >= 48 && 57 >= e); c++);
  4084. c == L && P(),
  4085. L = c
  4086. }
  4087. if (e = f.charCodeAt(L), 101 == e || 69 == e) {
  4088. for (e = f.charCodeAt(++L), (43 == e || 45 == e) && L++, c = L; g > c && (e = f.charCodeAt(c), e >= 48 && 57 >= e); c++);
  4089. c == L && P(),
  4090. L = c
  4091. }
  4092. return + f.slice(b, L)
  4093. }
  4094. if (d && P(), "true" == f.slice(L, L + 4)) return L += 4,
  4095. !0;
  4096. if ("false" == f.slice(L, L + 5)) return L += 5,
  4097. !1;
  4098. if ("null" == f.slice(L, L + 4)) return L += 4,
  4099. null;
  4100. P()
  4101. }
  4102. return "$"
  4103. },
  4104. R = function(a) {
  4105. var b, c;
  4106. if ("$" == a && P(), "string" == typeof a) {
  4107. if ("@" == (B ? a.charAt(0) : a[0])) return a.slice(1);
  4108. if ("[" == a) {
  4109. for (b = []; a = Q(), "]" != a; c || (c = !0)) c && ("," == a ? (a = Q(), "]" == a && P()) : P()),
  4110. "," == a && P(),
  4111. b.push(R(a));
  4112. return b
  4113. }
  4114. if ("{" == a) {
  4115. for (b = {}; a = Q(), "}" != a; c || (c = !0)) c && ("," == a ? (a = Q(), "}" == a && P()) : P()),
  4116. ("," == a || "string" != typeof a || "@" != (B ? a.charAt(0) : a[0]) || ":" != Q()) && P(),
  4117. b[a.slice(1)] = R(Q());
  4118. return b
  4119. }
  4120. P()
  4121. }
  4122. return a
  4123. },
  4124. S = function(a, b, c) {
  4125. var d = T(a, b, c);
  4126. d === q ? delete a[b] : a[b] = d
  4127. },
  4128. T = function(a, b, c) {
  4129. var d, e = a[b];
  4130. if ("object" == typeof e && e) if (s.call(e) == z) for (d = e.length; d--;) S(e, d, c);
  4131. else p(e,
  4132. function(a) {
  4133. S(e, a, c)
  4134. });
  4135. return c.call(a, b, e)
  4136. };
  4137. d.parse = function(a, b) {
  4138. var c, d;
  4139. return L = 0,
  4140. M = "" + a,
  4141. c = R(Q()),
  4142. "$" != Q() && P(),
  4143. L = M = null,
  4144. b && s.call(b) == v ? T((d = {},
  4145. d[""] = c, d), "", b) : c
  4146. }
  4147. }
  4148. }
  4149. return d.runInContext = a,
  4150. d
  4151. }
  4152. var b = "function" == typeof define && define.amd,
  4153. c = {
  4154. "function": !0,
  4155. object: !0
  4156. },
  4157. d = c[typeof exports] && exports && !exports.nodeType && exports,
  4158. e = c[typeof window] && window || this,
  4159. f = d && c[typeof module] && module && !module.nodeType && "object" == typeof global && global;
  4160. if (!f || f.global !== f && f.window !== f && f.self !== f || (e = f), d && !b) a(e, d);
  4161. else {
  4162. var g = e.JSON,
  4163. h = e.JSON3,
  4164. i = !1,
  4165. j = a(e, e.JSON3 = {
  4166. noConflict: function() {
  4167. return i || (i = !0, e.JSON = g, e.JSON3 = h, g = h = null),
  4168. j
  4169. }
  4170. });
  4171. e.JSON = {
  4172. parse: j.parse,
  4173. stringify: j.stringify
  4174. }
  4175. }
  4176. b && define(function() {
  4177. return j
  4178. })
  4179. }.call(this),
  4180. function() {
  4181. var a = {};
  4182. a.appendToHead = function(b) {
  4183. a.getHead().appendChild(b)
  4184. },
  4185. a.getHead = function() {
  4186. return document.head || document.getElementsByTagName("head")[0]
  4187. },
  4188. a.getBody = function() {
  4189. return document.body || document.getElementsByTagName("body")[0]
  4190. },
  4191. createjs.DomUtils = a
  4192. } (),
  4193. function() {
  4194. var a = {};
  4195. a.parseXML = function(a, b) {
  4196. var c = null;
  4197. try {
  4198. if (window.DOMParser) {
  4199. var d = new DOMParser;
  4200. c = d.parseFromString(a, b)
  4201. }
  4202. } catch(e) {}
  4203. if (!c) try {
  4204. c = new ActiveXObject("Microsoft.XMLDOM"),
  4205. c.async = !1,
  4206. c.loadXML(a)
  4207. } catch(e) {
  4208. c = null
  4209. }
  4210. return c
  4211. },
  4212. a.parseJSON = function(a) {
  4213. if (null == a) return null;
  4214. try {
  4215. return JSON.parse(a)
  4216. } catch(b) {
  4217. throw b
  4218. }
  4219. },
  4220. createjs.DataUtils = a
  4221. } (),
  4222. this.createjs = this.createjs || {},
  4223. function() {
  4224. "use strict";
  4225. function a() {
  4226. this.src = null,
  4227. this.type = null,
  4228. this.id = null,
  4229. this.maintainOrder = !1,
  4230. this.callback = null,
  4231. this.data = null,
  4232. this.method = createjs.LoadItem.GET,
  4233. this.values = null,
  4234. this.headers = null,
  4235. this.withCredentials = !1,
  4236. this.mimeType = null,
  4237. this.crossOrigin = null,
  4238. this.loadTimeout = c.LOAD_TIMEOUT_DEFAULT
  4239. }
  4240. var b = a.prototype = {},
  4241. c = a;
  4242. c.LOAD_TIMEOUT_DEFAULT = 8e3,
  4243. c.create = function(b) {
  4244. if ("string" == typeof b) {
  4245. var d = new a;
  4246. return d.src = b,
  4247. d
  4248. }
  4249. if (b instanceof c) return b;
  4250. if (b instanceof Object && b.src) return null == b.loadTimeout && (b.loadTimeout = c.LOAD_TIMEOUT_DEFAULT),
  4251. b;
  4252. throw new Error("Type not recognized.")
  4253. },
  4254. b.set = function(a) {
  4255. for (var b in a) this[b] = a[b];
  4256. return this
  4257. },
  4258. createjs.LoadItem = c
  4259. } (),
  4260. function() {
  4261. var a = {};
  4262. a.ABSOLUTE_PATT = /^(?:\w+:)?\/{2}/i,
  4263. a.RELATIVE_PATT = /^[.\/]*?\//i,
  4264. a.EXTENSION_PATT = /\/?[^\/]+\.(\w{1,5})$/i,
  4265. a.parseURI = function(b) {
  4266. var c = {
  4267. absolute: !1,
  4268. relative: !1
  4269. };
  4270. if (null == b) return c;
  4271. var d = b.indexOf("?");
  4272. d > -1 && (b = b.substr(0, d));
  4273. var e;
  4274. return a.ABSOLUTE_PATT.test(b) ? c.absolute = !0 : a.RELATIVE_PATT.test(b) && (c.relative = !0),
  4275. (e = b.match(a.EXTENSION_PATT)) && (c.extension = e[1].toLowerCase()),
  4276. c
  4277. },
  4278. a.formatQueryString = function(a, b) {
  4279. if (null == a) throw new Error("You must specify data.");
  4280. var c = [];
  4281. for (var d in a) c.push(d + "=" + escape(a[d]));
  4282. return b && (c = c.concat(b)),
  4283. c.join("&")
  4284. },
  4285. a.buildPath = function(a, b) {
  4286. if (null == b) return a;
  4287. var c = [],
  4288. d = a.indexOf("?");
  4289. if ( - 1 != d) {
  4290. var e = a.slice(d + 1);
  4291. c = c.concat(e.split("&"))
  4292. }
  4293. return - 1 != d ? a.slice(0, d) + "?" + this.formatQueryString(b, c) : a + "?" + this.formatQueryString(b, c)
  4294. },
  4295. a.isCrossDomain = function(a) {
  4296. var b = document.createElement("a");
  4297. b.href = a.src;
  4298. var c = document.createElement("a");
  4299. c.href = location.href;
  4300. var d = "" != b.hostname && (b.port != c.port || b.protocol != c.protocol || b.hostname != c.hostname);
  4301. return d
  4302. },
  4303. a.isLocal = function(a) {
  4304. var b = document.createElement("a");
  4305. return b.href = a.src,
  4306. "" == b.hostname && "file:" == b.protocol
  4307. },
  4308. a.isBinary = function(a) {
  4309. switch (a) {
  4310. case createjs.AbstractLoader.IMAGE:
  4311. case createjs.AbstractLoader.BINARY:
  4312. return ! 0;
  4313. default:
  4314. return ! 1
  4315. }
  4316. },
  4317. a.isImageTag = function(a) {
  4318. return a instanceof HTMLImageElement
  4319. },
  4320. a.isAudioTag = function(a) {
  4321. return window.HTMLAudioElement ? a instanceof HTMLAudioElement: !1
  4322. },
  4323. a.isVideoTag = function(a) {
  4324. return window.HTMLVideoElement ? a instanceof HTMLVideoElement: !1
  4325. },
  4326. a.isText = function(a) {
  4327. switch (a) {
  4328. case createjs.AbstractLoader.TEXT:
  4329. case createjs.AbstractLoader.JSON:
  4330. case createjs.AbstractLoader.MANIFEST:
  4331. case createjs.AbstractLoader.XML:
  4332. case createjs.AbstractLoader.CSS:
  4333. case createjs.AbstractLoader.SVG:
  4334. case createjs.AbstractLoader.JAVASCRIPT:
  4335. case createjs.AbstractLoader.SPRITESHEET:
  4336. return ! 0;
  4337. default:
  4338. return ! 1
  4339. }
  4340. },
  4341. a.getTypeByExtension = function(a) {
  4342. if (null == a) return createjs.AbstractLoader.TEXT;
  4343. switch (a.toLowerCase()) {
  4344. case "jpeg":
  4345. case "jpg":
  4346. case "gif":
  4347. case "png":
  4348. case "webp":
  4349. case "bmp":
  4350. return createjs.AbstractLoader.IMAGE;
  4351. case "ogg":
  4352. case "mp3":
  4353. case "webm":
  4354. return createjs.AbstractLoader.SOUND;
  4355. case "mp4":
  4356. case "webm":
  4357. case "ts":
  4358. return createjs.AbstractLoader.VIDEO;
  4359. case "json":
  4360. return createjs.AbstractLoader.JSON;
  4361. case "xml":
  4362. return createjs.AbstractLoader.XML;
  4363. case "css":
  4364. return createjs.AbstractLoader.CSS;
  4365. case "js":
  4366. return createjs.AbstractLoader.JAVASCRIPT;
  4367. case "svg":
  4368. return createjs.AbstractLoader.SVG;
  4369. default:
  4370. return createjs.AbstractLoader.TEXT
  4371. }
  4372. },
  4373. createjs.RequestUtils = a
  4374. } (),
  4375. this.createjs = this.createjs || {},
  4376. function() {
  4377. "use strict";
  4378. function a(a, b, c) {
  4379. this.EventDispatcher_constructor(),
  4380. this.loaded = !1,
  4381. this.canceled = !1,
  4382. this.progress = 0,
  4383. this.type = c,
  4384. this.resultFormatter = null,
  4385. a ? this._item = createjs.LoadItem.create(a) : this._item = null,
  4386. this._preferXHR = b,
  4387. this._result = null,
  4388. this._rawResult = null,
  4389. this._loadedItems = null,
  4390. this._tagSrcAttribute = null,
  4391. this._tag = null
  4392. }
  4393. var b = createjs.extend(a, createjs.EventDispatcher),
  4394. c = a;
  4395. c.POST = "POST",
  4396. c.GET = "GET",
  4397. c.BINARY = "binary",
  4398. c.CSS = "css",
  4399. c.IMAGE = "image",
  4400. c.JAVASCRIPT = "javascript",
  4401. c.JSON = "json",
  4402. c.JSONP = "jsonp",
  4403. c.MANIFEST = "manifest",
  4404. c.SOUND = "sound",
  4405. c.VIDEO = "video",
  4406. c.SPRITESHEET = "spritesheet",
  4407. c.SVG = "svg",
  4408. c.TEXT = "text",
  4409. c.XML = "xml",
  4410. b.getItem = function() {
  4411. return this._item
  4412. },
  4413. b.getResult = function(a) {
  4414. return a ? this._rawResult: this._result
  4415. },
  4416. b.getTag = function() {
  4417. return this._tag
  4418. },
  4419. b.setTag = function(a) {
  4420. this._tag = a
  4421. },
  4422. b.load = function() {
  4423. this._createRequest(),
  4424. this._request.on("complete", this, this),
  4425. this._request.on("progress", this, this),
  4426. this._request.on("loadStart", this, this),
  4427. this._request.on("abort", this, this),
  4428. this._request.on("timeout", this, this),
  4429. this._request.on("error", this, this);
  4430. var a = new createjs.Event("initialize");
  4431. a.loader = this._request,
  4432. this.dispatchEvent(a),
  4433. this._request.load()
  4434. },
  4435. b.cancel = function() {
  4436. this.canceled = !0,
  4437. this.destroy()
  4438. },
  4439. b.destroy = function() {
  4440. this._request && (this._request.removeAllEventListeners(), this._request.destroy()),
  4441. this._request = null,
  4442. this._item = null,
  4443. this._rawResult = null,
  4444. this._result = null,
  4445. this._loadItems = null,
  4446. this.removeAllEventListeners()
  4447. },
  4448. b.getLoadedItems = function() {
  4449. return this._loadedItems
  4450. },
  4451. b._createRequest = function() {
  4452. this._preferXHR ? this._request = new createjs.XHRRequest(this._item) : this._request = new createjs.TagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute)
  4453. },
  4454. b._createTag = function(a) {
  4455. return null
  4456. },
  4457. b._sendLoadStart = function() {
  4458. this._isCanceled() || this.dispatchEvent("loadstart")
  4459. },
  4460. b._sendProgress = function(a) {
  4461. if (!this._isCanceled()) {
  4462. var b = null;
  4463. "number" == typeof a ? (this.progress = a, b = new createjs.ProgressEvent(this.progress)) : (b = a, this.progress = a.loaded / a.total, b.progress = this.progress, (isNaN(this.progress) || this.progress == 1 / 0) && (this.progress = 0)),
  4464. this.hasEventListener("progress") && this.dispatchEvent(b)
  4465. }
  4466. },
  4467. b._sendComplete = function() {
  4468. if (!this._isCanceled()) {
  4469. this.loaded = !0;
  4470. var a = new createjs.Event("complete");
  4471. a.rawResult = this._rawResult,
  4472. null != this._result && (a.result = this._result),
  4473. this.dispatchEvent(a)
  4474. }
  4475. },
  4476. b._sendError = function(a) { ! this._isCanceled() && this.hasEventListener("error") && (null == a && (a = new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")), this.dispatchEvent(a))
  4477. },
  4478. b._isCanceled = function() {
  4479. return null == window.createjs || this.canceled ? !0 : !1
  4480. },
  4481. b.resultFormatter = null,
  4482. b.handleEvent = function(a) {
  4483. switch (a.type) {
  4484. case "complete":
  4485. this._rawResult = a.target._response;
  4486. var b = this.resultFormatter && this.resultFormatter(this);
  4487. b instanceof Function ? b.call(this, createjs.proxy(this._resultFormatSuccess, this), createjs.proxy(this._resultFormatFailed, this)) : (this._result = b || this._rawResult, this._sendComplete());
  4488. break;
  4489. case "progress":
  4490. this._sendProgress(a);
  4491. break;
  4492. case "error":
  4493. this._sendError(a);
  4494. break;
  4495. case "loadstart":
  4496. this._sendLoadStart();
  4497. break;
  4498. case "abort":
  4499. case "timeout":
  4500. this._isCanceled() || this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_" + a.type.toUpperCase() + "_ERROR"))
  4501. }
  4502. },
  4503. b._resultFormatSuccess = function(a) {
  4504. this._result = a,
  4505. this._sendComplete()
  4506. },
  4507. b._resultFormatFailed = function(a) {
  4508. this._sendError(a)
  4509. },
  4510. b.buildPath = function(a, b) {
  4511. return createjs.RequestUtils.buildPath(a, b)
  4512. },
  4513. b.toString = function() {
  4514. return "[PreloadJS AbstractLoader]"
  4515. },
  4516. createjs.AbstractLoader = createjs.promote(a, "EventDispatcher")
  4517. } (),
  4518. this.createjs = this.createjs || {},
  4519. function() {
  4520. "use strict";
  4521. function a(a, b, c) {
  4522. this.AbstractLoader_constructor(a, b, c),
  4523. this.resultFormatter = this._formatResult,
  4524. this._tagSrcAttribute = "src",
  4525. this.on("initialize", this._updateXHR, this)
  4526. }
  4527. var b = createjs.extend(a, createjs.AbstractLoader);
  4528. b.load = function() {
  4529. this._tag || (this._tag = this._createTag(this._item.src)),
  4530. this._tag.preload = "auto",
  4531. this._tag.load(),
  4532. this.AbstractLoader_load()
  4533. },
  4534. b._createTag = function() {},
  4535. b._createRequest = function() {
  4536. this._preferXHR ? this._request = new createjs.XHRRequest(this._item) : this._request = new createjs.MediaTagRequest(this._item, this._tag || this._createTag(), this._tagSrcAttribute)
  4537. },
  4538. b._updateXHR = function(a) {
  4539. a.loader.setResponseType && a.loader.setResponseType("blob")
  4540. },
  4541. b._formatResult = function(a) {
  4542. if (this._tag.removeEventListener && this._tag.removeEventListener("canplaythrough", this._loadedHandler), this._tag.onstalled = null, this._preferXHR) {
  4543. var b = window.URL || window.webkitURL,
  4544. c = a.getResult(!0);
  4545. a.getTag().src = b.createObjectURL(c)
  4546. }
  4547. return a.getTag()
  4548. },
  4549. createjs.AbstractMediaLoader = createjs.promote(a, "AbstractLoader")
  4550. } (),
  4551. this.createjs = this.createjs || {},
  4552. function() {
  4553. "use strict";
  4554. var a = function(a) {
  4555. this._item = a
  4556. },
  4557. b = createjs.extend(a, createjs.EventDispatcher);
  4558. b.load = function() {},
  4559. b.destroy = function() {},
  4560. b.cancel = function() {},
  4561. createjs.AbstractRequest = createjs.promote(a, "EventDispatcher")
  4562. } (),
  4563. this.createjs = this.createjs || {},
  4564. function() {
  4565. "use strict";
  4566. function a(a, b, c) {
  4567. this.AbstractRequest_constructor(a),
  4568. this._tag = b,
  4569. this._tagSrcAttribute = c,
  4570. this._loadedHandler = createjs.proxy(this._handleTagComplete, this),
  4571. this._addedToDOM = !1,
  4572. this._startTagVisibility = null
  4573. }
  4574. var b = createjs.extend(a, createjs.AbstractRequest);
  4575. b.load = function() {
  4576. this._tag.onload = createjs.proxy(this._handleTagComplete, this),
  4577. this._tag.onreadystatechange = createjs.proxy(this._handleReadyStateChange, this),
  4578. this._tag.onerror = createjs.proxy(this._handleError, this);
  4579. var a = new createjs.Event("initialize");
  4580. a.loader = this._tag,
  4581. this.dispatchEvent(a),
  4582. this._hideTag(),
  4583. this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout),
  4584. this._tag[this._tagSrcAttribute] = this._item.src,
  4585. null == this._tag.parentNode && (window.document.body.appendChild(this._tag), this._addedToDOM = !0)
  4586. },
  4587. b.destroy = function() {
  4588. this._clean(),
  4589. this._tag = null,
  4590. this.AbstractRequest_destroy()
  4591. },
  4592. b._handleReadyStateChange = function() {
  4593. clearTimeout(this._loadTimeout);
  4594. var a = this._tag; ("loaded" == a.readyState || "complete" == a.readyState) && this._handleTagComplete()
  4595. },
  4596. b._handleError = function() {
  4597. this._clean(),
  4598. this.dispatchEvent("error")
  4599. },
  4600. b._handleTagComplete = function() {
  4601. this._rawResult = this._tag,
  4602. this._result = this.resultFormatter && this.resultFormatter(this) || this._rawResult,
  4603. this._clean(),
  4604. this._showTag(),
  4605. this.dispatchEvent("complete")
  4606. },
  4607. b._handleTimeout = function() {
  4608. this._clean(),
  4609. this.dispatchEvent(new createjs.Event("timeout"))
  4610. },
  4611. b._clean = function() {
  4612. this._tag.onload = null,
  4613. this._tag.onreadystatechange = null,
  4614. this._tag.onerror = null,
  4615. this._addedToDOM && null != this._tag.parentNode && this._tag.parentNode.removeChild(this._tag),
  4616. clearTimeout(this._loadTimeout)
  4617. },
  4618. b._hideTag = function() {
  4619. this._startTagVisibility = this._tag.style.visibility,
  4620. this._tag.style.visibility = "hidden"
  4621. },
  4622. b._showTag = function() {
  4623. this._tag.style.visibility = this._startTagVisibility
  4624. },
  4625. b._handleStalled = function() {},
  4626. createjs.TagRequest = createjs.promote(a, "AbstractRequest")
  4627. } (),
  4628. this.createjs = this.createjs || {},
  4629. function() {
  4630. "use strict";
  4631. function a(a, b, c) {
  4632. this.AbstractRequest_constructor(a),
  4633. this._tag = b,
  4634. this._tagSrcAttribute = c,
  4635. this._loadedHandler = createjs.proxy(this._handleTagComplete, this)
  4636. }
  4637. var b = createjs.extend(a, createjs.TagRequest);
  4638. b.load = function() {
  4639. var a = createjs.proxy(this._handleStalled, this);
  4640. this._stalledCallback = a;
  4641. var b = createjs.proxy(this._handleProgress, this);
  4642. this._handleProgress = b,
  4643. this._tag.addEventListener("stalled", a),
  4644. this._tag.addEventListener("progress", b),
  4645. this._tag.addEventListener && this._tag.addEventListener("canplaythrough", this._loadedHandler, !1),
  4646. this.TagRequest_load()
  4647. },
  4648. b._handleReadyStateChange = function() {
  4649. clearTimeout(this._loadTimeout);
  4650. var a = this._tag; ("loaded" == a.readyState || "complete" == a.readyState) && this._handleTagComplete()
  4651. },
  4652. b._handleStalled = function() {},
  4653. b._handleProgress = function(a) {
  4654. if (a && !(a.loaded > 0 && 0 == a.total)) {
  4655. var b = new createjs.ProgressEvent(a.loaded, a.total);
  4656. this.dispatchEvent(b)
  4657. }
  4658. },
  4659. b._clean = function() {
  4660. this._tag.removeEventListener && this._tag.removeEventListener("canplaythrough", this._loadedHandler),
  4661. this._tag.removeEventListener("stalled", this._stalledCallback),
  4662. this._tag.removeEventListener("progress", this._progressCallback),
  4663. this.TagRequest__clean()
  4664. },
  4665. createjs.MediaTagRequest = createjs.promote(a, "TagRequest")
  4666. } (),
  4667. this.createjs = this.createjs || {},
  4668. function() {
  4669. "use strict";
  4670. function a(a) {
  4671. this.AbstractRequest_constructor(a),
  4672. this._request = null,
  4673. this._loadTimeout = null,
  4674. this._xhrLevel = 1,
  4675. this._response = null,
  4676. this._rawResponse = null,
  4677. this._canceled = !1,
  4678. this._handleLoadStartProxy = createjs.proxy(this._handleLoadStart, this),
  4679. this._handleProgressProxy = createjs.proxy(this._handleProgress, this),
  4680. this._handleAbortProxy = createjs.proxy(this._handleAbort, this),
  4681. this._handleErrorProxy = createjs.proxy(this._handleError, this),
  4682. this._handleTimeoutProxy = createjs.proxy(this._handleTimeout, this),
  4683. this._handleLoadProxy = createjs.proxy(this._handleLoad, this),
  4684. this._handleReadyStateChangeProxy = createjs.proxy(this._handleReadyStateChange, this),
  4685. !this._createXHR(a)
  4686. }
  4687. var b = createjs.extend(a, createjs.AbstractRequest);
  4688. a.ACTIVEX_VERSIONS = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"],
  4689. b.getResult = function(a) {
  4690. return a && this._rawResponse ? this._rawResponse: this._response
  4691. },
  4692. b.cancel = function() {
  4693. this.canceled = !0,
  4694. this._clean(),
  4695. this._request.abort()
  4696. },
  4697. b.load = function() {
  4698. if (null == this._request) return void this._handleError();
  4699. null != this._request.addEventListener ? (this._request.addEventListener("loadstart", this._handleLoadStartProxy, !1), this._request.addEventListener("progress", this._handleProgressProxy, !1), this._request.addEventListener("abort", this._handleAbortProxy, !1), this._request.addEventListener("error", this._handleErrorProxy, !1), this._request.addEventListener("timeout", this._handleTimeoutProxy, !1), this._request.addEventListener("load", this._handleLoadProxy, !1), this._request.addEventListener("readystatechange", this._handleReadyStateChangeProxy, !1)) : (this._request.onloadstart = this._handleLoadStartProxy, this._request.onprogress = this._handleProgressProxy, this._request.onabort = this._handleAbortProxy, this._request.onerror = this._handleErrorProxy, this._request.ontimeout = this._handleTimeoutProxy, this._request.onload = this._handleLoadProxy, this._request.onreadystatechange = this._handleReadyStateChangeProxy),
  4700. 1 == this._xhrLevel && (this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout));
  4701. try {
  4702. this._item.values && this._item.method != createjs.AbstractLoader.GET ? this._item.method == createjs.AbstractLoader.POST && this._request.send(createjs.RequestUtils.formatQueryString(this._item.values)) : this._request.send()
  4703. } catch(a) {
  4704. this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND", null, a))
  4705. }
  4706. },
  4707. b.setResponseType = function(a) {
  4708. "blob" === a && (a = window.URL ? "blob": "arraybuffer", this._responseType = a),
  4709. this._request.responseType = a
  4710. },
  4711. b.getAllResponseHeaders = function() {
  4712. return this._request.getAllResponseHeaders instanceof Function ? this._request.getAllResponseHeaders() : null
  4713. },
  4714. b.getResponseHeader = function(a) {
  4715. return this._request.getResponseHeader instanceof Function ? this._request.getResponseHeader(a) : null
  4716. },
  4717. b._handleProgress = function(a) {
  4718. if (a && !(a.loaded > 0 && 0 == a.total)) {
  4719. var b = new createjs.ProgressEvent(a.loaded, a.total);
  4720. this.dispatchEvent(b)
  4721. }
  4722. },
  4723. b._handleLoadStart = function(a) {
  4724. clearTimeout(this._loadTimeout),
  4725. this.dispatchEvent("loadstart")
  4726. },
  4727. b._handleAbort = function(a) {
  4728. this._clean(),
  4729. this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED", null, a))
  4730. },
  4731. b._handleError = function(a) {
  4732. this._clean(),
  4733. this.dispatchEvent(new createjs.ErrorEvent(a.message))
  4734. },
  4735. b._handleReadyStateChange = function(a) {
  4736. 4 == this._request.readyState && this._handleLoad()
  4737. },
  4738. b._handleLoad = function(a) {
  4739. if (!this.loaded) {
  4740. this.loaded = !0;
  4741. var b = this._checkError();
  4742. if (b) return void this._handleError(b);
  4743. if (this._response = this._getResponse(), "arraybuffer" === this._responseType) try {
  4744. this._response = new Blob([this._response])
  4745. } catch(c) {
  4746. if (window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder, "TypeError" === c.name && window.BlobBuilder) {
  4747. var d = new BlobBuilder;
  4748. d.append(this._response),
  4749. this._response = d.getBlob()
  4750. }
  4751. }
  4752. this._clean(),
  4753. this.dispatchEvent(new createjs.Event("complete"))
  4754. }
  4755. },
  4756. b._handleTimeout = function(a) {
  4757. this._clean(),
  4758. this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT", null, a))
  4759. },
  4760. b._checkError = function() {
  4761. var a = parseInt(this._request.status);
  4762. switch (a) {
  4763. case 404:
  4764. case 0:
  4765. return new Error(a)
  4766. }
  4767. return null
  4768. },
  4769. b._getResponse = function() {
  4770. if (null != this._response) return this._response;
  4771. if (null != this._request.response) return this._request.response;
  4772. try {
  4773. if (null != this._request.responseText) return this._request.responseText
  4774. } catch(a) {}
  4775. try {
  4776. if (null != this._request.responseXML) return this._request.responseXML
  4777. } catch(a) {}
  4778. return null
  4779. },
  4780. b._createXHR = function(a) {
  4781. var b = createjs.RequestUtils.isCrossDomain(a),
  4782. c = {},
  4783. d = null;
  4784. if (window.XMLHttpRequest) d = new XMLHttpRequest,
  4785. b && void 0 === d.withCredentials && window.XDomainRequest && (d = new XDomainRequest);
  4786. else {
  4787. for (var e = 0,
  4788. f = s.ACTIVEX_VERSIONS.length; f > e; e++) {
  4789. var g = s.ACTIVEX_VERSIONS[e];
  4790. try {
  4791. d = new ActiveXObject(g);
  4792. break
  4793. } catch(h) {}
  4794. }
  4795. if (null == d) return ! 1
  4796. }
  4797. null == a.mimeType && createjs.RequestUtils.isText(a.type) && (a.mimeType = "text/plain; charset=utf-8"),
  4798. a.mimeType && d.overrideMimeType && d.overrideMimeType(a.mimeType),
  4799. this._xhrLevel = "string" == typeof d.responseType ? 2 : 1;
  4800. var i = null;
  4801. if (i = a.method == createjs.AbstractLoader.GET ? createjs.RequestUtils.buildPath(a.src, a.values) : a.src, d.open(a.method || createjs.AbstractLoader.GET, i, !0), b && d instanceof XMLHttpRequest && 1 == this._xhrLevel && (c.Origin = location.origin), a.values && a.method == createjs.AbstractLoader.POST && (c["Content-Type"] = "application/x-www-form-urlencoded"), b || c["X-Requested-With"] || (c["X-Requested-With"] = "XMLHttpRequest"), a.headers) for (var j in a.headers) c[j] = a.headers[j];
  4802. for (j in c) d.setRequestHeader(j, c[j]);
  4803. return d instanceof XMLHttpRequest && void 0 !== a.withCredentials && (d.withCredentials = a.withCredentials),
  4804. this._request = d,
  4805. !0
  4806. },
  4807. b._clean = function() {
  4808. clearTimeout(this._loadTimeout),
  4809. null != this._request.removeEventListener ? (this._request.removeEventListener("loadstart", this._handleLoadStartProxy), this._request.removeEventListener("progress", this._handleProgressProxy), this._request.removeEventListener("abort", this._handleAbortProxy), this._request.removeEventListener("error", this._handleErrorProxy), this._request.removeEventListener("timeout", this._handleTimeoutProxy), this._request.removeEventListener("load", this._handleLoadProxy), this._request.removeEventListener("readystatechange", this._handleReadyStateChangeProxy)) : (this._request.onloadstart = null, this._request.onprogress = null, this._request.onabort = null, this._request.onerror = null, this._request.ontimeout = null, this._request.onload = null, this._request.onreadystatechange = null)
  4810. },
  4811. b.toString = function() {
  4812. return "[PreloadJS XHRRequest]"
  4813. },
  4814. createjs.XHRRequest = createjs.promote(a, "AbstractRequest")
  4815. } (),
  4816. this.createjs = this.createjs || {},
  4817. function() {
  4818. "use strict";
  4819. function a(a, b, c) {
  4820. this.AbstractLoader_constructor(),
  4821. this._plugins = [],
  4822. this._typeCallbacks = {},
  4823. this._extensionCallbacks = {},
  4824. this.next = null,
  4825. this.maintainScriptOrder = !0,
  4826. this.stopOnError = !1,
  4827. this._maxConnections = 1,
  4828. this._availableLoaders = [createjs.ImageLoader, createjs.JavaScriptLoader, createjs.CSSLoader, createjs.JSONLoader, createjs.JSONPLoader, createjs.SoundLoader, createjs.ManifestLoader, createjs.SpriteSheetLoader, createjs.XMLLoader, createjs.SVGLoader, createjs.BinaryLoader, createjs.VideoLoader, createjs.TextLoader],
  4829. this._defaultLoaderLength = this._availableLoaders.length,
  4830. this.init(a, b, c)
  4831. }
  4832. var b = createjs.extend(a, createjs.AbstractLoader),
  4833. c = a;
  4834. b.init = function(a, b, c) {
  4835. this.useXHR = !0,
  4836. this.preferXHR = !0,
  4837. this._preferXHR = !0,
  4838. this.setPreferXHR(a),
  4839. this._paused = !1,
  4840. this._basePath = b,
  4841. this._crossOrigin = c,
  4842. this._loadStartWasDispatched = !1,
  4843. this._currentlyLoadingScript = null,
  4844. this._currentLoads = [],
  4845. this._loadQueue = [],
  4846. this._loadQueueBackup = [],
  4847. this._loadItemsById = {},
  4848. this._loadItemsBySrc = {},
  4849. this._loadedResults = {},
  4850. this._loadedRawResults = {},
  4851. this._numItems = 0,
  4852. this._numItemsLoaded = 0,
  4853. this._scriptOrder = [],
  4854. this._loadedScripts = [],
  4855. this._lastProgress = NaN
  4856. },
  4857. c.loadTimeout = 8e3,
  4858. c.LOAD_TIMEOUT = 0,
  4859. c.BINARY = createjs.AbstractLoader.BINARY,
  4860. c.CSS = createjs.AbstractLoader.CSS,
  4861. c.IMAGE = createjs.AbstractLoader.IMAGE,
  4862. c.JAVASCRIPT = createjs.AbstractLoader.JAVASCRIPT,
  4863. c.JSON = createjs.AbstractLoader.JSON,
  4864. c.JSONP = createjs.AbstractLoader.JSONP,
  4865. c.MANIFEST = createjs.AbstractLoader.MANIFEST,
  4866. c.SOUND = createjs.AbstractLoader.SOUND,
  4867. c.VIDEO = createjs.AbstractLoader.VIDEO,
  4868. c.SVG = createjs.AbstractLoader.SVG,
  4869. c.TEXT = createjs.AbstractLoader.TEXT,
  4870. c.XML = createjs.AbstractLoader.XML,
  4871. c.POST = createjs.AbstractLoader.POST,
  4872. c.GET = createjs.AbstractLoader.GET,
  4873. b.registerLoader = function(a) {
  4874. if (!a || !a.canLoadItem) throw new Error("loader is of an incorrect type.");
  4875. if ( - 1 != this._availableLoaders.indexOf(a)) throw new Error("loader already exists.");
  4876. this._availableLoaders.unshift(a)
  4877. },
  4878. b.unregisterLoader = function(a) {
  4879. var b = this._availableLoaders.indexOf(a); - 1 != b && b < this._defaultLoaderLength - 1 && this._availableLoaders.splice(b, 1)
  4880. },
  4881. b.setUseXHR = function(a) {
  4882. return this.setPreferXHR(a)
  4883. },
  4884. b.setPreferXHR = function(a) {
  4885. return this.preferXHR = 0 != a && null != window.XMLHttpRequest,
  4886. this.preferXHR
  4887. },
  4888. b.removeAll = function() {
  4889. this.remove()
  4890. },
  4891. b.remove = function(a) {
  4892. var b = null;
  4893. if (a && !Array.isArray(a)) b = [a];
  4894. else if (a) b = a;
  4895. else if (arguments.length > 0) return;
  4896. var c = !1;
  4897. if (b) {
  4898. for (; b.length;) {
  4899. var d = b.pop(),
  4900. e = this.getResult(d);
  4901. for (f = this._loadQueue.length - 1; f >= 0; f--) if (g = this._loadQueue[f].getItem(), g.id == d || g.src == d) {
  4902. this._loadQueue.splice(f, 1)[0].cancel();
  4903. break
  4904. }
  4905. for (f = this._loadQueueBackup.length - 1; f >= 0; f--) if (g = this._loadQueueBackup[f].getItem(), g.id == d || g.src == d) {
  4906. this._loadQueueBackup.splice(f, 1)[0].cancel();
  4907. break
  4908. }
  4909. if (e) this._disposeItem(this.getItem(d));
  4910. else for (var f = this._currentLoads.length - 1; f >= 0; f--) {
  4911. var g = this._currentLoads[f].getItem();
  4912. if (g.id == d || g.src == d) {
  4913. this._currentLoads.splice(f, 1)[0].cancel(),
  4914. c = !0;
  4915. break
  4916. }
  4917. }
  4918. }
  4919. c && this._loadNext()
  4920. } else {
  4921. this.close();
  4922. for (var h in this._loadItemsById) this._disposeItem(this._loadItemsById[h]);
  4923. this.init(this.preferXHR, this._basePath)
  4924. }
  4925. },
  4926. b.reset = function() {
  4927. this.close();
  4928. for (var a in this._loadItemsById) this._disposeItem(this._loadItemsById[a]);
  4929. for (var b = [], c = 0, d = this._loadQueueBackup.length; d > c; c++) b.push(this._loadQueueBackup[c].getItem());
  4930. this.loadManifest(b, !1)
  4931. },
  4932. b.installPlugin = function(a) {
  4933. if (null != a && null != a.getPreloadHandlers) {
  4934. this._plugins.push(a);
  4935. var b = a.getPreloadHandlers();
  4936. if (b.scope = a, null != b.types) for (var c = 0,
  4937. d = b.types.length; d > c; c++) this._typeCallbacks[b.types[c]] = b;
  4938. if (null != b.extensions) for (c = 0, d = b.extensions.length; d > c; c++) this._extensionCallbacks[b.extensions[c]] = b
  4939. }
  4940. },
  4941. b.setMaxConnections = function(a) {
  4942. this._maxConnections = a,
  4943. !this._paused && this._loadQueue.length > 0 && this._loadNext()
  4944. },
  4945. b.loadFile = function(a, b, c) {
  4946. if (null == a) {
  4947. var d = new createjs.ErrorEvent("PRELOAD_NO_FILE");
  4948. return void this._sendError(d)
  4949. }
  4950. this._addItem(a, null, c),
  4951. b !== !1 ? this.setPaused(!1) : this.setPaused(!0)
  4952. },
  4953. b.loadManifest = function(a, b, d) {
  4954. var e = null,
  4955. f = null;
  4956. if (Array.isArray(a)) {
  4957. if (0 == a.length) {
  4958. var g = new createjs.ErrorEvent("PRELOAD_MANIFEST_EMPTY");
  4959. return void this._sendError(g)
  4960. }
  4961. e = a
  4962. } else if ("string" == typeof a) e = [{
  4963. src: a,
  4964. type: c.MANIFEST
  4965. }];
  4966. else {
  4967. if ("object" != typeof a) {
  4968. var g = new createjs.ErrorEvent("PRELOAD_MANIFEST_NULL");
  4969. return void this._sendError(g)
  4970. }
  4971. if (void 0 !== a.src) {
  4972. if (null == a.type) a.type = c.MANIFEST;
  4973. else if (a.type != c.MANIFEST) {
  4974. var g = new createjs.ErrorEvent("PRELOAD_MANIFEST_TYPE");
  4975. this._sendError(g)
  4976. }
  4977. e = [a]
  4978. } else void 0 !== a.manifest && (e = a.manifest, f = a.path)
  4979. }
  4980. for (var h = 0,
  4981. i = e.length; i > h; h++) this._addItem(e[h], f, d);
  4982. b !== !1 ? this.setPaused(!1) : this.setPaused(!0)
  4983. },
  4984. b.load = function() {
  4985. this.setPaused(!1)
  4986. },
  4987. b.getItem = function(a) {
  4988. return this._loadItemsById[a] || this._loadItemsBySrc[a]
  4989. },
  4990. b.getResult = function(a, b) {
  4991. var c = this._loadItemsById[a] || this._loadItemsBySrc[a];
  4992. if (null == c) return null;
  4993. var d = c.id;
  4994. return b && this._loadedRawResults[d] ? this._loadedRawResults[d] : this._loadedResults[d]
  4995. },
  4996. b.getItems = function(a) {
  4997. var b = [];
  4998. for (var c in this._loadItemsById) {
  4999. var d = this._loadItemsById[c],
  5000. e = this.getResult(c); (a !== !0 || null != e) && b.push({
  5001. item: d,
  5002. result: e,
  5003. rawResult: this.getResult(c, !0)
  5004. })
  5005. }
  5006. return b
  5007. },
  5008. b.setPaused = function(a) {
  5009. this._paused = a,
  5010. this._paused || this._loadNext()
  5011. },
  5012. b.close = function() {
  5013. for (; this._currentLoads.length;) this._currentLoads.pop().cancel();
  5014. this._scriptOrder.length = 0,
  5015. this._loadedScripts.length = 0,
  5016. this.loadStartWasDispatched = !1,
  5017. this._itemCount = 0,
  5018. this._lastProgress = NaN
  5019. },
  5020. b._addItem = function(a, b, c) {
  5021. var d = this._createLoadItem(a, b, c);
  5022. if (null != d) {
  5023. var e = this._createLoader(d);
  5024. null != e && ("plugins" in e && (e.plugins = this._plugins), d._loader = e, this._loadQueue.push(e), this._loadQueueBackup.push(e), this._numItems++, this._updateProgress(), (this.maintainScriptOrder && d.type == createjs.LoadQueue.JAVASCRIPT || d.maintainOrder === !0) && (this._scriptOrder.push(d), this._loadedScripts.push(null)))
  5025. }
  5026. },
  5027. b._createLoadItem = function(a, b, c) {
  5028. var d = createjs.LoadItem.create(a);
  5029. if (null == d) return null;
  5030. var e = "",
  5031. f = c || this._basePath;
  5032. if (d.src instanceof Object) {
  5033. if (!d.type) return null;
  5034. if (b) {
  5035. e = b;
  5036. var g = createjs.RequestUtils.parseURI(b);
  5037. null == f || g.absolute || g.relative || (e = f + e)
  5038. } else null != f && (e = f)
  5039. } else {
  5040. var h = createjs.RequestUtils.parseURI(d.src);
  5041. h.extension && (d.ext = h.extension),
  5042. null == d.type && (d.type = createjs.RequestUtils.getTypeByExtension(d.ext));
  5043. var i = d.src;
  5044. if (!h.absolute && !h.relative) if (b) {
  5045. e = b;
  5046. var g = createjs.RequestUtils.parseURI(b);
  5047. i = b + i,
  5048. null == f || g.absolute || g.relative || (e = f + e)
  5049. } else null != f && (e = f);
  5050. d.src = e + d.src
  5051. }
  5052. d.path = e,
  5053. (void 0 === d.id || null === d.id || "" === d.id) && (d.id = i);
  5054. var j = this._typeCallbacks[d.type] || this._extensionCallbacks[d.ext];
  5055. if (j) {
  5056. var k = j.callback.call(j.scope, d, this);
  5057. if (k === !1) return null;
  5058. k === !0 || null != k && (d._loader = k),
  5059. h = createjs.RequestUtils.parseURI(d.src),
  5060. null != h.extension && (d.ext = h.extension)
  5061. }
  5062. return this._loadItemsById[d.id] = d,
  5063. this._loadItemsBySrc[d.src] = d,
  5064. null == d.crossOrigin && (d.crossOrigin = this._crossOrigin),
  5065. d
  5066. },
  5067. b._createLoader = function(a) {
  5068. if (null != a._loader) return a._loader;
  5069. for (var b = this.preferXHR,
  5070. c = 0; c < this._availableLoaders.length; c++) {
  5071. var d = this._availableLoaders[c];
  5072. if (d && d.canLoadItem(a)) return new d(a, b)
  5073. }
  5074. return null
  5075. },
  5076. b._loadNext = function() {
  5077. if (!this._paused) {
  5078. this._loadStartWasDispatched || (this._sendLoadStart(), this._loadStartWasDispatched = !0),
  5079. this._numItems == this._numItemsLoaded ? (this.loaded = !0, this._sendComplete(), this.next && this.next.load && this.next.load()) : this.loaded = !1;
  5080. for (var a = 0; a < this._loadQueue.length && !(this._currentLoads.length >= this._maxConnections); a++) {
  5081. var b = this._loadQueue[a];
  5082. this._canStartLoad(b) && (this._loadQueue.splice(a, 1), a--, this._loadItem(b))
  5083. }
  5084. }
  5085. },
  5086. b._loadItem = function(a) {
  5087. a.on("fileload", this._handleFileLoad, this),
  5088. a.on("progress", this._handleProgress, this),
  5089. a.on("complete", this._handleFileComplete, this),
  5090. a.on("error", this._handleError, this),
  5091. a.on("fileerror", this._handleFileError, this),
  5092. this._currentLoads.push(a),
  5093. this._sendFileStart(a.getItem()),
  5094. a.load()
  5095. },
  5096. b._handleFileLoad = function(a) {
  5097. a.target = null,
  5098. this.dispatchEvent(a)
  5099. },
  5100. b._handleFileError = function(a) {
  5101. var b = new createjs.ErrorEvent("FILE_LOAD_ERROR", null, a.item);
  5102. this._sendError(b)
  5103. },
  5104. b._handleError = function(a) {
  5105. var b = a.target;
  5106. this._numItemsLoaded++,
  5107. this._finishOrderedItem(b, !0),
  5108. this._updateProgress();
  5109. var c = new createjs.ErrorEvent("FILE_LOAD_ERROR", null, b.getItem());
  5110. this._sendError(c),
  5111. this.stopOnError ? this.setPaused(!0) : (this._removeLoadItem(b), this._cleanLoadItem(b), this._loadNext())
  5112. },
  5113. b._handleFileComplete = function(a) {
  5114. var b = a.target,
  5115. c = b.getItem(),
  5116. d = b.getResult();
  5117. this._loadedResults[c.id] = d;
  5118. var e = b.getResult(!0);
  5119. null != e && e !== d && (this._loadedRawResults[c.id] = e),
  5120. this._saveLoadedItems(b),
  5121. this._removeLoadItem(b),
  5122. this._finishOrderedItem(b) || this._processFinishedLoad(c, b),
  5123. this._cleanLoadItem(b)
  5124. },
  5125. b._saveLoadedItems = function(a) {
  5126. var b = a.getLoadedItems();
  5127. if (null !== b) for (var c = 0; c < b.length; c++) {
  5128. var d = b[c].item;
  5129. this._loadItemsBySrc[d.src] = d,
  5130. this._loadItemsById[d.id] = d,
  5131. this._loadedResults[d.id] = b[c].result,
  5132. this._loadedRawResults[d.id] = b[c].rawResult
  5133. }
  5134. },
  5135. b._finishOrderedItem = function(a, b) {
  5136. var c = a.getItem();
  5137. if (this.maintainScriptOrder && c.type == createjs.LoadQueue.JAVASCRIPT || c.maintainOrder) {
  5138. a instanceof createjs.JavaScriptLoader && (this._currentlyLoadingScript = !1);
  5139. var d = createjs.indexOf(this._scriptOrder, c);
  5140. return - 1 == d ? !1 : (this._loadedScripts[d] = b === !0 ? !0 : c, this._checkScriptLoadOrder(), !0)
  5141. }
  5142. return ! 1
  5143. },
  5144. b._checkScriptLoadOrder = function() {
  5145. for (var a = this._loadedScripts.length,
  5146. b = 0; a > b; b++) {
  5147. var c = this._loadedScripts[b];
  5148. if (null === c) break;
  5149. if (c !== !0) {
  5150. var d = this._loadedResults[c.id];
  5151. c.type == createjs.LoadQueue.JAVASCRIPT && createjs.DomUtils.appendToHead(d);
  5152. var e = c._loader;
  5153. this._processFinishedLoad(c, e),
  5154. this._loadedScripts[b] = !0
  5155. }
  5156. }
  5157. },
  5158. b._processFinishedLoad = function(a, b) {
  5159. if (this._numItemsLoaded++, !this.maintainScriptOrder && a.type == createjs.LoadQueue.JAVASCRIPT) {
  5160. var c = b.getTag();
  5161. createjs.DomUtils.appendToHead(c)
  5162. }
  5163. this._updateProgress(),
  5164. this._sendFileComplete(a, b),
  5165. this._loadNext()
  5166. },
  5167. b._canStartLoad = function(a) {
  5168. if (!this.maintainScriptOrder || a.preferXHR) return ! 0;
  5169. var b = a.getItem();
  5170. if (b.type != createjs.LoadQueue.JAVASCRIPT) return ! 0;
  5171. if (this._currentlyLoadingScript) return ! 1;
  5172. for (var c = this._scriptOrder.indexOf(b), d = 0; c > d;) {
  5173. var e = this._loadedScripts[d];
  5174. if (null == e) return ! 1;
  5175. d++
  5176. }
  5177. return this._currentlyLoadingScript = !0,
  5178. !0
  5179. },
  5180. b._removeLoadItem = function(a) {
  5181. for (var b = this._currentLoads.length,
  5182. c = 0; b > c; c++) if (this._currentLoads[c] == a) {
  5183. this._currentLoads.splice(c, 1);
  5184. break
  5185. }
  5186. },
  5187. b._cleanLoadItem = function(a) {
  5188. var b = a.getItem();
  5189. b && delete b._loader
  5190. },
  5191. b._handleProgress = function(a) {
  5192. var b = a.target;
  5193. this._sendFileProgress(b.getItem(), b.progress),
  5194. this._updateProgress()
  5195. },
  5196. b._updateProgress = function() {
  5197. var a = this._numItemsLoaded / this._numItems,
  5198. b = this._numItems - this._numItemsLoaded;
  5199. if (b > 0) {
  5200. for (var c = 0,
  5201. d = 0,
  5202. e = this._currentLoads.length; e > d; d++) c += this._currentLoads[d].progress;
  5203. a += c / b * (b / this._numItems)
  5204. }
  5205. this._lastProgress != a && (this._sendProgress(a), this._lastProgress = a)
  5206. },
  5207. b._disposeItem = function(a) {
  5208. delete this._loadedResults[a.id],
  5209. delete this._loadedRawResults[a.id],
  5210. delete this._loadItemsById[a.id],
  5211. delete this._loadItemsBySrc[a.src]
  5212. },
  5213. b._sendFileProgress = function(a, b) {
  5214. if (!this._isCanceled() && !this._paused && this.hasEventListener("fileprogress")) {
  5215. var c = new createjs.Event("fileprogress");
  5216. c.progress = b,
  5217. c.loaded = b,
  5218. c.total = 1,
  5219. c.item = a,
  5220. this.dispatchEvent(c)
  5221. }
  5222. },
  5223. b._sendFileComplete = function(a, b) {
  5224. if (!this._isCanceled() && !this._paused) {
  5225. var c = new createjs.Event("fileload");
  5226. c.loader = b,
  5227. c.item = a,
  5228. c.result = this._loadedResults[a.id],
  5229. c.rawResult = this._loadedRawResults[a.id],
  5230. a.completeHandler && a.completeHandler(c),
  5231. this.hasEventListener("fileload") && this.dispatchEvent(c)
  5232. }
  5233. },
  5234. b._sendFileStart = function(a) {
  5235. var b = new createjs.Event("filestart");
  5236. b.item = a,
  5237. this.hasEventListener("filestart") && this.dispatchEvent(b)
  5238. },
  5239. b.toString = function() {
  5240. return "[PreloadJS LoadQueue]"
  5241. },
  5242. createjs.LoadQueue = createjs.promote(a, "AbstractLoader")
  5243. } (),
  5244. this.createjs = this.createjs || {},
  5245. function() {
  5246. "use strict";
  5247. function a(a) {
  5248. this.AbstractLoader_constructor(a, !0, createjs.AbstractLoader.TEXT)
  5249. }
  5250. var b = (createjs.extend(a, createjs.AbstractLoader), a);
  5251. b.canLoadItem = function(a) {
  5252. return a.type == createjs.AbstractLoader.TEXT
  5253. },
  5254. createjs.TextLoader = createjs.promote(a, "AbstractLoader")
  5255. } (),
  5256. this.createjs = this.createjs || {},
  5257. function() {
  5258. "use strict";
  5259. function a(a) {
  5260. this.AbstractLoader_constructor(a, !0, createjs.AbstractLoader.BINARY),
  5261. this.on("initialize", this._updateXHR, this)
  5262. }
  5263. var b = createjs.extend(a, createjs.AbstractLoader),
  5264. c = a;
  5265. c.canLoadItem = function(a) {
  5266. return a.type == createjs.AbstractLoader.BINARY
  5267. },
  5268. b._updateXHR = function(a) {
  5269. a.loader.setResponseType("arraybuffer")
  5270. },
  5271. createjs.BinaryLoader = createjs.promote(a, "AbstractLoader")
  5272. } (),
  5273. this.createjs = this.createjs || {},
  5274. function() {
  5275. "use strict";
  5276. function a(a, b) {
  5277. this.AbstractLoader_constructor(a, b, createjs.AbstractLoader.CSS),
  5278. this.resultFormatter = this._formatResult,
  5279. this._tagSrcAttribute = "href",
  5280. b ? this._tag = document.createElement("style") : this._tag = document.createElement("link"),
  5281. this._tag.rel = "stylesheet",
  5282. this._tag.type = "text/css"
  5283. }
  5284. var b = createjs.extend(a, createjs.AbstractLoader),
  5285. c = a;
  5286. c.canLoadItem = function(a) {
  5287. return a.type == createjs.AbstractLoader.CSS
  5288. },
  5289. b._formatResult = function(a) {
  5290. if (this._preferXHR) {
  5291. var b = a.getTag();
  5292. if (b.styleSheet) b.styleSheet.cssText = a.getResult(!0);
  5293. else {
  5294. var c = document.createTextNode(a.getResult(!0));
  5295. b.appendChild(c)
  5296. }
  5297. } else b = this._tag;
  5298. return createjs.DomUtils.appendToHead(b),
  5299. b
  5300. },
  5301. createjs.CSSLoader = createjs.promote(a, "AbstractLoader")
  5302. } (),
  5303. this.createjs = this.createjs || {},
  5304. function() {
  5305. "use strict";
  5306. function a(a, b) {
  5307. this.AbstractLoader_constructor(a, b, createjs.AbstractLoader.IMAGE),
  5308. this.resultFormatter = this._formatResult,
  5309. this._tagSrcAttribute = "src",
  5310. createjs.RequestUtils.isImageTag(a) ? this._tag = a: createjs.RequestUtils.isImageTag(a.src) ? this._tag = a.src: createjs.RequestUtils.isImageTag(a.tag) && (this._tag = a.tag),
  5311. null != this._tag ? this._preferXHR = !1 : this._tag = document.createElement("img"),
  5312. this.on("initialize", this._updateXHR, this)
  5313. }
  5314. var b = createjs.extend(a, createjs.AbstractLoader),
  5315. c = a;
  5316. c.canLoadItem = function(a) {
  5317. return a.type == createjs.AbstractLoader.IMAGE
  5318. },
  5319. b.load = function() {
  5320. if ("" != this._tag.src && this._tag.complete) return void this._sendComplete();
  5321. var a = this._item.crossOrigin;
  5322. 1 == a && (a = "Anonymous"),
  5323. null == a || createjs.RequestUtils.isLocal(this._item.src) || (this._tag.crossOrigin = a),
  5324. this.AbstractLoader_load()
  5325. },
  5326. b._updateXHR = function(a) {
  5327. a.loader.mimeType = "text/plain; charset=x-user-defined-binary",
  5328. a.loader.setResponseType && a.loader.setResponseType("blob")
  5329. },
  5330. b._formatResult = function(a) {
  5331. return this._formatImage
  5332. },
  5333. b._formatImage = function(a, b) {
  5334. var c = this._tag,
  5335. d = window.URL || window.webkitURL;
  5336. if (this._preferXHR) if (d) {
  5337. var e = d.createObjectURL(this.getResult(!0));
  5338. c.src = e,
  5339. c.addEventListener("load", this._cleanUpURL, !1),
  5340. c.addEventListener("error", this._cleanUpURL, !1)
  5341. } else c.src = this._item.src;
  5342. else;
  5343. c.complete ? a(c) : (c.onload = createjs.proxy(function() {
  5344. a(this._tag)
  5345. },
  5346. this), c.onerror = createjs.proxy(function() {
  5347. b(_this._tag)
  5348. },
  5349. this))
  5350. },
  5351. b._cleanUpURL = function(a) {
  5352. var b = window.URL || window.webkitURL;
  5353. b.revokeObjectURL(a.target.src)
  5354. },
  5355. createjs.ImageLoader = createjs.promote(a, "AbstractLoader")
  5356. } (),
  5357. this.createjs = this.createjs || {},
  5358. function() {
  5359. "use strict";
  5360. function a(a, b) {
  5361. this.AbstractLoader_constructor(a, b, createjs.AbstractLoader.JAVASCRIPT),
  5362. this.resultFormatter = this._formatResult,
  5363. this._tagSrcAttribute = "src",
  5364. this.setTag(document.createElement("script"))
  5365. }
  5366. var b = createjs.extend(a, createjs.AbstractLoader),
  5367. c = a;
  5368. c.canLoadItem = function(a) {
  5369. return a.type == createjs.AbstractLoader.JAVASCRIPT
  5370. },
  5371. b._formatResult = function(a) {
  5372. var b = a.getTag();
  5373. return this._preferXHR && (b.text = a.getResult(!0)),
  5374. b
  5375. },
  5376. createjs.JavaScriptLoader = createjs.promote(a, "AbstractLoader")
  5377. } (),
  5378. this.createjs = this.createjs || {},
  5379. function() {
  5380. "use strict";
  5381. function a(a) {
  5382. this.AbstractLoader_constructor(a, !0, createjs.AbstractLoader.JSON),
  5383. this.resultFormatter = this._formatResult
  5384. }
  5385. var b = createjs.extend(a, createjs.AbstractLoader),
  5386. c = a;
  5387. c.canLoadItem = function(a) {
  5388. return a.type == createjs.AbstractLoader.JSON
  5389. },
  5390. b._formatResult = function(a) {
  5391. var b = null;
  5392. try {
  5393. b = createjs.DataUtils.parseJSON(a.getResult(!0))
  5394. } catch(c) {
  5395. var d = new createjs.ErrorEvent("JSON_FORMAT", null, c);
  5396. return this._sendError(d),
  5397. c
  5398. }
  5399. return b
  5400. },
  5401. createjs.JSONLoader = createjs.promote(a, "AbstractLoader")
  5402. } (),
  5403. this.createjs = this.createjs || {},
  5404. function() {
  5405. "use strict";
  5406. function a(a) {
  5407. this.AbstractLoader_constructor(a, !1, createjs.AbstractLoader.JSONP),
  5408. this.setTag(document.createElement("script")),
  5409. this.getTag().type = "text/javascript"
  5410. }
  5411. var b = createjs.extend(a, createjs.AbstractLoader),
  5412. c = a;
  5413. c.canLoadItem = function(a) {
  5414. return a.type == createjs.AbstractLoader.JSONP
  5415. },
  5416. b.cancel = function() {
  5417. this.AbstractLoader_cancel(),
  5418. this._dispose()
  5419. },
  5420. b.load = function() {
  5421. if (null == this._item.callback) throw new Error("callback is required for loading JSONP requests.");
  5422. if (null != window[this._item.callback]) throw new Error("JSONP callback '" + this._item.callback + "' already exists on window. You need to specify a different callback or re-name the current one.");
  5423. window[this._item.callback] = createjs.proxy(this._handleLoad, this),
  5424. window.document.body.appendChild(this._tag),
  5425. this._loadTimeout = setTimeout(createjs.proxy(this._handleTimeout, this), this._item.loadTimeout),
  5426. this._tag.src = this._item.src
  5427. },
  5428. b._handleLoad = function(a) {
  5429. this._result = this._rawResult = a,
  5430. this._sendComplete(),
  5431. this._dispose()
  5432. },
  5433. b._handleTimeout = function() {
  5434. this._dispose(),
  5435. this.dispatchEvent(new createjs.ErrorEvent("timeout"))
  5436. },
  5437. b._dispose = function() {
  5438. window.document.body.removeChild(this._tag),
  5439. delete window[this._item.callback],
  5440. clearTimeout(this._loadTimeout)
  5441. },
  5442. createjs.JSONPLoader = createjs.promote(a, "AbstractLoader")
  5443. } (),
  5444. this.createjs = this.createjs || {},
  5445. function() {
  5446. "use strict";
  5447. function a(a) {
  5448. this.AbstractLoader_constructor(a, null, createjs.AbstractLoader.MANIFEST),
  5449. this.plugins = null,
  5450. this._manifestQueue = null
  5451. }
  5452. var b = createjs.extend(a, createjs.AbstractLoader),
  5453. c = a;
  5454. c.MANIFEST_PROGRESS = .25,
  5455. c.canLoadItem = function(a) {
  5456. return a.type == createjs.AbstractLoader.MANIFEST
  5457. },
  5458. b.load = function() {
  5459. this.AbstractLoader_load()
  5460. },
  5461. b._createRequest = function() {
  5462. var a = this._item.callback;
  5463. null != a ? this._request = new createjs.JSONPLoader(this._item) : this._request = new createjs.JSONLoader(this._item)
  5464. },
  5465. b.handleEvent = function(a) {
  5466. switch (a.type) {
  5467. case "complete":
  5468. return this._rawResult = a.target.getResult(!0),
  5469. this._result = a.target.getResult(),
  5470. this._sendProgress(c.MANIFEST_PROGRESS),
  5471. void this._loadManifest(this._result);
  5472. case "progress":
  5473. return a.loaded *= c.MANIFEST_PROGRESS,
  5474. this.progress = a.loaded / a.total,
  5475. (isNaN(this.progress) || this.progress == 1 / 0) && (this.progress = 0),
  5476. void this._sendProgress(a)
  5477. }
  5478. this.AbstractLoader_handleEvent(a)
  5479. },
  5480. b.destroy = function() {
  5481. this.AbstractLoader_destroy(),
  5482. this._manifestQueue.close()
  5483. },
  5484. b._loadManifest = function(a) {
  5485. if (a && a.manifest) {
  5486. var b = this._manifestQueue = new createjs.LoadQueue;
  5487. b.on("fileload", this._handleManifestFileLoad, this),
  5488. b.on("progress", this._handleManifestProgress, this),
  5489. b.on("complete", this._handleManifestComplete, this, !0),
  5490. b.on("error", this._handleManifestError, this, !0);
  5491. for (var c = 0,
  5492. d = this.plugins.length; d > c; c++) b.installPlugin(this.plugins[c]);
  5493. b.loadManifest(a)
  5494. } else this._sendComplete()
  5495. },
  5496. b._handleManifestFileLoad = function(a) {
  5497. a.target = null,
  5498. this.dispatchEvent(a)
  5499. },
  5500. b._handleManifestComplete = function(a) {
  5501. this._loadedItems = this._manifestQueue.getItems(!0),
  5502. this._sendComplete()
  5503. },
  5504. b._handleManifestProgress = function(a) {
  5505. this.progress = a.progress * (1 - c.MANIFEST_PROGRESS) + c.MANIFEST_PROGRESS,
  5506. this._sendProgress(this.progress)
  5507. },
  5508. b._handleManifestError = function(a) {
  5509. var b = new createjs.Event("fileerror");
  5510. b.item = a.data,
  5511. this.dispatchEvent(b)
  5512. },
  5513. createjs.ManifestLoader = createjs.promote(a, "AbstractLoader")
  5514. } (),
  5515. this.createjs = this.createjs || {},
  5516. function() {
  5517. "use strict";
  5518. function a(a, b) {
  5519. this.AbstractMediaLoader_constructor(a, b, createjs.AbstractLoader.SOUND),
  5520. createjs.RequestUtils.isAudioTag(a) ? this._tag = a: createjs.RequestUtils.isAudioTag(a.src) ? this._tag = a: createjs.RequestUtils.isAudioTag(a.tag) && (this._tag = createjs.RequestUtils.isAudioTag(a) ? a: a.src),
  5521. null != this._tag && (this._preferXHR = !1)
  5522. }
  5523. var b = createjs.extend(a, createjs.AbstractMediaLoader),
  5524. c = a;
  5525. c.canLoadItem = function(a) {
  5526. return a.type == createjs.AbstractLoader.SOUND
  5527. },
  5528. b._createTag = function(a) {
  5529. var b = document.createElement("audio");
  5530. return b.autoplay = !1,
  5531. b.preload = "none",
  5532. b.src = a,
  5533. b
  5534. },
  5535. createjs.SoundLoader = createjs.promote(a, "AbstractMediaLoader")
  5536. } (),
  5537. this.createjs = this.createjs || {},
  5538. function() {
  5539. "use strict";
  5540. function a(a, b) {
  5541. this.AbstractMediaLoader_constructor(a, b, createjs.AbstractLoader.VIDEO),
  5542. createjs.RequestUtils.isVideoTag(a) || createjs.RequestUtils.isVideoTag(a.src) ? (this.setTag(createjs.RequestUtils.isVideoTag(a) ? a: a.src), this._preferXHR = !1) : this.setTag(this._createTag())
  5543. }
  5544. var b = createjs.extend(a, createjs.AbstractMediaLoader),
  5545. c = a;
  5546. b._createTag = function() {
  5547. return document.createElement("video")
  5548. },
  5549. c.canLoadItem = function(a) {
  5550. return a.type == createjs.AbstractLoader.VIDEO
  5551. },
  5552. createjs.VideoLoader = createjs.promote(a, "AbstractMediaLoader")
  5553. } (),
  5554. this.createjs = this.createjs || {},
  5555. function() {
  5556. "use strict";
  5557. function a(a, b) {
  5558. this.AbstractLoader_constructor(a, b, createjs.AbstractLoader.SPRITESHEET),
  5559. this._manifestQueue = null
  5560. }
  5561. var b = createjs.extend(a, createjs.AbstractLoader),
  5562. c = a;
  5563. c.SPRITESHEET_PROGRESS = .25,
  5564. c.canLoadItem = function(a) {
  5565. return a.type == createjs.AbstractLoader.SPRITESHEET
  5566. },
  5567. b.destroy = function() {
  5568. this.AbstractLoader_destroy,
  5569. this._manifestQueue.close()
  5570. },
  5571. b._createRequest = function() {
  5572. var a = this._item.callback;
  5573. null != a ? this._request = new createjs.JSONPLoader(this._item) : this._request = new createjs.JSONLoader(this._item)
  5574. },
  5575. b.handleEvent = function(a) {
  5576. switch (a.type) {
  5577. case "complete":
  5578. return this._rawResult = a.target.getResult(!0),
  5579. this._result = a.target.getResult(),
  5580. this._sendProgress(c.SPRITESHEET_PROGRESS),
  5581. void this._loadManifest(this._result);
  5582. case "progress":
  5583. return a.loaded *= c.SPRITESHEET_PROGRESS,
  5584. this.progress = a.loaded / a.total,
  5585. (isNaN(this.progress) || this.progress == 1 / 0) && (this.progress = 0),
  5586. void this._sendProgress(a)
  5587. }
  5588. this.AbstractLoader_handleEvent(a)
  5589. },
  5590. b._loadManifest = function(a) {
  5591. if (a && a.images) {
  5592. var b = this._manifestQueue = new createjs.LoadQueue(this._preferXHR, this._item.path, this._item.crossOrigin);
  5593. b.on("complete", this._handleManifestComplete, this, !0),
  5594. b.on("fileload", this._handleManifestFileLoad, this),
  5595. b.on("progress", this._handleManifestProgress, this),
  5596. b.on("error", this._handleManifestError, this, !0),
  5597. b.loadManifest(a.images)
  5598. }
  5599. },
  5600. b._handleManifestFileLoad = function(a) {
  5601. var b = a.result;
  5602. if (null != b) {
  5603. var c = this.getResult().images,
  5604. d = c.indexOf(a.item.src);
  5605. c[d] = b
  5606. }
  5607. },
  5608. b._handleManifestComplete = function(a) {
  5609. this._result = new createjs.SpriteSheet(this._result),
  5610. this._loadedItems = this._manifestQueue.getItems(!0),
  5611. this._sendComplete()
  5612. },
  5613. b._handleManifestProgress = function(a) {
  5614. this.progress = a.progress * (1 - c.SPRITESHEET_PROGRESS) + c.SPRITESHEET_PROGRESS,
  5615. this._sendProgress(this.progress)
  5616. },
  5617. b._handleManifestError = function(a) {
  5618. var b = new createjs.Event("fileerror");
  5619. b.item = a.data,
  5620. this.dispatchEvent(b)
  5621. },
  5622. createjs.SpriteSheetLoader = createjs.promote(a, "AbstractLoader")
  5623. } (),
  5624. this.createjs = this.createjs || {},
  5625. function() {
  5626. "use strict";
  5627. function a(a, b) {
  5628. this.AbstractLoader_constructor(a, b, createjs.AbstractLoader.SVG),
  5629. this.resultFormatter = this._formatResult,
  5630. this._tagSrcAttribute = "data",
  5631. b ? this.setTag(document.createElement("svg")) : (this.setTag(document.createElement("object")), this.getTag().type = "image/svg+xml")
  5632. }
  5633. var b = createjs.extend(a, createjs.AbstractLoader),
  5634. c = a;
  5635. c.canLoadItem = function(a) {
  5636. return a.type == createjs.AbstractLoader.SVG
  5637. },
  5638. b._formatResult = function(a) {
  5639. var b = createjs.DataUtils.parseXML(a.getResult(!0), "text/xml"),
  5640. c = a.getTag();
  5641. return ! this._preferXHR && document.body.contains(c) && document.body.removeChild(c),
  5642. null != b.documentElement ? (c.appendChild(b.documentElement), c.style.visibility = "visible", c) : b
  5643. },
  5644. createjs.SVGLoader = createjs.promote(a, "AbstractLoader")
  5645. } (),
  5646. this.createjs = this.createjs || {},
  5647. function() {
  5648. "use strict";
  5649. function a(a) {
  5650. this.AbstractLoader_constructor(a, !0, createjs.AbstractLoader.XML),
  5651. this.resultFormatter = this._formatResult
  5652. }
  5653. var b = createjs.extend(a, createjs.AbstractLoader),
  5654. c = a;
  5655. c.canLoadItem = function(a) {
  5656. return a.type == createjs.AbstractLoader.XML
  5657. },
  5658. b._formatResult = function(a) {
  5659. return createjs.DataUtils.parseXML(a.getResult(!0), "text/xml")
  5660. },
  5661. createjs.XMLLoader = createjs.promote(a, "AbstractLoader")
  5662. } (),
  5663. this.createjs = this.createjs || {},
  5664. function() {
  5665. var a = createjs.SoundJS = createjs.SoundJS || {};
  5666. a.version = "0.6.2",
  5667. a.buildDate = "Thu, 26 Nov 2015 20:44:31 GMT"
  5668. } (),
  5669. this.createjs = this.createjs || {},
  5670. createjs.indexOf = function(a, b) {
  5671. "use strict";
  5672. for (var c = 0,
  5673. d = a.length; d > c; c++) if (b === a[c]) return c;
  5674. return - 1
  5675. },
  5676. this.createjs = this.createjs || {},
  5677. function() {
  5678. "use strict";
  5679. createjs.proxy = function(a, b) {
  5680. var c = Array.prototype.slice.call(arguments, 2);
  5681. return function() {
  5682. return a.apply(b, Array.prototype.slice.call(arguments, 0).concat(c))
  5683. }
  5684. }
  5685. } (),
  5686. this.createjs = this.createjs || {},
  5687. function() {
  5688. "use strict";
  5689. function a() {
  5690. throw "BrowserDetect cannot be instantiated"
  5691. }
  5692. var b = a.agent = window.navigator.userAgent;
  5693. a.isWindowPhone = b.indexOf("IEMobile") > -1 || b.indexOf("Windows Phone") > -1,
  5694. a.isFirefox = b.indexOf("Firefox") > -1,
  5695. a.isOpera = null != window.opera,
  5696. a.isChrome = b.indexOf("Chrome") > -1,
  5697. a.isIOS = (b.indexOf("iPod") > -1 || b.indexOf("iPhone") > -1 || b.indexOf("iPad") > -1) && !a.isWindowPhone,
  5698. a.isAndroid = b.indexOf("Android") > -1 && !a.isWindowPhone,
  5699. a.isBlackberry = b.indexOf("Blackberry") > -1,
  5700. createjs.BrowserDetect = a
  5701. } (),
  5702. this.createjs = this.createjs || {},
  5703. function() {
  5704. "use strict";
  5705. var a = function() {
  5706. this.interrupt = null,
  5707. this.delay = null,
  5708. this.offset = null,
  5709. this.loop = null,
  5710. this.volume = null,
  5711. this.pan = null,
  5712. this.startTime = null,
  5713. this.duration = null
  5714. },
  5715. b = a.prototype = {},
  5716. c = a;
  5717. c.create = function(a) {
  5718. if (a instanceof c || a instanceof Object) {
  5719. var b = new createjs.PlayPropsConfig;
  5720. return b.set(a),
  5721. b
  5722. }
  5723. throw new Error("Type not recognized.")
  5724. },
  5725. b.set = function(a) {
  5726. for (var b in a) this[b] = a[b];
  5727. return this
  5728. },
  5729. b.toString = function() {
  5730. return "[PlayPropsConfig]"
  5731. },
  5732. createjs.PlayPropsConfig = c
  5733. } (),
  5734. this.createjs = this.createjs || {},
  5735. function() {
  5736. "use strict";
  5737. function a() {
  5738. throw "Sound cannot be instantiated"
  5739. }
  5740. function b(a, b) {
  5741. this.init(a, b)
  5742. }
  5743. var c = a;
  5744. c.INTERRUPT_ANY = "any",
  5745. c.INTERRUPT_EARLY = "early",
  5746. c.INTERRUPT_LATE = "late",
  5747. c.INTERRUPT_NONE = "none",
  5748. c.PLAY_INITED = "playInited",
  5749. c.PLAY_SUCCEEDED = "playSucceeded",
  5750. c.PLAY_INTERRUPTED = "playInterrupted",
  5751. c.PLAY_FINISHED = "playFinished",
  5752. c.PLAY_FAILED = "playFailed",
  5753. c.SUPPORTED_EXTENSIONS = ["mp3", "ogg", "opus", "mpeg", "wav", "m4a", "mp4", "aiff", "wma", "mid"],
  5754. c.EXTENSION_MAP = {
  5755. m4a: "mp4"
  5756. },
  5757. c.FILE_PATTERN = /^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([\/.]*?(?:[^?]+)?\/)?((?:[^\/?]+)\.(\w+))(?:\?(\S+)?)?$/,
  5758. c.defaultInterruptBehavior = c.INTERRUPT_NONE,
  5759. c.alternateExtensions = [],
  5760. c.activePlugin = null,
  5761. c._masterVolume = 1,
  5762. Object.defineProperty(c, "volume", {
  5763. get: function() {
  5764. return this._masterVolume
  5765. },
  5766. set: function(a) {
  5767. if (null == Number(a)) return ! 1;
  5768. if (a = Math.max(0, Math.min(1, a)), c._masterVolume = a, !this.activePlugin || !this.activePlugin.setVolume || !this.activePlugin.setVolume(a)) for (var b = this._instances,
  5769. d = 0,
  5770. e = b.length; e > d; d++) b[d].setMasterVolume(a)
  5771. }
  5772. }),
  5773. c._masterMute = !1,
  5774. Object.defineProperty(c, "muted", {
  5775. get: function() {
  5776. return this._masterMute
  5777. },
  5778. set: function(a) {
  5779. if (null == a) return ! 1;
  5780. if (this._masterMute = a, !this.activePlugin || !this.activePlugin.setMute || !this.activePlugin.setMute(a)) for (var b = this._instances,
  5781. c = 0,
  5782. d = b.length; d > c; c++) b[c].setMasterMute(a);
  5783. return ! 0
  5784. }
  5785. }),
  5786. Object.defineProperty(c, "capabilities", {
  5787. get: function() {
  5788. return null == c.activePlugin ? null: c.activePlugin._capabilities
  5789. },
  5790. set: function(a) {
  5791. return ! 1
  5792. }
  5793. }),
  5794. c._pluginsRegistered = !1,
  5795. c._lastID = 0,
  5796. c._instances = [],
  5797. c._idHash = {},
  5798. c._preloadHash = {},
  5799. c._defaultPlayPropsHash = {},
  5800. c.addEventListener = null,
  5801. c.removeEventListener = null,
  5802. c.removeAllEventListeners = null,
  5803. c.dispatchEvent = null,
  5804. c.hasEventListener = null,
  5805. c._listeners = null,
  5806. createjs.EventDispatcher.initialize(c),
  5807. c.getPreloadHandlers = function() {
  5808. return {
  5809. callback: createjs.proxy(c.initLoad, c),
  5810. types: ["sound"],
  5811. extensions: c.SUPPORTED_EXTENSIONS
  5812. }
  5813. },
  5814. c._handleLoadComplete = function(a) {
  5815. var b = a.target.getItem().src;
  5816. if (c._preloadHash[b]) for (var d = 0,
  5817. e = c._preloadHash[b].length; e > d; d++) {
  5818. var f = c._preloadHash[b][d];
  5819. if (c._preloadHash[b][d] = !0, c.hasEventListener("fileload")) {
  5820. var a = new createjs.Event("fileload");
  5821. a.src = f.src,
  5822. a.id = f.id,
  5823. a.data = f.data,
  5824. a.sprite = f.sprite,
  5825. c.dispatchEvent(a)
  5826. }
  5827. }
  5828. },
  5829. c._handleLoadError = function(a) {
  5830. var b = a.target.getItem().src;
  5831. if (c._preloadHash[b]) for (var d = 0,
  5832. e = c._preloadHash[b].length; e > d; d++) {
  5833. var f = c._preloadHash[b][d];
  5834. if (c._preloadHash[b][d] = !1, c.hasEventListener("fileerror")) {
  5835. var a = new createjs.Event("fileerror");
  5836. a.src = f.src,
  5837. a.id = f.id,
  5838. a.data = f.data,
  5839. a.sprite = f.sprite,
  5840. c.dispatchEvent(a)
  5841. }
  5842. }
  5843. },
  5844. c._registerPlugin = function(a) {
  5845. return a.isSupported() ? (c.activePlugin = new a, !0) : !1
  5846. },
  5847. c.registerPlugins = function(a) {
  5848. c._pluginsRegistered = !0;
  5849. for (var b = 0,
  5850. d = a.length; d > b; b++) if (c._registerPlugin(a[b])) return ! 0;
  5851. return ! 1
  5852. },
  5853. c.initializeDefaultPlugins = function() {
  5854. return null != c.activePlugin ? !0 : c._pluginsRegistered ? !1 : c.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin]) ? !0 : !1
  5855. },
  5856. c.isReady = function() {
  5857. return null != c.activePlugin
  5858. },
  5859. c.getCapabilities = function() {
  5860. return null == c.activePlugin ? null: c.activePlugin._capabilities
  5861. },
  5862. c.getCapability = function(a) {
  5863. return null == c.activePlugin ? null: c.activePlugin._capabilities[a]
  5864. },
  5865. c.initLoad = function(a) {
  5866. return c._registerSound(a)
  5867. },
  5868. c._registerSound = function(a) {
  5869. if (!c.initializeDefaultPlugins()) return ! 1;
  5870. var d;
  5871. if (a.src instanceof Object ? (d = c._parseSrc(a.src), d.src = a.path + d.src) : d = c._parsePath(a.src), null == d) return ! 1;
  5872. a.src = d.src,
  5873. a.type = "sound";
  5874. var e = a.data,
  5875. f = null;
  5876. if (null != e && (isNaN(e.channels) ? isNaN(e) || (f = parseInt(e)) : f = parseInt(e.channels), e.audioSprite)) for (var g, h = e.audioSprite.length; h--;) g = e.audioSprite[h],
  5877. c._idHash[g.id] = {
  5878. src: a.src,
  5879. startTime: parseInt(g.startTime),
  5880. duration: parseInt(g.duration)
  5881. },
  5882. g.defaultPlayProps && (c._defaultPlayPropsHash[g.id] = createjs.PlayPropsConfig.create(g.defaultPlayProps));
  5883. null != a.id && (c._idHash[a.id] = {
  5884. src: a.src
  5885. });
  5886. var i = c.activePlugin.register(a);
  5887. return b.create(a.src, f),
  5888. null != e && isNaN(e) ? a.data.channels = f || b.maxPerChannel() : a.data = f || b.maxPerChannel(),
  5889. i.type && (a.type = i.type),
  5890. a.defaultPlayProps && (c._defaultPlayPropsHash[a.src] = createjs.PlayPropsConfig.create(a.defaultPlayProps)),
  5891. i
  5892. },
  5893. c.registerSound = function(a, b, d, e, f) {
  5894. var g = {
  5895. src: a,
  5896. id: b,
  5897. data: d,
  5898. defaultPlayProps: f
  5899. };
  5900. a instanceof Object && a.src && (e = b, g = a),
  5901. g = createjs.LoadItem.create(g),
  5902. g.path = e,
  5903. null == e || g.src instanceof Object || (g.src = e + a);
  5904. var h = c._registerSound(g);
  5905. if (!h) return ! 1;
  5906. if (c._preloadHash[g.src] || (c._preloadHash[g.src] = []), c._preloadHash[g.src].push(g), 1 == c._preloadHash[g.src].length) h.on("complete", createjs.proxy(this._handleLoadComplete, this)),
  5907. h.on("error", createjs.proxy(this._handleLoadError, this)),
  5908. c.activePlugin.preload(h);
  5909. else if (1 == c._preloadHash[g.src][0]) return ! 0;
  5910. return g
  5911. },
  5912. c.registerSounds = function(a, b) {
  5913. var c = [];
  5914. a.path && (b ? b += a.path: b = a.path, a = a.manifest);
  5915. for (var d = 0,
  5916. e = a.length; e > d; d++) c[d] = createjs.Sound.registerSound(a[d].src, a[d].id, a[d].data, b, a[d].defaultPlayProps);
  5917. return c
  5918. },
  5919. c.removeSound = function(a, d) {
  5920. if (null == c.activePlugin) return ! 1;
  5921. a instanceof Object && a.src && (a = a.src);
  5922. var e;
  5923. if (a instanceof Object ? e = c._parseSrc(a) : (a = c._getSrcById(a).src, e = c._parsePath(a)), null == e) return ! 1;
  5924. a = e.src,
  5925. null != d && (a = d + a);
  5926. for (var f in c._idHash) c._idHash[f].src == a && delete c._idHash[f];
  5927. return b.removeSrc(a),
  5928. delete c._preloadHash[a],
  5929. c.activePlugin.removeSound(a),
  5930. !0
  5931. },
  5932. c.removeSounds = function(a, b) {
  5933. var c = [];
  5934. a.path && (b ? b += a.path: b = a.path, a = a.manifest);
  5935. for (var d = 0,
  5936. e = a.length; e > d; d++) c[d] = createjs.Sound.removeSound(a[d].src, b);
  5937. return c
  5938. },
  5939. c.removeAllSounds = function() {
  5940. c._idHash = {},
  5941. c._preloadHash = {},
  5942. b.removeAll(),
  5943. c.activePlugin && c.activePlugin.removeAllSounds()
  5944. },
  5945. c.loadComplete = function(a) {
  5946. if (!c.isReady()) return ! 1;
  5947. var b = c._parsePath(a);
  5948. return a = b ? c._getSrcById(b.src).src: c._getSrcById(a).src,
  5949. void 0 == c._preloadHash[a] ? !1 : 1 == c._preloadHash[a][0]
  5950. },
  5951. c._parsePath = function(a) {
  5952. "string" != typeof a && (a = a.toString());
  5953. var b = a.match(c.FILE_PATTERN);
  5954. if (null == b) return ! 1;
  5955. for (var d = b[4], e = b[5], f = c.capabilities, g = 0; ! f[e];) if (e = c.alternateExtensions[g++], g > c.alternateExtensions.length) return null;
  5956. a = a.replace("." + b[5], "." + e);
  5957. var h = {
  5958. name: d,
  5959. src: a,
  5960. extension: e
  5961. };
  5962. return h
  5963. },
  5964. c._parseSrc = function(a) {
  5965. var b = {
  5966. name: void 0,
  5967. src: void 0,
  5968. extension: void 0
  5969. },
  5970. d = c.capabilities;
  5971. for (var e in a) if (a.hasOwnProperty(e) && d[e]) {
  5972. b.src = a[e],
  5973. b.extension = e;
  5974. break
  5975. }
  5976. if (!b.src) return ! 1;
  5977. var f = b.src.lastIndexOf("/");
  5978. return - 1 != f ? b.name = b.src.slice(f + 1) : b.name = b.src,
  5979. b
  5980. },
  5981. c.play = function(a, b, d, e, f, g, h, i, j) {
  5982. var k;
  5983. k = b instanceof Object || b instanceof createjs.PlayPropsConfig ? createjs.PlayPropsConfig.create(b) : createjs.PlayPropsConfig.create({
  5984. interrupt: b,
  5985. delay: d,
  5986. offset: e,
  5987. loop: f,
  5988. volume: g,
  5989. pan: h,
  5990. startTime: i,
  5991. duration: j
  5992. });
  5993. var l = c.createInstance(a, k.startTime, k.duration),
  5994. m = c._playInstance(l, k);
  5995. return m || l._playFailed(),
  5996. l
  5997. },
  5998. c.createInstance = function(a, d, e) {
  5999. if (!c.initializeDefaultPlugins()) return new createjs.DefaultSoundInstance(a, d, e);
  6000. var f = c._defaultPlayPropsHash[a];
  6001. a = c._getSrcById(a);
  6002. var g = c._parsePath(a.src),
  6003. h = null;
  6004. return null != g && null != g.src ? (b.create(g.src), null == d && (d = a.startTime), h = c.activePlugin.create(g.src, d, e || a.duration), f = f || c._defaultPlayPropsHash[g.src], f && h.applyPlayProps(f)) : h = new createjs.DefaultSoundInstance(a, d, e),
  6005. h.uniqueId = c._lastID++,
  6006. h
  6007. },
  6008. c.stop = function() {
  6009. for (var a = this._instances,
  6010. b = a.length; b--;) a[b].stop()
  6011. },
  6012. c.setVolume = function(a) {
  6013. if (null == Number(a)) return ! 1;
  6014. if (a = Math.max(0, Math.min(1, a)), c._masterVolume = a, !this.activePlugin || !this.activePlugin.setVolume || !this.activePlugin.setVolume(a)) for (var b = this._instances,
  6015. d = 0,
  6016. e = b.length; e > d; d++) b[d].setMasterVolume(a)
  6017. },
  6018. c.getVolume = function() {
  6019. return this._masterVolume
  6020. },
  6021. c.setMute = function(a) {
  6022. if (null == a) return ! 1;
  6023. if (this._masterMute = a, !this.activePlugin || !this.activePlugin.setMute || !this.activePlugin.setMute(a)) for (var b = this._instances,
  6024. c = 0,
  6025. d = b.length; d > c; c++) b[c].setMasterMute(a);
  6026. return ! 0
  6027. },
  6028. c.getMute = function() {
  6029. return this._masterMute
  6030. },
  6031. c.setDefaultPlayProps = function(a, b) {
  6032. a = c._getSrcById(a),
  6033. c._defaultPlayPropsHash[c._parsePath(a.src).src] = createjs.PlayPropsConfig.create(b)
  6034. },
  6035. c.getDefaultPlayProps = function(a) {
  6036. return a = c._getSrcById(a),
  6037. c._defaultPlayPropsHash[c._parsePath(a.src).src]
  6038. },
  6039. c._playInstance = function(a, b) {
  6040. var d = c._defaultPlayPropsHash[a.src] || {};
  6041. if (null == b.interrupt && (b.interrupt = d.interrupt || c.defaultInterruptBehavior), null == b.delay && (b.delay = d.delay || 0), null == b.offset && (b.offset = a.getPosition()), null == b.loop && (b.loop = a.loop), null == b.volume && (b.volume = a.volume), null == b.pan && (b.pan = a.pan), 0 == b.delay) {
  6042. var e = c._beginPlaying(a, b);
  6043. if (!e) return ! 1
  6044. } else {
  6045. var f = setTimeout(function() {
  6046. c._beginPlaying(a, b)
  6047. },
  6048. b.delay);
  6049. a.delayTimeoutId = f
  6050. }
  6051. return this._instances.push(a),
  6052. !0
  6053. },
  6054. c._beginPlaying = function(a, c) {
  6055. if (!b.add(a, c.interrupt)) return ! 1;
  6056. var d = a._beginPlaying(c);
  6057. if (!d) {
  6058. var e = createjs.indexOf(this._instances, a);
  6059. return e > -1 && this._instances.splice(e, 1),
  6060. !1
  6061. }
  6062. return ! 0
  6063. },
  6064. c._getSrcById = function(a) {
  6065. return c._idHash[a] || {
  6066. src: a
  6067. }
  6068. },
  6069. c._playFinished = function(a) {
  6070. b.remove(a);
  6071. var c = createjs.indexOf(this._instances, a);
  6072. c > -1 && this._instances.splice(c, 1)
  6073. },
  6074. createjs.Sound = a,
  6075. b.channels = {},
  6076. b.create = function(a, c) {
  6077. var d = b.get(a);
  6078. return null == d ? (b.channels[a] = new b(a, c), !0) : !1
  6079. },
  6080. b.removeSrc = function(a) {
  6081. var c = b.get(a);
  6082. return null == c ? !1 : (c._removeAll(), delete b.channels[a], !0)
  6083. },
  6084. b.removeAll = function() {
  6085. for (var a in b.channels) b.channels[a]._removeAll();
  6086. b.channels = {}
  6087. },
  6088. b.add = function(a, c) {
  6089. var d = b.get(a.src);
  6090. return null == d ? !1 : d._add(a, c)
  6091. },
  6092. b.remove = function(a) {
  6093. var c = b.get(a.src);
  6094. return null == c ? !1 : (c._remove(a), !0)
  6095. },
  6096. b.maxPerChannel = function() {
  6097. return d.maxDefault
  6098. },
  6099. b.get = function(a) {
  6100. return b.channels[a]
  6101. };
  6102. var d = b.prototype;
  6103. d.constructor = b,
  6104. d.src = null,
  6105. d.max = null,
  6106. d.maxDefault = 100,
  6107. d.length = 0,
  6108. d.init = function(a, b) {
  6109. this.src = a,
  6110. this.max = b || this.maxDefault,
  6111. -1 == this.max && (this.max = this.maxDefault),
  6112. this._instances = []
  6113. },
  6114. d._get = function(a) {
  6115. return this._instances[a]
  6116. },
  6117. d._add = function(a, b) {
  6118. return this._getSlot(b, a) ? (this._instances.push(a), this.length++, !0) : !1
  6119. },
  6120. d._remove = function(a) {
  6121. var b = createjs.indexOf(this._instances, a);
  6122. return - 1 == b ? !1 : (this._instances.splice(b, 1), this.length--, !0)
  6123. },
  6124. d._removeAll = function() {
  6125. for (var a = this.length - 1; a >= 0; a--) this._instances[a].stop()
  6126. },
  6127. d._getSlot = function(b, c) {
  6128. var d, e;
  6129. if (b != a.INTERRUPT_NONE && (e = this._get(0), null == e)) return ! 0;
  6130. for (var f = 0,
  6131. g = this.max; g > f; f++) {
  6132. if (d = this._get(f), null == d) return ! 0;
  6133. if (d.playState == a.PLAY_FINISHED || d.playState == a.PLAY_INTERRUPTED || d.playState == a.PLAY_FAILED) {
  6134. e = d;
  6135. break
  6136. }
  6137. b != a.INTERRUPT_NONE && (b == a.INTERRUPT_EARLY && d.getPosition() < e.getPosition() || b == a.INTERRUPT_LATE && d.getPosition() > e.getPosition()) && (e = d)
  6138. }
  6139. return null != e ? (e._interrupt(), this._remove(e), !0) : !1
  6140. },
  6141. d.toString = function() {
  6142. return "[Sound SoundChannel]"
  6143. }
  6144. } (),
  6145. this.createjs = this.createjs || {},
  6146. function() {
  6147. "use strict";
  6148. var a = function(a, b, c, d) {
  6149. this.EventDispatcher_constructor(),
  6150. this.src = a,
  6151. this.uniqueId = -1,
  6152. this.playState = null,
  6153. this.delayTimeoutId = null,
  6154. this._volume = 1,
  6155. Object.defineProperty(this, "volume", {
  6156. get: this.getVolume,
  6157. set: this.setVolume
  6158. }),
  6159. this._pan = 0,
  6160. Object.defineProperty(this, "pan", {
  6161. get: this.getPan,
  6162. set: this.setPan
  6163. }),
  6164. this._startTime = Math.max(0, b || 0),
  6165. Object.defineProperty(this, "startTime", {
  6166. get: this.getStartTime,
  6167. set: this.setStartTime
  6168. }),
  6169. this._duration = Math.max(0, c || 0),
  6170. Object.defineProperty(this, "duration", {
  6171. get: this.getDuration,
  6172. set: this.setDuration
  6173. }),
  6174. this._playbackResource = null,
  6175. Object.defineProperty(this, "playbackResource", {
  6176. get: this.getPlaybackResource,
  6177. set: this.setPlaybackResource
  6178. }),
  6179. d !== !1 && d !== !0 && this.setPlaybackResource(d),
  6180. this._position = 0,
  6181. Object.defineProperty(this, "position", {
  6182. get: this.getPosition,
  6183. set: this.setPosition
  6184. }),
  6185. this._loop = 0,
  6186. Object.defineProperty(this, "loop", {
  6187. get: this.getLoop,
  6188. set: this.setLoop
  6189. }),
  6190. this._muted = !1,
  6191. Object.defineProperty(this, "muted", {
  6192. get: this.getMuted,
  6193. set: this.setMuted
  6194. }),
  6195. this._paused = !1,
  6196. Object.defineProperty(this, "paused", {
  6197. get: this.getPaused,
  6198. set: this.setPaused
  6199. })
  6200. },
  6201. b = createjs.extend(a, createjs.EventDispatcher);
  6202. b.play = function(a, b, c, d, e, f) {
  6203. var g;
  6204. return g = a instanceof Object || a instanceof createjs.PlayPropsConfig ? createjs.PlayPropsConfig.create(a) : createjs.PlayPropsConfig.create({
  6205. interrupt: a,
  6206. delay: b,
  6207. offset: c,
  6208. loop: d,
  6209. volume: e,
  6210. pan: f
  6211. }),
  6212. this.playState == createjs.Sound.PLAY_SUCCEEDED ? (this.applyPlayProps(g), void(this._paused && this.setPaused(!1))) : (this._cleanUp(), createjs.Sound._playInstance(this, g), this)
  6213. },
  6214. b.stop = function() {
  6215. return this._position = 0,
  6216. this._paused = !1,
  6217. this._handleStop(),
  6218. this._cleanUp(),
  6219. this.playState = createjs.Sound.PLAY_FINISHED,
  6220. this
  6221. },
  6222. b.destroy = function() {
  6223. this._cleanUp(),
  6224. this.src = null,
  6225. this.playbackResource = null,
  6226. this.removeAllEventListeners()
  6227. },
  6228. b.applyPlayProps = function(a) {
  6229. return null != a.offset && this.setPosition(a.offset),
  6230. null != a.loop && this.setLoop(a.loop),
  6231. null != a.volume && this.setVolume(a.volume),
  6232. null != a.pan && this.setPan(a.pan),
  6233. null != a.startTime && (this.setStartTime(a.startTime), this.setDuration(a.duration)),
  6234. this
  6235. },
  6236. b.toString = function() {
  6237. return "[AbstractSoundInstance]"
  6238. },
  6239. b.getPaused = function() {
  6240. return this._paused
  6241. },
  6242. b.setPaused = function(a) {
  6243. return a !== !0 && a !== !1 || this._paused == a || 1 == a && this.playState != createjs.Sound.PLAY_SUCCEEDED ? void 0 : (this._paused = a, a ? this._pause() : this._resume(), clearTimeout(this.delayTimeoutId), this)
  6244. },
  6245. b.setVolume = function(a) {
  6246. return a == this._volume ? this: (this._volume = Math.max(0, Math.min(1, a)), this._muted || this._updateVolume(), this)
  6247. },
  6248. b.getVolume = function() {
  6249. return this._volume
  6250. },
  6251. b.setMuted = function(a) {
  6252. return a === !0 || a === !1 ? (this._muted = a, this._updateVolume(), this) : void 0
  6253. },
  6254. b.getMuted = function() {
  6255. return this._muted
  6256. },
  6257. b.setPan = function(a) {
  6258. return a == this._pan ? this: (this._pan = Math.max( - 1, Math.min(1, a)), this._updatePan(), this)
  6259. },
  6260. b.getPan = function() {
  6261. return this._pan
  6262. },
  6263. b.getPosition = function() {
  6264. return this._paused || this.playState != createjs.Sound.PLAY_SUCCEEDED || (this._position = this._calculateCurrentPosition()),
  6265. this._position
  6266. },
  6267. b.setPosition = function(a) {
  6268. return this._position = Math.max(0, a),
  6269. this.playState == createjs.Sound.PLAY_SUCCEEDED && this._updatePosition(),
  6270. this
  6271. },
  6272. b.getStartTime = function() {
  6273. return this._startTime
  6274. },
  6275. b.setStartTime = function(a) {
  6276. return a == this._startTime ? this: (this._startTime = Math.max(0, a || 0), this._updateStartTime(), this)
  6277. },
  6278. b.getDuration = function() {
  6279. return this._duration
  6280. },
  6281. b.setDuration = function(a) {
  6282. return a == this._duration ? this: (this._duration = Math.max(0, a || 0), this._updateDuration(), this)
  6283. },
  6284. b.setPlaybackResource = function(a) {
  6285. return this._playbackResource = a,
  6286. 0 == this._duration && this._setDurationFromSource(),
  6287. this
  6288. },
  6289. b.getPlaybackResource = function() {
  6290. return this._playbackResource
  6291. },
  6292. b.getLoop = function() {
  6293. return this._loop
  6294. },
  6295. b.setLoop = function(a) {
  6296. null != this._playbackResource && (0 != this._loop && 0 == a ? this._removeLooping(a) : 0 == this._loop && 0 != a && this._addLooping(a)),
  6297. this._loop = a
  6298. },
  6299. b._sendEvent = function(a) {
  6300. var b = new createjs.Event(a);
  6301. this.dispatchEvent(b)
  6302. },
  6303. b._cleanUp = function() {
  6304. clearTimeout(this.delayTimeoutId),
  6305. this._handleCleanUp(),
  6306. this._paused = !1,
  6307. createjs.Sound._playFinished(this)
  6308. },
  6309. b._interrupt = function() {
  6310. this._cleanUp(),
  6311. this.playState = createjs.Sound.PLAY_INTERRUPTED,
  6312. this._sendEvent("interrupted")
  6313. },
  6314. b._beginPlaying = function(a) {
  6315. return this.setPosition(a.offset),
  6316. this.setLoop(a.loop),
  6317. this.setVolume(a.volume),
  6318. this.setPan(a.pan),
  6319. null != a.startTime && (this.setStartTime(a.startTime), this.setDuration(a.duration)),
  6320. null != this._playbackResource && this._position < this._duration ? (this._paused = !1, this._handleSoundReady(), this.playState = createjs.Sound.PLAY_SUCCEEDED, this._sendEvent("succeeded"), !0) : (this._playFailed(), !1)
  6321. },
  6322. b._playFailed = function() {
  6323. this._cleanUp(),
  6324. this.playState = createjs.Sound.PLAY_FAILED,
  6325. this._sendEvent("failed")
  6326. },
  6327. b._handleSoundComplete = function(a) {
  6328. return this._position = 0,
  6329. 0 != this._loop ? (this._loop--, this._handleLoop(), void this._sendEvent("loop")) : (this._cleanUp(), this.playState = createjs.Sound.PLAY_FINISHED, void this._sendEvent("complete"))
  6330. },
  6331. b._handleSoundReady = function() {},
  6332. b._updateVolume = function() {},
  6333. b._updatePan = function() {},
  6334. b._updateStartTime = function() {},
  6335. b._updateDuration = function() {},
  6336. b._setDurationFromSource = function() {},
  6337. b._calculateCurrentPosition = function() {},
  6338. b._updatePosition = function() {},
  6339. b._removeLooping = function(a) {},
  6340. b._addLooping = function(a) {},
  6341. b._pause = function() {},
  6342. b._resume = function() {},
  6343. b._handleStop = function() {},
  6344. b._handleCleanUp = function() {},
  6345. b._handleLoop = function() {},
  6346. createjs.AbstractSoundInstance = createjs.promote(a, "EventDispatcher"),
  6347. createjs.DefaultSoundInstance = createjs.AbstractSoundInstance
  6348. } (),
  6349. this.createjs = this.createjs || {},
  6350. function() {
  6351. "use strict";
  6352. var a = function() {
  6353. this._capabilities = null,
  6354. this._loaders = {},
  6355. this._audioSources = {},
  6356. this._soundInstances = {},
  6357. this._volume = 1,
  6358. this._loaderClass,
  6359. this._soundInstanceClass
  6360. },
  6361. b = a.prototype;
  6362. a._capabilities = null,
  6363. a.isSupported = function() {
  6364. return ! 0
  6365. },
  6366. b.register = function(a) {
  6367. var b = this._loaders[a.src];
  6368. return b && !b.canceled ? this._loaders[a.src] : (this._audioSources[a.src] = !0, this._soundInstances[a.src] = [], b = new this._loaderClass(a), b.on("complete", this._handlePreloadComplete, this), this._loaders[a.src] = b, b)
  6369. },
  6370. b.preload = function(a) {
  6371. a.on("error", this._handlePreloadError, this),
  6372. a.load()
  6373. },
  6374. b.isPreloadStarted = function(a) {
  6375. return null != this._audioSources[a]
  6376. },
  6377. b.isPreloadComplete = function(a) {
  6378. return ! (null == this._audioSources[a] || 1 == this._audioSources[a])
  6379. },
  6380. b.removeSound = function(a) {
  6381. if (this._soundInstances[a]) {
  6382. for (var b = this._soundInstances[a].length; b--;) {
  6383. var c = this._soundInstances[a][b];
  6384. c.destroy()
  6385. }
  6386. delete this._soundInstances[a],
  6387. delete this._audioSources[a],
  6388. this._loaders[a] && this._loaders[a].destroy(),
  6389. delete this._loaders[a]
  6390. }
  6391. },
  6392. b.removeAllSounds = function() {
  6393. for (var a in this._audioSources) this.removeSound(a)
  6394. },
  6395. b.create = function(a, b, c) {
  6396. this.isPreloadStarted(a) || this.preload(this.register(a));
  6397. var d = new this._soundInstanceClass(a, b, c, this._audioSources[a]);
  6398. return this._soundInstances[a].push(d),
  6399. d
  6400. },
  6401. b.setVolume = function(a) {
  6402. return this._volume = a,
  6403. this._updateVolume(),
  6404. !0
  6405. },
  6406. b.getVolume = function() {
  6407. return this._volume
  6408. },
  6409. b.setMute = function(a) {
  6410. return this._updateVolume(),
  6411. !0
  6412. },
  6413. b.toString = function() {
  6414. return "[AbstractPlugin]"
  6415. },
  6416. b._handlePreloadComplete = function(a) {
  6417. var b = a.target.getItem().src;
  6418. this._audioSources[b] = a.result;
  6419. for (var c = 0,
  6420. d = this._soundInstances[b].length; d > c; c++) {
  6421. var e = this._soundInstances[b][c];
  6422. e.setPlaybackResource(this._audioSources[b]);
  6423. }
  6424. },
  6425. b._handlePreloadError = function(a) {},
  6426. b._updateVolume = function() {},
  6427. createjs.AbstractPlugin = a
  6428. } (),
  6429. this.createjs = this.createjs || {},
  6430. function() {
  6431. "use strict";
  6432. function a(a) {
  6433. this.AbstractLoader_constructor(a, !0, createjs.AbstractLoader.SOUND)
  6434. }
  6435. var b = createjs.extend(a, createjs.AbstractLoader);
  6436. a.context = null,
  6437. b.toString = function() {
  6438. return "[WebAudioLoader]"
  6439. },
  6440. b._createRequest = function() {
  6441. this._request = new createjs.XHRRequest(this._item, !1),
  6442. this._request.setResponseType("arraybuffer")
  6443. },
  6444. b._sendComplete = function(b) {
  6445. a.context.decodeAudioData(this._rawResult, createjs.proxy(this._handleAudioDecoded, this), createjs.proxy(this._sendError, this))
  6446. },
  6447. b._handleAudioDecoded = function(a) {
  6448. this._result = a,
  6449. this.AbstractLoader__sendComplete()
  6450. },
  6451. createjs.WebAudioLoader = createjs.promote(a, "AbstractLoader")
  6452. } (),
  6453. this.createjs = this.createjs || {},
  6454. function() {
  6455. "use strict";
  6456. function a(a, b, d, e) {
  6457. this.AbstractSoundInstance_constructor(a, b, d, e),
  6458. this.gainNode = c.context.createGain(),
  6459. this.panNode = c.context.createPanner(),
  6460. this.panNode.panningModel = c._panningModel,
  6461. this.panNode.connect(this.gainNode),
  6462. this._updatePan(),
  6463. this.sourceNode = null,
  6464. this._soundCompleteTimeout = null,
  6465. this._sourceNodeNext = null,
  6466. this._playbackStartTime = 0,
  6467. this._endedHandler = createjs.proxy(this._handleSoundComplete, this)
  6468. }
  6469. var b = createjs.extend(a, createjs.AbstractSoundInstance),
  6470. c = a;
  6471. c.context = null,
  6472. c._scratchBuffer = null,
  6473. c.destinationNode = null,
  6474. c._panningModel = "equalpower",
  6475. b.destroy = function() {
  6476. this.AbstractSoundInstance_destroy(),
  6477. this.panNode.disconnect(0),
  6478. this.panNode = null,
  6479. this.gainNode.disconnect(0),
  6480. this.gainNode = null
  6481. },
  6482. b.toString = function() {
  6483. return "[WebAudioSoundInstance]"
  6484. },
  6485. b._updatePan = function() {
  6486. this.panNode.setPosition(this._pan, 0, -.5)
  6487. },
  6488. b._removeLooping = function(a) {
  6489. this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext)
  6490. },
  6491. b._addLooping = function(a) {
  6492. this.playState == createjs.Sound.PLAY_SUCCEEDED && (this._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0))
  6493. },
  6494. b._setDurationFromSource = function() {
  6495. this._duration = 1e3 * this.playbackResource.duration
  6496. },
  6497. b._handleCleanUp = function() {
  6498. this.sourceNode && this.playState == createjs.Sound.PLAY_SUCCEEDED && (this.sourceNode = this._cleanUpAudioNode(this.sourceNode), this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext)),
  6499. 0 != this.gainNode.numberOfOutputs && this.gainNode.disconnect(0),
  6500. clearTimeout(this._soundCompleteTimeout),
  6501. this._playbackStartTime = 0
  6502. },
  6503. b._cleanUpAudioNode = function(a) {
  6504. if (a) {
  6505. a.stop(0),
  6506. a.disconnect(0);
  6507. try {
  6508. a.buffer = c._scratchBuffer
  6509. } catch(b) {}
  6510. a = null
  6511. }
  6512. return a
  6513. },
  6514. b._handleSoundReady = function(a) {
  6515. this.gainNode.connect(c.destinationNode);
  6516. var b = .001 * this._duration,
  6517. d = .001 * this._position;
  6518. d > b && (d = b),
  6519. this.sourceNode = this._createAndPlayAudioNode(c.context.currentTime - b, d),
  6520. this._playbackStartTime = this.sourceNode.startTime - d,
  6521. this._soundCompleteTimeout = setTimeout(this._endedHandler, 1e3 * (b - d)),
  6522. 0 != this._loop && (this._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0))
  6523. },
  6524. b._createAndPlayAudioNode = function(a, b) {
  6525. var d = c.context.createBufferSource();
  6526. d.buffer = this.playbackResource,
  6527. d.connect(this.panNode);
  6528. var e = .001 * this._duration;
  6529. return d.startTime = a + e,
  6530. d.start(d.startTime, b + .001 * this._startTime, e - b),
  6531. d
  6532. },
  6533. b._pause = function() {
  6534. this._position = 1e3 * (c.context.currentTime - this._playbackStartTime),
  6535. this.sourceNode = this._cleanUpAudioNode(this.sourceNode),
  6536. this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext),
  6537. 0 != this.gainNode.numberOfOutputs && this.gainNode.disconnect(0),
  6538. clearTimeout(this._soundCompleteTimeout)
  6539. },
  6540. b._resume = function() {
  6541. this._handleSoundReady()
  6542. },
  6543. b._updateVolume = function() {
  6544. var a = this._muted ? 0 : this._volume;
  6545. a != this.gainNode.gain.value && (this.gainNode.gain.value = a)
  6546. },
  6547. b._calculateCurrentPosition = function() {
  6548. return 1e3 * (c.context.currentTime - this._playbackStartTime)
  6549. },
  6550. b._updatePosition = function() {
  6551. this.sourceNode = this._cleanUpAudioNode(this.sourceNode),
  6552. this._sourceNodeNext = this._cleanUpAudioNode(this._sourceNodeNext),
  6553. clearTimeout(this._soundCompleteTimeout),
  6554. this._paused || this._handleSoundReady()
  6555. },
  6556. b._handleLoop = function() {
  6557. this._cleanUpAudioNode(this.sourceNode),
  6558. this.sourceNode = this._sourceNodeNext,
  6559. this._playbackStartTime = this.sourceNode.startTime,
  6560. this._sourceNodeNext = this._createAndPlayAudioNode(this._playbackStartTime, 0),
  6561. this._soundCompleteTimeout = setTimeout(this._endedHandler, this._duration)
  6562. },
  6563. b._updateDuration = function() {
  6564. this.playState == createjs.Sound.PLAY_SUCCEEDED && (this._pause(), this._resume())
  6565. },
  6566. createjs.WebAudioSoundInstance = createjs.promote(a, "AbstractSoundInstance")
  6567. } (),
  6568. this.createjs = this.createjs || {},
  6569. function() {
  6570. "use strict";
  6571. function a() {
  6572. this.AbstractPlugin_constructor(),
  6573. this._panningModel = c._panningModel,
  6574. this.context = c.context,
  6575. this.dynamicsCompressorNode = this.context.createDynamicsCompressor(),
  6576. this.dynamicsCompressorNode.connect(this.context.destination),
  6577. this.gainNode = this.context.createGain(),
  6578. this.gainNode.connect(this.dynamicsCompressorNode),
  6579. createjs.WebAudioSoundInstance.destinationNode = this.gainNode,
  6580. this._capabilities = c._capabilities,
  6581. this._loaderClass = createjs.WebAudioLoader,
  6582. this._soundInstanceClass = createjs.WebAudioSoundInstance,
  6583. this._addPropsToClasses()
  6584. }
  6585. var b = createjs.extend(a, createjs.AbstractPlugin),
  6586. c = a;
  6587. c._capabilities = null,
  6588. c._panningModel = "equalpower",
  6589. c.context = null,
  6590. c._scratchBuffer = null,
  6591. c._unlocked = !1,
  6592. c.isSupported = function() {
  6593. var a = createjs.BrowserDetect.isIOS || createjs.BrowserDetect.isAndroid || createjs.BrowserDetect.isBlackberry;
  6594. return "file:" != location.protocol || a || this._isFileXHRSupported() ? (c._generateCapabilities(), null == c.context ? !1 : !0) : !1
  6595. },
  6596. c.playEmptySound = function() {
  6597. if (null != c.context) {
  6598. var a = c.context.createBufferSource();
  6599. a.buffer = c._scratchBuffer,
  6600. a.connect(c.context.destination),
  6601. a.start(0, 0, 0)
  6602. }
  6603. },
  6604. c._isFileXHRSupported = function() {
  6605. var a = !0,
  6606. b = new XMLHttpRequest;
  6607. try {
  6608. b.open("GET", "WebAudioPluginTest.fail", !1)
  6609. } catch(c) {
  6610. return a = !1
  6611. }
  6612. b.onerror = function() {
  6613. a = !1
  6614. },
  6615. b.onload = function() {
  6616. a = 404 == this.status || 200 == this.status || 0 == this.status && "" != this.response
  6617. };
  6618. try {
  6619. b.send()
  6620. } catch(c) {
  6621. a = !1
  6622. }
  6623. return a
  6624. },
  6625. c._generateCapabilities = function() {
  6626. if (null == c._capabilities) {
  6627. var a = document.createElement("audio");
  6628. if (null == a.canPlayType) return null;
  6629. if (null == c.context) if (window.AudioContext) c.context = new AudioContext;
  6630. else {
  6631. if (!window.webkitAudioContext) return null;
  6632. c.context = new webkitAudioContext
  6633. }
  6634. null == c._scratchBuffer && (c._scratchBuffer = c.context.createBuffer(1, 1, 22050)),
  6635. c._compatibilitySetUp(),
  6636. "ontouchstart" in window && "running" != c.context.state && (c._unlock(), document.addEventListener("mousedown", c._unlock, !0), document.addEventListener("touchend", c._unlock, !0)),
  6637. c._capabilities = {
  6638. panning: !0,
  6639. volume: !0,
  6640. tracks: -1
  6641. };
  6642. for (var b = createjs.Sound.SUPPORTED_EXTENSIONS,
  6643. d = createjs.Sound.EXTENSION_MAP,
  6644. e = 0,
  6645. f = b.length; f > e; e++) {
  6646. var g = b[e],
  6647. h = d[g] || g;
  6648. c._capabilities[g] = "no" != a.canPlayType("audio/" + g) && "" != a.canPlayType("audio/" + g) || "no" != a.canPlayType("audio/" + h) && "" != a.canPlayType("audio/" + h)
  6649. }
  6650. c.context.destination.numberOfChannels < 2 && (c._capabilities.panning = !1)
  6651. }
  6652. },
  6653. c._compatibilitySetUp = function() {
  6654. if (c._panningModel = "equalpower", !c.context.createGain) {
  6655. c.context.createGain = c.context.createGainNode;
  6656. var a = c.context.createBufferSource();
  6657. a.__proto__.start = a.__proto__.noteGrainOn,
  6658. a.__proto__.stop = a.__proto__.noteOff,
  6659. c._panningModel = 0
  6660. }
  6661. },
  6662. c._unlock = function() {
  6663. c._unlocked || (c.playEmptySound(), "running" == c.context.state && (document.removeEventListener("mousedown", c._unlock, !0), document.removeEventListener("touchend", c._unlock, !0), c._unlocked = !0))
  6664. },
  6665. b.toString = function() {
  6666. return "[WebAudioPlugin]"
  6667. },
  6668. b._addPropsToClasses = function() {
  6669. var a = this._soundInstanceClass;
  6670. a.context = this.context,
  6671. a._scratchBuffer = c._scratchBuffer,
  6672. a.destinationNode = this.gainNode,
  6673. a._panningModel = this._panningModel,
  6674. this._loaderClass.context = this.context
  6675. },
  6676. b._updateVolume = function() {
  6677. var a = createjs.Sound._masterMute ? 0 : this._volume;
  6678. a != this.gainNode.gain.value && (this.gainNode.gain.value = a)
  6679. },
  6680. createjs.WebAudioPlugin = createjs.promote(a, "AbstractPlugin")
  6681. } (),
  6682. this.createjs = this.createjs || {},
  6683. function() {
  6684. "use strict";
  6685. function a() {
  6686. throw "HTMLAudioTagPool cannot be instantiated"
  6687. }
  6688. function b(a) {
  6689. this._tags = []
  6690. }
  6691. var c = a;
  6692. c._tags = {},
  6693. c._tagPool = new b,
  6694. c._tagUsed = {},
  6695. c.get = function(a) {
  6696. var b = c._tags[a];
  6697. return null == b ? (b = c._tags[a] = c._tagPool.get(), b.src = a) : c._tagUsed[a] ? (b = c._tagPool.get(), b.src = a) : c._tagUsed[a] = !0,
  6698. b
  6699. },
  6700. c.set = function(a, b) {
  6701. b == c._tags[a] ? c._tagUsed[a] = !1 : c._tagPool.set(b)
  6702. },
  6703. c.remove = function(a) {
  6704. var b = c._tags[a];
  6705. return null == b ? !1 : (c._tagPool.set(b), delete c._tags[a], delete c._tagUsed[a], !0)
  6706. },
  6707. c.getDuration = function(a) {
  6708. var b = c._tags[a];
  6709. return null != b && b.duration ? 1e3 * b.duration: 0
  6710. },
  6711. createjs.HTMLAudioTagPool = a;
  6712. var d = b.prototype;
  6713. d.constructor = b,
  6714. d.get = function() {
  6715. var a;
  6716. return a = 0 == this._tags.length ? this._createTag() : this._tags.pop(),
  6717. null == a.parentNode && document.body.appendChild(a),
  6718. a
  6719. },
  6720. d.set = function(a) {
  6721. var b = createjs.indexOf(this._tags, a); - 1 == b && (this._tags.src = null, this._tags.push(a))
  6722. },
  6723. d.toString = function() {
  6724. return "[TagPool]"
  6725. },
  6726. d._createTag = function() {
  6727. var a = document.createElement("audio");
  6728. return a.autoplay = !1,
  6729. a.preload = "none",
  6730. a
  6731. }
  6732. } (),
  6733. this.createjs = this.createjs || {},
  6734. function() {
  6735. "use strict";
  6736. function a(a, b, c, d) {
  6737. this.AbstractSoundInstance_constructor(a, b, c, d),
  6738. this._audioSpriteStopTime = null,
  6739. this._delayTimeoutId = null,
  6740. this._endedHandler = createjs.proxy(this._handleSoundComplete, this),
  6741. this._readyHandler = createjs.proxy(this._handleTagReady, this),
  6742. this._stalledHandler = createjs.proxy(this._playFailed, this),
  6743. this._audioSpriteEndHandler = createjs.proxy(this._handleAudioSpriteLoop, this),
  6744. this._loopHandler = createjs.proxy(this._handleSoundComplete, this),
  6745. c ? this._audioSpriteStopTime = .001 * (b + c) : this._duration = createjs.HTMLAudioTagPool.getDuration(this.src)
  6746. }
  6747. var b = createjs.extend(a, createjs.AbstractSoundInstance);
  6748. b.setMasterVolume = function(a) {
  6749. this._updateVolume()
  6750. },
  6751. b.setMasterMute = function(a) {
  6752. this._updateVolume()
  6753. },
  6754. b.toString = function() {
  6755. return "[HTMLAudioSoundInstance]"
  6756. },
  6757. b._removeLooping = function() {
  6758. null != this._playbackResource && (this._playbackResource.loop = !1, this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1))
  6759. },
  6760. b._addLooping = function() {
  6761. null == this._playbackResource || this._audioSpriteStopTime || (this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1), this._playbackResource.loop = !0)
  6762. },
  6763. b._handleCleanUp = function() {
  6764. var a = this._playbackResource;
  6765. if (null != a) {
  6766. a.pause(),
  6767. a.loop = !1,
  6768. a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, !1),
  6769. a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, !1),
  6770. a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, !1),
  6771. a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1),
  6772. a.removeEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, !1);
  6773. try {
  6774. a.currentTime = this._startTime
  6775. } catch(b) {}
  6776. createjs.HTMLAudioTagPool.set(this.src, a),
  6777. this._playbackResource = null
  6778. }
  6779. },
  6780. b._beginPlaying = function(a) {
  6781. return this._playbackResource = createjs.HTMLAudioTagPool.get(this.src),
  6782. this.AbstractSoundInstance__beginPlaying(a)
  6783. },
  6784. b._handleSoundReady = function(a) {
  6785. if (4 !== this._playbackResource.readyState) {
  6786. var b = this._playbackResource;
  6787. return b.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, !1),
  6788. b.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, !1),
  6789. b.preload = "auto",
  6790. void b.load()
  6791. }
  6792. this._updateVolume(),
  6793. this._playbackResource.currentTime = .001 * (this._startTime + this._position),
  6794. this._audioSpriteStopTime ? this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, !1) : (this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, !1), 0 != this._loop && (this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1), this._playbackResource.loop = !0)),
  6795. this._playbackResource.play()
  6796. },
  6797. b._handleTagReady = function(a) {
  6798. this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY, this._readyHandler, !1),
  6799. this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED, this._stalledHandler, !1),
  6800. this._handleSoundReady()
  6801. },
  6802. b._pause = function() {
  6803. this._playbackResource.pause()
  6804. },
  6805. b._resume = function() {
  6806. this._playbackResource.play()
  6807. },
  6808. b._updateVolume = function() {
  6809. if (null != this._playbackResource) {
  6810. var a = this._muted || createjs.Sound._masterMute ? 0 : this._volume * createjs.Sound._masterVolume;
  6811. a != this._playbackResource.volume && (this._playbackResource.volume = a)
  6812. }
  6813. },
  6814. b._calculateCurrentPosition = function() {
  6815. return 1e3 * this._playbackResource.currentTime - this._startTime
  6816. },
  6817. b._updatePosition = function() {
  6818. this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1),
  6819. this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._handleSetPositionSeek, !1);
  6820. try {
  6821. this._playbackResource.currentTime = .001 * (this._position + this._startTime)
  6822. } catch(a) {
  6823. this._handleSetPositionSeek(null)
  6824. }
  6825. },
  6826. b._handleSetPositionSeek = function(a) {
  6827. null != this._playbackResource && (this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._handleSetPositionSeek, !1), this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1))
  6828. },
  6829. b._handleAudioSpriteLoop = function(a) {
  6830. this._playbackResource.currentTime <= this._audioSpriteStopTime || (this._playbackResource.pause(), 0 == this._loop ? this._handleSoundComplete(null) : (this._position = 0, this._loop--, this._playbackResource.currentTime = .001 * this._startTime, this._paused || this._playbackResource.play(), this._sendEvent("loop")))
  6831. },
  6832. b._handleLoop = function(a) {
  6833. 0 == this._loop && (this._playbackResource.loop = !1, this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED, this._loopHandler, !1))
  6834. },
  6835. b._updateStartTime = function() {
  6836. this._audioSpriteStopTime = .001 * (this._startTime + this._duration),
  6837. this.playState == createjs.Sound.PLAY_SUCCEEDED && (this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, !1), this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, !1))
  6838. },
  6839. b._updateDuration = function() {
  6840. this._audioSpriteStopTime = .001 * (this._startTime + this._duration),
  6841. this.playState == createjs.Sound.PLAY_SUCCEEDED && (this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED, this._endedHandler, !1), this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE, this._audioSpriteEndHandler, !1))
  6842. },
  6843. b._setDurationFromSource = function() {
  6844. this._duration = createjs.HTMLAudioTagPool.getDuration(this.src),
  6845. this._playbackResource = null
  6846. },
  6847. createjs.HTMLAudioSoundInstance = createjs.promote(a, "AbstractSoundInstance")
  6848. } (),
  6849. this.createjs = this.createjs || {},
  6850. function() {
  6851. "use strict";
  6852. function a() {
  6853. this.AbstractPlugin_constructor(),
  6854. this.defaultNumChannels = 2,
  6855. this._capabilities = c._capabilities,
  6856. this._loaderClass = createjs.SoundLoader,
  6857. this._soundInstanceClass = createjs.HTMLAudioSoundInstance
  6858. }
  6859. var b = createjs.extend(a, createjs.AbstractPlugin),
  6860. c = a;
  6861. c.MAX_INSTANCES = 30,
  6862. c._AUDIO_READY = "canplaythrough",
  6863. c._AUDIO_ENDED = "ended",
  6864. c._AUDIO_SEEKED = "seeked",
  6865. c._AUDIO_STALLED = "stalled",
  6866. c._TIME_UPDATE = "timeupdate",
  6867. c._capabilities = null,
  6868. c.isSupported = function() {
  6869. return c._generateCapabilities(),
  6870. null != c._capabilities
  6871. },
  6872. c._generateCapabilities = function() {
  6873. if (null == c._capabilities) {
  6874. var a = document.createElement("audio");
  6875. if (null == a.canPlayType) return null;
  6876. c._capabilities = {
  6877. panning: !1,
  6878. volume: !0,
  6879. tracks: -1
  6880. };
  6881. for (var b = createjs.Sound.SUPPORTED_EXTENSIONS,
  6882. d = createjs.Sound.EXTENSION_MAP,
  6883. e = 0,
  6884. f = b.length; f > e; e++) {
  6885. var g = b[e],
  6886. h = d[g] || g;
  6887. c._capabilities[g] = "no" != a.canPlayType("audio/" + g) && "" != a.canPlayType("audio/" + g) || "no" != a.canPlayType("audio/" + h) && "" != a.canPlayType("audio/" + h)
  6888. }
  6889. }
  6890. },
  6891. b.register = function(a) {
  6892. var b = createjs.HTMLAudioTagPool.get(a.src),
  6893. c = this.AbstractPlugin_register(a);
  6894. return c.setTag(b),
  6895. c
  6896. },
  6897. b.removeSound = function(a) {
  6898. this.AbstractPlugin_removeSound(a),
  6899. createjs.HTMLAudioTagPool.remove(a)
  6900. },
  6901. b.create = function(a, b, c) {
  6902. var d = this.AbstractPlugin_create(a, b, c);
  6903. return d.setPlaybackResource(null),
  6904. d
  6905. },
  6906. b.toString = function() {
  6907. return "[HTMLAudioPlugin]"
  6908. },
  6909. b.setVolume = b.getVolume = b.setMute = null,
  6910. createjs.HTMLAudioPlugin = createjs.promote(a, "AbstractPlugin")
  6911. } (),
  6912. this.createjs = this.createjs || {},
  6913. function() {
  6914. "use strict";
  6915. function a(b, c, d) {
  6916. this.ignoreGlobalPause = !1,
  6917. this.loop = !1,
  6918. this.duration = 0,
  6919. this.pluginData = d || {},
  6920. this.target = b,
  6921. this.position = null,
  6922. this.passive = !1,
  6923. this._paused = !1,
  6924. this._curQueueProps = {},
  6925. this._initQueueProps = {},
  6926. this._steps = [],
  6927. this._actions = [],
  6928. this._prevPosition = 0,
  6929. this._stepPosition = 0,
  6930. this._prevPos = -1,
  6931. this._target = b,
  6932. this._useTicks = !1,
  6933. this._inited = !1,
  6934. this._registered = !1,
  6935. c && (this._useTicks = c.useTicks, this.ignoreGlobalPause = c.ignoreGlobalPause, this.loop = c.loop, c.onChange && this.addEventListener("change", c.onChange), c.override && a.removeTweens(b)),
  6936. c && c.paused ? this._paused = !0 : createjs.Tween._register(this, !0),
  6937. c && null != c.position && this.setPosition(c.position, a.NONE)
  6938. }
  6939. var b = createjs.extend(a, createjs.EventDispatcher);
  6940. a.NONE = 0,
  6941. a.LOOP = 1,
  6942. a.REVERSE = 2,
  6943. a.IGNORE = {},
  6944. a._tweens = [],
  6945. a._plugins = {},
  6946. a.get = function(b, c, d, e) {
  6947. return e && a.removeTweens(b),
  6948. new a(b, c, d)
  6949. },
  6950. a.tick = function(b, c) {
  6951. for (var d = a._tweens.slice(), e = d.length - 1; e >= 0; e--) {
  6952. var f = d[e];
  6953. c && !f.ignoreGlobalPause || f._paused || f.tick(f._useTicks ? 1 : b)
  6954. }
  6955. },
  6956. a.handleEvent = function(a) {
  6957. "tick" == a.type && this.tick(a.delta, a.paused)
  6958. },
  6959. a.removeTweens = function(b) {
  6960. if (b.tweenjs_count) {
  6961. for (var c = a._tweens,
  6962. d = c.length - 1; d >= 0; d--) {
  6963. var e = c[d];
  6964. e._target == b && (e._paused = !0, c.splice(d, 1))
  6965. }
  6966. b.tweenjs_count = 0
  6967. }
  6968. },
  6969. a.removeAllTweens = function() {
  6970. for (var b = a._tweens,
  6971. c = 0,
  6972. d = b.length; d > c; c++) {
  6973. var e = b[c];
  6974. e._paused = !0,
  6975. e.target && (e.target.tweenjs_count = 0)
  6976. }
  6977. b.length = 0
  6978. },
  6979. a.hasActiveTweens = function(b) {
  6980. return b ? null != b.tweenjs_count && !!b.tweenjs_count: a._tweens && !!a._tweens.length
  6981. },
  6982. a.installPlugin = function(b, c) {
  6983. var d = b.priority;
  6984. null == d && (b.priority = d = 0);
  6985. for (var e = 0,
  6986. f = c.length,
  6987. g = a._plugins; f > e; e++) {
  6988. var h = c[e];
  6989. if (g[h]) {
  6990. for (var i = g[h], j = 0, k = i.length; k > j && !(d < i[j].priority); j++);
  6991. g[h].splice(j, 0, b)
  6992. } else g[h] = [b]
  6993. }
  6994. },
  6995. a._register = function(b, c) {
  6996. var d = b._target,
  6997. e = a._tweens;
  6998. if (c && !b._registered) d && (d.tweenjs_count = d.tweenjs_count ? d.tweenjs_count + 1 : 1),
  6999. e.push(b),
  7000. !a._inited && createjs.Ticker && (createjs.Ticker.addEventListener("tick", a), a._inited = !0);
  7001. else if (!c && b._registered) {
  7002. d && d.tweenjs_count--;
  7003. for (var f = e.length; f--;) if (e[f] == b) {
  7004. e.splice(f, 1);
  7005. break
  7006. }
  7007. }
  7008. b._registered = c
  7009. },
  7010. b.wait = function(a, b) {
  7011. if (null == a || 0 >= a) return this;
  7012. var c = this._cloneProps(this._curQueueProps);
  7013. return this._addStep({
  7014. d: a,
  7015. p0: c,
  7016. e: this._linearEase,
  7017. p1: c,
  7018. v: b
  7019. })
  7020. },
  7021. b.to = function(a, b, c) {
  7022. return (isNaN(b) || 0 > b) && (b = 0),
  7023. this._addStep({
  7024. d: b || 0,
  7025. p0: this._cloneProps(this._curQueueProps),
  7026. e: c,
  7027. p1: this._cloneProps(this._appendQueueProps(a))
  7028. })
  7029. },
  7030. b.call = function(a, b, c) {
  7031. return this._addAction({
  7032. f: a,
  7033. p: b ? b: [this],
  7034. o: c ? c: this._target
  7035. })
  7036. },
  7037. b.set = function(a, b) {
  7038. return this._addAction({
  7039. f: this._set,
  7040. o: this,
  7041. p: [a, b ? b: this._target]
  7042. })
  7043. },
  7044. b.play = function(a) {
  7045. return a || (a = this),
  7046. this.call(a.setPaused, [!1], a)
  7047. },
  7048. b.pause = function(a) {
  7049. return a || (a = this),
  7050. this.call(a.setPaused, [!0], a)
  7051. },
  7052. b.setPosition = function(a, b) {
  7053. 0 > a && (a = 0),
  7054. null == b && (b = 1);
  7055. var c = a,
  7056. d = !1;
  7057. if (c >= this.duration && (this.loop ? c %= this.duration: (c = this.duration, d = !0)), c == this._prevPos) return d;
  7058. var e = this._prevPos;
  7059. if (this.position = this._prevPos = c, this._prevPosition = a, this._target) if (d) this._updateTargetProps(null, 1);
  7060. else if (this._steps.length > 0) {
  7061. for (var f = 0,
  7062. g = this._steps.length; g > f && !(this._steps[f].t > c); f++);
  7063. var h = this._steps[f - 1];
  7064. this._updateTargetProps(h, (this._stepPosition = c - h.t) / h.d)
  7065. }
  7066. return 0 != b && this._actions.length > 0 && (this._useTicks ? this._runActions(c, c) : 1 == b && e > c ? (e != this.duration && this._runActions(e, this.duration), this._runActions(0, c, !0)) : this._runActions(e, c)),
  7067. d && this.setPaused(!0),
  7068. this.dispatchEvent("change"),
  7069. d
  7070. },
  7071. b.tick = function(a) {
  7072. this._paused || this.setPosition(this._prevPosition + a)
  7073. },
  7074. b.setPaused = function(b) {
  7075. return this._paused === !!b ? this: (this._paused = !!b, a._register(this, !b), this)
  7076. },
  7077. b.w = b.wait,
  7078. b.t = b.to,
  7079. b.c = b.call,
  7080. b.s = b.set,
  7081. b.toString = function() {
  7082. return "[Tween]"
  7083. },
  7084. b.clone = function() {
  7085. throw "Tween can not be cloned."
  7086. },
  7087. b._updateTargetProps = function(b, c) {
  7088. var d, e, f, g, h, i;
  7089. if (b || 1 != c) {
  7090. if (this.passive = !!b.v, this.passive) return;
  7091. b.e && (c = b.e(c, 0, 1, 1)),
  7092. d = b.p0,
  7093. e = b.p1
  7094. } else this.passive = !1,
  7095. d = e = this._curQueueProps;
  7096. for (var j in this._initQueueProps) {
  7097. null == (g = d[j]) && (d[j] = g = this._initQueueProps[j]),
  7098. null == (h = e[j]) && (e[j] = h = g),
  7099. f = g == h || 0 == c || 1 == c || "number" != typeof g ? 1 == c ? h: g: g + (h - g) * c;
  7100. var k = !1;
  7101. if (i = a._plugins[j]) for (var l = 0,
  7102. m = i.length; m > l; l++) {
  7103. var n = i[l].tween(this, j, f, d, e, c, !!b && d == e, !b);
  7104. n == a.IGNORE ? k = !0 : f = n
  7105. }
  7106. k || (this._target[j] = f)
  7107. }
  7108. },
  7109. b._runActions = function(a, b, c) {
  7110. var d = a,
  7111. e = b,
  7112. f = -1,
  7113. g = this._actions.length,
  7114. h = 1;
  7115. for (a > b && (d = b, e = a, f = g, g = h = -1); (f += h) != g;) {
  7116. var i = this._actions[f],
  7117. j = i.t; (j == e || j > d && e > j || c && j == a) && i.f.apply(i.o, i.p)
  7118. }
  7119. },
  7120. b._appendQueueProps = function(b) {
  7121. var c, d, e, f, g;
  7122. for (var h in b) if (void 0 === this._initQueueProps[h]) {
  7123. if (d = this._target[h], c = a._plugins[h]) for (e = 0, f = c.length; f > e; e++) d = c[e].init(this, h, d);
  7124. this._initQueueProps[h] = this._curQueueProps[h] = void 0 === d ? null: d
  7125. } else d = this._curQueueProps[h];
  7126. for (var h in b) {
  7127. if (d = this._curQueueProps[h], c = a._plugins[h]) for (g = g || {},
  7128. e = 0, f = c.length; f > e; e++) c[e].step && c[e].step(this, h, d, b[h], g);
  7129. this._curQueueProps[h] = b[h]
  7130. }
  7131. return g && this._appendQueueProps(g),
  7132. this._curQueueProps
  7133. },
  7134. b._cloneProps = function(a) {
  7135. var b = {};
  7136. for (var c in a) b[c] = a[c];
  7137. return b
  7138. },
  7139. b._addStep = function(a) {
  7140. return a.d > 0 && (this._steps.push(a), a.t = this.duration, this.duration += a.d),
  7141. this
  7142. },
  7143. b._addAction = function(a) {
  7144. return a.t = this.duration,
  7145. this._actions.push(a),
  7146. this
  7147. },
  7148. b._set = function(a, b) {
  7149. for (var c in a) b[c] = a[c]
  7150. },
  7151. createjs.Tween = createjs.promote(a, "EventDispatcher")
  7152. } (),
  7153. this.createjs = this.createjs || {},
  7154. function() {
  7155. "use strict";
  7156. function a(a, b, c) {
  7157. this.EventDispatcher_constructor(),
  7158. this.ignoreGlobalPause = !1,
  7159. this.duration = 0,
  7160. this.loop = !1,
  7161. this.position = null,
  7162. this._paused = !1,
  7163. this._tweens = [],
  7164. this._labels = null,
  7165. this._labelList = null,
  7166. this._prevPosition = 0,
  7167. this._prevPos = -1,
  7168. this._useTicks = !1,
  7169. this._registered = !1,
  7170. c && (this._useTicks = c.useTicks, this.loop = c.loop, this.ignoreGlobalPause = c.ignoreGlobalPause, c.onChange && this.addEventListener("change", c.onChange)),
  7171. a && this.addTween.apply(this, a),
  7172. this.setLabels(b),
  7173. c && c.paused ? this._paused = !0 : createjs.Tween._register(this, !0),
  7174. c && null != c.position && this.setPosition(c.position, createjs.Tween.NONE)
  7175. }
  7176. var b = createjs.extend(a, createjs.EventDispatcher);
  7177. b.addTween = function(a) {
  7178. var b = arguments.length;
  7179. if (b > 1) {
  7180. for (var c = 0; b > c; c++) this.addTween(arguments[c]);
  7181. return arguments[0]
  7182. }
  7183. return 0 == b ? null: (this.removeTween(a), this._tweens.push(a), a.setPaused(!0), a._paused = !1, a._useTicks = this._useTicks, a.duration > this.duration && (this.duration = a.duration), this._prevPos >= 0 && a.setPosition(this._prevPos, createjs.Tween.NONE), a)
  7184. },
  7185. b.removeTween = function(a) {
  7186. var b = arguments.length;
  7187. if (b > 1) {
  7188. for (var c = !0,
  7189. d = 0; b > d; d++) c = c && this.removeTween(arguments[d]);
  7190. return c
  7191. }
  7192. if (0 == b) return ! 1;
  7193. for (var e = this._tweens,
  7194. d = e.length; d--;) if (e[d] == a) return e.splice(d, 1),
  7195. a.duration >= this.duration && this.updateDuration(),
  7196. !0;
  7197. return ! 1
  7198. },
  7199. b.addLabel = function(a, b) {
  7200. this._labels[a] = b;
  7201. var c = this._labelList;
  7202. if (c) {
  7203. for (var d = 0,
  7204. e = c.length; e > d && !(b < c[d].position); d++);
  7205. c.splice(d, 0, {
  7206. label: a,
  7207. position: b
  7208. })
  7209. }
  7210. },
  7211. b.setLabels = function(a) {
  7212. this._labels = a ? a: {}
  7213. },
  7214. b.getLabels = function() {
  7215. var a = this._labelList;
  7216. if (!a) {
  7217. a = this._labelList = [];
  7218. var b = this._labels;
  7219. for (var c in b) a.push({
  7220. label: c,
  7221. position: b[c]
  7222. });
  7223. a.sort(function(a, b) {
  7224. return a.position - b.position
  7225. })
  7226. }
  7227. return a
  7228. },
  7229. b.getCurrentLabel = function() {
  7230. var a = this.getLabels(),
  7231. b = this.position,
  7232. c = a.length;
  7233. if (c) {
  7234. for (var d = 0; c > d && !(b < a[d].position); d++);
  7235. return 0 == d ? null: a[d - 1].label
  7236. }
  7237. return null
  7238. },
  7239. b.gotoAndPlay = function(a) {
  7240. this.setPaused(!1),
  7241. this._goto(a)
  7242. },
  7243. b.gotoAndStop = function(a) {
  7244. this.setPaused(!0),
  7245. this._goto(a)
  7246. },
  7247. b.setPosition = function(a, b) {
  7248. var c = this._calcPosition(a),
  7249. d = !this.loop && a >= this.duration;
  7250. if (c == this._prevPos) return d;
  7251. this._prevPosition = a,
  7252. this.position = this._prevPos = c;
  7253. for (var e = 0,
  7254. f = this._tweens.length; f > e; e++) if (this._tweens[e].setPosition(c, b), c != this._prevPos) return ! 1;
  7255. return d && this.setPaused(!0),
  7256. this.dispatchEvent("change"),
  7257. d
  7258. },
  7259. b.setPaused = function(a) {
  7260. this._paused = !!a,
  7261. createjs.Tween._register(this, !a)
  7262. },
  7263. b.updateDuration = function() {
  7264. this.duration = 0;
  7265. for (var a = 0,
  7266. b = this._tweens.length; b > a; a++) {
  7267. var c = this._tweens[a];
  7268. c.duration > this.duration && (this.duration = c.duration)
  7269. }
  7270. },
  7271. b.tick = function(a) {
  7272. this.setPosition(this._prevPosition + a)
  7273. },
  7274. b.resolve = function(a) {
  7275. var b = Number(a);
  7276. return isNaN(b) && (b = this._labels[a]),
  7277. b
  7278. },
  7279. b.toString = function() {
  7280. return "[Timeline]"
  7281. },
  7282. b.clone = function() {
  7283. throw "Timeline can not be cloned."
  7284. },
  7285. b._goto = function(a) {
  7286. var b = this.resolve(a);
  7287. null != b && this.setPosition(b)
  7288. },
  7289. b._calcPosition = function(a) {
  7290. return 0 > a ? 0 : a < this.duration ? a: this.loop ? a % this.duration: this.duration
  7291. },
  7292. createjs.Timeline = createjs.promote(a, "EventDispatcher")
  7293. } (),
  7294. this.createjs = this.createjs || {},
  7295. function() {
  7296. "use strict";
  7297. function a() {
  7298. throw "Ease cannot be instantiated."
  7299. }
  7300. a.linear = function(a) {
  7301. return a
  7302. },
  7303. a.none = a.linear,
  7304. a.get = function(a) {
  7305. return - 1 > a && (a = -1),
  7306. a > 1 && (a = 1),
  7307. function(b) {
  7308. return 0 == a ? b: 0 > a ? b * (b * -a + 1 + a) : b * ((2 - b) * a + (1 - a))
  7309. }
  7310. },
  7311. a.getPowIn = function(a) {
  7312. return function(b) {
  7313. return Math.pow(b, a)
  7314. }
  7315. },
  7316. a.getPowOut = function(a) {
  7317. return function(b) {
  7318. return 1 - Math.pow(1 - b, a)
  7319. }
  7320. },
  7321. a.getPowInOut = function(a) {
  7322. return function(b) {
  7323. return (b *= 2) < 1 ? .5 * Math.pow(b, a) : 1 - .5 * Math.abs(Math.pow(2 - b, a))
  7324. }
  7325. },
  7326. a.quadIn = a.getPowIn(2),
  7327. a.quadOut = a.getPowOut(2),
  7328. a.quadInOut = a.getPowInOut(2),
  7329. a.cubicIn = a.getPowIn(3),
  7330. a.cubicOut = a.getPowOut(3),
  7331. a.cubicInOut = a.getPowInOut(3),
  7332. a.quartIn = a.getPowIn(4),
  7333. a.quartOut = a.getPowOut(4),
  7334. a.quartInOut = a.getPowInOut(4),
  7335. a.quintIn = a.getPowIn(5),
  7336. a.quintOut = a.getPowOut(5),
  7337. a.quintInOut = a.getPowInOut(5),
  7338. a.sineIn = function(a) {
  7339. return 1 - Math.cos(a * Math.PI / 2)
  7340. },
  7341. a.sineOut = function(a) {
  7342. return Math.sin(a * Math.PI / 2)
  7343. },
  7344. a.sineInOut = function(a) {
  7345. return - .5 * (Math.cos(Math.PI * a) - 1)
  7346. },
  7347. a.getBackIn = function(a) {
  7348. return function(b) {
  7349. return b * b * ((a + 1) * b - a)
  7350. }
  7351. },
  7352. a.backIn = a.getBackIn(1.7),
  7353. a.getBackOut = function(a) {
  7354. return function(b) {
  7355. return--b * b * ((a + 1) * b + a) + 1
  7356. }
  7357. },
  7358. a.backOut = a.getBackOut(1.7),
  7359. a.getBackInOut = function(a) {
  7360. return a *= 1.525,
  7361. function(b) {
  7362. return (b *= 2) < 1 ? .5 * (b * b * ((a + 1) * b - a)) : .5 * ((b -= 2) * b * ((a + 1) * b + a) + 2)
  7363. }
  7364. },
  7365. a.backInOut = a.getBackInOut(1.7),
  7366. a.circIn = function(a) {
  7367. return - (Math.sqrt(1 - a * a) - 1)
  7368. },
  7369. a.circOut = function(a) {
  7370. return Math.sqrt(1 - --a * a)
  7371. },
  7372. a.circInOut = function(a) {
  7373. return (a *= 2) < 1 ? -.5 * (Math.sqrt(1 - a * a) - 1) : .5 * (Math.sqrt(1 - (a -= 2) * a) + 1)
  7374. },
  7375. a.bounceIn = function(b) {
  7376. return 1 - a.bounceOut(1 - b)
  7377. },
  7378. a.bounceOut = function(a) {
  7379. return 1 / 2.75 > a ? 7.5625 * a * a: 2 / 2.75 > a ? 7.5625 * (a -= 1.5 / 2.75) * a + .75 : 2.5 / 2.75 > a ? 7.5625 * (a -= 2.25 / 2.75) * a + .9375 : 7.5625 * (a -= 2.625 / 2.75) * a + .984375
  7380. },
  7381. a.bounceInOut = function(b) {
  7382. return.5 > b ? .5 * a.bounceIn(2 * b) : .5 * a.bounceOut(2 * b - 1) + .5
  7383. },
  7384. a.getElasticIn = function(a, b) {
  7385. var c = 2 * Math.PI;
  7386. return function(d) {
  7387. if (0 == d || 1 == d) return d;
  7388. var e = b / c * Math.asin(1 / a);
  7389. return - (a * Math.pow(2, 10 * (d -= 1)) * Math.sin((d - e) * c / b))
  7390. }
  7391. },
  7392. a.elasticIn = a.getElasticIn(1, .3),
  7393. a.getElasticOut = function(a, b) {
  7394. var c = 2 * Math.PI;
  7395. return function(d) {
  7396. if (0 == d || 1 == d) return d;
  7397. var e = b / c * Math.asin(1 / a);
  7398. return a * Math.pow(2, -10 * d) * Math.sin((d - e) * c / b) + 1
  7399. }
  7400. },
  7401. a.elasticOut = a.getElasticOut(1, .3),
  7402. a.getElasticInOut = function(a, b) {
  7403. var c = 2 * Math.PI;
  7404. return function(d) {
  7405. var e = b / c * Math.asin(1 / a);
  7406. return (d *= 2) < 1 ? -.5 * (a * Math.pow(2, 10 * (d -= 1)) * Math.sin((d - e) * c / b)) : a * Math.pow(2, -10 * (d -= 1)) * Math.sin((d - e) * c / b) * .5 + 1
  7407. }
  7408. },
  7409. a.elasticInOut = a.getElasticInOut(1, .3 * 1.5),
  7410. createjs.Ease = a
  7411. } (),
  7412. this.createjs = this.createjs || {},
  7413. function() {
  7414. "use strict";
  7415. function a() {
  7416. throw "MotionGuidePlugin cannot be instantiated."
  7417. }
  7418. a.priority = 0,
  7419. a._rotOffS,
  7420. a._rotOffE,
  7421. a._rotNormS,
  7422. a._rotNormE,
  7423. a.install = function() {
  7424. return createjs.Tween.installPlugin(a, ["guide", "x", "y", "rotation"]),
  7425. createjs.Tween.IGNORE
  7426. },
  7427. a.init = function(a, b, c) {
  7428. var d = a.target;
  7429. return d.hasOwnProperty("x") || (d.x = 0),
  7430. d.hasOwnProperty("y") || (d.y = 0),
  7431. d.hasOwnProperty("rotation") || (d.rotation = 0),
  7432. "rotation" == b && (a.__needsRot = !0),
  7433. "guide" == b ? null: c
  7434. },
  7435. a.step = function(b, c, d, e, f) {
  7436. if ("rotation" == c && (b.__rotGlobalS = d, b.__rotGlobalE = e, a.testRotData(b, f)), "guide" != c) return e;
  7437. var g, h = e;
  7438. h.hasOwnProperty("path") || (h.path = []);
  7439. var i = h.path;
  7440. if (h.hasOwnProperty("end") || (h.end = 1), h.hasOwnProperty("start") || (h.start = d && d.hasOwnProperty("end") && d.path === i ? d.end: 0), h.hasOwnProperty("_segments") && h._length) return e;
  7441. var j = i.length,
  7442. k = 10;
  7443. if (! (j >= 6 && (j - 2) % 4 == 0)) throw "invalid 'path' data, please see documentation for valid paths";
  7444. h._segments = [],
  7445. h._length = 0;
  7446. for (var l = 2; j > l; l += 4) {
  7447. for (var m, n, o = i[l - 2], p = i[l - 1], q = i[l + 0], r = i[l + 1], s = i[l + 2], t = i[l + 3], u = o, v = p, w = 0, x = [], y = 1; k >= y; y++) {
  7448. var z = y / k,
  7449. A = 1 - z;
  7450. m = A * A * o + 2 * A * z * q + z * z * s,
  7451. n = A * A * p + 2 * A * z * r + z * z * t,
  7452. w += x[x.push(Math.sqrt((g = m - u) * g + (g = n - v) * g)) - 1],
  7453. u = m,
  7454. v = n
  7455. }
  7456. h._segments.push(w),
  7457. h._segments.push(x),
  7458. h._length += w
  7459. }
  7460. g = h.orient,
  7461. h.orient = !0;
  7462. var B = {};
  7463. return a.calc(h, h.start, B),
  7464. b.__rotPathS = Number(B.rotation.toFixed(5)),
  7465. a.calc(h, h.end, B),
  7466. b.__rotPathE = Number(B.rotation.toFixed(5)),
  7467. h.orient = !1,
  7468. a.calc(h, h.end, f),
  7469. h.orient = g,
  7470. h.orient ? (b.__guideData = h, a.testRotData(b, f), e) : e
  7471. },
  7472. a.testRotData = function(a, b) {
  7473. if (void 0 === a.__rotGlobalS || void 0 === a.__rotGlobalE) {
  7474. if (a.__needsRot) return;
  7475. void 0 !== a._curQueueProps.rotation ? a.__rotGlobalS = a.__rotGlobalE = a._curQueueProps.rotation: a.__rotGlobalS = a.__rotGlobalE = b.rotation = a.target.rotation || 0
  7476. }
  7477. if (void 0 !== a.__guideData) {
  7478. var c = a.__guideData,
  7479. d = a.__rotGlobalE - a.__rotGlobalS,
  7480. e = a.__rotPathE - a.__rotPathS,
  7481. f = d - e;
  7482. if ("auto" == c.orient) f > 180 ? f -= 360 : -180 > f && (f += 360);
  7483. else if ("cw" == c.orient) {
  7484. for (; 0 > f;) f += 360;
  7485. 0 == f && d > 0 && 180 != d && (f += 360)
  7486. } else if ("ccw" == c.orient) {
  7487. for (f = d - (e > 180 ? 360 - e: e); f > 0;) f -= 360;
  7488. 0 == f && 0 > d && -180 != d && (f -= 360)
  7489. }
  7490. c.rotDelta = f,
  7491. c.rotOffS = a.__rotGlobalS - a.__rotPathS,
  7492. a.__rotGlobalS = a.__rotGlobalE = a.__guideData = a.__needsRot = void 0
  7493. }
  7494. },
  7495. a.tween = function(b, c, d, e, f, g, h, i) {
  7496. var j = f.guide;
  7497. if (void 0 == j || j === e.guide) return d;
  7498. if (j.lastRatio != g) {
  7499. var k = (j.end - j.start) * (h ? j.end: g) + j.start;
  7500. switch (a.calc(j, k, b.target), j.orient) {
  7501. case "cw":
  7502. case "ccw":
  7503. case "auto":
  7504. b.target.rotation += j.rotOffS + j.rotDelta * g;
  7505. break;
  7506. case "fixed":
  7507. default:
  7508. b.target.rotation += j.rotOffS
  7509. }
  7510. j.lastRatio = g
  7511. }
  7512. return "rotation" != c || j.orient && "false" != j.orient ? b.target[c] : d
  7513. },
  7514. a.calc = function(a, b, c) {
  7515. if (void 0 == a._segments) throw "Missing critical pre-calculated information, please file a bug";
  7516. void 0 == c && (c = {
  7517. x: 0,
  7518. y: 0,
  7519. rotation: 0
  7520. });
  7521. for (var d = a._segments,
  7522. e = a.path,
  7523. f = a._length * b,
  7524. g = d.length - 2,
  7525. h = 0; f > d[h] && g > h;) f -= d[h],
  7526. h += 2;
  7527. var i = d[h + 1],
  7528. j = 0;
  7529. for (g = i.length - 1; f > i[j] && g > j;) f -= i[j],
  7530. j++;
  7531. var k = j / ++g + f / (g * i[j]);
  7532. h = 2 * h + 2;
  7533. var l = 1 - k;
  7534. return c.x = l * l * e[h - 2] + 2 * l * k * e[h + 0] + k * k * e[h + 2],
  7535. c.y = l * l * e[h - 1] + 2 * l * k * e[h + 1] + k * k * e[h + 3],
  7536. a.orient && (c.rotation = 57.2957795 * Math.atan2((e[h + 1] - e[h - 1]) * l + (e[h + 3] - e[h + 1]) * k, (e[h + 0] - e[h - 2]) * l + (e[h + 2] - e[h + 0]) * k)),
  7537. c
  7538. },
  7539. createjs.MotionGuidePlugin = a
  7540. } (),
  7541. this.createjs = this.createjs || {},
  7542. function() {
  7543. "use strict";
  7544. var a = createjs.TweenJS = createjs.TweenJS || {};
  7545. a.version = "0.6.2",
  7546. a.buildDate = "Thu, 26 Nov 2015 20:44:31 GMT"
  7547. } ();