Files
Zos-Website/polyfills.js

2 lines
9.6 KiB
JavaScript
Raw Permalink Normal View History

"document"in window.self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(t){"use strict";if("Element"in t){var e="prototype",r=t.Element[e],n=Object,o=String[e].trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array[e].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},a=function(t,e){if(""===e)throw new s("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new s("INVALID_CHARACTER_ERR","String contains an invalid character");return i.call(t,e)},u=function(t){for(var e=o.call(t.getAttribute("class")||""),r=e?e.split(/\s+/):[],n=0,i=r.length;n<i;n++)this.push(r[n]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},h=u[e]=[],f=function(){return new u(this)};if(s[e]=Error[e],h.item=function(t){return this[t]||null},h.contains=function(t){return-1!==a(this,t+="")},h.add=function(){var t,e=arguments,r=0,n=e.length,o=!1;do{t=e[r]+"",-1===a(this,t)&&(this.push(t),o=!0)}while(++r<n);o&&this._updateClassName()},h.remove=function(){var t,e,r=arguments,n=0,o=r.length,i=!1;do{for(t=r[n]+"",e=a(this,t);-1!==e;)this.splice(e,1),i=!0,e=a(this,t)}while(++n<o);i&&this._updateClassName()},h.toggle=function(t,e){t+="";var r=this.contains(t),n=r?!0!==e&&"remove":!1!==e&&"add";return n&&this[n](t),!0===e||!1===e?e:!r},h.toString=function(){return this.join(" ")},n.defineProperty){var c={get:f,enumerable:!0,configurable:!0};try{n.defineProperty(r,"classList",c)}catch(t){void 0!==t.number&&-2146823252!==t.number||(c.enumerable=!1,n.defineProperty(r,"classList",c))}}else n[e].__defineGetter__&&r.__defineGetter__("classList",f)}}(window.self),function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var r,n=arguments.length;for(r=0;r<n;r++)t=arguments[r],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var r=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:r.call(this,t)}}t=null}()),function(t){"use strict";if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var r=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],n=function(t){return t&&DataView.prototype.isPrototypeOf(t)},o=ArrayBuffer.isView||function(t){return t&&r.indexOf(Object.prototype.toString.call(t))>-1};f.prototype.append=function(t,e){t=a(t),e=u(e);var r=this.map[t];this.map[t]=r?r+","+e:e},f.prototype.delete=function(t){delete this.map[a(t)]},f.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},f.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},f.prototype.set=function(t,e){this.map[a(t)]=u(e)},f.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},f.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),h(t)},f.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),h(t)},f.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),h(t)},e.iterable&&(f.prototype[Symbol.iterator]=f.prototype.entries);var i=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},y.call(b.prototype),y.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.ur