diff --git a/3ds/chat/dsi.php b/3ds/chat/dsi.php index ecd62a8..19e768e 100644 --- a/3ds/chat/dsi.php +++ b/3ds/chat/dsi.php @@ -35,6 +35,7 @@ if(isset($_GET["room"])){ background-color: ; } #chatscreen { + font-size: 10px; height: 160px; background-color: #ffffff; overflow-y: scroll; @@ -55,6 +56,9 @@ if(isset($_GET["room"])){ .whisper{ background-color: #00FFFF; } + b { + font-weight: heavy; + } @@ -212,7 +216,7 @@ if(isset($_GET["room"])){
- Back
+ Back
Loading chat...
diff --git a/3ds/copyleft.png b/3ds/copyleft.png new file mode 100644 index 0000000..f0400a5 Binary files /dev/null and b/3ds/copyleft.png differ diff --git a/3ds/forums/data/topic/0.json b/3ds/forums/data/topic/0.json index a79b207..7842089 100644 --- a/3ds/forums/data/topic/0.json +++ b/3ds/forums/data/topic/0.json @@ -1 +1 @@ -{"name":"General Beta","description":"General topic for all users to use (beta)","allowGuest":false,"posts":[{"title":"You can now post to the forums","from":"HxOr1337","cont":"Great news everyone, you can now post to the forms!\r\n\r\nThis is a test, unfortunately. :troll:","time":1651021306,"com":[]},{"title":"System Post","from":"System","cont":"wuzzup guise???","time":0,"com":[]},{"title":"Hey guys","from":"HxOr1337","cont":"Hey guys\n\n[code][\/code]","time":0,"com":[]},{"title":"test","from":"HxOr1337","cont":"test! testity test test test...\r\n\r\n\r\nballs","time":1651021123,"com":[]},{"title":"Post :D","from":"HxOr1337","cont":"Posting post post post 123","time":1651713046,"com":[]},{"title":"Posted from DSi","from":"DSi","cont":"This has been posted from DSi, :D","time":1651978343,"com":[]}]} \ No newline at end of file +{"name":"General Beta","description":"General topic for all users to use (beta)","allowGuest":false,"posts":[{"title":"You can now post to the forums","from":"HxOr1337","cont":"Great news everyone, you can now post to the forms!\r\n\r\nThis is a test, unfortunately. :troll:","time":1651021306,"com":[]},{"title":"System Post","from":"System","cont":"wuzzup guise???","time":0,"com":[]},{"title":"Hey guys","from":"HxOr1337","cont":"Hey guys\n\n[code][\/code]","time":0,"com":[]},{"title":"test","from":"HxOr1337","cont":"test! testity test test test...\r\n\r\n\r\nballs","time":1651021123,"com":[]},{"title":"Post :D","from":"HxOr1337","cont":"Posting post post post 123","time":1651713046,"com":[]},{"title":"Posted from DSi","from":"DSi","cont":"This has been posted from DSi, :D","time":1651978343,"com":[]},{"title":"We hit the min-width!","from":"DSi","cont":"Let's see what happens R:","time":1652213864,"com":[]}]} \ No newline at end of file diff --git a/3ds/games/cbr/data/1/info.php b/3ds/games/cbr/data/1/info.php index a9ecf78..be0b001 100644 --- a/3ds/games/cbr/data/1/info.php +++ b/3ds/games/cbr/data/1/info.php @@ -61,7 +61,16 @@ So the Auditor's text is based off of MC10, without the weird glitchy lines. Also, yes, that is hints of bluud -Madness Combat is owned by Krinkles"); +Madness Combat is owned by Krinkles", +"Hmmm + +This boy... + +He must have been in that bunker for days... + +n-ngh... + +Mr. Medic! Our new friend is awake!"); $pt = json_encode($pageText); ?> \ No newline at end of file diff --git a/3ds/games/cbr/polyfill.js b/3ds/games/cbr/polyfill.js index 7e26a3b..b25fb64 100644 --- a/3ds/games/cbr/polyfill.js +++ b/3ds/games/cbr/polyfill.js @@ -20,4 +20,1802 @@ Array.prototype.indexOf = (function(Object, max, min){ return -1; // if the value was not found, then return -1 }; })(Object, Math.max, Math.min); -} \ No newline at end of file +} + +// Other polyfills + +/* Polyfill service v3.111.0 + * For detailed credits and licence information see https://github.com/financial-times/polyfill-service. + * + * Features requested: CustomEvent,Event + * + * - _ESAbstract.Call, License: CC0 (required by "Event", "Array.prototype.includes", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive", "_ESAbstract.OrdinaryToPrimitive") + * - _ESAbstract.Get, License: CC0 (required by "Event", "Array.prototype.includes", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive", "_ESAbstract.OrdinaryToPrimitive") + * - _ESAbstract.HasProperty, License: CC0 (required by "Event", "Array.prototype.indexOf") + * - _ESAbstract.IsCallable, License: CC0 (required by "Event", "Array.prototype.includes", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive", "_ESAbstract.OrdinaryToPrimitive") + * - _ESAbstract.SameValueNonNumber, License: CC0 (required by "Event", "Array.prototype.includes", "_ESAbstract.SameValueZero") + * - _ESAbstract.ToObject, License: CC0 (required by "Event", "Array.prototype.includes", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive", "_ESAbstract.GetMethod", "_ESAbstract.GetV") + * - _ESAbstract.GetV, License: CC0 (required by "Event", "Array.prototype.includes", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive", "_ESAbstract.GetMethod") + * - _ESAbstract.GetMethod, License: CC0 (required by "Event", "Array.prototype.includes", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive") + * - _ESAbstract.Type, License: CC0 (required by "Event", "Array.prototype.includes", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive", "_ESAbstract.OrdinaryToPrimitive") + * - _ESAbstract.OrdinaryToPrimitive, License: CC0 (required by "Event", "Array.prototype.includes", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive") + * - _ESAbstract.SameValueZero, License: CC0 (required by "Event", "Array.prototype.includes") + * - _ESAbstract.ToInteger, License: CC0 (required by "Event", "Array.prototype.includes", "_ESAbstract.ToLength") + * - _ESAbstract.ToLength, License: CC0 (required by "Event", "Array.prototype.includes") + * - _ESAbstract.ToPrimitive, License: CC0 (required by "Event", "Array.prototype.includes", "_ESAbstract.ToString") + * - _ESAbstract.ToString, License: CC0 (required by "Event", "Array.prototype.includes") + * - document, License: CC0 (required by "Event", "Element") + * - Element, License: CC0 (required by "Event") + * - Object.defineProperty, License: CC0 (required by "Event", "Array.prototype.includes", "_ESAbstract.CreateMethodProperty") + * - _ESAbstract.CreateMethodProperty, License: CC0 (required by "Event", "Array.prototype.includes") + * - Array.prototype.includes, License: MIT (required by "Event") + * - Array.prototype.indexOf, License: CC0 (required by "Event") + * - Window, License: CC0 (required by "Event") + * - Event, License: CC0 */ + +(function(self, undefined) { + +// _ESAbstract.Call +/* global IsCallable */ +// 7.3.12. Call ( F, V [ , argumentsList ] ) +function Call(F, V /* [, argumentsList] */) { // eslint-disable-line no-unused-vars + // 1. If argumentsList is not present, set argumentsList to a new empty List. + var argumentsList = arguments.length > 2 ? arguments[2] : []; + // 2. If IsCallable(F) is false, throw a TypeError exception. + if (IsCallable(F) === false) { + throw new TypeError(Object.prototype.toString.call(F) + 'is not a function.'); + } + // 3. Return ? F.[[Call]](V, argumentsList). + return F.apply(V, argumentsList); +} + +// _ESAbstract.Get +// 7.3.1. Get ( O, P ) +function Get(O, P) { // eslint-disable-line no-unused-vars + // 1. Assert: Type(O) is Object. + // 2. Assert: IsPropertyKey(P) is true. + // 3. Return ? O.[[Get]](P, O). + return O[P]; +} + +// _ESAbstract.HasProperty +// 7.3.10. HasProperty ( O, P ) +function HasProperty(O, P) { // eslint-disable-line no-unused-vars + // Assert: Type(O) is Object. + // Assert: IsPropertyKey(P) is true. + // Return ? O.[[HasProperty]](P). + return P in O; +} + +// _ESAbstract.IsCallable +// 7.2.3. IsCallable ( argument ) +function IsCallable(argument) { // eslint-disable-line no-unused-vars + // 1. If Type(argument) is not Object, return false. + // 2. If argument has a [[Call]] internal method, return true. + // 3. Return false. + + // Polyfill.io - Only function objects have a [[Call]] internal method. This means we can simplify this function to check that the argument has a type of function. + return typeof argument === 'function'; +} + +// _ESAbstract.SameValueNonNumber +// 7.2.12. SameValueNonNumber ( x, y ) +function SameValueNonNumber(x, y) { // eslint-disable-line no-unused-vars + // 1. Assert: Type(x) is not Number. + // 2. Assert: Type(x) is the same as Type(y). + // 3. If Type(x) is Undefined, return true. + // 4. If Type(x) is Null, return true. + // 5. If Type(x) is String, then + // a. If x and y are exactly the same sequence of code units (same length and same code units at corresponding indices), return true; otherwise, return false. + // 6. If Type(x) is Boolean, then + // a. If x and y are both true or both false, return true; otherwise, return false. + // 7. If Type(x) is Symbol, then + // a. If x and y are both the same Symbol value, return true; otherwise, return false. + // 8. If x and y are the same Object value, return true. Otherwise, return false. + + // Polyfill.io - We can skip all above steps because the === operator does it all for us. + return x === y; +} + +// _ESAbstract.ToObject +// 7.1.13 ToObject ( argument ) +// The abstract operation ToObject converts argument to a value of type Object according to Table 12: +// Table 12: ToObject Conversions +/* +|----------------------------------------------------------------------------------------------------------------------------------------------------| +| Argument Type | Result | +|----------------------------------------------------------------------------------------------------------------------------------------------------| +| Undefined | Throw a TypeError exception. | +| Null | Throw a TypeError exception. | +| Boolean | Return a new Boolean object whose [[BooleanData]] internal slot is set to argument. See 19.3 for a description of Boolean objects. | +| Number | Return a new Number object whose [[NumberData]] internal slot is set to argument. See 20.1 for a description of Number objects. | +| String | Return a new String object whose [[StringData]] internal slot is set to argument. See 21.1 for a description of String objects. | +| Symbol | Return a new Symbol object whose [[SymbolData]] internal slot is set to argument. See 19.4 for a description of Symbol objects. | +| Object | Return argument. | +|----------------------------------------------------------------------------------------------------------------------------------------------------| +*/ +function ToObject(argument) { // eslint-disable-line no-unused-vars + if (argument === null || argument === undefined) { + throw TypeError(); + } + return Object(argument); +} + +// _ESAbstract.GetV +/* global ToObject */ +// 7.3.2 GetV (V, P) +function GetV(v, p) { // eslint-disable-line no-unused-vars + // 1. Assert: IsPropertyKey(P) is true. + // 2. Let O be ? ToObject(V). + var o = ToObject(v); + // 3. Return ? O.[[Get]](P, V). + return o[p]; +} + +// _ESAbstract.GetMethod +/* global GetV, IsCallable */ +// 7.3.9. GetMethod ( V, P ) +function GetMethod(V, P) { // eslint-disable-line no-unused-vars + // 1. Assert: IsPropertyKey(P) is true. + // 2. Let func be ? GetV(V, P). + var func = GetV(V, P); + // 3. If func is either undefined or null, return undefined. + if (func === null || func === undefined) { + return undefined; + } + // 4. If IsCallable(func) is false, throw a TypeError exception. + if (IsCallable(func) === false) { + throw new TypeError('Method not callable: ' + P); + } + // 5. Return func. + return func; +} + +// _ESAbstract.Type +// "Type(x)" is used as shorthand for "the type of x"... +function Type(x) { // eslint-disable-line no-unused-vars + switch (typeof x) { + case 'undefined': + return 'undefined'; + case 'boolean': + return 'boolean'; + case 'number': + return 'number'; + case 'string': + return 'string'; + case 'symbol': + return 'symbol'; + default: + // typeof null is 'object' + if (x === null) return 'null'; + // Polyfill.io - This is here because a Symbol polyfill will have a typeof `object`. + if ('Symbol' in self && (x instanceof self.Symbol || x.constructor === self.Symbol)) return 'symbol'; + + return 'object'; + } +} + +// _ESAbstract.OrdinaryToPrimitive +/* global Get, IsCallable, Call, Type */ +// 7.1.1.1. OrdinaryToPrimitive ( O, hint ) +function OrdinaryToPrimitive(O, hint) { // eslint-disable-line no-unused-vars + // 1. Assert: Type(O) is Object. + // 2. Assert: Type(hint) is String and its value is either "string" or "number". + // 3. If hint is "string", then + if (hint === 'string') { + // a. Let methodNames be « "toString", "valueOf" ». + var methodNames = ['toString', 'valueOf']; + // 4. Else, + } else { + // a. Let methodNames be « "valueOf", "toString" ». + methodNames = ['valueOf', 'toString']; + } + // 5. For each name in methodNames in List order, do + for (var i = 0; i < methodNames.length; ++i) { + var name = methodNames[i]; + // a. Let method be ? Get(O, name). + var method = Get(O, name); + // b. If IsCallable(method) is true, then + if (IsCallable(method)) { + // i. Let result be ? Call(method, O). + var result = Call(method, O); + // ii. If Type(result) is not Object, return result. + if (Type(result) !== 'object') { + return result; + } + } + } + // 6. Throw a TypeError exception. + throw new TypeError('Cannot convert to primitive.'); +} + +// _ESAbstract.SameValueZero +/* global Type, SameValueNonNumber */ +// 7.2.11. SameValueZero ( x, y ) +function SameValueZero (x, y) { // eslint-disable-line no-unused-vars + // 1. If Type(x) is different from Type(y), return false. + if (Type(x) !== Type(y)) { + return false; + } + // 2. If Type(x) is Number, then + if (Type(x) === 'number') { + // a. If x is NaN and y is NaN, return true. + if (isNaN(x) && isNaN(y)) { + return true; + } + // b. If x is +0 and y is -0, return true. + if (1/x === Infinity && 1/y === -Infinity) { + return true; + } + // c. If x is -0 and y is +0, return true. + if (1/x === -Infinity && 1/y === Infinity) { + return true; + } + // d. If x is the same Number value as y, return true. + if (x === y) { + return true; + } + // e. Return false. + return false; + } + // 3. Return SameValueNonNumber(x, y). + return SameValueNonNumber(x, y); +} + +// _ESAbstract.ToInteger +/* global Type */ +// 7.1.4. ToInteger ( argument ) +function ToInteger(argument) { // eslint-disable-line no-unused-vars + if (Type(argument) === 'symbol') { + throw new TypeError('Cannot convert a Symbol value to a number'); + } + + // 1. Let number be ? ToNumber(argument). + var number = Number(argument); + // 2. If number is NaN, return +0. + if (isNaN(number)) { + return 0; + } + // 3. If number is +0, -0, +∞, or -∞, return number. + if (1/number === Infinity || 1/number === -Infinity || number === Infinity || number === -Infinity) { + return number; + } + // 4. Return the number value that is the same sign as number and whose magnitude is floor(abs(number)). + return ((number < 0) ? -1 : 1) * Math.floor(Math.abs(number)); +} + +// _ESAbstract.ToLength +/* global ToInteger */ +// 7.1.15. ToLength ( argument ) +function ToLength(argument) { // eslint-disable-line no-unused-vars + // 1. Let len be ? ToInteger(argument). + var len = ToInteger(argument); + // 2. If len ≤ +0, return +0. + if (len <= 0) { + return 0; + } + // 3. Return min(len, 253-1). + return Math.min(len, Math.pow(2, 53) -1); +} + +// _ESAbstract.ToPrimitive +/* global Type, GetMethod, Call, OrdinaryToPrimitive */ +// 7.1.1. ToPrimitive ( input [ , PreferredType ] ) +function ToPrimitive(input /* [, PreferredType] */) { // eslint-disable-line no-unused-vars + var PreferredType = arguments.length > 1 ? arguments[1] : undefined; + // 1. Assert: input is an ECMAScript language value. + // 2. If Type(input) is Object, then + if (Type(input) === 'object') { + // a. If PreferredType is not present, let hint be "default". + if (arguments.length < 2) { + var hint = 'default'; + // b. Else if PreferredType is hint String, let hint be "string". + } else if (PreferredType === String) { + hint = 'string'; + // c. Else PreferredType is hint Number, let hint be "number". + } else if (PreferredType === Number) { + hint = 'number'; + } + // d. Let exoticToPrim be ? GetMethod(input, @@toPrimitive). + var exoticToPrim = typeof self.Symbol === 'function' && typeof self.Symbol.toPrimitive === 'symbol' ? GetMethod(input, self.Symbol.toPrimitive) : undefined; + // e. If exoticToPrim is not undefined, then + if (exoticToPrim !== undefined) { + // i. Let result be ? Call(exoticToPrim, input, « hint »). + var result = Call(exoticToPrim, input, [hint]); + // ii. If Type(result) is not Object, return result. + if (Type(result) !== 'object') { + return result; + } + // iii. Throw a TypeError exception. + throw new TypeError('Cannot convert exotic object to primitive.'); + } + // f. If hint is "default", set hint to "number". + if (hint === 'default') { + hint = 'number'; + } + // g. Return ? OrdinaryToPrimitive(input, hint). + return OrdinaryToPrimitive(input, hint); + } + // 3. Return input + return input; +} + +// _ESAbstract.ToString +/* global Type, ToPrimitive */ +// 7.1.12. ToString ( argument ) +// The abstract operation ToString converts argument to a value of type String according to Table 11: +// Table 11: ToString Conversions +/* +|---------------|--------------------------------------------------------| +| Argument Type | Result | +|---------------|--------------------------------------------------------| +| Undefined | Return "undefined". | +|---------------|--------------------------------------------------------| +| Null | Return "null". | +|---------------|--------------------------------------------------------| +| Boolean | If argument is true, return "true". | +| | If argument is false, return "false". | +|---------------|--------------------------------------------------------| +| Number | Return NumberToString(argument). | +|---------------|--------------------------------------------------------| +| String | Return argument. | +|---------------|--------------------------------------------------------| +| Symbol | Throw a TypeError exception. | +|---------------|--------------------------------------------------------| +| Object | Apply the following steps: | +| | Let primValue be ? ToPrimitive(argument, hint String). | +| | Return ? ToString(primValue). | +|---------------|--------------------------------------------------------| +*/ +function ToString(argument) { // eslint-disable-line no-unused-vars + switch(Type(argument)) { + case 'symbol': + throw new TypeError('Cannot convert a Symbol value to a string'); + case 'object': + var primValue = ToPrimitive(argument, String); + return ToString(primValue); // eslint-disable-line no-unused-vars + default: + return String(argument); + } +} + +// document +if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) { + + if (self.HTMLDocument) { // IE8 + + // HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter. + self.Document = self.HTMLDocument; + + } else { + + // Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made. + self.Document = self.HTMLDocument = document.constructor = (new Function('return function Document() {}')()); + self.Document.prototype = document; + } +} + +// Element +(function () { + + if ('Element' in self && 'HTMLElement' in self) { + return; + } + // IE8 + if (window.Element && !window.HTMLElement) { + window.HTMLElement = window.Element; + return; + } + + // create Element constructor + window.Element = window.HTMLElement = new Function('return function Element() {}')(); + + // generate sandboxed iframe + var vbody = document.appendChild(document.createElement('body')); + var frame = vbody.appendChild(document.createElement('iframe')); + + // use sandboxed iframe to replicate Element functionality + var frameDocument = frame.contentWindow.document; + var prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*')); + var cache = {}; + + // polyfill Element.prototype on an element + var shiv = function (element, deep) { + var + childNodes = element.childNodes || [], + index = -1, + key, value, childNode; + + if (element.nodeType === 1 && element.constructor !== Element) { + element.constructor = Element; + + for (key in cache) { + value = cache[key]; + element[key] = value; + } + } + + // eslint-disable-next-line no-cond-assign + while (childNode = deep && childNodes[++index]) { + shiv(childNode, deep); + } + + return element; + }; + + var elements = document.getElementsByTagName('*'); + var nativeCreateElement = document.createElement; + var interval; + var loopLimit = 100; + + prototype.attachEvent('onpropertychange', function (event) { + var + propertyName = event.propertyName, + nonValue = !Object.prototype.hasOwnProperty.call(cache, propertyName), + newValue = prototype[propertyName], + oldValue = cache[propertyName], + index = -1, + element; + + // eslint-disable-next-line no-cond-assign + while (element = elements[++index]) { + if (element.nodeType === 1) { + if (nonValue || element[propertyName] === oldValue) { + element[propertyName] = newValue; + } + } + } + + cache[propertyName] = newValue; + }); + + prototype.constructor = Element; + + if (!prototype.hasAttribute) { + // .hasAttribute + prototype.hasAttribute = function hasAttribute(name) { + return this.getAttribute(name) !== null; + }; + } + + // Apply Element prototype to the pre-existing DOM as soon as the body element appears. + function bodyCheck() { + if (!(loopLimit--)) clearTimeout(interval); + if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) { + shiv(document, true); + if (interval && document.body.prototype) clearTimeout(interval); + return (!!document.body.prototype); + } + return false; + } + if (!bodyCheck()) { + document.onreadystatechange = bodyCheck; + interval = setInterval(bodyCheck, 25); + } + + // Apply to any new elements created after load + document.createElement = function createElement(nodeName) { + var element = nativeCreateElement(String(nodeName).toLowerCase()); + return shiv(element); + }; + + // remove sandboxed iframe + document.removeChild(vbody); +}()); + +// Object.defineProperty +(function (nativeDefineProperty) { + + var supportsAccessors = Object.prototype.hasOwnProperty.call(Object.prototype, '__defineGetter__'); + var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine'; + var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value'; + + // Polyfill.io - This does not use CreateMethodProperty because our CreateMethodProperty function uses Object.defineProperty. + Object.defineProperty = function defineProperty(object, property, descriptor) { + + // Where native support exists, assume it + if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) { + return nativeDefineProperty(object, property, descriptor); + } + + if (object === null || !(object instanceof Object || typeof object === 'object')) { + throw new TypeError('Object.defineProperty called on non-object'); + } + + if (!(descriptor instanceof Object)) { + throw new TypeError('Property description must be an object'); + } + + var propertyString = String(property); + var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor; + var getterType = 'get' in descriptor && typeof descriptor.get; + var setterType = 'set' in descriptor && typeof descriptor.set; + + // handle descriptor.get + if (getterType) { + if (getterType === undefined) { + return object; + } + if (getterType !== 'function') { + throw new TypeError('Getter must be a function'); + } + if (!supportsAccessors) { + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); + } + if (hasValueOrWritable) { + throw new TypeError(ERR_VALUE_ACCESSORS); + } + Object.__defineGetter__.call(object, propertyString, descriptor.get); + } else { + object[propertyString] = descriptor.value; + } + + // handle descriptor.set + if (setterType) { + if (setterType === undefined) { + return object; + } + if (setterType !== 'function') { + throw new TypeError('Setter must be a function'); + } + if (!supportsAccessors) { + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); + } + if (hasValueOrWritable) { + throw new TypeError(ERR_VALUE_ACCESSORS); + } + Object.__defineSetter__.call(object, propertyString, descriptor.set); + } + + // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above + if ('value' in descriptor) { + object[propertyString] = descriptor.value; + } + + return object; + }; +}(Object.defineProperty)); + +// _ESAbstract.CreateMethodProperty +// 7.3.5. CreateMethodProperty ( O, P, V ) +function CreateMethodProperty(O, P, V) { // eslint-disable-line no-unused-vars + // 1. Assert: Type(O) is Object. + // 2. Assert: IsPropertyKey(P) is true. + // 3. Let newDesc be the PropertyDescriptor{[[Value]]: V, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}. + var newDesc = { + value: V, + writable: true, + enumerable: false, + configurable: true + }; + // 4. Return ? O.[[DefineOwnProperty]](P, newDesc). + Object.defineProperty(O, P, newDesc); +} + +// Array.prototype.includes +/* global CreateMethodProperty, Get, SameValueZero, ToInteger, ToLength, ToObject, ToString */ +// 22.1.3.11. Array.prototype.includes ( searchElement [ , fromIndex ] ) +CreateMethodProperty(Array.prototype, 'includes', function includes(searchElement /* [ , fromIndex ] */) { + 'use strict'; + // 1. Let O be ? ToObject(this value). + var O = ToObject(this); + // 2. Let len be ? ToLength(? Get(O, "length")). + var len = ToLength(Get(O, "length")); + // 3. If len is 0, return false. + if (len === 0) { + return false; + } + // 4. Let n be ? ToInteger(fromIndex). (If fromIndex is undefined, this step produces the value 0.) + var n = ToInteger(arguments[1]); + // 5. If n ≥ 0, then + if (n >= 0) { + // a. Let k be n. + var k = n; + // 6. Else n < 0, + } else { + // a. Let k be len + n. + k = len + n; + // b. If k < 0, let k be 0. + if (k < 0) { + k = 0; + } + } + // 7. Repeat, while k < len + while (k < len) { + // a. Let elementK be the result of ? Get(O, ! ToString(k)). + var elementK = Get(O, ToString(k)); + // b. If SameValueZero(searchElement, elementK) is true, return true. + if (SameValueZero(searchElement, elementK)) { + return true; + } + // c. Increase k by 1. + k = k + 1; + } + // 8. Return false. + return false; +}); + +// Array.prototype.indexOf +/* global CreateMethodProperty, Get, HasProperty, ToInteger, ToLength, ToObject, ToString */ +// 22.1.3.12. Array.prototype.indexOf ( searchElement [ , fromIndex ] ) +CreateMethodProperty(Array.prototype, 'indexOf', function indexOf(searchElement /* [ , fromIndex ] */) { + // 1. Let O be ? ToObject(this value). + var O = ToObject(this); + // 2. Let len be ? ToLength(? Get(O, "length")). + var len = ToLength(Get(O, "length")); + // 3. If len is 0, return -1. + if (len === 0) { + return -1; + } + // 4. Let n be ? ToInteger(fromIndex). (If fromIndex is undefined, this step produces the value 0.) + var n = ToInteger(arguments[1]); + // 5. If n ≥ len, return -1. + if (n >= len) { + return -1; + } + // 6. If n ≥ 0, then + if (n >= 0) { + // a. If n is -0, let k be +0; else let k be n. + var k = 1/n === -Infinity ? 0 : n; + // 7. Else n < 0, + } else { + // a. Let k be len + n. + k = len + n; + // b. If k < 0, let k be 0. + if (k < 0) { + k = 0; + } + } + // 8. Repeat, while k < len + while (k < len) { + // a. Let kPresent be ? HasProperty(O, ! ToString(k)). + var kPresent = HasProperty(O, ToString(k)); + // b. If kPresent is true, then + if (kPresent) { + // i. Let elementK be ? Get(O, ! ToString(k)). + var elementK = Get(O, ToString(k)); + // ii. Let same be the result of performing Strict Equality Comparison searchElement === elementK. + var same = searchElement === elementK; + // iii. If same is true, return k. + if (same) { + return k; + } + } + // c. Increase k by 1. + k = k + 1; + } + // 9. Return -1. + return -1; +}); + +// Window +if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) { + (function (global) { + if (global.constructor) { + global.Window = global.constructor; + } else { + (global.Window = global.constructor = new Function('return function Window() {}')()).prototype = self; + } + }(self)); +} + +// Event +(function () { + var unlistenableWindowEvents = { + click: 1, + dblclick: 1, + keyup: 1, + keypress: 1, + keydown: 1, + mousedown: 1, + mouseup: 1, + mousemove: 1, + mouseover: 1, + mouseenter: 1, + mouseleave: 1, + mouseout: 1, + storage: 1, + storagecommit: 1, + textinput: 1 + }; + + // This polyfill depends on availability of `document` so will not run in a worker + // However, we asssume there are no browsers with worker support that lack proper + // support for `Event` within the worker + if (typeof document === 'undefined' || typeof window === 'undefined') return; + + var existingProto = (window.Event && window.Event.prototype) || null; + function Event(type, eventInitDict) { + if (!type) { + throw new Error('Not enough arguments'); + } + + var event; + // Shortcut if browser supports createEvent + if ('createEvent' in document) { + event = document.createEvent('Event'); + var bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false; + var cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false; + + event.initEvent(type, bubbles, cancelable); + + return event; + } + + event = document.createEventObject(); + + event.type = type; + event.bubbles = eventInitDict && eventInitDict.bubbles !== undefined ? eventInitDict.bubbles : false; + event.cancelable = eventInitDict && eventInitDict.cancelable !== undefined ? eventInitDict.cancelable : false; + + return event; + } + Event.NONE = 0; + Event.CAPTURING_PHASE = 1; + Event.AT_TARGET = 2; + Event.BUBBLING_PHASE = 3; + window.Event = Window.prototype.Event = Event; + if (existingProto) { + Object.defineProperty(window.Event, 'prototype', { + configurable: false, + enumerable: false, + writable: true, + value: existingProto + }); + } + + if (!('createEvent' in document)) { + window.addEventListener = Window.prototype.addEventListener = Document.prototype.addEventListener = Element.prototype.addEventListener = function addEventListener() { + var + element = this, + type = arguments[0], + listener = arguments[1]; + + if (element === window && type in unlistenableWindowEvents) { + throw new Error('In IE8 the event: ' + type + ' is not available on the window object. Please see https://github.com/Financial-Times/polyfill-service/issues/317 for more information.'); + } + + if (!element._events) { + element._events = {}; + } + + if (!element._events[type]) { + element._events[type] = function (event) { + var + list = element._events[event.type].list, + events = list.slice(), + index = -1, + length = events.length, + eventElement; + + event.preventDefault = function preventDefault() { + if (event.cancelable !== false) { + event.returnValue = false; + } + }; + + event.stopPropagation = function stopPropagation() { + event.cancelBubble = true; + }; + + event.stopImmediatePropagation = function stopImmediatePropagation() { + event.cancelBubble = true; + event.cancelImmediate = true; + }; + + event.currentTarget = element; + event.relatedTarget = event.fromElement || null; + event.target = event.target || event.srcElement || element; + event.timeStamp = new Date().getTime(); + + if (event.clientX) { + event.pageX = event.clientX + document.documentElement.scrollLeft; + event.pageY = event.clientY + document.documentElement.scrollTop; + } + + while (++index < length && !event.cancelImmediate) { + if (index in events) { + eventElement = events[index]; + + if (list.includes(eventElement) && typeof eventElement === 'function') { + eventElement.call(element, event); + } + } + } + }; + + element._events[type].list = []; + + if (element.attachEvent) { + element.attachEvent('on' + type, element._events[type]); + } + } + + element._events[type].list.push(listener); + }; + + window.removeEventListener = Window.prototype.removeEventListener = Document.prototype.removeEventListener = Element.prototype.removeEventListener = function removeEventListener() { + var + element = this, + type = arguments[0], + listener = arguments[1], + index; + + if (element._events && element._events[type] && element._events[type].list) { + index = element._events[type].list.indexOf(listener); + + if (index !== -1) { + element._events[type].list.splice(index, 1); + + if (!element._events[type].list.length) { + if (element.detachEvent) { + element.detachEvent('on' + type, element._events[type]); + } + delete element._events[type]; + } + } + } + }; + + window.dispatchEvent = Window.prototype.dispatchEvent = Document.prototype.dispatchEvent = Element.prototype.dispatchEvent = function dispatchEvent(event) { + if (!arguments.length) { + throw new Error('Not enough arguments'); + } + + if (!event || typeof event.type !== 'string') { + throw new Error('DOM Events Exception 0'); + } + + var element = this, type = event.type; + + try { + if (!event.bubbles) { + event.cancelBubble = true; + + var cancelBubbleEvent = function (event) { + event.cancelBubble = true; + + (element || window).detachEvent('on' + type, cancelBubbleEvent); + }; + + this.attachEvent('on' + type, cancelBubbleEvent); + } + + this.fireEvent('on' + type, event); + } catch (error) { + event.target = element; + + do { + event.currentTarget = element; + + if ('_events' in element && typeof element._events[type] === 'function') { + element._events[type].call(element, event); + } + + if (typeof element['on' + type] === 'function') { + element['on' + type].call(element, event); + } + + element = element.nodeType === 9 ? element.parentWindow : element.parentNode; + } while (element && !event.cancelBubble); + } + + return true; + }; + + // Add the DOMContentLoaded Event + document.attachEvent('onreadystatechange', function() { + if (document.readyState === 'complete') { + document.dispatchEvent(new Event('DOMContentLoaded', { + bubbles: true + })); + } + }); + } +}()); +}) +('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); + + +/* Polyfill service v3.111.0 + * For detailed credits and licence information see https://github.com/financial-times/polyfill-service. + * + * Features requested: Element.prototype.classList + * + * - _ESAbstract.Call, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive", "_ESAbstract.OrdinaryToPrimitive") + * - _ESAbstract.Get, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive", "_ESAbstract.OrdinaryToPrimitive") + * - _ESAbstract.HasProperty, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach") + * - _ESAbstract.IsCallable, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive", "_ESAbstract.OrdinaryToPrimitive") + * - _ESAbstract.ToObject, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive", "_ESAbstract.GetMethod", "_ESAbstract.GetV") + * - _ESAbstract.GetV, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive", "_ESAbstract.GetMethod") + * - _ESAbstract.GetMethod, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive") + * - _ESAbstract.Type, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive", "_ESAbstract.OrdinaryToPrimitive") + * - _ESAbstract.OrdinaryToPrimitive, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach", "_ESAbstract.ToString", "_ESAbstract.ToPrimitive") + * - _ESAbstract.ToInteger, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach", "_ESAbstract.ToLength") + * - _ESAbstract.ToLength, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach") + * - _ESAbstract.ToPrimitive, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach", "_ESAbstract.ToString") + * - _ESAbstract.ToString, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach") + * - document, License: CC0 (required by "Element.prototype.classList", "Element") + * - Element, License: CC0 (required by "Element.prototype.classList") + * - Object.defineProperty, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach", "_ESAbstract.CreateMethodProperty") + * - _ESAbstract.CreateMethodProperty, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList", "Array.prototype.forEach") + * - Array.prototype.forEach, License: CC0 (required by "Element.prototype.classList", "DOMTokenList", "_DOMTokenList") + * - _DOMTokenList, License: ISC (required by "Element.prototype.classList", "DOMTokenList") + * - DOMTokenList, License: CC0 (required by "Element.prototype.classList") + * - Element.prototype.classList, License: ISC */ + +(function(self, undefined) { + +// _ESAbstract.Call +/* global IsCallable */ +// 7.3.12. Call ( F, V [ , argumentsList ] ) +function Call(F, V /* [, argumentsList] */) { // eslint-disable-line no-unused-vars + // 1. If argumentsList is not present, set argumentsList to a new empty List. + var argumentsList = arguments.length > 2 ? arguments[2] : []; + // 2. If IsCallable(F) is false, throw a TypeError exception. + if (IsCallable(F) === false) { + throw new TypeError(Object.prototype.toString.call(F) + 'is not a function.'); + } + // 3. Return ? F.[[Call]](V, argumentsList). + return F.apply(V, argumentsList); +} + +// _ESAbstract.Get +// 7.3.1. Get ( O, P ) +function Get(O, P) { // eslint-disable-line no-unused-vars + // 1. Assert: Type(O) is Object. + // 2. Assert: IsPropertyKey(P) is true. + // 3. Return ? O.[[Get]](P, O). + return O[P]; +} + +// _ESAbstract.HasProperty +// 7.3.10. HasProperty ( O, P ) +function HasProperty(O, P) { // eslint-disable-line no-unused-vars + // Assert: Type(O) is Object. + // Assert: IsPropertyKey(P) is true. + // Return ? O.[[HasProperty]](P). + return P in O; +} + +// _ESAbstract.IsCallable +// 7.2.3. IsCallable ( argument ) +function IsCallable(argument) { // eslint-disable-line no-unused-vars + // 1. If Type(argument) is not Object, return false. + // 2. If argument has a [[Call]] internal method, return true. + // 3. Return false. + + // Polyfill.io - Only function objects have a [[Call]] internal method. This means we can simplify this function to check that the argument has a type of function. + return typeof argument === 'function'; +} + +// _ESAbstract.ToObject +// 7.1.13 ToObject ( argument ) +// The abstract operation ToObject converts argument to a value of type Object according to Table 12: +// Table 12: ToObject Conversions +/* +|----------------------------------------------------------------------------------------------------------------------------------------------------| +| Argument Type | Result | +|----------------------------------------------------------------------------------------------------------------------------------------------------| +| Undefined | Throw a TypeError exception. | +| Null | Throw a TypeError exception. | +| Boolean | Return a new Boolean object whose [[BooleanData]] internal slot is set to argument. See 19.3 for a description of Boolean objects. | +| Number | Return a new Number object whose [[NumberData]] internal slot is set to argument. See 20.1 for a description of Number objects. | +| String | Return a new String object whose [[StringData]] internal slot is set to argument. See 21.1 for a description of String objects. | +| Symbol | Return a new Symbol object whose [[SymbolData]] internal slot is set to argument. See 19.4 for a description of Symbol objects. | +| Object | Return argument. | +|----------------------------------------------------------------------------------------------------------------------------------------------------| +*/ +function ToObject(argument) { // eslint-disable-line no-unused-vars + if (argument === null || argument === undefined) { + throw TypeError(); + } + return Object(argument); +} + +// _ESAbstract.GetV +/* global ToObject */ +// 7.3.2 GetV (V, P) +function GetV(v, p) { // eslint-disable-line no-unused-vars + // 1. Assert: IsPropertyKey(P) is true. + // 2. Let O be ? ToObject(V). + var o = ToObject(v); + // 3. Return ? O.[[Get]](P, V). + return o[p]; +} + +// _ESAbstract.GetMethod +/* global GetV, IsCallable */ +// 7.3.9. GetMethod ( V, P ) +function GetMethod(V, P) { // eslint-disable-line no-unused-vars + // 1. Assert: IsPropertyKey(P) is true. + // 2. Let func be ? GetV(V, P). + var func = GetV(V, P); + // 3. If func is either undefined or null, return undefined. + if (func === null || func === undefined) { + return undefined; + } + // 4. If IsCallable(func) is false, throw a TypeError exception. + if (IsCallable(func) === false) { + throw new TypeError('Method not callable: ' + P); + } + // 5. Return func. + return func; +} + +// _ESAbstract.Type +// "Type(x)" is used as shorthand for "the type of x"... +function Type(x) { // eslint-disable-line no-unused-vars + switch (typeof x) { + case 'undefined': + return 'undefined'; + case 'boolean': + return 'boolean'; + case 'number': + return 'number'; + case 'string': + return 'string'; + case 'symbol': + return 'symbol'; + default: + // typeof null is 'object' + if (x === null) return 'null'; + // Polyfill.io - This is here because a Symbol polyfill will have a typeof `object`. + if ('Symbol' in self && (x instanceof self.Symbol || x.constructor === self.Symbol)) return 'symbol'; + + return 'object'; + } +} + +// _ESAbstract.OrdinaryToPrimitive +/* global Get, IsCallable, Call, Type */ +// 7.1.1.1. OrdinaryToPrimitive ( O, hint ) +function OrdinaryToPrimitive(O, hint) { // eslint-disable-line no-unused-vars + // 1. Assert: Type(O) is Object. + // 2. Assert: Type(hint) is String and its value is either "string" or "number". + // 3. If hint is "string", then + if (hint === 'string') { + // a. Let methodNames be « "toString", "valueOf" ». + var methodNames = ['toString', 'valueOf']; + // 4. Else, + } else { + // a. Let methodNames be « "valueOf", "toString" ». + methodNames = ['valueOf', 'toString']; + } + // 5. For each name in methodNames in List order, do + for (var i = 0; i < methodNames.length; ++i) { + var name = methodNames[i]; + // a. Let method be ? Get(O, name). + var method = Get(O, name); + // b. If IsCallable(method) is true, then + if (IsCallable(method)) { + // i. Let result be ? Call(method, O). + var result = Call(method, O); + // ii. If Type(result) is not Object, return result. + if (Type(result) !== 'object') { + return result; + } + } + } + // 6. Throw a TypeError exception. + throw new TypeError('Cannot convert to primitive.'); +} + +// _ESAbstract.ToInteger +/* global Type */ +// 7.1.4. ToInteger ( argument ) +function ToInteger(argument) { // eslint-disable-line no-unused-vars + if (Type(argument) === 'symbol') { + throw new TypeError('Cannot convert a Symbol value to a number'); + } + + // 1. Let number be ? ToNumber(argument). + var number = Number(argument); + // 2. If number is NaN, return +0. + if (isNaN(number)) { + return 0; + } + // 3. If number is +0, -0, +∞, or -∞, return number. + if (1/number === Infinity || 1/number === -Infinity || number === Infinity || number === -Infinity) { + return number; + } + // 4. Return the number value that is the same sign as number and whose magnitude is floor(abs(number)). + return ((number < 0) ? -1 : 1) * Math.floor(Math.abs(number)); +} + +// _ESAbstract.ToLength +/* global ToInteger */ +// 7.1.15. ToLength ( argument ) +function ToLength(argument) { // eslint-disable-line no-unused-vars + // 1. Let len be ? ToInteger(argument). + var len = ToInteger(argument); + // 2. If len ≤ +0, return +0. + if (len <= 0) { + return 0; + } + // 3. Return min(len, 253-1). + return Math.min(len, Math.pow(2, 53) -1); +} + +// _ESAbstract.ToPrimitive +/* global Type, GetMethod, Call, OrdinaryToPrimitive */ +// 7.1.1. ToPrimitive ( input [ , PreferredType ] ) +function ToPrimitive(input /* [, PreferredType] */) { // eslint-disable-line no-unused-vars + var PreferredType = arguments.length > 1 ? arguments[1] : undefined; + // 1. Assert: input is an ECMAScript language value. + // 2. If Type(input) is Object, then + if (Type(input) === 'object') { + // a. If PreferredType is not present, let hint be "default". + if (arguments.length < 2) { + var hint = 'default'; + // b. Else if PreferredType is hint String, let hint be "string". + } else if (PreferredType === String) { + hint = 'string'; + // c. Else PreferredType is hint Number, let hint be "number". + } else if (PreferredType === Number) { + hint = 'number'; + } + // d. Let exoticToPrim be ? GetMethod(input, @@toPrimitive). + var exoticToPrim = typeof self.Symbol === 'function' && typeof self.Symbol.toPrimitive === 'symbol' ? GetMethod(input, self.Symbol.toPrimitive) : undefined; + // e. If exoticToPrim is not undefined, then + if (exoticToPrim !== undefined) { + // i. Let result be ? Call(exoticToPrim, input, « hint »). + var result = Call(exoticToPrim, input, [hint]); + // ii. If Type(result) is not Object, return result. + if (Type(result) !== 'object') { + return result; + } + // iii. Throw a TypeError exception. + throw new TypeError('Cannot convert exotic object to primitive.'); + } + // f. If hint is "default", set hint to "number". + if (hint === 'default') { + hint = 'number'; + } + // g. Return ? OrdinaryToPrimitive(input, hint). + return OrdinaryToPrimitive(input, hint); + } + // 3. Return input + return input; +} + +// _ESAbstract.ToString +/* global Type, ToPrimitive */ +// 7.1.12. ToString ( argument ) +// The abstract operation ToString converts argument to a value of type String according to Table 11: +// Table 11: ToString Conversions +/* +|---------------|--------------------------------------------------------| +| Argument Type | Result | +|---------------|--------------------------------------------------------| +| Undefined | Return "undefined". | +|---------------|--------------------------------------------------------| +| Null | Return "null". | +|---------------|--------------------------------------------------------| +| Boolean | If argument is true, return "true". | +| | If argument is false, return "false". | +|---------------|--------------------------------------------------------| +| Number | Return NumberToString(argument). | +|---------------|--------------------------------------------------------| +| String | Return argument. | +|---------------|--------------------------------------------------------| +| Symbol | Throw a TypeError exception. | +|---------------|--------------------------------------------------------| +| Object | Apply the following steps: | +| | Let primValue be ? ToPrimitive(argument, hint String). | +| | Return ? ToString(primValue). | +|---------------|--------------------------------------------------------| +*/ +function ToString(argument) { // eslint-disable-line no-unused-vars + switch(Type(argument)) { + case 'symbol': + throw new TypeError('Cannot convert a Symbol value to a string'); + case 'object': + var primValue = ToPrimitive(argument, String); + return ToString(primValue); // eslint-disable-line no-unused-vars + default: + return String(argument); + } +} + +// document +if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) { + + if (self.HTMLDocument) { // IE8 + + // HTMLDocument is an extension of Document. If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter. + self.Document = self.HTMLDocument; + + } else { + + // Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype. The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made. + self.Document = self.HTMLDocument = document.constructor = (new Function('return function Document() {}')()); + self.Document.prototype = document; + } +} + +// Element +(function () { + + if ('Element' in self && 'HTMLElement' in self) { + return; + } + // IE8 + if (window.Element && !window.HTMLElement) { + window.HTMLElement = window.Element; + return; + } + + // create Element constructor + window.Element = window.HTMLElement = new Function('return function Element() {}')(); + + // generate sandboxed iframe + var vbody = document.appendChild(document.createElement('body')); + var frame = vbody.appendChild(document.createElement('iframe')); + + // use sandboxed iframe to replicate Element functionality + var frameDocument = frame.contentWindow.document; + var prototype = Element.prototype = frameDocument.appendChild(frameDocument.createElement('*')); + var cache = {}; + + // polyfill Element.prototype on an element + var shiv = function (element, deep) { + var + childNodes = element.childNodes || [], + index = -1, + key, value, childNode; + + if (element.nodeType === 1 && element.constructor !== Element) { + element.constructor = Element; + + for (key in cache) { + value = cache[key]; + element[key] = value; + } + } + + // eslint-disable-next-line no-cond-assign + while (childNode = deep && childNodes[++index]) { + shiv(childNode, deep); + } + + return element; + }; + + var elements = document.getElementsByTagName('*'); + var nativeCreateElement = document.createElement; + var interval; + var loopLimit = 100; + + prototype.attachEvent('onpropertychange', function (event) { + var + propertyName = event.propertyName, + nonValue = !Object.prototype.hasOwnProperty.call(cache, propertyName), + newValue = prototype[propertyName], + oldValue = cache[propertyName], + index = -1, + element; + + // eslint-disable-next-line no-cond-assign + while (element = elements[++index]) { + if (element.nodeType === 1) { + if (nonValue || element[propertyName] === oldValue) { + element[propertyName] = newValue; + } + } + } + + cache[propertyName] = newValue; + }); + + prototype.constructor = Element; + + if (!prototype.hasAttribute) { + // .hasAttribute + prototype.hasAttribute = function hasAttribute(name) { + return this.getAttribute(name) !== null; + }; + } + + // Apply Element prototype to the pre-existing DOM as soon as the body element appears. + function bodyCheck() { + if (!(loopLimit--)) clearTimeout(interval); + if (document.body && !document.body.prototype && /(complete|interactive)/.test(document.readyState)) { + shiv(document, true); + if (interval && document.body.prototype) clearTimeout(interval); + return (!!document.body.prototype); + } + return false; + } + if (!bodyCheck()) { + document.onreadystatechange = bodyCheck; + interval = setInterval(bodyCheck, 25); + } + + // Apply to any new elements created after load + document.createElement = function createElement(nodeName) { + var element = nativeCreateElement(String(nodeName).toLowerCase()); + return shiv(element); + }; + + // remove sandboxed iframe + document.removeChild(vbody); +}()); + +// Object.defineProperty +(function (nativeDefineProperty) { + + var supportsAccessors = Object.prototype.hasOwnProperty.call(Object.prototype, '__defineGetter__'); + var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine'; + var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value'; + + // Polyfill.io - This does not use CreateMethodProperty because our CreateMethodProperty function uses Object.defineProperty. + Object.defineProperty = function defineProperty(object, property, descriptor) { + + // Where native support exists, assume it + if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) { + return nativeDefineProperty(object, property, descriptor); + } + + if (object === null || !(object instanceof Object || typeof object === 'object')) { + throw new TypeError('Object.defineProperty called on non-object'); + } + + if (!(descriptor instanceof Object)) { + throw new TypeError('Property description must be an object'); + } + + var propertyString = String(property); + var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor; + var getterType = 'get' in descriptor && typeof descriptor.get; + var setterType = 'set' in descriptor && typeof descriptor.set; + + // handle descriptor.get + if (getterType) { + if (getterType === undefined) { + return object; + } + if (getterType !== 'function') { + throw new TypeError('Getter must be a function'); + } + if (!supportsAccessors) { + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); + } + if (hasValueOrWritable) { + throw new TypeError(ERR_VALUE_ACCESSORS); + } + Object.__defineGetter__.call(object, propertyString, descriptor.get); + } else { + object[propertyString] = descriptor.value; + } + + // handle descriptor.set + if (setterType) { + if (setterType === undefined) { + return object; + } + if (setterType !== 'function') { + throw new TypeError('Setter must be a function'); + } + if (!supportsAccessors) { + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); + } + if (hasValueOrWritable) { + throw new TypeError(ERR_VALUE_ACCESSORS); + } + Object.__defineSetter__.call(object, propertyString, descriptor.set); + } + + // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above + if ('value' in descriptor) { + object[propertyString] = descriptor.value; + } + + return object; + }; +}(Object.defineProperty)); + +// _ESAbstract.CreateMethodProperty +// 7.3.5. CreateMethodProperty ( O, P, V ) +function CreateMethodProperty(O, P, V) { // eslint-disable-line no-unused-vars + // 1. Assert: Type(O) is Object. + // 2. Assert: IsPropertyKey(P) is true. + // 3. Let newDesc be the PropertyDescriptor{[[Value]]: V, [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true}. + var newDesc = { + value: V, + writable: true, + enumerable: false, + configurable: true + }; + // 4. Return ? O.[[DefineOwnProperty]](P, newDesc). + Object.defineProperty(O, P, newDesc); +} + +// Array.prototype.forEach +/* global Call, CreateMethodProperty, Get, HasProperty, IsCallable, ToLength, ToObject, ToString */ +// 22.1.3.10. Array.prototype.forEach ( callbackfn [ , thisArg ] ) +CreateMethodProperty(Array.prototype, 'forEach', function forEach(callbackfn /* [ , thisArg ] */) { + // 1. Let O be ? ToObject(this value). + var O = ToObject(this); + // Polyfill.io - If O is a String object, split it into an array in order to iterate correctly. + // We will use arrayLike in place of O when we are iterating through the list. + var arraylike = O instanceof String ? O.split('') : O; + // 2. Let len be ? ToLength(? Get(O, "length")). + var len = ToLength(Get(O, "length")); + // 3. If IsCallable(callbackfn) is false, throw a TypeError exception. + if (IsCallable(callbackfn) === false) { + throw new TypeError(callbackfn + ' is not a function'); + } + // 4. If thisArg is present, let T be thisArg; else let T be undefined. + var T = arguments.length > 1 ? arguments[1] : undefined; + // 5. Let k be 0. + var k = 0; + // 6. Repeat, while k < len + while (k < len) { + // a. Let Pk be ! ToString(k). + var Pk = ToString(k); + // b. Let kPresent be ? HasProperty(O, Pk). + var kPresent = HasProperty(arraylike, Pk); + // c. If kPresent is true, then + if (kPresent) { + // i. Let kValue be ? Get(O, Pk). + var kValue = Get(arraylike, Pk); + // ii. Perform ? Call(callbackfn, T, « kValue, k, O »). + Call(callbackfn, T, [kValue, k, O]); + } + // d. Increase k by 1. + k = k + 1; + } + // 7. Return undefined. + return undefined; +}); + +// _DOMTokenList +/* +Copyright (c) 2016, John Gardner + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ +var _DOMTokenList = (function() { // eslint-disable-line no-unused-vars + var dpSupport = true; + var defineGetter = function (object, name, fn, configurable) { + if (Object.defineProperty) + Object.defineProperty(object, name, { + configurable: false === dpSupport ? true : !!configurable, + get: fn + }); + + else object.__defineGetter__(name, fn); + }; + + /** Ensure the browser allows Object.defineProperty to be used on native JavaScript objects. */ + try { + defineGetter({}, "support"); + } + catch (e) { + dpSupport = false; + } + + + var _DOMTokenList = function (el, prop) { + var that = this; + var tokens = []; + var tokenMap = {}; + var length = 0; + var maxLength = 0; + var addIndexGetter = function (i) { + defineGetter(that, i, function () { + preop(); + return tokens[i]; + }, false); + + }; + var reindex = function () { + + /** Define getter functions for array-like access to the tokenList's contents. */ + if (length >= maxLength) + for (; maxLength < length; ++maxLength) { + addIndexGetter(maxLength); + } + }; + + /** Helper function called at the start of each class method. Internal use only. */ + var preop = function () { + var error; + var i; + var args = arguments; + var rSpace = /\s+/; + + /** Validate the token/s passed to an instance method, if any. */ + if (args.length) + for (i = 0; i < args.length; ++i) + if (rSpace.test(args[i])) { + error = new SyntaxError('String "' + args[i] + '" ' + "contains" + ' an invalid character'); + error.code = 5; + error.name = "InvalidCharacterError"; + throw error; + } + + + /** Split the new value apart by whitespace*/ + if (typeof el[prop] === "object") { + tokens = ("" + el[prop].baseVal).replace(/^\s+|\s+$/g, "").split(rSpace); + } else { + tokens = ("" + el[prop]).replace(/^\s+|\s+$/g, "").split(rSpace); + } + + /** Avoid treating blank strings as single-item token lists */ + if ("" === tokens[0]) tokens = []; + + /** Repopulate the internal token lists */ + tokenMap = {}; + for (i = 0; i < tokens.length; ++i) + tokenMap[tokens[i]] = true; + length = tokens.length; + reindex(); + }; + + /** Populate our internal token list if the targeted attribute of the subject element isn't empty. */ + preop(); + + /** Return the number of tokens in the underlying string. Read-only. */ + defineGetter(that, "length", function () { + preop(); + return length; + }); + + /** Override the default toString/toLocaleString methods to return a space-delimited list of tokens when typecast. */ + that.toLocaleString = + that.toString = function () { + preop(); + return tokens.join(" "); + }; + + that.item = function (idx) { + preop(); + return tokens[idx]; + }; + + that.contains = function (token) { + preop(); + return !!tokenMap[token]; + }; + + that.add = function () { + preop.apply(that, args = arguments); + + for (var args, token, i = 0, l = args.length; i < l; ++i) { + token = args[i]; + if (!tokenMap[token]) { + tokens.push(token); + tokenMap[token] = true; + } + } + + /** Update the targeted attribute of the attached element if the token list's changed. */ + if (length !== tokens.length) { + length = tokens.length >>> 0; + if (typeof el[prop] === "object") { + el[prop].baseVal = tokens.join(" "); + } else { + el[prop] = tokens.join(" "); + } + reindex(); + } + }; + + that.remove = function () { + preop.apply(that, args = arguments); + + /** Build a hash of token names to compare against when recollecting our token list. */ + for (var args, ignore = {}, i = 0, t = []; i < args.length; ++i) { + ignore[args[i]] = true; + delete tokenMap[args[i]]; + } + + /** Run through our tokens list and reassign only those that aren't defined in the hash declared above. */ + for (i = 0; i < tokens.length; ++i) + if (!ignore[tokens[i]]) t.push(tokens[i]); + + tokens = t; + length = t.length >>> 0; + + /** Update the targeted attribute of the attached element. */ + if (typeof el[prop] === "object") { + el[prop].baseVal = tokens.join(" "); + } else { + el[prop] = tokens.join(" "); + } + reindex(); + }; + + that.toggle = function (token, force) { + preop.apply(that, [token]); + + /** Token state's being forced. */ + if (undefined !== force) { + if (force) { + that.add(token); + return true; + } else { + that.remove(token); + return false; + } + } + + /** Token already exists in tokenList. Remove it, and return FALSE. */ + if (tokenMap[token]) { + that.remove(token); + return false; + } + + /** Otherwise, add the token and return TRUE. */ + that.add(token); + return true; + }; + + that.forEach = Array.prototype.forEach; + + return that; + }; + + return _DOMTokenList; +}()); + +// DOMTokenList +/* global _DOMTokenList */ +(function (global) { + var nativeImpl = "DOMTokenList" in global && global.DOMTokenList; + + if ( + !nativeImpl || + ( + !!document.createElementNS && + !!document.createElementNS('http://www.w3.org/2000/svg', 'svg') && + !(document.createElementNS("http://www.w3.org/2000/svg", "svg").classList instanceof DOMTokenList) + ) + ) { + global.DOMTokenList = _DOMTokenList; + } + + // Add second argument to native DOMTokenList.toggle() if necessary + (function () { + var e = document.createElement('span'); + if (!('classList' in e)) return; + e.classList.toggle('x', false); + if (!e.classList.contains('x')) return; + e.classList.constructor.prototype.toggle = function toggle(token /*, force*/) { + var force = arguments[1]; + if (force === undefined) { + var add = !this.contains(token); + this[add ? 'add' : 'remove'](token); + return add; + } + force = !!force; + this[force ? 'add' : 'remove'](token); + return force; + }; + }()); + + // Add multiple arguments to native DOMTokenList.add() if necessary + (function () { + var e = document.createElement('span'); + if (!('classList' in e)) return; + e.classList.add('a', 'b'); + if (e.classList.contains('b')) return; + var native = e.classList.constructor.prototype.add; + e.classList.constructor.prototype.add = function () { + var args = arguments; + var l = arguments.length; + for (var i = 0; i < l; i++) { + native.call(this, args[i]); + } + }; + }()); + + // Add multiple arguments to native DOMTokenList.remove() if necessary + (function () { + var e = document.createElement('span'); + if (!('classList' in e)) return; + e.classList.add('a'); + e.classList.add('b'); + e.classList.remove('a', 'b'); + if (!e.classList.contains('b')) return; + var native = e.classList.constructor.prototype.remove; + e.classList.constructor.prototype.remove = function () { + var args = arguments; + var l = arguments.length; + for (var i = 0; i < l; i++) { + native.call(this, args[i]); + } + }; + }()); + +}(self)); + +// Element.prototype.classList +/* global _DOMTokenList */ +/* +Copyright (c) 2016, John Gardner + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ +(function (global) { + var dpSupport = true; + var defineGetter = function (object, name, fn, configurable) { + if (Object.defineProperty) + Object.defineProperty(object, name, { + configurable: false === dpSupport ? true : !!configurable, + get: fn + }); + + else object.__defineGetter__(name, fn); + }; + /** Ensure the browser allows Object.defineProperty to be used on native JavaScript objects. */ + try { + defineGetter({}, "support"); + } + catch (e) { + dpSupport = false; + } + /** Polyfills a property with a DOMTokenList */ + var addProp = function (o, name, attr) { + + defineGetter(o.prototype, name, function () { + var tokenList; + + var THIS = this, + + /** Prevent this from firing twice for some reason. What the hell, IE. */ + gibberishProperty = "__defineGetter__" + "DEFINE_PROPERTY" + name; + if(THIS[gibberishProperty]) return tokenList; + THIS[gibberishProperty] = true; + + /** + * IE8 can't define properties on native JavaScript objects, so we'll use a dumb hack instead. + * + * What this is doing is creating a dummy element ("reflection") inside a detached phantom node ("mirror") + * that serves as the target of Object.defineProperty instead. While we could simply use the subject HTML + * element instead, this would conflict with element types which use indexed properties (such as forms and + * select lists). + */ + if (false === dpSupport) { + + var visage; + var mirror = addProp.mirror || document.createElement("div"); + var reflections = mirror.childNodes; + var l = reflections.length; + + for (var i = 0; i < l; ++i) + if (reflections[i]._R === THIS) { + visage = reflections[i]; + break; + } + + /** Couldn't find an element's reflection inside the mirror. Materialise one. */ + visage || (visage = mirror.appendChild(document.createElement("div"))); + + tokenList = DOMTokenList.call(visage, THIS, attr); + } else tokenList = new _DOMTokenList(THIS, attr); + + defineGetter(THIS, name, function () { + return tokenList; + }); + delete THIS[gibberishProperty]; + + return tokenList; + }, true); + }; + + addProp(global.Element, "classList", "className"); + addProp(global.HTMLElement, "classList", "className"); + addProp(global.HTMLLinkElement, "relList", "rel"); + addProp(global.HTMLAnchorElement, "relList", "rel"); + addProp(global.HTMLAreaElement, "relList", "rel"); +}(self)); +}) +('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {}); \ No newline at end of file diff --git a/3ds/games/cbr/shop.php b/3ds/games/cbr/shop.php index 816cb61..16426c8 100644 --- a/3ds/games/cbr/shop.php +++ b/3ds/games/cbr/shop.php @@ -115,14 +115,14 @@ include("../../../detect.php");
Welcome, Anonymous! You have 0 points. Info Back
-
- Sporkbob Schitbag [FREE] +
+ Sporkbob Schitbag [FREE]
- Then and Now [FREE] + Then and Now [FREE]
- ESC [Destiny] [FREE] + ESC [Destiny] [FREE]
diff --git a/3ds/games/nixsim/index.php b/3ds/games/nixsim/index.php new file mode 100644 index 0000000..69ceb16 --- /dev/null +++ b/3ds/games/nixsim/index.php @@ -0,0 +1,124 @@ + + + + + + + + + *nix Simulator + + +
+ +
root@nixsim:~# 
+
+
+
+ Destroy - + Echo - + Destroy + +
+
+ + \ No newline at end of file diff --git a/3ds/games/phong.htm b/3ds/games/phong.htm new file mode 100644 index 0000000..75d1a57 --- /dev/null +++ b/3ds/games/phong.htm @@ -0,0 +1,223 @@ + + + +DHTMLPong + + + + + + + + + + +
+
+
+
+
+
+
click to continue
+
+ 0 + 0 +
+ + + diff --git a/3ds/index.php b/3ds/index.php index dabc8f0..8988c97 100644 --- a/3ds/index.php +++ b/3ds/index.php @@ -4,6 +4,7 @@ include("../detect.php"); ?> + +"; if(count(get_included_files()) == 1 && count(get_required_files()) == 1){ echo "Top screen: ". $width . "x" . $height1 . ", bottom screen: " . $width . "x" . $height2; }