!function(e,t){"function"==typeofdefine&&define.amd?define([],t):"object"==typeofmodule&&"undefined"!=typeofexports?module.exports=t():e.Papa=t()}(this,function(){"use strict";vars,e,f="undefined"!=typeofself?self:"undefined"!=typeofwindow?window:void0!==f?f:{},r=!f.document&&!!f.postMessage,o=r&&/(\?|&)papaworker(=|&|$)/.test(f.location.search),a=!1,h={},u=0,g={parse:function(e,t){vari=(t=t||{}).dynamicTyping||!1;z(i)&&(t.dynamicTypingFunction=i,i={});if(t.dynamicTyping=i,t.worker&&g.WORKERS_SUPPORTED){varn=function(){if(!g.WORKERS_SUPPORTED)return!1;if(!a&&null===g.SCRIPT_PATH)thrownewError("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");vare=g.SCRIPT_PATH||s;e+=(-1!==e.indexOf("?")?"&":"?")+"papaworker";vart=newf.Worker(e);returnt.onmessage=k,t.id=u++,h[t.id]=t}();returnn.userStep=t.step,n.userChunk=t.chunk,n.userComplete=t.complete,n.userError=t.error,t.step=z(t.step),t.chunk=z(t.chunk),t.complete=z(t.complete),t.error=z(t.error),deletet.worker,voidn.postMessage({input:e,config:t,workerId:n.id})}varr=null;"string"==typeofe?r=t.download?newl(t):new_(t):!0===e.readable&&z(e.read)&&z(e.on)?r=newm(t):(f.File&&einstanceofFile||einstanceofObject)&&(r=newp(t));returnr.stream(e)},unparse:function(e,t){varn=!1,f=!0,d=",",c="\r\n",r='"';!function(){if("object"!=typeoft)return;"string"==typeoft.delimiter&&1===t.delimiter.length&&-1===g.BAD_DELIMITERS.indexOf(t.delimiter)&&(d=t.delimiter);("boolean"==typeoft.quotes||t.quotesinstanceofArray)&&(n=t.quotes);"string"==typeoft.newline&&(c=t.newline);"string"==typeoft.quoteChar&&(r=t.quoteChar);"boolean"==typeoft.header&&(f=t.header)}();vars=newRegExp(r,"g");"string"==typeofe&&(e=JSON.parse(e));if(einstanceofArray){if(!e.length||e[0]instanceofArray)returna(null,e);if("object"==typeofe[0])returna(i(e[0]),e)}elseif("object"==typeofe)return"string"==typeofe.data&&(e.data=JSON.parse(e.data)),e.datainstanceofArray&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=e.data[0]instanceofArray?e.fields:i(e.data[0])),e.data[0]instanceofArray||"object"==typeofe.data[0]||(e.data=[e.data])),a(e.fields||[],e.data||[]);throw"exception: Unable to serialize unrecognized input";functioni(e){if("object"!=typeofe)return[];vart=[];for(variine)t.push(i);returnt}functiona(e,t){vari="";"string"==typeofe&&(e=JSON.parse(e)),"string"==typeoft&&(t=JSON.parse(t));varn=einstanceofArray&&0<e.length,r=!(t[0]instanceofArray);if(n&&f){for(vars=0;s<e.length;s++)0<s&&(i+=d),i+=l(e[s],s);0<t.length&&(i+=c)}for(vara=0;a<t.length;a++){for(varo=n?e.length:t[a].length,h=0;h<o;h++){0<h&&(i+=d);varu=n&&r?e[h]:h;i+=l(t[a][u],h)}a<t.length-1&&(i+=c)}returni}functionl(e,t){if(null==e)return"";e=e.toString().replace(s,r+r);vari="boolean"==typeofn&&n||ninstanceofArray&&n[t]||function(e,t){for(vari=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return!0;return!1}(e,g.BAD_DELIMITERS)||-1<e.indexOf(d)||" "===e.charAt(0)||" "===e.charAt(e.length-1);returni?r+e+r:e}}};if(g.RECORD_SEP=String.fromCharCode(30),g.UNIT_SEP=String.fromCharCode(31),g.BYTE_ORDER_MARK="\ufeff",g.BAD_DELIMITERS=["\r","\n",'"',g.BYTE_ORDER_MARK],g.WORKERS_SUPPORTED=!r&&!!f.Worker,g.SCRIPT_PATH=null,g.LocalChunkSize=10485760,g.RemoteChunkSize=5242880,g.DefaultDelimiter=",",g.Parser=v,g.ParserHandle=i,g.NetworkStreamer=l,g.FileStreamer=p,g.StringStreamer=_,g.ReadableStreamStreamer=m,f.jQuery){vard=f.jQuery;d.fn.parse=function(o){vari=o.config||{},h=[];returnthis.each(function(e){if(!("INPUT"===d(this).prop("tagName").toUpperCase()&&"file"===d(this).attr("type").toLowerCase()&&f.FileReader)||!this.files||0===this.files.length)return!0;for(vart=0;t<this.files.length;t++)h.push({file:this.files[t],inputElem:this,instanceConfig:d.extend({},i)})}),e(),this;functione(){if(0!==h.length){vare,t,i,n,r=h[0];if(z(o.before)){vars=o.before(r.file,r.inputElem);if("object"==typeofs){if("abort"===s.action)returne="AbortError",t=r.file,i=r.inputElem,n=s.reason,void(z(o.error)&&o.error({name:e},t,i,n));