"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),t=require("papaparse");function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(require("xlsx"));exports.getCsvData=function(r){return e.__awaiter(void 0,void 0,void 0,(function(){var n;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,fetch(r)];case 1:return[4,e.sent().text()];case 2:return n=e.sent(),[2,(a=n,t.parse(a,{header:!0,dynamicTyping:!0,skipEmptyLines:!0}).data)]}var a}))}))},exports.getTextData=function(t){return e.__awaiter(void 0,void 0,void 0,(function(){return e.__generator(this,(function(e){switch(e.label){case 0:return[4,fetch(t)];case 1:return[4,e.sent().text()];case 2:return[2,e.sent()]}}))}))},exports.getXlsxData=function(r){return e.__awaiter(void 0,void 0,void 0,(function(){var a,s,i,u,c;return e.__generator(this,(function(e){switch(e.label){case 0:return[4,fetch(r)];case 1:return[4,e.sent().arrayBuffer()];case 2:return a=e.sent(),s=n.read(new Uint8Array(a),{type:"array"}),i=s.SheetNames[0],u=s.Sheets[i],c=n.utils.sheet_to_csv(u),[2,t.parse(c).data]}}))}))};
