sheetjs/dist/shim.min.js

2 lines
6.2 KiB
JavaScript
Raw Normal View History

/* xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
if(!Object.keys){Object.keys=function(){var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=r.length;return function(n){if(typeof n!=="object"&&typeof n!=="function"||n===null)throw new TypeError("Object.keys called on non-object");var o=[];for(var a in n){if(t.call(n,a))o.push(a)}if(e){for(var f=0;f<i;f++){if(t.call(n,r[f]))o.push(r[f])}}return o}}()}if(!Array.prototype.filter){Array.prototype.filter=function(t){"use strict";if(this==null)throw new TypeError;var e=Object(this);var r=e.length>>>0;if(typeof t!="function")throw new TypeError;var i=[];var n=arguments[1];for(var o=0;o<r;o++){if(o in e){var a=e[o];if(t.call(n,a,o,e))i.push(a)}}return i}}if(!String.prototype.trim){String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}}if(!Array.prototype.forEach){Array.prototype.forEach=function(t){"use strict";if(this===void 0||this===null)throw new TypeError;var e=Object(this);var r=e.length>>>0;if(typeof t!=="function")throw new TypeError;var i=arguments.length>=2?arguments[1]:void 0;for(var n=0;n<r;n++){if(n in e)t.call(i,e[n],n,e)}}}if(!Array.prototype.map){Array.prototype.map=function(t,e){var r,i,n;if(this==null){throw new TypeError(" this is null or not defined")}var o=Object(this);var a=o.length>>>0;if(typeof t!=="function"){throw new TypeError(t+" is not a function")}if(e){r=e}i=new Array(a);n=0;while(n<a){var f,l;if(n in o){f=o[n];l=t.call(r,f,n,o);i[n]=l}n++}return i}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(t,e){if(this===undefined||this===null){throw new TypeError('"this" is null or not defined')}var r=this.length>>>0;e=+e||0;if(Math.abs(e)===Infinity){e=0}if(e<0){e+=r;if(e<0){e=0}}for(;e<r;e++){if(this[e]===t){return e}}return-1}}if(!Array.isArray){Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"}}"use strict";if(typeof ArrayBuffer!=="undefined"&&!ArrayBuffer.prototype.slice){ArrayBuffer.prototype.slice=function(t,e){t=t|0||0;var r=this.byteLength;e=e===void 0?r:e|0;if(t<0)t+=r;if(e<0)e+=r;if(r===0||t>=r||t>=e){return new ArrayBuffer(0)}var i=Math.min(r-t,e-t);var n=new ArrayBuffer(i);var o=new Uint8Array(n);o.set(new Uint8Array(this,t,i));return n}}(function(){var t=typeof exports!="undefined"?exports:typeof self!="undefined"?self:$.global;var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function r(t){this.message=t}r.prototype=new Error;r.prototype.name="InvalidCharacterError";t.btoa||(t.btoa=function(t){var i=String(t);for(var n,o,a=0,f=e,l="";i.charAt(a|0)||(f="=",a%1);l+=f.charAt(63&n>>8-a%1*8)){o=i.charCodeAt(a+=3/4);if(o>255){throw new r("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.")}n=n<<8|o}return l});t.atob||(t.atob=function(t){var i=String(t).replace(/[=]+$/,"");if(i.length%4==1){throw new r("'atob' failed: The string to be decoded is not correctly encoded.")}for(var n=0,o,a,f=0,l="";a=i.charAt(f++);~a&&(o=n%4?o*64+a:a,n++%4)?l+=String.fromCharCode(255&o>>(-2*n&6)):0){a=e.indexOf(a)}return l})})();if(!Date.prototype.toISOString){(function(){function t(t){if(t<10){return"0"+t}return t}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+t(this.getUTCMonth()+1)+"-"+t(this.getUTCDate())+"T"+t(this.getUTCHours())+":"+t(this.getUTCMinutes())+":"+t(this.getUTCSeconds())+"."+(this.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}})()}if(typeof Uint8Array!=="undefined"&&!Uint8Array.prototype.slice)Uint8Array.prototype.slice=function(t,e){if(t<0){t+=this.length;if(t<0)t=0}if(t>=this.length)return new Uint8Array(0);if(e==null)e=this.length;if(e<0){e+=this.length;if(e<0)e=0}if(e>this.length)e=this.length;var r=new Uint8Array(e-t);while(t<=--e)r[e-t]=this[e];return r};var IE_SaveFile=function(){try{if(typeof IE_SaveFile_Impl=="undefined")document.write(['<script type="text/vbscript" language="vbscript">','IE_GetProfileAndPath_Key = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Expl