Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Reduce file size

* [bugfix] more bugfixing
+ ES6 String.prototype
  • Loading branch information...
commit aa94451d234d2c04e009550e1d374a0608e4e97c 1 parent 9e6ccf7
@termi authored
Showing with 326 additions and 348 deletions.
  1. +33 −33 __COMPILE/a.js
  2. +25 −27 __COMPILE/a.noexstras.js
  3. +1 −0  __SRC/a.ielt8.js
  4. +267 −288 __SRC/a.js
View
66 __COMPILE/a.js
@@ -1,35 +1,35 @@
(function(f){
"use strict";
-var k=void 0,m=!0,r=null,u=!1;
-function z(a,b,c,e){var b=!b?[d]:Array.isArray(b)?b:[b],c=c||[],h,i=-1;if(document.querySelector){var f,g=u,v;","==a.charAt(0)&&(a=a.substr(1));for(f=/[>\+\~]/.test(a.charAt(0));h=b[++i];){if(f)if(h==document)g=m;else{if(!h.id)h.id=z.t+z.w++;v="#"+h.id+a;h=h.parentNode}else v=a;g||(e?c.push(h.querySelector(v)):c=c.concat(Array.from(h.querySelectorAll(v))))}return c}throw Error("querySelector not supported");}function F(a){var b=Object.create(DOMException.prototype);b.code=b[a];b.message=
-a+": DOM Exception "+this.code;throw b;}function x(a){if(a==r)throw new TypeError;return L&&"string"==typeof a&&a?a.split(""):Object(a)}function y(a){Function.prototype.call.apply(a,arguments)}function G(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}function H(a){if((0===a||a===r)&&1>=arguments.length)throw new TypeError("Array length is 0 and no second argument");}function I(a,b){for(var c=0,e=a.length;c<e;c++){var h=a[c],i=b(h);if(i)return i;if(h.childNodes&&0<h.childNodes.length&&
-(i=I(h.childNodes,b)))return i}}Object.append=function(a,b){for(var c=1;c<arguments.length;c++){var e=arguments[c],h;for(h in e)if(!e.hasOwnProperty||e.hasOwnProperty(h))a[h]=e[h]}return a};Object.inherit=function(a,b){(a.prototype=Object.create(a.superclass=b.prototype)).constructor=a};var j=u;try{j=isNaN.apply(r,{})}catch(Q){}if(!j){var M=Function.prototype.apply;Function.prototype.apply=function(a,b){if(!(b instanceof Object)&&b.length==k)throw TypeError("Function.prototype.apply: Arguments list has wrong type");
-b=Array.from(b);return M.call(this,a,b)}}if(!Function.prototype.bind)Function.prototype.bind=function(a,b){var c=this,e=Array.prototype.slice.call(arguments,1);return function(){return c.apply(a,e.concat(Array.prototype.slice.call(arguments,0)))}};var g=f.browser||(f.browser={h:navigator.userAgent.toLowerCase()});g.j=g.h.match(/(mozilla|compatible|chrome|webkit|safari|opera|msie|iphone|ipod|ipad)/gi);for(j=g.j.length;0<j--;)g[g.j[j]]=m;g.l=g.webkit;g.q=g.mozilla=g.mozilla&&!g.compatible&&!g.l;g.n=
-g.chrome;g.r=g.safari=g.safari&&!g.n;g.b=g.msie=g.msie&&!g.opera;g.A=g.iphone;g.B=g.ipod;g.z=g.ipad;if(g.b)for(j=6;11>j;j++)if(RegExp("msie "+j).test(g.h)){g.b=j;break}g.msie=g.b;g.cssPrefix=g.q?"Moz":g.l||g.r?"Webkit":g.opera?"O":g.b?"ms":"";var o=document.createElement("div"),A=Function.prototype.call.bind(Object.prototype.hasOwnProperty),L="a"!=Object("a")[0]||!(0 in Object("a"));f.HTMLDocument||(f.HTMLDocument=f.Document);f.Document||(f.Document=f.HTMLDocument);f.Utils||(f.Utils={});f.Utils.Dom||
-(f.Utils.Dom={});var j=f.Utils.Dom.DOMStringCollection=function(a,b){this.c=b;this.length=0;this.a=[];this.value="";this.update(a)},B={e:function(a){""===a&&F("SYNTAX_ERR");-1<(a+"").indexOf(" ")&&F("INVALID_CHARACTER_ERR")},add:function(a){this.e(a);var b=this.value;if(-1===this.a.indexOf(a))this.value+=(b&&!RegExp("\\s+$","g").test(b)?" ":"")+a,this.a.push(a),this[(this.length=this.a.length)-1]=a,this.c&&this.c.call(this)},remove:function(a){this.e(a);for(var b;-1!==(b=this.a.indexOf(a));)delete this.a[b],
-this.a.splice(b,1);for(b=0,l=this.a.length;b<l;++b)this[b]=this.a[b];for(;b<this.length;++b)delete this[b];this.length=this.a.length;this.value=this.value.replace(RegExp("((?: +)?"+a+"(?: +)?)","g"),function(a,b,h,i){return h&&a.length+h<i.length?" ":""});this.c&&this.c.call(this)},contains:function(a){this.e(a);return-1!=this.a.indexOf(a)},item:function(a){return this[a]||r},toggle:function(a){this.e(a);var b=-1==this.a.indexOf(a);this[b?"add":"remove"](a);return b},update:function(a){var a=a||"",
-b=!!this.length;if(b){for(var c=0;c<this.length;++c)delete thisObj[c];this.length=0;this.a=[];thisObj.value=""}a&&(a=a.trim())&&a.split(RegExp("\\s+","g")).forEach(this.add.bind(this));b&&this.c&&this.c.call(this);return this}},w;for(w in B)j.prototype[w]=B[w];j.prototype.toString=function(){return this.value||""};if(!Object.getOwnPropertyNames)Object.getOwnPropertyNames=function(a){var b=[],c;for(c in a)b.push(c);return b};Object.keys=Object.keys||function(){var a="toString,toLocaleString,valueOf,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,constructor".split(","),
-b=!{toString:r}.propertyIsEnumerable(a[0]),c=a.length;return function(e){if("object"!=typeof e&&"function"!=typeof e||e===r)throw new TypeError("Object.keys called on a non-object");var h=[],i;for(i in e)A(e,i)&&h.push(i);if(b)for(i=0;i<c;i++)A(e,a[i])&&h.push(a[i]);return h}}();if(!Object.seal)Object.seal=function(a){return a};if(!Object.freeze)Object.freeze=function(a){return a};if(!Object.getPrototypeOf)Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:
-Object.prototype)};if(!Object.create)Object.create=function(a,b){var c;if(a===r)c={__proto__:r};else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");c=function(){};c.prototype=a;c=new c;c.__proto__=a}b&&Object.defineProperties(c,b);return c};if(Object.defineProperty&&(w=G({}),j="undefined"==typeof document||G(document.createElement("div")),!w||!j))var C=Object.defineProperty,D=Object.defineProperties;if(!Object.defineProperty||C)Object.defineProperty=function(a,
-b,c){if("object"!=typeof a&&"function"!=typeof a||a===r)throw new TypeError("Object.defineProperty called on non-object: "+a);if("object"!=typeof c&&"function"!=typeof c||c===r)throw new TypeError("Property description must be an object: "+c);if(C)try{return C.call(Object,a,b,c)}catch(e){}if(c.value!==k)if(a.__defineGetter__&&(a.__lookupGetter__(b)||a.__lookupGetter__(b))){var h=a.__proto__;a.__proto__=prototypeOfObject;delete a[b];a[b]=c.value;a.__proto__=h}else a[b]=c.value;else if(a.__defineGetter__)c.get!==
-k&&a.__defineGetter__(b,c.get),c.set!==k&&a.__defineSetter__(b,c.set);else if(c.ielt8)c.get!==k&&(a["get"+b]=c.get),c.set!==k&&(a["set"+b]=c.set);else throw new TypeError("getters & setters not supported");return a};if(!Object.defineProperties||D)Object.defineProperties=function(a,b){if(D)try{return D.call(Object,a,b)}catch(c){}for(var e in b)A(b,e)&&Object.defineProperty(a,e,b[e]);return a};Array.prototype.unique||(Array.prototype.unique=function(a){return function(){return this.filter(a)}}(function(a,
-b,c){return 0>c.indexOf(a,b+1)}));if(!Array.prototype.reduce)Array.prototype.reduce=function(a,b){var c=this.length,e=0;H(c);for(b||(b=(e++,this[0]));e<c;++e)e in this&&(b=y(a,k,b,this[e],e,this));return b};if(!Array.prototype.reduceRight)Array.prototype.reduceRight=function(a,b){var c=this.length>>>0,e=c-1;H(c);if(!b){do{if(e in this){b=this[e--];break}if(0>--e)throw new TypeError;}while(1)}for(;0<=e;--e)e in this&&(b=y(a,k,b,this[e],e,t));return b};if(!Array.prototype.filter)Array.prototype.filter=
-function(a,b){for(var c=x(this),e=this.length>>>0,h=[],i=0;i<e;i++)if(i in c){var f=c[i];y(a,b,f,i,c)&&h.push(f)}return h};var J=Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c=x(this),e;for(e in c)A(c,e)&&y(a,b,c[e],parseInt(e,10),c)});if(!Array.prototype.indexOf)Array.prototype.indexOf=function(a,b){for(var c=x(this),e=b||0,h=c.length;e<h;e++)if(c[e]===a)return e;return-1};if(!Array.prototype.lastIndexOf)Array.prototype.lastIndexOf=function(a,b){return x(this).slice(0).reverse().indexOf(a,
-b)};if(!Array.prototype.every)Array.prototype.every=function(a,b,c){c===k&&(c=m);var e=c;J.call(this,function(h,i){e==c&&(e=!!y(a,b,h,i,this))});return e};if(!Array.prototype.some)Array.prototype.some=function(a,b){return Array.prototype.every.call(this,a,b,u)};if(!Array.prototype.map)Array.prototype.map=function(a,b){J.call(this,function(c,e,h){y(a,b,c,e,h)})};Array.isArray=Array.isArray||function(a){return!(!a||!a.concat||!a.unshift||a.callee)};Array.from=Array.from||function(a){for(var a=x(a),
-b=[],c=0,e=a.length>>>0;c<e;c++)c in a&&(b[c]=a[c]);return b};Array.of=Array.of||function(a){return Array.prototype.slice.call(arguments)};if(!String.prototype.repeat)String.prototype.repeat=function(a){return Array(++a).join(this+"")};if(!String.prototype.trim)String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};if(!String.prototype.s)String.prototype.s=function(a){return 0===this.indexOf(a)};if(!String.prototype.p)String.prototype.p=function(a){var a=""+a,b=this.lastIndexOf(a);
-return 0<=b&&b===this.length-a.length};if(!String.prototype.contains)String.prototype.contains=function(a){return-1!==this.indexOf(a)};if(!String.prototype.v)String.prototype.v=function(){return this.split("")};if(document.addEventListener){var E=u;w=function(){E=m};j=f.Node.prototype;B=function(a){if(a){var b=a.addEventListener,c=a.removeEventListener;a.addEventListener=function(a,c,i){return b.call(this,a,c,i||u)};a.removeEventListener=function(a,b,i){return c.call(this,a,b,i||u)}}};try{o.addEventListener("click",
-w),o.click?o.click():E=m}catch(R){}finally{E||[f.document,f.HTMLDocument&&f.HTMLDocument.prototype,f.Window&&f.Window.prototype,j].forEach(B),document.removeEventListener("click",w)}}(function(){function a(a,b){var c=document.createEvent("Events"),b=b||{};c.initEvent(a,b.bubbles||u,b.cancelable||u);return c}var b;try{b=Event.prototype,new Event("click")}catch(c){if(f.Event=a,b)a.prototype=b}})();(function(){function a(a,b){var c;try{c=document.createEvent("CustomEvent")}catch(f){c=document.createEvent("Event")}b=
-b||{};b.detail=b.detail!==k?b.detail:r;(c.initCustomEvent||(c.detail=b.detail,c.initEvent)).call(c,a,b.bubbles||u,b.cancelable||u,b.detail);return c}var b;try{b=(f.CustomEvent||Event).prototype,new CustomEvent("magic")}catch(c){if(f.CustomEvent=a,b)a.prototype=b}})();var s=f.Node.prototype;"classList"in o||Object.defineProperty(s,"classList",{get:function(){var a=this,b=g.b&&8>g.b&&(a.m||(a.m={}))||a;b.__ccl_00lh__||(b.__ccl_00lh__=new f.Utils.Dom.DOMStringCollection(a.getAttribute("class"),function(){a.setAttribute("class",
-this.value);if(a.className!=this.value)a.className=this.value}));return b.__ccl_00lh__},ielt8:m});(!("children"in o)||g.b&&9>g.b)&&Object.defineProperty(s,"children",{get:function(){for(var a=[],b=this.firstChild;b;)1==b.nodeType&&a.push(b),b=b.nextSibling;return a},ielt8:m});o.childElementCount==k&&Object.defineProperties(s,{firstElementChild:{get:function(){var a;for(a=this.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;return a},ielt8:m},lastElementChild:{get:function(){var a;for(a=this.lastChild;a&&
-1!=a.nodeType;)a=a.previousSibling;return a},ielt8:m},nextElementSibling:{get:function(){for(var a=this;(a=a.nextSibling)&&!(1==a.nodeType););return a},ielt8:m},previousElementSibling:{get:function(){for(var a=this;(a=a.previousSibling)&&!(1==a.nodeType););return a},ielt8:m},childElementCount:{get:function(){if(this.children)return this.children.length},ielt8:m}});"insertAfter"in o||(s.insertAfter=function(a,b){return this.insertBefore(a,b.nextSibling)});if(!f.HTMLTimeElement||!f.HTMLTimeElement.prototype)Object.defineProperty(f.HTMLUnknownElement&&
-f.HTMLUnknownElement.prototype||s,"dateTime",{get:function(){return"TIME"==this.tagName.toUpperCase()?this.getAttribute("datetime")||"":k},set:function(a){return"TIME"==this.tagName.toUpperCase()?(this.setAttribute("datetime",a),a):r},ielt8:m});try{document.importNode(o)}catch(S){var N=document.importNode;delete document.importNode;document.importNode=function(a,b){b===k&&(b=m);return N.call(this,a,b)}}(function(){if(!function(){function a(){c=m}var c=u;try{o.addEventListener("DOMAttrModified",a,
-u),p.setAttribute("id","target")}catch(e){}finally{o.removeEventListener&&o.removeEventListener("DOMAttrModified",a,u)}return c}()&&o.dispatchEvent){var a=function(a,c){return function(e,h){var i=document.createEvent("MutationEvents"),f=this.getAttribute(e);a.apply(this,arguments);i.initMutationEvent("DOMAttrModified",m,m,r,f,c||h===r?"":h,e,c||(f==r?2:1));this.dispatchEvent(i)}};s.setAttribute=a(s.setAttribute||o.setAttribute);s.removeAttribute=a(s.removeAttribute||o.removeAttribute,3)}})();var K=
-"INPUT,BUTTON,KEYGEN,METER,OUTPUT,PROGRESS,TEXTAREA,SELECT".split(",");"labels"in document.createElement("input")||function(){Object.defineProperty(s,"labels",{enumerable:m,get:function(){if(~K.indexOf(this.nodeName)){for(var a=this,b=this.id?Array.from(document.querySelectorAll("label[for='"+this.id+"']")):[],c=b.length-1;(a=a.parentNode)&&(!a.o||a.o===this);)if("LABEL"===a.nodeName){for(;b[c]&&b[c].compareDocumentPosition(a)&2;)c--;b.splice(c+1,0,a)}return b}},ielt8:m})}();"control"in document.createElement("label")||
-function(){Object.defineProperty(f.HTMLLabelElement&&f.HTMLLabelElement.prototype||s,"control",{enumerable:m,get:function(){if("LABEL"===this.nodeName)return this.getAttribute("for")!==r?document.getElementById(this.htmlFor):I(this.childNodes,function(a){if(~K.indexOf(a.nodeName))return a})||r},ielt8:m})}();var q=f.SendRequest=function(a,b,c,e,h){h=h||{};if(!q.d||q.k)q.d=r,q.k=u,q.d=new f.XMLHttpRequest,f.f=u;if(!q.g)q.g=[];setTimeout(function(){q.k=m},3E5);var i=h.post?"POST":"GET",g=h.temporary||
-f.f;if(!f.f&&q.d||g){var n=g?q.g[q.i]=new f.XMLHttpRequest:q.d,v=g?q.i++:r;!h.post&&0<b.length&&(a+="?"+b);n.open(i,a,m);n.onreadystatechange=function(){if(4==n.readyState)200==n.status?c&&c(n):e&&e(n),g?delete q.g[v]:f.f=u;else if(h.onProccess)h.onProccess()};if(!g)f.f=m;try{h.post?(n.setRequestHeader("X-Requested-With","HTTPRequest"),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8"),n.send(b)):n.send(r)}catch(j){}}if(!q.d)return u};q.i=0;f.forEach=function(a,
-b,c){for(var e in a)if(A(a,e)&&b.call(c,a[e],e,a)===u)break;return a};w=f.randomString=function(a){return Math.round(Math.random()*parseInt("z".repeat(++a),36)).toString(36)};f.$A=function(a,b,c,e){if(!a||0===b+c)return[];if(b==c==k)return Array.isArray(a)?a:Array.from(a);var b=b||0,h=typeof a,f,g=[b];c&&g.push(c);"number"==h&&(a+="",h="string");a=x(a);if("number"==typeof a.length){e=a.length;h=0>b&&0>(b=e+b,b)?0:b;b=c==r?e:0>c&&0>(c=e+c,c)?0:c;e=b-h;try{if(f=Array.prototype.slice.apply(a,g),f.length===
-e)return f}catch(n){}for(f=[];h<b;++h)f.push(a[h]);return f}f=[];if("object"==h){for(var v in a)(e||!a.hasOwnProperty||a.hasOwnProperty(v))&&f.push(a[v]);return!b&&!c&&f||f.slice.apply(f,g)}return f};f.$K=function(a,b){var c=typeof a,e;if("object"==c){g.b&&a.length&&!(a instanceof Array)&&(a=Array.from(a));if(b){e=[];for(var f in a)e.push(f);return e}return Object.keys(a)}if("number"==c||"string"==c)c=(a+"").length;else if("number"==typeof a.length)c=a.length;else throw new TypeError("$K:non-iterable");
-e=[];if(c!=k)for(f=0;f<c;++f)e.push(f);return e};f.bubbleEventListener=function(a,b,c,e){var f=Array.isArray(a)?a[0]:a;return function(g){var j=g.target||(g.target=g.srcElement),n,v;do if(n=j.getAttribute(f)||(e&2?j[f]:r),n!=r){var o=[g,j,n];if(Array.isArray(a)&&1<a.length)for(var q=1,s=a.length;q<s;++q)o.push(j.getAttribute(a[q]));"function"==typeof b?v=b.apply(c||this,o):(n=b[n])&&(v=n.apply(c||this,o));if(!(e&1))break}while(j!=this&&(j=j.parentNode));return v}};try{f.getComputedStyle(o)}catch(T){var O=
-f.getComputedStyle;f.getComputedStyle=function(a,b){return O.call(f,a,b||r)}}if(!o.addEventListener)s.addEventListener=f.addEventListener,s.removeEventListener=f.removeEventListener,s.createEvent=f.createEvent,s.dispatchEvent=f.dispatchEvent;f.$=function(a){"string"==typeof a&&(a=document.getElementById(a));return a};z.t="r"+w(6);z.w=0;var P=f.$$=function(a,b,c){var b=b||document,e=/[>\+\~]/.test(a.charAt(0))||/(\,>)|(\,\+)|(\,\~)/.test(a),f=-1;if(document.querySelector){var g=[];if(a){if(e){for(a=
-a.split(",").unique();e=a[++f];)g=z(e,b,g);return g}if(!Array.isArray(b))return Array.from(b.querySelectorAll(a));for(;e=b[++f]&&(!c||!g.length);)Array.from(e.querySelectorAll(a))}return g}throw Error("querySelector not supported");};f.$$0=function(a,b){return P(a,b,m)[0]};(function(a){function b(){}function c(a,b){return function(){return g.call(b,a,arguments)}}var e,g=Function.prototype.apply,i="assert,count,debug,dir,dirxml,error,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,table,time,timeEnd,trace,warn".split(","),
-j={},n;for(e=i.length;e--;)j[i[e]]=b;if(a){if(!a.u)a.C=n={},a.u=function(a,b){if(a){var c=+new Date,e="KEY"+a.toString();if(b||!n[e])n[e]=c}},a.D=function(b){var c,e=+new Date,f="KEY"+b.toString(),g=n[f];g&&(c=e-g,a.info(b+": "+c+"ms"),delete n[f]);return c};for(e=i.length;e--;)a[i[e]]=i[e]in a?c(a,a[i[e]]):b;a.disable=function(){f.console=j};j.enable=function(){f.console=a};j.disable=a.enable=b}else a=f.console=j,a.disable=a.enable=b})("undefined"===typeof console?r:console)})(window);
+var l=void 0,n=!0,q=null,s=!1;
+function F(a,b){var c;try{c=document.createEvent("CustomEvent")}catch(e){c=document.createEvent("Event")}b=b||{};b.detail=b.detail!==l?b.detail:q;(c.initCustomEvent||(c.detail=b.detail,c.initEvent)).call(c,a,b.bubbles||s,b.cancelable||s,b.detail);return c}function G(a,b){var c=document.createEvent("Events"),b=b||{};c.initEvent(a,b.bubbles||s,b.cancelable||s);return c}function H(a){var b=Object.create(DOMException.prototype);b.code=DOMException[a];b.message=a+": DOM Exception "+b.code;
+throw b;}function y(a){if(a==q)throw new TypeError;return M&&"string"==typeof a&&a?a.split(""):Object(a)}function z(a,b){return Function.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))}function I(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}function N(a){if((0===a||a===q)&&1>=arguments.length)throw new TypeError("Array length is 0 and no second argument");}function J(a,b){for(var c=0,e=a.length;c<e;c++){var h=a[c],i=b(h);if(i||h.childNodes&&0<h.childNodes.length&&
+(i=J(h.childNodes,b)))return i}}var g=f.browser||(f.browser={i:navigator.userAgent.toLowerCase()});g.k=g.i.match(/(mozilla|compatible|chrome|webkit|safari|opera|msie|iphone|ipod|ipad)/gi);for(var j=g.k.length;0<j--;)g[g.k[j]]=n;g.m=g.webkit;g.q=g.mozilla=g.mozilla&&!g.compatible&&!g.m;g.o=g.chrome;g.r=g.safari=g.safari&&!g.o;g.b=g.msie=g.msie&&!g.opera;g.w=g.iphone;g.z=g.ipod;g.v=g.ipad;if(g.b)for(j=6;11>j;j++)if(RegExp("msie "+j).test(g.i)){g.b=j;break}g.msie=g.b;g.cssPrefix=g.q?"Moz":g.m||g.r?"Webkit":
+g.opera?"O":g.b?"ms":"";Object.append=function(a,b){for(var c=1;c<arguments.length;c++){var e=arguments[c],h;for(h in e)if(!e.hasOwnProperty||e.hasOwnProperty(h))a[h]=e[h]}return a};Object.inherit=function(a,b){(a.prototype=Object.create(a.superclass=b.prototype)).constructor=a};j=s;try{j=isNaN.apply(q,{})}catch(R){}if(!j){var O=Function.prototype.apply;Function.prototype.apply=function(a,b){if(!(b instanceof Object)&&b.length==l)throw TypeError("Function.prototype.apply: Arguments list has wrong type");
+b=Array.from(b);return O.call(this,a,b)}}Function.prototype.bind||(Function.prototype.bind=function(a,b){var c=this,e=Array.prototype.slice.call(arguments,1);return function(){return c.apply(a,e.concat(Array.from(arguments)))}});var m=document.createElement("div"),A=Function.prototype.call.bind(Object.prototype.hasOwnProperty),M="a"!=Object("a")[0]||!(0 in Object("a"));f.HTMLDocument||(f.HTMLDocument=f.Document);f.Document||(f.Document=f.HTMLDocument);f.Utils||(f.Utils={});f.Utils.Dom||(f.Utils.Dom=
+{});var j=f.Utils.Dom.DOMStringCollection=function(a,b){this.c=b;this.length=0;this.a=[];this.value="";this.update(a)},K={f:function(a){""===a&&H("SYNTAX_ERR");-1<(a+"").indexOf(" ")&&H("INVALID_CHARACTER_ERR")},add:function(a){this.f(a);var b=this.value;-1===this.a.indexOf(a)&&(this.value+=(b&&!RegExp("\\s+$","g").test(b)?" ":"")+a,this.a.push(a),this[(this.length=this.a.length)-1]=a,this.c&&this.c.call(this))},remove:function(a){this.f(a);for(var b,c;-1!==(b=this.a.indexOf(a));)delete this.a[b],
+this.a.splice(b,1);for(b=0,c=this.a.length;b<c;++b)this[b]=this.a[b];for(;b<this.length;++b)delete this[b];this.length=this.a.length;this.value=this.value.replace(RegExp("((?: +)?"+a+"(?: +)?)","g"),function(a,b,c,f){return c&&a.length+c<f.length?" ":""});this.c&&this.c.call(this)},contains:function(a){this.f(a);return-1!=this.a.indexOf(a)},item:function(a){return this[a]||q},toggle:function(a){this.f(a);var b=-1==this.a.indexOf(a);this[b?"add":"remove"](a);return b},update:function(a){var a=a||"",
+b=!!this.length;if(b){for(var c=0;c<this.length;++c)delete this[c];this.length=0;this.a=[];this.value=""}a&&(a=a.trim())&&a.split(RegExp("\\s+","g")).forEach(this.add.bind(this));b&&this.c&&this.c.call(this);return this}},v;for(v in K)j.prototype[v]=K[v];j.prototype.toString=function(){return this.value||""};Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){var b=[],c;for(c in a)b.push(c);return b});Object.keys=Object.keys||function(){var a="toString,toLocaleString,valueOf,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,constructor".split(","),
+b=!{toString:q}.propertyIsEnumerable(a[0]),c=a.length;return function(e){if("object"!=typeof e&&"function"!=typeof e||e===q)throw new TypeError("Object.keys called on a non-object");var h=[],i;for(i in e)A(e,i)&&h.push(i);if(b)for(i=0;i<c;i++)A(e,a[i])&&h.push(a[i]);return h}}();Object.seal||(Object.seal=function(a){return a});Object.freeze||(Object.freeze=function(a){return a});Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:Object.prototype)});
+Object.create||(Object.create=function(a,b){var c;if(a===q)c={__proto__:q};else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");c=function(){};c.prototype=a;c=new c;c.__proto__=a}b&&Object.defineProperties(c,b);return c});if(Object.defineProperty&&(v=I({}),j="undefined"==typeof document||I(document.createElement("div")),!v||!j))var B=Object.defineProperty,C=Object.defineProperties;if(!Object.defineProperty||B)Object.defineProperty=function(a,b,c){if("object"!=
+typeof a&&"function"!=typeof a||a===q)throw new TypeError("Object.defineProperty called on non-object: "+a);if("object"!=typeof c&&"function"!=typeof c||c===q)throw new TypeError("Property description must be an object: "+c);if(B)try{return B.call(Object,a,b,c)}catch(e){}if(c.value!==l)if(a.__defineGetter__&&(a.__lookupGetter__(b)||a.__lookupGetter__(b))){var h=a.__proto__;a.__proto__=Object.prototype;delete a[b];a[b]=c.value;a.__proto__=h}else a[b]=c.value;else if(a.__defineGetter__)c.get!==l&&a.__defineGetter__(b,
+c.get),c.set!==l&&a.__defineSetter__(b,c.set);else if(Object.defineProperty.ielt8)c.get!==l&&(a["get"+b]=c.get),c.set!==l&&(a["set"+b]=c.set);else throw new TypeError("getters & setters not supported");return a};if(!Object.defineProperties||C)Object.defineProperties=function(a,b){if(C)try{return C.call(Object,a,b)}catch(c){}for(var e in b)A(b,e)&&Object.defineProperty(a,e,b[e]);return a};var u=Array.from||(Array.from=function(a){if(Array.isArray(a))return a;for(var a=y(a),b=[],c=0,e=a.length>>>0;c<
+e;c++)c in a&&(b[c]=a[c]);return b});Array.of=Array.of||function(a){return Array.prototype.slice.call(arguments)};Array.prototype.unique||(Array.prototype.unique=function(a){return function(){return this.filter(a)}}(function(a,b,c){return 0>c.indexOf(a,b+1)}));Array.prototype.reduce||(Array.prototype.reduce=function(a,b){var c=y(this),e=c.length,h=0;N(e);for(b||(b=(h++,c[0]));h<e;++h)h in c&&(b=z(a,l,b,c[h],h,c));return b});Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a,b){return u(this).reverse().reduce(a,
+b)});Array.prototype.filter||(Array.prototype.filter=function(a,b){for(var c=y(this),e=this.length>>>0,h=[],i=0;i<e;i++)if(i in c){var f=c[i];z(a,b,f,i,c)&&h.push(f)}return h});var L=Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c=y(this),e;for(e in c)A(c,e)&&z(a,b,c[e],parseInt(e,10),c)});Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){for(var c=u(this),e=b||0,h=c.length;e<h;e++)if(c[e]===a)return e;return-1});Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=
+function(a,b){return u(this).slice(0).reverse().indexOf(a,b)});Array.prototype.every||(Array.prototype.every=function(a,b,c){c===l&&(c=n);var e=c;L.call(this,function(h,i){e==c&&(e=!!z(a,b,h,i,this))});return e});Array.prototype.some||(Array.prototype.some=function(a,b){return Array.prototype.every.call(this,a,b,s)});Array.prototype.map||(Array.prototype.map=function(a,b){L.call(this,function(c,e,h){z(a,b,c,e,h)})});Array.isArray=Array.isArray||function(a){return!(!a||!a.concat||!a.unshift||a.callee)};
+String.prototype.repeat||(String.prototype.repeat=function(a){return Array(++a).join(this+"")});String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});String.prototype.startsWith||(String.prototype.startsWith=function(a){return 0===this.indexOf(a)});String.prototype.endsWith||(String.prototype.endsWith=function(a){var a=""+a,b=this.lastIndexOf(a);return 0<=b&&b===this.length-a.length});String.prototype.contains||(String.prototype.contains=function(a){return!!~this.indexOf(a)});
+String.prototype.t||(String.prototype.t=function(){return this.split("")});if(document.addEventListener){var D=s;v=function(){D=n};j=f.Node.prototype;try{m.addEventListener("click",v),m.click?m.click():D=n}catch(S){}finally{D||[f.document,f.HTMLDocument&&f.HTMLDocument.prototype,f.Window&&f.Window.prototype,j].forEach(function(a){if(a){var b=a.addEventListener,c=a.removeEventListener;a.addEventListener=function(a,c,i){return b.call(this,a,c,i||s)};a.removeEventListener=function(a,b,i){return c.call(this,
+a,b,i||s)}}}),document.removeEventListener("click",v)}}var w;try{w=Event.prototype,new Event("click")}catch(T){f.Event=G,w&&(G.prototype=w)}var E;try{E=(f.CustomEvent||Event).prototype,new CustomEvent("magic")}catch(U){f.CustomEvent=F,E&&(F.prototype=E)}var r=f.Node.prototype;"classList"in m||Object.defineProperty(r,"classList",{get:function(){var a=this,b=g.b&&8>g.b&&(a.n||(a.n={}))||a;b.__ccl_00lh__||(b.__ccl_00lh__=new f.Utils.Dom.DOMStringCollection(a.getAttribute("class"),function(){a.setAttribute("class",
+this.value);a.className!=this.value&&(a.className=this.value)}));return b.__ccl_00lh__}});(!("children"in m)||g.b&&9>g.b)&&Object.defineProperty(r,"children",{get:function(){for(var a=[],b=this.firstChild;b;)1==b.nodeType&&a.push(b),b=b.nextSibling;return a}});m.childElementCount==l&&Object.defineProperties(r,{firstElementChild:{get:function(){var a;for(a=this.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;return a}},lastElementChild:{get:function(){var a;for(a=this.lastChild;a&&1!=a.nodeType;)a=a.previousSibling;
+return a}},nextElementSibling:{get:function(){for(var a=this;(a=a.nextSibling)&&!(1==a.nodeType););return a}},previousElementSibling:{get:function(){for(var a=this;(a=a.previousSibling)&&!(1==a.nodeType););return a}},childElementCount:{get:function(){if(this.children)return this.children.length}}});"insertAfter"in m||(r.insertAfter=function(a,b){return this.insertBefore(a,b.nextSibling)});if(!f.HTMLTimeElement||!f.HTMLTimeElement.prototype)Object.defineProperty(f.HTMLUnknownElement&&f.HTMLUnknownElement.prototype||
+r,"dateTime",{get:function(){return"TIME"==this.tagName.toUpperCase()?this.getAttribute("datetime")||"":l},set:function(a){return"TIME"==this.tagName.toUpperCase()?(this.setAttribute("datetime",a),a):q}});try{document.importNode(m)}catch(V){var P=document.importNode;delete document.importNode;document.importNode=function(a,b){b===l&&(b=n);return P.call(this,a,b)}}!function(){function a(){b=n}var b=s;try{m.addEventListener("DOMAttrModified",a,s),p.setAttribute("id","target")}catch(c){}finally{m.removeEventListener&&
+m.removeEventListener("DOMAttrModified",a,s)}return b}()&&m.dispatchEvent&&(w=function(a,b){return function(c,e){var h=document.createEvent("MutationEvents"),i=this.getAttribute(c);a.apply(this,arguments);h.initMutationEvent("DOMAttrModified",n,n,q,i,b||e===q?"":e,c,b||(i==q?2:1));this.dispatchEvent(h)}},r.setAttribute=w(r.setAttribute||m.setAttribute),r.removeAttribute=w(r.removeAttribute||m.removeAttribute,3));"labels"in document.createElement("input")||function(){Object.defineProperty(r,"labels",
+{enumerable:n,get:function(){if(!"INPUT BUTTON KEYGEN METER OUTPUT PROGRESS TEXTAREA SELECT".contains(this.nodeName)){for(var a=this,b=this.id?u(document.querySelectorAll("label[for='"+this.id+"']")):[],c=b.length-1;(a=a.parentNode)&&(!a.p||a.p===this);)if("LABEL"===a.nodeName){for(;b[c]&&b[c].compareDocumentPosition(a)&2;)c--;b.splice(c+1,0,a)}return b}}})}();"control"in document.createElement("label")||function(){Object.defineProperty(f.HTMLLabelElement&&f.HTMLLabelElement.prototype||r,"control",
+{enumerable:n,get:function(){if("LABEL"===this.nodeName)return this.getAttribute("for")!==q?document.getElementById(this.htmlFor):J(this.childNodes,function(a){if("INPUT BUTTON KEYGEN METER OUTPUT PROGRESS TEXTAREA SELECT".contains(a.nodeName))return a})||q}})}();var o=f.SendRequest=function(a,b,c,e,h){h=h||{};if(!o.e||o.l)o.e=q,o.l=s,o.e=new f.XMLHttpRequest,f.g=s;o.h||(o.h=[]);setTimeout(function(){o.l=n},3E5);var i=h.post?"POST":"GET",g=h.temporary||f.g;if(!f.g&&o.e||g){var k=g?o.h[o.j]=new f.XMLHttpRequest:
+o.e,t=g?o.j++:q;!h.post&&0<b.length&&(a+="?"+b);k.open(i,a,n);k.onreadystatechange=function(){if(4==k.readyState)200==k.status?c&&c(k):e&&e(k),g?delete o.h[t]:f.g=s;else if(h.onProccess)h.onProccess()};g||(f.g=n);try{h.post?(k.setRequestHeader("X-Requested-With","HTTPRequest"),k.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8"),k.send(b)):k.send(q)}catch(j){}}if(!o.e)return s};o.j=0;f.forEach=function(a,b,c){for(var e in a)if(A(a,e)&&b.call(c,a[e],e,a)===s)break;
+return a};w=f.randomString=function(a){return Math.round(Math.random()*parseInt("z".repeat(++a),36)).toString(36)};f.$A=function(a,b,c,e){if(!a||0===b+c)return[];if(b==c==l)return Array.isArray(a)?a:u(a);var b=b||0,h=typeof a,i,f=[b];c&&f.push(c);"number"==h&&(a+="",h="string");a=y(a);if("number"==typeof a.length){e=a.length;h=0>b&&0>(b=e+b,b)?0:b;b=c==q?e:0>c&&0>(c=e+c,c)?0:c;e=b-h;try{if(i=Array.prototype.slice.apply(a,f),i.length===e)return i}catch(g){}for(i=[];h<b;++h)i.push(a[h]);return i}i=
+[];if("object"==h){for(var t in a)(e||!a.hasOwnProperty||a.hasOwnProperty(t))&&i.push(a[t]);return!b&&!c&&i||i.slice.apply(i,f)}return i};f.$K=function(a,b){var c=typeof a,e;if("object"==c){g.b&&a.length&&!(a instanceof Array)&&(a=u(a));if(b){e=[];for(var h in a)e.push(h);return e}return Object.keys(a)}if("number"==c||"string"==c)c=(a+"").length;else if("number"==typeof a.length)c=a.length;else throw new TypeError("$K:non-iterable");e=[];if(c!=l)for(h=0;h<c;++h)e.push(h);return e};f.bubbleEventListener=
+function(a,b,c,e){var h=Array.isArray(a)?a[0]:a;return function(f){var g=f.target||(f.target=f.srcElement),k,t;do if(k=g.getAttribute(h)||(e&2?g[h]:q),k!=q){var j=[f,g,k];if(Array.isArray(a)&&1<a.length)for(var m=1,o=a.length;m<o;++m)j.push(g.getAttribute(a[m]));"function"==typeof b?t=b.apply(c||this,j):(k=b[k])&&(t=k.apply(c||this,j));if(!(e&1))break}while(g!=this&&(g=g.parentNode));return t}};try{f.getComputedStyle(m)}catch(W){var Q=f.getComputedStyle;f.getComputedStyle=function(a,b){return Q.call(f,
+a,b||q)}}m.addEventListener||(r.addEventListener=f.addEventListener,r.removeEventListener=f.removeEventListener,r.createEvent=f.createEvent,r.dispatchEvent=f.dispatchEvent);f.$=function(a){"string"==typeof a&&(a=document.getElementById(a));return a};var x=f.$$=function(a,b,c){var b=b||document,e=/[>\+\~]/.test(a.charAt(0))||/(\,>)|(\,\+)|(\,\~)/.test(a),h=-1;if(document.querySelector){var f=[];if(a){if(e){for(a=a.split(",").unique();e=a[++h];)f=x.d(e,b,f);return f}if(!Array.isArray(b))return u(b.querySelectorAll(a));
+for(;e=b[++h]&&(!c||!f.length);)u(e.querySelectorAll(a))}return f}throw Error("querySelector not supported");};x.d=function(a,b,c,e){var b=!b?[d]:Array.isArray(b)?b:[b],c=c||[],f,g=-1;if(document.querySelector){var j,k=s,t;","==a.charAt(0)&&(a=a.substr(1));for(j=/[>\+\~]/.test(a.charAt(0));f=b[++g];)j?f==document?k=n:(f.id||(f.id=x.d.s+x.d.u++),t="#"+f.id+a,f=f.parentNode):t=a,k||(e?c.push(f.querySelector(t)):c=c.concat(u(f.querySelectorAll(t))));return c}throw Error("querySelector not supported");
+};x.d.s="r"+w(6);x.d.u=0;f.$$0=function(a,b){return x(a,b,n)[0]};(function(a){function b(){}function c(a,b){return function(){return h.call(b,a,arguments)}}var e,h=Function.prototype.apply,g="assert,count,debug,dir,dirxml,error,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,table,time,timeEnd,trace,warn".split(","),j={},k;for(e=g.length;e--;)j[g[e]]=b;if(a){a.time||(a.A=k={},a.time=function(a,b){if(a){var c=+new Date,e="KEY"+a.toString();if(b||!k[e])k[e]=c}},a.timeEnd=function(b){var c,
+e=+new Date,f="KEY"+b.toString(),g=k[f];g&&(c=e-g,a.info(b+": "+c+"ms"),delete k[f]);return c});for(e=g.length;e--;)a[g[e]]=g[e]in a?c(a,a[g[e]]):b;a.disable=function(){f.console=j};j.enable=function(){f.console=a};j.disable=a.enable=b}else a=f.console=j,a.disable=a.enable=b})("undefined"===typeof console?q:console)})(window);
View
52 __COMPILE/a.noexstras.js
@@ -1,29 +1,27 @@
(function(e){
"use strict";
-var i=void 0,j=!0,n=null,o=!1;
-function D(a){var b=Object.create(DOMException.prototype);b.code=b[a];b.message=a+": DOM Exception "+this.code;throw b;}function w(a){if(a==n)throw new TypeError;return J&&"string"==typeof a&&a?a.split(""):Object(a)}function v(a){Function.prototype.call.apply(a,arguments)}function E(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}function F(a){if((0===a||a===n)&&1>=arguments.length)throw new TypeError("Array length is 0 and no second argument");}function G(a,
-b){for(var c=0,f=a.length;c<f;c++){var g=a[c],e=b(g);if(e)return e;if(g.childNodes&&0<g.childNodes.length&&(e=G(g.childNodes,b)))return e}}Object.append=function(a,b){for(var c=1;c<arguments.length;c++){var f=arguments[c],g;for(g in f)if(!f.hasOwnProperty||f.hasOwnProperty(g))a[g]=f[g]}return a};Object.inherit=function(a,b){(a.prototype=Object.create(a.superclass=b.prototype)).constructor=a};var q=o;try{q=isNaN.apply(n,{})}catch(N){}if(!q){var K=Function.prototype.apply;Function.prototype.apply=function(a,
-b){if(!(b instanceof Object)&&b.length==i)throw TypeError("Function.prototype.apply: Arguments list has wrong type");b=Array.from(b);return K.call(this,a,b)}}if(!Function.prototype.bind)Function.prototype.bind=function(a,b){var c=this,f=Array.prototype.slice.call(arguments,1);return function(){return c.apply(a,f.concat(Array.prototype.slice.call(arguments,0)))}};var x=e.browser||(e.browser={o:navigator.userAgent.toLowerCase()}),h=document.createElement("div"),y=Function.prototype.call.bind(Object.prototype.hasOwnProperty),
-J="a"!=Object("a")[0]||!(0 in Object("a"));e.HTMLDocument||(e.HTMLDocument=e.Document);e.Document||(e.Document=e.HTMLDocument);e.Utils||(e.Utils={});e.Utils.Dom||(e.Utils.Dom={});var q=e.Utils.Dom.DOMStringCollection=function(a,b){this.b=b;this.length=0;this.a=[];this.value="";this.update(a)},z={d:function(a){""===a&&D("SYNTAX_ERR");-1<(a+"").indexOf(" ")&&D("INVALID_CHARACTER_ERR")},add:function(a){this.d(a);var b=this.value;if(-1===this.a.indexOf(a))this.value+=(b&&!RegExp("\\s+$","g").test(b)?
-" ":"")+a,this.a.push(a),this[(this.length=this.a.length)-1]=a,this.b&&this.b.call(this)},remove:function(a){this.d(a);for(var b;-1!==(b=this.a.indexOf(a));)delete this.a[b],this.a.splice(b,1);for(b=0,l=this.a.length;b<l;++b)this[b]=this.a[b];for(;b<this.length;++b)delete this[b];this.length=this.a.length;this.value=this.value.replace(RegExp("((?: +)?"+a+"(?: +)?)","g"),function(a,b,g,e){return g&&a.length+g<e.length?" ":""});this.b&&this.b.call(this)},contains:function(a){this.d(a);return-1!=this.a.indexOf(a)},
-item:function(a){return this[a]||n},toggle:function(a){this.d(a);var b=-1==this.a.indexOf(a);this[b?"add":"remove"](a);return b},update:function(a){var a=a||"",b=!!this.length;if(b){for(var c=0;c<this.length;++c)delete thisObj[c];this.length=0;this.a=[];thisObj.value=""}a&&(a=a.trim())&&a.split(RegExp("\\s+","g")).forEach(this.add.bind(this));b&&this.b&&this.b.call(this);return this}},s;for(s in z)q.prototype[s]=z[s];q.prototype.toString=function(){return this.value||""};if(!Object.getOwnPropertyNames)Object.getOwnPropertyNames=
-function(a){var b=[],c;for(c in a)b.push(c);return b};Object.keys=Object.keys||function(){var a="toString,toLocaleString,valueOf,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,constructor".split(","),b=!{toString:n}.propertyIsEnumerable(a[0]),c=a.length;return function(f){if("object"!=typeof f&&"function"!=typeof f||f===n)throw new TypeError("Object.keys called on a non-object");var g=[],e;for(e in f)y(f,e)&&g.push(e);if(b)for(e=0;e<c;e++)y(f,a[e])&&g.push(a[e]);return g}}();if(!Object.seal)Object.seal=
-function(a){return a};if(!Object.freeze)Object.freeze=function(a){return a};if(!Object.getPrototypeOf)Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:Object.prototype)};if(!Object.create)Object.create=function(a,b){var c;if(a===n)c={__proto__:n};else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");c=function(){};c.prototype=a;c=new c;c.__proto__=a}b&&Object.defineProperties(c,b);return c};if(Object.defineProperty&&
-(s=E({}),q="undefined"==typeof document||E(document.createElement("div")),!s||!q))var A=Object.defineProperty,B=Object.defineProperties;if(!Object.defineProperty||A)Object.defineProperty=function(a,b,c){if("object"!=typeof a&&"function"!=typeof a||a===n)throw new TypeError("Object.defineProperty called on non-object: "+a);if("object"!=typeof c&&"function"!=typeof c||c===n)throw new TypeError("Property description must be an object: "+c);if(A)try{return A.call(Object,a,b,c)}catch(f){}if(c.value!==
-i)if(a.__defineGetter__&&(a.__lookupGetter__(b)||a.__lookupGetter__(b))){var e=a.__proto__;a.__proto__=prototypeOfObject;delete a[b];a[b]=c.value;a.__proto__=e}else a[b]=c.value;else if(a.__defineGetter__)c.get!==i&&a.__defineGetter__(b,c.get),c.set!==i&&a.__defineSetter__(b,c.set);else if(c.ielt8)c.get!==i&&(a["get"+b]=c.get),c.set!==i&&(a["set"+b]=c.set);else throw new TypeError("getters & setters not supported");return a};if(!Object.defineProperties||B)Object.defineProperties=function(a,b){if(B)try{return B.call(Object,
-a,b)}catch(c){}for(var f in b)y(b,f)&&Object.defineProperty(a,f,b[f]);return a};Array.prototype.unique||(Array.prototype.unique=function(a){return function(){return this.filter(a)}}(function(a,b,c){return 0>c.indexOf(a,b+1)}));if(!Array.prototype.reduce)Array.prototype.reduce=function(a,b){var c=this.length,f=0;F(c);for(b||(b=(f++,this[0]));f<c;++f)f in this&&(b=v(a,i,b,this[f],f,this));return b};if(!Array.prototype.reduceRight)Array.prototype.reduceRight=function(a,b){var c=this.length>>>0,f=c-1;
-F(c);if(!b){do{if(f in this){b=this[f--];break}if(0>--f)throw new TypeError;}while(1)}for(;0<=f;--f)f in this&&(b=v(a,i,b,this[f],f,t));return b};if(!Array.prototype.filter)Array.prototype.filter=function(a,b){for(var c=w(this),f=this.length>>>0,e=[],u=0;u<f;u++)if(u in c){var h=c[u];v(a,b,h,u,c)&&e.push(h)}return e};var H=Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c=w(this),f;for(f in c)y(c,f)&&v(a,b,c[f],parseInt(f,10),c)});if(!Array.prototype.indexOf)Array.prototype.indexOf=
-function(a,b){for(var c=w(this),f=b||0,e=c.length;f<e;f++)if(c[f]===a)return f;return-1};if(!Array.prototype.lastIndexOf)Array.prototype.lastIndexOf=function(a,b){return w(this).slice(0).reverse().indexOf(a,b)};if(!Array.prototype.every)Array.prototype.every=function(a,b,c){c===i&&(c=j);var f=c;H.call(this,function(e,u){f==c&&(f=!!v(a,b,e,u,this))});return f};if(!Array.prototype.some)Array.prototype.some=function(a,b){return Array.prototype.every.call(this,a,b,o)};if(!Array.prototype.map)Array.prototype.map=
-function(a,b){H.call(this,function(c,e,g){v(a,b,c,e,g)})};Array.isArray=Array.isArray||function(a){return!(!a||!a.concat||!a.unshift||a.callee)};Array.from=Array.from||function(a){for(var a=w(a),b=[],c=0,e=a.length>>>0;c<e;c++)c in a&&(b[c]=a[c]);return b};Array.of=Array.of||function(a){return Array.prototype.slice.call(arguments)};if(!String.prototype.repeat)String.prototype.repeat=function(a){return Array(++a).join(this+"")};if(!String.prototype.trim)String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,
-"")};if(!String.prototype.m)String.prototype.m=function(a){return 0===this.indexOf(a)};if(!String.prototype.l)String.prototype.l=function(a){var a=""+a,b=this.lastIndexOf(a);return 0<=b&&b===this.length-a.length};if(!String.prototype.contains)String.prototype.contains=function(a){return-1!==this.indexOf(a)};if(!String.prototype.n)String.prototype.n=function(){return this.split("")};if(document.addEventListener){var C=o;s=function(){C=j};q=e.Node.prototype;z=function(a){if(a){var b=a.addEventListener,
-c=a.removeEventListener;a.addEventListener=function(a,c,e){return b.call(this,a,c,e||o)};a.removeEventListener=function(a,b,e){return c.call(this,a,b,e||o)}}};try{h.addEventListener("click",s),h.click?h.click():C=j}catch(O){}finally{C||[e.document,e.HTMLDocument&&e.HTMLDocument.prototype,e.Window&&e.Window.prototype,q].forEach(z),document.removeEventListener("click",s)}}(function(){function a(a,b){var c=document.createEvent("Events"),b=b||{};c.initEvent(a,b.bubbles||o,b.cancelable||o);return c}var b;
-try{b=Event.prototype,new Event("click")}catch(c){if(e.Event=a,b)a.prototype=b}})();(function(){function a(a,b){var c;try{c=document.createEvent("CustomEvent")}catch(e){c=document.createEvent("Event")}b=b||{};b.detail=b.detail!==i?b.detail:n;(c.initCustomEvent||(c.detail=b.detail,c.initEvent)).call(c,a,b.bubbles||o,b.cancelable||o,b.detail);return c}var b;try{b=(e.CustomEvent||Event).prototype,new CustomEvent("magic")}catch(c){if(e.CustomEvent=a,b)a.prototype=b}})();var k=e.Node.prototype;"classList"in
-h||Object.defineProperty(k,"classList",{get:function(){var a=this,b=x.g&&8>x.g&&(a.j||(a.j={}))||a;b.__ccl_00lh__||(b.__ccl_00lh__=new e.Utils.Dom.DOMStringCollection(a.getAttribute("class"),function(){a.setAttribute("class",this.value);if(a.className!=this.value)a.className=this.value}));return b.__ccl_00lh__},ielt8:j});(!("children"in h)||x.g&&9>x.g)&&Object.defineProperty(k,"children",{get:function(){for(var a=[],b=this.firstChild;b;)1==b.nodeType&&a.push(b),b=b.nextSibling;return a},ielt8:j});
-h.childElementCount==i&&Object.defineProperties(k,{firstElementChild:{get:function(){var a;for(a=this.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;return a},ielt8:j},lastElementChild:{get:function(){var a;for(a=this.lastChild;a&&1!=a.nodeType;)a=a.previousSibling;return a},ielt8:j},nextElementSibling:{get:function(){for(var a=this;(a=a.nextSibling)&&!(1==a.nodeType););return a},ielt8:j},previousElementSibling:{get:function(){for(var a=this;(a=a.previousSibling)&&!(1==a.nodeType););return a},ielt8:j},
-childElementCount:{get:function(){if(this.children)return this.children.length},ielt8:j}});"insertAfter"in h||(k.insertAfter=function(a,b){return this.insertBefore(a,b.nextSibling)});if(!e.HTMLTimeElement||!e.HTMLTimeElement.prototype)Object.defineProperty(e.HTMLUnknownElement&&e.HTMLUnknownElement.prototype||k,"dateTime",{get:function(){return"TIME"==this.tagName.toUpperCase()?this.getAttribute("datetime")||"":i},set:function(a){return"TIME"==this.tagName.toUpperCase()?(this.setAttribute("datetime",
-a),a):n},ielt8:j});try{document.importNode(h)}catch(P){var L=document.importNode;delete document.importNode;document.importNode=function(a,b){b===i&&(b=j);return L.call(this,a,b)}}(function(){if(!function(){function a(){c=j}var c=o;try{h.addEventListener("DOMAttrModified",a,o),p.setAttribute("id","target")}catch(e){}finally{h.removeEventListener&&h.removeEventListener("DOMAttrModified",a,o)}return c}()&&h.dispatchEvent){var a=function(a,c){return function(e,g){var h=document.createEvent("MutationEvents"),
-m=this.getAttribute(e);a.apply(this,arguments);h.initMutationEvent("DOMAttrModified",j,j,n,m,c||g===n?"":g,e,c||(m==n?2:1));this.dispatchEvent(h)}};k.setAttribute=a(k.setAttribute||h.setAttribute);k.removeAttribute=a(k.removeAttribute||h.removeAttribute,3)}})();var I="INPUT,BUTTON,KEYGEN,METER,OUTPUT,PROGRESS,TEXTAREA,SELECT".split(",");"labels"in document.createElement("input")||function(){Object.defineProperty(k,"labels",{enumerable:j,get:function(){if(~I.indexOf(this.nodeName)){for(var a=this,
-b=this.id?Array.from(document.querySelectorAll("label[for='"+this.id+"']")):[],c=b.length-1;(a=a.parentNode)&&(!a.k||a.k===this);)if("LABEL"===a.nodeName){for(;b[c]&&b[c].compareDocumentPosition(a)&2;)c--;b.splice(c+1,0,a)}return b}},ielt8:j})}();"control"in document.createElement("label")||function(){Object.defineProperty(e.HTMLLabelElement&&e.HTMLLabelElement.prototype||k,"control",{enumerable:j,get:function(){if("LABEL"===this.nodeName)return this.getAttribute("for")!==n?document.getElementById(this.htmlFor):
-G(this.childNodes,function(a){if(~I.indexOf(a.nodeName))return a})||n},ielt8:j})}();var m=e.SendRequest=function(a,b,c,f,g){g=g||{};if(!m.c||m.i)m.c=n,m.i=o,m.c=new e.XMLHttpRequest,e.e=o;if(!m.f)m.f=[];setTimeout(function(){m.i=j},3E5);var h=g.post?"POST":"GET",k=g.temporary||e.e;if(!e.e&&m.c||k){var r=k?m.f[m.h]=new e.XMLHttpRequest:m.c,q=k?m.h++:n;!g.post&&0<b.length&&(a+="?"+b);r.open(h,a,j);r.onreadystatechange=function(){if(4==r.readyState)200==r.status?c&&c(r):f&&f(r),k?delete m.f[q]:e.e=o;
-else if(g.onProccess)g.onProccess()};if(!k)e.e=j;try{g.post?(r.setRequestHeader("X-Requested-With","HTTPRequest"),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=utf-8"),r.send(b)):r.send(n)}catch(s){}}if(!m.c)return o};m.h=0;try{e.getComputedStyle(h)}catch(Q){var M=e.getComputedStyle;e.getComputedStyle=function(a,b){return M.call(e,a,b||n)}}if(!h.addEventListener)k.addEventListener=e.addEventListener,k.removeEventListener=e.removeEventListener,k.createEvent=e.createEvent,
-k.dispatchEvent=e.dispatchEvent})(window);
+var h=void 0,l=!0,m=null,n=!1;
+function B(a,b){var c;try{c=document.createEvent("CustomEvent")}catch(j){c=document.createEvent("Event")}b=b||{};b.detail=b.detail!==h?b.detail:m;(c.initCustomEvent||(c.detail=b.detail,c.initEvent)).call(c,a,b.bubbles||n,b.cancelable||n,b.detail);return c}function C(a,b){var c=document.createEvent("Events"),b=b||{};c.initEvent(a,b.bubbles||n,b.cancelable||n);return c}function D(a){var b=Object.create(DOMException.prototype);b.code=DOMException[a];b.message=a+": DOM Exception "+b.code;
+throw b;}function t(a){if(a==m)throw new TypeError;return I&&"string"==typeof a&&a?a.split(""):Object(a)}function s(a,b){return Function.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))}function E(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}function J(a){if((0===a||a===m)&&1>=arguments.length)throw new TypeError("Array length is 0 and no second argument");}function F(a,b){for(var c=0,j=a.length;c<j;c++){var f=a[c],e=b(f);if(e||f.childNodes&&0<f.childNodes.length&&
+(e=F(f.childNodes,b)))return e}}var u=e.browser||(e.browser={h:navigator.userAgent.toLowerCase()});Object.append=function(a,b){for(var c=1;c<arguments.length;c++){var j=arguments[c],e;for(e in j)if(!j.hasOwnProperty||j.hasOwnProperty(e))a[e]=j[e]}return a};Object.inherit=function(a,b){(a.prototype=Object.create(a.superclass=b.prototype)).constructor=a};var o=n;try{o=isNaN.apply(m,{})}catch(N){}if(!o){var K=Function.prototype.apply;Function.prototype.apply=function(a,b){if(!(b instanceof Object)&&
+b.length==h)throw TypeError("Function.prototype.apply: Arguments list has wrong type");b=Array.from(b);return K.call(this,a,b)}}Function.prototype.bind||(Function.prototype.bind=function(a,b){var c=this,j=Array.prototype.slice.call(arguments,1);return function(){return c.apply(a,j.concat(Array.from(arguments)))}});var i=document.createElement("div"),v=Function.prototype.call.bind(Object.prototype.hasOwnProperty),I="a"!=Object("a")[0]||!(0 in Object("a"));e.HTMLDocument||(e.HTMLDocument=e.Document);
+e.Document||(e.Document=e.HTMLDocument);e.Utils||(e.Utils={});e.Utils.Dom||(e.Utils.Dom={});var o=e.Utils.Dom.DOMStringCollection=function(a,b){this.b=b;this.length=0;this.a=[];this.value="";this.update(a)},G={c:function(a){""===a&&D("SYNTAX_ERR");-1<(a+"").indexOf(" ")&&D("INVALID_CHARACTER_ERR")},add:function(a){this.c(a);var b=this.value;-1===this.a.indexOf(a)&&(this.value+=(b&&!RegExp("\\s+$","g").test(b)?" ":"")+a,this.a.push(a),this[(this.length=this.a.length)-1]=a,this.b&&this.b.call(this))},
+remove:function(a){this.c(a);for(var b,c;-1!==(b=this.a.indexOf(a));)delete this.a[b],this.a.splice(b,1);for(b=0,c=this.a.length;b<c;++b)this[b]=this.a[b];for(;b<this.length;++b)delete this[b];this.length=this.a.length;this.value=this.value.replace(RegExp("((?: +)?"+a+"(?: +)?)","g"),function(a,b,c,e){return c&&a.length+c<e.length?" ":""});this.b&&this.b.call(this)},contains:function(a){this.c(a);return-1!=this.a.indexOf(a)},item:function(a){return this[a]||m},toggle:function(a){this.c(a);var b=-1==
+this.a.indexOf(a);this[b?"add":"remove"](a);return b},update:function(a){var a=a||"",b=!!this.length;if(b){for(var c=0;c<this.length;++c)delete this[c];this.length=0;this.a=[];this.value=""}a&&(a=a.trim())&&a.split(RegExp("\\s+","g")).forEach(this.add.bind(this));b&&this.b&&this.b.call(this);return this}},q;for(q in G)o.prototype[q]=G[q];o.prototype.toString=function(){return this.value||""};Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){var b=[],c;for(c in a)b.push(c);return b});
+Object.keys=Object.keys||function(){var a="toString,toLocaleString,valueOf,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,constructor".split(","),b=!{toString:m}.propertyIsEnumerable(a[0]),c=a.length;return function(j){if("object"!=typeof j&&"function"!=typeof j||j===m)throw new TypeError("Object.keys called on a non-object");var e=[],g;for(g in j)v(j,g)&&e.push(g);if(b)for(g=0;g<c;g++)v(j,a[g])&&e.push(a[g]);return e}}();Object.seal||(Object.seal=function(a){return a});Object.freeze||(Object.freeze=
+function(a){return a});Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:Object.prototype)});Object.create||(Object.create=function(a,b){var c;if(a===m)c={__proto__:m};else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");c=function(){};c.prototype=a;c=new c;c.__proto__=a}b&&Object.defineProperties(c,b);return c});if(Object.defineProperty&&(q=E({}),o="undefined"==typeof document||E(document.createElement("div")),
+!q||!o))var x=Object.defineProperty,y=Object.defineProperties;if(!Object.defineProperty||x)Object.defineProperty=function(a,b,c){if("object"!=typeof a&&"function"!=typeof a||a===m)throw new TypeError("Object.defineProperty called on non-object: "+a);if("object"!=typeof c&&"function"!=typeof c||c===m)throw new TypeError("Property description must be an object: "+c);if(x)try{return x.call(Object,a,b,c)}catch(e){}if(c.value!==h)if(a.__defineGetter__&&(a.__lookupGetter__(b)||a.__lookupGetter__(b))){var f=
+a.__proto__;a.__proto__=Object.prototype;delete a[b];a[b]=c.value;a.__proto__=f}else a[b]=c.value;else if(a.__defineGetter__)c.get!==h&&a.__defineGetter__(b,c.get),c.set!==h&&a.__defineSetter__(b,c.set);else if(Object.defineProperty.ielt8)c.get!==h&&(a["get"+b]=c.get),c.set!==h&&(a["set"+b]=c.set);else throw new TypeError("getters & setters not supported");return a};if(!Object.defineProperties||y)Object.defineProperties=function(a,b){if(y)try{return y.call(Object,a,b)}catch(c){}for(var e in b)v(b,
+e)&&Object.defineProperty(a,e,b[e]);return a};var w=Array.from||(Array.from=function(a){if(Array.isArray(a))return a;for(var a=t(a),b=[],c=0,e=a.length>>>0;c<e;c++)c in a&&(b[c]=a[c]);return b});Array.of=Array.of||function(a){return Array.prototype.slice.call(arguments)};Array.prototype.unique||(Array.prototype.unique=function(a){return function(){return this.filter(a)}}(function(a,b,c){return 0>c.indexOf(a,b+1)}));Array.prototype.reduce||(Array.prototype.reduce=function(a,b){var c=t(this),e=c.length,
+f=0;J(e);for(b||(b=(f++,c[0]));f<e;++f)f in c&&(b=s(a,h,b,c[f],f,c));return b});Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a,b){return w(this).reverse().reduce(a,b)});Array.prototype.filter||(Array.prototype.filter=function(a,b){for(var c=t(this),e=this.length>>>0,f=[],g=0;g<e;g++)if(g in c){var i=c[g];s(a,b,i,g,c)&&f.push(i)}return f});var H=Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c=t(this),e;for(e in c)v(c,e)&&s(a,b,c[e],parseInt(e,10),c)});Array.prototype.indexOf||
+(Array.prototype.indexOf=function(a,b){for(var c=w(this),e=b||0,f=c.length;e<f;e++)if(c[e]===a)return e;return-1});Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(a,b){return w(this).slice(0).reverse().indexOf(a,b)});Array.prototype.every||(Array.prototype.every=function(a,b,c){c===h&&(c=l);var e=c;H.call(this,function(f,g){e==c&&(e=!!s(a,b,f,g,this))});return e});Array.prototype.some||(Array.prototype.some=function(a,b){return Array.prototype.every.call(this,a,b,n)});Array.prototype.map||
+(Array.prototype.map=function(a,b){H.call(this,function(c,e,f){s(a,b,c,e,f)})});Array.isArray=Array.isArray||function(a){return!(!a||!a.concat||!a.unshift||a.callee)};String.prototype.repeat||(String.prototype.repeat=function(a){return Array(++a).join(this+"")});String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")});String.prototype.startsWith||(String.prototype.startsWith=function(a){return 0===this.indexOf(a)});String.prototype.endsWith||(String.prototype.endsWith=
+function(a){var a=""+a,b=this.lastIndexOf(a);return 0<=b&&b===this.length-a.length});String.prototype.contains||(String.prototype.contains=function(a){return!!~this.indexOf(a)});String.prototype.g||(String.prototype.g=function(){return this.split("")});if(document.addEventListener){var z=n;q=function(){z=l};o=e.Node.prototype;try{i.addEventListener("click",q),i.click?i.click():z=l}catch(O){}finally{z||[e.document,e.HTMLDocument&&e.HTMLDocument.prototype,e.Window&&e.Window.prototype,o].forEach(function(a){if(a){var b=
+a.addEventListener,c=a.removeEventListener;a.addEventListener=function(a,c,e){return b.call(this,a,c,e||n)};a.removeEventListener=function(a,b,e){return c.call(this,a,b,e||n)}}}),document.removeEventListener("click",q)}}var r;try{r=Event.prototype,new Event("click")}catch(P){e.Event=C,r&&(C.prototype=r)}var A;try{A=(e.CustomEvent||Event).prototype,new CustomEvent("magic")}catch(Q){e.CustomEvent=B,A&&(B.prototype=A)}var k=e.Node.prototype;"classList"in i||Object.defineProperty(k,"classList",{get:function(){var a=
+this,b=u.d&&8>u.d&&(a.e||(a.e={}))||a;b.__ccl_00lh__||(b.__ccl_00lh__=new e.Utils.Dom.DOMStringCollection(a.getAttribute("class"),function(){a.setAttribute("class",this.value);a.className!=this.value&&(a.className=this.value)}));return b.__ccl_00lh__}});(!("children"in i)||u.d&&9>u.d)&&Object.defineProperty(k,"children",{get:function(){for(var a=[],b=this.firstChild;b;)1==b.nodeType&&a.push(b),b=b.nextSibling;return a}});i.childElementCount==h&&Object.defineProperties(k,{firstElementChild:{get:function(){var a;
+for(a=this.firstChild;a&&1!=a.nodeType;)a=a.nextSibling;return a}},lastElementChild:{get:function(){var a;for(a=this.lastChild;a&&1!=a.nodeType;)a=a.previousSibling;return a}},nextElementSibling:{get:function(){for(var a=this;(a=a.nextSibling)&&!(1==a.nodeType););return a}},previousElementSibling:{get:function(){for(var a=this;(a=a.previousSibling)&&!(1==a.nodeType););return a}},childElementCount:{get:function(){if(this.children)return this.children.length}}});if(!e.HTMLTimeElement||!e.HTMLTimeElement.prototype)Object.defineProperty(e.HTMLUnknownElement&&
+e.HTMLUnknownElement.prototype||k,"dateTime",{get:function(){return"TIME"==this.tagName.toUpperCase()?this.getAttribute("datetime")||"":h},set:function(a){return"TIME"==this.tagName.toUpperCase()?(this.setAttribute("datetime",a),a):m}});try{document.importNode(i)}catch(R){var L=document.importNode;delete document.importNode;document.importNode=function(a,b){b===h&&(b=l);return L.call(this,a,b)}}!function(){function a(){b=l}var b=n;try{i.addEventListener("DOMAttrModified",a,n),p.setAttribute("id",
+"target")}catch(c){}finally{i.removeEventListener&&i.removeEventListener("DOMAttrModified",a,n)}return b}()&&i.dispatchEvent&&(r=function(a,b){return function(c,e){var f=document.createEvent("MutationEvents"),g=this.getAttribute(c);a.apply(this,arguments);f.initMutationEvent("DOMAttrModified",l,l,m,g,b||e===m?"":e,c,b||(g==m?2:1));this.dispatchEvent(f)}},k.setAttribute=r(k.setAttribute||i.setAttribute),k.removeAttribute=r(k.removeAttribute||i.removeAttribute,3));"labels"in document.createElement("input")||
+function(){Object.defineProperty(k,"labels",{enumerable:l,get:function(){if(!"INPUT BUTTON KEYGEN METER OUTPUT PROGRESS TEXTAREA SELECT".contains(this.nodeName)){for(var a=this,b=this.id?w(document.querySelectorAll("label[for='"+this.id+"']")):[],c=b.length-1;(a=a.parentNode)&&(!a.f||a.f===this);)if("LABEL"===a.nodeName){for(;b[c]&&b[c].compareDocumentPosition(a)&2;)c--;b.splice(c+1,0,a)}return b}}})}();"control"in document.createElement("label")||function(){Object.defineProperty(e.HTMLLabelElement&&
+e.HTMLLabelElement.prototype||k,"control",{enumerable:l,get:function(){if("LABEL"===this.nodeName)return this.getAttribute("for")!==m?document.getElementById(this.htmlFor):F(this.childNodes,function(a){if("INPUT BUTTON KEYGEN METER OUTPUT PROGRESS TEXTAREA SELECT".contains(a.nodeName))return a})||m}})}();try{e.getComputedStyle(i)}catch(S){var M=e.getComputedStyle;e.getComputedStyle=function(a,b){return M.call(e,a,b||m)}}i.addEventListener||(k.addEventListener=e.addEventListener,k.removeEventListener=
+e.removeEventListener,k.createEvent=e.createEvent,k.dispatchEvent=e.dispatchEvent)})(window);
View
1  __SRC/a.ielt8.js
@@ -19,6 +19,7 @@ var /** @const*/
__STYLE_ID="ielt8_style_prev_for_behaviour";
//CONFIG END
+Object.defineProperty["ielt8"] = true;
var nodeProp = window.Node.prototype,
browser = window.browser;
View
555 __SRC/a.js
@@ -32,6 +32,74 @@ function(global) {
"use strict";
+/** @type {Object}
+ * @const */
+var browser = global["browser"] || (global["browser"] = {
+/** @type {string}
+ * @const */
+ agent : navigator.userAgent.toLowerCase()
+});
+
+if(INCLUDE_EXTRAS) {
+
+//Определение браузера и поддерживаемых возможностей
+//Если что-то еще понадобится, можно посмотреть тут https://github.com/mrdoob/system.js
+
+/** @type {Array}
+ * @const */
+browser.names = browser.agent.match(/(mozilla|compatible|chrome|webkit|safari|opera|msie|iphone|ipod|ipad)/gi);
+/** @type {number} */
+var len = browser.names.length;
+while(len-- > 0)browser[browser.names[len]] = true;
+//Alians'es
+/** @type {boolean}
+ * @const */
+browser.webkit = browser["webkit"];
+/** @type {boolean}
+ * @const */
+browser.mozilla = browser["mozilla"] = browser["mozilla"] && !browser["compatible"] && !browser.webkit;
+/** @type {boolean}
+ * @const */
+browser.chrome = browser["chrome"];
+/** @type {boolean}
+ * @const */
+browser.safari = browser["safari"] = browser["safari"] && !browser.chrome;
+/* @type {boolean}
+ * @const */
+//browser.opera = browser["opera"];//No need in this version of GCC
+/** @type {boolean}
+ * @const */
+browser.msie = browser["msie"] = browser["msie"] && !browser.opera;
+/** @type {boolean}
+ * @const */
+browser.iphone = browser["iphone"];
+/** @type {boolean}
+ * @const */
+browser.ipod = browser["ipod"];
+/** @type {boolean}
+ * @const */
+browser.ipad = browser["ipad"];
+
+if(browser.msie)for(var i = 6 ; i < 11 ; i++)//IE from 6 to 10
+ if(new RegExp('msie ' + i).test(browser.agent)) {
+ browser.msie = i;
+
+ break;
+ }
+browser["msie"] = browser.msie;
+
+/** @type {string}
+ * @const */
+browser["cssPrefix"] =
+ browser.mozilla ? "Moz" :
+ browser.webkit || browser.safari ? "Webkit" ://and iPad, iPhone, iPod
+ browser.opera ? "O" :
+ browser.msie ? "ms" :
+ "";
+
+}//if(INCLUDE_EXTRAS)
+
+
/* ======================================================================================= */
/* ====================================== Classes <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
@@ -82,6 +150,7 @@ Object["inherit"] = function(Child, Parent) {
+
/* ====================================================================================== */
/* ================================== Function prototype <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
@@ -115,80 +184,12 @@ if(!trueApply) {
if(!Function.prototype.bind)Function.prototype.bind = function(object, var_args) {
var __method = this, args = Array.prototype.slice.call(arguments, 1);
return function() {
- return __method.apply(object, args.concat(Array.prototype.slice.call(arguments, 0)));
+ return __method.apply(object, args.concat(Array["from"](arguments)));
}
}
/* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Function prototype ================================== */
/* ======================================================================================= */
-/** @type {Object}
- * @const */
-var browser = global["browser"] || (global["browser"] = {
-/** @type {string}
- * @const */
- agent : navigator.userAgent.toLowerCase()
-});
-
-if(INCLUDE_EXTRAS) {
-
-//Определение браузера и поддерживаемых возможностей
-//Если что-то еще понадобится, можно посмотреть тут https://github.com/mrdoob/system.js
-
-/** @type {Array}
- * @const */
-browser.names = browser.agent.match(/(mozilla|compatible|chrome|webkit|safari|opera|msie|iphone|ipod|ipad)/gi);
-/** @type {number} */
-var len = browser.names.length;
-while(len-- > 0)browser[browser.names[len]] = true;
-//Alians'es
-/** @type {boolean}
- * @const */
-browser.webkit = browser["webkit"];
-/** @type {boolean}
- * @const */
-browser.mozilla = browser["mozilla"] = browser["mozilla"] && !browser["compatible"] && !browser.webkit;
-/** @type {boolean}
- * @const */
-browser.chrome = browser["chrome"];
-/** @type {boolean}
- * @const */
-browser.safari = browser["safari"] = browser["safari"] && !browser.chrome;
-/* @type {boolean}
- * @const */
-//browser.opera = browser["opera"];//No need in this version of GCC
-/** @type {boolean}
- * @const */
-browser.msie = browser["msie"] = browser["msie"] && !browser.opera;
-/** @type {boolean}
- * @const */
-browser.iphone = browser["iphone"];
-/** @type {boolean}
- * @const */
-browser.ipod = browser["ipod"];
-/** @type {boolean}
- * @const */
-browser.ipad = browser["ipad"];
-
-if(browser.msie)for(var i = 6 ; i < 11 ; i++)//IE from 6 to 10
- if(new RegExp('msie ' + i).test(browser.agent)) {
- browser.msie = i;
-
- break;
- }
-browser["msie"] = browser.msie;
-
-/** @type {string}
- * @const */
-browser["cssPrefix"] =
- browser.mozilla ? "Moz" :
- browser.webkit || browser.safari ? "Webkit" ://and iPad, iPhone, iPod
- browser.opera ? "O" :
- browser.msie ? "ms" :
- "";
-
-}
-
-
var /** @type {HTMLElement}
@@ -197,10 +198,17 @@ var /** @type {HTMLElement}
, _hasOwnProperty = Function.prototype.call.bind(Object.prototype.hasOwnProperty)
- , _call = function(_function) {
+ , /**
+ * Call _function
+ * @param {Function} _function
+ * @param {...} var_args
+ * @return {*} mixed
+ * @version 2
+ */
+ _call = function(_function, var_args) {
// If no callback function or if callback is not a callable function
// it will throw TypeError
- Function.prototype.call.apply(_function, arguments)
+ return Function.prototype.call.apply(_function, Array.prototype.slice.call(arguments, 1))
}
//Fixed `toObject` to work for strings in IE8 and Rhino. Added test spec for `forEach`.
@@ -225,8 +233,8 @@ var /** @type {HTMLElement}
, _throwDOMException = function(errStr) {
var ex = Object.create(DOMException.prototype);
- ex.code = ex[errStr];
- ex.message = errStr +': DOM Exception ' + this.code;
+ ex.code = DOMException[errStr];
+ ex.message = errStr +': DOM Exception ' + ex.code;
throw ex;
}
@@ -283,7 +291,7 @@ var methods = {
remove: function(token) {
this.checkToken(token);
- var i, thisObj = this;
+ var i, l, thisObj = this;
while((i = thisObj._container.indexOf(token)) !== -1) {
delete thisObj._container[i];//[BUG*fix]prevente strange bug in FireFox 8 then after thisObj._splice(i, 1) this.length == 0 but this[0] return value O_0//DOTO:: проверить
thisObj._container.splice(i, 1);
@@ -324,10 +332,10 @@ var methods = {
if(isChange) {
for(var i = 0 ; i < this.length ; ++i)
- delete thisObj[i];
+ delete this[i];
this.length = 0;
this._container = [];
- thisObj.value = "";
+ this.value = "";
}
if(string && (string = string.trim()))
@@ -348,7 +356,7 @@ DOMStringCollection.prototype.toString = function(){return this.value||""}
/* ======================================================================================= */
// --------------- ================ es5 shim ================ ---------------
-// Source https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js
+// Based on https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js
/* ======================================================================================= */
/* ================================= Object prototype <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
@@ -384,7 +392,7 @@ Object.keys = Object.keys || (function () {
'propertyIsEnumerable',
'constructor'
],
- hasDontEnumBug = !{toString:null}.propertyIsEnumerable(DontEnums[0]),
+ hasDontEnumBug = !{"toString":null}.propertyIsEnumerable(DontEnums[0]),
DontEnumsLength = DontEnums.length;
return function (o) {
@@ -571,7 +579,7 @@ if (!Object.defineProperty || definePropertyFallback) {
// a property to make sure that we don't hit an inherited
// accessor.
var prototype = object.__proto__;
- object.__proto__ = prototypeOfObject;
+ object.__proto__ = Object.prototype;
// Deleting a property anyway since getter / setter may be
// defined on object itself.
delete object[property];
@@ -583,7 +591,7 @@ if (!Object.defineProperty || definePropertyFallback) {
}
} else {
if (!object.__defineGetter__) {
- if(descriptor["ielt8"]) {
+ if(Object.defineProperty["ielt8"]) {//Set `Object.defineProperty["ielt8"] = true` in a.ielt8.js
if(descriptor["get"] !== void 0)
object["get" + property] = descriptor["get"];
if(descriptor["set"] !== void 0)
@@ -631,6 +639,43 @@ if (!Object.defineProperties || definePropertiesFallback) {
/* ====================================================================================== */
/* ================================== Array.prototype <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
+
+/* ================================ ES6 ================================== */
+// Based on https://github.com/paulmillr/es6-shim/
+
+var _arrayFrom =
+/**
+ * toArray function
+ * RUS: Преведение к массиву
+ *
+ * @param {*} iterable object
+ * @return {Array}
+ */
+Array["from"] || (Array["from"] = function(iterable) {
+ if(Array.isArray(iterable))return iterable;
+
+ var object = _toObject(iterable),
+ result = [];
+
+ for(var key = 0, length = object.length >>> 0; key < length; key++) {
+ if(key in object)
+ result[key] = object[key];
+ }
+
+ return result;
+})
+
+/**
+ * return array of arguments of this function
+ * RUS: Преведение к массиву состоящему из аргументов функции
+ *
+ * @param {...} args
+ * @return {Array}
+ */
+Array["of"] = Array["of"] || function(args) {
+ return Array.prototype.slice.call(arguments);
+}
+
/**
* Non-standart method
* https://gist.github.com/1044540
@@ -650,10 +695,11 @@ if(!Array.prototype["unique"])Array.prototype["unique"] = (function(a) {
}
);
-/*
-for Array.prototype.reduce and Array.prototype.reduceRight
-*/
-function _testLength(l) {
+/* ================================ ES5 ================================== */
+// Based on https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js
+
+
+function _testLength(l) {//for Array.prototype.reduce and Array.prototype.reduceRight
if((l === 0 || l === null) && (arguments.length <= 1))// == on purpose to test 0 and false.// no value to return if no initial value, empty array
throw new TypeError("Array length is 0 and no second argument");
}
@@ -671,24 +717,25 @@ function _testLength(l) {
*/
if(!Array.prototype.reduce)Array.prototype.reduce = function(accumulator, initialValue) {
// ES5 : "If IsCallable(callbackfn) is false, throw a TypeError exception." in "_call" function
-
- var l = this.length, i = 0;
+
+ var thisArray = _toObject(this),
+ l = thisArray.length, i = 0;
_testLength(l);
- initialValue || (initialValue = (i++, this[0]));
+ initialValue || (initialValue = (i++, thisArray[0]));
for( ; i < l ; ++i) {
- if(i in this)
- initialValue = _call(accumulator, undefined, initialValue, this[i], i, this);
+ if(i in thisArray)
+ initialValue = _call(accumulator, undefined, initialValue, thisArray[i], i, thisArray);
}
return initialValue;
};
-/*
-TODO:: jsdoc
-https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduceRight
+/**
+ * https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduceRight
+ *
Apply a function simultaneously against two values of the array (from right-to-left) as to reduce it to a single value.
reduceRight executes the callback function once for each element present in the array, excluding holes in the array, receiving four arguments: the initial value (or value from the previous callback call), the value of the current element, the current index, and the array over which iteration is occurring.
@@ -699,35 +746,11 @@ array.reduceRight(function(previousValue, currentValue, index, array) {
The first time the function is called, the previousValue and currentValue can be one of two values. If an initialValue was provided in the call to reduceRight, then previousValue will be equal to initialValue and currentValue will be equal to the last value in the array. If no initialValue was provided, then previousValue will be equal to the last value in the array and currentValue will be equal to the second-to-last value.
-Parameters
-callback
-Function to execute on each value in the array.
-initialValue
-Object to use as the first argument to the first call of the callback.
-*/
+ * @param {Function} accumulator Function to execute on each value in the array.
+ * @param {*} initialValue Object to use as the first argument to the first call of the callback.
+ */
if(!Array.prototype.reduceRight)Array.prototype.reduceRight = function(accumulator, initialValue) {
- // ES5 : "If IsCallable(callbackfn) is false, throw a TypeError exception." in "_call" function
-
- var l = this.length >>> 0, k = l - 1;
-
- _testLength(l);
-
- if(!initialValue)do {
- if(k in this) {
- initialValue = this[k--];
- break;
- }
-
- // if array contains no values, no initial value to return
- if (--k < 0)
- throw new TypeError();
- }
- while(true);
-
- for( ; k >= 0 ; --k)if(k in this)
- initialValue = _call(accumulator, undefined, initialValue, this[k], k, t);
-
- return initialValue;
+ return _arrayFrom(this).reverse().reduce(accumulator, initialValue);
};
@@ -767,7 +790,7 @@ var _forEach = Array.prototype.forEach || (Array.prototype.forEach = function(it
* https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf
*/
if(!Array.prototype.indexOf)Array.prototype.indexOf = function(obj, n) {
- var thisArray = _toObject(this);
+ var thisArray = _arrayFrom(this);
for(var i = n || 0, l = thisArray.length ; i < l ; i++)
if(thisArray[i] === obj)return i;
return -1;
@@ -777,8 +800,9 @@ if(!Array.prototype.indexOf)Array.prototype.indexOf = function(obj, n) {
* https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf
*/
if(!Array.prototype.lastIndexOf)Array.prototype.lastIndexOf = function(obj, i) {
- //TODO:: "slice" not in _toObject(this)
- return _toObject(this).slice(0).reverse().indexOf(obj, i)
+ var thisArray = _arrayFrom(this);
+
+ return thisArray.slice(0).reverse().indexOf(obj, i)
}
/**
@@ -845,39 +869,6 @@ Array['isArray'] = Array['isArray'] || function(obj) {
return !!(obj && obj.concat && obj.unshift && !obj.callee);
};
-/* ================================ ES6 ================================== */
-// Based on https://github.com/paulmillr/es6-shim/
-
-/**
- * toArray function
- * RUS: Преведение к массиву
- *
- * @param {*} iterable object
- * @return {Array}
- */
-Array["from"] = Array["from"] || function(iterable) {
- var object = _toObject(iterable),
- result = [];
-
- for(var key = 0, length = object.length >>> 0; key < length; key++) {
- if(key in object)
- result[key] = object[key];
- }
-
- return result;
-}
-
-/**
- * return array of arguments of this function
- * RUS: Преведение к массиву состоящему из аргументов функции
- *
- * @param {...} args
- * @return {Array}
- */
-Array["of"] = Array["of"] || function(args) {
- return Array.prototype.slice.call(arguments);
-}
-
/* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Array.prototype ================================== */
/* ====================================================================================== */
@@ -911,18 +902,18 @@ if(!String.prototype.trim)String.prototype.trim = function() {
}
//from https://github.com/paulmillr/es6-shim/blob/master/es6-shim.js
-if(!String.prototype.startsWith)String.prototype.startsWith = function(substring) {
+if(!String.prototype["startsWith"])String.prototype["startsWith"] = function(substring) {
return this.indexOf(substring) === 0;
}
-if(!String.prototype.endsWith)String.prototype.endsWith = function(substring) {
+if(!String.prototype["endsWith"])String.prototype["endsWith"] = function(substring) {
var substr = String(substring),
index = this.lastIndexOf(substr);
return index >= 0 && index === this.length - substr.length;
}
-if(!String.prototype.contains)String.prototype.contains = function(s) {
- return this.indexOf(s) !== -1;
+if(!String.prototype["contains"])String.prototype["contains"] = function(s) {
+ return !!~this.indexOf(s);
}
if(!String.prototype.toArray)String.prototype.toArray = function() {
@@ -998,28 +989,24 @@ else {
// Firefox also says no
// Safari says me too, me too!
// Opera throws a DOM exception instead ¬_¬
-;(function () {
- // Event constructor
- var _Event = function (type, dict) {
- var e = document.createEvent("Events");
-
- dict = dict || {};
- e.initEvent(type, dict.bubbles || false, dict.cancelable || false);
-
- return e;
- };
+var _Event = function (type, dict) {// Event constructor
+ var e = document.createEvent("Events");
- var eventProto;
- try {
- eventProto = Event.prototype;
- new Event("click");
- } catch (e) {
- //Убрал проверку на текст ошибки, т.к., по моему, она лишняя. И, таки да, в IE на русской ОС эта проверка ошибочна :(
- global["Event"] = _Event
-
- if(eventProto)_Event.prototype = eventProto;//В IE < 8 не удастся получить Event.prototype
- }
-})();
+ dict = dict || {};
+ e.initEvent(type, dict.bubbles || false, dict.cancelable || false);
+
+ return e;
+};
+
+var eventProto;
+try {
+ eventProto = Event.prototype;
+ new Event("click");
+} catch (e) {
+ global["Event"] = _Event
+
+ if(eventProto)_Event.prototype = eventProto;//В IE < 8 не удастся получить Event.prototype
+}
// Chrome calling .initEvent on a CustomEvent object is a no-no
// IE9 doesn't like it either
@@ -1027,36 +1014,32 @@ else {
// Firefox agrees this cannot be done
// Safari says lul wut?
// Opera says have another DOM exception!
-;(function () {
- // CustomEvent constructor
- var _CustomEvent = function (type, dict) {
- var e;
- try {
- e = document.createEvent("CustomEvent");
- }
- catch(err) {//FF 3.6 cant create "CustomEvent"
- e = document.createEvent("Event");
- }
-
- dict = dict || {};
- dict.detail = (dict.detail !== void 0) ? dict.detail : null;
- (e.initCustomEvent || (e.detail = dict.detail, e.initEvent)).call
- (e, type, dict.bubbles || false, dict.cancelable || false, dict.detail);
-
- return e;
- };
+var _CustomEvent = function (type, dict) {// CustomEvent constructor
+ var e;
+ try {
+ e = document.createEvent("CustomEvent");
+ }
+ catch(err) {//FF 3.6 cant create "CustomEvent"
+ e = document.createEvent("Event");
+ }
+
+ dict = dict || {};
+ dict.detail = (dict.detail !== void 0) ? dict.detail : null;
+ (e.initCustomEvent || (e.detail = dict.detail, e.initEvent)).call
+ (e, type, dict.bubbles || false, dict.cancelable || false, dict.detail);
+
+ return e;
+};
- var customEventProto;
- try {
- customEventProto = (global["CustomEvent"] || Event).prototype;//global использую, чтобы ошибка раньше времени не возникла и был шанс получить Event.prototype
- var c = new CustomEvent("magic");
- } catch (e) {
- //Убрал проверку на текст ошибки, т.к., по моему, она лишняя. И, таки да, в IE на русской ОС эта проверка ошибочна :(
- global["CustomEvent"] = _CustomEvent
-
- if(customEventProto)_CustomEvent.prototype = customEventProto;//В IE < 8 не удастся получить CustomEvent.prototype
- }
-})();
+var customEventProto;
+try {
+ customEventProto = (global["CustomEvent"] || Event).prototype;//global использую, чтобы ошибка раньше времени не возникла и был шанс получить Event.prototype
+ var c = new CustomEvent("magic");
+} catch (e) {
+ global["CustomEvent"] = _CustomEvent
+
+ if(customEventProto)_CustomEvent.prototype = customEventProto;//В IE < 8 не удастся получить CustomEvent.prototype
+}
/* >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Events ====================================== */
/* ====================================================================================== */
@@ -1085,8 +1068,7 @@ if(!("classList" in _testElement)) {
})
return cont[_cachedClassList];
- },
- "ielt8" : true});
+ }});
}
// Fix "children" property in IE < 9
@@ -1101,7 +1083,7 @@ if(!("children" in _testElement) || browser.msie && browser.msie < 9)
}
return arr;
- }, "ielt8" : true});
+ }});
// Traversal for IE < 9 and other
if(_testElement.childElementCount == undefined)Object.defineProperties(nodeProto, {
@@ -1116,7 +1098,7 @@ if(_testElement.childElementCount == undefined)Object.defineProperties(nodeProto
while(node && node.nodeType != 1) node = node.nextSibling;
// возвращаем результат
return node;
- }, "ielt8" : true
+ }
},
"lastElementChild" : {
"get" : function() {
@@ -1124,26 +1106,26 @@ if(_testElement.childElementCount == undefined)Object.defineProperties(nodeProto
node = node.lastChild;
while(node && node.nodeType != 1) node = node.previousSibling;
return node;
- }, "ielt8" : true
+ }
},
"nextElementSibling" : {
"get" : function() {
var node = this;
while(node = node.nextSibling) if(node.nodeType == 1) break;
return node;
- }, "ielt8" : true
+ }
},
"previousElementSibling" : {
"get" : function() {
var node = this;
while(node = node.previousSibling) if(node.nodeType == 1) break;
return node;
- }, "ielt8" : true
+ }
},
"childElementCount" : {
"get" : function() {
if(this.children)return this.children.length;//requared this.children
- }, "ielt8" : true
+ }
}
}
)
@@ -1164,6 +1146,7 @@ function _recursivelyWalk(nodes, cb) {
}
};
+if(INCLUDE_EXTRAS) {
if(!("insertAfter" in _testElement)) {
/**
@@ -1180,6 +1163,7 @@ if(!("insertAfter" in _testElement)) {
};
};
+} //if(INCLUDE_EXTRAS)
// Emuleted HTMLTimeElement
if(!(global["HTMLTimeElement"] && global["HTMLTimeElement"].prototype))
@@ -1201,8 +1185,7 @@ Object.defineProperty((global["HTMLUnknownElement"] && global["HTMLUnknownElemen
}
return null;
- },
- "ielt8" : true
+ }
});
// IE9 thinks the argument is not optional
@@ -1223,65 +1206,63 @@ try {
// Fix Chrome problem with DOMAttrModified event | http://blog.silkapp.com/2009/10/mutation-events-what-happen/
-;(function () {
- function isDOMAttrModifiedSupported() {
- var flag = false;
-
- function callback() {
- flag = true;
- }
-
- try {
- _testElement.addEventListener('DOMAttrModified', callback, false);
- p.setAttribute('id', 'target');
- }
- catch(e) {
-
- }
- finally {
- if(_testElement.removeEventListener)
- _testElement.removeEventListener('DOMAttrModified', callback, false);
- }
-
- return flag;
+function isDOMAttrModifiedSupported() {
+ var flag = false;
+
+ function callback() {
+ flag = true;
}
- if(DEBUG)console.log("DOMAttrModified not supported")
+ try {
+ _testElement.addEventListener('DOMAttrModified', callback, false);
+ p.setAttribute('id', 'target');
+ }
+ catch(e) {
+
+ }
+ finally {
+ if(_testElement.removeEventListener)
+ _testElement.removeEventListener('DOMAttrModified', callback, false);
+ }
- if(!isDOMAttrModifiedSupported()
- && _testElement.dispatchEvent //[temporary]TODO:: remove this when "DOMAttrModified" event whould be imulated in IE < 9
- ) {
- /**
- * @param {Function} oldHandle
- * @param {number=} attrChange
- */
- var new_set_remove_Attribute = function(oldHandle, attrChange) {
- return function(name, val) {
- /**
- * @type {MutationEvents}
- */
- var e = document.createEvent("MutationEvents");
- /**
- * @type {String}
- */
- var prev = this.getAttribute(name);
- oldHandle.apply(this, arguments);
- e.initMutationEvent("DOMAttrModified", true, true, null, prev,
- ((attrChange || val === null) ? "" : val),
- name,
- attrChange || ((prev == null) ?
- 2://e.ADDITION :
- 1//e.MODIFICATION
- )
- );
- this.dispatchEvent(e);
- }
+ return flag;
+}
+
+if(DEBUG)console.log("DOMAttrModified not supported")
+
+if(!isDOMAttrModifiedSupported()
+ && _testElement.dispatchEvent //[temporary]TODO:: remove this when "DOMAttrModified" event whould be imulated in IE < 9
+ ) {
+ /**
+ * @param {Function} oldHandle
+ * @param {number=} attrChange
+ */
+ var new_set_remove_Attribute = function(oldHandle, attrChange) {
+ return function(name, val) {
+ /**
+ * @type {MutationEvents}
+ */
+ var e = document.createEvent("MutationEvents");
+ /**
+ * @type {String}
+ */
+ var prev = this.getAttribute(name);
+ oldHandle.apply(this, arguments);
+ e.initMutationEvent("DOMAttrModified", true, true, null, prev,
+ ((attrChange || val === null) ? "" : val),
+ name,
+ attrChange || ((prev == null) ?
+ 2://e.ADDITION :
+ 1//e.MODIFICATION
+ )
+ );
+ this.dispatchEvent(e);
}
-
- nodeProto.setAttribute = new_set_remove_Attribute(nodeProto.setAttribute || _testElement.setAttribute/*IE < 8*/)
- nodeProto.removeAttribute = new_set_remove_Attribute(nodeProto.removeAttribute || _testElement.removeAttribute/*IE < 8*/, 3)//3 === REMOVAL
}
-})();
+
+ nodeProto.setAttribute = new_set_remove_Attribute(nodeProto.setAttribute || _testElement.setAttribute/*IE < 8*/)
+ nodeProto.removeAttribute = new_set_remove_Attribute(nodeProto.removeAttribute || _testElement.removeAttribute/*IE < 8*/, 3)//3 === REMOVAL
+}
@@ -1298,7 +1279,7 @@ try {
/* ================================ HTMLTextAreaElement.prototype <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
/* ================================ HTMLSelectElement.prototype <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< */
-var labelableElements = ["INPUT", "BUTTON", "KEYGEN", "METER", "OUTPUT", "PROGRESS", "TEXTAREA", "SELECT"];
+var labelableElements = "INPUT BUTTON KEYGEN METER OUTPUT PROGRESS TEXTAREA SELECT";
/*
Implement HTML*Element.labels
https://developer.mozilla.org/en/DOM/HTMLInputElement
@@ -1312,7 +1293,7 @@ if(!("labels" in document.createElement("input"))) (function() {
Object.defineProperty(nodeProto, "labels", {
enumerable: true,
"get" : function() {
- if(!~labelableElements.indexOf(this.nodeName))
+ if(labelableElements["contains"](this.nodeName))
return void 0;
var node = this,
@@ -1321,7 +1302,7 @@ if(!("labels" in document.createElement("input"))) (function() {
* @type {Array}
*/
result = this.id ?
- Array["from"](document.querySelectorAll("label[for='" + this.id + "']")) :
+ _arrayFrom(document.querySelectorAll("label[for='" + this.id + "']")) :
[],
_lastInTreeOrder_index = result.length - 1;
@@ -1335,8 +1316,7 @@ if(!("labels" in document.createElement("input"))) (function() {
}
return result;
- },
- "ielt8" : true
+ }
});
})();
@@ -1362,12 +1342,11 @@ if(!("control" in document.createElement("label"))) (function() {
return _recursivelyWalk(this.childNodes,
function(el) {
- if(~labelableElements.indexOf(el.nodeName))
+ if(labelableElements["contains"](el.nodeName))
return el
}
) || null;
- },
- "ielt8" : true
+ }
});
})();
@@ -1557,7 +1536,7 @@ var $A = global["$A"] = function(iterable, start, end, forse) {
if(!iterable || start + end === 0)return [];
if(start == end == void 0) {
if(Array.isArray(iterable))return iterable;
- return Array["from"](iterable);
+ return _arrayFrom(iterable);
}
start = start || 0;//Default value
@@ -1618,7 +1597,7 @@ var $K = global["$K"] = function(iterable, forse) {
results;
if(type == "object") {
- if(browser.msie && iterable.length && !(iterable instanceof Array))iterable = Array["from"](iterable);//Если Arguments
+ if(browser.msie && iterable.length && !(iterable instanceof Array))iterable = _arrayFrom(iterable);//Если Arguments
if(forse) {
results = [];
for(var i in iterable)results.push(i);
@@ -1659,7 +1638,7 @@ global["bubbleEventListener"] = function bubbleEventListener(attribute, namedFun
(typeof namedFunctions != "object" && typeof namedFunctions != funcType))
console.error("bubbleEventListener::namedFunctions must be an Object or Function")
else if(typeof namedFunctions == "object") {
- if(!Array["from"](namedFunctions).length)console.error("bubbleEventListener::no functions are sets")
+ if(!_arrayFrom(namedFunctions).length)console.error("bubbleEventListener::no functions are sets")
else {
var s = true;
$K(namedFunctions).forEach(function(key){
@@ -1795,10 +1774,10 @@ var $$ = global["$$"] = function(selector, roots/*, noCache*/, isFirst) {
return result;
}
- if(!Array.isArray(roots))return Array["from"](roots.querySelectorAll(selector));
+ if(!Array.isArray(roots))return _arrayFrom(roots.querySelectorAll(selector));
while(root = roots[++i] && (!isFirst || !result.length))
- result.concat(Array["from"](root.querySelectorAll(selector)))
+ result.concat(_arrayFrom(root.querySelectorAll(selector)))
}
@@ -1877,7 +1856,7 @@ $$.N = function(selector, roots, prefetchResult, isFirst) {
else specialSelector = selector;
if(noway){}
else if(isFirst)result.push(rt.querySelector(specialSelector));
- else result = result.concat(Array["from"](rt.querySelectorAll(specialSelector)));
+ else result = result.concat(_arrayFrom(rt.querySelectorAll(specialSelector)));
}
return result;
Please sign in to comment.
Something went wrong with that request. Please try again.