Pixel Editor
Gallery
Projects
People
Forums
The online game development toolkit
Log in or sign up
Clone
Run
Test
Help
What are you working on?
SurfN-2-Sur5 (Extended Edition)
images
bird_0
bird_1
churn
churn2
cloud
depths
depths0
depths1
player
player_0
player_10
player_12
player_14
player_2
player_4
player_6
player_8
rocks
wave
wave1
wizard
lib
00_gamelib
; ; ; /** Returns a copy of the array without null and undefined values. <code><pre> [null, undefined, 3, 3, undefined, 5].compact() => [3, 3, 5] </pre></code> @name compact @methodOf Array# @type Array @returns A new array that contains only the non-null values. */var __slice = Array.prototype.slice; Array.prototype.compact = function() { return this.select(function(element) { return element != null; }); }; /** Creates and returns a copy of the array. The copy contains the same objects. <code><pre> a = ["a", "b", "c"] b = a.copy() # their elements are equal a[0] == b[0] && a[1] == b[1] && a[2] == b[2] => true # but they aren't the same object in memory a === b => false </pre></code> @name copy @methodOf Array# @type Array @returns A new array that is a copy of the array */ Array.prototype.copy = function() { return this.concat(); }; /** Empties the array of its contents. It is modified in place. <code><pre> fullArray = [1, 2, 3] fullArray.clear() fullArray => [] </pre></code> @name clear @methodOf Array# @type Array @returns this, now emptied. */ Array.prototype.clear = function() { this.length = 0; return this; }; /** Flatten out an array of arrays into a single array of elements. <code><pre> [[1, 2], [3, 4], 5].flatten() => [1, 2, 3, 4, 5] # won't flatten twice nested arrays. call # flatten twice if that is what you want [[1, 2], [3, [4, 5]], 6].flatten() => [1, 2, 3, [4, 5], 6] </pre></code> @name flatten @methodOf Array# @type Array @returns A new array with all the sub-arrays flattened to the top. */ Array.prototype.flatten = function() { return this.inject([], function(a, b) { return a.concat(b); }); }; /** Invoke the named method on each element in the array and return a new array containing the results of the invocation. <code><pre> [1.1, 2.2, 3.3, 4.4].invoke("floor") => [1, 2, 3, 4] ['hello', 'world', 'cool!'].invoke('substring', 0, 3) => ['hel', 'wor', 'coo'] </pre></code> @param {String} method The name of the method to invoke. @param [arg...] Optional arguments to pass to the method being invoked. @name invoke @methodOf Array# @type Array @returns A new array containing the results of invoking the named method on each element. */ Array.prototype.invoke = function() { var args, method; method = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; return this.map(function(element) { return element[method].apply(element, args); }); }; /** Randomly select an element from the array. @name rand @methodOf Array# @type Object @returns A random element from an array */ Array.prototype.rand = function() { return this[rand(this.length)]; }; /** Remove the first occurrence of the given object from the array if it is present. The array is modified in place. <code><pre> a = [1, 1, "a", "b"] a.remove(1) => 1 a => [1, "a", "b"] </pre></code> @name remove @methodOf Array# @param {Object} object The object to remove from the array if present. @returns The removed object if present otherwise undefined. */ Array.prototype.remove = function(object) { var index; index = this.indexOf(object); if (index >= 0) { return this.splice(index, 1)[0]; } else { return; } }; /** Returns true if the element is present in the array. <code><pre> ["a", "b", "c"].include("c") => true [40, "a"].include(700) => false </pre></code> @name include @methodOf Array# @param {Object} element The element to check if present. @returns true if the element is in the array, false otherwise. @type Boolean */ Array.prototype.include = function(element) { return this.indexOf(element) !== -1; }; /** Call the given iterator once for each element in the array, passing in the element as the first argument, the index of the element as the second argument, and <code>this</code> array as the third argument. <code><pre> word = "" indices = [] ["r", "a", "d"].each (letter, index) -> word += letter indices.push(index) => ["r", "a", "d"] word => "rad" indices => [0, 1, 2] </pre></code> @name each @methodOf Array# @param {Function} iterator Function to be called once for each element in the array. @param {Object} [context] Optional context parameter to be used as `this` when calling the iterator function. @type Array @returns this to enable method chaining. */ Array.prototype.each = function(iterator, context) { var element, i, _len; if (this.forEach) { this.forEach(iterator, context); } else { for (i = 0, _len = this.length; i < _len; i++) { element = this[i]; iterator.call(context, element, i, this); } } return this; }; /** Call the given iterator once for each element in the array, passing in the element as the first argument, the index of the element as the second argument, and `this` array as the third argument. <code><pre> [1, 2, 3].map (number) -> number * number => [1, 4, 9] </pre></code> @name map @methodOf Array# @param {Function} iterator Function to be called once for each element in the array. @param {Object} [context] Optional context parameter to be used as `this` when calling the iterator function. @type Array @returns An array of the results of the iterator function being called on the original array elements. */ Array.prototype.map || (Array.prototype.map = function(iterator, context) { var element, i, results, _len; results = []; for (i = 0, _len = this.length; i < _len; i++) { element = this[i]; results.push(iterator.call(context, element, i, this)); } return results; }); /** Call the given iterator once for each pair of objects in the array. <code><pre> [1, 2, 3, 4].eachPair (a, b) -> </pre></code> @name eachPair @methodOf Array# @param {Function} iterator Function to be called once for each pair of elements in the array. @param {Object} [context] Optional context parameter to be used as `this` when calling the iterator function. */ Array.prototype.eachPair = function(iterator, context) { var a, b, i, j, length, _results; length = this.length; i = 0; _results = []; while (i < length) { a = this[i]; j = i + 1; i += 1; _results.push((function() { var _results2; _results2 = []; while (j < length) { b = this[j]; j += 1; _results2.push(iterator.call(context, a, b)); } return _results2; }).call(this)); } return _results; }; /** Call the given iterator once for each element in the array, passing in the element as the first argument and the given object as the second argument. Additional arguments are passed similar to <code>each</code>. @see Array#each @name eachWithObject @methodOf Array# @param {Object} object The object to pass to the iterator on each visit. @param {Function} iterator Function to be called once for each element in the array. @param {Object} [context] Optional context parameter to be used as `this` when calling the iterator function. @returns this @type Array */ Array.prototype.eachWithObject = function(object, iterator, context) { this.each(function(element, i, self) { return iterator.call(context, element, object, i, self); }); return object; }; /** Call the given iterator once for each group of elements in the array, passing in the elements in groups of n. Additional argumens are passed as in each. <code><pre> results = [] [1, 2, 3, 4].eachSlice 2, (slice) -> results.push(slice) => [1, 2, 3, 4] results => [[1, 2], [3, 4]] </pre></code> @see Array#each @name eachSlice @methodOf Array# @param {Number} n The number of elements in each group. @param {Function} iterator Function to be called once for each group of elements in the array. @param {Object} [context] Optional context parameter to be used as `this` when calling the iterator function. @returns this @type Array */ Array.prototype.eachSlice = function(n, iterator, context) { var i, len; if (n > 0) { len = (this.length / n).floor(); i = -1; while (++i < len) { iterator.call(context, this.slice(i * n, (i + 1) * n), i * n, this); } } return this; }; /** Returns a new array with the elements all shuffled up. @name shuffle @methodOf Array# @returns A new array that is randomly shuffled. @type Array */ Array.prototype.shuffle = function() { var shuffledArray; shuffledArray = []; this.each(function(element) { return shuffledArray.splice(rand(shuffledArray.length + 1), 0, element); }); return shuffledArray; }; /** Returns the first element of the array, undefined if the array is empty. <code><pre> ["first", "second", "third"].first() => "first" </pre></code> @name first @methodOf Array# @returns The first element, or undefined if the array is empty. @type Object */ Array.prototype.first = function() { return this[0]; }; /** Returns the last element of the array, undefined if the array is empty. <code><pre> ["first", "second", "third"].last() => "third" </pre></code> @name last @methodOf Array# @returns The last element, or undefined if the array is empty. @type Object */ Array.prototype.last = function() { return this[this.length - 1]; }; /** Returns an object containing the extremes of this array. <code><pre> [-1, 3, 0].extremes() => {min: -1, max: 3} </pre></code> @name extremes @methodOf Array# @param {Function} [fn] An optional funtion used to evaluate each element to calculate its value for determining extremes. @returns {min: minElement, max: maxElement} @type Object */ Array.prototype.extremes = function(fn) { var max, maxResult, min, minResult; fn || (fn = function(n) { return n; }); min = max = void 0; minResult = maxResult = void 0; this.each(function(object) { var result; result = fn(object); if (min != null) { if (result < minResult) { min = object; minResult = result; } } else { min = object; minResult = result; } if (max != null) { if (result > maxResult) { max = object; return maxResult = result; } } else { max = object; return maxResult = result; } }); return { min: min, max: max }; }; /** Pretend the array is a circle and grab a new array containing length elements. If length is not given return the element at start, again assuming the array is a circle. <code><pre> [1, 2, 3].wrap(-1) => 3 [1, 2, 3].wrap(6) => 1 ["l", "o", "o", "p"].wrap(0, 16) => ["l", "o", "o", "p", "l", "o", "o", "p", "l", "o", "o", "p", "l", "o", "o", "p"] </pre></code> @name wrap @methodOf Array# @param {Number} start The index to start wrapping at, or the index of the sole element to return if no length is given. @param {Number} [length] Optional length determines how long result array should be. @returns The element at start mod array.length, or an array of length elements, starting from start and wrapping. @type Object or Array */ Array.prototype.wrap = function(start, length) { var end, i, result; if (length != null) { end = start + length; i = start; result = []; while (i++ < end) { result.push(this[i.mod(this.length)]); } return result; } else { return this[start.mod(this.length)]; } }; /** Partitions the elements into two groups: those for which the iterator returns true, and those for which it returns false. @name partition @methodOf Array# @param {Function} iterator @param {Object} [context] Optional context parameter to be used as `this` when calling the iterator function. @type Array @returns An array in the form of [trueCollection, falseCollection] */ Array.prototype.partition = function(iterator, context) { var falseCollection, trueCollection; trueCollection = []; falseCollection = []; this.each(function(element) { if (iterator.call(context, element)) { return trueCollection.push(element); } else { return falseCollection.push(element); } }); return [trueCollection, falseCollection]; }; /** Return the group of elements for which the return value of the iterator is true. @name select @methodOf Array# @param {Function} iterator The iterator receives each element in turn as the first agument. @param {Object} [context] Optional context parameter to be used as `this` when calling the iterator function. @type Array @returns An array containing the elements for which the iterator returned true. */ Array.prototype.select = function(iterator, context) { return this.partition(iterator, context)[0]; }; /** Return the group of elements that are not in the passed in set. @name without @methodOf Array# @param {Array} values List of elements to exclude. @type Array @returns An array containing the elements that are not passed in. */ Array.prototype.without = function(values) { return this.reject(function(element) { return values.include(element); }); }; /** Return the group of elements for which the return value of the iterator is false. @name reject @methodOf Array# @param {Function} iterator The iterator receives each element in turn as the first agument. @param {Object} [context] Optional context parameter to be used as `this` when calling the iterator function. @type Array @returns An array containing the elements for which the iterator returned false. */ Array.prototype.reject = function(iterator, context) { return this.partition(iterator, context)[1]; }; /** Combines all elements of the array by applying a binary operation. for each element in the arra the iterator is passed an accumulator value (memo) and the element. @name inject @methodOf Array# @type Object @returns The result of a */ Array.prototype.inject = function(initial, iterator) { this.each(function(element) { return initial = iterator(initial, element); }); return initial; }; /** Add all the elements in the array. @name sum @methodOf Array# @type Number @returns The sum of the elements in the array. */ Array.prototype.sum = function() { return this.inject(0, function(sum, n) { return sum + n; }); }; /** Multiply all the elements in the array. @name product @methodOf Array# @type Number @returns The product of the elements in the array. */ Array.prototype.product = function() { return this.inject(1, function(product, n) { return product * n; }); }; Array.prototype.zip = function() { var args; args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; return this.map(function(element, index) { var output; output = args.map(function(arr) { return arr[index]; }); output.unshift(element); return output; }); };; /** Bindable module @name Bindable @module @constructor */var Bindable; var __slice = Array.prototype.slice; Bindable = function() { var eventCallbacks; eventCallbacks = {}; return { /** The bind method adds a function as an event listener. <code><pre> # this will call coolEventHandler after # yourObject.trigger "someCustomEvent" is called. yourObject.bind "someCustomEvent", coolEventHandler #or yourObject.bind "anotherCustomEvent", -> doSomething() </pre></code> @name bind @methodOf Bindable# @param {String} event The event to listen to. @param {Function} callback The function to be called when the specified event is triggered. */ bind: function(event, callback) { eventCallbacks[event] = eventCallbacks[event] || []; return eventCallbacks[event].push(callback); }, /** The unbind method removes a specific event listener, or all event listeners if no specific listener is given. <code><pre> # removes the handler coolEventHandler from the event # "someCustomEvent" while leaving the other events intact. yourObject.unbind "someCustomEvent", coolEventHandler # removes all handlers attached to "anotherCustomEvent" yourObject.unbind "anotherCustomEvent" </pre></code> @name unbind @methodOf Bindable# @param {String} event The event to remove the listener from. @param {Function} [callback] The listener to remove. */ unbind: function(event, callback) { eventCallbacks[event] = eventCallbacks[event] || []; if (callback) { return eventCallbacks[event].remove(callback); } else { return eventCallbacks[event] = []; } }, /** The trigger method calls all listeners attached to the specified event. <code><pre> # calls each event handler bound to "someCustomEvent" yourObject.trigger "someCustomEvent" </pre></code> @name trigger @methodOf Bindable# @param {String} event The event to trigger. @param {Array} [parameters] Additional parameters to pass to the event listener. */ trigger: function() { var callbacks, event, parameters, self; event = arguments[0], parameters = 2 <= arguments.length ? __slice.call(arguments, 1) : []; callbacks = eventCallbacks[event]; if (callbacks && callbacks.length) { self = this; return callbacks.each(function(callback) { return callback.apply(self, parameters); }); } } }; }; (typeof exports !== "undefined" && exports !== null ? exports : this)["Bindable"] = Bindable;; var CommandStack; CommandStack = function() { var index, stack; stack = []; index = 0; return { execute: function(command) { stack[index] = command; command.execute(); return index += 1; }, undo: function() { var command; if (this.canUndo()) { index -= 1; command = stack[index]; command.undo(); return command; } }, redo: function() { var command; if (this.canRedo()) { command = stack[index]; command.execute(); index += 1; return command; } }, canUndo: function() { return index > 0; }, canRedo: function() { return stack[index] != null; } }; };; /** The Core class is used to add extended functionality to objects without extending the object class directly. Inherit from Core to gain its utility methods. @name Core @constructor @param {Object} I Instance variables */var Core; var __slice = Array.prototype.slice; Core = function(I) { var self; I || (I = {}); return self = { /** External access to instance variables. Use of this property should be avoided in general, but can come in handy from time to time. <code><pre> I = { r: 255 g: 0 b: 100 } myObject = Core(I) # a bad idea most of the time, but it's # pretty convenient to have available. myObject.I.r => 255 myObject.I.g => 0 myObject.I.b => 100 </pre></code> @name I @fieldOf Core# */ I: I, /** Generates a public jQuery style getter / setter method for each String argument. <code><pre> myObject = Core r: 255 g: 0 b: 100 myObject.attrAccessor "r", "g", "b" myObject.r(254) myObject.r() => 254 </pre></code> @name attrAccessor @methodOf Core# */ attrAccessor: function() { var attrNames; attrNames = 1 <= arguments.length ? __slice.call(arguments, 0) : []; return attrNames.each(function(attrName) { return self[attrName] = function(newValue) { if (newValue != null) { I[attrName] = newValue; return self; } else { return I[attrName]; } }; }); }, /** Generates a public jQuery style getter method for each String argument. <code><pre> myObject = Core r: 255 g: 0 b: 100 myObject.attrReader "r", "g", "b" myObject.r() => 255 myObject.g() => 0 myObject.b() => 100 </pre></code> @name attrReader @methodOf Core# */ attrReader: function() { var attrNames; attrNames = 1 <= arguments.length ? __slice.call(arguments, 0) : []; return attrNames.each(function(attrName) { return self[attrName] = function() { return I[attrName]; }; }); }, /** Extends this object with methods from the passed in object. `before` and `after` are special option names that glue functionality before or after existing methods. @name extend @methodOf Core# */ extend: function(options) { var afterMethods, beforeMethods, fn, name; afterMethods = options.after; beforeMethods = options.before; delete options.after; delete options.before; Object.extend(self, options); if (beforeMethods) { for (name in beforeMethods) { fn = beforeMethods[name]; self[name] = self[name].withBefore(fn); } } if (afterMethods) { for (name in afterMethods) { fn = afterMethods[name]; self[name] = self[name].withAfter(fn); } } return self; }, /** Includes a module in this object. <code><pre> myObject = Core() myObject.include(Bindable) # now you can bind handlers to functions and # y you've hardly written any code myObject.bind "someEvent", -> alert("wow. that was easy.") </pre></code> @name include @methodOf Core# @param {Module} Module the module to include. A module is a constructor that takes two parameters, I and self, and returns an object containing the public methods to extend the including object with. */ include: function(Module) { return self.extend(Module(I, self)); } }; };; Function.prototype.withBefore = function(interception) { var method; method = this; return function() { interception.apply(this, arguments); return method.apply(this, arguments); }; }; Function.prototype.withAfter = function(interception) { var method; method = this; return function() { var result; result = method.apply(this, arguments); interception.apply(this, arguments); return result; }; };; /** @name Logging <code><pre> log "Testing123" info "Hey, this is happening" warn "Be careful, this might be a problem" error "Kaboom!" </pre></code> Gives you some convenience methods for outputting data while developing. */["log", "info", "warn", "error"].each(function(name) { if (typeof console !== "undefined") { return (typeof exports !== "undefined" && exports !== null ? exports : this)[name] = function(message) { if (console[name]) { return console[name](message); } }; } else { return (typeof exports !== "undefined" && exports !== null ? exports : this)[name] = function() {}; } });; /** * Matrix.js v1.3.0pre * * Copyright (c) 2010 STRd6 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * * Loosely based on flash: * http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/geom/Matrix.html */(function() { /** <pre> _ _ | a c tx | | b d ty | |_0 0 1 _| </pre> Creates a matrix for 2d affine transformations. concat, inverse, rotate, scale and translate return new matrices with the transformations applied. The matrix is not modified in place. Returns the identity matrix when called with no arguments. @name Matrix @param {Number} [a] @param {Number} [b] @param {Number} [c] @param {Number} [d] @param {Number} [tx] @param {Number} [ty] @constructor */ var Matrix; Matrix = function(a, b, c, d, tx, ty) { return { __proto__: Matrix.prototype, /** @name a @fieldOf Matrix# */ a: a != null ? a : 1, /** @name b @fieldOf Matrix# */ b: b || 0, /** @name c @fieldOf Matrix# */ c: c || 0, /** @name d @fieldOf Matrix# */ d: d != null ? d : 1, /** @name tx @fieldOf Matrix# */ tx: tx || 0, /** @name ty @fieldOf Matrix# */ ty: ty || 0 }; }; Matrix.prototype = { /** Returns the result of this matrix multiplied by another matrix combining the geometric effects of the two. In mathematical terms, concatenating two matrixes is the same as combining them using matrix multiplication. If this matrix is A and the matrix passed in is B, the resulting matrix is A x B http://mathworld.wolfram.com/MatrixMultiplication.html @name concat @methodOf Matrix# @param {Matrix} matrix The matrix to multiply this matrix by. @returns The result of the matrix multiplication, a new matrix. @type Matrix */ concat: function(matrix) { return Matrix(this.a * matrix.a + this.c * matrix.b, this.b * matrix.a + this.d * matrix.b, this.a * matrix.c + this.c * matrix.d, this.b * matrix.c + this.d * matrix.d, this.a * matrix.tx + this.c * matrix.ty + this.tx, this.b * matrix.tx + this.d * matrix.ty + this.ty); }, /** Given a point in the pretransform coordinate space, returns the coordinates of that point after the transformation occurs. Unlike the standard transformation applied using the transformPoint() method, the deltaTransformPoint() method does not consider the translation parameters tx and ty. @name deltaTransformPoint @methodOf Matrix# @see #transformPoint @return A new point transformed by this matrix ignoring tx and ty. @type Point */ deltaTransformPoint: function(point) { return Point(this.a * point.x + this.c * point.y, this.b * point.x + this.d * point.y); }, /** Returns the inverse of the matrix. http://mathworld.wolfram.com/MatrixInverse.html @name inverse @methodOf Matrix# @returns A new matrix that is the inverse of this matrix. @type Matrix */ inverse: function() { var determinant; determinant = this.a * this.d - this.b * this.c; return Matrix(this.d / determinant, -this.b / determinant, -this.c / determinant, this.a / determinant, (this.c * this.ty - this.d * this.tx) / determinant, (this.b * this.tx - this.a * this.ty) / determinant); }, /** Returns a new matrix that corresponds this matrix multiplied by a a rotation matrix. @name rotate @methodOf Matrix# @see Matrix.rotation @param {Number} theta Amount to rotate in radians. @param {Point} [aboutPoint] The point about which this rotation occurs. Defaults to (0,0). @returns A new matrix, rotated by the specified amount. @type Matrix */ rotate: function(theta, aboutPoint) { return this.concat(Matrix.rotation(theta, aboutPoint)); }, /** Returns a new matrix that corresponds this matrix multiplied by a a scaling matrix. @name scale @methodOf Matrix# @see Matrix.scale @param {Number} sx @param {Number} [sy] @param {Point} [aboutPoint] The point that remains fixed during the scaling @type Matrix */ scale: function(sx, sy, aboutPoint) { return this.concat(Matrix.scale(sx, sy, aboutPoint)); }, /** Returns the result of applying the geometric transformation represented by the Matrix object to the specified point. @name transformPoint @methodOf Matrix# @see #deltaTransformPoint @returns A new point with the transformation applied. @type Point */ transformPoint: function(point) { return Point(this.a * point.x + this.c * point.y + this.tx, this.b * point.x + this.d * point.y + this.ty); }, /** Translates the matrix along the x and y axes, as specified by the tx and ty parameters. @name translate @methodOf Matrix# @see Matrix.translation @param {Number} tx The translation along the x axis. @param {Number} ty The translation along the y axis. @returns A new matrix with the translation applied. @type Matrix */ translate: function(tx, ty) { return this.concat(Matrix.translation(tx, ty)); } /** Creates a matrix transformation that corresponds to the given rotation, around (0,0) or the specified point. @see Matrix#rotate @param {Number} theta Rotation in radians. @param {Point} [aboutPoint] The point about which this rotation occurs. Defaults to (0,0). @returns @type Matrix */ }; Matrix.rotate = Matrix.rotation = function(theta, aboutPoint) { var rotationMatrix; rotationMatrix = Matrix(Math.cos(theta), Math.sin(theta), -Math.sin(theta), Math.cos(theta)); if (aboutPoint != null) { rotationMatrix = Matrix.translation(aboutPoint.x, aboutPoint.y).concat(rotationMatrix).concat(Matrix.translation(-aboutPoint.x, -aboutPoint.y)); } return rotationMatrix; }; /** Returns a matrix that corresponds to scaling by factors of sx, sy along the x and y axis respectively. If only one parameter is given the matrix is scaled uniformly along both axis. If the optional aboutPoint parameter is given the scaling takes place about the given point. @see Matrix#scale @param {Number} sx The amount to scale by along the x axis or uniformly if no sy is given. @param {Number} [sy] The amount to scale by along the y axis. @param {Point} [aboutPoint] The point about which the scaling occurs. Defaults to (0,0). @returns A matrix transformation representing scaling by sx and sy. @type Matrix */ Matrix.scale = function(sx, sy, aboutPoint) { var scaleMatrix; sy = sy || sx; scaleMatrix = Matrix(sx, 0, 0, sy); if (aboutPoint) { scaleMatrix = Matrix.translation(aboutPoint.x, aboutPoint.y).concat(scaleMatrix).concat(Matrix.translation(-aboutPoint.x, -aboutPoint.y)); } return scaleMatrix; }; /** Returns a matrix that corresponds to a translation of tx, ty. @see Matrix#translate @param {Number} tx The amount to translate in the x direction. @param {Number} ty The amount to translate in the y direction. @return A matrix transformation representing a translation by tx and ty. @type Matrix */ Matrix.translate = Matrix.translation = function(tx, ty) { return Matrix(1, 0, 0, 1, tx, ty); }; /** A constant representing the identity matrix. @name IDENTITY @fieldOf Matrix */ Matrix.IDENTITY = Matrix(); /** A constant representing the horizontal flip transformation matrix. @name HORIZONTAL_FLIP @fieldOf Matrix */ Matrix.HORIZONTAL_FLIP = Matrix(-1, 0, 0, 1); /** A constant representing the vertical flip transformation matrix. @name VERTICAL_FLIP @fieldOf Matrix */ Matrix.VERTICAL_FLIP = Matrix(1, 0, 0, -1); if (Object.freeze) { Object.freeze(Matrix.IDENTITY); Object.freeze(Matrix.HORIZONTAL_FLIP); Object.freeze(Matrix.VERTICAL_FLIP); } return (typeof exports !== "undefined" && exports !== null ? exports : this)["Matrix"] = Matrix; })();; /** Returns the absolute value of this number. <code><pre> (-4).abs() => 4 </pre></code> @name abs @methodOf Number# @type Number @returns The absolute value of the number. */Number.prototype.abs = function() { return Math.abs(this); }; /** Returns the mathematical ceiling of this number. <code><pre> 4.9.ceil() => 5 4.2.ceil() => 5 (-1.2).ceil() => -1 </pre></code> @name ceil @methodOf Number# @type Number @returns The number truncated to the nearest integer of greater than or equal value. */ Number.prototype.ceil = function() { return Math.ceil(this); }; /** Returns the mathematical floor of this number. <code><pre> 4.9.floor() => 4 4.2.floor() => 4 (-1.2).floor() => -2 </pre></code> @name floor @methodOf Number# @type Number @returns The number truncated to the nearest integer of less than or equal value. */ Number.prototype.floor = function() { return Math.floor(this); }; /** Returns this number rounded to the nearest integer. <code><pre> 4.5.round() => 5 4.4.round() => 4 </pre></code> @name round @methodOf Number# @type Number @returns The number rounded to the nearest integer. */ Number.prototype.round = function() { return Math.round(this); }; /** Returns a number whose value is limited to the given range. <code><pre> # limit the output of this computation to between 0 and 255 (2 * 255).clamp(0, 255) => 255 </pre></code> @name clamp @methodOf Number# @param {Number} min The lower boundary of the output range @param {Number} max The upper boundary of the output range @type Number @returns A number in the range [min, max] */ Number.prototype.clamp = function(min, max) { return Math.min(Math.max(this, min), max); }; /** A mod method useful for array wrapping. The range of the function is constrained to remain in bounds of array indices. <code><pre> (-1).mod(5) => 4 </pre></code> @name mod @methodOf Number# @param {Number} base @type Number @returns An integer between 0 and (base - 1) if base is positive. */ Number.prototype.mod = function(base) { var result; result = this % base; if (result < 0 && base > 0) { result += base; } return result; }; /** Get the sign of this number as an integer (1, -1, or 0). <code><pre> (-5).sign() => -1 0.sign() => 0 5.sign() => 1 </pre></code> @name sign @methodOf Number# @type Number @returns The sign of this number, 0 if the number is 0. */ Number.prototype.sign = function() { if (this > 0) { return 1; } else if (this < 0) { return -1; } else { return 0; } }; /** Returns true if this number is even (evenly divisible by 2). <code><pre> 2.even() => true 3.even() => false 0.even() => true </pre></code> @name even @methodOf Number# @type Boolean @returns true if this number is an even integer, false otherwise. */ Number.prototype.even = function() { return this % 2 === 0; }; /** Returns true if this number is odd (has remainder of 1 when divided by 2). <code><pre> 2.odd() => false 3.odd() => true 0.odd() => false </pre></code> @name odd @methodOf Number# @type Boolean @returns true if this number is an odd integer, false otherwise. */ Number.prototype.odd = function() { if (this > 0) { return this % 2 === 1; } else { return this % 2 === -1; } }; /** Calls iterator the specified number of times, passing in the number of the current iteration as a parameter: 0 on first call, 1 on the second call, etc. <code><pre> output = [] 5.times (n) -> output.push(n) output => [0, 1, 2, 3, 4] </pre></code> @name times @methodOf Number# @param {Function} iterator The iterator takes a single parameter, the number of the current iteration. @param {Object} [context] The optional context parameter specifies an object to treat as <code>this</code> in the iterator block. @type Number @returns The number of times the iterator was called. */ Number.prototype.times = function(iterator, context) { var i; i = -1; while (++i < this) { iterator.call(context, i); } return i; }; /** Returns the the nearest grid resolution less than or equal to the number. <code><pre> 7.snap(8) => 0 4.snap(8) => 0 12.snap(8) => 8 </pre></code> @name snap @methodOf Number# @param {Number} resolution The grid resolution to snap to. @type Number @returns The nearest multiple of resolution lower than the number. */ Number.prototype.snap = function(resolution) { var n; n = this / resolution; 1 / 1; return n.floor() * resolution; }; /** In number theory, integer factorization or prime factorization is the breaking down of a composite number into smaller non-trivial divisors, which when multiplied together equal the original integer. Floors the number for purposes of factorization. <code><pre> 60.primeFactors() => [2, 2, 3, 5] 37.primeFactors() => [37] </pre></code> @name primeFactors @methodOf Number# @type Array @returns An array containing the factorization of this number. */ Number.prototype.primeFactors = function() { var factors, i, iSquared, n; factors = []; n = Math.floor(this); if (n === 0) { return; } if (n < 0) { factors.push(-1); n /= -1; } i = 2; iSquared = i * i; while (iSquared < n) { while ((n % i) === 0) { factors.push(i); n /= i; } i += 1; iSquared = i * i; } if (n !== 1) { factors.push(n); } return factors; }; /** Returns the two character hexidecimal representation of numbers 0 through 255. <code><pre> 255.toColorPart() => "ff" 0.toColorPart() => "00" 200.toColorPart() => "c8" </pre></code> @name toColorPart @methodOf Number# @type String @returns Hexidecimal representation of the number */ Number.prototype.toColorPart = function() { var s; s = parseInt(this.clamp(0, 255), 10).toString(16); if (s.length === 1) { s = '0' + s; } return s; }; /** Returns a number that is maxDelta closer to target. <code><pre> 255.approach(0, 5) => 250 5.approach(0, 10) => 0 </pre></code> @name approach @methodOf Number# @type Number @returns A number maxDelta toward target */ Number.prototype.approach = function(target, maxDelta) { return (target - this).clamp(-maxDelta, maxDelta) + this; }; /** Returns a number that is closer to the target by the ratio. <code><pre> 255.approachByRatio(0, 0.1) => 229.5 </pre></code> @name approachByRatio @methodOf Number# @type Number @returns A number toward target by the ratio */ Number.prototype.approachByRatio = function(target, ratio) { return this.approach(target, this * ratio); }; /** Returns a number that is closer to the target angle by the delta. <code><pre> Math.PI.approachRotation(0, Math.PI/4) => 2.356194490192345 # this is (3/4) * Math.PI, which is (1/4) * Math.PI closer to 0 from Math.PI </pre></code> @name approachRotation @methodOf Number# @type Number @returns A number toward the target angle by maxDelta */ Number.prototype.approachRotation = function(target, maxDelta) { while (target > this + Math.PI) { target -= Math.TAU; } while (target < this - Math.PI) { target += Math.TAU; } return (target - this).clamp(-maxDelta, maxDelta) + this; }; /** Constrains a rotation to between -PI and PI. <code><pre> (9/4 * Math.PI).constrainRotation() => 0.7853981633974483 # this is (1/4) * Math.PI </pre></code> @name constrainRotation @methodOf Number# @type Number @returns This number constrained between -PI and PI. */ Number.prototype.constrainRotation = function() { var target; target = this; while (target > Math.PI) { target -= Math.TAU; } while (target < -Math.PI) { target += Math.TAU; } return target; }; /** The mathematical d operator. Useful for simulating dice rolls. @name d @methodOf Number# @type Number @returns The sum of rolling <code>this</code> many <code>sides</code>-sided dice */ Number.prototype.d = function(sides) { var sum; sum = 0; this.times(function() { return sum += rand(sides) + 1; }); return sum; }; /** The mathematical circle constant of 1 turn. @name TAU @fieldOf Math */ Math.TAU = 2 * Math.PI;; /** Checks whether an object is an array. <code><pre> Object.isArray([1, 2, 4]) => true Object.isArray({key: "value"}) => false </pre></code> @name isArray @methodOf Object @param {Object} object The object to check for array-ness. @type Boolean @returns A boolean expressing whether the object is an instance of Array */var __slice = Array.prototype.slice; Object.isArray = function(object) { return Object.prototype.toString.call(object) === '[object Array]'; }; /** Merges properties from objects into target without overiding. First come, first served. <code><pre> I = { a: 1 b: 2 c: 3 } Object.reverseMerge I, { c: 6 d: 4 } I => {a: 1, b:2, c:3, d: 4} </pre></code> @name reverseMerge @methodOf Object @param {Object} target The object to merge the properties into. @type Object @returns target */ Object.reverseMerge = function() { var name, object, objects, target, _i, _len; target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : []; for (_i = 0, _len = objects.length; _i < _len; _i++) { object = objects[_i]; for (name in object) { if (!target.hasOwnProperty(name)) { target[name] = object[name]; } } } return target; }; /** Merges properties from sources into target with overiding. Last in covers earlier properties. <code><pre> I = { a: 1 b: 2 c: 3 } Object.extend I, { c: 6 d: 4 } I => {a: 1, b:2, c:6, d: 4} </pre></code> @name extend @methodOf Object @param {Object} target The object to merge the properties into. @type Object @returns target */ Object.extend = function() { var name, source, sources, target, _i, _len; target = arguments[0], sources = 2 <= arguments.length ? __slice.call(arguments, 1) : []; for (_i = 0, _len = sources.length; _i < _len; _i++) { source = sources[_i]; for (name in source) { target[name] = source[name]; } } return target; };; (function() { /** Create a new point with given x and y coordinates. If no arguments are given defaults to (0, 0). @name Point @param {Number} [x] @param {Number} [y] @constructor */ var Point; Point = function(x, y) { return { __proto__: Point.prototype, /** The x coordinate of this point. @name x @fieldOf Point# */ x: x || 0, /** The y coordinate of this point. @name y @fieldOf Point# */ y: y || 0 }; }; Point.prototype = { /** Creates a copy of this point. @name copy @methodOf Point# @type Point @returns A new point with the same x and y value as this point. <code><pre> point = Point(1, 1) pointCopy = point.copy() point.equal(pointCopy) => true point == pointCopy => false </pre></code> */ copy: function() { return Point(this.x, this.y); }, /** Adds a point to this one and returns the new point. You may also use a two argument call like <code>point.add(x, y)</code> to add x and y values without a second point object. @name add @methodOf Point# @param {Point} other The point to add this point to. @returns A new point, the sum of both. @type Point */ add: function(first, second) { return this.copy().add$(first, second); }, add$: function(first, second) { if (second != null) { this.x += first; this.y += second; } else { this.x += first.x; this.y += first.y; } return this; }, /** Subtracts a point to this one and returns the new point. @name subtract @methodOf Point# @param {Point} other The point to subtract from this point. @returns A new point, this - other. @type Point */ subtract: function(first, second) { return this.copy().subtract$(first, second); }, subtract$: function(first, second) { if (second != null) { this.x -= first; this.y -= second; } else { this.x -= first.x; this.y -= first.y; } return this; }, /** Scale this Point (Vector) by a constant amount. @name scale @methodOf Point# @param {Number} scalar The amount to scale this point by. @returns A new point, this * scalar. @type Point */ scale: function(scalar) { return this.copy().scale$(scalar); }, scale$: function(scalar) { this.x *= scalar; this.y *= scalar; return this; }, /** The norm of a vector is the unit vector pointing in the same direction. This method treats the point as though it is a vector from the origin to (x, y). @name norm @methodOf Point# @returns The unit vector pointing in the same direction as this vector. @type Point */ norm: function(length) { if (length == null) { length = 1.0; } return this.copy().norm$(length); }, norm$: function(length) { var m; if (length == null) { length = 1.0; } if (m = this.length()) { return this.scale$(length / m); } else { return this; } }, /** Floor the x and y values, returning a new point. @name floor @methodOf Point# @returns A new point, with x and y values each floored to the largest previous integer. @type Point */ floor: function() { return this.copy().floor$(); }, floor$: function() { this.x = this.x.floor(); this.y = this.y.floor(); return this; }, /** Determine whether this point is equal to another point. @name equal @methodOf Point# @param {Point} other The point to check for equality. @returns true if the other point has the same x, y coordinates, false otherwise. @type Boolean */ equal: function(other) { return this.x === other.x && this.y === other.y; }, /** Computed the length of this point as though it were a vector from (0,0) to (x,y) @name length @methodOf Point# @returns The length of the vector from the origin to this point. @type Number */ length: function() { return Math.sqrt(this.dot(this)); }, /** Calculate the magnitude of this Point (Vector). @name magnitude @methodOf Point# @returns The magnitude of this point as if it were a vector from (0, 0) -> (x, y). @type Number */ magnitude: function() { return this.length(); }, /** Returns the direction in radians of this point from the origin. @name direction @methodOf Point# @type Number */ direction: function() { return Math.atan2(this.y, this.x); }, /** Calculate the dot product of this point and another point (Vector). @name dot @methodOf Point# @param {Point} other The point to dot with this point. @returns The dot product of this point dot other as a scalar value. @type Number */ dot: function(other) { return this.x * other.x + this.y * other.y; }, /** Calculate the cross product of this point and another point (Vector). Usually cross products are thought of as only applying to three dimensional vectors, but z can be treated as zero. The result of this method is interpreted as the magnitude of the vector result of the cross product between [x1, y1, 0] x [x2, y2, 0] perpendicular to the xy plane. @name cross @methodOf Point# @param {Point} other The point to cross with this point. @returns The cross product of this point with the other point as scalar value. @type Number */ cross: function(other) { return this.x * other.y - other.x * this.y; }, /** Computed the Euclidean between this point and another point. @name distance @methodOf Point# @param {Point} other The point to compute the distance to. @returns The distance between this point and another point. @type Number */ distance: function(other) { return Point.distance(this, other); } /** @name distance @methodOf Point @param {Point} p1 @param {Point} p2 @type Number @returns The Euclidean distance between two points. */ }; Point.distance = function(p1, p2) { return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)); }; /** Construct a point on the unit circle for the given angle. @name fromAngle @methodOf Point @param {Number} angle The angle in radians @type Point @returns The point on the unit circle. */ Point.fromAngle = function(angle) { return Point(Math.cos(angle), Math.sin(angle)); }; /** If you have two dudes, one standing at point p1, and the other standing at point p2, then this method will return the direction that the dude standing at p1 will need to face to look at p2. @name direction @methodOf Point @param {Point} p1 The starting point. @param {Point} p2 The ending point. @type Number @returns The direction from p1 to p2 in radians. */ Point.direction = function(p1, p2) { return Math.atan2(p2.y - p1.y, p2.x - p1.x); }; /** @name ZERO @fieldOf Point @type Point */ Point.ZERO = Point(); if (Object.freeze) { Object.freeze(Point.ZERO); } return (typeof exports !== "undefined" && exports !== null ? exports : this)["Point"] = Point; })();; (function() { /** @name Random @namespace Some useful methods for generating random things. */ (typeof exports !== "undefined" && exports !== null ? exports : this)["Random"] = { /** Returns a random angle, uniformly distributed, between 0 and 2pi. @name angle @methodOf Random @type Number */ angle: function() { return rand() * Math.TAU; }, color: function() { return Color.random(); }, often: function() { return rand(3); }, sometimes: function() { return !rand(3); } /** Returns random integers from [0, n) if n is given. Otherwise returns random float between 0 and 1. @name rand @methodOf window @param {Number} n @type Number */ }; return (typeof exports !== "undefined" && exports !== null ? exports : this)["rand"] = function(n) { if (n) { return Math.floor(n * Math.random()); } else { return Math.random(); } }; })();; /** Returns true if this string only contains whitespace characters. @name blank @methodOf String# @returns Whether or not this string is blank. @type Boolean */String.prototype.blank = function() { return /^\s*$/.test(this); }; /** Returns a new string that is a camelCase version. @name camelize @methodOf String# */ String.prototype.camelize = function() { return this.trim().replace(/(\-|_|\s)+(.)?/g, function(match, separator, chr) { if (chr) { return chr.toUpperCase(); } else { return ''; } }); }; /** Returns a new string with the first letter capitalized and the rest lower cased. @name capitalize @methodOf String# */ String.prototype.capitalize = function() { return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); }; /** Return the class or constant named in this string. @name constantize @methodOf String# @returns The class or constant named in this string. @type Object */ String.prototype.constantize = function() { if (this.match(/[A-Z][A-Za-z0-9]*/)) { eval("var that = " + this); return that; } else { throw "String#constantize: '" + this + "' is not a valid constant name."; } }; /** Returns a new string that is a more human readable version. @name humanize @methodOf String# */ String.prototype.humanize = function() { return this.replace(/_id$/, "").replace(/_/g, " ").capitalize(); }; /** Returns true. @name isString @methodOf String# @type Boolean @returns true */ String.prototype.isString = function() { return true; }; /** Parse this string as though it is JSON and return the object it represents. If it is not valid JSON returns the string itself. @name parse @methodOf String# @returns Returns an object from the JSON this string contains. If it is not valid JSON returns the string itself. @type Object */ String.prototype.parse = function() { try { return JSON.parse(this.toString()); } catch (e) { return this.toString(); } }; /** Returns a new string in Title Case. @name titleize @methodOf String# */ String.prototype.titleize = function() { return this.split(/[- ]/).map(function(word) { return word.capitalize(); }).join(' '); }; /** Underscore a word, changing camelCased with under_scored. @name underscore @methodOf String# */ String.prototype.underscore = function() { return this.replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2').replace(/([a-z\d])([A-Z])/g, '$1_$2').replace(/-/g, '_').toLowerCase(); }; /** Assumes the string is something like a file name and returns the contents of the string without the extension. "neat.png".witouthExtension() => "neat" @name withoutExtension @methodOf String# */ String.prototype.withoutExtension = function() { return this.replace(/\.[^\.]*$/, ''); };; /** Non-standard @name toSource @methodOf Boolean# */ /** Returns a string representing the specified Boolean object. <code><em>bool</em>.toString()</code> @name toString @methodOf Boolean# */ /** Returns the primitive value of a Boolean object. <code><em>bool</em>.valueOf()</code> @name valueOf @methodOf Boolean# */ /** Returns a string representing the Number object in exponential notation <code><i>number</i>.toExponential( [<em>fractionDigits</em>] )</code> @param fractionDigits An integer specifying the number of digits after the decimal point. Defaults to as many digits as necessary to specify the number. @name toExponential @methodOf Number# */ /** Formats a number using fixed-point notation <code><i>number</i>.toFixed( [<em>digits</em>] )</code> @param digits The number of digits to appear after the decimal point; this may be a value between 0 and 20, inclusive, and implementations may optionally support a larger range of values. If this argument is omitted, it is treated as 0. @name toFixed @methodOf Number# */ /** number.toLocaleString(); @name toLocaleString @methodOf Number# */ /** Returns a string representing the Number object to the specified precision. <code><em>number</em>.toPrecision( [ <em>precision</em> ] )</code> @param precision An integer specifying the number of significant digits. @name toPrecision @methodOf Number# */ /** Non-standard @name toSource @methodOf Number# */ /** Returns a string representing the specified Number object <code><i>number</i>.toString( [<em>radix</em>] )</code> @param radix An integer between 2 and 36 specifying the base to use for representing numeric values. @name toString @methodOf Number# */ /** Returns the primitive value of a Number object. @name valueOf @methodOf Number# */ /** Returns the specified character from a string. <code><em>string</em>.charAt(<em>index</em>)</code> @param index An integer between 0 and 1 less than the length of the string. @name charAt @methodOf String# */ /** Returns the numeric Unicode value of the character at the given index (except for unicode codepoints > 0x10000). @param index An integer greater than 0 and less than the length of the string; if it is not a number, it defaults to 0. @name charCodeAt @methodOf String# */ /** Combines the text of two or more strings and returns a new string. <code><em>string</em>.concat(<em>string2</em>, <em>string3</em>[, ..., <em>stringN</em>])</code> @param string2...stringN Strings to concatenate to this string. @name concat @methodOf String# */ /** Returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex, returns -1 if the value is not found. <code><em>string</em>.indexOf(<em>searchValue</em>[, <em>fromIndex</em>]</code> @param searchValue A string representing the value to search for. @param fromIndex The location within the calling string to start the search from. It can be any integer between 0 and the length of the string. The default value is 0. @name indexOf @methodOf String# */ /** Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found. The calling string is searched backward, starting at fromIndex. <code><em>string</em>.lastIndexOf(<em>searchValue</em>[, <em>fromIndex</em>])</code> @param searchValue A string representing the value to search for. @param fromIndex The location within the calling string to start the search from, indexed from left to right. It can be any integer between 0 and the length of the string. The default value is the length of the string. @name lastIndexOf @methodOf String# */ /** Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order. <code> localeCompare(compareString) </code> @name localeCompare @methodOf String# */ /** Used to retrieve the matches when matching a string against a regular expression. <code><em>string</em>.match(<em>regexp</em>)</code> @param regexp A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj). @name match @methodOf String# */ /** Non-standard @name quote @methodOf String# */ /** Returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a RegExp, and the replacement can be a string or a function to be called for each match. <code><em>str</em>.replace(<em>regexp|substr</em>, <em>newSubStr|function[</em>, </code><code><em>flags]</em>);</code> @param regexp A RegExp object. The match is replaced by the return value of parameter #2. @param substr A String that is to be replaced by newSubStr. @param newSubStr The String that replaces the substring received from parameter #1. A number of special replacement patterns are supported; see the "Specifying a string as a parameter" section below. @param function A function to be invoked to create the new substring (to put in place of the substring received from parameter #1). The arguments supplied to this function are described in the "Specifying a function as a parameter" section below. @param flags gimy Non-standardThe use of the flags parameter in the String.replace method is non-standard. For cross-browser compatibility, use a RegExp object with corresponding flags.A string containing any combination of the RegExp flags: g global match i ignore case m match over multiple lines y Non-standard sticky global matchignore casematch over multiple linesNon-standard sticky @name replace @methodOf String# */ /** Executes the search for a match between a regular expression and this String object. <code><em>string</em>.search(<em>regexp</em>)</code> @param regexp A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj). @name search @methodOf String# */ /** Extracts a section of a string and returns a new string. <code><em>string</em>.slice(<em>beginslice</em>[, <em>endSlice</em>])</code> @param beginSlice The zero-based index at which to begin extraction. @param endSlice The zero-based index at which to end extraction. If omitted, slice extracts to the end of the string. @name slice @methodOf String# */ /** Splits a String object into an array of strings by separating the string into substrings. <code><em>string</em>.split([<em>separator</em>][, <em>limit</em>])</code> @param separator Specifies the character to use for separating the string. The separator is treated as a string or a regular expression. If separator is omitted, the array returned contains one element consisting of the entire string. @param limit Integer specifying a limit on the number of splits to be found. @name split @methodOf String# */ /** Returns the characters in a string beginning at the specified location through the specified number of characters. <code><em>string</em>.substr(<em>start</em>[, <em>length</em>])</code> @param start Location at which to begin extracting characters. @param length The number of characters to extract. @name substr @methodOf String# */ /** Returns a subset of a string between one index and another, or through the end of the string. <code><em>string</em>.substring(<em>indexA</em>[, <em>indexB</em>])</code> @param indexA An integer between 0 and one less than the length of the string. @param indexB (optional) An integer between 0 and the length of the string. @name substring @methodOf String# */ /** Returns the calling string value converted to lower case, according to any locale-specific case mappings. <code> toLocaleLowerCase() </code> @name toLocaleLowerCase @methodOf String# */ /** Returns the calling string value converted to upper case, according to any locale-specific case mappings. <code> toLocaleUpperCase() </code> @name toLocaleUpperCase @methodOf String# */ /** Returns the calling string value converted to lowercase. <code><em>string</em>.toLowerCase()</code> @name toLowerCase @methodOf String# */ /** Non-standard @name toSource @methodOf String# */ /** Returns a string representing the specified object. <code><em>string</em>.toString()</code> @name toString @methodOf String# */ /** Returns the calling string value converted to uppercase. <code><em>string</em>.toUpperCase()</code> @name toUpperCase @methodOf String# */ /** Removes whitespace from both ends of the string. <code><em>string</em>.trim()</code> @name trim @methodOf String# */ /** Non-standard @name trimLeft @methodOf String# */ /** Non-standard @name trimRight @methodOf String# */ /** Returns the primitive value of a String object. <code><em>string</em>.valueOf()</code> @name valueOf @methodOf String# */ /** Non-standard @name anchor @methodOf String# */ /** Non-standard @name big @methodOf String# */ /** Non-standard <code>BLINK</code> @name blink @methodOf String# */ /** Non-standard @name bold @methodOf String# */ /** Non-standard @name fixed @methodOf String# */ /** Non-standard <code><FONT COLOR="<i>color</i>"></code> @name fontcolor @methodOf String# */ /** Non-standard <code><FONT SIZE="<i>size</i>"></code> @name fontsize @methodOf String# */ /** Non-standard @name italics @methodOf String# */ /** Non-standard @name link @methodOf String# */ /** Non-standard @name small @methodOf String# */ /** Non-standard @name strike @methodOf String# */ /** Non-standard @name sub @methodOf String# */ /** Non-standard @name sup @methodOf String# */ /** Removes the last element from an array and returns that element. <code> <i>array</i>.pop() </code> @name pop @methodOf Array# */ /** Mutates an array by appending the given elements and returning the new length of the array. <code><em>array</em>.push(<em>element1</em>, ..., <em>elementN</em>)</code> @param element1, ..., elementN The elements to add to the end of the array. @name push @methodOf Array# */ /** Reverses an array in place. The first array element becomes the last and the last becomes the first. <code><em>array</em>.reverse()</code> @name reverse @methodOf Array# */ /** Removes the first element from an array and returns that element. This method changes the length of the array. <code><em>array</em>.shift()</code> @name shift @methodOf Array# */ /** Sorts the elements of an array in place. <code><em>array</em>.sort([<em>compareFunction</em>])</code> @param compareFunction Specifies a function that defines the sort order. If omitted, the array is sorted lexicographically (in dictionary order) according to the string conversion of each element. @name sort @methodOf Array# */ /** Changes the content of an array, adding new elements while removing old elements. <code><em>array</em>.splice(<em>index</em>, <em>howMany</em>[, <em>element1</em>[, ...[, <em>elementN</em>]]])</code> @param index Index at which to start changing the array. If negative, will begin that many elements from the end. @param howMany An integer indicating the number of old array elements to remove. If howMany is 0, no elements are removed. In this case, you should specify at least one new element. If no howMany parameter is specified (second syntax above, which is a SpiderMonkey extension), all elements after index are removed. @param element1, ..., elementN The elements to add to the array. If you don't specify any elements, splice simply removes elements from the array. @name splice @methodOf Array# */ /** Adds one or more elements to the beginning of an array and returns the new length of the array. <code><em>arrayName</em>.unshift(<em>element1</em>, ..., <em>elementN</em>) </code> @param element1, ..., elementN The elements to add to the front of the array. @name unshift @methodOf Array# */ /** Returns a new array comprised of this array joined with other array(s) and/or value(s). <code><em>array</em>.concat(<em>value1</em>, <em>value2</em>, ..., <em>valueN</em>)</code> @param valueN Arrays and/or values to concatenate to the resulting array. @name concat @methodOf Array# */ /** Joins all elements of an array into a string. <code><em>array</em>.join(<em>separator</em>)</code> @param separator Specifies a string to separate each element of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma. @name join @methodOf Array# */ /** Returns a one-level deep copy of a portion of an array. <code><em>array</em>.slice(<em>begin</em>[, <em>end</em>])</code> @param begin Zero-based index at which to begin extraction.As a negative index, start indicates an offset from the end of the sequence. slice(-2) extracts the second-to-last element and the last element in the sequence. @param end Zero-based index at which to end extraction. slice extracts up to but not including end.slice(1,4) extracts the second element through the fourth element (elements indexed 1, 2, and 3).As a negative index, end indicates an offset from the end of the sequence. slice(2,-1) extracts the third element through the second-to-last element in the sequence.If end is omitted, slice extracts to the end of the sequence. @name slice @methodOf Array# */ /** Non-standard @name toSource @methodOf Array# */ /** Returns a string representing the specified array and its elements. <code><em>array</em>.toString()</code> @name toString @methodOf Array# */ /** Returns the first index at which a given element can be found in the array, or -1 if it is not present. <code><em>array</em>.indexOf(<em>searchElement</em>[, <em>fromIndex</em>])</code> @param searchElement fromIndex Element to locate in the array.The index at which to begin the search. Defaults to 0, i.e. the whole array will be searched. If the index is greater than or equal to the length of the array, -1 is returned, i.e. the array will not be searched. If negative, it is taken as the offset from the end of the array. Note that even when the index is negative, the array is still searched from front to back. If the calculated index is less than 0, the whole array will be searched. @name indexOf @methodOf Array# */ /** Returns the last index at which a given element can be found in the array, or -1 if it is not present. The array is searched backwards, starting at fromIndex. <code><em>array</em>.lastIndexOf(<em>searchElement</em>[, <em>fromIndex</em>])</code> @param searchElement fromIndex Element to locate in the array.The index at which to start searching backwards. Defaults to the array's length, i.e. the whole array will be searched. If the index is greater than or equal to the length of the array, the whole array will be searched. If negative, it is taken as the offset from the end of the array. Note that even when the index is negative, the array is still searched from back to front. If the calculated index is less than 0, -1 is returned, i.e. the array will not be searched. @name lastIndexOf @methodOf Array# */ /** Creates a new array with all elements that pass the test implemented by the provided function. <code><em>array</em>.filter(<em>callback</em>[, <em>thisObject</em>])</code> @param callback thisObject Function to test each element of the array.Object to use as this when executing callback. @name filter @methodOf Array# */ /** Executes a provided function once per array element. <code><em>array</em>.forEach(<em>callback</em>[, <em>thisObject</em>])</code> @param callback thisObject Function to execute for each element.Object to use as this when executing callback. @name forEach @methodOf Array# */ /** Tests whether all elements in the array pass the test implemented by the provided function. <code><em>array</em>.every(<em>callback</em>[, <em>thisObject</em>])</code> @param callbackthisObject Function to test for each element.Object to use as this when executing callback. @name every @methodOf Array# */ /** Creates a new array with the results of calling a provided function on every element in this array. <code><em>array</em>.map(<em>callback</em>[, <em>thisObject</em>])</code> @param callbackthisObject Function that produces an element of the new Array from an element of the current one.Object to use as this when executing callback. @name map @methodOf Array# */ /** Tests whether some element in the array passes the test implemented by the provided function. <code><em>array</em>.some(<em>callback</em>[, <em>thisObject</em>])</code> @param callback thisObject Function to test for each element.Object to use as this when executing callback. @name some @methodOf Array# */ /** Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value. <code><em>array</em>.reduce(<em>callback</em>[, <em>initialValue</em>])</code> @param callbackinitialValue Function to execute on each value in the array.Object to use as the first argument to the first call of the callback. @name reduce @methodOf Array# */ /** Apply a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value. <code><em>array</em>.reduceRight(<em>callback</em>[, <em>initialValue</em>])</code> @param callback initialValue Function to execute on each value in the array.Object to use as the first argument to the first call of the callback. @name reduceRight @methodOf Array# */ /** Returns a boolean indicating whether the object has the specified property. <code><em>obj</em>.hasOwnProperty(<em>prop</em>)</code> @param prop The name of the property to test. @name hasOwnProperty @methodOf Object# */ /** Calls a function with a given this value and arguments provided as an array. <code><em>fun</em>.apply(<em>thisArg</em>[, <em>argsArray</em>])</code> @param thisArg Determines the value of this inside fun. If thisArg is null or undefined, this will be the global object. Otherwise, this will be equal to Object(thisArg) (which is thisArg if thisArg is already an object, or a String, Boolean, or Number if thisArg is a primitive value of the corresponding type). Therefore, it is always true that typeof this == "object" when the function executes. @param argsArray An argument array for the object, specifying the arguments with which fun should be called, or null or undefined if no arguments should be provided to the function. @name apply @methodOf Function# */ /** Creates a new function that, when called, itself calls this function in the context of the provided this value, with a given sequence of arguments preceding any provided when the new function was called. <code><em>fun</em>.bind(<em>thisArg</em>[, <em>arg1</em>[, <em>arg2</em>[, ...]]])</code> @param thisValuearg1, arg2, ... The value to be passed as the this parameter to the target function when the bound function is called. The value is ignored if the bound function is constructed using the new operator.Arguments to prepend to arguments provided to the bound function when invoking the target function. @name bind @methodOf Function# */ /** Calls a function with a given this value and arguments provided individually. <code><em>fun</em>.call(<em>thisArg</em>[, <em>arg1</em>[, <em>arg2</em>[, ...]]])</code> @param thisArg Determines the value of this inside fun. If thisArg is null or undefined, this will be the global object. Otherwise, this will be equal to Object(thisArg) (which is thisArg if thisArg is already an object, or a String, Boolean, or Number if thisArg is a primitive value of the corresponding type). Therefore, it is always true that typeof this == "object" when the function executes. @param arg1, arg2, ... Arguments for the object. @name call @methodOf Function# */ /** Non-standard @name toSource @methodOf Function# */ /** Returns a string representing the source code of the function. <code><em>function</em>.toString(<em>indentation</em>)</code> @param indentation Non-standard The amount of spaces to indent the string representation of the source code. If indentation is less than or equal to -1, most unnecessary spaces are removed. @name toString @methodOf Function# */ /** Executes a search for a match in a specified string. Returns a result array, or null. @param regexp The name of the regular expression. It can be a variable name or a literal. @param str The string against which to match the regular expression. @name exec @methodOf RegExp# */ /** Executes the search for a match between a regular expression and a specified string. Returns true or false. <code> <em>regexp</em>.test([<em>str</em>]) </code> @param regexp The name of the regular expression. It can be a variable name or a literal. @param str The string against which to match the regular expression. @name test @methodOf RegExp# */ /** Non-standard @name toSource @methodOf RegExp# */ /** Returns a string representing the specified object. <code><i>regexp</i>.toString()</code> @name toString @methodOf RegExp# */ /** Returns a reference to the Date function that created the instance's prototype. Note that the value of this property is a reference to the function itself, not a string containing the function's name. @name constructor @methodOf Date# */ /** Returns the day of the month for the specified date according to local time. <code> getDate() </code> @name getDate @methodOf Date# */ /** Returns the day of the week for the specified date according to local time. <code> getDay() </code> @name getDay @methodOf Date# */ /** Returns the year of the specified date according to local time. <code> getFullYear() </code> @name getFullYear @methodOf Date# */ /** Returns the hour for the specified date according to local time. <code> getHours() </code> @name getHours @methodOf Date# */ /** Returns the milliseconds in the specified date according to local time. <code> getMilliseconds() </code> @name getMilliseconds @methodOf Date# */ /** Returns the minutes in the specified date according to local time. <code> getMinutes() </code> @name getMinutes @methodOf Date# */ /** Returns the month in the specified date according to local time. <code> getMonth() </code> @name getMonth @methodOf Date# */ /** Returns the seconds in the specified date according to local time. <code> getSeconds() </code> @name getSeconds @methodOf Date# */ /** Returns the numeric value corresponding to the time for the specified date according to universal time. <code> getTime() </code> @name getTime @methodOf Date# */ /** Returns the time-zone offset from UTC, in minutes, for the current locale. <code> getTimezoneOffset() </code> @name getTimezoneOffset @methodOf Date# */ /** Returns the day (date) of the month in the specified date according to universal time. <code> getUTCDate() </code> @name getUTCDate @methodOf Date# */ /** Returns the day of the week in the specified date according to universal time. <code> getUTCDay() </code> @name getUTCDay @methodOf Date# */ /** Returns the year in the specified date according to universal time. <code> getUTCFullYear() </code> @name getUTCFullYear @methodOf Date# */ /** Returns the hours in the specified date according to universal time. <code> getUTCHours </code> @name getUTCHours @methodOf Date# */ /** Returns the milliseconds in the specified date according to universal time. <code> getUTCMilliseconds() </code> @name getUTCMilliseconds @methodOf Date# */ /** Returns the minutes in the specified date according to universal time. <code> getUTCMinutes() </code> @name getUTCMinutes @methodOf Date# */ /** Returns the month of the specified date according to universal time. <code> getUTCMonth() </code> @name getUTCMonth @methodOf Date# */ /** Returns the seconds in the specified date according to universal time. <code> getUTCSeconds() </code> @name getUTCSeconds @methodOf Date# */ /** Deprecated @name getYear @methodOf Date# */ /** Sets the day of the month for a specified date according to local time. <code> setDate(<em>dayValue</em>) </code> @param dayValue An integer from 1 to 31, representing the day of the month. @name setDate @methodOf Date# */ /** Sets the full year for a specified date according to local time. <code> setFullYear(<i>yearValue</i>[, <i>monthValue</i>[, <em>dayValue</em>]]) </code> @param yearValue An integer specifying the numeric value of the year, for example, 1995. @param monthValue An integer between 0 and 11 representing the months January through December. @param dayValue An integer between 1 and 31 representing the day of the month. If you specify the dayValue parameter, you must also specify the monthValue. @name setFullYear @methodOf Date# */ /** Sets the hours for a specified date according to local time. <code> setHours(<i>hoursValue</i>[, <i>minutesValue</i>[, <i>secondsValue</i>[, <em>msValue</em>]]]) </code> @param hoursValue An integer between 0 and 23, representing the hour. @param minutesValue An integer between 0 and 59, representing the minutes. @param secondsValue An integer between 0 and 59, representing the seconds. If you specify the secondsValue parameter, you must also specify the minutesValue. @param msValue A number between 0 and 999, representing the milliseconds. If you specify the msValue parameter, you must also specify the minutesValue and secondsValue. @name setHours @methodOf Date# */ /** Sets the milliseconds for a specified date according to local time. <code> setMilliseconds(<i>millisecondsValue</i>) </code> @param millisecondsValue A number between 0 and 999, representing the milliseconds. @name setMilliseconds @methodOf Date# */ /** Sets the minutes for a specified date according to local time. <code> setMinutes(<i>minutesValue</i>[, <i>secondsValue</i>[, <em>msValue</em>]]) </code> @param minutesValue An integer between 0 and 59, representing the minutes. @param secondsValue An integer between 0 and 59, representing the seconds. If you specify the secondsValue parameter, you must also specify the minutesValue. @param msValue A number between 0 and 999, representing the milliseconds. If you specify the msValue parameter, you must also specify the minutesValue and secondsValue. @name setMinutes @methodOf Date# */ /** Set the month for a specified date according to local time. <code> setMonth(<i>monthValue</i>[, <em>dayValue</em>]) </code> @param monthValue An integer between 0 and 11 (representing the months January through December). @param dayValue An integer from 1 to 31, representing the day of the month. @name setMonth @methodOf Date# */ /** Sets the seconds for a specified date according to local time. <code> setSeconds(<i>secondsValue</i>[, <em>msValue</em>]) </code> @param secondsValue An integer between 0 and 59. @param msValue A number between 0 and 999, representing the milliseconds. @name setSeconds @methodOf Date# */ /** Sets the Date object to the time represented by a number of milliseconds since January 1, 1970, 00:00:00 UTC. <code> setTime(<i>timeValue</i>) </code> @param timeValue An integer representing the number of milliseconds since 1 January 1970, 00:00:00 UTC. @name setTime @methodOf Date# */ /** Sets the day of the month for a specified date according to universal time. <code> setUTCDate(<i>dayValue</i>) </code> @param dayValue An integer from 1 to 31, representing the day of the month. @name setUTCDate @methodOf Date# */ /** Sets the full year for a specified date according to universal time. <code> setUTCFullYear(<i>yearValue</i>[, <i>monthValue</i>[, <em>dayValue</em>]]) </code> @param yearValue An integer specifying the numeric value of the year, for example, 1995. @param monthValue An integer between 0 and 11 representing the months January through December. @param dayValue An integer between 1 and 31 representing the day of the month. If you specify the dayValue parameter, you must also specify the monthValue. @name setUTCFullYear @methodOf Date# */ /** Sets the hour for a specified date according to universal time. <code> setUTCHours(<i>hoursValue</i>[, <i>minutesValue</i>[, <i>secondsValue</i>[, <em>msValue</em>]]]) </code> @param hoursValue An integer between 0 and 23, representing the hour. @param minutesValue An integer between 0 and 59, representing the minutes. @param secondsValue An integer between 0 and 59, representing the seconds. If you specify the secondsValue parameter, you must also specify the minutesValue. @param msValue A number between 0 and 999, representing the milliseconds. If you specify the msValue parameter, you must also specify the minutesValue and secondsValue. @name setUTCHours @methodOf Date# */ /** Sets the milliseconds for a specified date according to universal time. <code> setUTCMilliseconds(<i>millisecondsValue</i>) </code> @param millisecondsValue A number between 0 and 999, representing the milliseconds. @name setUTCMilliseconds @methodOf Date# */ /** Sets the minutes for a specified date according to universal time. <code> setUTCMinutes(<i>minutesValue</i>[, <i>secondsValue</i>[, <em>msValue</em>]]) </code> @param minutesValue An integer between 0 and 59, representing the minutes. @param secondsValue An integer between 0 and 59, representing the seconds. If you specify the secondsValue parameter, you must also specify the minutesValue. @param msValue A number between 0 and 999, representing the milliseconds. If you specify the msValue parameter, you must also specify the minutesValue and secondsValue. @name setUTCMinutes @methodOf Date# */ /** Sets the month for a specified date according to universal time. <code> setUTCMonth(<i>monthValue</i>[, <em>dayValue</em>]) </code> @param monthValue An integer between 0 and 11, representing the months January through December. @param dayValue An integer from 1 to 31, representing the day of the month. @name setUTCMonth @methodOf Date# */ /** Sets the seconds for a specified date according to universal time. <code> setUTCSeconds(<i>secondsValue</i>[, <em>msValue</em>]) </code> @param secondsValue An integer between 0 and 59. @param msValue A number between 0 and 999, representing the milliseconds. @name setUTCSeconds @methodOf Date# */ /** Deprecated @name setYear @methodOf Date# */ /** Returns the date portion of a Date object in human readable form in American English. <code><em>date</em>.toDateString()</code> @name toDateString @methodOf Date# */ /** Returns a JSON representation of the Date object. <code><em>date</em>.prototype.toJSON()</code> @name toJSON @methodOf Date# */ /** Deprecated @name toGMTString @methodOf Date# */ /** Converts a date to a string, returning the "date" portion using the operating system's locale's conventions. <code> toLocaleDateString() </code> @name toLocaleDateString @methodOf Date# */ /** Non-standard @name toLocaleFormat @methodOf Date# */ /** Converts a date to a string, using the operating system's locale's conventions. <code> toLocaleString() </code> @name toLocaleString @methodOf Date# */ /** Converts a date to a string, returning the "time" portion using the current locale's conventions. <code> toLocaleTimeString() </code> @name toLocaleTimeString @methodOf Date# */ /** Non-standard @name toSource @methodOf Date# */ /** Returns a string representing the specified Date object. <code> toString() </code> @name toString @methodOf Date# */ /** Returns the time portion of a Date object in human readable form in American English. <code><em>date</em>.toTimeString()</code> @name toTimeString @methodOf Date# */ /** Converts a date to a string, using the universal time convention. <code> toUTCString() </code> @name toUTCString @methodOf Date# */ /** Returns the primitive value of a Date object. <code> valueOf() </code> @name valueOf @methodOf Date# */; /*! Math.uuid.js (v1.4) http://www.broofa.com mailto:robert@broofa.com Copyright (c) 2010 Robert Kieffer Dual licensed under the MIT and GPL licenses. */ /** Generate a random uuid. USAGE: Math.uuid(length, radix) EXAMPLES: // No arguments - returns RFC4122, version 4 ID Math.uuid() "92329D39-6F5C-4520-ABFC-AAB64544E172" // One argument - returns ID of the specified length Math.uuid(15) // 15 character ID (default base=62) "VcydxgltxrVZSTV" // Two arguments - returns ID of the specified length, and radix. (Radix must be <= 62) Math.uuid(8, 2) // 8 character ID (base=2) "01001010" Math.uuid(8, 10) // 8 character ID (base=10) "47473046" Math.uuid(8, 16) // 8 character ID (base=16) "098F4D35" @name uuid @methodOf Math @param length The desired number of characters @param radix The number of allowable values for each character. */ (function() { // Private array of chars to use var CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split(''); Math.uuid = function (len, radix) { var chars = CHARS, uuid = []; radix = radix || chars.length; if (len) { // Compact form for (var i = 0; i < len; i++) uuid[i] = chars[0 | Math.random()*radix]; } else { // rfc4122, version 4 form var r; // rfc4122 requires these characters uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; uuid[14] = '4'; // Fill in random data. At i==19 set the high bits of clock sequence as // per rfc4122, sec. 4.1.5 for (var i = 0; i < 36; i++) { if (!uuid[i]) { r = 0 | Math.random()*16; uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r]; } } } return uuid.join(''); }; // A more performant, but slightly bulkier, RFC4122v4 solution. We boost performance // by minimizing calls to random() Math.uuidFast = function() { var chars = CHARS, uuid = new Array(36), rnd=0, r; for (var i = 0; i < 36; i++) { if (i==8 || i==13 || i==18 || i==23) { uuid[i] = '-'; } else if (i==14) { uuid[i] = '4'; } else { if (rnd <= 0x02) rnd = 0x2000000 + (Math.random()*0x1000000)|0; r = rnd & 0xf; rnd = rnd >> 4; uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r]; } } return uuid.join(''); }; // A more compact, but less performant, RFC4122v4 solution: Math.uuidCompact = function() { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8); return v.toString(16); }).toUpperCase(); }; })();; ; ; /** The Bounded module is used to provide basic data about the location and dimensions of the including object. This module is included by default in <code>GameObject</code>. <code><pre> player = Core x: 10 y: 50 width: 20 height: 20 other: "stuff" more: "properties" player.position() => Uncaught TypeError: Object has no method 'position' player.include(Bounded) # now player has all the methods provided by this module player.position() => {x: 10, y: 50} </pre></code> @see GameObject Bounded module @name Bounded @module @constructor @param {Object} I Instance variables @param {Object} self Reference to including object */var Bounded; Bounded = function(I, self) { I || (I = {}); Object.reverseMerge(I, { x: 0, y: 0, width: 8, height: 8, collisionMargin: Point(0, 0) }); return { /** The position of this game object. By default it is the top left point. Redefining the center method will change the relative position. @returns The position of this object @type Point */ position: function() { return Point(I.x, I.y); }, /** Does a check to see if this object is overlapping with the bounds passed in. <code><pre> player = Core x: 4 y: 6 width: 20 height: 20 player.collides({x: 5, y: 7, width: 20, height: 20}) => true </pre></code> @returns The position of this object @type Point */ collides: function(bounds) { return Collision.rectangular(I, bounds); }, /** This returns a modified bounds based on the collision margin. The area of the bounds is reduced if collision margin is positive and increased if collision margin is negative. <code><pre> player = Core collisionMargin: x: -2 y: -4 x: 50 y: 50 width: 20 height: 20 player.collisionBounds() => {x: 38, y: 36 height: 28, width: 24} player.collisionBounds(10, 10) => {x: 48, y: 46 height: 28, width: 24} </pre></code> @name collisionBounds @methodOf Bounded# @param {number} xOffset the amount to shift the x position @param {number} yOffset the amount to shift the y position */ collisionBounds: function(xOffset, yOffset) { var bounds; bounds = self.bounds(xOffset, yOffset); bounds.x += I.collisionMargin.x; bounds.y += I.collisionMargin.y; bounds.width -= 2 * I.collisionMargin.x; bounds.height -= 2 * I.collisionMargin.y; return bounds; }, /** The bounds method returns infomation about the location of the object and its dimensions with optional offsets. <code><pre> player = Core x: 3 y: 6 width: 2 height: 2 player.include(Bounded) player.bounds() => {x: 3, y: 6, width: 2, height: 2} player.bounds(7, 4) => {x: 10, y: 10, width: 2, height: 2} </pre></code> @name bounds @methodOf Bounded# @param {number} xOffset the amount to shift the x position @param {number} yOffset the amount to shift the y position */ bounds: function(xOffset, yOffset) { var center; center = self.center(); return { x: center.x - I.width / 2 + (xOffset || 0), y: center.y - I.height / 2 + (yOffset || 0), width: I.width, height: I.height }; }, /** The centeredBounds method returns infomation about the center of the object along with the midpoint of the width and height. <code><pre> player = Core x: 3 y: 6 width: 2 height: 2 player.include(Bounded) player.centeredBounds() => {x: 4, y: 7, xw: 1, yw: 1} </pre></code> @name centeredBounds @methodOf Bounded# */ centeredBounds: function() { var center; center = self.center(); return { x: center.x, y: center.y, xw: I.width / 2, yw: I.height / 2 }; }, /** The center method returns the {@link Point} that is the center of the object. @name center @methodOf Bounded# */ center: function() { return self.position(); }, /** Return the circular bounds of the object. The circle is centered at the midpoint of the object. <code><pre> player = Core radius: 5 x: 50 y: 50 other: "stuff" player.include(Bounded) player.circle() => {radius: 5, x: 50, y: 50} </pre></code> @name circle @methodOf Bounded# */ circle: function() { var circle; circle = self.center(); circle.radius = I.radius || I.width / 2 || I.height / 2; return circle; } }; };; /** Collision holds many useful methods for checking geometric overlap of various objects. @name Collision @namespace */var Collision; Collision = { /** Takes two bounds objects and returns true if they collide (overlap), false otherwise. Bounds objects have x, y, width and height properties. @name rectangular @methodOf Collision @param a @param b */ rectangular: function(a, b) { return a.x < b.x + b.width && a.x + a.width > b.x && a.y < b.y + b.height && a.y + a.height > b.y; }, /** Takes two circle objects and returns true if they collide (overlap), false otherwise. Circle objects have x, y, and radius. @name circular @methodOf Collision @param a @param b */ circular: function(a, b) { var dx, dy, r; r = a.radius + b.radius; dx = b.x - a.x; dy = b.y - a.y; return r * r >= dx * dx + dy * dy; }, rayCircle: function(source, direction, target) { var dt, hit, intersection, intersectionToTarget, intersectionToTargetLength, laserToTarget, projection, projectionLength, radius; radius = target.radius(); target = target.position(); laserToTarget = target.subtract(source); projectionLength = direction.dot(laserToTarget); if (projectionLength < 0) { return false; } projection = direction.scale(projectionLength); intersection = source.add(projection); intersectionToTarget = target.subtract(intersection); intersectionToTargetLength = intersectionToTarget.length(); if (intersectionToTargetLength < radius) { hit = true; } if (hit) { dt = Math.sqrt(radius * radius - intersectionToTargetLength * intersectionToTargetLength); return hit = direction.scale(projectionLength - dt).add(source); } }, rayRectangle: function(source, direction, target) { var areaPQ0, areaPQ1, hit, p0, p1, t, tX, tY, xval, xw, yval, yw, _ref, _ref2; xw = target.xw; yw = target.yw; if (source.x < target.x) { xval = target.x - xw; } else { xval = target.x + xw; } if (source.y < target.y) { yval = target.y - yw; } else { yval = target.y + yw; } if (direction.x === 0) { p0 = Point(target.x - xw, yval); p1 = Point(target.x + xw, yval); t = (yval - source.y) / direction.y; } else if (direction.y === 0) { p0 = Point(xval, target.y - yw); p1 = Point(xval, target.y + yw); t = (xval - source.x) / direction.x; } else { tX = (xval - source.x) / direction.x; tY = (yval - source.y) / direction.y; if ((tX < tY || ((-xw < (_ref = source.x - target.x) && _ref < xw))) && !((-yw < (_ref2 = source.y - target.y) && _ref2 < yw))) { p0 = Point(target.x - xw, yval); p1 = Point(target.x + xw, yval); t = tY; } else { p0 = Point(xval, target.y - yw); p1 = Point(xval, target.y + yw); t = tX; } } if (t > 0) { areaPQ0 = direction.cross(p0.subtract(source)); areaPQ1 = direction.cross(p1.subtract(source)); if (areaPQ0 * areaPQ1 < 0) { return hit = direction.scale(t).add(source); } } } };; var __slice = Array.prototype.slice; (function() { var Color, channelize, hslParser, hslToRgb, lookup, names, normalizeKey, parseHSL, parseHex, parseRGB, rgbParser; rgbParser = /^rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),?\s*(\d?\.?\d*)?\)$/; hslParser = /^hsla?\((\d{1,3}),\s*(\d?\.?\d*),\s*(\d?\.?\d*),?\s*(\d?\.?\d*)?\)$/; parseRGB = function(colorString) { var channel, channels, parsedColor; if (!(channels = rgbParser.exec(colorString))) { return; } parsedColor = (function() { var _i, _len, _ref, _results; _ref = channels.slice(1, 4); _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { channel = _ref[_i]; _results.push(parseFloat(channel)); } return _results; })(); parsedColor[3] || (parsedColor[3] = 1); return parsedColor; }; parseHex = function(hexString) { var alpha, i, rgb; hexString = hexString.replace(/#/, ''); switch (hexString.length) { case 3: case 4: if (hexString.length === 4) { alpha = (parseInt(hexString.substr(3, 1), 16) * 0x11) / 255; } else { alpha = 1; } rgb = (function() { var _results; _results = []; for (i = 0; i <= 2; i++) { _results.push(parseInt(hexString.substr(i, 1), 16) * 0x11); } return _results; })(); rgb.push(alpha); return rgb; case 6: case 8: if (hexString.length === 8) { alpha = parseInt(hexString.substr(6, 2), 16) / 255; } else { alpha = 1; } rgb = (function() { var _results; _results = []; for (i = 0; i <= 2; i++) { _results.push(parseInt(hexString.substr(2 * i, 2), 16)); } return _results; })(); rgb.push(alpha); return rgb; } }; parseHSL = function(colorString) { var channel, channels, parsedColor; if (!(channels = hslParser.exec(colorString))) { return; } parsedColor = (function() { var _i, _len, _ref, _results; _ref = channels.slice(1, 4); _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { channel = _ref[_i]; _results.push(parseFloat(channel)); } return _results; })(); parsedColor[0] = parsedColor[0]; parsedColor[3] || (parsedColor[3] = 1); return hslToRgb(parsedColor); }; hslToRgb = function(hsl) { var a, b, channel, g, h, hueToRgb, l, p, q, r, rgbMap, s, _ref; _ref = (function() { var _i, _len, _results; _results = []; for (_i = 0, _len = hsl.length; _i < _len; _i++) { channel = hsl[_i]; _results.push(parseFloat(channel)); } return _results; })(), h = _ref[0], s = _ref[1], l = _ref[2], a = _ref[3]; h /= 360; a || (a = 1); r = g = b = null; hueToRgb = function(p, q, t) { if (t < 0) { t += 1; } if (t > 1) { t -= 1; } if (t < 1 / 6) { return p + (q - p) * 6 * t; } if (t < 1 / 2) { return q; } if (t < 2 / 3) { return p + (q - p) * (2 / 3 - t) * 6; } return p; }; if (s === 0) { r = g = b = l; } else { q = (l < 0.5 ? l * (1 + s) : l + s - l * s); p = 2 * l - q; r = hueToRgb(p, q, h + 1 / 3); g = hueToRgb(p, q, h); b = hueToRgb(p, q, h - 1 / 3); rgbMap = (function() { var _i, _len, _ref2, _results; _ref2 = [r, g, b]; _results = []; for (_i = 0, _len = _ref2.length; _i < _len; _i++) { channel = _ref2[_i]; _results.push((channel * 0xFF).round()); } return _results; })(); } return rgbMap.concat(a); }; normalizeKey = function(key) { return key.toString().toLowerCase().split(' ').join(''); }; channelize = function(color, alpha) { var channel, result; if (Object.isArray(color)) { if (alpha != null) { alpha = parseFloat(alpha); } else if (color[3] != null) { alpha = parseFloat(color[3]); } else { alpha = 1; } result = ((function() { var _i, _len, _ref, _results; _ref = color.slice(0, 3); _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { channel = _ref[_i]; _results.push(parseFloat(channel)); } return _results; })()).concat(alpha); } else { result = lookup[normalizeKey(color)] || parseHex(color) || parseRGB(color) || parseHSL(color); if (alpha != null) { result[3] = parseFloat(alpha); } } return result; }; Color = function() { var args, parsedColor; args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; parsedColor = (function() { switch (args.length) { case 0: return [0, 0, 0, 1]; case 1: return channelize(args.first()); case 2: return channelize(args.first(), args.last()); default: return channelize(args); } })(); if (!parsedColor) { throw "" + (args.join(',')) + " is an unknown color"; } return { __proto__: Color.prototype, r: parsedColor[0].round(), g: parsedColor[1].round(), b: parsedColor[2].round(), a: parsedColor[3] }; }; Color.prototype = { complement: function() { return this.copy().complement$(); }, complement$: function() { return this.hue$(180); }, copy: function() { return Color(this.r, this.g, this.b, this.a); }, darken: function(amount) { return this.copy().darken$(amount); }, darken$: function(amount) { var hsl, _ref; hsl = this.toHsl(); hsl[2] -= amount; _ref = hslToRgb(hsl), this.r = _ref[0], this.g = _ref[1], this.b = _ref[2], this.a = _ref[3]; return this; }, desaturate: function(amount) { return this.copy().desaturate$(amount); }, desaturate$: function(amount) { var hsl, _ref; hsl = this.toHsl(); hsl[1] -= amount; _ref = hslToRgb(hsl), this.r = _ref[0], this.g = _ref[1], this.b = _ref[2], this.a = _ref[3]; return this; }, equal: function(other) { return other.r === this.r && other.g === this.g && other.b === this.b && other.a === this.a; }, grayscale: function() { return this.copy().grayscale$(); }, grayscale$: function() { var g, hsl; hsl = this.toHsl(); g = (hsl[2] * 255).round(); this.r = this.g = this.b = g; return this; }, hue: function(degrees) { return this.copy().hue$(degrees); }, hue$: function(degrees) { var hsl, _ref; hsl = this.toHsl(); hsl[0] = (hsl[0] + degrees).mod(360); _ref = hslToRgb(hsl), this.r = _ref[0], this.g = _ref[1], this.b = _ref[2], this.a = _ref[3]; return this; }, lighten: function(amount) { return this.copy().lighten$(amount); }, lighten$: function(amount) { var hsl, _ref; hsl = this.toHsl(); hsl[2] += amount; _ref = hslToRgb(hsl), this.r = _ref[0], this.g = _ref[1], this.b = _ref[2], this.a = _ref[3]; return this; }, mixWith: function(other, amount) { return this.copy().mixWith$(other, amount); }, mixWith$: function(other, amount) { var _ref, _ref2; amount || (amount = 0.5); _ref = [this.r, this.g, this.b, this.a].zip([other.r, other.g, other.b, other.a]).map(function(array) { return (array[0] * amount) + (array[1] * (1 - amount)); }), this.r = _ref[0], this.g = _ref[1], this.b = _ref[2], this.a = _ref[3]; _ref2 = [this.r, this.g, this.b].map(function(color) { return color.round(); }), this.r = _ref2[0], this.g = _ref2[1], this.b = _ref2[2]; return this; }, saturate: function(amount) { return this.copy().saturate$(amount); }, saturate$: function(amount) { var hsl, _ref; hsl = this.toHsl(); hsl[1] += amount; _ref = hslToRgb(hsl), this.r = _ref[0], this.g = _ref[1], this.b = _ref[2], this.a = _ref[3]; return this; }, toHex: function() { var hexFromNumber, padString; padString = function(hexString) { var pad; if (hexString.length === 1) { pad = "0"; } else { pad = ""; } return pad + hexString; }; hexFromNumber = function(number) { return padString(number.toString(16)); }; return "#" + (hexFromNumber(this.r)) + (hexFromNumber(this.g)) + (hexFromNumber(this.b)); }, toHsl: function() { var b, channel, chroma, g, hue, lightness, max, min, r, saturation, _ref, _ref2; _ref = (function() { var _i, _len, _ref, _results; _ref = [this.r, this.g, this.b]; _results = []; for (_i = 0, _len = _ref.length; _i < _len; _i++) { channel = _ref[_i]; _results.push(channel / 255); } return _results; }).call(this), r = _ref[0], g = _ref[1], b = _ref[2]; _ref2 = [r, g, b].extremes(), min = _ref2.min, max = _ref2.max; hue = saturation = lightness = (max + min) / 2; if (max === min) { hue = saturation = 0; } else { chroma = max - min; saturation = lightness > 0.5 ? chroma / (1 - lightness) : chroma / lightness; saturation /= 2; switch (max) { case r: hue = ((g - b) / chroma) + 0; break; case g: hue = ((b - r) / chroma) + 2; break; case b: hue = ((r - g) / chroma) + 4; } hue *= 60; } return [hue, saturation, lightness, this.a]; }, toString: function() { return "rgba(" + this.r + ", " + this.g + ", " + this.b + ", " + this.a + ")"; } }; lookup = {}; names = [["000000", "Black"], ["000080", "Navy Blue"], ["0000C8", "Dark Blue"], ["0000FF", "Blue"], ["000741", "Stratos"], ["001B1C", "Swamp"], ["002387", "Resolution Blue"], ["002900", "Deep Fir"], ["002E20", "Burnham"], ["002FA7", "International Klein Blue"], ["003153", "Prussian Blue"], ["003366", "Midnight Blue"], ["003399", "Smalt"], ["003532", "Deep Teal"], ["003E40", "Cyprus"], ["004620", "Kaitoke Green"], ["0047AB", "Cobalt"], ["004816", "Crusoe"], ["004950", "Sherpa Blue"], ["0056A7", "Endeavour"], ["00581A", "Camarone"], ["0066CC", "Science Blue"], ["0066FF", "Blue Ribbon"], ["00755E", "Tropical Rain Forest"], ["0076A3", "Allports"], ["007BA7", "Deep Cerulean"], ["007EC7", "Lochmara"], ["007FFF", "Azure Radiance"], ["008080", "Teal"], ["0095B6", "Bondi Blue"], ["009DC4", "Pacific Blue"], ["00A693", "Persian Green"], ["00A86B", "Jade"], ["00CC99", "Caribbean Green"], ["00CCCC", "Robin's Egg Blue"], ["00FF00", "Green"], ["00FF7F", "Spring Green"], ["00FFFF", "Cyan / Aqua"], ["010D1A", "Blue Charcoal"], ["011635", "Midnight"], ["011D13", "Holly"], ["012731", "Daintree"], ["01361C", "Cardin Green"], ["01371A", "County Green"], ["013E62", "Astronaut Blue"], ["013F6A", "Regal Blue"], ["014B43", "Aqua Deep"], ["015E85", "Orient"], ["016162", "Blue Stone"], ["016D39", "Fun Green"], ["01796F", "Pine Green"], ["017987", "Blue Lagoon"], ["01826B", "Deep Sea"], ["01A368", "Green Haze"], ["022D15", "English Holly"], ["02402C", "Sherwood Green"], ["02478E", "Congress Blue"], ["024E46", "Evening Sea"], ["026395", "Bahama Blue"], ["02866F", "Observatory"], ["02A4D3", "Cerulean"], ["03163C", "Tangaroa"], ["032B52", "Green Vogue"], ["036A6E", "Mosque"], ["041004", "Midnight Moss"], ["041322", "Black Pearl"], ["042E4C", "Blue Whale"], ["044022", "Zuccini"], ["044259", "Teal Blue"], ["051040", "Deep Cove"], ["051657", "Gulf Blue"], ["055989", "Venice Blue"], ["056F57", "Watercourse"], ["062A78", "Catalina Blue"], ["063537", "Tiber"], ["069B81", "Gossamer"], ["06A189", "Niagara"], ["073A50", "Tarawera"], ["080110", "Jaguar"], ["081910", "Black Bean"], ["082567", "Deep Sapphire"], ["088370", "Elf Green"], ["08E8DE", "Bright Turquoise"], ["092256", "Downriver"], ["09230F", "Palm Green"], ["09255D", "Madison"], ["093624", "Bottle Green"], ["095859", "Deep Sea Green"], ["097F4B", "Salem"], ["0A001C", "Black Russian"], ["0A480D", "Dark Fern"], ["0A6906", "Japanese Laurel"], ["0A6F75", "Atoll"], ["0B0B0B", "Cod Gray"], ["0B0F08", "Marshland"], ["0B1107", "Gordons Green"], ["0B1304", "Black Forest"], ["0B6207", "San Felix"], ["0BDA51", "Malachite"], ["0C0B1D", "Ebony"], ["0C0D0F", "Woodsmoke"], ["0C1911", "Racing Green"], ["0C7A79", "Surfie Green"], ["0C8990", "Blue Chill"], ["0D0332", "Black Rock"], ["0D1117", "Bunker"], ["0D1C19", "Aztec"], ["0D2E1C", "Bush"], ["0E0E18", "Cinder"], ["0E2A30", "Firefly"], ["0F2D9E", "Torea Bay"], ["10121D", "Vulcan"], ["101405", "Green Waterloo"], ["105852", "Eden"], ["110C6C", "Arapawa"], ["120A8F", "Ultramarine"], ["123447", "Elephant"], ["126B40", "Jewel"], ["130000", "Diesel"], ["130A06", "Asphalt"], ["13264D", "Blue Zodiac"], ["134F19", "Parsley"], ["140600", "Nero"], ["1450AA", "Tory Blue"], ["151F4C", "Bunting"], ["1560BD", "Denim"], ["15736B", "Genoa"], ["161928", "Mirage"], ["161D10", "Hunter Green"], ["162A40", "Big Stone"], ["163222", "Celtic"], ["16322C", "Timber Green"], ["163531", "Gable Green"], ["171F04", "Pine Tree"], ["175579", "Chathams Blue"], ["182D09", "Deep Forest Green"], ["18587A", "Blumine"], ["19330E", "Palm Leaf"], ["193751", "Nile Blue"], ["1959A8", "Fun Blue"], ["1A1A68", "Lucky Point"], ["1AB385", "Mountain Meadow"], ["1B0245", "Tolopea"], ["1B1035", "Haiti"], ["1B127B", "Deep Koamaru"], ["1B1404", "Acadia"], ["1B2F11", "Seaweed"], ["1B3162", "Biscay"], ["1B659D", "Matisse"], ["1C1208", "Crowshead"], ["1C1E13", "Rangoon Green"], ["1C39BB", "Persian Blue"], ["1C402E", "Everglade"], ["1C7C7D", "Elm"], ["1D6142", "Green Pea"], ["1E0F04", "Creole"], ["1E1609", "Karaka"], ["1E1708", "El Paso"], ["1E385B", "Cello"], ["1E433C", "Te Papa Green"], ["1E90FF", "Dodger Blue"], ["1E9AB0", "Eastern Blue"], ["1F120F", "Night Rider"], ["1FC2C2", "Java"], ["20208D", "Jacksons Purple"], ["202E54", "Cloud Burst"], ["204852", "Blue Dianne"], ["211A0E", "Eternity"], ["220878", "Deep Blue"], ["228B22", "Forest Green"], ["233418", "Mallard"], ["240A40", "Violet"], ["240C02", "Kilamanjaro"], ["242A1D", "Log Cabin"], ["242E16", "Black Olive"], ["24500F", "Green House"], ["251607", "Graphite"], ["251706", "Cannon Black"], ["251F4F", "Port Gore"], ["25272C", "Shark"], ["25311C", "Green Kelp"], ["2596D1", "Curious Blue"], ["260368", "Paua"], ["26056A", "Paris M"], ["261105", "Wood Bark"], ["261414", "Gondola"], ["262335", "Steel Gray"], ["26283B", "Ebony Clay"], ["273A81", "Bay of Many"], ["27504B", "Plantation"], ["278A5B", "Eucalyptus"], ["281E15", "Oil"], ["283A77", "Astronaut"], ["286ACD", "Mariner"], ["290C5E", "Violent Violet"], ["292130", "Bastille"], ["292319", "Zeus"], ["292937", "Charade"], ["297B9A", "Jelly Bean"], ["29AB87", "Jungle Green"], ["2A0359", "Cherry Pie"], ["2A140E", "Coffee Bean"], ["2A2630", "Baltic Sea"], ["2A380B", "Turtle Green"], ["2A52BE", "Cerulean Blue"], ["2B0202", "Sepia Black"], ["2B194F", "Valhalla"], ["2B3228", "Heavy Metal"], ["2C0E8C", "Blue Gem"], ["2C1632", "Revolver"], ["2C2133", "Bleached Cedar"], ["2C8C84", "Lochinvar"], ["2D2510", "Mikado"], ["2D383A", "Outer Space"], ["2D569B", "St Tropaz"], ["2E0329", "Jacaranda"], ["2E1905", "Jacko Bean"], ["2E3222", "Rangitoto"], ["2E3F62", "Rhino"], ["2E8B57", "Sea Green"], ["2EBFD4", "Scooter"], ["2F270E", "Onion"], ["2F3CB3", "Governor Bay"], ["2F519E", "Sapphire"], ["2F5A57", "Spectra"], ["2F6168", "Casal"], ["300529", "Melanzane"], ["301F1E", "Cocoa Brown"], ["302A0F", "Woodrush"], ["304B6A", "San Juan"], ["30D5C8", "Turquoise"], ["311C17", "Eclipse"], ["314459", "Pickled Bluewood"], ["315BA1", "Azure"], ["31728D", "Calypso"], ["317D82", "Paradiso"], ["32127A", "Persian Indigo"], ["32293A", "Blackcurrant"], ["323232", "Mine Shaft"], ["325D52", "Stromboli"], ["327C14", "Bilbao"], ["327DA0", "Astral"], ["33036B", "Christalle"], ["33292F", "Thunder"], ["33CC99", "Shamrock"], ["341515", "Tamarind"], ["350036", "Mardi Gras"], ["350E42", "Valentino"], ["350E57", "Jagger"], ["353542", "Tuna"], ["354E8C", "Chambray"], ["363050", "Martinique"], ["363534", "Tuatara"], ["363C0D", "Waiouru"], ["36747D", "Ming"], ["368716", "La Palma"], ["370202", "Chocolate"], ["371D09", "Clinker"], ["37290E", "Brown Tumbleweed"], ["373021", "Birch"], ["377475", "Oracle"], ["380474", "Blue Diamond"], ["381A51", "Grape"], ["383533", "Dune"], ["384555", "Oxford Blue"], ["384910", "Clover"], ["394851", "Limed Spruce"], ["396413", "Dell"], ["3A0020", "Toledo"], ["3A2010", "Sambuca"], ["3A2A6A", "Jacarta"], ["3A686C", "William"], ["3A6A47", "Killarney"], ["3AB09E", "Keppel"], ["3B000B", "Temptress"], ["3B0910", "Aubergine"], ["3B1F1F", "Jon"], ["3B2820", "Treehouse"], ["3B7A57", "Amazon"], ["3B91B4", "Boston Blue"], ["3C0878", "Windsor"], ["3C1206", "Rebel"], ["3C1F76", "Meteorite"], ["3C2005", "Dark Ebony"], ["3C3910", "Camouflage"], ["3C4151", "Bright Gray"], ["3C4443", "Cape Cod"], ["3C493A", "Lunar Green"], ["3D0C02", "Bean "], ["3D2B1F", "Bistre"], ["3D7D52", "Goblin"], ["3E0480", "Kingfisher Daisy"], ["3E1C14", "Cedar"], ["3E2B23", "English Walnut"], ["3E2C1C", "Black Marlin"], ["3E3A44", "Ship Gray"], ["3EABBF", "Pelorous"], ["3F2109", "Bronze"], ["3F2500", "Cola"], ["3F3002", "Madras"], ["3F307F", "Minsk"], ["3F4C3A", "Cabbage Pont"], ["3F583B", "Tom Thumb"], ["3F5D53", "Mineral Green"], ["3FC1AA", "Puerto Rico"], ["3FFF00", "Harlequin"], ["401801", "Brown Pod"], ["40291D", "Cork"], ["403B38", "Masala"], ["403D19", "Thatch Green"], ["405169", "Fiord"], ["40826D", "Viridian"], ["40A860", "Chateau Green"], ["410056", "Ripe Plum"], ["411F10", "Paco"], ["412010", "Deep Oak"], ["413C37", "Merlin"], ["414257", "Gun Powder"], ["414C7D", "East Bay"], ["4169E1", "Royal Blue"], ["41AA78", "Ocean Green"], ["420303", "Burnt Maroon"], ["423921", "Lisbon Brown"], ["427977", "Faded Jade"], ["431560", "Scarlet Gum"], ["433120", "Iroko"], ["433E37", "Armadillo"], ["434C59", "River Bed"], ["436A0D", "Green Leaf"], ["44012D", "Barossa"], ["441D00", "Morocco Brown"], ["444954", "Mako"], ["454936", "Kelp"], ["456CAC", "San Marino"], ["45B1E8", "Picton Blue"], ["460B41", "Loulou"], ["462425", "Crater Brown"], ["465945", "Gray Asparagus"], ["4682B4", "Steel Blue"], ["480404", "Rustic Red"], ["480607", "Bulgarian Rose"], ["480656", "Clairvoyant"], ["481C1C", "Cocoa Bean"], ["483131", "Woody Brown"], ["483C32", "Taupe"], ["49170C", "Van Cleef"], ["492615", "Brown Derby"], ["49371B", "Metallic Bronze"], ["495400", "Verdun Green"], ["496679", "Blue Bayoux"], ["497183", "Bismark"], ["4A2A04", "Bracken"], ["4A3004", "Deep Bronze"], ["4A3C30", "Mondo"], ["4A4244", "Tundora"], ["4A444B", "Gravel"], ["4A4E5A", "Trout"], ["4B0082", "Pigment Indigo"], ["4B5D52", "Nandor"], ["4C3024", "Saddle"], ["4C4F56", "Abbey"], ["4D0135", "Blackberry"], ["4D0A18", "Cab Sav"], ["4D1E01", "Indian Tan"], ["4D282D", "Cowboy"], ["4D282E", "Livid Brown"], ["4D3833", "Rock"], ["4D3D14", "Punga"], ["4D400F", "Bronzetone"], ["4D5328", "Woodland"], ["4E0606", "Mahogany"], ["4E2A5A", "Bossanova"], ["4E3B41", "Matterhorn"], ["4E420C", "Bronze Olive"], ["4E4562", "Mulled Wine"], ["4E6649", "Axolotl"], ["4E7F9E", "Wedgewood"], ["4EABD1", "Shakespeare"], ["4F1C70", "Honey Flower"], ["4F2398", "Daisy Bush"], ["4F69C6", "Indigo"], ["4F7942", "Fern Green"], ["4F9D5D", "Fruit Salad"], ["4FA83D", "Apple"], ["504351", "Mortar"], ["507096", "Kashmir Blue"], ["507672", "Cutty Sark"], ["50C878", "Emerald"], ["514649", "Emperor"], ["516E3D", "Chalet Green"], ["517C66", "Como"], ["51808F", "Smalt Blue"], ["52001F", "Castro"], ["520C17", "Maroon Oak"], ["523C94", "Gigas"], ["533455", "Voodoo"], ["534491", "Victoria"], ["53824B", "Hippie Green"], ["541012", "Heath"], ["544333", "Judge Gray"], ["54534D", "Fuscous Gray"], ["549019", "Vida Loca"], ["55280C", "Cioccolato"], ["555B10", "Saratoga"], ["556D56", "Finlandia"], ["5590D9", "Havelock Blue"], ["56B4BE", "Fountain Blue"], ["578363", "Spring Leaves"], ["583401", "Saddle Brown"], ["585562", "Scarpa Flow"], ["587156", "Cactus"], ["589AAF", "Hippie Blue"], ["591D35", "Wine Berry"], ["592804", "Brown Bramble"], ["593737", "Congo Brown"], ["594433", "Millbrook"], ["5A6E9C", "Waikawa Gray"], ["5A87A0", "Horizon"], ["5B3013", "Jambalaya"], ["5C0120", "Bordeaux"], ["5C0536", "Mulberry Wood"], ["5C2E01", "Carnaby Tan"], ["5C5D75", "Comet"], ["5D1E0F", "Redwood"], ["5D4C51", "Don Juan"], ["5D5C58", "Chicago"], ["5D5E37", "Verdigris"], ["5D7747", "Dingley"], ["5DA19F", "Breaker Bay"], ["5E483E", "Kabul"], ["5E5D3B", "Hemlock"], ["5F3D26", "Irish Coffee"], ["5F5F6E", "Mid Gray"], ["5F6672", "Shuttle Gray"], ["5FA777", "Aqua Forest"], ["5FB3AC", "Tradewind"], ["604913", "Horses Neck"], ["605B73", "Smoky"], ["606E68", "Corduroy"], ["6093D1", "Danube"], ["612718", "Espresso"], ["614051", "Eggplant"], ["615D30", "Costa Del Sol"], ["61845F", "Glade Green"], ["622F30", "Buccaneer"], ["623F2D", "Quincy"], ["624E9A", "Butterfly Bush"], ["625119", "West Coast"], ["626649", "Finch"], ["639A8F", "Patina"], ["63B76C", "Fern"], ["6456B7", "Blue Violet"], ["646077", "Dolphin"], ["646463", "Storm Dust"], ["646A54", "Siam"], ["646E75", "Nevada"], ["6495ED", "Cornflower Blue"], ["64CCDB", "Viking"], ["65000B", "Rosewood"], ["651A14", "Cherrywood"], ["652DC1", "Purple Heart"], ["657220", "Fern Frond"], ["65745D", "Willow Grove"], ["65869F", "Hoki"], ["660045", "Pompadour"], ["660099", "Purple"], ["66023C", "Tyrian Purple"], ["661010", "Dark Tan"], ["66B58F", "Silver Tree"], ["66FF00", "Bright Green"], ["66FF66", "Screamin' Green"], ["67032D", "Black Rose"], ["675FA6", "Scampi"], ["676662", "Ironside Gray"], ["678975", "Viridian Green"], ["67A712", "Christi"], ["683600", "Nutmeg Wood Finish"], ["685558", "Zambezi"], ["685E6E", "Salt Box"], ["692545", "Tawny Port"], ["692D54", "Finn"], ["695F62", "Scorpion"], ["697E9A", "Lynch"], ["6A442E", "Spice"], ["6A5D1B", "Himalaya"], ["6A6051", "Soya Bean"], ["6B2A14", "Hairy Heath"], ["6B3FA0", "Royal Purple"], ["6B4E31", "Shingle Fawn"], ["6B5755", "Dorado"], ["6B8BA2", "Bermuda Gray"], ["6B8E23", "Olive Drab"], ["6C3082", "Eminence"], ["6CDAE7", "Turquoise Blue"], ["6D0101", "Lonestar"], ["6D5E54", "Pine Cone"], ["6D6C6C", "Dove Gray"], ["6D9292", "Juniper"], ["6D92A1", "Gothic"], ["6E0902", "Red Oxide"], ["6E1D14", "Moccaccino"], ["6E4826", "Pickled Bean"], ["6E4B26", "Dallas"], ["6E6D57", "Kokoda"], ["6E7783", "Pale Sky"], ["6F440C", "Cafe Royale"], ["6F6A61", "Flint"], ["6F8E63", "Highland"], ["6F9D02", "Limeade"], ["6FD0C5", "Downy"], ["701C1C", "Persian Plum"], ["704214", "Sepia"], ["704A07", "Antique Bronze"], ["704F50", "Ferra"], ["706555", "Coffee"], ["708090", "Slate Gray"], ["711A00", "Cedar Wood Finish"], ["71291D", "Metallic Copper"], ["714693", "Affair"], ["714AB2", "Studio"], ["715D47", "Tobacco Brown"], ["716338", "Yellow Metal"], ["716B56", "Peat"], ["716E10", "Olivetone"], ["717486", "Storm Gray"], ["718080", "Sirocco"], ["71D9E2", "Aquamarine Blue"], ["72010F", "Venetian Red"], ["724A2F", "Old Copper"], ["726D4E", "Go Ben"], ["727B89", "Raven"], ["731E8F", "Seance"], ["734A12", "Raw Umber"], ["736C9F", "Kimberly"], ["736D58", "Crocodile"], ["737829", "Crete"], ["738678", "Xanadu"], ["74640D", "Spicy Mustard"], ["747D63", "Limed Ash"], ["747D83", "Rolling Stone"], ["748881", "Blue Smoke"], ["749378", "Laurel"], ["74C365", "Mantis"], ["755A57", "Russett"], ["7563A8", "Deluge"], ["76395D", "Cosmic"], ["7666C6", "Blue Marguerite"], ["76BD17", "Lima"], ["76D7EA", "Sky Blue"], ["770F05", "Dark Burgundy"], ["771F1F", "Crown of Thorns"], ["773F1A", "Walnut"], ["776F61", "Pablo"], ["778120", "Pacifika"], ["779E86", "Oxley"], ["77DD77", "Pastel Green"], ["780109", "Japanese Maple"], ["782D19", "Mocha"], ["782F16", "Peanut"], ["78866B", "Camouflage Green"], ["788A25", "Wasabi"], ["788BBA", "Ship Cove"], ["78A39C", "Sea Nymph"], ["795D4C", "Roman Coffee"], ["796878", "Old Lavender"], ["796989", "Rum"], ["796A78", "Fedora"], ["796D62", "Sandstone"], ["79DEEC", "Spray"], ["7A013A", "Siren"], ["7A58C1", "Fuchsia Blue"], ["7A7A7A", "Boulder"], ["7A89B8", "Wild Blue Yonder"], ["7AC488", "De York"], ["7B3801", "Red Beech"], ["7B3F00", "Cinnamon"], ["7B6608", "Yukon Gold"], ["7B7874", "Tapa"], ["7B7C94", "Waterloo "], ["7B8265", "Flax Smoke"], ["7B9F80", "Amulet"], ["7BA05B", "Asparagus"], ["7C1C05", "Kenyan Copper"], ["7C7631", "Pesto"], ["7C778A", "Topaz"], ["7C7B7A", "Concord"], ["7C7B82", "Jumbo"], ["7C881A", "Trendy Green"], ["7CA1A6", "Gumbo"], ["7CB0A1", "Acapulco"], ["7CB7BB", "Neptune"], ["7D2C14", "Pueblo"], ["7DA98D", "Bay Leaf"], ["7DC8F7", "Malibu"], ["7DD8C6", "Bermuda"], ["7E3A15", "Copper Canyon"], ["7F1734", "Claret"], ["7F3A02", "Peru Tan"], ["7F626D", "Falcon"], ["7F7589", "Mobster"], ["7F76D3", "Moody Blue"], ["7FFF00", "Chartreuse"], ["7FFFD4", "Aquamarine"], ["800000", "Maroon"], ["800B47", "Rose Bud Cherry"], ["801818", "Falu Red"], ["80341F", "Red Robin"], ["803790", "Vivid Violet"], ["80461B", "Russet"], ["807E79", "Friar Gray"], ["808000", "Olive"], ["808080", "Gray"], ["80B3AE", "Gulf Stream"], ["80B3C4", "Glacier"], ["80CCEA", "Seagull"], ["81422C", "Nutmeg"], ["816E71", "Spicy Pink"], ["817377", "Empress"], ["819885", "Spanish Green"], ["826F65", "Sand Dune"], ["828685", "Gunsmoke"], ["828F72", "Battleship Gray"], ["831923", "Merlot"], ["837050", "Shadow"], ["83AA5D", "Chelsea Cucumber"], ["83D0C6", "Monte Carlo"], ["843179", "Plum"], ["84A0A0", "Granny Smith"], ["8581D9", "Chetwode Blue"], ["858470", "Bandicoot"], ["859FAF", "Bali Hai"], ["85C4CC", "Half Baked"], ["860111", "Red Devil"], ["863C3C", "Lotus"], ["86483C", "Ironstone"], ["864D1E", "Bull Shot"], ["86560A", "Rusty Nail"], ["868974", "Bitter"], ["86949F", "Regent Gray"], ["871550", "Disco"], ["87756E", "Americano"], ["877C7B", "Hurricane"], ["878D91", "Oslo Gray"], ["87AB39", "Sushi"], ["885342", "Spicy Mix"], ["886221", "Kumera"], ["888387", "Suva Gray"], ["888D65", "Avocado"], ["893456", "Camelot"], ["893843", "Solid Pink"], ["894367", "Cannon Pink"], ["897D6D", "Makara"], ["8A3324", "Burnt Umber"], ["8A73D6", "True V"], ["8A8360", "Clay Creek"], ["8A8389", "Monsoon"], ["8A8F8A", "Stack"], ["8AB9F1", "Jordy Blue"], ["8B00FF", "Electric Violet"], ["8B0723", "Monarch"], ["8B6B0B", "Corn Harvest"], ["8B8470", "Olive Haze"], ["8B847E", "Schooner"], ["8B8680", "Natural Gray"], ["8B9C90", "Mantle"], ["8B9FEE", "Portage"], ["8BA690", "Envy"], ["8BA9A5", "Cascade"], ["8BE6D8", "Riptide"], ["8C055E", "Cardinal Pink"], ["8C472F", "Mule Fawn"], ["8C5738", "Potters Clay"], ["8C6495", "Trendy Pink"], ["8D0226", "Paprika"], ["8D3D38", "Sanguine Brown"], ["8D3F3F", "Tosca"], ["8D7662", "Cement"], ["8D8974", "Granite Green"], ["8D90A1", "Manatee"], ["8DA8CC", "Polo Blue"], ["8E0000", "Red Berry"], ["8E4D1E", "Rope"], ["8E6F70", "Opium"], ["8E775E", "Domino"], ["8E8190", "Mamba"], ["8EABC1", "Nepal"], ["8F021C", "Pohutukawa"], ["8F3E33", "El Salva"], ["8F4B0E", "Korma"], ["8F8176", "Squirrel"], ["8FD6B4", "Vista Blue"], ["900020", "Burgundy"], ["901E1E", "Old Brick"], ["907874", "Hemp"], ["907B71", "Almond Frost"], ["908D39", "Sycamore"], ["92000A", "Sangria"], ["924321", "Cumin"], ["926F5B", "Beaver"], ["928573", "Stonewall"], ["928590", "Venus"], ["9370DB", "Medium Purple"], ["93CCEA", "Cornflower"], ["93DFB8", "Algae Green"], ["944747", "Copper Rust"], ["948771", "Arrowtown"], ["950015", "Scarlett"], ["956387", "Strikemaster"], ["959396", "Mountain Mist"], ["960018", "Carmine"], ["964B00", "Brown"], ["967059", "Leather"], ["9678B6", "Purple Mountain's Majesty"], ["967BB6", "Lavender Purple"], ["96A8A1", "Pewter"], ["96BBAB", "Summer Green"], ["97605D", "Au Chico"], ["9771B5", "Wisteria"], ["97CD2D", "Atlantis"], ["983D61", "Vin Rouge"], ["9874D3", "Lilac Bush"], ["98777B", "Bazaar"], ["98811B", "Hacienda"], ["988D77", "Pale Oyster"], ["98FF98", "Mint Green"], ["990066", "Fresh Eggplant"], ["991199", "Violet Eggplant"], ["991613", "Tamarillo"], ["991B07", "Totem Pole"], ["996666", "Copper Rose"], ["9966CC", "Amethyst"], ["997A8D", "Mountbatten Pink"], ["9999CC", "Blue Bell"], ["9A3820", "Prairie Sand"], ["9A6E61", "Toast"], ["9A9577", "Gurkha"], ["9AB973", "Olivine"], ["9AC2B8", "Shadow Green"], ["9B4703", "Oregon"], ["9B9E8F", "Lemon Grass"], ["9C3336", "Stiletto"], ["9D5616", "Hawaiian Tan"], ["9DACB7", "Gull Gray"], ["9DC209", "Pistachio"], ["9DE093", "Granny Smith Apple"], ["9DE5FF", "Anakiwa"], ["9E5302", "Chelsea Gem"], ["9E5B40", "Sepia Skin"], ["9EA587", "Sage"], ["9EA91F", "Citron"], ["9EB1CD", "Rock Blue"], ["9EDEE0", "Morning Glory"], ["9F381D", "Cognac"], ["9F821C", "Reef Gold"], ["9F9F9C", "Star Dust"], ["9FA0B1", "Santas Gray"], ["9FD7D3", "Sinbad"], ["9FDD8C", "Feijoa"], ["A02712", "Tabasco"], ["A1750D", "Buttered Rum"], ["A1ADB5", "Hit Gray"], ["A1C50A", "Citrus"], ["A1DAD7", "Aqua Island"], ["A1E9DE", "Water Leaf"], ["A2006D", "Flirt"], ["A23B6C", "Rouge"], ["A26645", "Cape Palliser"], ["A2AAB3", "Gray Chateau"], ["A2AEAB", "Edward"], ["A3807B", "Pharlap"], ["A397B4", "Amethyst Smoke"], ["A3E3ED", "Blizzard Blue"], ["A4A49D", "Delta"], ["A4A6D3", "Wistful"], ["A4AF6E", "Green Smoke"], ["A50B5E", "Jazzberry Jam"], ["A59B91", "Zorba"], ["A5CB0C", "Bahia"], ["A62F20", "Roof Terracotta"], ["A65529", "Paarl"], ["A68B5B", "Barley Corn"], ["A69279", "Donkey Brown"], ["A6A29A", "Dawn"], ["A72525", "Mexican Red"], ["A7882C", "Luxor Gold"], ["A85307", "Rich Gold"], ["A86515", "Reno Sand"], ["A86B6B", "Coral Tree"], ["A8989B", "Dusty Gray"], ["A899E6", "Dull Lavender"], ["A8A589", "Tallow"], ["A8AE9C", "Bud"], ["A8AF8E", "Locust"], ["A8BD9F", "Norway"], ["A8E3BD", "Chinook"], ["A9A491", "Gray Olive"], ["A9ACB6", "Aluminium"], ["A9B2C3", "Cadet Blue"], ["A9B497", "Schist"], ["A9BDBF", "Tower Gray"], ["A9BEF2", "Perano"], ["A9C6C2", "Opal"], ["AA375A", "Night Shadz"], ["AA4203", "Fire"], ["AA8B5B", "Muesli"], ["AA8D6F", "Sandal"], ["AAA5A9", "Shady Lady"], ["AAA9CD", "Logan"], ["AAABB7", "Spun Pearl"], ["AAD6E6", "Regent St Blue"], ["AAF0D1", "Magic Mint"], ["AB0563", "Lipstick"], ["AB3472", "Royal Heath"], ["AB917A", "Sandrift"], ["ABA0D9", "Cold Purple"], ["ABA196", "Bronco"], ["AC8A56", "Limed Oak"], ["AC91CE", "East Side"], ["AC9E22", "Lemon Ginger"], ["ACA494", "Napa"], ["ACA586", "Hillary"], ["ACA59F", "Cloudy"], ["ACACAC", "Silver Chalice"], ["ACB78E", "Swamp Green"], ["ACCBB1", "Spring Rain"], ["ACDD4D", "Conifer"], ["ACE1AF", "Celadon"], ["AD781B", "Mandalay"], ["ADBED1", "Casper"], ["ADDFAD", "Moss Green"], ["ADE6C4", "Padua"], ["ADFF2F", "Green Yellow"], ["AE4560", "Hippie Pink"], ["AE6020", "Desert"], ["AE809E", "Bouquet"], ["AF4035", "Medium Carmine"], ["AF4D43", "Apple Blossom"], ["AF593E", "Brown Rust"], ["AF8751", "Driftwood"], ["AF8F2C", "Alpine"], ["AF9F1C", "Lucky"], ["AFA09E", "Martini"], ["AFB1B8", "Bombay"], ["AFBDD9", "Pigeon Post"], ["B04C6A", "Cadillac"], ["B05D54", "Matrix"], ["B05E81", "Tapestry"], ["B06608", "Mai Tai"], ["B09A95", "Del Rio"], ["B0E0E6", "Powder Blue"], ["B0E313", "Inch Worm"], ["B10000", "Bright Red"], ["B14A0B", "Vesuvius"], ["B1610B", "Pumpkin Skin"], ["B16D52", "Santa Fe"], ["B19461", "Teak"], ["B1E2C1", "Fringy Flower"], ["B1F4E7", "Ice Cold"], ["B20931", "Shiraz"], ["B2A1EA", "Biloba Flower"], ["B32D29", "Tall Poppy"], ["B35213", "Fiery Orange"], ["B38007", "Hot Toddy"], ["B3AF95", "Taupe Gray"], ["B3C110", "La Rioja"], ["B43332", "Well Read"], ["B44668", "Blush"], ["B4CFD3", "Jungle Mist"], ["B57281", "Turkish Rose"], ["B57EDC", "Lavender"], ["B5A27F", "Mongoose"], ["B5B35C", "Olive Green"], ["B5D2CE", "Jet Stream"], ["B5ECDF", "Cruise"], ["B6316C", "Hibiscus"], ["B69D98", "Thatch"], ["B6B095", "Heathered Gray"], ["B6BAA4", "Eagle"], ["B6D1EA", "Spindle"], ["B6D3BF", "Gum Leaf"], ["B7410E", "Rust"], ["B78E5C", "Muddy Waters"], ["B7A214", "Sahara"], ["B7A458", "Husk"], ["B7B1B1", "Nobel"], ["B7C3D0", "Heather"], ["B7F0BE", "Madang"], ["B81104", "Milano Red"], ["B87333", "Copper"], ["B8B56A", "Gimblet"], ["B8C1B1", "Green Spring"], ["B8C25D", "Celery"], ["B8E0F9", "Sail"], ["B94E48", "Chestnut"], ["B95140", "Crail"], ["B98D28", "Marigold"], ["B9C46A", "Wild Willow"], ["B9C8AC", "Rainee"], ["BA0101", "Guardsman Red"], ["BA450C", "Rock Spray"], ["BA6F1E", "Bourbon"], ["BA7F03", "Pirate Gold"], ["BAB1A2", "Nomad"], ["BAC7C9", "Submarine"], ["BAEEF9", "Charlotte"], ["BB3385", "Medium Red Violet"], ["BB8983", "Brandy Rose"], ["BBD009", "Rio Grande"], ["BBD7C1", "Surf"], ["BCC9C2", "Powder Ash"], ["BD5E2E", "Tuscany"], ["BD978E", "Quicksand"], ["BDB1A8", "Silk"], ["BDB2A1", "Malta"], ["BDB3C7", "Chatelle"], ["BDBBD7", "Lavender Gray"], ["BDBDC6", "French Gray"], ["BDC8B3", "Clay Ash"], ["BDC9CE", "Loblolly"], ["BDEDFD", "French Pass"], ["BEA6C3", "London Hue"], ["BEB5B7", "Pink Swan"], ["BEDE0D", "Fuego"], ["BF5500", "Rose of Sharon"], ["BFB8B0", "Tide"], ["BFBED8", "Blue Haze"], ["BFC1C2", "Silver Sand"], ["BFC921", "Key Lime Pie"], ["BFDBE2", "Ziggurat"], ["BFFF00", "Lime"], ["C02B18", "Thunderbird"], ["C04737", "Mojo"], ["C08081", "Old Rose"], ["C0C0C0", "Silver"], ["C0D3B9", "Pale Leaf"], ["C0D8B6", "Pixie Green"], ["C1440E", "Tia Maria"], ["C154C1", "Fuchsia Pink"], ["C1A004", "Buddha Gold"], ["C1B7A4", "Bison Hide"], ["C1BAB0", "Tea"], ["C1BECD", "Gray Suit"], ["C1D7B0", "Sprout"], ["C1F07C", "Sulu"], ["C26B03", "Indochine"], ["C2955D", "Twine"], ["C2BDB6", "Cotton Seed"], ["C2CAC4", "Pumice"], ["C2E8E5", "Jagged Ice"], ["C32148", "Maroon Flush"], ["C3B091", "Indian Khaki"], ["C3BFC1", "Pale Slate"], ["C3C3BD", "Gray Nickel"], ["C3CDE6", "Periwinkle Gray"], ["C3D1D1", "Tiara"], ["C3DDF9", "Tropical Blue"], ["C41E3A", "Cardinal"], ["C45655", "Fuzzy Wuzzy Brown"], ["C45719", "Orange Roughy"], ["C4C4BC", "Mist Gray"], ["C4D0B0", "Coriander"], ["C4F4EB", "Mint Tulip"], ["C54B8C", "Mulberry"], ["C59922", "Nugget"], ["C5994B", "Tussock"], ["C5DBCA", "Sea Mist"], ["C5E17A", "Yellow Green"], ["C62D42", "Brick Red"], ["C6726B", "Contessa"], ["C69191", "Oriental Pink"], ["C6A84B", "Roti"], ["C6C3B5", "Ash"], ["C6C8BD", "Kangaroo"], ["C6E610", "Las Palmas"], ["C7031E", "Monza"], ["C71585", "Red Violet"], ["C7BCA2", "Coral Reef"], ["C7C1FF", "Melrose"], ["C7C4BF", "Cloud"], ["C7C9D5", "Ghost"], ["C7CD90", "Pine Glade"], ["C7DDE5", "Botticelli"], ["C88A65", "Antique Brass"], ["C8A2C8", "Lilac"], ["C8A528", "Hokey Pokey"], ["C8AABF", "Lily"], ["C8B568", "Laser"], ["C8E3D7", "Edgewater"], ["C96323", "Piper"], ["C99415", "Pizza"], ["C9A0DC", "Light Wisteria"], ["C9B29B", "Rodeo Dust"], ["C9B35B", "Sundance"], ["C9B93B", "Earls Green"], ["C9C0BB", "Silver Rust"], ["C9D9D2", "Conch"], ["C9FFA2", "Reef"], ["C9FFE5", "Aero Blue"], ["CA3435", "Flush Mahogany"], ["CABB48", "Turmeric"], ["CADCD4", "Paris White"], ["CAE00D", "Bitter Lemon"], ["CAE6DA", "Skeptic"], ["CB8FA9", "Viola"], ["CBCAB6", "Foggy Gray"], ["CBD3B0", "Green Mist"], ["CBDBD6", "Nebula"], ["CC3333", "Persian Red"], ["CC5500", "Burnt Orange"], ["CC7722", "Ochre"], ["CC8899", "Puce"], ["CCCAA8", "Thistle Green"], ["CCCCFF", "Periwinkle"], ["CCFF00", "Electric Lime"], ["CD5700", "Tenn"], ["CD5C5C", "Chestnut Rose"], ["CD8429", "Brandy Punch"], ["CDF4FF", "Onahau"], ["CEB98F", "Sorrell Brown"], ["CEBABA", "Cold Turkey"], ["CEC291", "Yuma"], ["CEC7A7", "Chino"], ["CFA39D", "Eunry"], ["CFB53B", "Old Gold"], ["CFDCCF", "Tasman"], ["CFE5D2", "Surf Crest"], ["CFF9F3", "Humming Bird"], ["CFFAF4", "Scandal"], ["D05F04", "Red Stage"], ["D06DA1", "Hopbush"], ["D07D12", "Meteor"], ["D0BEF8", "Perfume"], ["D0C0E5", "Prelude"], ["D0F0C0", "Tea Green"], ["D18F1B", "Geebung"], ["D1BEA8", "Vanilla"], ["D1C6B4", "Soft Amber"], ["D1D2CA", "Celeste"], ["D1D2DD", "Mischka"], ["D1E231", "Pear"], ["D2691E", "Hot Cinnamon"], ["D27D46", "Raw Sienna"], ["D29EAA", "Careys Pink"], ["D2B48C", "Tan"], ["D2DA97", "Deco"], ["D2F6DE", "Blue Romance"], ["D2F8B0", "Gossip"], ["D3CBBA", "Sisal"], ["D3CDC5", "Swirl"], ["D47494", "Charm"], ["D4B6AF", "Clam Shell"], ["D4BF8D", "Straw"], ["D4C4A8", "Akaroa"], ["D4CD16", "Bird Flower"], ["D4D7D9", "Iron"], ["D4DFE2", "Geyser"], ["D4E2FC", "Hawkes Blue"], ["D54600", "Grenadier"], ["D591A4", "Can Can"], ["D59A6F", "Whiskey"], ["D5D195", "Winter Hazel"], ["D5F6E3", "Granny Apple"], ["D69188", "My Pink"], ["D6C562", "Tacha"], ["D6CEF6", "Moon Raker"], ["D6D6D1", "Quill Gray"], ["D6FFDB", "Snowy Mint"], ["D7837F", "New York Pink"], ["D7C498", "Pavlova"], ["D7D0FF", "Fog"], ["D84437", "Valencia"], ["D87C63", "Japonica"], ["D8BFD8", "Thistle"], ["D8C2D5", "Maverick"], ["D8FCFA", "Foam"], ["D94972", "Cabaret"], ["D99376", "Burning Sand"], ["D9B99B", "Cameo"], ["D9D6CF", "Timberwolf"], ["D9DCC1", "Tana"], ["D9E4F5", "Link Water"], ["D9F7FF", "Mabel"], ["DA3287", "Cerise"], ["DA5B38", "Flame Pea"], ["DA6304", "Bamboo"], ["DA6A41", "Red Damask"], ["DA70D6", "Orchid"], ["DA8A67", "Copperfield"], ["DAA520", "Golden Grass"], ["DAECD6", "Zanah"], ["DAF4F0", "Iceberg"], ["DAFAFF", "Oyster Bay"], ["DB5079", "Cranberry"], ["DB9690", "Petite Orchid"], ["DB995E", "Di Serria"], ["DBDBDB", "Alto"], ["DBFFF8", "Frosted Mint"], ["DC143C", "Crimson"], ["DC4333", "Punch"], ["DCB20C", "Galliano"], ["DCB4BC", "Blossom"], ["DCD747", "Wattle"], ["DCD9D2", "Westar"], ["DCDDCC", "Moon Mist"], ["DCEDB4", "Caper"], ["DCF0EA", "Swans Down"], ["DDD6D5", "Swiss Coffee"], ["DDF9F1", "White Ice"], ["DE3163", "Cerise Red"], ["DE6360", "Roman"], ["DEA681", "Tumbleweed"], ["DEBA13", "Gold Tips"], ["DEC196", "Brandy"], ["DECBC6", "Wafer"], ["DED4A4", "Sapling"], ["DED717", "Barberry"], ["DEE5C0", "Beryl Green"], ["DEF5FF", "Pattens Blue"], ["DF73FF", "Heliotrope"], ["DFBE6F", "Apache"], ["DFCD6F", "Chenin"], ["DFCFDB", "Lola"], ["DFECDA", "Willow Brook"], ["DFFF00", "Chartreuse Yellow"], ["E0B0FF", "Mauve"], ["E0B646", "Anzac"], ["E0B974", "Harvest Gold"], ["E0C095", "Calico"], ["E0FFFF", "Baby Blue"], ["E16865", "Sunglo"], ["E1BC64", "Equator"], ["E1C0C8", "Pink Flare"], ["E1E6D6", "Periglacial Blue"], ["E1EAD4", "Kidnapper"], ["E1F6E8", "Tara"], ["E25465", "Mandy"], ["E2725B", "Terracotta"], ["E28913", "Golden Bell"], ["E292C0", "Shocking"], ["E29418", "Dixie"], ["E29CD2", "Light Orchid"], ["E2D8ED", "Snuff"], ["E2EBED", "Mystic"], ["E2F3EC", "Apple Green"], ["E30B5C", "Razzmatazz"], ["E32636", "Alizarin Crimson"], ["E34234", "Cinnabar"], ["E3BEBE", "Cavern Pink"], ["E3F5E1", "Peppermint"], ["E3F988", "Mindaro"], ["E47698", "Deep Blush"], ["E49B0F", "Gamboge"], ["E4C2D5", "Melanie"], ["E4CFDE", "Twilight"], ["E4D1C0", "Bone"], ["E4D422", "Sunflower"], ["E4D5B7", "Grain Brown"], ["E4D69B", "Zombie"], ["E4F6E7", "Frostee"], ["E4FFD1", "Snow Flurry"], ["E52B50", "Amaranth"], ["E5841B", "Zest"], ["E5CCC9", "Dust Storm"], ["E5D7BD", "Stark White"], ["E5D8AF", "Hampton"], ["E5E0E1", "Bon Jour"], ["E5E5E5", "Mercury"], ["E5F9F6", "Polar"], ["E64E03", "Trinidad"], ["E6BE8A", "Gold Sand"], ["E6BEA5", "Cashmere"], ["E6D7B9", "Double Spanish White"], ["E6E4D4", "Satin Linen"], ["E6F2EA", "Harp"], ["E6F8F3", "Off Green"], ["E6FFE9", "Hint of Green"], ["E6FFFF", "Tranquil"], ["E77200", "Mango Tango"], ["E7730A", "Christine"], ["E79F8C", "Tonys Pink"], ["E79FC4", "Kobi"], ["E7BCB4", "Rose Fog"], ["E7BF05", "Corn"], ["E7CD8C", "Putty"], ["E7ECE6", "Gray Nurse"], ["E7F8FF", "Lily White"], ["E7FEFF", "Bubbles"], ["E89928", "Fire Bush"], ["E8B9B3", "Shilo"], ["E8E0D5", "Pearl Bush"], ["E8EBE0", "Green White"], ["E8F1D4", "Chrome White"], ["E8F2EB", "Gin"], ["E8F5F2", "Aqua Squeeze"], ["E96E00", "Clementine"], ["E97451", "Burnt Sienna"], ["E97C07", "Tahiti Gold"], ["E9CECD", "Oyster Pink"], ["E9D75A", "Confetti"], ["E9E3E3", "Ebb"], ["E9F8ED", "Ottoman"], ["E9FFFD", "Clear Day"], ["EA88A8", "Carissma"], ["EAAE69", "Porsche"], ["EAB33B", "Tulip Tree"], ["EAC674", "Rob Roy"], ["EADAB8", "Raffia"], ["EAE8D4", "White Rock"], ["EAF6EE", "Panache"], ["EAF6FF", "Solitude"], ["EAF9F5", "Aqua Spring"], ["EAFFFE", "Dew"], ["EB9373", "Apricot"], ["EBC2AF", "Zinnwaldite"], ["ECA927", "Fuel Yellow"], ["ECC54E", "Ronchi"], ["ECC7EE", "French Lilac"], ["ECCDB9", "Just Right"], ["ECE090", "Wild Rice"], ["ECEBBD", "Fall Green"], ["ECEBCE", "Aths Special"], ["ECF245", "Starship"], ["ED0A3F", "Red Ribbon"], ["ED7A1C", "Tango"], ["ED9121", "Carrot Orange"], ["ED989E", "Sea Pink"], ["EDB381", "Tacao"], ["EDC9AF", "Desert Sand"], ["EDCDAB", "Pancho"], ["EDDCB1", "Chamois"], ["EDEA99", "Primrose"], ["EDF5DD", "Frost"], ["EDF5F5", "Aqua Haze"], ["EDF6FF", "Zumthor"], ["EDF9F1", "Narvik"], ["EDFC84", "Honeysuckle"], ["EE82EE", "Lavender Magenta"], ["EEC1BE", "Beauty Bush"], ["EED794", "Chalky"], ["EED9C4", "Almond"], ["EEDC82", "Flax"], ["EEDEDA", "Bizarre"], ["EEE3AD", "Double Colonial White"], ["EEEEE8", "Cararra"], ["EEEF78", "Manz"], ["EEF0C8", "Tahuna Sands"], ["EEF0F3", "Athens Gray"], ["EEF3C3", "Tusk"], ["EEF4DE", "Loafer"], ["EEF6F7", "Catskill White"], ["EEFDFF", "Twilight Blue"], ["EEFF9A", "Jonquil"], ["EEFFE2", "Rice Flower"], ["EF863F", "Jaffa"], ["EFEFEF", "Gallery"], ["EFF2F3", "Porcelain"], ["F091A9", "Mauvelous"], ["F0D52D", "Golden Dream"], ["F0DB7D", "Golden Sand"], ["F0DC82", "Buff"], ["F0E2EC", "Prim"], ["F0E68C", "Khaki"], ["F0EEFD", "Selago"], ["F0EEFF", "Titan White"], ["F0F8FF", "Alice Blue"], ["F0FCEA", "Feta"], ["F18200", "Gold Drop"], ["F19BAB", "Wewak"], ["F1E788", "Sahara Sand"], ["F1E9D2", "Parchment"], ["F1E9FF", "Blue Chalk"], ["F1EEC1", "Mint Julep"], ["F1F1F1", "Seashell"], ["F1F7F2", "Saltpan"], ["F1FFAD", "Tidal"], ["F1FFC8", "Chiffon"], ["F2552A", "Flamingo"], ["F28500", "Tangerine"], ["F2C3B2", "Mandys Pink"], ["F2F2F2", "Concrete"], ["F2FAFA", "Black Squeeze"], ["F34723", "Pomegranate"], ["F3AD16", "Buttercup"], ["F3D69D", "New Orleans"], ["F3D9DF", "Vanilla Ice"], ["F3E7BB", "Sidecar"], ["F3E9E5", "Dawn Pink"], ["F3EDCF", "Wheatfield"], ["F3FB62", "Canary"], ["F3FBD4", "Orinoco"], ["F3FFD8", "Carla"], ["F400A1", "Hollywood Cerise"], ["F4A460", "Sandy brown"], ["F4C430", "Saffron"], ["F4D81C", "Ripe Lemon"], ["F4EBD3", "Janna"], ["F4F2EE", "Pampas"], ["F4F4F4", "Wild Sand"], ["F4F8FF", "Zircon"], ["F57584", "Froly"], ["F5C85C", "Cream Can"], ["F5C999", "Manhattan"], ["F5D5A0", "Maize"], ["F5DEB3", "Wheat"], ["F5E7A2", "Sandwisp"], ["F5E7E2", "Pot Pourri"], ["F5E9D3", "Albescent White"], ["F5EDEF", "Soft Peach"], ["F5F3E5", "Ecru White"], ["F5F5DC", "Beige"], ["F5FB3D", "Golden Fizz"], ["F5FFBE", "Australian Mint"], ["F64A8A", "French Rose"], ["F653A6", "Brilliant Rose"], ["F6A4C9", "Illusion"], ["F6F0E6", "Merino"], ["F6F7F7", "Black Haze"], ["F6FFDC", "Spring Sun"], ["F7468A", "Violet Red"], ["F77703", "Chilean Fire"], ["F77FBE", "Persian Pink"], ["F7B668", "Rajah"], ["F7C8DA", "Azalea"], ["F7DBE6", "We Peep"], ["F7F2E1", "Quarter Spanish White"], ["F7F5FA", "Whisper"], ["F7FAF7", "Snow Drift"], ["F8B853", "Casablanca"], ["F8C3DF", "Chantilly"], ["F8D9E9", "Cherub"], ["F8DB9D", "Marzipan"], ["F8DD5C", "Energy Yellow"], ["F8E4BF", "Givry"], ["F8F0E8", "White Linen"], ["F8F4FF", "Magnolia"], ["F8F6F1", "Spring Wood"], ["F8F7DC", "Coconut Cream"], ["F8F7FC", "White Lilac"], ["F8F8F7", "Desert Storm"], ["F8F99C", "Texas"], ["F8FACD", "Corn Field"], ["F8FDD3", "Mimosa"], ["F95A61", "Carnation"], ["F9BF58", "Saffron Mango"], ["F9E0ED", "Carousel Pink"], ["F9E4BC", "Dairy Cream"], ["F9E663", "Portica"], ["F9E6F4", "Underage Pink"], ["F9EAF3", "Amour"], ["F9F8E4", "Rum Swizzle"], ["F9FF8B", "Dolly"], ["F9FFF6", "Sugar Cane"], ["FA7814", "Ecstasy"], ["FA9D5A", "Tan Hide"], ["FAD3A2", "Corvette"], ["FADFAD", "Peach Yellow"], ["FAE600", "Turbo"], ["FAEAB9", "Astra"], ["FAECCC", "Champagne"], ["FAF0E6", "Linen"], ["FAF3F0", "Fantasy"], ["FAF7D6", "Citrine White"], ["FAFAFA", "Alabaster"], ["FAFDE4", "Hint of Yellow"], ["FAFFA4", "Milan"], ["FB607F", "Brink Pink"], ["FB8989", "Geraldine"], ["FBA0E3", "Lavender Rose"], ["FBA129", "Sea Buckthorn"], ["FBAC13", "Sun"], ["FBAED2", "Lavender Pink"], ["FBB2A3", "Rose Bud"], ["FBBEDA", "Cupid"], ["FBCCE7", "Classic Rose"], ["FBCEB1", "Apricot Peach"], ["FBE7B2", "Banana Mania"], ["FBE870", "Marigold Yellow"], ["FBE96C", "Festival"], ["FBEA8C", "Sweet Corn"], ["FBEC5D", "Candy Corn"], ["FBF9F9", "Hint of Red"], ["FBFFBA", "Shalimar"], ["FC0FC0", "Shocking Pink"], ["FC80A5", "Tickle Me Pink"], ["FC9C1D", "Tree Poppy"], ["FCC01E", "Lightning Yellow"], ["FCD667", "Goldenrod"], ["FCD917", "Candlelight"], ["FCDA98", "Cherokee"], ["FCF4D0", "Double Pearl Lusta"], ["FCF4DC", "Pearl Lusta"], ["FCF8F7", "Vista White"], ["FCFBF3", "Bianca"], ["FCFEDA", "Moon Glow"], ["FCFFE7", "China Ivory"], ["FCFFF9", "Ceramic"], ["FD0E35", "Torch Red"], ["FD5B78", "Wild Watermelon"], ["FD7B33", "Crusta"], ["FD7C07", "Sorbus"], ["FD9FA2", "Sweet Pink"], ["FDD5B1", "Light Apricot"], ["FDD7E4", "Pig Pink"], ["FDE1DC", "Cinderella"], ["FDE295", "Golden Glow"], ["FDE910", "Lemon"], ["FDF5E6", "Old Lace"], ["FDF6D3", "Half Colonial White"], ["FDF7AD", "Drover"], ["FDFEB8", "Pale Prim"], ["FDFFD5", "Cumulus"], ["FE28A2", "Persian Rose"], ["FE4C40", "Sunset Orange"], ["FE6F5E", "Bittersweet"], ["FE9D04", "California"], ["FEA904", "Yellow Sea"], ["FEBAAD", "Melon"], ["FED33C", "Bright Sun"], ["FED85D", "Dandelion"], ["FEDB8D", "Salomie"], ["FEE5AC", "Cape Honey"], ["FEEBF3", "Remy"], ["FEEFCE", "Oasis"], ["FEF0EC", "Bridesmaid"], ["FEF2C7", "Beeswax"], ["FEF3D8", "Bleach White"], ["FEF4CC", "Pipi"], ["FEF4DB", "Half Spanish White"], ["FEF4F8", "Wisp Pink"], ["FEF5F1", "Provincial Pink"], ["FEF7DE", "Half Dutch White"], ["FEF8E2", "Solitaire"], ["FEF8FF", "White Pointer"], ["FEF9E3", "Off Yellow"], ["FEFCED", "Orange White"], ["FF0000", "Red"], ["FF007F", "Rose"], ["FF00CC", "Purple Pizzazz"], ["FF00FF", "Magenta / Fuchsia"], ["FF2400", "Scarlet"], ["FF3399", "Wild Strawberry"], ["FF33CC", "Razzle Dazzle Rose"], ["FF355E", "Radical Red"], ["FF3F34", "Red Orange"], ["FF4040", "Coral Red"], ["FF4D00", "Vermilion"], ["FF4F00", "International Orange"], ["FF6037", "Outrageous Orange"], ["FF6600", "Blaze Orange"], ["FF66FF", "Pink Flamingo"], ["FF681F", "Orange"], ["FF69B4", "Hot Pink"], ["FF6B53", "Persimmon"], ["FF6FFF", "Blush Pink"], ["FF7034", "Burning Orange"], ["FF7518", "Pumpkin"], ["FF7D07", "Flamenco"], ["FF7F00", "Flush Orange"], ["FF7F50", "Coral"], ["FF8C69", "Salmon"], ["FF9000", "Pizazz"], ["FF910F", "West Side"], ["FF91A4", "Pink Salmon"], ["FF9933", "Neon Carrot"], ["FF9966", "Atomic Tangerine"], ["FF9980", "Vivid Tangerine"], ["FF9E2C", "Sunshade"], ["FFA000", "Orange Peel"], ["FFA194", "Mona Lisa"], ["FFA500", "Web Orange"], ["FFA6C9", "Carnation Pink"], ["FFAB81", "Hit Pink"], ["FFAE42", "Yellow Orange"], ["FFB0AC", "Cornflower Lilac"], ["FFB1B3", "Sundown"], ["FFB31F", "My Sin"], ["FFB555", "Texas Rose"], ["FFB7D5", "Cotton Candy"], ["FFB97B", "Macaroni and Cheese"], ["FFBA00", "Selective Yellow"], ["FFBD5F", "Koromiko"], ["FFBF00", "Amber"], ["FFC0A8", "Wax Flower"], ["FFC0CB", "Pink"], ["FFC3C0", "Your Pink"], ["FFC901", "Supernova"], ["FFCBA4", "Flesh"], ["FFCC33", "Sunglow"], ["FFCC5C", "Golden Tainoi"], ["FFCC99", "Peach Orange"], ["FFCD8C", "Chardonnay"], ["FFD1DC", "Pastel Pink"], ["FFD2B7", "Romantic"], ["FFD38C", "Grandis"], ["FFD700", "Gold"], ["FFD800", "School bus Yellow"], ["FFD8D9", "Cosmos"], ["FFDB58", "Mustard"], ["FFDCD6", "Peach Schnapps"], ["FFDDAF", "Caramel"], ["FFDDCD", "Tuft Bush"], ["FFDDCF", "Watusi"], ["FFDDF4", "Pink Lace"], ["FFDEAD", "Navajo White"], ["FFDEB3", "Frangipani"], ["FFE1DF", "Pippin"], ["FFE1F2", "Pale Rose"], ["FFE2C5", "Negroni"], ["FFE5A0", "Cream Brulee"], ["FFE5B4", "Peach"], ["FFE6C7", "Tequila"], ["FFE772", "Kournikova"], ["FFEAC8", "Sandy Beach"], ["FFEAD4", "Karry"], ["FFEC13", "Broom"], ["FFEDBC", "Colonial White"], ["FFEED8", "Derby"], ["FFEFA1", "Vis Vis"], ["FFEFC1", "Egg White"], ["FFEFD5", "Papaya Whip"], ["FFEFEC", "Fair Pink"], ["FFF0DB", "Peach Cream"], ["FFF0F5", "Lavender blush"], ["FFF14F", "Gorse"], ["FFF1B5", "Buttermilk"], ["FFF1D8", "Pink Lady"], ["FFF1EE", "Forget Me Not"], ["FFF1F9", "Tutu"], ["FFF39D", "Picasso"], ["FFF3F1", "Chardon"], ["FFF46E", "Paris Daisy"], ["FFF4CE", "Barley White"], ["FFF4DD", "Egg Sour"], ["FFF4E0", "Sazerac"], ["FFF4E8", "Serenade"], ["FFF4F3", "Chablis"], ["FFF5EE", "Seashell Peach"], ["FFF5F3", "Sauvignon"], ["FFF6D4", "Milk Punch"], ["FFF6DF", "Varden"], ["FFF6F5", "Rose White"], ["FFF8D1", "Baja White"], ["FFF9E2", "Gin Fizz"], ["FFF9E6", "Early Dawn"], ["FFFACD", "Lemon Chiffon"], ["FFFAF4", "Bridal Heath"], ["FFFBDC", "Scotch Mist"], ["FFFBF9", "Soapstone"], ["FFFC99", "Witch Haze"], ["FFFCEA", "Buttery White"], ["FFFCEE", "Island Spice"], ["FFFDD0", "Cream"], ["FFFDE6", "Chilean Heath"], ["FFFDE8", "Travertine"], ["FFFDF3", "Orchid White"], ["FFFDF4", "Quarter Pearl Lusta"], ["FFFEE1", "Half and Half"], ["FFFEEC", "Apricot White"], ["FFFEF0", "Rice Cake"], ["FFFEF6", "Black White"], ["FFFEFD", "Romance"], ["FFFF00", "Yellow"], ["FFFF66", "Laser Lemon"], ["FFFF99", "Pale Canary"], ["FFFFB4", "Portafino"], ["FFFFF0", "Ivory"], ["FFFFFF", "White"], ["acc2d9", "cloudy blue"], ["56ae57", "dark pastel green"], ["b2996e", "dust"], ["a8ff04", "electric lime"], ["69d84f", "fresh green"], ["894585", "light eggplant"], ["70b23f", "nasty green"], ["d4ffff", "really light blue"], ["65ab7c", "tea"], ["952e8f", "warm purple"], ["fcfc81", "yellowish tan"], ["a5a391", "cement"], ["388004", "dark grass green"], ["4c9085", "dusty teal"], ["5e9b8a", "grey teal"], ["efb435", "macaroni and cheese"], ["d99b82", "pinkish tan"], ["0a5f38", "spruce"], ["0c06f7", "strong blue"], ["61de2a", "toxic green"], ["3778bf", "windows blue"], ["2242c7", "blue blue"], ["533cc6", "blue with a hint of purple"], ["9bb53c", "booger"], ["05ffa6", "bright sea green"], ["1f6357", "dark green blue"], ["017374", "deep turquoise"], ["0cb577", "green teal"], ["ff0789", "strong pink"], ["afa88b", "bland"], ["08787f", "deep aqua"], ["dd85d7", "lavender pink"], ["a6c875", "light moss green"], ["a7ffb5", "light seafoam green"], ["c2b709", "olive yellow"], ["e78ea5", "pig pink"], ["966ebd", "deep lilac"], ["ccad60", "desert"], ["ac86a8", "dusty lavender"], ["947e94", "purpley grey"], ["983fb2", "purply"], ["ff63e9", "candy pink"], ["b2fba5", "light pastel green"], ["63b365", "boring green"], ["8ee53f", "kiwi green"], ["b7e1a1", "light grey green"], ["ff6f52", "orange pink"], ["bdf8a3", "tea green"], ["d3b683", "very light brown"], ["fffcc4", "egg shell"], ["430541", "eggplant purple"], ["ffb2d0", "powder pink"], ["997570", "reddish grey"], ["ad900d", "baby shit brown"], ["c48efd", "liliac"], ["507b9c", "stormy blue"], ["7d7103", "ugly brown"], ["fffd78", "custard"], ["da467d", "darkish pink"], ["410200", "deep brown"], ["c9d179", "greenish beige"], ["fffa86", "manilla"], ["5684ae", "off blue"], ["6b7c85", "battleship grey"], ["6f6c0a", "browny green"], ["7e4071", "bruise"], ["009337", "kelley green"], ["d0e429", "sickly yellow"], ["fff917", "sunny yellow"], ["1d5dec", "azul"], ["054907", "darkgreen"], ["b5ce08", "green/yellow"], ["8fb67b", "lichen"], ["c8ffb0", "light light green"], ["fdde6c", "pale gold"], ["ffdf22", "sun yellow"], ["a9be70", "tan green"], ["6832e3", "burple"], ["fdb147", "butterscotch"], ["c7ac7d", "toupe"], ["fff39a", "dark cream"], ["850e04", "indian red"], ["efc0fe", "light lavendar"], ["40fd14", "poison green"], ["b6c406", "baby puke green"], ["9dff00", "bright yellow green"], ["3c4142", "charcoal grey"], ["f2ab15", "squash"], ["ac4f06", "cinnamon"], ["c4fe82", "light pea green"], ["2cfa1f", "radioactive green"], ["9a6200", "raw sienna"], ["ca9bf7", "baby purple"], ["875f42", "cocoa"], ["3a2efe", "light royal blue"], ["fd8d49", "orangeish"], ["8b3103", "rust brown"], ["cba560", "sand brown"], ["698339", "swamp"], ["0cdc73", "tealish green"], ["b75203", "burnt siena"], ["7f8f4e", "camo"], ["26538d", "dusk blue"], ["63a950", "fern"], ["c87f89", "old rose"], ["b1fc99", "pale light green"], ["ff9a8a", "peachy pink"], ["f6688e", "rosy pink"], ["76fda8", "light bluish green"], ["53fe5c", "light bright green"], ["4efd54", "light neon green"], ["a0febf", "light seafoam"], ["7bf2da", "tiffany blue"], ["bcf5a6", "washed out green"], ["ca6b02", "browny orange"], ["107ab0", "nice blue"], ["2138ab", "sapphire"], ["719f91", "greyish teal"], ["fdb915", "orangey yellow"], ["fefcaf", "parchment"], ["fcf679", "straw"], ["1d0200", "very dark brown"], ["cb6843", "terracota"], ["31668a", "ugly blue"], ["247afd", "clear blue"], ["ffffb6", "creme"], ["90fda9", "foam green"], ["86a17d", "grey/green"], ["fddc5c", "light gold"], ["78d1b6", "seafoam blue"], ["13bbaf", "topaz"], ["fb5ffc", "violet pink"], ["20f986", "wintergreen"], ["ffe36e", "yellow tan"], ["9d0759", "dark fuchsia"], ["3a18b1", "indigo blue"], ["c2ff89", "light yellowish green"], ["d767ad", "pale magenta"], ["720058", "rich purple"], ["ffda03", "sunflower yellow"], ["01c08d", "green/blue"], ["ac7434", "leather"], ["014600", "racing green"], ["9900fa", "vivid purple"], ["02066f", "dark royal blue"], ["8e7618", "hazel"], ["d1768f", "muted pink"], ["96b403", "booger green"], ["fdff63", "canary"], ["95a3a6", "cool grey"], ["7f684e", "dark taupe"], ["751973", "darkish purple"], ["089404", "true green"], ["ff6163", "coral pink"], ["598556", "dark sage"], ["214761", "dark slate blue"], ["3c73a8", "flat blue"], ["ba9e88", "mushroom"], ["021bf9", "rich blue"], ["734a65", "dirty purple"], ["23c48b", "greenblue"], ["8fae22", "icky green"], ["e6f2a2", "light khaki"], ["4b57db", "warm blue"], ["d90166", "dark hot pink"], ["015482", "deep sea blue"], ["9d0216", "carmine"], ["728f02", "dark yellow green"], ["ffe5ad", "pale peach"], ["4e0550", "plum purple"], ["f9bc08", "golden rod"], ["ff073a", "neon red"], ["c77986", "old pink"], ["d6fffe", "very pale blue"], ["fe4b03", "blood orange"], ["fd5956", "grapefruit"], ["fce166", "sand yellow"], ["b2713d", "clay brown"], ["1f3b4d", "dark blue grey"], ["699d4c", "flat green"], ["56fca2", "light green blue"], ["fb5581", "warm pink"], ["3e82fc", "dodger blue"], ["a0bf16", "gross green"], ["d6fffa", "ice"], ["4f738e", "metallic blue"], ["ffb19a", "pale salmon"], ["5c8b15", "sap green"], ["54ac68", "algae"], ["89a0b0", "bluey grey"], ["7ea07a", "greeny grey"], ["1bfc06", "highlighter green"], ["cafffb", "light light blue"], ["b6ffbb", "light mint"], ["a75e09", "raw umber"], ["152eff", "vivid blue"], ["8d5eb7", "deep lavender"], ["5f9e8f", "dull teal"], ["63f7b4", "light greenish blue"], ["606602", "mud green"], ["fc86aa", "pinky"], ["8c0034", "red wine"], ["758000", "shit green"], ["ab7e4c", "tan brown"], ["030764", "darkblue"], ["fe86a4", "rosa"], ["d5174e", "lipstick"], ["fed0fc", "pale mauve"], ["680018", "claret"], ["fedf08", "dandelion"], ["fe420f", "orangered"], ["6f7c00", "poop green"], ["ca0147", "ruby"], ["1b2431", "dark"], ["00fbb0", "greenish turquoise"], ["db5856", "pastel red"], ["ddd618", "piss yellow"], ["41fdfe", "bright cyan"], ["cf524e", "dark coral"], ["21c36f", "algae green"], ["a90308", "darkish red"], ["6e1005", "reddy brown"], ["fe828c", "blush pink"], ["4b6113", "camouflage green"], ["4da409", "lawn green"], ["beae8a", "putty"], ["0339f8", "vibrant blue"], ["a88f59", "dark sand"], ["5d21d0", "purple/blue"], ["feb209", "saffron"], ["4e518b", "twilight"], ["964e02", "warm brown"], ["85a3b2", "bluegrey"], ["ff69af", "bubble gum pink"], ["c3fbf4", "duck egg blue"], ["2afeb7", "greenish cyan"], ["005f6a", "petrol"], ["0c1793", "royal"], ["ffff81", "butter"], ["f0833a", "dusty orange"], ["f1f33f", "off yellow"], ["b1d27b", "pale olive green"], ["fc824a", "orangish"], ["71aa34", "leaf"], ["b7c9e2", "light blue grey"], ["4b0101", "dried blood"], ["a552e6", "lightish purple"], ["af2f0d", "rusty red"], ["8b88f8", "lavender blue"], ["9af764", "light grass green"], ["a6fbb2", "light mint green"], ["ffc512", "sunflower"], ["750851", "velvet"], ["c14a09", "brick orange"], ["fe2f4a", "lightish red"], ["0203e2", "pure blue"], ["0a437a", "twilight blue"], ["a50055", "violet red"], ["ae8b0c", "yellowy brown"], ["fd798f", "carnation"], ["bfac05", "muddy yellow"], ["3eaf76", "dark seafoam green"], ["c74767", "deep rose"], ["b9484e", "dusty red"], ["647d8e", "grey/blue"], ["bffe28", "lemon lime"], ["d725de", "purple/pink"], ["b29705", "brown yellow"], ["673a3f", "purple brown"], ["a87dc2", "wisteria"], ["fafe4b", "banana yellow"], ["c0022f", "lipstick red"], ["0e87cc", "water blue"], ["8d8468", "brown grey"], ["ad03de", "vibrant purple"], ["8cff9e", "baby green"], ["94ac02", "barf green"], ["c4fff7", "eggshell blue"], ["fdee73", "sandy yellow"], ["33b864", "cool green"], ["fff9d0", "pale"], ["758da3", "blue/grey"], ["f504c9", "hot magenta"], ["77a1b5", "greyblue"], ["8756e4", "purpley"], ["889717", "baby shit green"], ["c27e79", "brownish pink"], ["017371", "dark aquamarine"], ["9f8303", "diarrhea"], ["f7d560", "light mustard"], ["bdf6fe", "pale sky blue"], ["75b84f", "turtle green"], ["9cbb04", "bright olive"], ["29465b", "dark grey blue"], ["696006", "greeny brown"], ["adf802", "lemon green"], ["c1c6fc", "light periwinkle"], ["35ad6b", "seaweed green"], ["fffd37", "sunshine yellow"], ["a442a0", "ugly purple"], ["f36196", "medium pink"], ["947706", "puke brown"], ["fff4f2", "very light pink"], ["1e9167", "viridian"], ["b5c306", "bile"], ["feff7f", "faded yellow"], ["cffdbc", "very pale green"], ["0add08", "vibrant green"], ["87fd05", "bright lime"], ["1ef876", "spearmint"], ["7bfdc7", "light aquamarine"], ["bcecac", "light sage"], ["bbf90f", "yellowgreen"], ["ab9004", "baby poo"], ["1fb57a", "dark seafoam"], ["00555a", "deep teal"], ["a484ac", "heather"], ["c45508", "rust orange"], ["3f829d", "dirty blue"], ["548d44", "fern green"], ["c95efb", "bright lilac"], ["3ae57f", "weird green"], ["016795", "peacock blue"], ["87a922", "avocado green"], ["f0944d", "faded orange"], ["5d1451", "grape purple"], ["25ff29", "hot green"], ["d0fe1d", "lime yellow"], ["ffa62b", "mango"], ["01b44c", "shamrock"], ["ff6cb5", "bubblegum"], ["6b4247", "purplish brown"], ["c7c10c", "vomit yellow"], ["b7fffa", "pale cyan"], ["aeff6e", "key lime"], ["ec2d01", "tomato red"], ["76ff7b", "lightgreen"], ["730039", "merlot"], ["040348", "night blue"], ["df4ec8", "purpleish pink"], ["6ecb3c", "apple"], ["8f9805", "baby poop green"], ["5edc1f", "green apple"], ["d94ff5", "heliotrope"], ["c8fd3d", "yellow/green"], ["070d0d", "almost black"], ["4984b8", "cool blue"], ["51b73b", "leafy green"], ["ac7e04", "mustard brown"], ["4e5481", "dusk"], ["876e4b", "dull brown"], ["58bc08", "frog green"], ["2fef10", "vivid green"], ["2dfe54", "bright light green"], ["0aff02", "fluro green"], ["9cef43", "kiwi"], ["18d17b", "seaweed"], ["35530a", "navy green"], ["1805db", "ultramarine blue"], ["6258c4", "iris"], ["ff964f", "pastel orange"], ["ffab0f", "yellowish orange"], ["8f8ce7", "perrywinkle"], ["24bca8", "tealish"], ["3f012c", "dark plum"], ["cbf85f", "pear"], ["ff724c", "pinkish orange"], ["280137", "midnight purple"], ["b36ff6", "light urple"], ["48c072", "dark mint"], ["bccb7a", "greenish tan"], ["a8415b", "light burgundy"], ["06b1c4", "turquoise blue"], ["cd7584", "ugly pink"], ["f1da7a", "sandy"], ["ff0490", "electric pink"], ["805b87", "muted purple"], ["50a747", "mid green"], ["a8a495", "greyish"], ["cfff04", "neon yellow"], ["ffff7e", "banana"], ["ff7fa7", "carnation pink"], ["ef4026", "tomato"], ["3c9992", "sea"], ["886806", "muddy brown"], ["04f489", "turquoise green"], ["fef69e", "buff"], ["cfaf7b", "fawn"], ["3b719f", "muted blue"], ["fdc1c5", "pale rose"], ["20c073", "dark mint green"], ["9b5fc0", "amethyst"], ["0f9b8e", "blue/green"], ["742802", "chestnut"], ["9db92c", "sick green"], ["a4bf20", "pea"], ["cd5909", "rusty orange"], ["ada587", "stone"], ["be013c", "rose red"], ["b8ffeb", "pale aqua"], ["dc4d01", "deep orange"], ["a2653e", "earth"], ["638b27", "mossy green"], ["419c03", "grassy green"], ["b1ff65", "pale lime green"], ["9dbcd4", "light grey blue"], ["fdfdfe", "pale grey"], ["77ab56", "asparagus"], ["464196", "blueberry"], ["990147", "purple red"], ["befd73", "pale lime"], ["32bf84", "greenish teal"], ["af6f09", "caramel"], ["a0025c", "deep magenta"], ["ffd8b1", "light peach"], ["7f4e1e", "milk chocolate"], ["bf9b0c", "ocher"], ["6ba353", "off green"], ["f075e6", "purply pink"], ["7bc8f6", "lightblue"], ["475f94", "dusky blue"], ["f5bf03", "golden"], ["fffeb6", "light beige"], ["fffd74", "butter yellow"], ["895b7b", "dusky purple"], ["436bad", "french blue"], ["d0c101", "ugly yellow"], ["c6f808", "greeny yellow"], ["f43605", "orangish red"], ["02c14d", "shamrock green"], ["b25f03", "orangish brown"], ["2a7e19", "tree green"], ["490648", "deep violet"], ["536267", "gunmetal"], ["5a06ef", "blue/purple"], ["cf0234", "cherry"], ["c4a661", "sandy brown"], ["978a84", "warm grey"], ["1f0954", "dark indigo"], ["03012d", "midnight"], ["2bb179", "bluey green"], ["c3909b", "grey pink"], ["a66fb5", "soft purple"], ["770001", "blood"], ["922b05", "brown red"], ["7d7f7c", "medium grey"], ["990f4b", "berry"], ["8f7303", "poo"], ["c83cb9", "purpley pink"], ["fea993", "light salmon"], ["acbb0d", "snot"], ["c071fe", "easter purple"], ["ccfd7f", "light yellow green"], ["00022e", "dark navy blue"], ["828344", "drab"], ["ffc5cb", "light rose"], ["ab1239", "rouge"], ["b0054b", "purplish red"], ["99cc04", "slime green"], ["937c00", "baby poop"], ["019529", "irish green"], ["ef1de7", "pink/purple"], ["000435", "dark navy"], ["42b395", "greeny blue"], ["9d5783", "light plum"], ["c8aca9", "pinkish grey"], ["c87606", "dirty orange"], ["aa2704", "rust red"], ["e4cbff", "pale lilac"], ["fa4224", "orangey red"], ["0804f9", "primary blue"], ["5cb200", "kermit green"], ["76424e", "brownish purple"], ["6c7a0e", "murky green"], ["fbdd7e", "wheat"], ["2a0134", "very dark purple"], ["044a05", "bottle green"], ["fd4659", "watermelon"], ["0d75f8", "deep sky blue"], ["fe0002", "fire engine red"], ["cb9d06", "yellow ochre"], ["fb7d07", "pumpkin orange"], ["b9cc81", "pale olive"], ["edc8ff", "light lilac"], ["61e160", "lightish green"], ["8ab8fe", "carolina blue"], ["920a4e", "mulberry"], ["fe02a2", "shocking pink"], ["9a3001", "auburn"], ["65fe08", "bright lime green"], ["befdb7", "celadon"], ["b17261", "pinkish brown"], ["885f01", "poo brown"], ["02ccfe", "bright sky blue"], ["c1fd95", "celery"], ["836539", "dirt brown"], ["fb2943", "strawberry"], ["84b701", "dark lime"], ["b66325", "copper"], ["7f5112", "medium brown"], ["5fa052", "muted green"], ["6dedfd", "robin's egg"], ["0bf9ea", "bright aqua"], ["c760ff", "bright lavender"], ["ffffcb", "ivory"], ["f6cefc", "very light purple"], ["155084", "light navy"], ["f5054f", "pink red"], ["645403", "olive brown"], ["7a5901", "poop brown"], ["a8b504", "mustard green"], ["3d9973", "ocean green"], ["000133", "very dark blue"], ["76a973", "dusty green"], ["2e5a88", "light navy blue"], ["0bf77d", "minty green"], ["bd6c48", "adobe"], ["ac1db8", "barney"], ["2baf6a", "jade green"], ["26f7fd", "bright light blue"], ["aefd6c", "light lime"], ["9b8f55", "dark khaki"], ["ffad01", "orange yellow"], ["c69c04", "ocre"], ["f4d054", "maize"], ["de9dac", "faded pink"], ["05480d", "british racing green"], ["c9ae74", "sandstone"], ["60460f", "mud brown"], ["98f6b0", "light sea green"], ["8af1fe", "robin egg blue"], ["2ee8bb", "aqua marine"], ["11875d", "dark sea green"], ["fdb0c0", "soft pink"], ["b16002", "orangey brown"], ["f7022a", "cherry red"], ["d5ab09", "burnt yellow"], ["86775f", "brownish grey"], ["c69f59", "camel"], ["7a687f", "purplish grey"], ["042e60", "marine"], ["c88d94", "greyish pink"], ["a5fbd5", "pale turquoise"], ["fffe71", "pastel yellow"], ["6241c7", "bluey purple"], ["fffe40", "canary yellow"], ["d3494e", "faded red"], ["985e2b", "sepia"], ["a6814c", "coffee"], ["ff08e8", "bright magenta"], ["9d7651", "mocha"], ["feffca", "ecru"], ["98568d", "purpleish"], ["9e003a", "cranberry"], ["287c37", "darkish green"], ["b96902", "brown orange"], ["ba6873", "dusky rose"], ["ff7855", "melon"], ["94b21c", "sickly green"], ["c5c9c7", "silver"], ["661aee", "purply blue"], ["6140ef", "purpleish blue"], ["9be5aa", "hospital green"], ["7b5804", "shit brown"], ["276ab3", "mid blue"], ["feb308", "amber"], ["8cfd7e", "easter green"], ["6488ea", "soft blue"], ["056eee", "cerulean blue"], ["b27a01", "golden brown"], ["0ffef9", "bright turquoise"], ["fa2a55", "red pink"], ["820747", "red purple"], ["7a6a4f", "greyish brown"], ["f4320c", "vermillion"], ["a13905", "russet"], ["6f828a", "steel grey"], ["a55af4", "lighter purple"], ["ad0afd", "bright violet"], ["004577", "prussian blue"], ["658d6d", "slate green"], ["ca7b80", "dirty pink"], ["005249", "dark blue green"], ["2b5d34", "pine"], ["bff128", "yellowy green"], ["b59410", "dark gold"], ["2976bb", "bluish"], ["014182", "darkish blue"], ["bb3f3f", "dull red"], ["fc2647", "pinky red"], ["a87900", "bronze"], ["82cbb2", "pale teal"], ["667c3e", "military green"], ["fe46a5", "barbie pink"], ["fe83cc", "bubblegum pink"], ["94a617", "pea soup green"], ["a88905", "dark mustard"], ["7f5f00", "shit"], ["9e43a2", "medium purple"], ["062e03", "very dark green"], ["8a6e45", "dirt"], ["cc7a8b", "dusky pink"], ["9e0168", "red violet"], ["fdff38", "lemon yellow"], ["c0fa8b", "pistachio"], ["eedc5b", "dull yellow"], ["7ebd01", "dark lime green"], ["3b5b92", "denim blue"], ["01889f", "teal blue"], ["3d7afd", "lightish blue"], ["5f34e7", "purpley blue"], ["6d5acf", "light indigo"], ["748500", "swamp green"], ["706c11", "brown green"], ["3c0008", "dark maroon"], ["cb00f5", "hot purple"], ["002d04", "dark forest green"], ["658cbb", "faded blue"], ["749551", "drab green"], ["b9ff66", "light lime green"], ["9dc100", "snot green"], ["faee66", "yellowish"], ["7efbb3", "light blue green"], ["7b002c", "bordeaux"], ["c292a1", "light mauve"], ["017b92", "ocean"], ["fcc006", "marigold"], ["657432", "muddy green"], ["d8863b", "dull orange"], ["738595", "steel"], ["aa23ff", "electric purple"], ["08ff08", "fluorescent green"], ["9b7a01", "yellowish brown"], ["f29e8e", "blush"], ["6fc276", "soft green"], ["ff5b00", "bright orange"], ["fdff52", "lemon"], ["866f85", "purple grey"], ["8ffe09", "acid green"], ["eecffe", "pale lavender"], ["510ac9", "violet blue"], ["4f9153", "light forest green"], ["9f2305", "burnt red"], ["728639", "khaki green"], ["de0c62", "cerise"], ["916e99", "faded purple"], ["ffb16d", "apricot"], ["3c4d03", "dark olive green"], ["7f7053", "grey brown"], ["77926f", "green grey"], ["010fcc", "true blue"], ["ceaefa", "pale violet"], ["8f99fb", "periwinkle blue"], ["c6fcff", "light sky blue"], ["5539cc", "blurple"], ["544e03", "green brown"], ["017a79", "bluegreen"], ["01f9c6", "bright teal"], ["c9b003", "brownish yellow"], ["929901", "pea soup"], ["0b5509", "forest"], ["a00498", "barney purple"], ["2000b1", "ultramarine"], ["94568c", "purplish"], ["c2be0e", "puke yellow"], ["748b97", "bluish grey"], ["665fd1", "dark periwinkle"], ["9c6da5", "dark lilac"], ["c44240", "reddish"], ["a24857", "light maroon"], ["825f87", "dusty purple"], ["c9643b", "terra cotta"], ["90b134", "avocado"], ["01386a", "marine blue"], ["25a36f", "teal green"], ["59656d", "slate grey"], ["75fd63", "lighter green"], ["21fc0d", "electric green"], ["5a86ad", "dusty blue"], ["fec615", "golden yellow"], ["fffd01", "bright yellow"], ["dfc5fe", "light lavender"], ["b26400", "umber"], ["7f5e00", "poop"], ["de7e5d", "dark peach"], ["048243", "jungle green"], ["ffffd4", "eggshell"], ["3b638c", "denim"], ["b79400", "yellow brown"], ["84597e", "dull purple"], ["411900", "chocolate brown"], ["7b0323", "wine red"], ["04d9ff", "neon blue"], ["667e2c", "dirty green"], ["fbeeac", "light tan"], ["d7fffe", "ice blue"], ["4e7496", "cadet blue"], ["874c62", "dark mauve"], ["d5ffff", "very light blue"], ["826d8c", "grey purple"], ["ffbacd", "pastel pink"], ["d1ffbd", "very light green"], ["448ee4", "dark sky blue"], ["05472a", "evergreen"], ["d5869d", "dull pink"], ["3d0734", "aubergine"], ["4a0100", "mahogany"], ["f8481c", "reddish orange"], ["02590f", "deep green"], ["89a203", "vomit green"], ["e03fd8", "purple pink"], ["d58a94", "dusty pink"], ["7bb274", "faded green"], ["526525", "camo green"], ["c94cbe", "pinky purple"], ["db4bda", "pink purple"], ["9e3623", "brownish red"], ["b5485d", "dark rose"], ["735c12", "mud"], ["9c6d57", "brownish"], ["028f1e", "emerald green"], ["b1916e", "pale brown"], ["49759c", "dull blue"], ["a0450e", "burnt umber"], ["39ad48", "medium green"], ["b66a50", "clay"], ["8cffdb", "light aqua"], ["a4be5c", "light olive green"], ["cb7723", "brownish orange"], ["05696b", "dark aqua"], ["ce5dae", "purplish pink"], ["c85a53", "dark salmon"], ["96ae8d", "greenish grey"], ["1fa774", "jade"], ["7a9703", "ugly green"], ["ac9362", "dark beige"], ["01a049", "emerald"], ["d9544d", "pale red"], ["fa5ff7", "light magenta"], ["82cafc", "sky"], ["acfffc", "light cyan"], ["fcb001", "yellow orange"], ["910951", "reddish purple"], ["fe2c54", "reddish pink"], ["c875c4", "orchid"], ["cdc50a", "dirty yellow"], ["fd411e", "orange red"], ["9a0200", "deep red"], ["be6400", "orange brown"], ["030aa7", "cobalt blue"], ["fe019a", "neon pink"], ["f7879a", "rose pink"], ["887191", "greyish purple"], ["b00149", "raspberry"], ["12e193", "aqua green"], ["fe7b7c", "salmon pink"], ["ff9408", "tangerine"], ["6a6e09", "brownish green"], ["8b2e16", "red brown"], ["696112", "greenish brown"], ["e17701", "pumpkin"], ["0a481e", "pine green"], ["343837", "charcoal"], ["ffb7ce", "baby pink"], ["6a79f7", "cornflower"], ["5d06e9", "blue violet"], ["3d1c02", "chocolate"], ["82a67d", "greyish green"], ["be0119", "scarlet"], ["c9ff27", "green yellow"], ["373e02", "dark olive"], ["a9561e", "sienna"], ["caa0ff", "pastel purple"], ["ca6641", "terracotta"], ["02d8e9", "aqua blue"], ["88b378", "sage green"], ["980002", "blood red"], ["cb0162", "deep pink"], ["5cac2d", "grass"], ["769958", "moss"], ["a2bffe", "pastel blue"], ["10a674", "bluish green"], ["06b48b", "green blue"], ["af884a", "dark tan"], ["0b8b87", "greenish blue"], ["ffa756", "pale orange"], ["a2a415", "vomit"], ["154406", "forrest green"], ["856798", "dark lavender"], ["34013f", "dark violet"], ["632de9", "purple blue"], ["0a888a", "dark cyan"], ["6f7632", "olive drab"], ["d46a7e", "pinkish"], ["1e488f", "cobalt"], ["bc13fe", "neon purple"], ["7ef4cc", "light turquoise"], ["76cd26", "apple green"], ["74a662", "dull green"], ["80013f", "wine"], ["b1d1fc", "powder blue"], ["ffffe4", "off white"], ["0652ff", "electric blue"], ["045c5a", "dark turquoise"], ["5729ce", "blue purple"], ["069af3", "azure"], ["ff000d", "bright red"], ["f10c45", "pinkish red"], ["5170d7", "cornflower blue"], ["acbf69", "light olive"], ["6c3461", "grape"], ["5e819d", "greyish blue"], ["601ef9", "purplish blue"], ["b0dd16", "yellowish green"], ["cdfd02", "greenish yellow"], ["2c6fbb", "medium blue"], ["c0737a", "dusty rose"], ["d6b4fc", "light violet"], ["020035", "midnight blue"], ["703be7", "bluish purple"], ["fd3c06", "red orange"], ["960056", "dark magenta"], ["40a368", "greenish"], ["03719c", "ocean blue"], ["fc5a50", "coral"], ["ffffc2", "cream"], ["7f2b0a", "reddish brown"], ["b04e0f", "burnt sienna"], ["a03623", "brick"], ["87ae73", "sage"], ["789b73", "grey green"], ["ffffff", "white"], ["98eff9", "robin's egg blue"], ["658b38", "moss green"], ["5a7d9a", "steel blue"], ["380835", "eggplant"], ["fffe7a", "light yellow"], ["5ca904", "leaf green"], ["d8dcd6", "light grey"], ["a5a502", "puke"], ["d648d7", "pinkish purple"], ["047495", "sea blue"], ["b790d4", "pale purple"], ["5b7c99", "slate blue"], ["607c8e", "blue grey"], ["0b4008", "hunter green"], ["ed0dd9", "fuchsia"], ["8c000f", "crimson"], ["ffff84", "pale yellow"], ["bf9005", "ochre"], ["d2bd0a", "mustard yellow"], ["ff474c", "light red"], ["0485d1", "cerulean"], ["ffcfdc", "pale pink"], ["040273", "deep blue"], ["a83c09", "rust"], ["90e4c1", "light teal"], ["516572", "slate"], ["fac205", "goldenrod"], ["d5b60a", "dark yellow"], ["363737", "dark grey"], ["4b5d16", "army green"], ["6b8ba4", "grey blue"], ["80f9ad", "seafoam"], ["a57e52", "puce"], ["a9f971", "spring green"], ["c65102", "dark orange"], ["e2ca76", "sand"], ["b0ff9d", "pastel green"], ["9ffeb0", "mint"], ["fdaa48", "light orange"], ["fe01b1", "bright pink"], ["c1f80a", "chartreuse"], ["36013f", "deep purple"], ["341c02", "dark brown"], ["b9a281", "taupe"], ["8eab12", "pea green"], ["9aae07", "puke green"], ["02ab2e", "kelly green"], ["7af9ab", "seafoam green"], ["137e6d", "blue green"], ["aaa662", "khaki"], ["610023", "burgundy"], ["014d4e", "dark teal"], ["8f1402", "brick red"], ["4b006e", "royal purple"], ["580f41", "plum"], ["8fff9f", "mint green"], ["dbb40c", "gold"], ["a2cffe", "baby blue"], ["c0fb2d", "yellow green"], ["be03fd", "bright purple"], ["840000", "dark red"], ["d0fefe", "pale blue"], ["3f9b0b", "grass green"], ["01153e", "navy"], ["04d8b2", "aquamarine"], ["c04e01", "burnt orange"], ["0cff0c", "neon green"], ["0165fc", "bright blue"], ["cf6275", "rose"], ["ffd1df", "light pink"], ["ceb301", "mustard"], ["380282", "indigo"], ["aaff32", "lime"], ["53fca1", "sea green"], ["8e82fe", "periwinkle"], ["cb416b", "dark pink"], ["677a04", "olive green"], ["ffb07c", "peach"], ["c7fdb5", "pale green"], ["ad8150", "light brown"], ["ff028d", "hot pink"], ["000000", "black"], ["cea2fd", "lilac"], ["001146", "navy blue"], ["0504aa", "royal blue"], ["e6daa6", "beige"], ["ff796c", "salmon"], ["6e750e", "olive"], ["650021", "maroon"], ["01ff07", "bright green"], ["35063e", "dark purple"], ["ae7181", "mauve"], ["06470c", "forest green"], ["13eac9", "aqua"], ["00ffff", "cyan"], ["d1b26f", "tan"], ["00035b", "dark blue"], ["c79fef", "lavender"], ["06c2ac", "turquoise"], ["033500", "dark green"], ["9a0eea", "violet"], ["bf77f6", "light purple"], ["89fe05", "lime green"], ["929591", "grey"], ["75bbfd", "sky blue"], ["ffff14", "yellow"], ["c20078", "magenta"], ["96f97b", "light green"], ["f97306", "orange"], ["029386", "teal"], ["95d0fc", "light blue"], ["e50000", "red"], ["653700", "brown"], ["ff81c0", "pink"], ["0343df", "blue"], ["15b01a", "green"], ["7e1e9c", "purple"], ["FF5E99", "paul irish pink"], ["00000000", "transparent"]]; names.each(function(element) { return lookup[normalizeKey(element[1])] = parseHex(element[0]); }); Color.random = function() { return Color(rand(256), rand(256), rand(256)); }; Color.mix = function(color1, color2, amount) { var new_colors; amount || (amount = 0.5); new_colors = [color1.r, color1.g, color1.b, color1.a].zip([color2.r, color2.g, color2.b, color2.a]).map(function(array) { return (array[0] * amount) + (array[1] * (1 - amount)); }); return Color(new_colors); }; return (typeof exports !== "undefined" && exports !== null ? exports : this)["Color"] = Color; })();; /** The Drawable module is used to provide a simple draw method to the including object. Binds a default draw listener to draw a rectangle or a sprite, if one exists. Binds a step listener to update the transform of the object. Autoloads the sprite specified in I.spriteName, if any. <code><pre> player = Core x: 15 y: 30 width: 5 height: 5 sprite: "my_cool_sprite" engine.bind 'draw', (canvas) -> player.draw(canvas) => Uncaught TypeError: Object has no method 'draw' player.include(Drawable) engine.bind 'draw', (canvas) -> player.draw(canvas) => if you have a sprite named "my_cool_sprite" in your images folder then it will be drawn. Otherwise, a rectangle positioned at x: 15 and y: 30 with width and height 5 will be drawn. </pre></code> @name Drawable @module @constructor @param {Object} I Instance variables @param {Object} self Reference to including object */ /** Triggered every time the object should be drawn. A canvas is passed as the first argument. <code><pre> player = Core x: 0 y: 10 width: 5 height: 5 player.bind "draw", (canvas) -> canvas.fillColor("white") # Text will be drawn positioned relatively to the object. canvas.fillText("Hey, drawing stuff is pretty easy.", 5, 5) </pre></code> @name draw @methodOf Drawable# @event */var Drawable; Drawable = function(I, self) { var _ref; I || (I = {}); Object.reverseMerge(I, { color: "#196", hflip: false, vflip: false, spriteName: null, zIndex: 0 }); if ((_ref = I.sprite) != null ? typeof _ref.isString === "function" ? _ref.isString() : void 0 : void 0) { I.sprite = Sprite.loadByName(I.sprite, function(sprite) { I.width = sprite.width; return I.height = sprite.height; }); } else if (I.spriteName) { I.sprite = Sprite.loadByName(I.spriteName, function(sprite) { I.width = sprite.width; return I.height = sprite.height; }); } self.bind('draw', function(canvas) { if (I.sprite) { if (I.sprite.draw != null) { return I.sprite.draw(canvas, 0, 0); } else { return typeof warn === "function" ? warn("Sprite has no draw method!") : void 0; } } else { canvas.fillColor(I.color); return canvas.fillRect(0, 0, I.width, I.height); } }); return { /** Draw does not actually do any drawing itself, instead it triggers all of the draw events. Listeners on the events do the actual drawing. @name draw @methodOf Drawable# @returns self */ draw: function(canvas) { self.trigger('beforeTransform', canvas); canvas.withTransform(self.transform(), function(canvas) { return self.trigger('draw', canvas); }); self.trigger('afterTransform', canvas); return self; }, /** Returns the current transform, with translation, rotation, and flipping applied. @name transform @methodOf Drawable# @type Matrix */ transform: function() { var center, transform; center = self.center(); transform = Matrix.translation(center.x, center.y); if (I.rotation) { transform = transform.concat(Matrix.rotation(I.rotation)); } if (I.hflip) { transform = transform.concat(Matrix.HORIZONTAL_FLIP); } if (I.vflip) { transform = transform.concat(Matrix.VERTICAL_FLIP); } transform = transform.concat(Matrix.translation(-I.width / 2, -I.height / 2)); if (I.spriteOffset) { transform = transform.concat(Matrix.translation(I.spriteOffset.x, I.spriteOffset.y)); } return transform; } }; };; /** The Durable module deactives a <code>GameObject</code> after a specified duration. If a duration is specified the object will update that many times. If -1 is specified the object will have an unlimited duration. <code><pre> enemy = GameObject x: 50 y: 30 duration: 5 enemy.include(Durable) enemy.I.active => true 5.times -> enemy.update() enemy.I.active => false </pre></code> @name Durable @module @constructor @param {Object} I Instance variables */var Durable; Durable = function(I) { Object.reverseMerge(I, { duration: -1 }); return { before: { update: function() { if (I.duration !== -1 && I.age >= I.duration) { return I.active = false; } } } }; };; var Emitter; Emitter = function(I) { var self; self = GameObject(I); return self.include(Emitterable); };; var Emitterable; Emitterable = function(I, self) { var n, particles; I || (I = {}); Object.reverseMerge(I, { batchSize: 1, emissionRate: 1, color: "blue", width: 0, height: 0, generator: {}, particleCount: Infinity, particleData: { acceleration: Point(0, 0.1), age: 0, color: "blue", duration: 30, includedModules: ["Movable"], height: 2, maxSpeed: 2, offset: Point(0, 0), sprite: false, spriteName: false, velocity: Point(-0.25, 1), width: 2 } }); particles = []; n = 0; return { before: { draw: function(canvas) { return particles.invoke("draw", canvas); }, update: function() { I.batchSize.times(function() { var center, key, particleProperties, value, _ref; if (n < I.particleCount && rand() < I.emissionRate) { center = self.center(); particleProperties = Object.reverseMerge({ x: center.x, y: center.y }, I.particleData); _ref = I.generator; for (key in _ref) { value = _ref[key]; if (I.generator[key].call) { particleProperties[key] = I.generator[key](n, I); } else { particleProperties[key] = I.generator[key]; } } particleProperties.x += particleProperties.offset.x; particleProperties.y += particleProperties.offset.y; particles.push(GameObject(particleProperties)); return n += 1; } }); particles = particles.select(function(particle) { return particle.update(); }); if (n === I.particleCount && !particles.length) { return I.active = false; } } } }; };; (function() { var Engine, defaults; defaults = { FPS: 30, age: 0, ambientLight: 1, backgroundColor: "#00010D", cameraTransform: Matrix.IDENTITY, clear: false, excludedModules: [], includedModules: [], paused: false, showFPS: false, zSort: false }; /** The Engine controls the game world and manages game state. Once you set it up and let it run it pretty much takes care of itself. You can use the engine to add or remove objects from the game world. There are several modules that can include to add additional capabilities to the engine. The engine fires events that you may bind listeners to. Event listeners may be bound with <code>engine.bind(eventName, callback)</code> @name Engine @constructor @param I */ /** Observe or modify the entity data before it is added to the engine. @name beforeAdd @methodOf Engine# @event @param {Object} entityData */ /** Observe or configure a <code>gameObject</code> that has been added to the engine. @name afterAdd @methodOf Engine# @event @param {GameObject} object The object that has just been added to the engine. */ /** Called when the engine updates all the game objects. @name update @methodOf Engine# @event */ /** Called after the engine completes an update. Here it is safe to modify the game objects array. @name afterUpdate @methodOf Engine# @event */ /** Called before the engine draws the game objects on the canvas. The current camera transform is applied. @name beforeDraw @methodOf Engine# @event */ /** Called after the engine draws on the canvas. The current camera transform is applied. @name draw @methodOf Engine# @event */ /** Called after the engine draws. The current camera transform is not applied. This is great for adding overlays. @name overlay @methodOf Engine# @event */ Engine = function(I) { var animLoop, defaultModules, draw, frameAdvance, lastStepTime, modules, queuedObjects, running, self, startTime, step, update; I || (I = {}); Object.reverseMerge(I, { objects: [] }, defaults); frameAdvance = false; queuedObjects = []; running = false; startTime = +new Date(); lastStepTime = -Infinity; animLoop = function(timestamp) { var delta, msPerFrame, remainder; timestamp || (timestamp = +new Date()); msPerFrame = 1000 / I.FPS; delta = timestamp - lastStepTime; remainder = delta - msPerFrame; if (remainder > 0) { lastStepTime = timestamp - Math.min(remainder, msPerFrame); step(); } if (running) { return window.requestAnimationFrame(animLoop); } }; update = function() { var toRemove, _ref; if (typeof updateKeys === "function") { updateKeys(); } self.trigger("update"); _ref = I.objects.partition(function(object) { return object.update(); }), I.objects = _ref[0], toRemove = _ref[1]; toRemove.invoke("trigger", "remove"); I.objects = I.objects.concat(queuedObjects); queuedObjects = []; return self.trigger("afterUpdate"); }; draw = function() { if (I.clear) { I.canvas.clear(); } else if (I.backgroundColor) { I.canvas.fill(I.backgroundColor); } I.canvas.withTransform(I.cameraTransform, function(canvas) { var drawObjects; self.trigger("beforeDraw", canvas); if (I.zSort) { drawObjects = I.objects.copy().sort(function(a, b) { return a.I.zIndex - b.I.zIndex; }); } else { drawObjects = I.objects; } drawObjects.invoke("draw", canvas); return self.trigger("draw", I.canvas); }); return self.trigger("overlay", I.canvas); }; step = function() { if (!I.paused || frameAdvance) { update(); I.age += 1; } return draw(); }; self = Core(I).extend({ /** The add method creates and adds an object to the game world. Events triggered: <code>beforeAdd(entityData)</code> <code>afterAdd(gameObject)</code> @name add @methodOf Engine# @param entityData The data used to create the game object. @type GameObject */ add: function(entityData) { var obj; self.trigger("beforeAdd", entityData); obj = GameObject.construct(entityData); self.trigger("afterAdd", obj); if (running && !I.paused) { queuedObjects.push(obj); } else { I.objects.push(obj); } return obj; }, objectAt: function(x, y) { var bounds, targetObject; targetObject = null; bounds = { x: x, y: y, width: 1, height: 1 }; self.eachObject(function(object) { if (object.collides(bounds)) { return targetObject = object; } }); return targetObject; }, eachObject: function(iterator) { return I.objects.each(iterator); }, /** Start the game simulation. @methodOf Engine# @name start */ start: function() { if (!running) { running = true; return window.requestAnimationFrame(animLoop); } }, /** Stop the simulation. @methodOf Engine# @name stop */ stop: function() { return running = false; }, frameAdvance: function() { I.paused = true; frameAdvance = true; step(); return frameAdvance = false; }, play: function() { return I.paused = false; }, /** Pause the simulation @methodOf Engine# @name pause */ pause: function() { return I.paused = true; }, paused: function() { return I.paused; }, setFramerate: function(newFPS) { I.FPS = newFPS; self.stop(); return self.start(); }, update: update, draw: draw }); self.attrAccessor("ambientLight", "backgroundColor", "cameraTransform", "clear"); self.include(Bindable); defaultModules = ["SaveState", "Selector", "Collision"]; modules = defaultModules.concat(I.includedModules); modules = modules.without([].concat(I.excludedModules)); modules.each(function(moduleName) { if (!Engine[moduleName]) { throw "#Engine." + moduleName + " is not a valid engine module"; } return self.include(Engine[moduleName]); }); self.trigger("init"); return self; }; return (typeof exports !== "undefined" && exports !== null ? exports : this)["Engine"] = Engine; })();; /** The <code>Collision</code> module provides some simple collision detection methods to engine. @name Collision @fieldOf Engine @module @param {Object} I Instance variables @param {Object} self Reference to the engine */Engine.Collision = function(I, self) { return { /** Detects collisions between a bounds and the game objects. @name collides @methodOf Engine.Collision# @param bounds The bounds to check collisions with. @param [sourceObject] An object to exclude from the results. */ collides: function(bounds, sourceObject) { return I.objects.inject(false, function(collided, object) { return collided || (object.solid() && (object !== sourceObject) && object.collides(bounds)); }); }, /** Detects collisions between a bounds and the game objects. Returns an array of objects colliding with the bounds provided. @name collidesWith @methodOf Engine.Collision# @param bounds The bounds to check collisions with. @param [sourceObject] An object to exclude from the results. */ collidesWith: function(bounds, sourceObject) { var collided; collided = []; I.objects.each(function(object) { if (!object.solid()) { return; } if (object !== sourceObject && object.collides(bounds)) { return collided.push(object); } }); if (collided.length) { return collided; } }, /** Detects collisions between a ray and the game objects. @name rayCollides @methodOf Engine.Collision# @param source The origin point @param direction A point representing the direction of the ray @param [sourceObject] An object to exclude from the results. */ rayCollides: function(source, direction, sourceObject) { var hits, nearestDistance, nearestHit; hits = I.objects.map(function(object) { var hit; hit = object.solid() && (object !== sourceObject) && Collision.rayRectangle(source, direction, object.centeredBounds()); if (hit) { hit.object = object; } return hit; }); nearestDistance = Infinity; nearestHit = null; hits.each(function(hit) { var d; if (hit && (d = hit.distance(source)) < nearestDistance) { nearestDistance = d; return nearestHit = hit; } }); return nearestHit; } }; };; /** The <code>SaveState</code> module provides methods to save and restore the current engine state. @name SaveState @fieldOf Engine @module @param {Object} I Instance variables @param {Object} self Reference to the engine */Engine.SaveState = function(I, self) { var savedState; savedState = null; return { rewind: function() {}, /** Save the current game state and returns a JSON object representing that state. @name saveState @methodOf Engine.SaveState# */ saveState: function() { return savedState = I.objects.map(function(object) { return Object.extend({}, object.I); }); }, /** Loads the game state passed in, or the last saved state, if any. @name loadState @methodOf Engine.SaveState# @param [newState] The game state to load. */ loadState: function(newState) { if (newState || (newState = savedState)) { I.objects.invoke("trigger", "remove"); I.objects = []; return newState.each(function(objectData) { return self.add(Object.extend({}, objectData)); }); } }, /** Reloads the current engine state, useful for hotswapping code. @name reload @methodOf Engine.SaveState# */ reload: function() { var oldObjects; oldObjects = I.objects; I.objects = []; return oldObjects.each(function(object) { object.trigger("remove"); return self.add(object.I); }); } }; };; /** The <code>Selector</code> module provides methods to query the engine to find game objects. @name Selector @fieldOf Engine @module @param {Object} I Instance variables @param {Object} self Reference to the engine */Engine.Selector = function(I, self) { var instanceMethods; instanceMethods = { set: function(attr, value) { return this.each(function(item) { return item.I[attr] = value; }); } }; return { /** Get a selection of GameObjects that match the specified selector criteria. The selector language can select objects by id, class, or attributes. To select an object by id use "#anId" To select objects by class use "MyClass" To select objects by properties use ".someProperty" or ".someProperty=someValue" You may mix and match selectors. "Wall.x=0" to select all objects of class Wall with an x property of 0. @name find @methodOf Engine# @param {String} selector @type Array */ find: function(selector) { var matcher, results; results = []; matcher = Engine.Selector.generate(selector); I.objects.each(function(object) { if (matcher.match(object)) { return results.push(object); } }); return Object.extend(results, instanceMethods); } }; }; Object.extend(Engine.Selector, { parse: function(selector) { return selector.split(",").invoke("trim"); }, process: function(item) { var result; result = /^(\w+)?#?([\w\-]+)?\.?([\w\-]+)?=?([\w\-]+)?/.exec(item); if (result) { if (result[4]) { result[4] = result[4].parse(); } return result.splice(1); } else { return []; } }, generate: function(selector) { var ATTR, ATTR_VALUE, ID, TYPE, components; components = Engine.Selector.parse(selector).map(function(piece) { return Engine.Selector.process(piece); }); TYPE = 0; ID = 1; ATTR = 2; ATTR_VALUE = 3; return { match: function(object) { var attr, attrMatch, component, idMatch, typeMatch, value, _i, _len; for (_i = 0, _len = components.length; _i < _len; _i++) { component = components[_i]; idMatch = (component[ID] === object.I.id) || !component[ID]; typeMatch = (component[TYPE] === object.I["class"]) || !component[TYPE]; if (attr = component[ATTR]) { if ((value = component[ATTR_VALUE]) != null) { attrMatch = object.I[attr] === value; } else { attrMatch = object.I[attr]; } } else { attrMatch = true; } if (idMatch && typeMatch && attrMatch) { return true; } } return false; } }; } });; /** The default base class for all objects you can add to the engine. GameObjects fire events that you may bind listeners to. Event listeners may be bound with <code>object.bind(eventName, callback)</code> @name GameObject @extends Core @constructor @instanceVariables age, active, created, destroyed, solid, includedModules, excludedModules */ /** Triggered when the object is created. @name create @methodOf GameObject# @event */ /** Triggered when object is destroyed. Use the destroy event to add particle effects, play sounds, etc. @name destroy @methodOf GameObject# @event */ /** Triggered during every update step. @name step @methodOf GameObject# @event */ /** Triggered every update after the `step` event is triggered. @name update @methodOf GameObject# @event */ /** Triggered when the object is removed from the engine. Use the remove event to handle any clean up. @name remove @methodOf GameObject# @event */var GameObject; GameObject = function(I) { var autobindEvents, defaultModules, modules, self; I || (I = {}); /** @name I @memberOf GameObject# */ Object.reverseMerge(I, { age: 0, active: true, created: false, destroyed: false, solid: false, includedModules: [], excludedModules: [] }); self = Core(I).extend({ /** Update the game object. This is generally called by the engine. @name update @methodOf GameObject# */ update: function() { if (I.active) { self.trigger('step'); self.trigger('update'); I.age += 1; } return I.active; }, /** Destroys the object and triggers the destroyed callback. @name destroy @methodOf GameObject# */ destroy: function() { if (!I.destroyed) { self.trigger('destroy'); } I.destroyed = true; return I.active = false; } }); defaultModules = [Bindable, Bounded, Drawable, Durable]; modules = defaultModules.concat(I.includedModules.invoke('constantize')); modules = modules.without(I.excludedModules.invoke('constantize')); modules.each(function(Module) { return self.include(Module); }); self.attrAccessor("solid"); autobindEvents = ['create', 'destroy', 'step']; autobindEvents.each(function(eventName) { var event; if (event = I[eventName]) { if (typeof event === "function") { return self.bind(eventName, event); } else { return self.bind(eventName, eval("(function() {" + event + "})")); } } }); if (!I.created) { self.trigger('create'); } I.created = true; return self; }; /** Construct an object instance from the given entity data. @name construct @memberOf GameObject @param {Object} entityData */ GameObject.construct = function(entityData) { if (entityData["class"]) { return entityData["class"].constantize()(entityData); } else { return GameObject(entityData); } };; /** The Movable module automatically updates the position and velocity of GameObjects based on the velocity and acceleration. It does not check collisions so is probably best suited to particle effect like things. <code><pre> player = GameObject x: 0 y: 0 velocity: Point(0, 0) acceleration: Point(1, 0) maxSpeed: 2 player.include(Movable) => `velocity is {x: 0, y: 0} and position is {x: 0, y: 0}` player.update() => `velocity is {x: 1, y: 0} and position is {x: 1, y: 0}` player.update() => `velocity is {x: 2, y: 0} and position is {x: 3, y: 0}` # we've hit our maxSpeed so our velocity won't increase player.update() => `velocity is {x: 2, y: 0} and position is {x: 5, y: 0}` </pre></code> @name Movable @module @constructor @param {Object} I Instance variables */var Movable; Movable = function(I) { Object.reverseMerge(I, { acceleration: Point(0, 0), velocity: Point(0, 0) }); I.acceleration = Point(I.acceleration.x, I.acceleration.y); I.velocity = Point(I.velocity.x, I.velocity.y); return { before: { update: function() { var currentSpeed; I.velocity = I.velocity.add(I.acceleration); if (I.maxSpeed != null) { currentSpeed = I.velocity.magnitude(); if (currentSpeed > I.maxSpeed) { I.velocity = I.velocity.scale(I.maxSpeed / currentSpeed); } } I.x += I.velocity.x; return I.y += I.velocity.y; } } }; };; (function() { var ResourceLoader, typeTable; typeTable = { images: "png" }; ResourceLoader = { urlFor: function(directory, name) { var type, _ref; directory = (typeof App !== "undefined" && App !== null ? (_ref = App.directories) != null ? _ref[directory] : void 0 : void 0) || directory; type = typeTable[directory]; return "" + BASE_URL + "/" + directory + "/" + name + "." + type + "?" + MTIME; } }; return (typeof exports !== "undefined" && exports !== null ? exports : this)["ResourceLoader"] = ResourceLoader; })();; var Rotatable; Rotatable = function(I) { I || (I = {}); Object.reverseMerge(I, { rotation: 0, rotationalVelocity: 0 }); return { before: { update: function() { return I.rotation += I.rotationalVelocity; } } }; };; /** The Sprite class provides a way to load images for use in games. By default, images are loaded asynchronously. A proxy object is returned immediately but though it has a draw method it will not draw anything to the screen until the image has been loaded. @name Sprite @constructor */(function() { var LoaderProxy, Sprite; LoaderProxy = function() { return { draw: function() {}, fill: function() {}, frame: function() {}, update: function() {}, width: null, height: null }; }; Sprite = function(image, sourceX, sourceY, width, height) { sourceX || (sourceX = 0); sourceY || (sourceY = 0); width || (width = image.width); height || (height = image.height); return { /** Draw this sprite on the given canvas at the given position. @name draw @methodOf Sprite# @param canvas @param x @param y */ draw: function(canvas, x, y) { return canvas.drawImage(image, sourceX, sourceY, width, height, x, y, width, height); }, fill: function(canvas, x, y, width, height, repeat) { var pattern; if (repeat == null) { repeat = "repeat"; } pattern = canvas.createPattern(image, repeat); canvas.fillColor(pattern); return canvas.fillRect(x, y, width, height); }, width: width, height: height }; }; Sprite.loadSheet = function(name, tileWidth, tileHeight) { var image, sprites, url; url = ResourceLoader.urlFor("images", name); sprites = []; image = new Image(); image.onload = function() { var imgElement; imgElement = this; return (image.height / tileHeight).times(function(row) { return (image.width / tileWidth).times(function(col) { return sprites.push(Sprite(imgElement, col * tileWidth, row * tileHeight, tileWidth, tileHeight)); }); }); }; image.src = url; return sprites; }; Sprite.load = function(url, loadedCallback) { var img, proxy; img = new Image(); proxy = LoaderProxy(); img.onload = function() { var tile; tile = Sprite(this); Object.extend(proxy, tile); if (loadedCallback) { return loadedCallback(proxy); } }; img.src = url; return proxy; }; /** Loads a sprite with the given pixie id. @name fromPixieId @methodOf Sprite @param id @param [callback] @type Sprite */ Sprite.fromPixieId = function(id, callback) { return Sprite.load("http://pixieengine.com/s3/sprites/" + id + "/original.png", callback); }; /** A sprite that draws nothing. @name EMPTY @fieldOf Sprite @constant @type Sprite */ /** A sprite that draws nothing. @name NONE @fieldOf Sprite @constant @type Sprite */ Sprite.EMPTY = Sprite.NONE = LoaderProxy(); /** Loads a sprite from a given url. @name fromURL @methodOf Sprite @param {String} url @param [callback] @type Sprite */ Sprite.fromURL = Sprite.load; /** Loads a sprite with the given name. @name loadByName @methodOf Sprite @param {String} name @param [callback] @type Sprite */ Sprite.loadByName = function(name, callback) { return Sprite.load(ResourceLoader.urlFor("images", name), callback); }; return (typeof exports !== "undefined" && exports !== null ? exports : this)["Sprite"] = Sprite; })();; ;
browserlib
; ; document.oncontextmenu = function() { return false; }; $(document).bind("keydown", function(event) { if (!$(event.target).is("input")) { return event.preventDefault(); } });; var Joysticks; var __slice = Array.prototype.slice; Joysticks = (function() { var AXIS_MAX, Controller, DEAD_ZONE, MAX_BUFFER, TRIP_HIGH, TRIP_LOW, axisMappingDefault, axisMappingOSX, buttonMappingDefault, buttonMappingOSX, controllers, displayInstallPrompt, joysticks, plugin, previousJoysticks, type; type = "application/x-boomstickjavascriptjoysticksupport"; plugin = null; MAX_BUFFER = 2000; AXIS_MAX = 32767 - MAX_BUFFER; DEAD_ZONE = AXIS_MAX * 0.2; TRIP_HIGH = AXIS_MAX * 0.75; TRIP_LOW = AXIS_MAX * 0.5; previousJoysticks = []; joysticks = []; controllers = []; buttonMappingDefault = { "A": 1, "B": 2, "C": 4, "D": 8, "X": 4, "Y": 8, "R": 32, "RB": 32, "R1": 32, "L": 16, "LB": 16, "L1": 16, "SELECT": 64, "BACK": 64, "START": 128, "HOME": 256, "GUIDE": 256, "TL": 512, "TR": 1024, "ANY": 0xFFFFFF }; buttonMappingOSX = { "A": 2048, "B": 4096, "C": 8192, "D": 16384, "X": 8192, "Y": 16384, "R": 512, "L": 256, "SELECT": 32, "BACK": 32, "START": 16, "HOME": 1024, "LT": 64, "TR": 128, "ANY": 0xFFFFFF0 }; axisMappingDefault = { 0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5 }; axisMappingOSX = { 0: 2, 1: 3, 2: 4, 3: 5, 4: 0, 5: 1 }; displayInstallPrompt = function(text, url) { return $("<a />", { css: { backgroundColor: "yellow", boxSizing: "border-box", color: "#000", display: "block", fontWeight: "bold", left: 0, padding: "1em", position: "absolute", textDecoration: "none", top: 0, width: "100%", zIndex: 2000 }, href: url, target: "_blank", text: text }).appendTo("body"); }; Controller = function(i, remapOSX) { var axisMapping, axisTrips, buttonMapping, currentState, previousState, self; if (remapOSX === void 0) { remapOSX = navigator.platform.match(/^Mac/); } if (remapOSX) { buttonMapping = buttonMappingOSX; axisMapping = axisMappingOSX; } else { buttonMapping = buttonMappingDefault; axisMapping = axisMappingDefault; } currentState = function() { return joysticks[i]; }; previousState = function() { return previousJoysticks[i]; }; axisTrips = []; return self = Core().include(Bindable).extend({ actionDown: function() { var buttons, state; buttons = 1 <= arguments.length ? __slice.call(arguments, 0) : []; if (state = currentState()) { return buttons.inject(false, function(down, button) { return down || state.buttons & buttonMapping[button]; }); } else { return false; } }, buttonPressed: function(button) { var buttonId; buttonId = buttonMapping[button]; return (self.buttons() & buttonId) && !(previousState().buttons & buttonId); }, position: function(stick) { var magnitude, p, ratio, state; if (stick == null) { stick = 0; } if (state = currentState()) { p = Point(self.axis(2 * stick), self.axis(2 * stick + 1)); magnitude = p.magnitude(); if (magnitude > AXIS_MAX) { return p.norm(); } else if (magnitude < DEAD_ZONE) { return Point(0, 0); } else { ratio = magnitude / AXIS_MAX; return p.scale(ratio / AXIS_MAX); } } else { return Point(0, 0); } }, axis: function(n) { n = axisMapping[n]; return self.axes()[n] || 0; }, axes: function() { var state; if (state = currentState()) { return state.axes; } else { return []; } }, buttons: function() { var state; if (state = currentState()) { return state.buttons; } }, processEvents: function() { var x, y, _ref; _ref = [0, 1].map(function(n) { if (!axisTrips[n] && self.axis(n).abs() > TRIP_HIGH) { axisTrips[n] = true; return self.axis(n).sign(); } if (axisTrips[n] && self.axis(n).abs() < TRIP_LOW) { axisTrips[n] = false; } return 0; }), x = _ref[0], y = _ref[1]; if (!x || !y) { return self.trigger("tap", Point(x, y)); } }, drawDebug: function(canvas) { var axis, i, lineHeight, _len, _ref; lineHeight = 18; canvas.fillColor("#FFF"); _ref = self.axes(); for (i = 0, _len = _ref.length; i < _len; i++) { axis = _ref[i]; canvas.fillText(axis, 0, i * lineHeight); } return canvas.fillText(self.buttons(), 0, i * lineHeight); } }); }; return { getController: function(i) { return controllers[i] || (controllers[i] = Controller(i)); }, init: function() { if (!plugin) { plugin = document.createElement("object"); plugin.type = type; plugin.width = 0; plugin.height = 0; $("body").append(plugin); plugin.maxAxes = 6; if (!plugin.status) { return displayInstallPrompt("Your browser does not yet handle joysticks, please click here to install the Boomstick plugin!", "https://github.com/STRd6/Boomstick/wiki"); } } }, status: function() { return plugin != null ? plugin.status : void 0; }, update: function() { var controller, _i, _len, _results; if (plugin.joysticksJSON) { previousJoysticks = joysticks; joysticks = JSON.parse(plugin.joysticksJSON()); } _results = []; for (_i = 0, _len = controllers.length; _i < _len; _i++) { controller = controllers[_i]; _results.push(controller != null ? controller.processEvents() : void 0); } return _results; }, joysticks: function() { return joysticks; } }; })();; /** jQuery Hotkeys Plugin Copyright 2010, John Resig Dual licensed under the MIT or GPL Version 2 licenses. Based upon the plugin by Tzury Bar Yochay: http://github.com/tzuryby/hotkeys Original idea by: Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ */(function(jQuery) { var keyHandler; jQuery.hotkeys = { version: "0.8", specialKeys: { 8: "backspace", 9: "tab", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause", 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home", 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del", 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7", 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111: "/", 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8", 120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 219: "[", 220: "\\", 221: "]", 222: "'", 224: "meta" }, shiftNums: { "`": "~", "1": "!", "2": "@", "3": "#", "4": "$", "5": "%", "6": "^", "7": "&", "8": "*", "9": "(", "0": ")", "-": "_", "=": "+", ";": ":", "'": "\"", ",": "<", ".": ">", "/": "?", "\\": "|" } }; keyHandler = function(handleObj) { var keys, origHandler; if (typeof handleObj.data !== "string") { return; } origHandler = handleObj.handler; keys = handleObj.data.toLowerCase().split(" "); return handleObj.handler = function(event) { var character, key, modif, possible, special, _i, _len; if (this !== event.target && (/textarea|select/i.test(event.target.nodeName) || event.target.type === "text" || event.target.type === "password")) { return; } special = event.type !== "keypress" && jQuery.hotkeys.specialKeys[event.which]; character = String.fromCharCode(event.which).toLowerCase(); modif = ""; possible = {}; if (event.altKey && special !== "alt") { modif += "alt+"; } if (event.ctrlKey && special !== "ctrl") { modif += "ctrl+"; } if (event.metaKey && !event.ctrlKey && special !== "meta") { modif += "meta+"; } if (event.shiftKey && special !== "shift") { modif += "shift+"; } if (special) { possible[modif + special] = true; } else { possible[modif + character] = true; possible[modif + jQuery.hotkeys.shiftNums[character]] = true; if (modif === "shift+") { possible[jQuery.hotkeys.shiftNums[character]] = true; } } for (_i = 0, _len = keys.length; _i < _len; _i++) { key = keys[_i]; if (possible[key]) { return origHandler.apply(this, arguments); } } }; }; return jQuery.each(["keydown", "keyup", "keypress"], function() { return jQuery.event.special[this] = { add: keyHandler }; }); })(jQuery);; /** Merges properties from objects into target without overiding. First come, first served. @return target */var __slice = Array.prototype.slice; jQuery.extend({ reverseMerge: function() { var name, object, objects, target, _i, _len; target = arguments[0], objects = 2 <= arguments.length ? __slice.call(arguments, 1) : []; for (_i = 0, _len = objects.length; _i < _len; _i++) { object = objects[_i]; for (name in object) { if (!target.hasOwnProperty(name)) { target[name] = object[name]; } } } return target; } });; $(function() { /** The global keydown property lets your query the status of keys. <pre> # Examples: if keydown.left moveLeft() if keydown.a or keydown.space attack() if keydown.return confirm() if keydown.esc cancel() </pre> @name keydown @namespace */ var keyName, prevKeysDown; window.keydown = {}; window.justPressed = {}; prevKeysDown = {}; keyName = function(event) { return jQuery.hotkeys.specialKeys[event.which] || String.fromCharCode(event.which).toLowerCase(); }; $(document).bind("keydown", function(event) { var key; key = keyName(event); return keydown[key] = true; }); $(document).bind("keyup", function(event) { var key; key = keyName(event); return keydown[key] = false; }); return window.updateKeys = function() { var key, value, _results; window.justPressed = {}; for (key in keydown) { value = keydown[key]; if (!prevKeysDown[key]) { justPressed[key] = value; } } prevKeysDown = {}; _results = []; for (key in keydown) { value = keydown[key]; _results.push(prevKeysDown[key] = value); } return _results; }; });; var Music; Music = (function() { var track; track = $("<audio />", { loop: "loop" }).appendTo('body').get(0); track.volume = 1; return { play: function(name) { track.src = "" + BASE_URL + "/sounds/" + name + ".mp3"; return track.play(); } }; })();; var __slice = Array.prototype.slice; (function($) { return $.fn.powerCanvas = function(options) { var $canvas, canvas, context; options || (options = {}); canvas = this.get(0); context = void 0; /** * PowerCanvas provides a convenient wrapper for working with Context2d. * @name PowerCanvas * @constructor */ $canvas = $(canvas).extend((function() { /** * Passes this canvas to the block with the given matrix transformation * applied. All drawing methods called within the block will draw * into the canvas with the transformation applied. The transformation * is removed at the end of the block, even if the block throws an error. * * @name withTransform * @methodOf PowerCanvas# * * @param {Matrix} matrix * @param {Function} block * @returns this */ })(), { withTransform: function(matrix, block) { context.save(); context.transform(matrix.a, matrix.b, matrix.c, matrix.d, matrix.tx, matrix.ty); try { block(this); } finally { context.restore(); } return this; }, clear: function() { context.clearRect(0, 0, canvas.width, canvas.height); return this; }, clearRect: function(x, y, width, height) { context.clearRect(x, y, width, height); return this; }, context: function() { return context; }, element: function() { return canvas; }, globalAlpha: function(newVal) { if (newVal != null) { context.globalAlpha = newVal; return this; } else { return context.globalAlpha; } }, compositeOperation: function(newVal) { if (newVal != null) { context.globalCompositeOperation = newVal; return this; } else { return context.globalCompositeOperation; } }, createLinearGradient: function(x0, y0, x1, y1) { return context.createLinearGradient(x0, y0, x1, y1); }, createRadialGradient: function(x0, y0, r0, x1, y1, r1) { return context.createRadialGradient(x0, y0, r0, x1, y1, r1); }, buildRadialGradient: function(c1, c2, stops) { var color, gradient, position; gradient = context.createRadialGradient(c1.x, c1.y, c1.radius, c2.x, c2.y, c2.radius); for (position in stops) { color = stops[position]; gradient.addColorStop(position, color); } return gradient; }, createPattern: function(image, repitition) { return context.createPattern(image, repitition); }, drawImage: function(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight) { context.drawImage(image, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight); return this; }, drawLine: function(x1, y1, x2, y2, width) { if (arguments.length === 3) { width = x2; x2 = y1.x; y2 = y1.y; y1 = x1.y; x1 = x1.x; } width || (width = 3); context.lineWidth = width; context.beginPath(); context.moveTo(x1, y1); context.lineTo(x2, y2); context.closePath(); context.stroke(); return this; }, fill: function(color) { $canvas.fillColor(color); context.fillRect(0, 0, canvas.width, canvas.height); return this; } }, (function() { /** * Fills a circle at the specified position with the specified * radius and color. * * @name fillCircle * @methodOf PowerCanvas# * * @param {Number} x * @param {Number} y * @param {Number} radius * @param {Number} color * @see PowerCanvas#fillColor * @returns this */ })(), { fillCircle: function(x, y, radius, color) { $canvas.fillColor(color); context.beginPath(); context.arc(x, y, radius, 0, Math.TAU, true); context.closePath(); context.fill(); return this; } }, (function() { /** * Fills a rectangle with the current fillColor * at the specified position with the specified * width and height * @name fillRect * @methodOf PowerCanvas# * * @param {Number} x * @param {Number} y * @param {Number} width * @param {Number} height * @see PowerCanvas#fillColor * @returns this */ })(), { fillRect: function(x, y, width, height) { context.fillRect(x, y, width, height); return this; }, fillShape: function() { var points; points = 1 <= arguments.length ? __slice.call(arguments, 0) : []; context.beginPath(); points.each(function(point, i) { if (i === 0) { return context.moveTo(point.x, point.y); } else { return context.lineTo(point.x, point.y); } }); context.lineTo(points[0].x, points[0].y); return context.fill(); } }, (function() { /** * Adapted from http://js-bits.blogspot.com/2010/07/canvas-rounded-corner-rectangles.html */ })(), { fillRoundRect: function(x, y, width, height, radius, strokeWidth) { radius || (radius = 5); context.beginPath(); context.moveTo(x + radius, y); context.lineTo(x + width - radius, y); context.quadraticCurveTo(x + width, y, x + width, y + radius); context.lineTo(x + width, y + height - radius); context.quadraticCurveTo(x + width, y + height, x + width - radius, y + height); context.lineTo(x + radius, y + height); context.quadraticCurveTo(x, y + height, x, y + height - radius); context.lineTo(x, y + radius); context.quadraticCurveTo(x, y, x + radius, y); context.closePath(); if (strokeWidth) { context.lineWidth = strokeWidth; context.stroke(); } context.fill(); return this; }, fillText: function(text, x, y) { context.fillText(text, x, y); return this; }, centerText: function(text, y) { var textWidth; textWidth = $canvas.measureText(text); return $canvas.fillText(text, (canvas.width - textWidth) / 2, y); }, fillWrappedText: function(text, x, y, width) { var lineHeight, tokens, tokens2; tokens = text.split(" "); tokens2 = text.split(" "); lineHeight = 16; if ($canvas.measureText(text) > width) { if (tokens.length % 2 === 0) { tokens2 = tokens.splice(tokens.length / 2, tokens.length / 2, ""); } else { tokens2 = tokens.splice(tokens.length / 2 + 1, (tokens.length / 2) + 1, ""); } context.fillText(tokens.join(" "), x, y); return context.fillText(tokens2.join(" "), x, y + lineHeight); } else { return context.fillText(tokens.join(" "), x, y + lineHeight); } }, fillColor: function(color) { if (color) { if (color.channels) { context.fillStyle = color.toString(); } else { context.fillStyle = color; } return this; } else { return context.fillStyle; } }, font: function(font) { if (font != null) { context.font = font; return this; } else { return context.font; } }, measureText: function(text) { return context.measureText(text).width; }, putImageData: function(imageData, x, y) { context.putImageData(imageData, x, y); return this; }, strokeColor: function(color) { if (color) { if (color.channels) { context.strokeStyle = color.toString(); } else { context.strokeStyle = color; } return this; } else { return context.strokeStyle; } }, strokeCircle: function(x, y, radius, color) { $canvas.strokeColor(color); context.beginPath(); context.arc(x, y, radius, 0, Math.TAU, true); context.closePath(); context.stroke(); return this; }, strokeRect: function(x, y, width, height) { context.strokeRect(x, y, width, height); return this; }, textAlign: function(textAlign) { context.textAlign = textAlign; return this; }, height: function() { return canvas.height; }, width: function() { return canvas.width; } }); if (canvas != null ? canvas.getContext : void 0) { context = canvas.getContext('2d'); if (options.init) { options.init($canvas); } return $canvas; } }; })(jQuery);; window.requestAnimationFrame || (window.requestAnimationFrame = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback, element) { return window.setTimeout(function() { return callback(+new Date()); }, 1000 / 60); });; (function($) { var Sound, directory, format, loadSoundChannel, sounds, _ref; directory = (typeof App !== "undefined" && App !== null ? (_ref = App.directories) != null ? _ref.sounds : void 0 : void 0) || "sounds"; format = "wav"; sounds = {}; loadSoundChannel = function(name) { var sound, url; url = "" + BASE_URL + "/" + directory + "/" + name + "." + format; return sound = $('<audio />', { autobuffer: true, preload: 'auto', src: url }).get(0); }; Sound = function(id, maxChannels) { return { play: function() { return Sound.play(id, maxChannels); }, stop: function() { return Sound.stop(id); } }; }; return Object.extend(Sound, { play: function(id, maxChannels) { var channel, channels, freeChannels, sound; maxChannels || (maxChannels = 4); if (!sounds[id]) { sounds[id] = [loadSoundChannel(id)]; } channels = sounds[id]; freeChannels = $.grep(channels, function(sound) { return sound.currentTime === sound.duration || sound.currentTime === 0; }); if (channel = freeChannels.first()) { try { channel.currentTime = 0; } catch (_e) {} return channel.play(); } else { if (!maxChannels || channels.length < maxChannels) { sound = loadSoundChannel(id); channels.push(sound); return sound.play(); } } }, playFromUrl: function(url) { var sound; sound = $('<audio />').get(0); sound.src = url; sound.play(); return sound; }, stop: function(id) { var _ref2; return (_ref2 = sounds[id]) != null ? _ref2.stop() : void 0; } }, (typeof exports !== "undefined" && exports !== null ? exports : this)["Sound"] = Sound); })(jQuery);; (function() { /** @name Local @namespace */ /** Store an object in local storage. @name set @methodOf Local @param {String} key @param {Object} value @type Object @returns value */ var retrieve, store; store = function(key, value) { localStorage[key] = JSON.stringify(value); return value; }; /** Retrieve an object from local storage. @name get @methodOf Local @param {String} key @type Object @returns The object that was stored or undefined if no object was stored. */ retrieve = function(key) { var value; value = localStorage[key]; if (value != null) { return JSON.parse(value); } }; return (typeof exports !== "undefined" && exports !== null ? exports : this)["Local"] = { get: retrieve, set: store, put: store, /** Access an instance of Local with a specified prefix. @name new @methodOf Local @param {String} prefix @type Local @returns An interface to local storage with the given prefix applied. */ "new": function(prefix) { prefix || (prefix = ""); return { get: function(key) { return retrieve("" + prefix + "_key"); }, set: function(key, value) { return store("" + prefix + "_key", value); }, put: function(key, value) { return store("" + prefix + "_key", value); } }; } }; })();; ;
extralib
; ; /** The Animated module, when included in a GameObject, gives the object methods to transition from one animation state to another @name Animated @module @constructor @param {Object} I Instance variables @param {Object} self Reference to including object */var Animated; Animated = function(I, self) { var advanceFrame, find, initializeState, loadByName, updateSprite, _name, _ref; I || (I = {}); $.reverseMerge(I, { animationName: (_ref = I["class"]) != null ? _ref.underscore() : void 0, data: { version: "", tileset: [ { id: 0, src: "", title: "", circles: [ { x: 0, y: 0, radius: 0 } ] } ], animations: [ { name: "", complete: "", interruptible: false, speed: "", transform: [ { hflip: false, vflip: false } ], triggers: { "0": ["a trigger"] }, frames: [0], transform: [void 0] } ] }, activeAnimation: { name: "", complete: "", interruptible: false, speed: "", transform: [ { hflip: false, vflip: false } ], triggers: { "0": [""] }, frames: [0] }, currentFrameIndex: 0, debugAnimation: false, hflip: false, vflip: false, lastUpdate: new Date().getTime(), useTimer: false }); loadByName = function(name, callback) { var url; url = "" + BASE_URL + "/animations/" + name + ".animation?" + (new Date().getTime()); $.getJSON(url, function(data) { I.data = data; return typeof callback === "function" ? callback(data) : void 0; }); return I.data; }; initializeState = function() { I.activeAnimation = I.data.animations.first(); return I.spriteLookup = I.data.tileset.map(function(spriteData) { return Sprite.fromURL(spriteData.src); }); }; window[_name = "" + I.animationName + "SpriteLookup"] || (window[_name] = []); if (!window["" + I.animationName + "SpriteLookup"].length) { window["" + I.animationName + "SpriteLookup"] = I.data.tileset.map(function(spriteData) { return Sprite.fromURL(spriteData.src); }); } I.spriteLookup = window["" + I.animationName + "SpriteLookup"]; if (I.data.animations.first().name !== "") { initializeState(); } else if (I.animationName) { loadByName(I.animationName, function() { return initializeState(); }); } else { throw "No animation data provided. Use animationName to specify an animation to load from the project or pass in raw JSON to the data key."; } advanceFrame = function() { var frames, nextState, sprite; frames = I.activeAnimation.frames; if (I.currentFrameIndex === frames.indexOf(frames.last())) { self.trigger("Complete"); if (nextState = I.activeAnimation.complete) { I.activeAnimation = find(nextState) || I.activeAnimation; I.currentFrameIndex = 0; } } else { I.currentFrameIndex = (I.currentFrameIndex + 1) % frames.length; } sprite = I.spriteLookup[frames[I.currentFrameIndex]]; return updateSprite(sprite); }; find = function(name) { var nameLower, result; result = null; nameLower = name.toLowerCase(); I.data.animations.each(function(animation) { if (animation.name.toLowerCase() === nameLower) { return result = animation; } }); return result; }; updateSprite = function(spriteData) { I.sprite = spriteData; I.width = spriteData.width; return I.height = spriteData.height; }; return { /** Transitions to a new active animation. Will not transition if the new state has the same name as the current one or if the active animation is marked as locked. @param {String} newState The name of the target state you wish to transition to. */ transition: function(newState, force) { var toNextState; if (newState === I.activeAnimation.name) { return; } toNextState = function(state) { var firstFrame, firstSprite, nextState; if (nextState = find(state)) { I.activeAnimation = nextState; firstFrame = I.activeAnimation.frames.first(); firstSprite = I.spriteLookup[firstFrame]; I.currentFrameIndex = 0; return updateSprite(firstSprite); } else { if (I.debugAnimation) { return warn("Could not find animation state '" + newState + "'. The current transition will be ignored"); } } }; if (force) { return toNextState(newState); } else { if (!I.activeAnimation.interruptible) { if (I.debugAnimation) { warn("Cannot transition to '" + newState + "' because '" + I.activeAnimation.name + "' is locked"); } return; } return toNextState(newState); } }, before: { update: function() { var time, triggers, updateFrame, _ref2, _ref3; if (I.useTimer) { time = new Date().getTime(); if (updateFrame = (time - I.lastUpdate) >= I.activeAnimation.speed) { I.lastUpdate = time; if (triggers = (_ref2 = I.activeAnimation.triggers) != null ? _ref2[I.currentFrameIndex] : void 0) { triggers.each(function(event) { return self.trigger(event); }); } return advanceFrame(); } } else { if (triggers = (_ref3 = I.activeAnimation.triggers) != null ? _ref3[I.currentFrameIndex] : void 0) { triggers.each(function(event) { return self.trigger(event); }); } return advanceFrame(); } } } }; };; (function() { var Animation, fromPixieId; Animation = function(data) { var activeAnimation, advanceFrame, currentSprite, spriteLookup; spriteLookup = {}; activeAnimation = data.animations[0]; currentSprite = data.animations[0].frames[0]; advanceFrame = function(animation) { var frames; frames = animation.frames; return currentSprite = frames[(frames.indexOf(currentSprite) + 1) % frames.length]; }; data.tileset.each(function(spriteData, i) { return spriteLookup[i] = Sprite.fromURL(spriteData.src); }); return $.extend(data, { currentSprite: function() { return currentSprite; }, draw: function(canvas, x, y) { return canvas.withTransform(Matrix.translation(x, y), function() { return spriteLookup[currentSprite].draw(canvas, 0, 0); }); }, frames: function() { return activeAnimation.frames; }, update: function() { return advanceFrame(activeAnimation); }, active: function(name) { if (name !== void 0) { if (data.animations[name]) { return currentSprite = data.animations[name].frames[0]; } } else { return activeAnimation; } } }); }; window.Animation = function(name, callback) { return fromPixieId(App.Animations[name], callback); }; fromPixieId = function(id, callback) { var proxy, url; url = "http://pixie.strd6.com/s3/animations/" + id + "/data.json"; proxy = { active: $.noop, draw: $.noop }; $.getJSON(url, function(data) { $.extend(proxy, Animation(data)); return typeof callback === "function" ? callback(proxy) : void 0; }); return proxy; }; return window.Animation.fromPixieId = fromPixieId; })();; var __slice = Array.prototype.slice; (function() { var Color, hslParser, hslToRgb, lookup, names, normalizeKey, parseHSL, parseHex, parseRGB, rgbParser, shiftLightness; rgbParser = /^rgba?\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),?\s*(\d?\.?\d*)?\)$/; hslParser = /^hsla?\((\d{1,3}),\s*(\d?\.?\d*),\s*(\d?\.?\d*),?\s*(\d?\.?\d*)?\)$/; parseHex = function(hexString) { var i, rgb; hexString = hexString.replace(/#/, ''); switch (hexString.length) { case 3: case 4: rgb = (function() { var _results; _results = []; for (i = 0; i <= 2; i++) { _results.push(parseInt(hexString.substr(i, 1), 16) * 0x11); } return _results; })(); return rgb.concat(hexString.substr(3, 1).length ? (parseInt(hexString.substr(3, 1), 16) * 0x11) / 255.0 : 1.0); case 6: case 8: rgb = (function() { var _results; _results = []; for (i = 0; i <= 2; i++) { _results.push(parseInt(hexString.substr(2 * i, 2), 16)); } return _results; })(); return rgb.concat(hexString.substr(6, 2).length ? parseInt(hexString.substr(6, 2), 16) / 255.0 : 1.0); } }; parseRGB = function(colorString) { var bits, rgbMap; if (!(bits = rgbParser.exec(colorString))) { return; } rgbMap = bits.splice(1, 3).map(function(channel) { return parseFloat(channel); }); return rgbMap.concat(bits[1] != null ? parseFloat(bits[1]) : 1.0); }; parseHSL = function(colorString) { var bits, hslMap; if (!(bits = hslParser.exec(colorString))) { return; } hslMap = bits.splice(1, 3).map(function(channel) { return parseFloat(channel); }); return hslToRgb(hslMap.concat(bits[1] != null ? parseFloat(bits[1]) : 1.0)); }; shiftLightness = function(amount, obj) { var hsl; hsl = obj.toHsl(); hsl[2] = hsl[2] + amount; return Color(hslToRgb(hsl)); }; hslToRgb = function(hsl) { var a, b, g, h, hueToRgb, l, p, q, r, rgbMap, s; h = hsl[0] / 360.0; s = hsl[1]; l = hsl[2]; a = (hsl[3] ? parseFloat(hsl[3]) : 1.0); r = g = b = null; hueToRgb = function(p, q, t) { if (t < 0) { t += 1; } if (t > 1) { t -= 1; } if (t < 1 / 6) { return p + (q - p) * 6 * t; } if (t < 1 / 2) { return q; } if (t < 2 / 3) { return p + (q - p) * (2 / 3 - t) * 6; } return p; }; if (s === 0) { r = g = b = l; } else { q = (l < 0.5 ? l * (1 + s) : l + s - l * s); p = 2 * l - q; r = hueToRgb(p, q, h + 1 / 3); g = hueToRgb(p, q, h); b = hueToRgb(p, q, h - 1 / 3); rgbMap = [r, g, b].map(function(channel) { return channel * 0xFF; }); } return rgbMap.concat(a); }; normalizeKey = function(key) { return key.toString().toLowerCase().split(' ').join(''); }; (typeof exports !== "undefined" && exports !== null ? exports : this)["Color"] = Color = function() { var alpha, args, arr, channels, color, parsedColor, rgbMap, self; args = 1 <= arguments.length ? __slice.call(arguments, 0) : []; color = args.first(); if (color != null ? color.channels : void 0) { return Color(color.channels()); } parsedColor = null; if (args.length === 0) { parsedColor = [0, 0, 0, 1]; } else if (args.length === 1 && Object.isArray(args.first())) { arr = args.first(); rgbMap = arr.splice(0, 3).map(function(channel) { return parseFloat(channel); }); alpha = arr[0] != null ? parseFloat(arr[0]) : 1.0; parsedColor = rgbMap.concat(alpha); } else if (args.length === 2) { color = args[0]; alpha = args[1]; if (Object.isArray(color)) { rgbMap = color.splice(0, 3).map(function(channel) { return parseFloat(channel); }); parsedColor = rgbMap.concat(parseFloat(alpha)); } else { parsedColor = lookup[normalizeKey(color)] || parseHex(color) || parseRGB(color) || parseHSL(color); parsedColor[3] = alpha; } } else if (args.length > 2) { rgbMap = args.splice(0, 3).map(function(channel) { return parseFloat(channel); }); alpha = args.first() != null ? args.first() : 1.0; parsedColor = rgbMap.concat(parseFloat(alpha)); } else { color = args.first().toString(); parsedColor = lookup[normalizeKey(color)] || parseHex(color) || parseRGB(color) || parseHSL(color); } if (!parsedColor) { throw "" + (args.join(',')) + " is an unknown color"; } rgbMap = parsedColor.splice(0, 3).map(function(channel) { return channel.round(); }); alpha = (parsedColor.first() != null ? parseFloat(parsedColor.first()) : 1.0); channels = rgbMap.concat(alpha); self = { channels: function() { return channels.copy(); }, r: function(val) { if (val != null) { channels[0] = val; return self; } else { return channels[0]; } }, g: function(val) { if (val != null) { channels[1] = val; return self; } else { return channels[1]; } }, b: function(val) { if (val != null) { channels[2] = val; return self; } else { return channels[2]; } }, a: function(val) { if (val != null) { channels[3] = val; return self; } else { return channels[3]; } }, equals: function(other) { return other.r() === self.r() && other.g() === self.g() && other.b() === self.b() && other.a() === self.a(); }, lighten: function(amount) { return shiftLightness(amount, self); }, darken: function(amount) { return shiftLightness(-amount, self); }, rgba: function() { return "rgba(" + (self.r()) + ", " + (self.g()) + ", " + (self.b()) + ", " + (self.a()) + ")"; }, desaturate: function(amount) { var hsl; hsl = self.toHsl(); hsl[1] -= amount; return Color(hslToRgb(hsl)); }, saturate: function(amount) { var hsl; hsl = self.toHsl(); hsl[1] += amount; return Color(hslToRgb(hsl)); }, grayscale: function() { var g, hsl; hsl = self.toHsl(); g = hsl[2] * 255; return Color(g, g, g); }, hue: function(degrees) { var hsl; hsl = self.toHsl(); hsl[0] = (hsl[0] + degrees) % 360; return Color(hslToRgb(hsl)); }, complement: function() { var hsl; hsl = self.toHsl(); return self.hue(180); }, toHex: function() { var hexFromNumber, hexString, padString; hexString = function(number) { return number.toString(16); }; padString = function(hexString) { var pad; if (hexString.length === 1) { pad = "0"; } return (pad || "") + hexString; }; hexFromNumber = function(number) { return padString(hexString(number)); }; return "#" + (hexFromNumber(channels[0])) + (hexFromNumber(channels[1])) + (hexFromNumber(channels[2])); }, toHsl: function() { var b, delta, g, hue, lightness, max, min, r, saturation, _ref; _ref = channels.map(function(channel) { return channel / 255.0; }), r = _ref[0], g = _ref[1], b = _ref[2]; min = Math.min(r, g, b); max = Math.max(r, g, b); hue = saturation = lightness = (max + min) / 2.0; if (max === min) { hue = saturation = 0; } else { delta = max - min; saturation = (lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min)); switch (max) { case r: hue = (g - b) / delta + (g < b ? 6 : 0); break; case g: hue = (b - r) / delta + 2; break; case b: hue = (r - g) / delta + 4; } hue *= 60; } return [hue, saturation, lightness, channels[3]]; }, toString: function() { return self.rgba(); } }; return self; }; lookup = {}; names = [["000000", "Black"], ["000080", "Navy Blue"], ["0000C8", "Dark Blue"], ["0000FF", "Blue"], ["000741", "Stratos"], ["001B1C", "Swamp"], ["002387", "Resolution Blue"], ["002900", "Deep Fir"], ["002E20", "Burnham"], ["002FA7", "International Klein Blue"], ["003153", "Prussian Blue"], ["003366", "Midnight Blue"], ["003399", "Smalt"], ["003532", "Deep Teal"], ["003E40", "Cyprus"], ["004620", "Kaitoke Green"], ["0047AB", "Cobalt"], ["004816", "Crusoe"], ["004950", "Sherpa Blue"], ["0056A7", "Endeavour"], ["00581A", "Camarone"], ["0066CC", "Science Blue"], ["0066FF", "Blue Ribbon"], ["00755E", "Tropical Rain Forest"], ["0076A3", "Allports"], ["007BA7", "Deep Cerulean"], ["007EC7", "Lochmara"], ["007FFF", "Azure Radiance"], ["008080", "Teal"], ["0095B6", "Bondi Blue"], ["009DC4", "Pacific Blue"], ["00A693", "Persian Green"], ["00A86B", "Jade"], ["00CC99", "Caribbean Green"], ["00CCCC", "Robin's Egg Blue"], ["00FF00", "Green"], ["00FF7F", "Spring Green"], ["00FFFF", "Cyan / Aqua"], ["010D1A", "Blue Charcoal"], ["011635", "Midnight"], ["011D13", "Holly"], ["012731", "Daintree"], ["01361C", "Cardin Green"], ["01371A", "County Green"], ["013E62", "Astronaut Blue"], ["013F6A", "Regal Blue"], ["014B43", "Aqua Deep"], ["015E85", "Orient"], ["016162", "Blue Stone"], ["016D39", "Fun Green"], ["01796F", "Pine Green"], ["017987", "Blue Lagoon"], ["01826B", "Deep Sea"], ["01A368", "Green Haze"], ["022D15", "English Holly"], ["02402C", "Sherwood Green"], ["02478E", "Congress Blue"], ["024E46", "Evening Sea"], ["026395", "Bahama Blue"], ["02866F", "Observatory"], ["02A4D3", "Cerulean"], ["03163C", "Tangaroa"], ["032B52", "Green Vogue"], ["036A6E", "Mosque"], ["041004", "Midnight Moss"], ["041322", "Black Pearl"], ["042E4C", "Blue Whale"], ["044022", "Zuccini"], ["044259", "Teal Blue"], ["051040", "Deep Cove"], ["051657", "Gulf Blue"], ["055989", "Venice Blue"], ["056F57", "Watercourse"], ["062A78", "Catalina Blue"], ["063537", "Tiber"], ["069B81", "Gossamer"], ["06A189", "Niagara"], ["073A50", "Tarawera"], ["080110", "Jaguar"], ["081910", "Black Bean"], ["082567", "Deep Sapphire"], ["088370", "Elf Green"], ["08E8DE", "Bright Turquoise"], ["092256", "Downriver"], ["09230F", "Palm Green"], ["09255D", "Madison"], ["093624", "Bottle Green"], ["095859", "Deep Sea Green"], ["097F4B", "Salem"], ["0A001C", "Black Russian"], ["0A480D", "Dark Fern"], ["0A6906", "Japanese Laurel"], ["0A6F75", "Atoll"], ["0B0B0B", "Cod Gray"], ["0B0F08", "Marshland"], ["0B1107", "Gordons Green"], ["0B1304", "Black Forest"], ["0B6207", "San Felix"], ["0BDA51", "Malachite"], ["0C0B1D", "Ebony"], ["0C0D0F", "Woodsmoke"], ["0C1911", "Racing Green"], ["0C7A79", "Surfie Green"], ["0C8990", "Blue Chill"], ["0D0332", "Black Rock"], ["0D1117", "Bunker"], ["0D1C19", "Aztec"], ["0D2E1C", "Bush"], ["0E0E18", "Cinder"], ["0E2A30", "Firefly"], ["0F2D9E", "Torea Bay"], ["10121D", "Vulcan"], ["101405", "Green Waterloo"], ["105852", "Eden"], ["110C6C", "Arapawa"], ["120A8F", "Ultramarine"], ["123447", "Elephant"], ["126B40", "Jewel"], ["130000", "Diesel"], ["130A06", "Asphalt"], ["13264D", "Blue Zodiac"], ["134F19", "Parsley"], ["140600", "Nero"], ["1450AA", "Tory Blue"], ["151F4C", "Bunting"], ["1560BD", "Denim"], ["15736B", "Genoa"], ["161928", "Mirage"], ["161D10", "Hunter Green"], ["162A40", "Big Stone"], ["163222", "Celtic"], ["16322C", "Timber Green"], ["163531", "Gable Green"], ["171F04", "Pine Tree"], ["175579", "Chathams Blue"], ["182D09", "Deep Forest Green"], ["18587A", "Blumine"], ["19330E", "Palm Leaf"], ["193751", "Nile Blue"], ["1959A8", "Fun Blue"], ["1A1A68", "Lucky Point"], ["1AB385", "Mountain Meadow"], ["1B0245", "Tolopea"], ["1B1035", "Haiti"], ["1B127B", "Deep Koamaru"], ["1B1404", "Acadia"], ["1B2F11", "Seaweed"], ["1B3162", "Biscay"], ["1B659D", "Matisse"], ["1C1208", "Crowshead"], ["1C1E13", "Rangoon Green"], ["1C39BB", "Persian Blue"], ["1C402E", "Everglade"], ["1C7C7D", "Elm"], ["1D6142", "Green Pea"], ["1E0F04", "Creole"], ["1E1609", "Karaka"], ["1E1708", "El Paso"], ["1E385B", "Cello"], ["1E433C", "Te Papa Green"], ["1E90FF", "Dodger Blue"], ["1E9AB0", "Eastern Blue"], ["1F120F", "Night Rider"], ["1FC2C2", "Java"], ["20208D", "Jacksons Purple"], ["202E54", "Cloud Burst"], ["204852", "Blue Dianne"], ["211A0E", "Eternity"], ["220878", "Deep Blue"], ["228B22", "Forest Green"], ["233418", "Mallard"], ["240A40", "Violet"], ["240C02", "Kilamanjaro"], ["242A1D", "Log Cabin"], ["242E16", "Black Olive"], ["24500F", "Green House"], ["251607", "Graphite"], ["251706", "Cannon Black"], ["251F4F", "Port Gore"], ["25272C", "Shark"], ["25311C", "Green Kelp"], ["2596D1", "Curious Blue"], ["260368", "Paua"], ["26056A", "Paris M"], ["261105", "Wood Bark"], ["261414", "Gondola"], ["262335", "Steel Gray"], ["26283B", "Ebony Clay"], ["273A81", "Bay of Many"], ["27504B", "Plantation"], ["278A5B", "Eucalyptus"], ["281E15", "Oil"], ["283A77", "Astronaut"], ["286ACD", "Mariner"], ["290C5E", "Violent Violet"], ["292130", "Bastille"], ["292319", "Zeus"], ["292937", "Charade"], ["297B9A", "Jelly Bean"], ["29AB87", "Jungle Green"], ["2A0359", "Cherry Pie"], ["2A140E", "Coffee Bean"], ["2A2630", "Baltic Sea"], ["2A380B", "Turtle Green"], ["2A52BE", "Cerulean Blue"], ["2B0202", "Sepia Black"], ["2B194F", "Valhalla"], ["2B3228", "Heavy Metal"], ["2C0E8C", "Blue Gem"], ["2C1632", "Revolver"], ["2C2133", "Bleached Cedar"], ["2C8C84", "Lochinvar"], ["2D2510", "Mikado"], ["2D383A", "Outer Space"], ["2D569B", "St Tropaz"], ["2E0329", "Jacaranda"], ["2E1905", "Jacko Bean"], ["2E3222", "Rangitoto"], ["2E3F62", "Rhino"], ["2E8B57", "Sea Green"], ["2EBFD4", "Scooter"], ["2F270E", "Onion"], ["2F3CB3", "Governor Bay"], ["2F519E", "Sapphire"], ["2F5A57", "Spectra"], ["2F6168", "Casal"], ["300529", "Melanzane"], ["301F1E", "Cocoa Brown"], ["302A0F", "Woodrush"], ["304B6A", "San Juan"], ["30D5C8", "Turquoise"], ["311C17", "Eclipse"], ["314459", "Pickled Bluewood"], ["315BA1", "Azure"], ["31728D", "Calypso"], ["317D82", "Paradiso"], ["32127A", "Persian Indigo"], ["32293A", "Blackcurrant"], ["323232", "Mine Shaft"], ["325D52", "Stromboli"], ["327C14", "Bilbao"], ["327DA0", "Astral"], ["33036B", "Christalle"], ["33292F", "Thunder"], ["33CC99", "Shamrock"], ["341515", "Tamarind"], ["350036", "Mardi Gras"], ["350E42", "Valentino"], ["350E57", "Jagger"], ["353542", "Tuna"], ["354E8C", "Chambray"], ["363050", "Martinique"], ["363534", "Tuatara"], ["363C0D", "Waiouru"], ["36747D", "Ming"], ["368716", "La Palma"], ["370202", "Chocolate"], ["371D09", "Clinker"], ["37290E", "Brown Tumbleweed"], ["373021", "Birch"], ["377475", "Oracle"], ["380474", "Blue Diamond"], ["381A51", "Grape"], ["383533", "Dune"], ["384555", "Oxford Blue"], ["384910", "Clover"], ["394851", "Limed Spruce"], ["396413", "Dell"], ["3A0020", "Toledo"], ["3A2010", "Sambuca"], ["3A2A6A", "Jacarta"], ["3A686C", "William"], ["3A6A47", "Killarney"], ["3AB09E", "Keppel"], ["3B000B", "Temptress"], ["3B0910", "Aubergine"], ["3B1F1F", "Jon"], ["3B2820", "Treehouse"], ["3B7A57", "Amazon"], ["3B91B4", "Boston Blue"], ["3C0878", "Windsor"], ["3C1206", "Rebel"], ["3C1F76", "Meteorite"], ["3C2005", "Dark Ebony"], ["3C3910", "Camouflage"], ["3C4151", "Bright Gray"], ["3C4443", "Cape Cod"], ["3C493A", "Lunar Green"], ["3D0C02", "Bean "], ["3D2B1F", "Bistre"], ["3D7D52", "Goblin"], ["3E0480", "Kingfisher Daisy"], ["3E1C14", "Cedar"], ["3E2B23", "English Walnut"], ["3E2C1C", "Black Marlin"], ["3E3A44", "Ship Gray"], ["3EABBF", "Pelorous"], ["3F2109", "Bronze"], ["3F2500", "Cola"], ["3F3002", "Madras"], ["3F307F", "Minsk"], ["3F4C3A", "Cabbage Pont"], ["3F583B", "Tom Thumb"], ["3F5D53", "Mineral Green"], ["3FC1AA", "Puerto Rico"], ["3FFF00", "Harlequin"], ["401801", "Brown Pod"], ["40291D", "Cork"], ["403B38", "Masala"], ["403D19", "Thatch Green"], ["405169", "Fiord"], ["40826D", "Viridian"], ["40A860", "Chateau Green"], ["410056", "Ripe Plum"], ["411F10", "Paco"], ["412010", "Deep Oak"], ["413C37", "Merlin"], ["414257", "Gun Powder"], ["414C7D", "East Bay"], ["4169E1", "Royal Blue"], ["41AA78", "Ocean Green"], ["420303", "Burnt Maroon"], ["423921", "Lisbon Brown"], ["427977", "Faded Jade"], ["431560", "Scarlet Gum"], ["433120", "Iroko"], ["433E37", "Armadillo"], ["434C59", "River Bed"], ["436A0D", "Green Leaf"], ["44012D", "Barossa"], ["441D00", "Morocco Brown"], ["444954", "Mako"], ["454936", "Kelp"], ["456CAC", "San Marino"], ["45B1E8", "Picton Blue"], ["460B41", "Loulou"], ["462425", "Crater Brown"], ["465945", "Gray Asparagus"], ["4682B4", "Steel Blue"], ["480404", "Rustic Red"], ["480607", "Bulgarian Rose"], ["480656", "Clairvoyant"], ["481C1C", "Cocoa Bean"], ["483131", "Woody Brown"], ["483C32", "Taupe"], ["49170C", "Van Cleef"], ["492615", "Brown Derby"], ["49371B", "Metallic Bronze"], ["495400", "Verdun Green"], ["496679", "Blue Bayoux"], ["497183", "Bismark"], ["4A2A04", "Bracken"], ["4A3004", "Deep Bronze"], ["4A3C30", "Mondo"], ["4A4244", "Tundora"], ["4A444B", "Gravel"], ["4A4E5A", "Trout"], ["4B0082", "Pigment Indigo"], ["4B5D52", "Nandor"], ["4C3024", "Saddle"], ["4C4F56", "Abbey"], ["4D0135", "Blackberry"], ["4D0A18", "Cab Sav"], ["4D1E01", "Indian Tan"], ["4D282D", "Cowboy"], ["4D282E", "Livid Brown"], ["4D3833", "Rock"], ["4D3D14", "Punga"], ["4D400F", "Bronzetone"], ["4D5328", "Woodland"], ["4E0606", "Mahogany"], ["4E2A5A", "Bossanova"], ["4E3B41", "Matterhorn"], ["4E420C", "Bronze Olive"], ["4E4562", "Mulled Wine"], ["4E6649", "Axolotl"], ["4E7F9E", "Wedgewood"], ["4EABD1", "Shakespeare"], ["4F1C70", "Honey Flower"], ["4F2398", "Daisy Bush"], ["4F69C6", "Indigo"], ["4F7942", "Fern Green"], ["4F9D5D", "Fruit Salad"], ["4FA83D", "Apple"], ["504351", "Mortar"], ["507096", "Kashmir Blue"], ["507672", "Cutty Sark"], ["50C878", "Emerald"], ["514649", "Emperor"], ["516E3D", "Chalet Green"], ["517C66", "Como"], ["51808F", "Smalt Blue"], ["52001F", "Castro"], ["520C17", "Maroon Oak"], ["523C94", "Gigas"], ["533455", "Voodoo"], ["534491", "Victoria"], ["53824B", "Hippie Green"], ["541012", "Heath"], ["544333", "Judge Gray"], ["54534D", "Fuscous Gray"], ["549019", "Vida Loca"], ["55280C", "Cioccolato"], ["555B10", "Saratoga"], ["556D56", "Finlandia"], ["5590D9", "Havelock Blue"], ["56B4BE", "Fountain Blue"], ["578363", "Spring Leaves"], ["583401", "Saddle Brown"], ["585562", "Scarpa Flow"], ["587156", "Cactus"], ["589AAF", "Hippie Blue"], ["591D35", "Wine Berry"], ["592804", "Brown Bramble"], ["593737", "Congo Brown"], ["594433", "Millbrook"], ["5A6E9C", "Waikawa Gray"], ["5A87A0", "Horizon"], ["5B3013", "Jambalaya"], ["5C0120", "Bordeaux"], ["5C0536", "Mulberry Wood"], ["5C2E01", "Carnaby Tan"], ["5C5D75", "Comet"], ["5D1E0F", "Redwood"], ["5D4C51", "Don Juan"], ["5D5C58", "Chicago"], ["5D5E37", "Verdigris"], ["5D7747", "Dingley"], ["5DA19F", "Breaker Bay"], ["5E483E", "Kabul"], ["5E5D3B", "Hemlock"], ["5F3D26", "Irish Coffee"], ["5F5F6E", "Mid Gray"], ["5F6672", "Shuttle Gray"], ["5FA777", "Aqua Forest"], ["5FB3AC", "Tradewind"], ["604913", "Horses Neck"], ["605B73", "Smoky"], ["606E68", "Corduroy"], ["6093D1", "Danube"], ["612718", "Espresso"], ["614051", "Eggplant"], ["615D30", "Costa Del Sol"], ["61845F", "Glade Green"], ["622F30", "Buccaneer"], ["623F2D", "Quincy"], ["624E9A", "Butterfly Bush"], ["625119", "West Coast"], ["626649", "Finch"], ["639A8F", "Patina"], ["63B76C", "Fern"], ["6456B7", "Blue Violet"], ["646077", "Dolphin"], ["646463", "Storm Dust"], ["646A54", "Siam"], ["646E75", "Nevada"], ["6495ED", "Cornflower Blue"], ["64CCDB", "Viking"], ["65000B", "Rosewood"], ["651A14", "Cherrywood"], ["652DC1", "Purple Heart"], ["657220", "Fern Frond"], ["65745D", "Willow Grove"], ["65869F", "Hoki"], ["660045", "Pompadour"], ["660099", "Purple"], ["66023C", "Tyrian Purple"], ["661010", "Dark Tan"], ["66B58F", "Silver Tree"], ["66FF00", "Bright Green"], ["66FF66", "Screamin' Green"], ["67032D", "Black Rose"], ["675FA6", "Scampi"], ["676662", "Ironside Gray"], ["678975", "Viridian Green"], ["67A712", "Christi"], ["683600", "Nutmeg Wood Finish"], ["685558", "Zambezi"], ["685E6E", "Salt Box"], ["692545", "Tawny Port"], ["692D54", "Finn"], ["695F62", "Scorpion"], ["697E9A", "Lynch"], ["6A442E", "Spice"], ["6A5D1B", "Himalaya"], ["6A6051", "Soya Bean"], ["6B2A14", "Hairy Heath"], ["6B3FA0", "Royal Purple"], ["6B4E31", "Shingle Fawn"], ["6B5755", "Dorado"], ["6B8BA2", "Bermuda Gray"], ["6B8E23", "Olive Drab"], ["6C3082", "Eminence"], ["6CDAE7", "Turquoise Blue"], ["6D0101", "Lonestar"], ["6D5E54", "Pine Cone"], ["6D6C6C", "Dove Gray"], ["6D9292", "Juniper"], ["6D92A1", "Gothic"], ["6E0902", "Red Oxide"], ["6E1D14", "Moccaccino"], ["6E4826", "Pickled Bean"], ["6E4B26", "Dallas"], ["6E6D57", "Kokoda"], ["6E7783", "Pale Sky"], ["6F440C", "Cafe Royale"], ["6F6A61", "Flint"], ["6F8E63", "Highland"], ["6F9D02", "Limeade"], ["6FD0C5", "Downy"], ["701C1C", "Persian Plum"], ["704214", "Sepia"], ["704A07", "Antique Bronze"], ["704F50", "Ferra"], ["706555", "Coffee"], ["708090", "Slate Gray"], ["711A00", "Cedar Wood Finish"], ["71291D", "Metallic Copper"], ["714693", "Affair"], ["714AB2", "Studio"], ["715D47", "Tobacco Brown"], ["716338", "Yellow Metal"], ["716B56", "Peat"], ["716E10", "Olivetone"], ["717486", "Storm Gray"], ["718080", "Sirocco"], ["71D9E2", "Aquamarine Blue"], ["72010F", "Venetian Red"], ["724A2F", "Old Copper"], ["726D4E", "Go Ben"], ["727B89", "Raven"], ["731E8F", "Seance"], ["734A12", "Raw Umber"], ["736C9F", "Kimberly"], ["736D58", "Crocodile"], ["737829", "Crete"], ["738678", "Xanadu"], ["74640D", "Spicy Mustard"], ["747D63", "Limed Ash"], ["747D83", "Rolling Stone"], ["748881", "Blue Smoke"], ["749378", "Laurel"], ["74C365", "Mantis"], ["755A57", "Russett"], ["7563A8", "Deluge"], ["76395D", "Cosmic"], ["7666C6", "Blue Marguerite"], ["76BD17", "Lima"], ["76D7EA", "Sky Blue"], ["770F05", "Dark Burgundy"], ["771F1F", "Crown of Thorns"], ["773F1A", "Walnut"], ["776F61", "Pablo"], ["778120", "Pacifika"], ["779E86", "Oxley"], ["77DD77", "Pastel Green"], ["780109", "Japanese Maple"], ["782D19", "Mocha"], ["782F16", "Peanut"], ["78866B", "Camouflage Green"], ["788A25", "Wasabi"], ["788BBA", "Ship Cove"], ["78A39C", "Sea Nymph"], ["795D4C", "Roman Coffee"], ["796878", "Old Lavender"], ["796989", "Rum"], ["796A78", "Fedora"], ["796D62", "Sandstone"], ["79DEEC", "Spray"], ["7A013A", "Siren"], ["7A58C1", "Fuchsia Blue"], ["7A7A7A", "Boulder"], ["7A89B8", "Wild Blue Yonder"], ["7AC488", "De York"], ["7B3801", "Red Beech"], ["7B3F00", "Cinnamon"], ["7B6608", "Yukon Gold"], ["7B7874", "Tapa"], ["7B7C94", "Waterloo "], ["7B8265", "Flax Smoke"], ["7B9F80", "Amulet"], ["7BA05B", "Asparagus"], ["7C1C05", "Kenyan Copper"], ["7C7631", "Pesto"], ["7C778A", "Topaz"], ["7C7B7A", "Concord"], ["7C7B82", "Jumbo"], ["7C881A", "Trendy Green"], ["7CA1A6", "Gumbo"], ["7CB0A1", "Acapulco"], ["7CB7BB", "Neptune"], ["7D2C14", "Pueblo"], ["7DA98D", "Bay Leaf"], ["7DC8F7", "Malibu"], ["7DD8C6", "Bermuda"], ["7E3A15", "Copper Canyon"], ["7F1734", "Claret"], ["7F3A02", "Peru Tan"], ["7F626D", "Falcon"], ["7F7589", "Mobster"], ["7F76D3", "Moody Blue"], ["7FFF00", "Chartreuse"], ["7FFFD4", "Aquamarine"], ["800000", "Maroon"], ["800B47", "Rose Bud Cherry"], ["801818", "Falu Red"], ["80341F", "Red Robin"], ["803790", "Vivid Violet"], ["80461B", "Russet"], ["807E79", "Friar Gray"], ["808000", "Olive"], ["808080", "Gray"], ["80B3AE", "Gulf Stream"], ["80B3C4", "Glacier"], ["80CCEA", "Seagull"], ["81422C", "Nutmeg"], ["816E71", "Spicy Pink"], ["817377", "Empress"], ["819885", "Spanish Green"], ["826F65", "Sand Dune"], ["828685", "Gunsmoke"], ["828F72", "Battleship Gray"], ["831923", "Merlot"], ["837050", "Shadow"], ["83AA5D", "Chelsea Cucumber"], ["83D0C6", "Monte Carlo"], ["843179", "Plum"], ["84A0A0", "Granny Smith"], ["8581D9", "Chetwode Blue"], ["858470", "Bandicoot"], ["859FAF", "Bali Hai"], ["85C4CC", "Half Baked"], ["860111", "Red Devil"], ["863C3C", "Lotus"], ["86483C", "Ironstone"], ["864D1E", "Bull Shot"], ["86560A", "Rusty Nail"], ["868974", "Bitter"], ["86949F", "Regent Gray"], ["871550", "Disco"], ["87756E", "Americano"], ["877C7B", "Hurricane"], ["878D91", "Oslo Gray"], ["87AB39", "Sushi"], ["885342", "Spicy Mix"], ["886221", "Kumera"], ["888387", "Suva Gray"], ["888D65", "Avocado"], ["893456", "Camelot"], ["893843", "Solid Pink"], ["894367", "Cannon Pink"], ["897D6D", "Makara"], ["8A3324", "Burnt Umber"], ["8A73D6", "True V"], ["8A8360", "Clay Creek"], ["8A8389", "Monsoon"], ["8A8F8A", "Stack"], ["8AB9F1", "Jordy Blue"], ["8B00FF", "Electric Violet"], ["8B0723", "Monarch"], ["8B6B0B", "Corn Harvest"], ["8B8470", "Olive Haze"], ["8B847E", "Schooner"], ["8B8680", "Natural Gray"], ["8B9C90", "Mantle"], ["8B9FEE", "Portage"], ["8BA690", "Envy"], ["8BA9A5", "Cascade"], ["8BE6D8", "Riptide"], ["8C055E", "Cardinal Pink"], ["8C472F", "Mule Fawn"], ["8C5738", "Potters Clay"], ["8C6495", "Trendy Pink"], ["8D0226", "Paprika"], ["8D3D38", "Sanguine Brown"], ["8D3F3F", "Tosca"], ["8D7662", "Cement"], ["8D8974", "Granite Green"], ["8D90A1", "Manatee"], ["8DA8CC", "Polo Blue"], ["8E0000", "Red Berry"], ["8E4D1E", "Rope"], ["8E6F70", "Opium"], ["8E775E", "Domino"], ["8E8190", "Mamba"], ["8EABC1", "Nepal"], ["8F021C", "Pohutukawa"], ["8F3E33", "El Salva"], ["8F4B0E", "Korma"], ["8F8176", "Squirrel"], ["8FD6B4", "Vista Blue"], ["900020", "Burgundy"], ["901E1E", "Old Brick"], ["907874", "Hemp"], ["907B71", "Almond Frost"], ["908D39", "Sycamore"], ["92000A", "Sangria"], ["924321", "Cumin"], ["926F5B", "Beaver"], ["928573", "Stonewall"], ["928590", "Venus"], ["9370DB", "Medium Purple"], ["93CCEA", "Cornflower"], ["93DFB8", "Algae Green"], ["944747", "Copper Rust"], ["948771", "Arrowtown"], ["950015", "Scarlett"], ["956387", "Strikemaster"], ["959396", "Mountain Mist"], ["960018", "Carmine"], ["964B00", "Brown"], ["967059", "Leather"], ["9678B6", "Purple Mountain's Majesty"], ["967BB6", "Lavender Purple"], ["96A8A1", "Pewter"], ["96BBAB", "Summer Green"], ["97605D", "Au Chico"], ["9771B5", "Wisteria"], ["97CD2D", "Atlantis"], ["983D61", "Vin Rouge"], ["9874D3", "Lilac Bush"], ["98777B", "Bazaar"], ["98811B", "Hacienda"], ["988D77", "Pale Oyster"], ["98FF98", "Mint Green"], ["990066", "Fresh Eggplant"], ["991199", "Violet Eggplant"], ["991613", "Tamarillo"], ["991B07", "Totem Pole"], ["996666", "Copper Rose"], ["9966CC", "Amethyst"], ["997A8D", "Mountbatten Pink"], ["9999CC", "Blue Bell"], ["9A3820", "Prairie Sand"], ["9A6E61", "Toast"], ["9A9577", "Gurkha"], ["9AB973", "Olivine"], ["9AC2B8", "Shadow Green"], ["9B4703", "Oregon"], ["9B9E8F", "Lemon Grass"], ["9C3336", "Stiletto"], ["9D5616", "Hawaiian Tan"], ["9DACB7", "Gull Gray"], ["9DC209", "Pistachio"], ["9DE093", "Granny Smith Apple"], ["9DE5FF", "Anakiwa"], ["9E5302", "Chelsea Gem"], ["9E5B40", "Sepia Skin"], ["9EA587", "Sage"], ["9EA91F", "Citron"], ["9EB1CD", "Rock Blue"], ["9EDEE0", "Morning Glory"], ["9F381D", "Cognac"], ["9F821C", "Reef Gold"], ["9F9F9C", "Star Dust"], ["9FA0B1", "Santas Gray"], ["9FD7D3", "Sinbad"], ["9FDD8C", "Feijoa"], ["A02712", "Tabasco"], ["A1750D", "Buttered Rum"], ["A1ADB5", "Hit Gray"], ["A1C50A", "Citrus"], ["A1DAD7", "Aqua Island"], ["A1E9DE", "Water Leaf"], ["A2006D", "Flirt"], ["A23B6C", "Rouge"], ["A26645", "Cape Palliser"], ["A2AAB3", "Gray Chateau"], ["A2AEAB", "Edward"], ["A3807B", "Pharlap"], ["A397B4", "Amethyst Smoke"], ["A3E3ED", "Blizzard Blue"], ["A4A49D", "Delta"], ["A4A6D3", "Wistful"], ["A4AF6E", "Green Smoke"], ["A50B5E", "Jazzberry Jam"], ["A59B91", "Zorba"], ["A5CB0C", "Bahia"], ["A62F20", "Roof Terracotta"], ["A65529", "Paarl"], ["A68B5B", "Barley Corn"], ["A69279", "Donkey Brown"], ["A6A29A", "Dawn"], ["A72525", "Mexican Red"], ["A7882C", "Luxor Gold"], ["A85307", "Rich Gold"], ["A86515", "Reno Sand"], ["A86B6B", "Coral Tree"], ["A8989B", "Dusty Gray"], ["A899E6", "Dull Lavender"], ["A8A589", "Tallow"], ["A8AE9C", "Bud"], ["A8AF8E", "Locust"], ["A8BD9F", "Norway"], ["A8E3BD", "Chinook"], ["A9A491", "Gray Olive"], ["A9ACB6", "Aluminium"], ["A9B2C3", "Cadet Blue"], ["A9B497", "Schist"], ["A9BDBF", "Tower Gray"], ["A9BEF2", "Perano"], ["A9C6C2", "Opal"], ["AA375A", "Night Shadz"], ["AA4203", "Fire"], ["AA8B5B", "Muesli"], ["AA8D6F", "Sandal"], ["AAA5A9", "Shady Lady"], ["AAA9CD", "Logan"], ["AAABB7", "Spun Pearl"], ["AAD6E6", "Regent St Blue"], ["AAF0D1", "Magic Mint"], ["AB0563", "Lipstick"], ["AB3472", "Royal Heath"], ["AB917A", "Sandrift"], ["ABA0D9", "Cold Purple"], ["ABA196", "Bronco"], ["AC8A56", "Limed Oak"], ["AC91CE", "East Side"], ["AC9E22", "Lemon Ginger"], ["ACA494", "Napa"], ["ACA586", "Hillary"], ["ACA59F", "Cloudy"], ["ACACAC", "Silver Chalice"], ["ACB78E", "Swamp Green"], ["ACCBB1", "Spring Rain"], ["ACDD4D", "Conifer"], ["ACE1AF", "Celadon"], ["AD781B", "Mandalay"], ["ADBED1", "Casper"], ["ADDFAD", "Moss Green"], ["ADE6C4", "Padua"], ["ADFF2F", "Green Yellow"], ["AE4560", "Hippie Pink"], ["AE6020", "Desert"], ["AE809E", "Bouquet"], ["AF4035", "Medium Carmine"], ["AF4D43", "Apple Blossom"], ["AF593E", "Brown Rust"], ["AF8751", "Driftwood"], ["AF8F2C", "Alpine"], ["AF9F1C", "Lucky"], ["AFA09E", "Martini"], ["AFB1B8", "Bombay"], ["AFBDD9", "Pigeon Post"], ["B04C6A", "Cadillac"], ["B05D54", "Matrix"], ["B05E81", "Tapestry"], ["B06608", "Mai Tai"], ["B09A95", "Del Rio"], ["B0E0E6", "Powder Blue"], ["B0E313", "Inch Worm"], ["B10000", "Bright Red"], ["B14A0B", "Vesuvius"], ["B1610B", "Pumpkin Skin"], ["B16D52", "Santa Fe"], ["B19461", "Teak"], ["B1E2C1", "Fringy Flower"], ["B1F4E7", "Ice Cold"], ["B20931", "Shiraz"], ["B2A1EA", "Biloba Flower"], ["B32D29", "Tall Poppy"], ["B35213", "Fiery Orange"], ["B38007", "Hot Toddy"], ["B3AF95", "Taupe Gray"], ["B3C110", "La Rioja"], ["B43332", "Well Read"], ["B44668", "Blush"], ["B4CFD3", "Jungle Mist"], ["B57281", "Turkish Rose"], ["B57EDC", "Lavender"], ["B5A27F", "Mongoose"], ["B5B35C", "Olive Green"], ["B5D2CE", "Jet Stream"], ["B5ECDF", "Cruise"], ["B6316C", "Hibiscus"], ["B69D98", "Thatch"], ["B6B095", "Heathered Gray"], ["B6BAA4", "Eagle"], ["B6D1EA", "Spindle"], ["B6D3BF", "Gum Leaf"], ["B7410E", "Rust"], ["B78E5C", "Muddy Waters"], ["B7A214", "Sahara"], ["B7A458", "Husk"], ["B7B1B1", "Nobel"], ["B7C3D0", "Heather"], ["B7F0BE", "Madang"], ["B81104", "Milano Red"], ["B87333", "Copper"], ["B8B56A", "Gimblet"], ["B8C1B1", "Green Spring"], ["B8C25D", "Celery"], ["B8E0F9", "Sail"], ["B94E48", "Chestnut"], ["B95140", "Crail"], ["B98D28", "Marigold"], ["B9C46A", "Wild Willow"], ["B9C8AC", "Rainee"], ["BA0101", "Guardsman Red"], ["BA450C", "Rock Spray"], ["BA6F1E", "Bourbon"], ["BA7F03", "Pirate Gold"], ["BAB1A2", "Nomad"], ["BAC7C9", "Submarine"], ["BAEEF9", "Charlotte"], ["BB3385", "Medium Red Violet"], ["BB8983", "Brandy Rose"], ["BBD009", "Rio Grande"], ["BBD7C1", "Surf"], ["BCC9C2", "Powder Ash"], ["BD5E2E", "Tuscany"], ["BD978E", "Quicksand"], ["BDB1A8", "Silk"], ["BDB2A1", "Malta"], ["BDB3C7", "Chatelle"], ["BDBBD7", "Lavender Gray"], ["BDBDC6", "French Gray"], ["BDC8B3", "Clay Ash"], ["BDC9CE", "Loblolly"], ["BDEDFD", "French Pass"], ["BEA6C3", "London Hue"], ["BEB5B7", "Pink Swan"], ["BEDE0D", "Fuego"], ["BF5500", "Rose of Sharon"], ["BFB8B0", "Tide"], ["BFBED8", "Blue Haze"], ["BFC1C2", "Silver Sand"], ["BFC921", "Key Lime Pie"], ["BFDBE2", "Ziggurat"], ["BFFF00", "Lime"], ["C02B18", "Thunderbird"], ["C04737", "Mojo"], ["C08081", "Old Rose"], ["C0C0C0", "Silver"], ["C0D3B9", "Pale Leaf"], ["C0D8B6", "Pixie Green"], ["C1440E", "Tia Maria"], ["C154C1", "Fuchsia Pink"], ["C1A004", "Buddha Gold"], ["C1B7A4", "Bison Hide"], ["C1BAB0", "Tea"], ["C1BECD", "Gray Suit"], ["C1D7B0", "Sprout"], ["C1F07C", "Sulu"], ["C26B03", "Indochine"], ["C2955D", "Twine"], ["C2BDB6", "Cotton Seed"], ["C2CAC4", "Pumice"], ["C2E8E5", "Jagged Ice"], ["C32148", "Maroon Flush"], ["C3B091", "Indian Khaki"], ["C3BFC1", "Pale Slate"], ["C3C3BD", "Gray Nickel"], ["C3CDE6", "Periwinkle Gray"], ["C3D1D1", "Tiara"], ["C3DDF9", "Tropical Blue"], ["C41E3A", "Cardinal"], ["C45655", "Fuzzy Wuzzy Brown"], ["C45719", "Orange Roughy"], ["C4C4BC", "Mist Gray"], ["C4D0B0", "Coriander"], ["C4F4EB", "Mint Tulip"], ["C54B8C", "Mulberry"], ["C59922", "Nugget"], ["C5994B", "Tussock"], ["C5DBCA", "Sea Mist"], ["C5E17A", "Yellow Green"], ["C62D42", "Brick Red"], ["C6726B", "Contessa"], ["C69191", "Oriental Pink"], ["C6A84B", "Roti"], ["C6C3B5", "Ash"], ["C6C8BD", "Kangaroo"], ["C6E610", "Las Palmas"], ["C7031E", "Monza"], ["C71585", "Red Violet"], ["C7BCA2", "Coral Reef"], ["C7C1FF", "Melrose"], ["C7C4BF", "Cloud"], ["C7C9D5", "Ghost"], ["C7CD90", "Pine Glade"], ["C7DDE5", "Botticelli"], ["C88A65", "Antique Brass"], ["C8A2C8", "Lilac"], ["C8A528", "Hokey Pokey"], ["C8AABF", "Lily"], ["C8B568", "Laser"], ["C8E3D7", "Edgewater"], ["C96323", "Piper"], ["C99415", "Pizza"], ["C9A0DC", "Light Wisteria"], ["C9B29B", "Rodeo Dust"], ["C9B35B", "Sundance"], ["C9B93B", "Earls Green"], ["C9C0BB", "Silver Rust"], ["C9D9D2", "Conch"], ["C9FFA2", "Reef"], ["C9FFE5", "Aero Blue"], ["CA3435", "Flush Mahogany"], ["CABB48", "Turmeric"], ["CADCD4", "Paris White"], ["CAE00D", "Bitter Lemon"], ["CAE6DA", "Skeptic"], ["CB8FA9", "Viola"], ["CBCAB6", "Foggy Gray"], ["CBD3B0", "Green Mist"], ["CBDBD6", "Nebula"], ["CC3333", "Persian Red"], ["CC5500", "Burnt Orange"], ["CC7722", "Ochre"], ["CC8899", "Puce"], ["CCCAA8", "Thistle Green"], ["CCCCFF", "Periwinkle"], ["CCFF00", "Electric Lime"], ["CD5700", "Tenn"], ["CD5C5C", "Chestnut Rose"], ["CD8429", "Brandy Punch"], ["CDF4FF", "Onahau"], ["CEB98F", "Sorrell Brown"], ["CEBABA", "Cold Turkey"], ["CEC291", "Yuma"], ["CEC7A7", "Chino"], ["CFA39D", "Eunry"], ["CFB53B", "Old Gold"], ["CFDCCF", "Tasman"], ["CFE5D2", "Surf Crest"], ["CFF9F3", "Humming Bird"], ["CFFAF4", "Scandal"], ["D05F04", "Red Stage"], ["D06DA1", "Hopbush"], ["D07D12", "Meteor"], ["D0BEF8", "Perfume"], ["D0C0E5", "Prelude"], ["D0F0C0", "Tea Green"], ["D18F1B", "Geebung"], ["D1BEA8", "Vanilla"], ["D1C6B4", "Soft Amber"], ["D1D2CA", "Celeste"], ["D1D2DD", "Mischka"], ["D1E231", "Pear"], ["D2691E", "Hot Cinnamon"], ["D27D46", "Raw Sienna"], ["D29EAA", "Careys Pink"], ["D2B48C", "Tan"], ["D2DA97", "Deco"], ["D2F6DE", "Blue Romance"], ["D2F8B0", "Gossip"], ["D3CBBA", "Sisal"], ["D3CDC5", "Swirl"], ["D47494", "Charm"], ["D4B6AF", "Clam Shell"], ["D4BF8D", "Straw"], ["D4C4A8", "Akaroa"], ["D4CD16", "Bird Flower"], ["D4D7D9", "Iron"], ["D4DFE2", "Geyser"], ["D4E2FC", "Hawkes Blue"], ["D54600", "Grenadier"], ["D591A4", "Can Can"], ["D59A6F", "Whiskey"], ["D5D195", "Winter Hazel"], ["D5F6E3", "Granny Apple"], ["D69188", "My Pink"], ["D6C562", "Tacha"], ["D6CEF6", "Moon Raker"], ["D6D6D1", "Quill Gray"], ["D6FFDB", "Snowy Mint"], ["D7837F", "New York Pink"], ["D7C498", "Pavlova"], ["D7D0FF", "Fog"], ["D84437", "Valencia"], ["D87C63", "Japonica"], ["D8BFD8", "Thistle"], ["D8C2D5", "Maverick"], ["D8FCFA", "Foam"], ["D94972", "Cabaret"], ["D99376", "Burning Sand"], ["D9B99B", "Cameo"], ["D9D6CF", "Timberwolf"], ["D9DCC1", "Tana"], ["D9E4F5", "Link Water"], ["D9F7FF", "Mabel"], ["DA3287", "Cerise"], ["DA5B38", "Flame Pea"], ["DA6304", "Bamboo"], ["DA6A41", "Red Damask"], ["DA70D6", "Orchid"], ["DA8A67", "Copperfield"], ["DAA520", "Golden Grass"], ["DAECD6", "Zanah"], ["DAF4F0", "Iceberg"], ["DAFAFF", "Oyster Bay"], ["DB5079", "Cranberry"], ["DB9690", "Petite Orchid"], ["DB995E", "Di Serria"], ["DBDBDB", "Alto"], ["DBFFF8", "Frosted Mint"], ["DC143C", "Crimson"], ["DC4333", "Punch"], ["DCB20C", "Galliano"], ["DCB4BC", "Blossom"], ["DCD747", "Wattle"], ["DCD9D2", "Westar"], ["DCDDCC", "Moon Mist"], ["DCEDB4", "Caper"], ["DCF0EA", "Swans Down"], ["DDD6D5", "Swiss Coffee"], ["DDF9F1", "White Ice"], ["DE3163", "Cerise Red"], ["DE6360", "Roman"], ["DEA681", "Tumbleweed"], ["DEBA13", "Gold Tips"], ["DEC196", "Brandy"], ["DECBC6", "Wafer"], ["DED4A4", "Sapling"], ["DED717", "Barberry"], ["DEE5C0", "Beryl Green"], ["DEF5FF", "Pattens Blue"], ["DF73FF", "Heliotrope"], ["DFBE6F", "Apache"], ["DFCD6F", "Chenin"], ["DFCFDB", "Lola"], ["DFECDA", "Willow Brook"], ["DFFF00", "Chartreuse Yellow"], ["E0B0FF", "Mauve"], ["E0B646", "Anzac"], ["E0B974", "Harvest Gold"], ["E0C095", "Calico"], ["E0FFFF", "Baby Blue"], ["E16865", "Sunglo"], ["E1BC64", "Equator"], ["E1C0C8", "Pink Flare"], ["E1E6D6", "Periglacial Blue"], ["E1EAD4", "Kidnapper"], ["E1F6E8", "Tara"], ["E25465", "Mandy"], ["E2725B", "Terracotta"], ["E28913", "Golden Bell"], ["E292C0", "Shocking"], ["E29418", "Dixie"], ["E29CD2", "Light Orchid"], ["E2D8ED", "Snuff"], ["E2EBED", "Mystic"], ["E2F3EC", "Apple Green"], ["E30B5C", "Razzmatazz"], ["E32636", "Alizarin Crimson"], ["E34234", "Cinnabar"], ["E3BEBE", "Cavern Pink"], ["E3F5E1", "Peppermint"], ["E3F988", "Mindaro"], ["E47698", "Deep Blush"], ["E49B0F", "Gamboge"], ["E4C2D5", "Melanie"], ["E4CFDE", "Twilight"], ["E4D1C0", "Bone"], ["E4D422", "Sunflower"], ["E4D5B7", "Grain Brown"], ["E4D69B", "Zombie"], ["E4F6E7", "Frostee"], ["E4FFD1", "Snow Flurry"], ["E52B50", "Amaranth"], ["E5841B", "Zest"], ["E5CCC9", "Dust Storm"], ["E5D7BD", "Stark White"], ["E5D8AF", "Hampton"], ["E5E0E1", "Bon Jour"], ["E5E5E5", "Mercury"], ["E5F9F6", "Polar"], ["E64E03", "Trinidad"], ["E6BE8A", "Gold Sand"], ["E6BEA5", "Cashmere"], ["E6D7B9", "Double Spanish White"], ["E6E4D4", "Satin Linen"], ["E6F2EA", "Harp"], ["E6F8F3", "Off Green"], ["E6FFE9", "Hint of Green"], ["E6FFFF", "Tranquil"], ["E77200", "Mango Tango"], ["E7730A", "Christine"], ["E79F8C", "Tonys Pink"], ["E79FC4", "Kobi"], ["E7BCB4", "Rose Fog"], ["E7BF05", "Corn"], ["E7CD8C", "Putty"], ["E7ECE6", "Gray Nurse"], ["E7F8FF", "Lily White"], ["E7FEFF", "Bubbles"], ["E89928", "Fire Bush"], ["E8B9B3", "Shilo"], ["E8E0D5", "Pearl Bush"], ["E8EBE0", "Green White"], ["E8F1D4", "Chrome White"], ["E8F2EB", "Gin"], ["E8F5F2", "Aqua Squeeze"], ["E96E00", "Clementine"], ["E97451", "Burnt Sienna"], ["E97C07", "Tahiti Gold"], ["E9CECD", "Oyster Pink"], ["E9D75A", "Confetti"], ["E9E3E3", "Ebb"], ["E9F8ED", "Ottoman"], ["E9FFFD", "Clear Day"], ["EA88A8", "Carissma"], ["EAAE69", "Porsche"], ["EAB33B", "Tulip Tree"], ["EAC674", "Rob Roy"], ["EADAB8", "Raffia"], ["EAE8D4", "White Rock"], ["EAF6EE", "Panache"], ["EAF6FF", "Solitude"], ["EAF9F5", "Aqua Spring"], ["EAFFFE", "Dew"], ["EB9373", "Apricot"], ["EBC2AF", "Zinnwaldite"], ["ECA927", "Fuel Yellow"], ["ECC54E", "Ronchi"], ["ECC7EE", "French Lilac"], ["ECCDB9", "Just Right"], ["ECE090", "Wild Rice"], ["ECEBBD", "Fall Green"], ["ECEBCE", "Aths Special"], ["ECF245", "Starship"], ["ED0A3F", "Red Ribbon"], ["ED7A1C", "Tango"], ["ED9121", "Carrot Orange"], ["ED989E", "Sea Pink"], ["EDB381", "Tacao"], ["EDC9AF", "Desert Sand"], ["EDCDAB", "Pancho"], ["EDDCB1", "Chamois"], ["EDEA99", "Primrose"], ["EDF5DD", "Frost"], ["EDF5F5", "Aqua Haze"], ["EDF6FF", "Zumthor"], ["EDF9F1", "Narvik"], ["EDFC84", "Honeysuckle"], ["EE82EE", "Lavender Magenta"], ["EEC1BE", "Beauty Bush"], ["EED794", "Chalky"], ["EED9C4", "Almond"], ["EEDC82", "Flax"], ["EEDEDA", "Bizarre"], ["EEE3AD", "Double Colonial White"], ["EEEEE8", "Cararra"], ["EEEF78", "Manz"], ["EEF0C8", "Tahuna Sands"], ["EEF0F3", "Athens Gray"], ["EEF3C3", "Tusk"], ["EEF4DE", "Loafer"], ["EEF6F7", "Catskill White"], ["EEFDFF", "Twilight Blue"], ["EEFF9A", "Jonquil"], ["EEFFE2", "Rice Flower"], ["EF863F", "Jaffa"], ["EFEFEF", "Gallery"], ["EFF2F3", "Porcelain"], ["F091A9", "Mauvelous"], ["F0D52D", "Golden Dream"], ["F0DB7D", "Golden Sand"], ["F0DC82", "Buff"], ["F0E2EC", "Prim"], ["F0E68C", "Khaki"], ["F0EEFD", "Selago"], ["F0EEFF", "Titan White"], ["F0F8FF", "Alice Blue"], ["F0FCEA", "Feta"], ["F18200", "Gold Drop"], ["F19BAB", "Wewak"], ["F1E788", "Sahara Sand"], ["F1E9D2", "Parchment"], ["F1E9FF", "Blue Chalk"], ["F1EEC1", "Mint Julep"], ["F1F1F1", "Seashell"], ["F1F7F2", "Saltpan"], ["F1FFAD", "Tidal"], ["F1FFC8", "Chiffon"], ["F2552A", "Flamingo"], ["F28500", "Tangerine"], ["F2C3B2", "Mandys Pink"], ["F2F2F2", "Concrete"], ["F2FAFA", "Black Squeeze"], ["F34723", "Pomegranate"], ["F3AD16", "Buttercup"], ["F3D69D", "New Orleans"], ["F3D9DF", "Vanilla Ice"], ["F3E7BB", "Sidecar"], ["F3E9E5", "Dawn Pink"], ["F3EDCF", "Wheatfield"], ["F3FB62", "Canary"], ["F3FBD4", "Orinoco"], ["F3FFD8", "Carla"], ["F400A1", "Hollywood Cerise"], ["F4A460", "Sandy brown"], ["F4C430", "Saffron"], ["F4D81C", "Ripe Lemon"], ["F4EBD3", "Janna"], ["F4F2EE", "Pampas"], ["F4F4F4", "Wild Sand"], ["F4F8FF", "Zircon"], ["F57584", "Froly"], ["F5C85C", "Cream Can"], ["F5C999", "Manhattan"], ["F5D5A0", "Maize"], ["F5DEB3", "Wheat"], ["F5E7A2", "Sandwisp"], ["F5E7E2", "Pot Pourri"], ["F5E9D3", "Albescent White"], ["F5EDEF", "Soft Peach"], ["F5F3E5", "Ecru White"], ["F5F5DC", "Beige"], ["F5FB3D", "Golden Fizz"], ["F5FFBE", "Australian Mint"], ["F64A8A", "French Rose"], ["F653A6", "Brilliant Rose"], ["F6A4C9", "Illusion"], ["F6F0E6", "Merino"], ["F6F7F7", "Black Haze"], ["F6FFDC", "Spring Sun"], ["F7468A", "Violet Red"], ["F77703", "Chilean Fire"], ["F77FBE", "Persian Pink"], ["F7B668", "Rajah"], ["F7C8DA", "Azalea"], ["F7DBE6", "We Peep"], ["F7F2E1", "Quarter Spanish White"], ["F7F5FA", "Whisper"], ["F7FAF7", "Snow Drift"], ["F8B853", "Casablanca"], ["F8C3DF", "Chantilly"], ["F8D9E9", "Cherub"], ["F8DB9D", "Marzipan"], ["F8DD5C", "Energy Yellow"], ["F8E4BF", "Givry"], ["F8F0E8", "White Linen"], ["F8F4FF", "Magnolia"], ["F8F6F1", "Spring Wood"], ["F8F7DC", "Coconut Cream"], ["F8F7FC", "White Lilac"], ["F8F8F7", "Desert Storm"], ["F8F99C", "Texas"], ["F8FACD", "Corn Field"], ["F8FDD3", "Mimosa"], ["F95A61", "Carnation"], ["F9BF58", "Saffron Mango"], ["F9E0ED", "Carousel Pink"], ["F9E4BC", "Dairy Cream"], ["F9E663", "Portica"], ["F9E6F4", "Underage Pink"], ["F9EAF3", "Amour"], ["F9F8E4", "Rum Swizzle"], ["F9FF8B", "Dolly"], ["F9FFF6", "Sugar Cane"], ["FA7814", "Ecstasy"], ["FA9D5A", "Tan Hide"], ["FAD3A2", "Corvette"], ["FADFAD", "Peach Yellow"], ["FAE600", "Turbo"], ["FAEAB9", "Astra"], ["FAECCC", "Champagne"], ["FAF0E6", "Linen"], ["FAF3F0", "Fantasy"], ["FAF7D6", "Citrine White"], ["FAFAFA", "Alabaster"], ["FAFDE4", "Hint of Yellow"], ["FAFFA4", "Milan"], ["FB607F", "Brink Pink"], ["FB8989", "Geraldine"], ["FBA0E3", "Lavender Rose"], ["FBA129", "Sea Buckthorn"], ["FBAC13", "Sun"], ["FBAED2", "Lavender Pink"], ["FBB2A3", "Rose Bud"], ["FBBEDA", "Cupid"], ["FBCCE7", "Classic Rose"], ["FBCEB1", "Apricot Peach"], ["FBE7B2", "Banana Mania"], ["FBE870", "Marigold Yellow"], ["FBE96C", "Festival"], ["FBEA8C", "Sweet Corn"], ["FBEC5D", "Candy Corn"], ["FBF9F9", "Hint of Red"], ["FBFFBA", "Shalimar"], ["FC0FC0", "Shocking Pink"], ["FC80A5", "Tickle Me Pink"], ["FC9C1D", "Tree Poppy"], ["FCC01E", "Lightning Yellow"], ["FCD667", "Goldenrod"], ["FCD917", "Candlelight"], ["FCDA98", "Cherokee"], ["FCF4D0", "Double Pearl Lusta"], ["FCF4DC", "Pearl Lusta"], ["FCF8F7", "Vista White"], ["FCFBF3", "Bianca"], ["FCFEDA", "Moon Glow"], ["FCFFE7", "China Ivory"], ["FCFFF9", "Ceramic"], ["FD0E35", "Torch Red"], ["FD5B78", "Wild Watermelon"], ["FD7B33", "Crusta"], ["FD7C07", "Sorbus"], ["FD9FA2", "Sweet Pink"], ["FDD5B1", "Light Apricot"], ["FDD7E4", "Pig Pink"], ["FDE1DC", "Cinderella"], ["FDE295", "Golden Glow"], ["FDE910", "Lemon"], ["FDF5E6", "Old Lace"], ["FDF6D3", "Half Colonial White"], ["FDF7AD", "Drover"], ["FDFEB8", "Pale Prim"], ["FDFFD5", "Cumulus"], ["FE28A2", "Persian Rose"], ["FE4C40", "Sunset Orange"], ["FE6F5E", "Bittersweet"], ["FE9D04", "California"], ["FEA904", "Yellow Sea"], ["FEBAAD", "Melon"], ["FED33C", "Bright Sun"], ["FED85D", "Dandelion"], ["FEDB8D", "Salomie"], ["FEE5AC", "Cape Honey"], ["FEEBF3", "Remy"], ["FEEFCE", "Oasis"], ["FEF0EC", "Bridesmaid"], ["FEF2C7", "Beeswax"], ["FEF3D8", "Bleach White"], ["FEF4CC", "Pipi"], ["FEF4DB", "Half Spanish White"], ["FEF4F8", "Wisp Pink"], ["FEF5F1", "Provincial Pink"], ["FEF7DE", "Half Dutch White"], ["FEF8E2", "Solitaire"], ["FEF8FF", "White Pointer"], ["FEF9E3", "Off Yellow"], ["FEFCED", "Orange White"], ["FF0000", "Red"], ["FF007F", "Rose"], ["FF00CC", "Purple Pizzazz"], ["FF00FF", "Magenta / Fuchsia"], ["FF2400", "Scarlet"], ["FF3399", "Wild Strawberry"], ["FF33CC", "Razzle Dazzle Rose"], ["FF355E", "Radical Red"], ["FF3F34", "Red Orange"], ["FF4040", "Coral Red"], ["FF4D00", "Vermilion"], ["FF4F00", "International Orange"], ["FF6037", "Outrageous Orange"], ["FF6600", "Blaze Orange"], ["FF66FF", "Pink Flamingo"], ["FF681F", "Orange"], ["FF69B4", "Hot Pink"], ["FF6B53", "Persimmon"], ["FF6FFF", "Blush Pink"], ["FF7034", "Burning Orange"], ["FF7518", "Pumpkin"], ["FF7D07", "Flamenco"], ["FF7F00", "Flush Orange"], ["FF7F50", "Coral"], ["FF8C69", "Salmon"], ["FF9000", "Pizazz"], ["FF910F", "West Side"], ["FF91A4", "Pink Salmon"], ["FF9933", "Neon Carrot"], ["FF9966", "Atomic Tangerine"], ["FF9980", "Vivid Tangerine"], ["FF9E2C", "Sunshade"], ["FFA000", "Orange Peel"], ["FFA194", "Mona Lisa"], ["FFA500", "Web Orange"], ["FFA6C9", "Carnation Pink"], ["FFAB81", "Hit Pink"], ["FFAE42", "Yellow Orange"], ["FFB0AC", "Cornflower Lilac"], ["FFB1B3", "Sundown"], ["FFB31F", "My Sin"], ["FFB555", "Texas Rose"], ["FFB7D5", "Cotton Candy"], ["FFB97B", "Macaroni and Cheese"], ["FFBA00", "Selective Yellow"], ["FFBD5F", "Koromiko"], ["FFBF00", "Amber"], ["FFC0A8", "Wax Flower"], ["FFC0CB", "Pink"], ["FFC3C0", "Your Pink"], ["FFC901", "Supernova"], ["FFCBA4", "Flesh"], ["FFCC33", "Sunglow"], ["FFCC5C", "Golden Tainoi"], ["FFCC99", "Peach Orange"], ["FFCD8C", "Chardonnay"], ["FFD1DC", "Pastel Pink"], ["FFD2B7", "Romantic"], ["FFD38C", "Grandis"], ["FFD700", "Gold"], ["FFD800", "School bus Yellow"], ["FFD8D9", "Cosmos"], ["FFDB58", "Mustard"], ["FFDCD6", "Peach Schnapps"], ["FFDDAF", "Caramel"], ["FFDDCD", "Tuft Bush"], ["FFDDCF", "Watusi"], ["FFDDF4", "Pink Lace"], ["FFDEAD", "Navajo White"], ["FFDEB3", "Frangipani"], ["FFE1DF", "Pippin"], ["FFE1F2", "Pale Rose"], ["FFE2C5", "Negroni"], ["FFE5A0", "Cream Brulee"], ["FFE5B4", "Peach"], ["FFE6C7", "Tequila"], ["FFE772", "Kournikova"], ["FFEAC8", "Sandy Beach"], ["FFEAD4", "Karry"], ["FFEC13", "Broom"], ["FFEDBC", "Colonial White"], ["FFEED8", "Derby"], ["FFEFA1", "Vis Vis"], ["FFEFC1", "Egg White"], ["FFEFD5", "Papaya Whip"], ["FFEFEC", "Fair Pink"], ["FFF0DB", "Peach Cream"], ["FFF0F5", "Lavender blush"], ["FFF14F", "Gorse"], ["FFF1B5", "Buttermilk"], ["FFF1D8", "Pink Lady"], ["FFF1EE", "Forget Me Not"], ["FFF1F9", "Tutu"], ["FFF39D", "Picasso"], ["FFF3F1", "Chardon"], ["FFF46E", "Paris Daisy"], ["FFF4CE", "Barley White"], ["FFF4DD", "Egg Sour"], ["FFF4E0", "Sazerac"], ["FFF4E8", "Serenade"], ["FFF4F3", "Chablis"], ["FFF5EE", "Seashell Peach"], ["FFF5F3", "Sauvignon"], ["FFF6D4", "Milk Punch"], ["FFF6DF", "Varden"], ["FFF6F5", "Rose White"], ["FFF8D1", "Baja White"], ["FFF9E2", "Gin Fizz"], ["FFF9E6", "Early Dawn"], ["FFFACD", "Lemon Chiffon"], ["FFFAF4", "Bridal Heath"], ["FFFBDC", "Scotch Mist"], ["FFFBF9", "Soapstone"], ["FFFC99", "Witch Haze"], ["FFFCEA", "Buttery White"], ["FFFCEE", "Island Spice"], ["FFFDD0", "Cream"], ["FFFDE6", "Chilean Heath"], ["FFFDE8", "Travertine"], ["FFFDF3", "Orchid White"], ["FFFDF4", "Quarter Pearl Lusta"], ["FFFEE1", "Half and Half"], ["FFFEEC", "Apricot White"], ["FFFEF0", "Rice Cake"], ["FFFEF6", "Black White"], ["FFFEFD", "Romance"], ["FFFF00", "Yellow"], ["FFFF66", "Laser Lemon"], ["FFFF99", "Pale Canary"], ["FFFFB4", "Portafino"], ["FFFFF0", "Ivory"], ["FFFFFF", "White"], ["acc2d9", "cloudy blue"], ["56ae57", "dark pastel green"], ["b2996e", "dust"], ["a8ff04", "electric lime"], ["69d84f", "fresh green"], ["894585", "light eggplant"], ["70b23f", "nasty green"], ["d4ffff", "really light blue"], ["65ab7c", "tea"], ["952e8f", "warm purple"], ["fcfc81", "yellowish tan"], ["a5a391", "cement"], ["388004", "dark grass green"], ["4c9085", "dusty teal"], ["5e9b8a", "grey teal"], ["efb435", "macaroni and cheese"], ["d99b82", "pinkish tan"], ["0a5f38", "spruce"], ["0c06f7", "strong blue"], ["61de2a", "toxic green"], ["3778bf", "windows blue"], ["2242c7", "blue blue"], ["533cc6", "blue with a hint of purple"], ["9bb53c", "booger"], ["05ffa6", "bright sea green"], ["1f6357", "dark green blue"], ["017374", "deep turquoise"], ["0cb577", "green teal"], ["ff0789", "strong pink"], ["afa88b", "bland"], ["08787f", "deep aqua"], ["dd85d7", "lavender pink"], ["a6c875", "light moss green"], ["a7ffb5", "light seafoam green"], ["c2b709", "olive yellow"], ["e78ea5", "pig pink"], ["966ebd", "deep lilac"], ["ccad60", "desert"], ["ac86a8", "dusty lavender"], ["947e94", "purpley grey"], ["983fb2", "purply"], ["ff63e9", "candy pink"], ["b2fba5", "light pastel green"], ["63b365", "boring green"], ["8ee53f", "kiwi green"], ["b7e1a1", "light grey green"], ["ff6f52", "orange pink"], ["bdf8a3", "tea green"], ["d3b683", "very light brown"], ["fffcc4", "egg shell"], ["430541", "eggplant purple"], ["ffb2d0", "powder pink"], ["997570", "reddish grey"], ["ad900d", "baby shit brown"], ["c48efd", "liliac"], ["507b9c", "stormy blue"], ["7d7103", "ugly brown"], ["fffd78", "custard"], ["da467d", "darkish pink"], ["410200", "deep brown"], ["c9d179", "greenish beige"], ["fffa86", "manilla"], ["5684ae", "off blue"], ["6b7c85", "battleship grey"], ["6f6c0a", "browny green"], ["7e4071", "bruise"], ["009337", "kelley green"], ["d0e429", "sickly yellow"], ["fff917", "sunny yellow"], ["1d5dec", "azul"], ["054907", "darkgreen"], ["b5ce08", "green/yellow"], ["8fb67b", "lichen"], ["c8ffb0", "light light green"], ["fdde6c", "pale gold"], ["ffdf22", "sun yellow"], ["a9be70", "tan green"], ["6832e3", "burple"], ["fdb147", "butterscotch"], ["c7ac7d", "toupe"], ["fff39a", "dark cream"], ["850e04", "indian red"], ["efc0fe", "light lavendar"], ["40fd14", "poison green"], ["b6c406", "baby puke green"], ["9dff00", "bright yellow green"], ["3c4142", "charcoal grey"], ["f2ab15", "squash"], ["ac4f06", "cinnamon"], ["c4fe82", "light pea green"], ["2cfa1f", "radioactive green"], ["9a6200", "raw sienna"], ["ca9bf7", "baby purple"], ["875f42", "cocoa"], ["3a2efe", "light royal blue"], ["fd8d49", "orangeish"], ["8b3103", "rust brown"], ["cba560", "sand brown"], ["698339", "swamp"], ["0cdc73", "tealish green"], ["b75203", "burnt siena"], ["7f8f4e", "camo"], ["26538d", "dusk blue"], ["63a950", "fern"], ["c87f89", "old rose"], ["b1fc99", "pale light green"], ["ff9a8a", "peachy pink"], ["f6688e", "rosy pink"], ["76fda8", "light bluish green"], ["53fe5c", "light bright green"], ["4efd54", "light neon green"], ["a0febf", "light seafoam"], ["7bf2da", "tiffany blue"], ["bcf5a6", "washed out green"], ["ca6b02", "browny orange"], ["107ab0", "nice blue"], ["2138ab", "sapphire"], ["719f91", "greyish teal"], ["fdb915", "orangey yellow"], ["fefcaf", "parchment"], ["fcf679", "straw"], ["1d0200", "very dark brown"], ["cb6843", "terracota"], ["31668a", "ugly blue"], ["247afd", "clear blue"], ["ffffb6", "creme"], ["90fda9", "foam green"], ["86a17d", "grey/green"], ["fddc5c", "light gold"], ["78d1b6", "seafoam blue"], ["13bbaf", "topaz"], ["fb5ffc", "violet pink"], ["20f986", "wintergreen"], ["ffe36e", "yellow tan"], ["9d0759", "dark fuchsia"], ["3a18b1", "indigo blue"], ["c2ff89", "light yellowish green"], ["d767ad", "pale magenta"], ["720058", "rich purple"], ["ffda03", "sunflower yellow"], ["01c08d", "green/blue"], ["ac7434", "leather"], ["014600", "racing green"], ["9900fa", "vivid purple"], ["02066f", "dark royal blue"], ["8e7618", "hazel"], ["d1768f", "muted pink"], ["96b403", "booger green"], ["fdff63", "canary"], ["95a3a6", "cool grey"], ["7f684e", "dark taupe"], ["751973", "darkish purple"], ["089404", "true green"], ["ff6163", "coral pink"], ["598556", "dark sage"], ["214761", "dark slate blue"], ["3c73a8", "flat blue"], ["ba9e88", "mushroom"], ["021bf9", "rich blue"], ["734a65", "dirty purple"], ["23c48b", "greenblue"], ["8fae22", "icky green"], ["e6f2a2", "light khaki"], ["4b57db", "warm blue"], ["d90166", "dark hot pink"], ["015482", "deep sea blue"], ["9d0216", "carmine"], ["728f02", "dark yellow green"], ["ffe5ad", "pale peach"], ["4e0550", "plum purple"], ["f9bc08", "golden rod"], ["ff073a", "neon red"], ["c77986", "old pink"], ["d6fffe", "very pale blue"], ["fe4b03", "blood orange"], ["fd5956", "grapefruit"], ["fce166", "sand yellow"], ["b2713d", "clay brown"], ["1f3b4d", "dark blue grey"], ["699d4c", "flat green"], ["56fca2", "light green blue"], ["fb5581", "warm pink"], ["3e82fc", "dodger blue"], ["a0bf16", "gross green"], ["d6fffa", "ice"], ["4f738e", "metallic blue"], ["ffb19a", "pale salmon"], ["5c8b15", "sap green"], ["54ac68", "algae"], ["89a0b0", "bluey grey"], ["7ea07a", "greeny grey"], ["1bfc06", "highlighter green"], ["cafffb", "light light blue"], ["b6ffbb", "light mint"], ["a75e09", "raw umber"], ["152eff", "vivid blue"], ["8d5eb7", "deep lavender"], ["5f9e8f", "dull teal"], ["63f7b4", "light greenish blue"], ["606602", "mud green"], ["fc86aa", "pinky"], ["8c0034", "red wine"], ["758000", "shit green"], ["ab7e4c", "tan brown"], ["030764", "darkblue"], ["fe86a4", "rosa"], ["d5174e", "lipstick"], ["fed0fc", "pale mauve"], ["680018", "claret"], ["fedf08", "dandelion"], ["fe420f", "orangered"], ["6f7c00", "poop green"], ["ca0147", "ruby"], ["1b2431", "dark"], ["00fbb0", "greenish turquoise"], ["db5856", "pastel red"], ["ddd618", "piss yellow"], ["41fdfe", "bright cyan"], ["cf524e", "dark coral"], ["21c36f", "algae green"], ["a90308", "darkish red"], ["6e1005", "reddy brown"], ["fe828c", "blush pink"], ["4b6113", "camouflage green"], ["4da409", "lawn green"], ["beae8a", "putty"], ["0339f8", "vibrant blue"], ["a88f59", "dark sand"], ["5d21d0", "purple/blue"], ["feb209", "saffron"], ["4e518b", "twilight"], ["964e02", "warm brown"], ["85a3b2", "bluegrey"], ["ff69af", "bubble gum pink"], ["c3fbf4", "duck egg blue"], ["2afeb7", "greenish cyan"], ["005f6a", "petrol"], ["0c1793", "royal"], ["ffff81", "butter"], ["f0833a", "dusty orange"], ["f1f33f", "off yellow"], ["b1d27b", "pale olive green"], ["fc824a", "orangish"], ["71aa34", "leaf"], ["b7c9e2", "light blue grey"], ["4b0101", "dried blood"], ["a552e6", "lightish purple"], ["af2f0d", "rusty red"], ["8b88f8", "lavender blue"], ["9af764", "light grass green"], ["a6fbb2", "light mint green"], ["ffc512", "sunflower"], ["750851", "velvet"], ["c14a09", "brick orange"], ["fe2f4a", "lightish red"], ["0203e2", "pure blue"], ["0a437a", "twilight blue"], ["a50055", "violet red"], ["ae8b0c", "yellowy brown"], ["fd798f", "carnation"], ["bfac05", "muddy yellow"], ["3eaf76", "dark seafoam green"], ["c74767", "deep rose"], ["b9484e", "dusty red"], ["647d8e", "grey/blue"], ["bffe28", "lemon lime"], ["d725de", "purple/pink"], ["b29705", "brown yellow"], ["673a3f", "purple brown"], ["a87dc2", "wisteria"], ["fafe4b", "banana yellow"], ["c0022f", "lipstick red"], ["0e87cc", "water blue"], ["8d8468", "brown grey"], ["ad03de", "vibrant purple"], ["8cff9e", "baby green"], ["94ac02", "barf green"], ["c4fff7", "eggshell blue"], ["fdee73", "sandy yellow"], ["33b864", "cool green"], ["fff9d0", "pale"], ["758da3", "blue/grey"], ["f504c9", "hot magenta"], ["77a1b5", "greyblue"], ["8756e4", "purpley"], ["889717", "baby shit green"], ["c27e79", "brownish pink"], ["017371", "dark aquamarine"], ["9f8303", "diarrhea"], ["f7d560", "light mustard"], ["bdf6fe", "pale sky blue"], ["75b84f", "turtle green"], ["9cbb04", "bright olive"], ["29465b", "dark grey blue"], ["696006", "greeny brown"], ["adf802", "lemon green"], ["c1c6fc", "light periwinkle"], ["35ad6b", "seaweed green"], ["fffd37", "sunshine yellow"], ["a442a0", "ugly purple"], ["f36196", "medium pink"], ["947706", "puke brown"], ["fff4f2", "very light pink"], ["1e9167", "viridian"], ["b5c306", "bile"], ["feff7f", "faded yellow"], ["cffdbc", "very pale green"], ["0add08", "vibrant green"], ["87fd05", "bright lime"], ["1ef876", "spearmint"], ["7bfdc7", "light aquamarine"], ["bcecac", "light sage"], ["bbf90f", "yellowgreen"], ["ab9004", "baby poo"], ["1fb57a", "dark seafoam"], ["00555a", "deep teal"], ["a484ac", "heather"], ["c45508", "rust orange"], ["3f829d", "dirty blue"], ["548d44", "fern green"], ["c95efb", "bright lilac"], ["3ae57f", "weird green"], ["016795", "peacock blue"], ["87a922", "avocado green"], ["f0944d", "faded orange"], ["5d1451", "grape purple"], ["25ff29", "hot green"], ["d0fe1d", "lime yellow"], ["ffa62b", "mango"], ["01b44c", "shamrock"], ["ff6cb5", "bubblegum"], ["6b4247", "purplish brown"], ["c7c10c", "vomit yellow"], ["b7fffa", "pale cyan"], ["aeff6e", "key lime"], ["ec2d01", "tomato red"], ["76ff7b", "lightgreen"], ["730039", "merlot"], ["040348", "night blue"], ["df4ec8", "purpleish pink"], ["6ecb3c", "apple"], ["8f9805", "baby poop green"], ["5edc1f", "green apple"], ["d94ff5", "heliotrope"], ["c8fd3d", "yellow/green"], ["070d0d", "almost black"], ["4984b8", "cool blue"], ["51b73b", "leafy green"], ["ac7e04", "mustard brown"], ["4e5481", "dusk"], ["876e4b", "dull brown"], ["58bc08", "frog green"], ["2fef10", "vivid green"], ["2dfe54", "bright light green"], ["0aff02", "fluro green"], ["9cef43", "kiwi"], ["18d17b", "seaweed"], ["35530a", "navy green"], ["1805db", "ultramarine blue"], ["6258c4", "iris"], ["ff964f", "pastel orange"], ["ffab0f", "yellowish orange"], ["8f8ce7", "perrywinkle"], ["24bca8", "tealish"], ["3f012c", "dark plum"], ["cbf85f", "pear"], ["ff724c", "pinkish orange"], ["280137", "midnight purple"], ["b36ff6", "light urple"], ["48c072", "dark mint"], ["bccb7a", "greenish tan"], ["a8415b", "light burgundy"], ["06b1c4", "turquoise blue"], ["cd7584", "ugly pink"], ["f1da7a", "sandy"], ["ff0490", "electric pink"], ["805b87", "muted purple"], ["50a747", "mid green"], ["a8a495", "greyish"], ["cfff04", "neon yellow"], ["ffff7e", "banana"], ["ff7fa7", "carnation pink"], ["ef4026", "tomato"], ["3c9992", "sea"], ["886806", "muddy brown"], ["04f489", "turquoise green"], ["fef69e", "buff"], ["cfaf7b", "fawn"], ["3b719f", "muted blue"], ["fdc1c5", "pale rose"], ["20c073", "dark mint green"], ["9b5fc0", "amethyst"], ["0f9b8e", "blue/green"], ["742802", "chestnut"], ["9db92c", "sick green"], ["a4bf20", "pea"], ["cd5909", "rusty orange"], ["ada587", "stone"], ["be013c", "rose red"], ["b8ffeb", "pale aqua"], ["dc4d01", "deep orange"], ["a2653e", "earth"], ["638b27", "mossy green"], ["419c03", "grassy green"], ["b1ff65", "pale lime green"], ["9dbcd4", "light grey blue"], ["fdfdfe", "pale grey"], ["77ab56", "asparagus"], ["464196", "blueberry"], ["990147", "purple red"], ["befd73", "pale lime"], ["32bf84", "greenish teal"], ["af6f09", "caramel"], ["a0025c", "deep magenta"], ["ffd8b1", "light peach"], ["7f4e1e", "milk chocolate"], ["bf9b0c", "ocher"], ["6ba353", "off green"], ["f075e6", "purply pink"], ["7bc8f6", "lightblue"], ["475f94", "dusky blue"], ["f5bf03", "golden"], ["fffeb6", "light beige"], ["fffd74", "butter yellow"], ["895b7b", "dusky purple"], ["436bad", "french blue"], ["d0c101", "ugly yellow"], ["c6f808", "greeny yellow"], ["f43605", "orangish red"], ["02c14d", "shamrock green"], ["b25f03", "orangish brown"], ["2a7e19", "tree green"], ["490648", "deep violet"], ["536267", "gunmetal"], ["5a06ef", "blue/purple"], ["cf0234", "cherry"], ["c4a661", "sandy brown"], ["978a84", "warm grey"], ["1f0954", "dark indigo"], ["03012d", "midnight"], ["2bb179", "bluey green"], ["c3909b", "grey pink"], ["a66fb5", "soft purple"], ["770001", "blood"], ["922b05", "brown red"], ["7d7f7c", "medium grey"], ["990f4b", "berry"], ["8f7303", "poo"], ["c83cb9", "purpley pink"], ["fea993", "light salmon"], ["acbb0d", "snot"], ["c071fe", "easter purple"], ["ccfd7f", "light yellow green"], ["00022e", "dark navy blue"], ["828344", "drab"], ["ffc5cb", "light rose"], ["ab1239", "rouge"], ["b0054b", "purplish red"], ["99cc04", "slime green"], ["937c00", "baby poop"], ["019529", "irish green"], ["ef1de7", "pink/purple"], ["000435", "dark navy"], ["42b395", "greeny blue"], ["9d5783", "light plum"], ["c8aca9", "pinkish grey"], ["c87606", "dirty orange"], ["aa2704", "rust red"], ["e4cbff", "pale lilac"], ["fa4224", "orangey red"], ["0804f9", "primary blue"], ["5cb200", "kermit green"], ["76424e", "brownish purple"], ["6c7a0e", "murky green"], ["fbdd7e", "wheat"], ["2a0134", "very dark purple"], ["044a05", "bottle green"], ["fd4659", "watermelon"], ["0d75f8", "deep sky blue"], ["fe0002", "fire engine red"], ["cb9d06", "yellow ochre"], ["fb7d07", "pumpkin orange"], ["b9cc81", "pale olive"], ["edc8ff", "light lilac"], ["61e160", "lightish green"], ["8ab8fe", "carolina blue"], ["920a4e", "mulberry"], ["fe02a2", "shocking pink"], ["9a3001", "auburn"], ["65fe08", "bright lime green"], ["befdb7", "celadon"], ["b17261", "pinkish brown"], ["885f01", "poo brown"], ["02ccfe", "bright sky blue"], ["c1fd95", "celery"], ["836539", "dirt brown"], ["fb2943", "strawberry"], ["84b701", "dark lime"], ["b66325", "copper"], ["7f5112", "medium brown"], ["5fa052", "muted green"], ["6dedfd", "robin's egg"], ["0bf9ea", "bright aqua"], ["c760ff", "bright lavender"], ["ffffcb", "ivory"], ["f6cefc", "very light purple"], ["155084", "light navy"], ["f5054f", "pink red"], ["645403", "olive brown"], ["7a5901", "poop brown"], ["a8b504", "mustard green"], ["3d9973", "ocean green"], ["000133", "very dark blue"], ["76a973", "dusty green"], ["2e5a88", "light navy blue"], ["0bf77d", "minty green"], ["bd6c48", "adobe"], ["ac1db8", "barney"], ["2baf6a", "jade green"], ["26f7fd", "bright light blue"], ["aefd6c", "light lime"], ["9b8f55", "dark khaki"], ["ffad01", "orange yellow"], ["c69c04", "ocre"], ["f4d054", "maize"], ["de9dac", "faded pink"], ["05480d", "british racing green"], ["c9ae74", "sandstone"], ["60460f", "mud brown"], ["98f6b0", "light sea green"], ["8af1fe", "robin egg blue"], ["2ee8bb", "aqua marine"], ["11875d", "dark sea green"], ["fdb0c0", "soft pink"], ["b16002", "orangey brown"], ["f7022a", "cherry red"], ["d5ab09", "burnt yellow"], ["86775f", "brownish grey"], ["c69f59", "camel"], ["7a687f", "purplish grey"], ["042e60", "marine"], ["c88d94", "greyish pink"], ["a5fbd5", "pale turquoise"], ["fffe71", "pastel yellow"], ["6241c7", "bluey purple"], ["fffe40", "canary yellow"], ["d3494e", "faded red"], ["985e2b", "sepia"], ["a6814c", "coffee"], ["ff08e8", "bright magenta"], ["9d7651", "mocha"], ["feffca", "ecru"], ["98568d", "purpleish"], ["9e003a", "cranberry"], ["287c37", "darkish green"], ["b96902", "brown orange"], ["ba6873", "dusky rose"], ["ff7855", "melon"], ["94b21c", "sickly green"], ["c5c9c7", "silver"], ["661aee", "purply blue"], ["6140ef", "purpleish blue"], ["9be5aa", "hospital green"], ["7b5804", "shit brown"], ["276ab3", "mid blue"], ["feb308", "amber"], ["8cfd7e", "easter green"], ["6488ea", "soft blue"], ["056eee", "cerulean blue"], ["b27a01", "golden brown"], ["0ffef9", "bright turquoise"], ["fa2a55", "red pink"], ["820747", "red purple"], ["7a6a4f", "greyish brown"], ["f4320c", "vermillion"], ["a13905", "russet"], ["6f828a", "steel grey"], ["a55af4", "lighter purple"], ["ad0afd", "bright violet"], ["004577", "prussian blue"], ["658d6d", "slate green"], ["ca7b80", "dirty pink"], ["005249", "dark blue green"], ["2b5d34", "pine"], ["bff128", "yellowy green"], ["b59410", "dark gold"], ["2976bb", "bluish"], ["014182", "darkish blue"], ["bb3f3f", "dull red"], ["fc2647", "pinky red"], ["a87900", "bronze"], ["82cbb2", "pale teal"], ["667c3e", "military green"], ["fe46a5", "barbie pink"], ["fe83cc", "bubblegum pink"], ["94a617", "pea soup green"], ["a88905", "dark mustard"], ["7f5f00", "shit"], ["9e43a2", "medium purple"], ["062e03", "very dark green"], ["8a6e45", "dirt"], ["cc7a8b", "dusky pink"], ["9e0168", "red violet"], ["fdff38", "lemon yellow"], ["c0fa8b", "pistachio"], ["eedc5b", "dull yellow"], ["7ebd01", "dark lime green"], ["3b5b92", "denim blue"], ["01889f", "teal blue"], ["3d7afd", "lightish blue"], ["5f34e7", "purpley blue"], ["6d5acf", "light indigo"], ["748500", "swamp green"], ["706c11", "brown green"], ["3c0008", "dark maroon"], ["cb00f5", "hot purple"], ["002d04", "dark forest green"], ["658cbb", "faded blue"], ["749551", "drab green"], ["b9ff66", "light lime green"], ["9dc100", "snot green"], ["faee66", "yellowish"], ["7efbb3", "light blue green"], ["7b002c", "bordeaux"], ["c292a1", "light mauve"], ["017b92", "ocean"], ["fcc006", "marigold"], ["657432", "muddy green"], ["d8863b", "dull orange"], ["738595", "steel"], ["aa23ff", "electric purple"], ["08ff08", "fluorescent green"], ["9b7a01", "yellowish brown"], ["f29e8e", "blush"], ["6fc276", "soft green"], ["ff5b00", "bright orange"], ["fdff52", "lemon"], ["866f85", "purple grey"], ["8ffe09", "acid green"], ["eecffe", "pale lavender"], ["510ac9", "violet blue"], ["4f9153", "light forest green"], ["9f2305", "burnt red"], ["728639", "khaki green"], ["de0c62", "cerise"], ["916e99", "faded purple"], ["ffb16d", "apricot"], ["3c4d03", "dark olive green"], ["7f7053", "grey brown"], ["77926f", "green grey"], ["010fcc", "true blue"], ["ceaefa", "pale violet"], ["8f99fb", "periwinkle blue"], ["c6fcff", "light sky blue"], ["5539cc", "blurple"], ["544e03", "green brown"], ["017a79", "bluegreen"], ["01f9c6", "bright teal"], ["c9b003", "brownish yellow"], ["929901", "pea soup"], ["0b5509", "forest"], ["a00498", "barney purple"], ["2000b1", "ultramarine"], ["94568c", "purplish"], ["c2be0e", "puke yellow"], ["748b97", "bluish grey"], ["665fd1", "dark periwinkle"], ["9c6da5", "dark lilac"], ["c44240", "reddish"], ["a24857", "light maroon"], ["825f87", "dusty purple"], ["c9643b", "terra cotta"], ["90b134", "avocado"], ["01386a", "marine blue"], ["25a36f", "teal green"], ["59656d", "slate grey"], ["75fd63", "lighter green"], ["21fc0d", "electric green"], ["5a86ad", "dusty blue"], ["fec615", "golden yellow"], ["fffd01", "bright yellow"], ["dfc5fe", "light lavender"], ["b26400", "umber"], ["7f5e00", "poop"], ["de7e5d", "dark peach"], ["048243", "jungle green"], ["ffffd4", "eggshell"], ["3b638c", "denim"], ["b79400", "yellow brown"], ["84597e", "dull purple"], ["411900", "chocolate brown"], ["7b0323", "wine red"], ["04d9ff", "neon blue"], ["667e2c", "dirty green"], ["fbeeac", "light tan"], ["d7fffe", "ice blue"], ["4e7496", "cadet blue"], ["874c62", "dark mauve"], ["d5ffff", "very light blue"], ["826d8c", "grey purple"], ["ffbacd", "pastel pink"], ["d1ffbd", "very light green"], ["448ee4", "dark sky blue"], ["05472a", "evergreen"], ["d5869d", "dull pink"], ["3d0734", "aubergine"], ["4a0100", "mahogany"], ["f8481c", "reddish orange"], ["02590f", "deep green"], ["89a203", "vomit green"], ["e03fd8", "purple pink"], ["d58a94", "dusty pink"], ["7bb274", "faded green"], ["526525", "camo green"], ["c94cbe", "pinky purple"], ["db4bda", "pink purple"], ["9e3623", "brownish red"], ["b5485d", "dark rose"], ["735c12", "mud"], ["9c6d57", "brownish"], ["028f1e", "emerald green"], ["b1916e", "pale brown"], ["49759c", "dull blue"], ["a0450e", "burnt umber"], ["39ad48", "medium green"], ["b66a50", "clay"], ["8cffdb", "light aqua"], ["a4be5c", "light olive green"], ["cb7723", "brownish orange"], ["05696b", "dark aqua"], ["ce5dae", "purplish pink"], ["c85a53", "dark salmon"], ["96ae8d", "greenish grey"], ["1fa774", "jade"], ["7a9703", "ugly green"], ["ac9362", "dark beige"], ["01a049", "emerald"], ["d9544d", "pale red"], ["fa5ff7", "light magenta"], ["82cafc", "sky"], ["acfffc", "light cyan"], ["fcb001", "yellow orange"], ["910951", "reddish purple"], ["fe2c54", "reddish pink"], ["c875c4", "orchid"], ["cdc50a", "dirty yellow"], ["fd411e", "orange red"], ["9a0200", "deep red"], ["be6400", "orange brown"], ["030aa7", "cobalt blue"], ["fe019a", "neon pink"], ["f7879a", "rose pink"], ["887191", "greyish purple"], ["b00149", "raspberry"], ["12e193", "aqua green"], ["fe7b7c", "salmon pink"], ["ff9408", "tangerine"], ["6a6e09", "brownish green"], ["8b2e16", "red brown"], ["696112", "greenish brown"], ["e17701", "pumpkin"], ["0a481e", "pine green"], ["343837", "charcoal"], ["ffb7ce", "baby pink"], ["6a79f7", "cornflower"], ["5d06e9", "blue violet"], ["3d1c02", "chocolate"], ["82a67d", "greyish green"], ["be0119", "scarlet"], ["c9ff27", "green yellow"], ["373e02", "dark olive"], ["a9561e", "sienna"], ["caa0ff", "pastel purple"], ["ca6641", "terracotta"], ["02d8e9", "aqua blue"], ["88b378", "sage green"], ["980002", "blood red"], ["cb0162", "deep pink"], ["5cac2d", "grass"], ["769958", "moss"], ["a2bffe", "pastel blue"], ["10a674", "bluish green"], ["06b48b", "green blue"], ["af884a", "dark tan"], ["0b8b87", "greenish blue"], ["ffa756", "pale orange"], ["a2a415", "vomit"], ["154406", "forrest green"], ["856798", "dark lavender"], ["34013f", "dark violet"], ["632de9", "purple blue"], ["0a888a", "dark cyan"], ["6f7632", "olive drab"], ["d46a7e", "pinkish"], ["1e488f", "cobalt"], ["bc13fe", "neon purple"], ["7ef4cc", "light turquoise"], ["76cd26", "apple green"], ["74a662", "dull green"], ["80013f", "wine"], ["b1d1fc", "powder blue"], ["ffffe4", "off white"], ["0652ff", "electric blue"], ["045c5a", "dark turquoise"], ["5729ce", "blue purple"], ["069af3", "azure"], ["ff000d", "bright red"], ["f10c45", "pinkish red"], ["5170d7", "cornflower blue"], ["acbf69", "light olive"], ["6c3461", "grape"], ["5e819d", "greyish blue"], ["601ef9", "purplish blue"], ["b0dd16", "yellowish green"], ["cdfd02", "greenish yellow"], ["2c6fbb", "medium blue"], ["c0737a", "dusty rose"], ["d6b4fc", "light violet"], ["020035", "midnight blue"], ["703be7", "bluish purple"], ["fd3c06", "red orange"], ["960056", "dark magenta"], ["40a368", "greenish"], ["03719c", "ocean blue"], ["fc5a50", "coral"], ["ffffc2", "cream"], ["7f2b0a", "reddish brown"], ["b04e0f", "burnt sienna"], ["a03623", "brick"], ["87ae73", "sage"], ["789b73", "grey green"], ["ffffff", "white"], ["98eff9", "robin's egg blue"], ["658b38", "moss green"], ["5a7d9a", "steel blue"], ["380835", "eggplant"], ["fffe7a", "light yellow"], ["5ca904", "leaf green"], ["d8dcd6", "light grey"], ["a5a502", "puke"], ["d648d7", "pinkish purple"], ["047495", "sea blue"], ["b790d4", "pale purple"], ["5b7c99", "slate blue"], ["607c8e", "blue grey"], ["0b4008", "hunter green"], ["ed0dd9", "fuchsia"], ["8c000f", "crimson"], ["ffff84", "pale yellow"], ["bf9005", "ochre"], ["d2bd0a", "mustard yellow"], ["ff474c", "light red"], ["0485d1", "cerulean"], ["ffcfdc", "pale pink"], ["040273", "deep blue"], ["a83c09", "rust"], ["90e4c1", "light teal"], ["516572", "slate"], ["fac205", "goldenrod"], ["d5b60a", "dark yellow"], ["363737", "dark grey"], ["4b5d16", "army green"], ["6b8ba4", "grey blue"], ["80f9ad", "seafoam"], ["a57e52", "puce"], ["a9f971", "spring green"], ["c65102", "dark orange"], ["e2ca76", "sand"], ["b0ff9d", "pastel green"], ["9ffeb0", "mint"], ["fdaa48", "light orange"], ["fe01b1", "bright pink"], ["c1f80a", "chartreuse"], ["36013f", "deep purple"], ["341c02", "dark brown"], ["b9a281", "taupe"], ["8eab12", "pea green"], ["9aae07", "puke green"], ["02ab2e", "kelly green"], ["7af9ab", "seafoam green"], ["137e6d", "blue green"], ["aaa662", "khaki"], ["610023", "burgundy"], ["014d4e", "dark teal"], ["8f1402", "brick red"], ["4b006e", "royal purple"], ["580f41", "plum"], ["8fff9f", "mint green"], ["dbb40c", "gold"], ["a2cffe", "baby blue"], ["c0fb2d", "yellow green"], ["be03fd", "bright purple"], ["840000", "dark red"], ["d0fefe", "pale blue"], ["3f9b0b", "grass green"], ["01153e", "navy"], ["04d8b2", "aquamarine"], ["c04e01", "burnt orange"], ["0cff0c", "neon green"], ["0165fc", "bright blue"], ["cf6275", "rose"], ["ffd1df", "light pink"], ["ceb301", "mustard"], ["380282", "indigo"], ["aaff32", "lime"], ["53fca1", "sea green"], ["8e82fe", "periwinkle"], ["cb416b", "dark pink"], ["677a04", "olive green"], ["ffb07c", "peach"], ["c7fdb5", "pale green"], ["ad8150", "light brown"], ["ff028d", "hot pink"], ["000000", "black"], ["cea2fd", "lilac"], ["001146", "navy blue"], ["0504aa", "royal blue"], ["e6daa6", "beige"], ["ff796c", "salmon"], ["6e750e", "olive"], ["650021", "maroon"], ["01ff07", "bright green"], ["35063e", "dark purple"], ["ae7181", "mauve"], ["06470c", "forest green"], ["13eac9", "aqua"], ["00ffff", "cyan"], ["d1b26f", "tan"], ["00035b", "dark blue"], ["c79fef", "lavender"], ["06c2ac", "turquoise"], ["033500", "dark green"], ["9a0eea", "violet"], ["bf77f6", "light purple"], ["89fe05", "lime green"], ["929591", "grey"], ["75bbfd", "sky blue"], ["ffff14", "yellow"], ["c20078", "magenta"], ["96f97b", "light green"], ["f97306", "orange"], ["029386", "teal"], ["95d0fc", "light blue"], ["e50000", "red"], ["653700", "brown"], ["ff81c0", "pink"], ["0343df", "blue"], ["15b01a", "green"], ["7e1e9c", "purple"], ["FF5E99", "paul irish pink"], ["00000000", "transparent"]]; names.each(function(element) { return lookup[normalizeKey(element[1])] = parseHex(element[0]); }); Color.random = function() { return Color(rand(256), rand(256), rand(256), 1); }; return Color.mix = function(color1, color2, amount) { var new_colors; amount || (amount = 0.5); new_colors = color1.channels().zip(color2.channels()).map(function(array) { return (array[0] * amount) + (array[1] * (1 - amount)); }); return Color(new_colors); }; })();; (function($) { /** The <code>Developer</code> module provides a debug overlay and methods for debugging and live coding. @name Developer @fieldOf Engine @module @param {Object} I Instance variables @param {Object} self Reference to the engine */ var developerHotkeys, developerMode, developerModeMousedown, namespace, objectToUpdate; Engine.Developer = function(I, self) { var boxHeight, boxWidth, font, lineHeight, margin, screenHeight, screenWidth, textStart; screenWidth = (typeof App !== "undefined" && App !== null ? App.width : void 0) || 480; screenHeight = (typeof App !== "undefined" && App !== null ? App.height : void 0) || 320; margin = 10; boxWidth = 240; boxHeight = 60; textStart = screenWidth - boxWidth + margin; font = "bold 9pt arial"; lineHeight = 16; self.bind("draw", function(canvas) { if (I.paused) { canvas.withTransform(I.cameraTransform, function(canvas) { return I.objects.each(function(object) { canvas.fillColor('rgba(255, 0, 0, 0.5)'); return canvas.fillRect(object.bounds().x, object.bounds().y, object.bounds().width, object.bounds().height); }); }); canvas.font(font); canvas.fillColor('rgba(0, 0, 0, 0.5)'); canvas.fillRect(screenWidth - boxWidth, 0, boxWidth, boxHeight); canvas.fillColor('#fff'); canvas.fillText("Developer Mode. Press Esc to resume", textStart, margin + 5); canvas.fillText("Shift+Left click to add boxes", textStart, margin + 5 + lineHeight); return canvas.fillText("Right click red boxes to edit properties", textStart, margin + 5 + 2 * lineHeight); } }); self.bind("init", function() { var fn, key, _results; window.updateObjectProperties = function(newProperties) { if (objectToUpdate) { return Object.extend(objectToUpdate, GameObject.construct(newProperties)); } }; $(document).unbind("." + namespace); $(document).bind("mousedown." + namespace, developerModeMousedown); _results = []; for (key in developerHotkeys) { fn = developerHotkeys[key]; _results.push((function(key, fn) { return $(document).bind("keydown." + namespace, key, function(event) { event.preventDefault(); return fn(); }); })(key, fn)); } return _results; }); return {}; }; namespace = "engine_developer"; developerMode = false; objectToUpdate = null; developerModeMousedown = function(event) { var object; if (developerMode) { console.log(event.which); if (event.which === 3) { if (object = engine.objectAt(event.pageX, event.pageY)) { parent.editProperties(object.I); objectToUpdate = object; } return console.log(object); } else if (event.which === 2 || keydown.shift) { return typeof window.developerAddObject === "function" ? window.developerAddObject(event) : void 0; } } }; return developerHotkeys = { esc: function() { developerMode = !developerMode; if (developerMode) { return engine.pause(); } else { return engine.play(); } }, f3: function() { return Local.set("level", engine.saveState()); }, f4: function() { return engine.loadState(Local.get("level")); }, f5: function() { return engine.reload(); } }; })(jQuery);; /** The <code>HUD</code> module provides an extra canvas to draw to. GameObjects that respond to the <code>drawHUD</code> method will draw to the HUD canvas. The HUD canvas is not cleared each frame, it is the responsibility of the objects drawing on it to manage that themselves. @name HUD @fieldOf Engine @module @param {Object} I Instance variables @param {Object} self Reference to the engine */Engine.HUD = function(I, self) { var hudCanvas; hudCanvas = $("<canvas width=" + App.width + " height=" + App.height + " />").powerCanvas(); hudCanvas.font("bold 9pt consolas, 'Courier New', 'andale mono', 'lucida console', monospace"); self.bind("draw", function(canvas) { var hud; I.objects.each(function(object) { return typeof object.drawHUD === "function" ? object.drawHUD(hudCanvas) : void 0; }); hud = hudCanvas.element(); return canvas.drawImage(hud, 0, 0, hud.width, hud.height, 0, 0, hud.width, hud.height); }); return {}; };; (function($) { /** The <code>Joysticks</code> module gives the engine access to joysticks. @name Joysticks @fieldOf Engine @module @param {Object} I Instance variables @param {Object} self Reference to the engine */ return Engine.Joysticks = function(I, self) { Joysticks.init(); log(Joysticks.status()); self.bind("update", function() { Joysticks.init(); return Joysticks.update(); }); return { /** Get a controller for a given joystick id. @name controller @methodOf Engine.Joysticks# @param {Number} i The joystick id to get the controller of. */ controller: function(i) { return Joysticks.getController(i); } }; }; })();; /** The <code>Shadows</code> module provides a lighting extension to the Engine. Objects that have an illuminate method will add light to the scene. Objects that have an true opaque attribute will cast shadows. @name Shadows @fieldOf Engine @module @param {Object} I Instance variables @param {Object} self Reference to the engine */Engine.Shadows = function(I, self) { var shadowCanvas; shadowCanvas = $("<canvas width=640 height=480 />").powerCanvas(); self.bind("draw", function(canvas) { var shadows; if (I.ambientLight < 1) { shadowCanvas.compositeOperation("source-over"); shadowCanvas.clear(); shadowCanvas.fill("rgba(0, 0, 0, " + (1 - I.ambientLight) + ")"); shadowCanvas.compositeOperation("destination-out"); shadowCanvas.withTransform(I.cameraTransform, function(shadowCanvas) { return I.objects.each(function(object, i) { if (object.illuminate) { shadowCanvas.globalAlpha(1); return object.illuminate(shadowCanvas); } }); }); shadows = shadowCanvas.element(); return canvas.drawImage(shadows, 0, 0, shadows.width, shadows.height, 0, 0, shadows.width, shadows.height); } }); return {}; };; /** The <code>Tilemap</code> module provides a way to load tilemaps in the engine. @name Tilemap @fieldOf Engine @module @param {Object} I Instance variables @param {Object} self Reference to the engine */Engine.Tilemap = function(I, self) { var clearObjects, map, updating; map = null; updating = false; clearObjects = false; self.bind("preDraw", function(canvas) { return map != null ? map.draw(canvas) : void 0; }); self.bind("update", function() { return updating = true; }); self.bind("afterUpdate", function() { updating = false; if (clearObjects) { I.objects.clear(); return clearObjects = false; } }); return { /** Loads a new may and unloads any existing map or entities. @name loadMap @methodOf Engine# */ loadMap: function(name, complete) { clearObjects = updating; return map = Tilemap.load({ name: name, complete: complete, entity: self.add }); } }; };; (function() { var Map, Tilemap, fromPixieId, loadByName; Map = function(data, entityCallback) { var entity, loadEntities, spriteLookup, tileHeight, tileWidth, uuid, _ref; tileHeight = data.tileHeight; tileWidth = data.tileWidth; spriteLookup = {}; _ref = App.entities; for (uuid in _ref) { entity = _ref[uuid]; spriteLookup[uuid] = Sprite.fromURL(entity.tileSrc); } loadEntities = function() { if (!entityCallback) { return; } return data.layers.each(function(layer, layerIndex) { var entities, entity, entityData, x, y, _i, _len, _results; if (layer.name.match(/entities/i)) { if (entities = layer.entities) { _results = []; for (_i = 0, _len = entities.length; _i < _len; _i++) { entity = entities[_i]; x = entity.x, y = entity.y, uuid = entity.uuid; entityData = Object.extend({ layer: layerIndex, sprite: spriteLookup[uuid], x: x, y: y }, App.entities[uuid], entity.properties); _results.push(entityCallback(entityData)); } return _results; } } }); }; loadEntities(); return Object.extend(data, { draw: function(canvas, x, y) { return canvas.withTransform(Matrix.translation(x, y), function() { return data.layers.each(function(layer) { if (layer.name.match(/entities/i)) { return; } return layer.tiles.each(function(row, y) { return row.each(function(uuid, x) { var sprite; if (sprite = spriteLookup[uuid]) { return sprite.draw(canvas, x * tileWidth, y * tileHeight); } }); }); }); }); } }); }; Tilemap = function(name, callback, entityCallback) { return fromPixieId(App.Tilemaps[name], callback, entityCallback); }; fromPixieId = function(id, callback, entityCallback) { var proxy, url; url = "http://pixieengine.com/s3/tilemaps/" + id + "/data.json"; proxy = { draw: function() {} }; $.getJSON(url, function(data) { Object.extend(proxy, Map(data, entityCallback)); return typeof callback === "function" ? callback(proxy) : void 0; }); return proxy; }; loadByName = function(name, callback, entityCallback) { var directory, proxy, url, _ref; directory = (typeof App !== "undefined" && App !== null ? (_ref = App.directories) != null ? _ref.tilemaps : void 0 : void 0) || "data"; url = "" + BASE_URL + "/" + directory + "/" + name + ".tilemap?" + (new Date().getTime()); proxy = { draw: function() {} }; $.getJSON(url, function(data) { Object.extend(proxy, Map(data, entityCallback)); return typeof callback === "function" ? callback(proxy) : void 0; }); return proxy; }; Tilemap.fromPixieId = fromPixieId; Tilemap.load = function(options) { if (options.pixieId) { return fromPixieId(options.pixieId, options.complete, options.entity); } else if (options.name) { return loadByName(options.name, options.complete, options.entity); } }; return (typeof exports !== "undefined" && exports !== null ? exports : this)["Tilemap"] = Tilemap; })();; ;
sounds
crash
ZgAAAAMAAAAAAAA/zSsJPgAAAADziqm+AAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAIP1pT6/SZw+/3FEPwAAAAAAAACAPwAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAA
land
ZgAAAAMAAAAAAAA/16PwPgAAAADNzEy+rkdhPgAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAB+Faz5SuJ4+CtcjPwAAAAAAAACAPwAAAAAAAAAAAAAAAHEkl76D II2+AAAAAAAAAAAAAAAA
splash
ZgAAAAMAAAAAAAA/8c3JPQAAAADE8o8+AAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAIm6pz62KJg+KVwPPgAAAAAAAACAPwAAAAAAAAAAAAAAAPBM/j5j X6K9AAAAACR2Uj9hojc/
wave
ZgAAAAMAAAAAAAA/j8J1PgAAAAAK1yM9CtcjvQAAAAAAAAAA7FG4PexRuD0A AAAAAAAAAClcjz6amRk/AAAAAAAAAAAAAACAPwAAAAAAAAAACtejvAAAAAAA AAAAAAAAAMuXIT8AAAAA
src
base
# The Base class is used to share common functionality Base = (I) -> # Inherit from GameObject. This give all the GameObject functionality to objects that inherit from Base self = GameObject(I) # Add a debug draw method that shows the collision circles self.bind "drawDebug", (canvas) -> if I.radius center = self.center() x = center.x y = center.y canvas.fillCircle(x, y, I.radius, "rgba(255, 0, 255, 0.5)") # Return self self
bird
Bird = (I) -> I ||= {} # Set some default properties $.reverseMerge I, color: "black" height: 16 sprite: "bird0" width: 16 velocity: Point(rand(6) - 3, 0) y: -120 + rand(120) zIndex: [-1, -3].rand() # Inherit from game object self = GameObject(I) # Add events and methods here self.bind "update", -> I.sprite = Bird.sprites.wrap((I.age/8).floor()) I.x += I.velocity.x # Remove birds that are too far from the player if player = engine.find("Player").first() if (player.I.x - I.x).abs() > 2 * App.width self.destroy() # We must always return self as the last line return self Bird.sprites = ["bird_0", "bird_1"].map (name) -> Sprite.loadByName name
cloud
# Clouds are just for decoration Cloud = (I) -> # Default Cloud properties Object.reverseMerge I, sprite: "cloud" height: 32 width: 128 y: -120 + rand(240) zIndex: -2 # Inherit from Base self = Base(I) # Even clouds are destroyed by rogue waves self.bind "update", -> destruction = engine.find(".destruction").first() if destruction if I.x < destruction.I.x - I.width I.active = false # The last line of a function is the return value self
destruction
# The destruction is a rogue wave that will crush the player or anything else in its path Destruction = (I) -> I ||= {} # Set some default properties $.reverseMerge I, color: "red" destruction: true x: -240 y: 0 width: 10 height: App.height + 64 zIndex: 7 # Inherit from game object self = GameObject(I) self.bind "update", -> # Move the wave forward a little every game step I.x += 2 + I.age / 175 # Catch the wave up to within 4 screens of the player if it falls too far behind if player = engine.find("Player").first() I.x = I.x.clamp(player.I.x - 4 * App.width, Infinity) I.y = player.I.y # Remove the default draw events self.unbind "draw" self.bind "draw", (canvas) -> # Draw the body of the wave Destruction.waveSprites.wrap((I.age / 8).floor()).fill(canvas, -App.width, 0, App.width + 16, I.height) # Draw the front of the wave Destruction.churnSprites.wrap((I.age / 8).floor()).fill(canvas, 0, 0, 32, I.height) # Draw the actual wave position as the game sees it self.bind "drawDebug", (canvas) -> canvas.fillColor("rgba(255, 0, 0, 0.75)") canvas.fillRect(I.x, I.y - I.height/2, I.width, I.height) # We must always return self as the last line return self # Load some sprites for drawing the wave Destruction.churnSprites = ["churn", "churn2"].map (name) -> Sprite.loadByName name Destruction.waveSprites = ["wave", "wave1"].map (name) -> Sprite.loadByName name
engine_shake
Engine.Shake = (I, self) -> Object.reverseMerge I, shakeIntensity: 20 shakeCooldown: 0 self.bind "update", -> if I.shakeCooldown > 0 I.shakeCooldown = I.shakeCooldown.approach(0, 1) I.cameraTransform = Matrix() I.cameraTransform.tx += (rand() * I.shakeIntensity) - (I.shakeIntensity / 2) I.cameraTransform.ty += (rand() * I.shakeIntensity) - (I.shakeIntensity / 2) else engine.I.cameraTransform = Matrix() shake: (duration, intensity) -> I.shakeCooldown = duration || 10 I.shakeIntensity = intensity
game_over
# The object that displays text when the game ends GameOver = (I) -> # Use a high zIndex to make sure it draws on top Object.reverseMerge I, zIndex: 10 # The height of a line of text lineHeight = 24 # Inherit from GameObject self = GameObject(I).extend # Draw a bunch of text draw: (canvas) -> canvas.font("bold 24px consolas, 'Courier New', 'andale mono', 'lucida console', monospace") canvas.fillColor("#FFF") canvas.withTransform Matrix.translation(I.x - App.width/2, 0), -> canvas.centerText("surf'd for #{I.distance.toFixed(2)} meters", I.y - lineHeight) canvas.centerText("sur5'd for #{(I.time / 30).toFixed(2)} seconds", I.y) canvas.centerText("succumb'd to #{I.causeOfDeath}", I.y + lineHeight) # Send the restart message to the engine when one of these keys is pressed self.bind "update", -> if keydown.space || keydown.return || keydown.escape engine.trigger "restart" # Always return self from constructors return self
main
# SurfN-2-Sur5 # ============ # # This game is a surfing game about an FBI agent who must surf to survive. # # The source has been annotated to teach you the basics of using PixieEngine. # # Directory Overview # ------------------ # images - All the sprites used in the game # lib - Compiled libraries that the game includes # sounds - All Sound effects and music # src - The code for all the objects in the game # webstore - Files needed for exporting to Chrome Web Store # # Architecture Overview # --------------------- # Engine - Manages all the game objects and running the update and draw steps # GameObject - Represents something in the game, a player, a rock, even a rogue wave # Base - A common base class that adds shared functionality to GameObjects # Player - The player that someone controls when playing the game. # Rock - When the player hits rocks he is destroyed # Cloud - Just for decoration # Water - The sea. The player surfs and jumps in and out of the water. # # This main file sets up the engine and configures all the initial objects. # Set up the engine, enabling zSorting of objects so they are drawn # by order of their zIndex window.engine = Engine backgroundColor: Color('burnt orange') canvas: $("canvas").powerCanvas() zSort: true gradient = engine.I.canvas.createLinearGradient(0, -400, 0, App.height) gradient.addColorStop(0, 'rgba(0, 0, 0, 0.7)') gradient.addColorStop(0.7, 'rgba(0, 0, 0, 0)') gradient.addColorStop(1, 'rgba(0, 0, 0, 0)') # Add all the initial objects to create the game's starting state setUpGame = -> # Add the player engine.add class: "Player" x: 0 y: 0 # Add a rock near the start engine.add class: "Rock" x: 60 y: 180 # Addd 4 random clouds near the start 4.times (n) -> engine.add class: "Cloud" x: n * 128 # Add the sea itself engine.add class: "Water" # Add the rogue wave engine.add class: "Destruction" # Listen to the restart event which is fired by # the GameOver object when the player presses space or enter engine.bind "restart", -> doRestart = -> # Remove all the game objects from the engine engine.I.objects.clear() # Unbind this event so that it is only triggered once engine.unbind "afterUpdate", doRestart # Set up the game to its starting configuration setUpGame() # Wait until in between updates, then restart the game engine.bind "afterUpdate", doRestart # Add rocks and clouds randomly at certain intervals engine.bind "update", -> if player = engine.find("Player").first() clock = player.I.age if clock % 30 == 0 engine.add class: "Rock" x: player.I.x + 2 * App.width if clock % 55 == 0 engine.add class: "Cloud" x: player.I.x + 2 * App.width if rand() < 0.02 engine.add class: "Bird" x: player.I.x + App.width # Move the camera to track the player engine.bind "afterUpdate", -> if player = engine.find("Player").first() engine.I.cameraTransform = Matrix.translation(App.width/2 - player.I.x, App.height/2 - player.I.y) # Optional toggle to draw some debug information DEBUG_DRAW = false # Bind the debug draw toggling to the `0` key $(document).bind "keydown", "0", -> DEBUG_DRAW = !DEBUG_DRAW # Bind an additional draw method to the engine to draw debug information for # objects when debug draw is active. engine.bind "draw", (canvas) -> canvas.context().fillStyle = gradient cameraInverse = engine.I.cameraTransform.inverse() canvas.fillRect(cameraInverse.tx, cameraInverse.ty, App.width, App.height) if DEBUG_DRAW engine.find("Player, Rock, .destruction").invoke("trigger", "drawDebug", canvas) # Notify the containing window of the controls parent.gameControlData = Movement: "Left/Right Arrow Keys" Restart: "Enter or Spacebar" # Play that bumpin' soundtrack! # You can drag an mp3 from you desktop to the filetree # to get new music files to play Music.play "SurfN-2-Sur5" # Finally set up the game and start the engine setUpGame() engine.start()
player
# The `Player` object. Players are usually the largest and most complex objects # because they need to deal with input as well as react to all the situations # present in the game. # # Player constructor # # The single argument I is an object containing the properties # to initialize the player with # This is common across all game object constructors. Player = (I) -> # Initialize all the default attributes for the player Object.reverseMerge I, airborne: true heading: Math.TAU / 4 sprite: "player" launchBoost: 1.5 radius: 8 rotationVelocity: Math.TAU / 64 waterSpeed: 5 velocity: Point(0, 0) zIndex: 5 # The player inherits from Base self = Base(I) # The amount that gravity affects the player GRAVITY = Point(0, 0.25) # Initialize the player's sprites # Each one faces a separate direction sprites = [] angleSprites = 8 angleSprites.times (n) -> t = n * 2 sprites.push Sprite.loadByName("player_#{t}") # Set the sprite of the player based on which direction the player is facing setSprite = -> n = (angleSprites * I.heading / Math.TAU).round().mod(angleSprites) I.sprite = sprites[n] # Destroy the player and display the game over text wipeout = (causeOfDeath) -> self.destroy() Sound.play("crash") engine.add class: "GameOver" causeOfDeath: causeOfDeath distance: I.x time: I.age x: I.x y: I.y # When the player reenters the water make sure that the player is facing in the # correct direction for the landing land = () -> if I.velocity.x > 1.5 unless 0 <= I.heading <= Math.PI/2 wipeout("bad landing") else if I.velocity.x < -1.5 unless Math.PI/2 <= I.heading <= Math.PI wipeout("bad landing") else unless Math.PI/5 <= I.heading <= 4*Math.PI/5 wipeout("bad landing") I.airborne = false Sound.play("land") # Launch the player into the air, giving a speed boost launch = () -> I.airborne = true I.velocity.scale$(I.launchBoost) Sound.play("splash") # Check collisions with rocks and the rogue wave checkCollisions = -> # Check for collisions with rocks circle = self.circle() hitRock = false engine.find("Rock").each (rock) -> if Collision.circular circle, rock.circle() hitRock = true if hitRock wipeout("a rock") return true # Check for collisions with the rogue wave hitDestruction = false engine.find(".destruction").each (destruction) -> if I.x < destruction.I.x hitDestruction = true if hitDestruction wipeout("a rogue wave") return true # Accept keyboard input and adjust the players heading handleInput = -> # Rotate faster in the air than in the water headingChange = I.rotationVelocity headingChange *= 2 if I.airborne # Handle input if keydown.left I.heading -= headingChange if keydown.right I.heading += headingChange # Constrain the player's heading to [-PI, PI] I.heading = I.heading.constrainRotation() # Draw the direction the player is facing when debugging self.bind "drawDebug", (canvas) -> canvas.strokeColor("rgba(0, 255, 0, 0.75)") p = Point.fromAngle(I.heading).scale(10) canvas.drawLine(I.x - p.x, I.y - p.y, I.x + p.x, I.y + p.y, 1) # The player update method: handles entering and exiting # the water and everything else to do with updating the player self.bind "update", -> # Update position based on velocity I.x += I.velocity.x I.y += I.velocity.y # Gradually increase the players speed as time goes on I.waterSpeed = 5 + I.age / 200 checkCollisions() # Get the height of the water and the depths waterLevel = engine.find(".water").first().I.y depthsLevel = waterLevel + 160 if I.y > depthsLevel # Player is in too deep wipeout("the depths") else if I.y >= waterLevel # Land if player went from the air to the water if I.airborne land() # Increase or decrease the speed to the current water speed speed = I.velocity.magnitude() speed = speed.approachByRatio(I.waterSpeed, 0.1) I.velocity = Point.fromAngle(I.heading).scale(speed) else # Launch into the air if exiting the water if !I.airborne launch() # Gravity affects the player in the air. I.velocity = I.velocity.add(GRAVITY) handleInput() # Update the player's sprite based on the direction the player is facing setSprite() return self
rock
Rock = (I) -> # Default properties for all rocks Object.reverseMerge I, sprite: "rocks" height: 32 radius: 16 width: 32 y: 160 + rand(160) zIndex: 6 # Rocks inherit from `Base` for common functionality such as debug drawing self = Base(I) # Check the rocks position and destroy it to remove it from the game # This keeps the engine from filling up with hundreds of old rocks. self.bind "update", -> # Find the rogue wave from the game engine destruction = engine.find(".destruction").first() # Remove rocks when the rogue wave sweeps through if destruction if I.x < destruction.I.x - I.width self.destroy() # All game object constructors must return self return self
water
# The water draws the ocean and depths as well as know what height the ocean is # for the player to jump in and out of the water. Water = (I) -> I ||= {} # Set some default properties $.reverseMerge I, color: "blue" water: true x: 0 y: 160 width: App.width + 64 height: App.height zIndex: 0 # Inherit from game object self = GameObject(I) # We want the x and y position of this object to be the top center # so we need to re-center it # The default x,y is the middle self.center = -> Point(I.x, I.y + I.height/2) # Update the position of the water so it is always on the screen self.bind "update", -> if player = engine.find("Player").first() I.x = player.I.x # Gradually increase the amplitude of the tides over time amplitude = (15 + I.age / 30) I.y = 160 + amplitude * Math.sin(Math.TAU / 120 * I.age) # Play soothing ocean sounds and random intervals if rand(3) == 0 && I.age.mod(90) == 0 Sound.play("wave") # Also draw the sprites for the watery depths self.bind "draw", (canvas) -> canvas.withTransform Matrix.translation(-I.x.mod(32), 0), -> Water.depthsSprites.wrap((I.age / 8).floor()).fill(canvas, 0, App.height/2, I.width, App.height) # We must always return self as the last line return self # Load the sprites that represent the watery depths Water.depthsSprites = [Sprite.loadByName("depths0"), Sprite.loadByName("depths1")]
webstore
images
icon_128
icon_16
icon_96
jquery.min
/*! * jQuery JavaScript Library v1.6.1 * http://jquery.com/ * * Copyright 2011, John Resig * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * Includes Sizzle.js * http://sizzlejs.com/ * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * * Date: Thu May 12 15:04:36 2011 -0400 */ (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!cj[a]){var b=f("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),c.body.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write("<!doctype><html><body></body></html>");b=cl.createElement(a),cl.body.appendChild(b),d=f.css(b,"display"),c.body.removeChild(ck)}cj[a]=d}return cj[a]}function cu(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function ct(){cq=b}function cs(){setTimeout(ct,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bF.test(a)?d(a,e):b_(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bU,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bQ),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bD(a,b,c){var d=b==="width"?bx:by,e=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return e;f.each(d,function(){c||(e-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?e+=parseFloat(f.css(a,"margin"+this))||0:e-=parseFloat(f.css(a,"border"+this+"Width"))||0});return e}function bn(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bm(a){f.nodeName(a,"input")?bl(a):a.getElementsByTagName&&f.grep(a.getElementsByTagName("input"),bl)}function bl(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bk(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bj(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bi(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bh(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function X(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(S.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function W(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function O(a,b){return(a&&a!=="*"?a+".":"")+b.replace(A,"`").replace(B,"&")}function N(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(y,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function L(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function F(){return!0}function E(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function H(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(H,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=d.userAgent,x,y,z,A=Object.prototype.toString,B=Object.prototype.hasOwnProperty,C=Array.prototype.push,D=Array.prototype.slice,E=String.prototype.trim,F=Array.prototype.indexOf,G={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.1",length:0,size:function(){return this.length},toArray:function(){return D.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?C.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),y.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(D.apply(this,arguments),"slice",D.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:C,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;y.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!y){y=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",z,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",z),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&H()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):G[A.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!B.call(a,"constructor")&&!B.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||B.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:E?function(a){return a==null?"":E.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?C.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(F)return F.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=D.call(arguments,2),g=function(){return a.apply(c,f.concat(D.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){G["[object "+b+"]"]=b.toLowerCase()}),x=e.uaMatch(w),x.browser&&(e.browser[x.browser]=!0,e.browser.version=x.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?z=function(){c.removeEventListener("DOMContentLoaded",z,!1),e.ready()}:c.attachEvent&&(z=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",z),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};f=c.createElement("select"),g=f.appendChild(c.createElement("option")),h=a.getElementsByTagName("input")[0],j={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},h.checked=!0,j.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,j.optDisabled=!g.disabled;try{delete a.test}catch(s){j.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function b(){j.noCloneEvent=!1,a.detachEvent("onclick",b)}),a.cloneNode(!0).fireEvent("onclick")),h=c.createElement("input"),h.value="t",h.setAttribute("type","radio"),j.radioValue=h.value==="t",h.setAttribute("checked","checked"),a.appendChild(h),k=c.createDocumentFragment(),k.appendChild(a.firstChild),j.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",l=c.createElement("body"),m={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"};for(q in m)l.style[q]=m[q];l.appendChild(a),b.insertBefore(l,b.firstChild),j.appendChecked=h.checked,j.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,j.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",j.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",n=a.getElementsByTagName("td"),r=n[0].offsetHeight===0,n[0].style.display="",n[1].style.display="none",j.reliableHiddenOffsets=r&&n[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(i=c.createElement("div"),i.style.width="0",i.style.marginRight="0",a.appendChild(i),j.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(i,null)||{marginRight:0}).marginRight,10)||0)===0),l.innerHTML="",b.removeChild(l);if(a.attachEvent)for(q in{submit:1,change:1,focusin:1})p="on"+q,r=p in a,r||(a.setAttribute(p,"return;"),r=typeof a[p]=="function"),j[q+"Bubbles"]=r;return j}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:/,v,w;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.addClass(a.call(this,b,c.attr("class")||""))});if(a&&typeof a=="string"){var b=(a||"").split(o);for(var c=0,d=this.length;c<d;c++){var e=this[c];if(e.nodeType===1)if(!e.className)e.className=a;else{var g=" "+e.className+" ",h=e.className;for(var i=0,j=b.length;i<j;i++)g.indexOf(" "+b[i]+" ")<0&&(h+=" "+b[i]);e.className=f.trim(h)}}}return this},removeClass:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.removeClass(a.call(this,b,c.attr("class")))});if(a&&typeof a=="string"||a===b){var c=(a||"").split(o);for(var d=0,e=this.length;d<e;d++){var g=this[d];if(g.nodeType===1&&g.className)if(a){var h=(" "+g.className+" ").replace(n," ");for(var i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){var d=f(this);d.toggleClass(a.call(this,c,d.attr("class"),b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;return(e.value||"").replace(p,"")}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);c=j&&f.attrFix[c]||c,i=f.attrHooks[c],i||(!t.test(c)||typeof d!="boolean"&&d!==b&&d.toLowerCase()!==c.toLowerCase()?v&&(f.nodeName(a,"form")||u.test(c))&&(i=v):i=w);if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j)return i.get(a,c);h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);c=i&&f.propFix[c]||c,h=f.propHooks[c];return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return a[f.propFix[c]||c]?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=b),a.setAttribute(c,c.toLowerCase()));return c}},f.attrHooks.value={get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return a.value},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=Object.prototype.hasOwnProperty,y=/\.(.*)$/,z=/^(?:textarea|input|select)$/i,A=/\./g,B=/ /g,C=/[^\w\s.|`]/g,D=function(a){return a.replace(C,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=E;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=E);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),D).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem )});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,O(a.origType,a.selector),f.extend({},a,{handler:N,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,O(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?F:E):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=F;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=F;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=F,this.stopPropagation()},isDefaultPrevented:E,isPropagationStopped:E,isImmediatePropagationStopped:E};var G=function(a){var b=a.relatedTarget;a.type=a.data;try{if(b&&b!==c&&!b.parentNode)return;while(b&&b!==this)b=b.parentNode;b!==this&&f.event.handle.apply(this,arguments)}catch(d){}},H=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?H:G,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?H:G)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&L("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&L("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var I,J=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},K=function(c){var d=c.target,e,g;if(!!z.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=J(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:K,beforedeactivate:K,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&K.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&K.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",J(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in I)f.event.add(this,c+".specialChange",I[c]);return z.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return z.test(this.nodeName)}},I=f.event.special.change.filters,I.focus=I.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var M={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||E,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=y.exec(h),k="",j&&(k=j[0],h=h.replace(y,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,M[h]?(a.push(M[h]+k),h=h+k):h=(M[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+O(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+O(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var P=/Until$/,Q=/^(?:parents|prevUntil|prevAll)/,R=/,/,S=/^.[^:#\[\.,]*$/,T=Array.prototype.slice,U=f.expr.match.POS,V={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(X(this,a,!1),"not",a)},filter:function(a){return this.pushStack(X(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=U.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=U.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(W(c[0])||W(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=T.call(arguments);P.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!V[a]?f.unique(e):e,(this.length>1||R.test(d))&&Q.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var Y=/ jQuery\d+="(?:\d+|null)"/g,Z=/^\s+/,$=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,_=/<([\w:]+)/,ba=/<tbody/i,bb=/<|&#?\w+;/,bc=/<(?:script|object|embed|option|style)/i,bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Y,""):null;if(typeof a=="string"&&!bc.test(a)&&(f.support.leadingWhitespace||!Z.test(a))&&!bg[(_.exec(a)||["",""])[1].toLowerCase()]){a=a.replace($,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bh(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bn)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i=b&&b[0]?b[0].ownerDocument||b[0]:c;a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bc.test(a[0])&&(f.support.checkClone||!bd.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bj(a,d),e=bk(a),g=bk(d);for(h=0;e[h];++h)bj(e[h],g[h])}if(b){bi(a,d);if(c){e=bk(a),g=bk(d);for(h=0;e[h];++h)bi(e[h],g[h])}}return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument|| b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!bb.test(k))k=b.createTextNode(k);else{k=k.replace($,"<$1></$2>");var l=(_.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=ba.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Z.test(k)&&o.insertBefore(b.createTextNode(Z.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bm(k[i]);else bm(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bo=/alpha\([^)]*\)/i,bp=/opacity=([^)]*)/,bq=/-([a-z])/ig,br=/([A-Z]|^ms)/g,bs=/^-?\d+(?:px)?$/i,bt=/^-?\d/,bu=/^[+\-]=/,bv=/[^+\-\.\de]+/g,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB,bC=function(a,b){return b.toUpperCase()};f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{zIndex:!0,fontWeight:!0,opacity:!0,zoom:!0,lineHeight:!0,widows:!0,orphans:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bu.test(d)&&(d=+d.replace(bv,"")+parseFloat(f.css(a,c))),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]},camelCase:function(a){return a.replace(bq,bC)}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){a.offsetWidth!==0?e=bD(a,b,d):f.swap(a,bw,function(){e=bD(a,b,d)});if(e<=0){e=bz(a,b,b),e==="0px"&&bB&&(e=bB(a,b,b));if(e!=null)return e===""||e==="auto"?"0px":e}if(e<0||e==null){e=a.style[b];return e===""||e==="auto"?"0px":e}return typeof e=="string"?e:e+"px"}},set:function(a,b){if(!bs.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bp.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bo.test(g)?g.replace(bo,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,c){var d,e,g;c=c.replace(br,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bs.test(d)&&bt.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bE=/%20/g,bF=/\[\]$/,bG=/\r?\n/g,bH=/#.*$/,bI=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bJ=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bK=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bL=/^(?:GET|HEAD)$/,bM=/^\/\//,bN=/\?/,bO=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bP=/^(?:select|textarea)/i,bQ=/\s+/,bR=/([?&])_=[^&]*/,bS=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bT=f.fn.load,bU={},bV={},bW,bX;try{bW=e.href}catch(bY){bW=c.createElement("a"),bW.href="",bW=bW.href}bX=bS.exec(bW.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bT)return bT.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bO,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bP.test(this.nodeName)||bJ.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bG,"\r\n")}}):{name:b.name,value:c.replace(bG,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bW,isLocal:bK.test(bX[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bZ(bU),ajaxTransport:bZ(bV),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?ca(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=cb(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bI.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bH,"").replace(bM,bX[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bQ),d.crossDomain==null&&(r=bS.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bX[1]&&r[2]==bX[2]&&(r[3]||(r[1]==="http:"?80:443))==(bX[3]||(bX[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bU,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bL.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bN.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bR,"$1_="+x);d.url=y+(y===d.url?(bN.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bV,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bE,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq,cr=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cv(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cm.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=cn.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this),f.isFunction(d.old)&&d.old.call(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cq||cs(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!co&&(cr?(co=1,g=function(){co&&(cr(g),e.tick())},cr(g)):co=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cq||cs(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(co),co=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){return this[0]?parseFloat(f.css(this[0],d,"padding")):null},f.fn["outer"+c]=function(a){return this[0]?parseFloat(f.css(this[0],d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
main
<html> <head> <link href="/webstore/project.css" media="screen" rel="stylesheet" type="text/css"> <script src="/webstore/jquery.min.js" type="text/javascript"></script> </head> <body class="contents_centered"> <canvas width="480" height="320"></canvas> <script>BASE_URL = "../"; MTIME = "1314504483";</script> <script src="/SurfN-2-Sur5.js"></script> </body> </html>
project
/* line 17, ../../../../.rvm/gems/ruby-1.9.2-p180/bundler/gems/compass-91a748a91636/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* line 20, ../../../../.rvm/gems/ruby-1.9.2-p180/bundler/gems/compass-91a748a91636/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ body { line-height: 1; } /* line 22, ../../../../.rvm/gems/ruby-1.9.2-p180/bundler/gems/compass-91a748a91636/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ ol, ul { list-style: none; } /* line 24, ../../../../.rvm/gems/ruby-1.9.2-p180/bundler/gems/compass-91a748a91636/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ table { border-collapse: collapse; border-spacing: 0; } /* line 26, ../../../../.rvm/gems/ruby-1.9.2-p180/bundler/gems/compass-91a748a91636/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ caption, th, td { text-align: left; font-weight: normal; vertical-align: middle; } /* line 28, ../../../../.rvm/gems/ruby-1.9.2-p180/bundler/gems/compass-91a748a91636/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ q, blockquote { quotes: none; } /* line 101, ../../../../.rvm/gems/ruby-1.9.2-p180/bundler/gems/compass-91a748a91636/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ q:before, q:after, blockquote:before, blockquote:after { content: ""; content: none; } /* line 30, ../../../../.rvm/gems/ruby-1.9.2-p180/bundler/gems/compass-91a748a91636/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ a img { border: none; } /* line 114, ../../../../.rvm/gems/ruby-1.9.2-p180/bundler/gems/compass-91a748a91636/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary { display: block; } /* line 12, ../../app/assets/stylesheets/partials/_contents_centered.sass */ .contents_centered { position: relative; } /* line 4, ../../app/assets/stylesheets/partials/_contents_centered.sass */ .contents_centered > * { margin: auto; position: absolute; top: 0; bottom: 0; left: 0; right: 0; } /* line 8, ../../app/assets/stylesheets/partials/_ellipsis.sass */ .ellipsis { white-space: nowrap; overflow: hidden; -o-text-overflow: ellipsis; -ms-text-overflow: ellipsis; text-overflow: ellipsis; -moz-binding: url('/assets/xml/ellipsis.xml#ellipsis'); } /* line 5, ../../app/assets/stylesheets/project.sass */ html { background-color: #00010d; color: #b0d6ee; height: 100%; overflow: auto; } /* line 11, ../../app/assets/stylesheets/project.sass */ body { font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; font-size: 12px; line-height: 1.5; min-height: 100%; position: relative; }
Documentation
README
manifest
{ "name": "SurfN-2-Sur5", "description": "As a lone FBI agent you must surf to survive. Surf the seas and escape rocks, tides, and rogue waves.\r\n\r\nLeft and right arrow keys r", "app": { "launch": { "local_path": "webstore/main.html" } }, "version": "0.0.3", "icons": { "128": "webstore/images/icon_128.png", "96": "webstore/images/icon_96.png", "16": "webstore/images/icon_16.png" } }
pixie
{ "author": "STRd6", "name": "SurfN-2-Sur5", "libs": { "00_gamelib.js": "https://github.com/STRd6/gamelib/raw/pixie/gamelib.js", "browserlib.js": "https://github.com/STRd6/browserlib/raw/pixie/browserlib.js", "extralib.js": "https://github.com/STRd6/extralib/raw/pixie/extralib.js" }, "directories": { "lib": "lib", "source": "src", "test": "test" }, "width": 480, "height": 320 }
Package App for Chrome Web Store
Test SurfN-2-Sur5 (Extended Edition)
Rename
Delete
Choose an Export Method
Zip File
Packaged for Chrome Web Store
Embed Code
New File
Choose type
Script
Test
Image
Sound
${name}
Name
Create
File Importer
Drag files from your desktop here and we'll add them to your project.
Next
Show me how!