Socket
Socket
Sign inDemoInstall

svelte-csv

Package Overview
Dependencies
5
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.2.7 to 1.2.8

2

dist/svelte-csv.es.js

@@ -1,2 +0,2 @@

import t from"stream";function e(){}function n(t){return t()}function i(){return Object.create(null)}function r(t){t.forEach(n)}function s(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function a(t,e,n,i){if(t){const r=u(t,e,n,i);return t[0](r)}}function u(t,e,n,i){return t[1]&&i?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](i(e))):n.ctx}function l(t,e,n,i){if(t[2]&&i){const r=t[2](i(n));if(void 0===e.dirty)return r;if("object"==typeof r){const t=[],n=Math.max(e.dirty.length,r.length);for(let i=0;i<n;i+=1)t[i]=e.dirty[i]|r[i];return t}return e.dirty|r}return e.dirty}function c(t,e,n,i,r,s){if(r){const o=u(e,n,i,s);t.p(o,r)}}function h(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}let f,d=!1;function p(t,e,n,i){for(;t<e;){const r=t+(e-t>>1);n(r)<=i?t=r+1:e=r}return t}function _(t,e,n){const i=function(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;if(e&&e.host)return e;return t.ownerDocument}(t);if(!i.getElementById(e)){const t=v("style");t.id=e,t.textContent=n,function(t,e){!function(t,e){t.appendChild(e)}(t.head||t,e)}(i,t)}}function m(t,e){if(d){for(!function(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if("HEAD"===t.nodeName){const t=[];for(let n=0;n<e.length;n++){const i=e[n];void 0!==i.claim_order&&t.push(i)}e=t}const n=new Int32Array(e.length+1),i=new Int32Array(e.length);n[0]=-1;let r=0;for(let t=0;t<e.length;t++){const s=e[t].claim_order,o=(r>0&&e[n[r]].claim_order<=s?r+1:p(1,r,(t=>e[n[t]].claim_order),s))-1;i[t]=n[o]+1;const a=o+1;n[a]=t,r=Math.max(a,r)}const s=[],o=[];let a=e.length-1;for(let t=n[r]+1;0!=t;t=i[t-1]){for(s.push(e[t-1]);a>=t;a--)o.push(e[a]);a--}for(;a>=0;a--)o.push(e[a]);s.reverse(),o.sort(((t,e)=>t.claim_order-e.claim_order));for(let e=0,n=0;e<o.length;e++){for(;n<s.length&&o[e].claim_order>=s[n].claim_order;)n++;const i=n<s.length?s[n]:null;t.insertBefore(o[e],i)}}(t),(void 0===t.actual_end_child||null!==t.actual_end_child&&t.actual_end_child.parentElement!==t)&&(t.actual_end_child=t.firstChild);null!==t.actual_end_child&&void 0===t.actual_end_child.claim_order;)t.actual_end_child=t.actual_end_child.nextSibling;e!==t.actual_end_child?void 0===e.claim_order&&e.parentNode===t||t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling}else e.parentNode===t&&null===e.nextSibling||t.appendChild(e)}function g(t,e,n){d&&!n?m(t,e):e.parentNode===t&&e.nextSibling==n||t.insertBefore(e,n||null)}function y(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function b(){return t="",document.createTextNode(t);var t}function k(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function w(t){return Array.from(t.childNodes)}function E(t,e,n){return function(t,e,n,i){return function(t,e,n,i,r=!1){!function(t){void 0===t.claim_info&&(t.claim_info={last_index:0,total_claimed:0})}(t);const s=(()=>{for(let i=t.claim_info.last_index;i<t.length;i++){const s=t[i];if(e(s)){const e=n(s);return void 0===e?t.splice(i,1):t[i]=e,r||(t.claim_info.last_index=i),s}}for(let i=t.claim_info.last_index-1;i>=0;i--){const s=t[i];if(e(s)){const e=n(s);return void 0===e?t.splice(i,1):t[i]=e,r?void 0===e&&t.claim_info.last_index--:t.claim_info.last_index=i,s}}return i()})();return s.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,s}(t,(t=>t.nodeName===e),(t=>{const e=[];for(let i=0;i<t.attributes.length;i++){const r=t.attributes[i];n[r.name]||e.push(r.name)}e.forEach((e=>t.removeAttribute(e)))}),(()=>i(e)))}(t,e,n,v)}function x(t){f=t}const C=[],R=[],S=[],O=[],T=Promise.resolve();let $=!1;function A(t){S.push(t)}const D=new Set;let I=0;function L(){const t=f;do{for(;I<C.length;){const t=C[I];I++,x(t),j(t.$$)}for(x(null),C.length=0,I=0;R.length;)R.pop()();for(let t=0;t<S.length;t+=1){const e=S[t];D.has(e)||(D.add(e),e())}S.length=0}while(C.length);for(;O.length;)O.pop()();$=!1,D.clear(),x(t)}function j(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(A)}}const N=new Set;let F;function M(t,e){t&&t.i&&(N.delete(t),t.i(e))}function P(t,e,n,i){if(t&&t.o){if(N.has(t))return;N.add(t),F.c.push((()=>{N.delete(t),i&&(n&&t.d(1),i())})),t.o(e)}}function z(t,e){-1===t.$$.dirty[0]&&(C.push(t),$||($=!0,T.then(L)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function B(t,o,a,u,l,c,h,p=[-1]){const _=f;x(t);const m=t.$$={fragment:null,ctx:null,props:c,update:e,not_equal:l,bound:i(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(o.context||(_?_.$$.context:[])),callbacks:i(),dirty:p,skip_bound:!1,root:o.target||_.$$.root};h&&h(m.root);let g=!1;if(m.ctx=a?a(t,o.props||{},((e,n,...i)=>{const r=i.length?i[0]:n;return m.ctx&&l(m.ctx[e],m.ctx[e]=r)&&(!m.skip_bound&&m.bound[e]&&m.bound[e](r),g&&z(t,e)),n})):[],m.update(),g=!0,r(m.before_update),m.fragment=!!u&&u(m.ctx),o.target){if(o.hydrate){d=!0;const t=w(o.target);m.fragment&&m.fragment.l(t),t.forEach(y)}else m.fragment&&m.fragment.c();o.intro&&M(t.$$.fragment),function(t,e,i,o){const{fragment:a,on_mount:u,on_destroy:l,after_update:c}=t.$$;a&&a.m(e,i),o||A((()=>{const e=u.map(n).filter(s);l?l.push(...e):r(e),t.$$.on_mount=[]})),c.forEach(A)}(t,o.target,o.anchor,o.customElement),d=!1,L()}x(_)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var U={exports:{}},q=U.exports=function e(){var n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:{};function i(){var t=n.URL||n.webkitURL||null,i=e.toString();return u.BLOB_URL||(u.BLOB_URL=t.createObjectURL(new Blob(["(",i,")();"],{type:"text/javascript"})))}var r=!n.document&&!!n.postMessage,s=r&&/blob:/i.test((n.location||{}).protocol),o={},a=0,u={};if(u.parse=c,u.unparse=h,u.RECORD_SEP=String.fromCharCode(30),u.UNIT_SEP=String.fromCharCode(31),u.BYTE_ORDER_MARK="\ufeff",u.BAD_DELIMITERS=["\r","\n",'"',u.BYTE_ORDER_MARK],u.WORKERS_SUPPORTED=!r&&!!n.Worker,u.NODE_STREAM_INPUT=1,u.LocalChunkSize=10485760,u.RemoteChunkSize=5242880,u.DefaultDelimiter=",",u.Parser=b,u.ParserHandle=y,u.NetworkStreamer=d,u.FileStreamer=p,u.StringStreamer=_,u.ReadableStreamStreamer=m,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(u.DuplexStreamStreamer=g),n.jQuery){var l=n.jQuery;l.fn.parse=function(t){var e=t.config||{},i=[];return this.each((function(t){if("INPUT"!==l(this).prop("tagName").toUpperCase()||"file"!==l(this).attr("type").toLowerCase()||!n.FileReader||!this.files||0===this.files.length)return!0;for(var r=0;r<this.files.length;r++)i.push({file:this.files[r],inputElem:this,instanceConfig:l.extend({},e)})})),r(),this;function r(){if(0!==i.length){var e=i[0];if(O(t.before)){var n=t.before(e.file,e.inputElem);if("object"==typeof n){if("abort"===n.action)return void s("AbortError",e.file,e.inputElem,n.reason);if("skip"===n.action)return void o();"object"==typeof n.config&&(e.instanceConfig=l.extend(e.instanceConfig,n.config))}else if("skip"===n)return void o()}var r=e.instanceConfig.complete;e.instanceConfig.complete=function(t){O(r)&&r(t,e.file,e.inputElem),o()},u.parse(e.file,e.instanceConfig)}else O(t.complete)&&t.complete()}function s(e,n,i,r){O(t.error)&&t.error({name:e},n,i,r)}function o(){i.splice(0,1),r()}}}function c(t,e){var i=(e=e||{}).dynamicTyping||!1;if(O(i)&&(e.dynamicTypingFunction=i,i={}),e.dynamicTyping=i,e.transform=!!O(e.transform)&&e.transform,e.worker&&u.WORKERS_SUPPORTED){var r=k();return r.userStep=e.step,r.userChunk=e.chunk,r.userComplete=e.complete,r.userError=e.error,e.step=O(e.step),e.chunk=O(e.chunk),e.complete=O(e.complete),e.error=O(e.error),delete e.worker,void r.postMessage({input:t,config:e,workerId:r.id})}var s=null;return t===u.NODE_STREAM_INPUT&&"undefined"==typeof PAPA_BROWSER_CONTEXT?(s=new g(e)).getStream():("string"==typeof t?s=e.download?new d(e):new _(e):!0===t.readable&&O(t.read)&&O(t.on)?s=new m(e):(n.File&&t instanceof File||t instanceof Object)&&(s=new p(e)),s.stream(t))}function h(t,e){var n=!1,i=!0,r=",",s="\r\n",o='"',a=o+o,l=!1,c=null,h=!1;d();var f=new RegExp(v(o),"g");if("string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return p(null,t,l);if("object"==typeof t[0])return p(c||Object.keys(t[0]),t,l)}else if("object"==typeof t)return"string"==typeof t.data&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:"object"==typeof t.data[0]?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||"object"==typeof t.data[0]||(t.data=[t.data])),p(t.fields||[],t.data||[],l);throw new Error("Unable to serialize unrecognized input");function d(){if("object"==typeof e){if("string"!=typeof e.delimiter||u.BAD_DELIMITERS.filter((function(t){return-1!==e.delimiter.indexOf(t)})).length||(r=e.delimiter),("boolean"==typeof e.quotes||"function"==typeof e.quotes||Array.isArray(e.quotes))&&(n=e.quotes),"boolean"!=typeof e.skipEmptyLines&&"string"!=typeof e.skipEmptyLines||(l=e.skipEmptyLines),"string"==typeof e.newline&&(s=e.newline),"string"==typeof e.quoteChar&&(o=e.quoteChar),"boolean"==typeof e.header&&(i=e.header),Array.isArray(e.columns)){if(0===e.columns.length)throw new Error("Option columns is empty");c=e.columns}void 0!==e.escapeChar&&(a=e.escapeChar+o),"boolean"==typeof e.escapeFormulae&&(h=e.escapeFormulae)}}function p(t,e,n){var o="";"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof e&&(e=JSON.parse(e));var a=Array.isArray(t)&&t.length>0,u=!Array.isArray(e[0]);if(a&&i){for(var l=0;l<t.length;l++)l>0&&(o+=r),o+=_(t[l],l);e.length>0&&(o+=s)}for(var c=0;c<e.length;c++){var h=a?t.length:e[c].length,f=!1,d=a?0===Object.keys(e[c]).length:0===e[c].length;if(n&&!a&&(f="greedy"===n?""===e[c].join("").trim():1===e[c].length&&0===e[c][0].length),"greedy"===n&&a){for(var p=[],m=0;m<h;m++){var g=u?t[m]:m;p.push(e[c][g])}f=""===p.join("").trim()}if(!f){for(var y=0;y<h;y++){y>0&&!d&&(o+=r);var v=a&&u?t[y]:y;o+=_(e[c][v],y)}c<e.length-1&&(!n||h>0&&!d)&&(o+=s)}}return o}function _(t,e){if(null==t)return"";if(t.constructor===Date)return JSON.stringify(t).slice(1,25);!0===h&&"string"==typeof t&&null!==t.match(/^[=+\-@].*$/)&&(t="'"+t);var i=t.toString().replace(f,a);return"boolean"==typeof n&&n||"function"==typeof n&&n(t,e)||Array.isArray(n)&&n[e]||m(i,u.BAD_DELIMITERS)||i.indexOf(r)>-1||" "===i.charAt(0)||" "===i.charAt(i.length-1)?o+i+o:i}function m(t,e){for(var n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return!0;return!1}}function f(t){function e(t){var e=R(t);e.chunkSize=parseInt(e.chunkSize),t.step||t.chunk||(e.chunkSize=null),this._handle=new y(e),this._handle.streamer=this,this._config=e}this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},e.call(this,t),this.parseChunk=function(t,e){if(this.isFirstChunk&&O(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(t);void 0!==i&&(t=i)}this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+t;this._partialLine="";var o=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var a=o.meta.cursor;this._finished||(this._partialLine=r.substring(a-this._baseIndex),this._baseIndex=a),o&&o.data&&(this._rowCount+=o.data.length);var l=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(s)n.postMessage({results:o,workerId:u.WORKER_ID,finished:l});else if(O(this._config.chunk)&&!e){if(this._config.chunk(o,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);o=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(o.data),this._completeResults.errors=this._completeResults.errors.concat(o.errors),this._completeResults.meta=o.meta),this._completed||!l||!O(this._config.complete)||o&&o.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),l||o&&o.meta.paused||this._nextChunk(),o}this._halted=!0},this._sendError=function(t){O(this._config.error)?this._config.error(t):s&&this._config.error&&n.postMessage({workerId:u.WORKER_ID,error:t,finished:!1})}}function d(t){var e;function n(t){var e=t.getResponseHeader("Content-Range");return null===e?-1:parseInt(e.substring(e.lastIndexOf("/")+1))}(t=t||{}).chunkSize||(t.chunkSize=u.RemoteChunkSize),f.call(this,t),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(t){this._input=t,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),r||(e.onload=S(this._chunkLoaded,this),e.onerror=S(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var t=this._config.downloadRequestHeaders;for(var n in t)e.setRequestHeader(n,t[n])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;e.setRequestHeader("Range","bytes="+this._start+"-"+i)}try{e.send(this._config.downloadRequestBody)}catch(t){this._chunkError(t.message)}r&&0===e.status&&this._chunkError()}},this._chunkLoaded=function(){4===e.readyState&&(e.status<200||e.status>=400?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:e.responseText.length,this._finished=!this._config.chunkSize||this._start>=n(e),this.parseChunk(e.responseText)))},this._chunkError=function(t){var n=e.statusText||t;this._sendError(new Error(n))}}function p(t){var e,n;(t=t||{}).chunkSize||(t.chunkSize=u.LocalChunkSize),f.call(this,t);var i="undefined"!=typeof FileReader;this.stream=function(t){this._input=t,n=t.slice||t.webkitSlice||t.mozSlice,i?((e=new FileReader).onload=S(this._chunkLoaded,this),e.onerror=S(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var t=this._input;if(this._config.chunkSize){var r=Math.min(this._start+this._config.chunkSize,this._input.size);t=n.call(t,this._start,r)}var s=e.readAsText(t,this._config.encoding);i||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(t){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(t.target.result)},this._chunkError=function(){this._sendError(e.error)}}function _(t){var e;t=t||{},f.call(this,t),this.stream=function(t){return e=t,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var t,n=this._config.chunkSize;return n?(t=e.substring(0,n),e=e.substring(n)):(t=e,e=""),this._finished=!e,this.parseChunk(t)}}}function m(t){t=t||{},f.call(this,t);var e=[],n=!0,i=!1;this.pause=function(){f.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){f.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(t){this._input=t,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){i&&1===e.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):n=!0},this._streamData=S((function(t){try{e.push("string"==typeof t?t:t.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(t){this._streamError(t)}}),this),this._streamError=S((function(t){this._streamCleanUp(),this._sendError(t)}),this),this._streamEnd=S((function(){this._streamCleanUp(),i=!0,this._streamData("")}),this),this._streamCleanUp=S((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function g(e){var n=t.Duplex,i=R(e),r=!0,s=!1,o=[],a=null;this._onCsvData=function(t){var e=t.data;a.push(e)||this._handle.paused()||this._handle.pause()},this._onCsvComplete=function(){a.push(null)},i.step=S(this._onCsvData,this),i.complete=S(this._onCsvComplete,this),f.call(this,i),this._nextChunk=function(){s&&1===o.length&&(this._finished=!0),o.length?o.shift()():r=!0},this._addToParseQueue=function(t,e){o.push(S((function(){if(this.parseChunk("string"==typeof t?t:t.toString(i.encoding)),O(e))return e()}),this)),r&&(r=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(t,e,n){this._addToParseQueue(t,n)},this._onWriteComplete=function(){s=!0,this._addToParseQueue("")},this.getStream=function(){return a},(a=new n({readableObjectMode:!0,decodeStrings:!1,read:S(this._onRead,this),write:S(this._onWrite,this)})).once("finish",S(this._onWriteComplete,this))}function y(t){var e,n,i,r=Math.pow(2,53),s=-r,o=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,l=this,c=0,h=0,f=!1,d=!1,p=[],_={data:[],errors:[],meta:{}};if(O(t.step)){var m=t.step;t.step=function(e){if(_=e,w())k();else{if(k(),0===_.data.length)return;c+=e.data.length,t.preview&&c>t.preview?n.abort():(_.data=_.data[0],m(_,l))}}}function g(e){return"greedy"===t.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function y(t){if(o.test(t)){var e=parseFloat(t);if(e>s&&e<r)return!0}return!1}function k(){if(_&&i&&(A("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+u.DefaultDelimiter+"'"),i=!1),t.skipEmptyLines)for(var e=0;e<_.data.length;e++)g(_.data[e])&&_.data.splice(e--,1);return w()&&E(),S()}function w(){return t.header&&0===p.length}function E(){if(_)if(Array.isArray(_.data[0])){for(var e=0;w()&&e<_.data.length;e++)_.data[e].forEach(n);_.data.splice(0,1)}else _.data.forEach(n);function n(e,n){O(t.transformHeader)&&(e=t.transformHeader(e,n)),p.push(e)}}function x(e){return t.dynamicTypingFunction&&void 0===t.dynamicTyping[e]&&(t.dynamicTyping[e]=t.dynamicTypingFunction(e)),!0===(t.dynamicTyping[e]||t.dynamicTyping)}function C(t,e){return x(t)?"true"===e||"TRUE"===e||"false"!==e&&"FALSE"!==e&&(y(e)?parseFloat(e):a.test(e)?new Date(e):""===e?null:e):e}function S(){if(!_||!t.header&&!t.dynamicTyping&&!t.transform)return _;function e(e,n){var i,r=t.header?{}:[];for(i=0;i<e.length;i++){var s=i,o=e[i];t.header&&(s=i>=p.length?"__parsed_extra":p[i]),t.transform&&(o=t.transform(o,s)),o=C(s,o),"__parsed_extra"===s?(r[s]=r[s]||[],r[s].push(o)):r[s]=o}return t.header&&(i>p.length?A("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+i,h+n):i<p.length&&A("FieldMismatch","TooFewFields","Too few fields: expected "+p.length+" fields but parsed "+i,h+n)),r}var n=1;return!_.data.length||Array.isArray(_.data[0])?(_.data=_.data.map(e),n=_.data.length):_.data=e(_.data,0),t.header&&_.meta&&(_.meta.fields=p),h+=n,_}function T(e,n,i,r,s){var o,a,l,c;s=s||[",","\t","|",";",u.RECORD_SEP,u.UNIT_SEP];for(var h=0;h<s.length;h++){var f=s[h],d=0,p=0,_=0;l=void 0;for(var m=new b({comments:r,delimiter:f,newline:n,preview:10}).parse(e),y=0;y<m.data.length;y++)if(i&&g(m.data[y]))_++;else{var v=m.data[y].length;p+=v,void 0!==l?v>0&&(d+=Math.abs(v-l),l=v):l=v}m.data.length>0&&(p/=m.data.length-_),(void 0===a||d<=a)&&(void 0===c||p>c)&&p>1.99&&(a=d,o=f,c=p)}return t.delimiter=o,{successful:!!o,bestDelimiter:o}}function $(t,e){t=t.substring(0,1048576);var n=new RegExp(v(e)+"([^]*?)"+v(e),"gm"),i=(t=t.replace(n,"")).split("\r"),r=t.split("\n"),s=r.length>1&&r[0].length<i[0].length;if(1===i.length||s)return"\n";for(var o=0,a=0;a<i.length;a++)"\n"===i[a][0]&&o++;return o>=i.length/2?"\r\n":"\r"}function A(t,e,n,i){var r={type:t,code:e,message:n};void 0!==i&&(r.row=i),_.errors.push(r)}this.parse=function(r,s,o){var a=t.quoteChar||'"';if(t.newline||(t.newline=$(r,a)),i=!1,t.delimiter)O(t.delimiter)&&(t.delimiter=t.delimiter(r),_.meta.delimiter=t.delimiter);else{var l=T(r,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess);l.successful?t.delimiter=l.bestDelimiter:(i=!0,t.delimiter=u.DefaultDelimiter),_.meta.delimiter=t.delimiter}var c=R(t);return t.preview&&t.header&&c.preview++,e=r,n=new b(c),_=n.parse(e,s,o),k(),f?{meta:{paused:!0}}:_||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,n.abort(),e=O(t.chunk)?"":e.substring(n.getCharIndex())},this.resume=function(){l.streamer._halted?(f=!1,l.streamer.parseChunk(e,!0)):setTimeout(l.resume,3)},this.aborted=function(){return d},this.abort=function(){d=!0,n.abort(),_.meta.aborted=!0,O(t.complete)&&t.complete(_),e=""}}function v(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(t){var e,n=(t=t||{}).delimiter,i=t.newline,r=t.comments,s=t.step,o=t.preview,a=t.fastMode,l=e=void 0===t.quoteChar?'"':t.quoteChar;if(void 0!==t.escapeChar&&(l=t.escapeChar),("string"!=typeof n||u.BAD_DELIMITERS.indexOf(n)>-1)&&(n=","),r===n)throw new Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||u.BAD_DELIMITERS.indexOf(r)>-1)&&(r=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var c=0,h=!1;this.parse=function(t,u,f){if("string"!=typeof t)throw new Error("Input must be a string");var d=t.length,p=n.length,_=i.length,m=r.length,g=O(s);c=0;var y=[],b=[],k=[],w=0;if(!t)return N();if(a||!1!==a&&-1===t.indexOf(e)){for(var E=t.split(i),x=0;x<E.length;x++){if(k=E[x],c+=k.length,x!==E.length-1)c+=i.length;else if(f)return N();if(!r||k.substring(0,m)!==r){if(g){if(y=[],D(k.split(n)),F(),h)return N()}else D(k.split(n));if(o&&x>=o)return y=y.slice(0,o),N(!0)}}return N()}for(var C=t.indexOf(n,c),R=t.indexOf(i,c),S=new RegExp(v(l)+v(e),"g"),T=t.indexOf(e,c);;)if(t[c]!==e)if(r&&0===k.length&&t.substring(c,c+m)===r){if(-1===R)return N();c=R+_,R=t.indexOf(i,c),C=t.indexOf(n,c)}else if(-1!==C&&(C<R||-1===R))k.push(t.substring(c,C)),c=C+p,C=t.indexOf(n,c);else{if(-1===R)break;if(k.push(t.substring(c,R)),j(R+_),g&&(F(),h))return N();if(o&&y.length>=o)return N(!0)}else for(T=c,c++;;){if(-1===(T=t.indexOf(e,T+1)))return f||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:y.length,index:c}),L();if(T===d-1)return L(t.substring(c,T).replace(S,e));if(e!==l||t[T+1]!==l){if(e===l||0===T||t[T-1]!==l){-1!==C&&C<T+1&&(C=t.indexOf(n,T+1)),-1!==R&&R<T+1&&(R=t.indexOf(i,T+1));var $=I(-1===R?C:Math.min(C,R));if(t[T+1+$]===n){k.push(t.substring(c,T).replace(S,e)),c=T+1+$+p,t[T+1+$+p]!==e&&(T=t.indexOf(e,c)),C=t.indexOf(n,c),R=t.indexOf(i,c);break}var A=I(R);if(t.substring(T+1+A,T+1+A+_)===i){if(k.push(t.substring(c,T).replace(S,e)),j(T+1+A+_),C=t.indexOf(n,c),T=t.indexOf(e,c),g&&(F(),h))return N();if(o&&y.length>=o)return N(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:y.length,index:c}),T++}}else T++}return L();function D(t){y.push(t),w=c}function I(e){var n=0;if(-1!==e){var i=t.substring(T+1,e);i&&""===i.trim()&&(n=i.length)}return n}function L(e){return f||(void 0===e&&(e=t.substring(c)),k.push(e),c=d,D(k),g&&F()),N()}function j(e){c=e,D(k),k=[],R=t.indexOf(i,c)}function N(t){return{data:y,errors:b,meta:{delimiter:n,linebreak:i,aborted:h,truncated:!!t,cursor:w+(u||0)}}}function F(){s(N()),y=[],b=[]}},this.abort=function(){h=!0},this.getCharIndex=function(){return c}}function k(){if(!u.WORKERS_SUPPORTED)return!1;var t=i(),e=new n.Worker(t);return e.onmessage=w,e.id=a++,o[e.id]=e,e}function w(t){var e=t.data,n=o[e.workerId],i=!1;if(e.error)n.userError(e.error,e.file);else if(e.results&&e.results.data){var r={abort:function(){i=!0,E(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:x,resume:x};if(O(n.userStep)){for(var s=0;s<e.results.data.length&&(n.userStep({data:e.results.data[s],errors:e.results.errors,meta:e.results.meta},r),!i);s++);delete e.results}else O(n.userChunk)&&(n.userChunk(e.results,r,e.file),delete e.results)}e.finished&&!i&&E(e.workerId,e.results)}function E(t,e){var n=o[t];O(n.userComplete)&&n.userComplete(e),n.terminate(),delete o[t]}function x(){throw new Error("Not implemented.")}function C(t){var e=t.data;if(void 0===u.WORKER_ID&&e&&(u.WORKER_ID=e.workerId),"string"==typeof e.input)n.postMessage({workerId:u.WORKER_ID,results:u.parse(e.input,e.config),finished:!0});else if(n.File&&e.input instanceof File||e.input instanceof Object){var i=u.parse(e.input,e.config);i&&n.postMessage({workerId:u.WORKER_ID,results:i,finished:!0})}}function R(t){if("object"!=typeof t||null===t)return t;var e=Array.isArray(t)?[]:{};for(var n in t)e[n]=R(t[n]);return e}function S(t,e){return function(){t.apply(e,arguments)}}function O(t){return"function"==typeof t}return s&&(n.onmessage=C),d.prototype=Object.create(f.prototype),d.prototype.constructor=d,p.prototype=Object.create(f.prototype),p.prototype.constructor=p,_.prototype=Object.create(_.prototype),_.prototype.constructor=_,m.prototype=Object.create(f.prototype),m.prototype.constructor=m,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(g.prototype=Object.create(f.prototype),g.prototype.constructor=g),u}();function W(t){_(t,"svelte-g1wob2",".link.svelte-g1wob2{color:blue;text-decoration:underline;cursor:pointer}")}function K(t){let e,n,i,r;const o=t[6].default,u=a(o,t,t[5],null);return{c(){e=v("button"),u&&u.c()},l(t){e=E(t,"BUTTON",{});var n=w(e);u&&u.l(n),n.forEach(y)},m(o,a){g(o,e,a),u&&u.m(e,null),n=!0,i||(r=k(e,"click",(function(){s(t[4](t[0],t[1],t[3]))&&t[4](t[0],t[1],t[3]).apply(this,arguments)})),i=!0)},p(e,i){t=e,u&&u.p&&(!n||32&i)&&c(u,o,t,t[5],n?l(o,t[5],i,null):h(t[5]),null)},i(t){n||(M(u,t),n=!0)},o(t){P(u,t),n=!1},d(t){t&&y(e),u&&u.d(t),i=!1,r()}}}function H(t){let e,n,i,r;const o=t[6].default,u=a(o,t,t[5],null);return{c(){e=v("span"),u&&u.c(),this.h()},l(t){e=E(t,"SPAN",{class:!0});var n=w(e);u&&u.l(n),n.forEach(y),this.h()},h(){var t,n,i;t=e,n="class",null==(i="link svelte-g1wob2")?t.removeAttribute(n):t.getAttribute(n)!==i&&t.setAttribute(n,i)},m(o,a){g(o,e,a),u&&u.m(e,null),n=!0,i||(r=k(e,"click",(function(){s(t[4](t[0],t[1],t[3]))&&t[4](t[0],t[1],t[3]).apply(this,arguments)})),i=!0)},p(e,i){t=e,u&&u.p&&(!n||32&i)&&c(u,o,t,t[5],n?l(o,t[5],i,null):h(t[5]),null)},i(t){n||(M(u,t),n=!0)},o(t){P(u,t),n=!1},d(t){t&&y(e),u&&u.d(t),i=!1,r()}}}function Q(t){let e,n,i,s;const o=[H,K],a=[];function u(t,e){return"link"===t[2]?0:1}return e=u(t),n=a[e]=o[e](t),{c(){n.c(),i=b()},l(t){n.l(t),i=b()},m(t,n){a[e].m(t,n),g(t,i,n),s=!0},p(t,[s]){let l=e;e=u(t),e===l?a[e].p(t,s):(F={r:0,c:[],p:F},P(a[l],1,1,(()=>{a[l]=null})),F.r||r(F.c),F=F.p,n=a[e],n?n.p(t,s):(n=a[e]=o[e](t),n.c()),M(n,1),n.m(i.parentNode,i))},i(t){s||(M(n),s=!0)},o(t){P(n),s=!1},d(t){a[e].d(t),t&&y(i)}}}function J(t,e,n){let{$$slots:i={},$$scope:r}=e,{data:s}=e,{filename:o="filename"}=e,{type:a="link"}=e,{bom:u=2}=e;return t.$$set=t=>{"data"in t&&n(0,s=t.data),"filename"in t&&n(1,o=t.filename),"type"in t&&n(2,a=t.type),"bom"in t&&n(3,u=t.bom),"$$scope"in t&&n(5,r=t.$$scope)},[s,o,a,u,function(t,e,n){const i=n?"\ufeff":"";let r=null;r="object"==typeof t&&q?q.unparse(t):t;const s=new Blob([`${i}${r}`],{type:"text/csv;charset=utf-8;"});let o=null;o=navigator.msSaveBlob?navigator.msSaveBlob(s,`${e}.csv`):window.URL.createObjectURL(s);const a=document.createElement("a");a.href=o,a.setAttribute("download",`${e}.csv`),a.click(),a.remove()},r,i]}class X extends class{$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=e}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}{constructor(t){super(),B(this,t,J,Q,o,{data:0,filename:1,type:2,bom:3},W)}}export{X as CSVDownloader};
import t from"stream";function e(){}function n(t){return t()}function r(){return Object.create(null)}function i(t){t.forEach(n)}function s(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function a(t,e,n,r){if(t){const i=u(t,e,n,r);return t[0](i)}}function u(t,e,n,r){return t[1]&&r?function(t,e){for(const n in e)t[n]=e[n];return t}(n.ctx.slice(),t[1](r(e))):n.ctx}function l(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(void 0===e.dirty)return i;if("object"==typeof i){const t=[],n=Math.max(e.dirty.length,i.length);for(let r=0;r<n;r+=1)t[r]=e.dirty[r]|i[r];return t}return e.dirty|i}return e.dirty}function c(t,e,n,r,i,s){if(i){const o=u(e,n,r,s);t.p(o,i)}}function h(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let t=0;t<n;t++)e[t]=-1;return e}return-1}let f,d=!1;function p(t,e,n,r){for(;t<e;){const i=t+(e-t>>1);n(i)<=r?t=i+1:e=i}return t}function _(t,e,n){const r=function(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;if(e&&e.host)return e;return t.ownerDocument}(t);if(!r.getElementById(e)){const t=v("style");t.id=e,t.textContent=n,function(t,e){!function(t,e){t.appendChild(e)}(t.head||t,e)}(r,t)}}function m(t,e){if(d){for(!function(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if("HEAD"===t.nodeName){const t=[];for(let n=0;n<e.length;n++){const r=e[n];void 0!==r.claim_order&&t.push(r)}e=t}const n=new Int32Array(e.length+1),r=new Int32Array(e.length);n[0]=-1;let i=0;for(let t=0;t<e.length;t++){const s=e[t].claim_order,o=(i>0&&e[n[i]].claim_order<=s?i+1:p(1,i,(t=>e[n[t]].claim_order),s))-1;r[t]=n[o]+1;const a=o+1;n[a]=t,i=Math.max(a,i)}const s=[],o=[];let a=e.length-1;for(let t=n[i]+1;0!=t;t=r[t-1]){for(s.push(e[t-1]);a>=t;a--)o.push(e[a]);a--}for(;a>=0;a--)o.push(e[a]);s.reverse(),o.sort(((t,e)=>t.claim_order-e.claim_order));for(let e=0,n=0;e<o.length;e++){for(;n<s.length&&o[e].claim_order>=s[n].claim_order;)n++;const r=n<s.length?s[n]:null;t.insertBefore(o[e],r)}}(t),(void 0===t.actual_end_child||null!==t.actual_end_child&&t.actual_end_child.parentElement!==t)&&(t.actual_end_child=t.firstChild);null!==t.actual_end_child&&void 0===t.actual_end_child.claim_order;)t.actual_end_child=t.actual_end_child.nextSibling;e!==t.actual_end_child?void 0===e.claim_order&&e.parentNode===t||t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling}else e.parentNode===t&&null===e.nextSibling||t.appendChild(e)}function g(t,e,n){d&&!n?m(t,e):e.parentNode===t&&e.nextSibling==n||t.insertBefore(e,n||null)}function y(t){t.parentNode.removeChild(t)}function v(t){return document.createElement(t)}function b(){return t="",document.createTextNode(t);var t}function k(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function w(t){return Array.from(t.childNodes)}function E(t,e,n){return function(t,e,n,r){return function(t,e,n,r,i=!1){!function(t){void 0===t.claim_info&&(t.claim_info={last_index:0,total_claimed:0})}(t);const s=(()=>{for(let r=t.claim_info.last_index;r<t.length;r++){const s=t[r];if(e(s)){const e=n(s);return void 0===e?t.splice(r,1):t[r]=e,i||(t.claim_info.last_index=r),s}}for(let r=t.claim_info.last_index-1;r>=0;r--){const s=t[r];if(e(s)){const e=n(s);return void 0===e?t.splice(r,1):t[r]=e,i?void 0===e&&t.claim_info.last_index--:t.claim_info.last_index=r,s}}return r()})();return s.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,s}(t,(t=>t.nodeName===e),(t=>{const e=[];for(let r=0;r<t.attributes.length;r++){const i=t.attributes[r];n[i.name]||e.push(i.name)}e.forEach((e=>t.removeAttribute(e)))}),(()=>r(e)))}(t,e,n,v)}function x(t){f=t}const C=[],R=[],S=[],O=[],$=Promise.resolve();let T=!1;function A(t){S.push(t)}const D=new Set;let I=0;function L(){const t=f;do{for(;I<C.length;){const t=C[I];I++,x(t),j(t.$$)}for(x(null),C.length=0,I=0;R.length;)R.pop()();for(let t=0;t<S.length;t+=1){const e=S[t];D.has(e)||(D.add(e),e())}S.length=0}while(C.length);for(;O.length;)O.pop()();T=!1,D.clear(),x(t)}function j(t){if(null!==t.fragment){t.update(),i(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(A)}}const F=new Set;let N;function M(t,e){t&&t.i&&(F.delete(t),t.i(e))}function P(t,e,n,r){if(t&&t.o){if(F.has(t))return;F.add(t),N.c.push((()=>{F.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}}function z(t,e){-1===t.$$.dirty[0]&&(C.push(t),T||(T=!0,$.then(L)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function B(t,o,a,u,l,c,h,p=[-1]){const _=f;x(t);const m=t.$$={fragment:null,ctx:null,props:c,update:e,not_equal:l,bound:r(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(o.context||(_?_.$$.context:[])),callbacks:r(),dirty:p,skip_bound:!1,root:o.target||_.$$.root};h&&h(m.root);let g=!1;if(m.ctx=a?a(t,o.props||{},((e,n,...r)=>{const i=r.length?r[0]:n;return m.ctx&&l(m.ctx[e],m.ctx[e]=i)&&(!m.skip_bound&&m.bound[e]&&m.bound[e](i),g&&z(t,e)),n})):[],m.update(),g=!0,i(m.before_update),m.fragment=!!u&&u(m.ctx),o.target){if(o.hydrate){d=!0;const t=w(o.target);m.fragment&&m.fragment.l(t),t.forEach(y)}else m.fragment&&m.fragment.c();o.intro&&M(t.$$.fragment),function(t,e,r,o){const{fragment:a,on_mount:u,on_destroy:l,after_update:c}=t.$$;a&&a.m(e,r),o||A((()=>{const e=u.map(n).filter(s);l?l.push(...e):i(e),t.$$.on_mount=[]})),c.forEach(A)}(t,o.target,o.anchor,o.customElement),d=!1,L()}x(_)}class U{$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(i(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=e}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var q={exports:{}},W=q.exports=function e(){var n="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n?n:{};function r(){var t=n.URL||n.webkitURL||null,r=e.toString();return u.BLOB_URL||(u.BLOB_URL=t.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))}var i=!n.document&&!!n.postMessage,s=i&&/blob:/i.test((n.location||{}).protocol),o={},a=0,u={};if(u.parse=c,u.unparse=h,u.RECORD_SEP=String.fromCharCode(30),u.UNIT_SEP=String.fromCharCode(31),u.BYTE_ORDER_MARK="\ufeff",u.BAD_DELIMITERS=["\r","\n",'"',u.BYTE_ORDER_MARK],u.WORKERS_SUPPORTED=!i&&!!n.Worker,u.NODE_STREAM_INPUT=1,u.LocalChunkSize=10485760,u.RemoteChunkSize=5242880,u.DefaultDelimiter=",",u.Parser=b,u.ParserHandle=y,u.NetworkStreamer=d,u.FileStreamer=p,u.StringStreamer=_,u.ReadableStreamStreamer=m,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(u.DuplexStreamStreamer=g),n.jQuery){var l=n.jQuery;l.fn.parse=function(t){var e=t.config||{},r=[];return this.each((function(t){if("INPUT"!==l(this).prop("tagName").toUpperCase()||"file"!==l(this).attr("type").toLowerCase()||!n.FileReader||!this.files||0===this.files.length)return!0;for(var i=0;i<this.files.length;i++)r.push({file:this.files[i],inputElem:this,instanceConfig:l.extend({},e)})})),i(),this;function i(){if(0!==r.length){var e=r[0];if(O(t.before)){var n=t.before(e.file,e.inputElem);if("object"==typeof n){if("abort"===n.action)return void s("AbortError",e.file,e.inputElem,n.reason);if("skip"===n.action)return void o();"object"==typeof n.config&&(e.instanceConfig=l.extend(e.instanceConfig,n.config))}else if("skip"===n)return void o()}var i=e.instanceConfig.complete;e.instanceConfig.complete=function(t){O(i)&&i(t,e.file,e.inputElem),o()},u.parse(e.file,e.instanceConfig)}else O(t.complete)&&t.complete()}function s(e,n,r,i){O(t.error)&&t.error({name:e},n,r,i)}function o(){r.splice(0,1),i()}}}function c(t,e){var r=(e=e||{}).dynamicTyping||!1;if(O(r)&&(e.dynamicTypingFunction=r,r={}),e.dynamicTyping=r,e.transform=!!O(e.transform)&&e.transform,e.worker&&u.WORKERS_SUPPORTED){var i=k();return i.userStep=e.step,i.userChunk=e.chunk,i.userComplete=e.complete,i.userError=e.error,e.step=O(e.step),e.chunk=O(e.chunk),e.complete=O(e.complete),e.error=O(e.error),delete e.worker,void i.postMessage({input:t,config:e,workerId:i.id})}var s=null;return t===u.NODE_STREAM_INPUT&&"undefined"==typeof PAPA_BROWSER_CONTEXT?(s=new g(e)).getStream():("string"==typeof t?s=e.download?new d(e):new _(e):!0===t.readable&&O(t.read)&&O(t.on)?s=new m(e):(n.File&&t instanceof File||t instanceof Object)&&(s=new p(e)),s.stream(t))}function h(t,e){var n=!1,r=!0,i=",",s="\r\n",o='"',a=o+o,l=!1,c=null,h=!1;d();var f=new RegExp(v(o),"g");if("string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return p(null,t,l);if("object"==typeof t[0])return p(c||Object.keys(t[0]),t,l)}else if("object"==typeof t)return"string"==typeof t.data&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:"object"==typeof t.data[0]?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||"object"==typeof t.data[0]||(t.data=[t.data])),p(t.fields||[],t.data||[],l);throw new Error("Unable to serialize unrecognized input");function d(){if("object"==typeof e){if("string"!=typeof e.delimiter||u.BAD_DELIMITERS.filter((function(t){return-1!==e.delimiter.indexOf(t)})).length||(i=e.delimiter),("boolean"==typeof e.quotes||"function"==typeof e.quotes||Array.isArray(e.quotes))&&(n=e.quotes),"boolean"!=typeof e.skipEmptyLines&&"string"!=typeof e.skipEmptyLines||(l=e.skipEmptyLines),"string"==typeof e.newline&&(s=e.newline),"string"==typeof e.quoteChar&&(o=e.quoteChar),"boolean"==typeof e.header&&(r=e.header),Array.isArray(e.columns)){if(0===e.columns.length)throw new Error("Option columns is empty");c=e.columns}void 0!==e.escapeChar&&(a=e.escapeChar+o),"boolean"==typeof e.escapeFormulae&&(h=e.escapeFormulae)}}function p(t,e,n){var o="";"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof e&&(e=JSON.parse(e));var a=Array.isArray(t)&&t.length>0,u=!Array.isArray(e[0]);if(a&&r){for(var l=0;l<t.length;l++)l>0&&(o+=i),o+=_(t[l],l);e.length>0&&(o+=s)}for(var c=0;c<e.length;c++){var h=a?t.length:e[c].length,f=!1,d=a?0===Object.keys(e[c]).length:0===e[c].length;if(n&&!a&&(f="greedy"===n?""===e[c].join("").trim():1===e[c].length&&0===e[c][0].length),"greedy"===n&&a){for(var p=[],m=0;m<h;m++){var g=u?t[m]:m;p.push(e[c][g])}f=""===p.join("").trim()}if(!f){for(var y=0;y<h;y++){y>0&&!d&&(o+=i);var v=a&&u?t[y]:y;o+=_(e[c][v],y)}c<e.length-1&&(!n||h>0&&!d)&&(o+=s)}}return o}function _(t,e){if(null==t)return"";if(t.constructor===Date)return JSON.stringify(t).slice(1,25);!0===h&&"string"==typeof t&&null!==t.match(/^[=+\-@].*$/)&&(t="'"+t);var r=t.toString().replace(f,a);return"boolean"==typeof n&&n||"function"==typeof n&&n(t,e)||Array.isArray(n)&&n[e]||m(r,u.BAD_DELIMITERS)||r.indexOf(i)>-1||" "===r.charAt(0)||" "===r.charAt(r.length-1)?o+r+o:r}function m(t,e){for(var n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return!0;return!1}}function f(t){function e(t){var e=R(t);e.chunkSize=parseInt(e.chunkSize),t.step||t.chunk||(e.chunkSize=null),this._handle=new y(e),this._handle.streamer=this,this._config=e}this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},e.call(this,t),this.parseChunk=function(t,e){if(this.isFirstChunk&&O(this._config.beforeFirstChunk)){var r=this._config.beforeFirstChunk(t);void 0!==r&&(t=r)}this.isFirstChunk=!1,this._halted=!1;var i=this._partialLine+t;this._partialLine="";var o=this._handle.parse(i,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var a=o.meta.cursor;this._finished||(this._partialLine=i.substring(a-this._baseIndex),this._baseIndex=a),o&&o.data&&(this._rowCount+=o.data.length);var l=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(s)n.postMessage({results:o,workerId:u.WORKER_ID,finished:l});else if(O(this._config.chunk)&&!e){if(this._config.chunk(o,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);o=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(o.data),this._completeResults.errors=this._completeResults.errors.concat(o.errors),this._completeResults.meta=o.meta),this._completed||!l||!O(this._config.complete)||o&&o.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),l||o&&o.meta.paused||this._nextChunk(),o}this._halted=!0},this._sendError=function(t){O(this._config.error)?this._config.error(t):s&&this._config.error&&n.postMessage({workerId:u.WORKER_ID,error:t,finished:!1})}}function d(t){var e;function n(t){var e=t.getResponseHeader("Content-Range");return null===e?-1:parseInt(e.substring(e.lastIndexOf("/")+1))}(t=t||{}).chunkSize||(t.chunkSize=u.RemoteChunkSize),f.call(this,t),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(t){this._input=t,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),i||(e.onload=S(this._chunkLoaded,this),e.onerror=S(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!i),this._config.downloadRequestHeaders){var t=this._config.downloadRequestHeaders;for(var n in t)e.setRequestHeader(n,t[n])}if(this._config.chunkSize){var r=this._start+this._config.chunkSize-1;e.setRequestHeader("Range","bytes="+this._start+"-"+r)}try{e.send(this._config.downloadRequestBody)}catch(t){this._chunkError(t.message)}i&&0===e.status&&this._chunkError()}},this._chunkLoaded=function(){4===e.readyState&&(e.status<200||e.status>=400?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:e.responseText.length,this._finished=!this._config.chunkSize||this._start>=n(e),this.parseChunk(e.responseText)))},this._chunkError=function(t){var n=e.statusText||t;this._sendError(new Error(n))}}function p(t){var e,n;(t=t||{}).chunkSize||(t.chunkSize=u.LocalChunkSize),f.call(this,t);var r="undefined"!=typeof FileReader;this.stream=function(t){this._input=t,n=t.slice||t.webkitSlice||t.mozSlice,r?((e=new FileReader).onload=S(this._chunkLoaded,this),e.onerror=S(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var t=this._input;if(this._config.chunkSize){var i=Math.min(this._start+this._config.chunkSize,this._input.size);t=n.call(t,this._start,i)}var s=e.readAsText(t,this._config.encoding);r||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(t){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(t.target.result)},this._chunkError=function(){this._sendError(e.error)}}function _(t){var e;t=t||{},f.call(this,t),this.stream=function(t){return e=t,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var t,n=this._config.chunkSize;return n?(t=e.substring(0,n),e=e.substring(n)):(t=e,e=""),this._finished=!e,this.parseChunk(t)}}}function m(t){t=t||{},f.call(this,t);var e=[],n=!0,r=!1;this.pause=function(){f.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){f.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(t){this._input=t,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===e.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):n=!0},this._streamData=S((function(t){try{e.push("string"==typeof t?t:t.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(t){this._streamError(t)}}),this),this._streamError=S((function(t){this._streamCleanUp(),this._sendError(t)}),this),this._streamEnd=S((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=S((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function g(e){var n=t.Duplex,r=R(e),i=!0,s=!1,o=[],a=null;this._onCsvData=function(t){var e=t.data;a.push(e)||this._handle.paused()||this._handle.pause()},this._onCsvComplete=function(){a.push(null)},r.step=S(this._onCsvData,this),r.complete=S(this._onCsvComplete,this),f.call(this,r),this._nextChunk=function(){s&&1===o.length&&(this._finished=!0),o.length?o.shift()():i=!0},this._addToParseQueue=function(t,e){o.push(S((function(){if(this.parseChunk("string"==typeof t?t:t.toString(r.encoding)),O(e))return e()}),this)),i&&(i=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(t,e,n){this._addToParseQueue(t,n)},this._onWriteComplete=function(){s=!0,this._addToParseQueue("")},this.getStream=function(){return a},(a=new n({readableObjectMode:!0,decodeStrings:!1,read:S(this._onRead,this),write:S(this._onWrite,this)})).once("finish",S(this._onWriteComplete,this))}function y(t){var e,n,r,i=Math.pow(2,53),s=-i,o=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,l=this,c=0,h=0,f=!1,d=!1,p=[],_={data:[],errors:[],meta:{}};if(O(t.step)){var m=t.step;t.step=function(e){if(_=e,w())k();else{if(k(),0===_.data.length)return;c+=e.data.length,t.preview&&c>t.preview?n.abort():(_.data=_.data[0],m(_,l))}}}function g(e){return"greedy"===t.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function y(t){if(o.test(t)){var e=parseFloat(t);if(e>s&&e<i)return!0}return!1}function k(){if(_&&r&&(A("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+u.DefaultDelimiter+"'"),r=!1),t.skipEmptyLines)for(var e=0;e<_.data.length;e++)g(_.data[e])&&_.data.splice(e--,1);return w()&&E(),S()}function w(){return t.header&&0===p.length}function E(){if(_)if(Array.isArray(_.data[0])){for(var e=0;w()&&e<_.data.length;e++)_.data[e].forEach(n);_.data.splice(0,1)}else _.data.forEach(n);function n(e,n){O(t.transformHeader)&&(e=t.transformHeader(e,n)),p.push(e)}}function x(e){return t.dynamicTypingFunction&&void 0===t.dynamicTyping[e]&&(t.dynamicTyping[e]=t.dynamicTypingFunction(e)),!0===(t.dynamicTyping[e]||t.dynamicTyping)}function C(t,e){return x(t)?"true"===e||"TRUE"===e||"false"!==e&&"FALSE"!==e&&(y(e)?parseFloat(e):a.test(e)?new Date(e):""===e?null:e):e}function S(){if(!_||!t.header&&!t.dynamicTyping&&!t.transform)return _;function e(e,n){var r,i=t.header?{}:[];for(r=0;r<e.length;r++){var s=r,o=e[r];t.header&&(s=r>=p.length?"__parsed_extra":p[r]),t.transform&&(o=t.transform(o,s)),o=C(s,o),"__parsed_extra"===s?(i[s]=i[s]||[],i[s].push(o)):i[s]=o}return t.header&&(r>p.length?A("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+r,h+n):r<p.length&&A("FieldMismatch","TooFewFields","Too few fields: expected "+p.length+" fields but parsed "+r,h+n)),i}var n=1;return!_.data.length||Array.isArray(_.data[0])?(_.data=_.data.map(e),n=_.data.length):_.data=e(_.data,0),t.header&&_.meta&&(_.meta.fields=p),h+=n,_}function $(e,n,r,i,s){var o,a,l,c;s=s||[",","\t","|",";",u.RECORD_SEP,u.UNIT_SEP];for(var h=0;h<s.length;h++){var f=s[h],d=0,p=0,_=0;l=void 0;for(var m=new b({comments:i,delimiter:f,newline:n,preview:10}).parse(e),y=0;y<m.data.length;y++)if(r&&g(m.data[y]))_++;else{var v=m.data[y].length;p+=v,void 0!==l?v>0&&(d+=Math.abs(v-l),l=v):l=v}m.data.length>0&&(p/=m.data.length-_),(void 0===a||d<=a)&&(void 0===c||p>c)&&p>1.99&&(a=d,o=f,c=p)}return t.delimiter=o,{successful:!!o,bestDelimiter:o}}function T(t,e){t=t.substring(0,1048576);var n=new RegExp(v(e)+"([^]*?)"+v(e),"gm"),r=(t=t.replace(n,"")).split("\r"),i=t.split("\n"),s=i.length>1&&i[0].length<r[0].length;if(1===r.length||s)return"\n";for(var o=0,a=0;a<r.length;a++)"\n"===r[a][0]&&o++;return o>=r.length/2?"\r\n":"\r"}function A(t,e,n,r){var i={type:t,code:e,message:n};void 0!==r&&(i.row=r),_.errors.push(i)}this.parse=function(i,s,o){var a=t.quoteChar||'"';if(t.newline||(t.newline=T(i,a)),r=!1,t.delimiter)O(t.delimiter)&&(t.delimiter=t.delimiter(i),_.meta.delimiter=t.delimiter);else{var l=$(i,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess);l.successful?t.delimiter=l.bestDelimiter:(r=!0,t.delimiter=u.DefaultDelimiter),_.meta.delimiter=t.delimiter}var c=R(t);return t.preview&&t.header&&c.preview++,e=i,n=new b(c),_=n.parse(e,s,o),k(),f?{meta:{paused:!0}}:_||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,n.abort(),e=O(t.chunk)?"":e.substring(n.getCharIndex())},this.resume=function(){l.streamer._halted?(f=!1,l.streamer.parseChunk(e,!0)):setTimeout(l.resume,3)},this.aborted=function(){return d},this.abort=function(){d=!0,n.abort(),_.meta.aborted=!0,O(t.complete)&&t.complete(_),e=""}}function v(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(t){var e,n=(t=t||{}).delimiter,r=t.newline,i=t.comments,s=t.step,o=t.preview,a=t.fastMode,l=e=void 0===t.quoteChar?'"':t.quoteChar;if(void 0!==t.escapeChar&&(l=t.escapeChar),("string"!=typeof n||u.BAD_DELIMITERS.indexOf(n)>-1)&&(n=","),i===n)throw new Error("Comment character same as delimiter");!0===i?i="#":("string"!=typeof i||u.BAD_DELIMITERS.indexOf(i)>-1)&&(i=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var c=0,h=!1;this.parse=function(t,u,f){if("string"!=typeof t)throw new Error("Input must be a string");var d=t.length,p=n.length,_=r.length,m=i.length,g=O(s);c=0;var y=[],b=[],k=[],w=0;if(!t)return F();if(a||!1!==a&&-1===t.indexOf(e)){for(var E=t.split(r),x=0;x<E.length;x++){if(k=E[x],c+=k.length,x!==E.length-1)c+=r.length;else if(f)return F();if(!i||k.substring(0,m)!==i){if(g){if(y=[],D(k.split(n)),N(),h)return F()}else D(k.split(n));if(o&&x>=o)return y=y.slice(0,o),F(!0)}}return F()}for(var C=t.indexOf(n,c),R=t.indexOf(r,c),S=new RegExp(v(l)+v(e),"g"),$=t.indexOf(e,c);;)if(t[c]!==e)if(i&&0===k.length&&t.substring(c,c+m)===i){if(-1===R)return F();c=R+_,R=t.indexOf(r,c),C=t.indexOf(n,c)}else if(-1!==C&&(C<R||-1===R))k.push(t.substring(c,C)),c=C+p,C=t.indexOf(n,c);else{if(-1===R)break;if(k.push(t.substring(c,R)),j(R+_),g&&(N(),h))return F();if(o&&y.length>=o)return F(!0)}else for($=c,c++;;){if(-1===($=t.indexOf(e,$+1)))return f||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:y.length,index:c}),L();if($===d-1)return L(t.substring(c,$).replace(S,e));if(e!==l||t[$+1]!==l){if(e===l||0===$||t[$-1]!==l){-1!==C&&C<$+1&&(C=t.indexOf(n,$+1)),-1!==R&&R<$+1&&(R=t.indexOf(r,$+1));var T=I(-1===R?C:Math.min(C,R));if(t[$+1+T]===n){k.push(t.substring(c,$).replace(S,e)),c=$+1+T+p,t[$+1+T+p]!==e&&($=t.indexOf(e,c)),C=t.indexOf(n,c),R=t.indexOf(r,c);break}var A=I(R);if(t.substring($+1+A,$+1+A+_)===r){if(k.push(t.substring(c,$).replace(S,e)),j($+1+A+_),C=t.indexOf(n,c),$=t.indexOf(e,c),g&&(N(),h))return F();if(o&&y.length>=o)return F(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:y.length,index:c}),$++}}else $++}return L();function D(t){y.push(t),w=c}function I(e){var n=0;if(-1!==e){var r=t.substring($+1,e);r&&""===r.trim()&&(n=r.length)}return n}function L(e){return f||(void 0===e&&(e=t.substring(c)),k.push(e),c=d,D(k),g&&N()),F()}function j(e){c=e,D(k),k=[],R=t.indexOf(r,c)}function F(t){return{data:y,errors:b,meta:{delimiter:n,linebreak:r,aborted:h,truncated:!!t,cursor:w+(u||0)}}}function N(){s(F()),y=[],b=[]}},this.abort=function(){h=!0},this.getCharIndex=function(){return c}}function k(){if(!u.WORKERS_SUPPORTED)return!1;var t=r(),e=new n.Worker(t);return e.onmessage=w,e.id=a++,o[e.id]=e,e}function w(t){var e=t.data,n=o[e.workerId],r=!1;if(e.error)n.userError(e.error,e.file);else if(e.results&&e.results.data){var i={abort:function(){r=!0,E(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:x,resume:x};if(O(n.userStep)){for(var s=0;s<e.results.data.length&&(n.userStep({data:e.results.data[s],errors:e.results.errors,meta:e.results.meta},i),!r);s++);delete e.results}else O(n.userChunk)&&(n.userChunk(e.results,i,e.file),delete e.results)}e.finished&&!r&&E(e.workerId,e.results)}function E(t,e){var n=o[t];O(n.userComplete)&&n.userComplete(e),n.terminate(),delete o[t]}function x(){throw new Error("Not implemented.")}function C(t){var e=t.data;if(void 0===u.WORKER_ID&&e&&(u.WORKER_ID=e.workerId),"string"==typeof e.input)n.postMessage({workerId:u.WORKER_ID,results:u.parse(e.input,e.config),finished:!0});else if(n.File&&e.input instanceof File||e.input instanceof Object){var r=u.parse(e.input,e.config);r&&n.postMessage({workerId:u.WORKER_ID,results:r,finished:!0})}}function R(t){if("object"!=typeof t||null===t)return t;var e=Array.isArray(t)?[]:{};for(var n in t)e[n]=R(t[n]);return e}function S(t,e){return function(){t.apply(e,arguments)}}function O(t){return"function"==typeof t}return s&&(n.onmessage=C),d.prototype=Object.create(f.prototype),d.prototype.constructor=d,p.prototype=Object.create(f.prototype),p.prototype.constructor=p,_.prototype=Object.create(_.prototype),_.prototype.constructor=_,m.prototype=Object.create(f.prototype),m.prototype.constructor=m,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(g.prototype=Object.create(f.prototype),g.prototype.constructor=g),u}();function K(t){_(t,"svelte-g1wob2",".link.svelte-g1wob2{color:blue;text-decoration:underline;cursor:pointer}")}function H(t){let e,n,r,i;const o=t[6].default,u=a(o,t,t[5],null);return{c(){e=v("button"),u&&u.c()},l(t){e=E(t,"BUTTON",{});var n=w(e);u&&u.l(n),n.forEach(y)},m(o,a){g(o,e,a),u&&u.m(e,null),n=!0,r||(i=k(e,"click",(function(){s(t[4](t[0],t[1],t[3]))&&t[4](t[0],t[1],t[3]).apply(this,arguments)})),r=!0)},p(e,r){t=e,u&&u.p&&(!n||32&r)&&c(u,o,t,t[5],n?l(o,t[5],r,null):h(t[5]),null)},i(t){n||(M(u,t),n=!0)},o(t){P(u,t),n=!1},d(t){t&&y(e),u&&u.d(t),r=!1,i()}}}function Q(t){let e,n,r,i;const o=t[6].default,u=a(o,t,t[5],null);return{c(){e=v("span"),u&&u.c(),this.h()},l(t){e=E(t,"SPAN",{class:!0});var n=w(e);u&&u.l(n),n.forEach(y),this.h()},h(){var t,n,r;t=e,n="class",null==(r="link svelte-g1wob2")?t.removeAttribute(n):t.getAttribute(n)!==r&&t.setAttribute(n,r)},m(o,a){g(o,e,a),u&&u.m(e,null),n=!0,r||(i=k(e,"click",(function(){s(t[4](t[0],t[1],t[3]))&&t[4](t[0],t[1],t[3]).apply(this,arguments)})),r=!0)},p(e,r){t=e,u&&u.p&&(!n||32&r)&&c(u,o,t,t[5],n?l(o,t[5],r,null):h(t[5]),null)},i(t){n||(M(u,t),n=!0)},o(t){P(u,t),n=!1},d(t){t&&y(e),u&&u.d(t),r=!1,i()}}}function J(t){let e,n,r,s;const o=[Q,H],a=[];function u(t,e){return"link"===t[2]?0:1}return e=u(t),n=a[e]=o[e](t),{c(){n.c(),r=b()},l(t){n.l(t),r=b()},m(t,n){a[e].m(t,n),g(t,r,n),s=!0},p(t,[s]){let l=e;e=u(t),e===l?a[e].p(t,s):(N={r:0,c:[],p:N},P(a[l],1,1,(()=>{a[l]=null})),N.r||i(N.c),N=N.p,n=a[e],n?n.p(t,s):(n=a[e]=o[e](t),n.c()),M(n,1),n.m(r.parentNode,r))},i(t){s||(M(n),s=!0)},o(t){P(n),s=!1},d(t){a[e].d(t),t&&y(r)}}}function X(t,e,n){let{$$slots:r={},$$scope:i}=e,{data:s}=e,{filename:o="filename"}=e,{type:a="link"}=e,{bom:u=2}=e;return t.$$set=t=>{"data"in t&&n(0,s=t.data),"filename"in t&&n(1,o=t.filename),"type"in t&&n(2,a=t.type),"bom"in t&&n(3,u=t.bom),"$$scope"in t&&n(5,i=t.$$scope)},[s,o,a,u,function(t,e,n){const r=n?"\ufeff":"";let i=null;i="object"==typeof t?W.unparse(t):t;const s=new Blob([`${r}${i}`],{type:"text/csv;charset=utf-8;"});let o=null;o=navigator.msSaveBlob?navigator.msSaveBlob(s,`${e}.csv`):window.URL.createObjectURL(s);const a=document.createElement("a");a.href=o,a.setAttribute("download",`${e}.csv`),a.click(),a.remove()},i,r]}class V extends U{constructor(t){super(),B(this,t,X,J,o,{data:0,filename:1,type:2,bom:3},K)}}function Z(t,e,n){return[function(t,e){return W.unparse(t,e)}]}class G extends U{constructor(t){super(),B(this,t,Z,null,o,{jsonToCSV:0})}get jsonToCSV(){return this.$$.ctx[0]}}function Y(t,e,n){return[function(t,e){W.parse(t,Object.assign({},{download:!0},e))}]}class tt extends U{constructor(t){super(),B(this,t,Y,null,o,{readRemoteFile:0})}get readRemoteFile(){return this.$$.ctx[0]}}function et(t,e,n){return[function(t,e){return W.parse(t,e)}]}class nt extends U{constructor(t){super(),B(this,t,et,null,o,{readString:0})}get readString(){return this.$$.ctx[0]}}export{V as CSVDownloader,G as jsonToCSVr,tt as readRemoteFile,nt as readString};
//# sourceMappingURL=svelte-csv.es.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("stream")):"function"==typeof define&&define.amd?define(["exports","stream"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["svelte-csv"]={},e.require$$0)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(t);function r(){}function s(e){return e()}function o(){return Object.create(null)}function a(e){e.forEach(s)}function u(e){return"function"==typeof e}function l(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function c(e,t,n,i){if(e){const r=h(e,t,n,i);return e[0](r)}}function h(e,t,n,i){return e[1]&&i?function(e,t){for(const n in t)e[n]=t[n];return e}(n.ctx.slice(),e[1](i(t))):n.ctx}function f(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],n=Math.max(t.dirty.length,r.length);for(let i=0;i<n;i+=1)e[i]=t.dirty[i]|r[i];return e}return t.dirty|r}return t.dirty}function d(e,t,n,i,r,s){if(r){const o=h(t,n,i,s);e.p(o,r)}}function p(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}let _,m=!1;function g(e,t,n,i){for(;e<t;){const r=e+(t-e>>1);n(r)<=i?e=r+1:t=r}return e}function y(e,t,n){const i=function(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;if(t&&t.host)return t;return e.ownerDocument}(e);if(!i.getElementById(t)){const e=w("style");e.id=t,e.textContent=n,function(e,t){!function(e,t){e.appendChild(t)}(e.head||e,t)}(i,e)}}function v(e,t){if(m){for(!function(e){if(e.hydrate_init)return;e.hydrate_init=!0;let t=e.childNodes;if("HEAD"===e.nodeName){const e=[];for(let n=0;n<t.length;n++){const i=t[n];void 0!==i.claim_order&&e.push(i)}t=e}const n=new Int32Array(t.length+1),i=new Int32Array(t.length);n[0]=-1;let r=0;for(let e=0;e<t.length;e++){const s=t[e].claim_order,o=(r>0&&t[n[r]].claim_order<=s?r+1:g(1,r,(e=>t[n[e]].claim_order),s))-1;i[e]=n[o]+1;const a=o+1;n[a]=e,r=Math.max(a,r)}const s=[],o=[];let a=t.length-1;for(let e=n[r]+1;0!=e;e=i[e-1]){for(s.push(t[e-1]);a>=e;a--)o.push(t[a]);a--}for(;a>=0;a--)o.push(t[a]);s.reverse(),o.sort(((e,t)=>e.claim_order-t.claim_order));for(let t=0,n=0;t<o.length;t++){for(;n<s.length&&o[t].claim_order>=s[n].claim_order;)n++;const i=n<s.length?s[n]:null;e.insertBefore(o[t],i)}}(e),(void 0===e.actual_end_child||null!==e.actual_end_child&&e.actual_end_child.parentElement!==e)&&(e.actual_end_child=e.firstChild);null!==e.actual_end_child&&void 0===e.actual_end_child.claim_order;)e.actual_end_child=e.actual_end_child.nextSibling;t!==e.actual_end_child?void 0===t.claim_order&&t.parentNode===e||e.insertBefore(t,e.actual_end_child):e.actual_end_child=t.nextSibling}else t.parentNode===e&&null===t.nextSibling||e.appendChild(t)}function b(e,t,n){m&&!n?v(e,t):t.parentNode===e&&t.nextSibling==n||e.insertBefore(t,n||null)}function k(e){e.parentNode.removeChild(e)}function w(e){return document.createElement(e)}function E(){return e="",document.createTextNode(e);var e}function x(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function C(e){return Array.from(e.childNodes)}function R(e,t,n){return function(e,t,n,i){return function(e,t,n,i,r=!1){!function(e){void 0===e.claim_info&&(e.claim_info={last_index:0,total_claimed:0})}(e);const s=(()=>{for(let i=e.claim_info.last_index;i<e.length;i++){const s=e[i];if(t(s)){const t=n(s);return void 0===t?e.splice(i,1):e[i]=t,r||(e.claim_info.last_index=i),s}}for(let i=e.claim_info.last_index-1;i>=0;i--){const s=e[i];if(t(s)){const t=n(s);return void 0===t?e.splice(i,1):e[i]=t,r?void 0===t&&e.claim_info.last_index--:e.claim_info.last_index=i,s}}return i()})();return s.claim_order=e.claim_info.total_claimed,e.claim_info.total_claimed+=1,s}(e,(e=>e.nodeName===t),(e=>{const t=[];for(let i=0;i<e.attributes.length;i++){const r=e.attributes[i];n[r.name]||t.push(r.name)}t.forEach((t=>e.removeAttribute(t)))}),(()=>i(t)))}(e,t,n,w)}function S(e){_=e}const O=[],T=[],$=[],A=[],D=Promise.resolve();let I=!1;function L(e){$.push(e)}const j=new Set;let N=0;function F(){const e=_;do{for(;N<O.length;){const e=O[N];N++,S(e),M(e.$$)}for(S(null),O.length=0,N=0;T.length;)T.pop()();for(let e=0;e<$.length;e+=1){const t=$[e];j.has(t)||(j.add(t),t())}$.length=0}while(O.length);for(;A.length;)A.pop()();I=!1,j.clear(),S(e)}function M(e){if(null!==e.fragment){e.update(),a(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(L)}}const P=new Set;let z;function B(e,t){e&&e.i&&(P.delete(e),e.i(t))}function U(e,t,n,i){if(e&&e.o){if(P.has(e))return;P.add(e),z.c.push((()=>{P.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}function q(e,t){-1===e.$$.dirty[0]&&(O.push(e),I||(I=!0,D.then(F)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function W(e,t,n,i,l,c,h,f=[-1]){const d=_;S(e);const p=e.$$={fragment:null,ctx:null,props:c,update:r,not_equal:l,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(d?d.$$.context:[])),callbacks:o(),dirty:f,skip_bound:!1,root:t.target||d.$$.root};h&&h(p.root);let g=!1;if(p.ctx=n?n(e,t.props||{},((t,n,...i)=>{const r=i.length?i[0]:n;return p.ctx&&l(p.ctx[t],p.ctx[t]=r)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](r),g&&q(e,t)),n})):[],p.update(),g=!0,a(p.before_update),p.fragment=!!i&&i(p.ctx),t.target){if(t.hydrate){m=!0;const e=C(t.target);p.fragment&&p.fragment.l(e),e.forEach(k)}else p.fragment&&p.fragment.c();t.intro&&B(e.$$.fragment),function(e,t,n,i){const{fragment:r,on_mount:o,on_destroy:l,after_update:c}=e.$$;r&&r.m(t,n),i||L((()=>{const t=o.map(s).filter(u);l?l.push(...t):a(t),e.$$.on_mount=[]})),c.forEach(L)}(e,t.target,t.anchor,t.customElement),m=!1,F()}S(d)}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var K={exports:{}};
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("stream")):"function"==typeof define&&define.amd?define(["exports","stream"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["svelte-csv"]={},e.require$$0)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(t);function r(){}function s(e){return e()}function o(){return Object.create(null)}function a(e){e.forEach(s)}function u(e){return"function"==typeof e}function l(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function c(e,t,n,i){if(e){const r=h(e,t,n,i);return e[0](r)}}function h(e,t,n,i){return e[1]&&i?function(e,t){for(const n in t)e[n]=t[n];return e}(n.ctx.slice(),e[1](i(t))):n.ctx}function f(e,t,n,i){if(e[2]&&i){const r=e[2](i(n));if(void 0===t.dirty)return r;if("object"==typeof r){const e=[],n=Math.max(t.dirty.length,r.length);for(let i=0;i<n;i+=1)e[i]=t.dirty[i]|r[i];return e}return t.dirty|r}return t.dirty}function d(e,t,n,i,r,s){if(r){const o=h(t,n,i,s);e.p(o,r)}}function p(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let e=0;e<n;e++)t[e]=-1;return t}return-1}let _,m=!1;function g(e,t,n,i){for(;e<t;){const r=e+(t-e>>1);n(r)<=i?e=r+1:t=r}return e}function y(e,t,n){const i=function(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;if(t&&t.host)return t;return e.ownerDocument}(e);if(!i.getElementById(t)){const e=w("style");e.id=t,e.textContent=n,function(e,t){!function(e,t){e.appendChild(t)}(e.head||e,t)}(i,e)}}function v(e,t){if(m){for(!function(e){if(e.hydrate_init)return;e.hydrate_init=!0;let t=e.childNodes;if("HEAD"===e.nodeName){const e=[];for(let n=0;n<t.length;n++){const i=t[n];void 0!==i.claim_order&&e.push(i)}t=e}const n=new Int32Array(t.length+1),i=new Int32Array(t.length);n[0]=-1;let r=0;for(let e=0;e<t.length;e++){const s=t[e].claim_order,o=(r>0&&t[n[r]].claim_order<=s?r+1:g(1,r,(e=>t[n[e]].claim_order),s))-1;i[e]=n[o]+1;const a=o+1;n[a]=e,r=Math.max(a,r)}const s=[],o=[];let a=t.length-1;for(let e=n[r]+1;0!=e;e=i[e-1]){for(s.push(t[e-1]);a>=e;a--)o.push(t[a]);a--}for(;a>=0;a--)o.push(t[a]);s.reverse(),o.sort(((e,t)=>e.claim_order-t.claim_order));for(let t=0,n=0;t<o.length;t++){for(;n<s.length&&o[t].claim_order>=s[n].claim_order;)n++;const i=n<s.length?s[n]:null;e.insertBefore(o[t],i)}}(e),(void 0===e.actual_end_child||null!==e.actual_end_child&&e.actual_end_child.parentElement!==e)&&(e.actual_end_child=e.firstChild);null!==e.actual_end_child&&void 0===e.actual_end_child.claim_order;)e.actual_end_child=e.actual_end_child.nextSibling;t!==e.actual_end_child?void 0===t.claim_order&&t.parentNode===e||e.insertBefore(t,e.actual_end_child):e.actual_end_child=t.nextSibling}else t.parentNode===e&&null===t.nextSibling||e.appendChild(t)}function b(e,t,n){m&&!n?v(e,t):t.parentNode===e&&t.nextSibling==n||e.insertBefore(t,n||null)}function k(e){e.parentNode.removeChild(e)}function w(e){return document.createElement(e)}function E(){return e="",document.createTextNode(e);var e}function x(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function C(e){return Array.from(e.childNodes)}function S(e,t,n){return function(e,t,n,i){return function(e,t,n,i,r=!1){!function(e){void 0===e.claim_info&&(e.claim_info={last_index:0,total_claimed:0})}(e);const s=(()=>{for(let i=e.claim_info.last_index;i<e.length;i++){const s=e[i];if(t(s)){const t=n(s);return void 0===t?e.splice(i,1):e[i]=t,r||(e.claim_info.last_index=i),s}}for(let i=e.claim_info.last_index-1;i>=0;i--){const s=e[i];if(t(s)){const t=n(s);return void 0===t?e.splice(i,1):e[i]=t,r?void 0===t&&e.claim_info.last_index--:e.claim_info.last_index=i,s}}return i()})();return s.claim_order=e.claim_info.total_claimed,e.claim_info.total_claimed+=1,s}(e,(e=>e.nodeName===t),(e=>{const t=[];for(let i=0;i<e.attributes.length;i++){const r=e.attributes[i];n[r.name]||t.push(r.name)}t.forEach((t=>e.removeAttribute(t)))}),(()=>i(t)))}(e,t,n,w)}function R(e){_=e}const O=[],$=[],T=[],A=[],D=Promise.resolve();let I=!1;function L(e){T.push(e)}const j=new Set;let F=0;function N(){const e=_;do{for(;F<O.length;){const e=O[F];F++,R(e),M(e.$$)}for(R(null),O.length=0,F=0;$.length;)$.pop()();for(let e=0;e<T.length;e+=1){const t=T[e];j.has(t)||(j.add(t),t())}T.length=0}while(O.length);for(;A.length;)A.pop()();I=!1,j.clear(),R(e)}function M(e){if(null!==e.fragment){e.update(),a(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(L)}}const P=new Set;let z;function B(e,t){e&&e.i&&(P.delete(e),e.i(t))}function U(e,t,n,i){if(e&&e.o){if(P.has(e))return;P.add(e),z.c.push((()=>{P.delete(e),i&&(n&&e.d(1),i())})),e.o(t)}}function q(e,t){-1===e.$$.dirty[0]&&(O.push(e),I||(I=!0,D.then(N)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function W(e,t,n,i,l,c,h,f=[-1]){const d=_;R(e);const p=e.$$={fragment:null,ctx:null,props:c,update:r,not_equal:l,bound:o(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(d?d.$$.context:[])),callbacks:o(),dirty:f,skip_bound:!1,root:t.target||d.$$.root};h&&h(p.root);let g=!1;if(p.ctx=n?n(e,t.props||{},((t,n,...i)=>{const r=i.length?i[0]:n;return p.ctx&&l(p.ctx[t],p.ctx[t]=r)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](r),g&&q(e,t)),n})):[],p.update(),g=!0,a(p.before_update),p.fragment=!!i&&i(p.ctx),t.target){if(t.hydrate){m=!0;const e=C(t.target);p.fragment&&p.fragment.l(e),e.forEach(k)}else p.fragment&&p.fragment.c();t.intro&&B(e.$$.fragment),function(e,t,n,i){const{fragment:r,on_mount:o,on_destroy:l,after_update:c}=e.$$;r&&r.m(t,n),i||L((()=>{const t=o.map(s).filter(u);l?l.push(...t):a(t),e.$$.on_mount=[]})),c.forEach(L)}(e,t.target,t.anchor,t.customElement),m=!1,N()}R(d)}class K{$destroy(){!function(e,t){const n=e.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=r}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var H={exports:{}};
/* @license

@@ -8,3 +8,3 @@ Papa Parse

*/
!function(e,t){e.exports=function e(){var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{};function n(){var n=t.URL||t.webkitURL||null,i=e.toString();return u.BLOB_URL||(u.BLOB_URL=n.createObjectURL(new Blob(["(",i,")();"],{type:"text/javascript"})))}var r=!t.document&&!!t.postMessage,s=r&&/blob:/i.test((t.location||{}).protocol),o={},a=0,u={};if(u.parse=c,u.unparse=h,u.RECORD_SEP=String.fromCharCode(30),u.UNIT_SEP=String.fromCharCode(31),u.BYTE_ORDER_MARK="\ufeff",u.BAD_DELIMITERS=["\r","\n",'"',u.BYTE_ORDER_MARK],u.WORKERS_SUPPORTED=!r&&!!t.Worker,u.NODE_STREAM_INPUT=1,u.LocalChunkSize=10485760,u.RemoteChunkSize=5242880,u.DefaultDelimiter=",",u.Parser=b,u.ParserHandle=y,u.NetworkStreamer=d,u.FileStreamer=p,u.StringStreamer=_,u.ReadableStreamStreamer=m,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(u.DuplexStreamStreamer=g),t.jQuery){var l=t.jQuery;l.fn.parse=function(e){var n=e.config||{},i=[];return this.each((function(e){if("INPUT"!==l(this).prop("tagName").toUpperCase()||"file"!==l(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var r=0;r<this.files.length;r++)i.push({file:this.files[r],inputElem:this,instanceConfig:l.extend({},n)})})),r(),this;function r(){if(0!==i.length){var t=i[0];if(O(e.before)){var n=e.before(t.file,t.inputElem);if("object"==typeof n){if("abort"===n.action)return void s("AbortError",t.file,t.inputElem,n.reason);if("skip"===n.action)return void o();"object"==typeof n.config&&(t.instanceConfig=l.extend(t.instanceConfig,n.config))}else if("skip"===n)return void o()}var r=t.instanceConfig.complete;t.instanceConfig.complete=function(e){O(r)&&r(e,t.file,t.inputElem),o()},u.parse(t.file,t.instanceConfig)}else O(e.complete)&&e.complete()}function s(t,n,i,r){O(e.error)&&e.error({name:t},n,i,r)}function o(){i.splice(0,1),r()}}}function c(e,n){var i=(n=n||{}).dynamicTyping||!1;if(O(i)&&(n.dynamicTypingFunction=i,i={}),n.dynamicTyping=i,n.transform=!!O(n.transform)&&n.transform,n.worker&&u.WORKERS_SUPPORTED){var r=k();return r.userStep=n.step,r.userChunk=n.chunk,r.userComplete=n.complete,r.userError=n.error,n.step=O(n.step),n.chunk=O(n.chunk),n.complete=O(n.complete),n.error=O(n.error),delete n.worker,void r.postMessage({input:e,config:n,workerId:r.id})}var s=null;return e===u.NODE_STREAM_INPUT&&"undefined"==typeof PAPA_BROWSER_CONTEXT?(s=new g(n)).getStream():("string"==typeof e?s=n.download?new d(n):new _(n):!0===e.readable&&O(e.read)&&O(e.on)?s=new m(n):(t.File&&e instanceof File||e instanceof Object)&&(s=new p(n)),s.stream(e))}function h(e,t){var n=!1,i=!0,r=",",s="\r\n",o='"',a=o+o,l=!1,c=null,h=!1;d();var f=new RegExp(v(o),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,l);if("object"==typeof e[0])return p(c||Object.keys(e[0]),e,l)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),p(e.fields||[],e.data||[],l);throw new Error("Unable to serialize unrecognized input");function d(){if("object"==typeof t){if("string"!=typeof t.delimiter||u.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(r=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(l=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(o=t.quoteChar),"boolean"==typeof t.header&&(i=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");c=t.columns}void 0!==t.escapeChar&&(a=t.escapeChar+o),"boolean"==typeof t.escapeFormulae&&(h=t.escapeFormulae)}}function p(e,t,n){var o="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&e.length>0,u=!Array.isArray(t[0]);if(a&&i){for(var l=0;l<e.length;l++)l>0&&(o+=r),o+=_(e[l],l);t.length>0&&(o+=s)}for(var c=0;c<t.length;c++){var h=a?e.length:t[c].length,f=!1,d=a?0===Object.keys(t[c]).length:0===t[c].length;if(n&&!a&&(f="greedy"===n?""===t[c].join("").trim():1===t[c].length&&0===t[c][0].length),"greedy"===n&&a){for(var p=[],m=0;m<h;m++){var g=u?e[m]:m;p.push(t[c][g])}f=""===p.join("").trim()}if(!f){for(var y=0;y<h;y++){y>0&&!d&&(o+=r);var v=a&&u?e[y]:y;o+=_(t[c][v],y)}c<t.length-1&&(!n||h>0&&!d)&&(o+=s)}}return o}function _(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===h&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var i=e.toString().replace(f,a);return"boolean"==typeof n&&n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||m(i,u.BAD_DELIMITERS)||i.indexOf(r)>-1||" "===i.charAt(0)||" "===i.charAt(i.length-1)?o+i+o:i}function m(e,t){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return!0;return!1}}function f(e){function n(e){var t=R(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new y(t),this._handle.streamer=this,this._config=t}this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},n.call(this,e),this.parseChunk=function(e,n){if(this.isFirstChunk&&O(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i)}this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e;this._partialLine="";var o=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var a=o.meta.cursor;this._finished||(this._partialLine=r.substring(a-this._baseIndex),this._baseIndex=a),o&&o.data&&(this._rowCount+=o.data.length);var l=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(s)t.postMessage({results:o,workerId:u.WORKER_ID,finished:l});else if(O(this._config.chunk)&&!n){if(this._config.chunk(o,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);o=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(o.data),this._completeResults.errors=this._completeResults.errors.concat(o.errors),this._completeResults.meta=o.meta),this._completed||!l||!O(this._config.complete)||o&&o.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),l||o&&o.meta.paused||this._nextChunk(),o}this._halted=!0},this._sendError=function(e){O(this._config.error)?this._config.error(e):s&&this._config.error&&t.postMessage({workerId:u.WORKER_ID,error:e,finished:!1})}}function d(e){var t;function n(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(e=e||{}).chunkSize||(e.chunkSize=u.RemoteChunkSize),f.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=S(this._chunkLoaded,this),t.onerror=S(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var n in e)t.setRequestHeader(n,e[n])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+i)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||t.status>=400?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=n(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function p(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=u.LocalChunkSize),f.call(this,e);var i="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,i?((t=new FileReader).onload=S(this._chunkLoaded,this),t.onerror=S(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var r=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,r)}var s=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function _(e){var t;e=e||{},f.call(this,e),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function m(e){e=e||{},f.call(this,e);var t=[],n=!0,i=!1;this.pause=function(){f.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){f.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=S((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=S((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=S((function(){this._streamCleanUp(),i=!0,this._streamData("")}),this),this._streamCleanUp=S((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function g(e){var t=i.default.Duplex,n=R(e),r=!0,s=!1,o=[],a=null;this._onCsvData=function(e){var t=e.data;a.push(t)||this._handle.paused()||this._handle.pause()},this._onCsvComplete=function(){a.push(null)},n.step=S(this._onCsvData,this),n.complete=S(this._onCsvComplete,this),f.call(this,n),this._nextChunk=function(){s&&1===o.length&&(this._finished=!0),o.length?o.shift()():r=!0},this._addToParseQueue=function(e,t){o.push(S((function(){if(this.parseChunk("string"==typeof e?e:e.toString(n.encoding)),O(t))return t()}),this)),r&&(r=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(e,t,n){this._addToParseQueue(e,n)},this._onWriteComplete=function(){s=!0,this._addToParseQueue("")},this.getStream=function(){return a},(a=new t({readableObjectMode:!0,decodeStrings:!1,read:S(this._onRead,this),write:S(this._onWrite,this)})).once("finish",S(this._onWriteComplete,this))}function y(e){var t,n,i,r=Math.pow(2,53),s=-r,o=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,l=this,c=0,h=0,f=!1,d=!1,p=[],_={data:[],errors:[],meta:{}};if(O(e.step)){var m=e.step;e.step=function(t){if(_=t,w())k();else{if(k(),0===_.data.length)return;c+=t.data.length,e.preview&&c>e.preview?n.abort():(_.data=_.data[0],m(_,l))}}}function g(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function y(e){if(o.test(e)){var t=parseFloat(e);if(t>s&&t<r)return!0}return!1}function k(){if(_&&i&&(A("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+u.DefaultDelimiter+"'"),i=!1),e.skipEmptyLines)for(var t=0;t<_.data.length;t++)g(_.data[t])&&_.data.splice(t--,1);return w()&&E(),S()}function w(){return e.header&&0===p.length}function E(){if(_)if(Array.isArray(_.data[0])){for(var t=0;w()&&t<_.data.length;t++)_.data[t].forEach(n);_.data.splice(0,1)}else _.data.forEach(n);function n(t,n){O(e.transformHeader)&&(t=e.transformHeader(t,n)),p.push(t)}}function x(t){return e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)}function C(e,t){return x(e)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(y(t)?parseFloat(t):a.test(t)?new Date(t):""===t?null:t):t}function S(){if(!_||!e.header&&!e.dynamicTyping&&!e.transform)return _;function t(t,n){var i,r=e.header?{}:[];for(i=0;i<t.length;i++){var s=i,o=t[i];e.header&&(s=i>=p.length?"__parsed_extra":p[i]),e.transform&&(o=e.transform(o,s)),o=C(s,o),"__parsed_extra"===s?(r[s]=r[s]||[],r[s].push(o)):r[s]=o}return e.header&&(i>p.length?A("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+i,h+n):i<p.length&&A("FieldMismatch","TooFewFields","Too few fields: expected "+p.length+" fields but parsed "+i,h+n)),r}var n=1;return!_.data.length||Array.isArray(_.data[0])?(_.data=_.data.map(t),n=_.data.length):_.data=t(_.data,0),e.header&&_.meta&&(_.meta.fields=p),h+=n,_}function T(t,n,i,r,s){var o,a,l,c;s=s||[",","\t","|",";",u.RECORD_SEP,u.UNIT_SEP];for(var h=0;h<s.length;h++){var f=s[h],d=0,p=0,_=0;l=void 0;for(var m=new b({comments:r,delimiter:f,newline:n,preview:10}).parse(t),y=0;y<m.data.length;y++)if(i&&g(m.data[y]))_++;else{var v=m.data[y].length;p+=v,void 0!==l?v>0&&(d+=Math.abs(v-l),l=v):l=v}m.data.length>0&&(p/=m.data.length-_),(void 0===a||d<=a)&&(void 0===c||p>c)&&p>1.99&&(a=d,o=f,c=p)}return e.delimiter=o,{successful:!!o,bestDelimiter:o}}function $(e,t){e=e.substring(0,1048576);var n=new RegExp(v(t)+"([^]*?)"+v(t),"gm"),i=(e=e.replace(n,"")).split("\r"),r=e.split("\n"),s=r.length>1&&r[0].length<i[0].length;if(1===i.length||s)return"\n";for(var o=0,a=0;a<i.length;a++)"\n"===i[a][0]&&o++;return o>=i.length/2?"\r\n":"\r"}function A(e,t,n,i){var r={type:e,code:t,message:n};void 0!==i&&(r.row=i),_.errors.push(r)}this.parse=function(r,s,o){var a=e.quoteChar||'"';if(e.newline||(e.newline=$(r,a)),i=!1,e.delimiter)O(e.delimiter)&&(e.delimiter=e.delimiter(r),_.meta.delimiter=e.delimiter);else{var l=T(r,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);l.successful?e.delimiter=l.bestDelimiter:(i=!0,e.delimiter=u.DefaultDelimiter),_.meta.delimiter=e.delimiter}var c=R(e);return e.preview&&e.header&&c.preview++,t=r,n=new b(c),_=n.parse(t,s,o),k(),f?{meta:{paused:!0}}:_||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,n.abort(),t=O(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){l.streamer._halted?(f=!1,l.streamer.parseChunk(t,!0)):setTimeout(l.resume,3)},this.aborted=function(){return d},this.abort=function(){d=!0,n.abort(),_.meta.aborted=!0,O(e.complete)&&e.complete(_),t=""}}function v(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(e){var t,n=(e=e||{}).delimiter,i=e.newline,r=e.comments,s=e.step,o=e.preview,a=e.fastMode,l=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(l=e.escapeChar),("string"!=typeof n||u.BAD_DELIMITERS.indexOf(n)>-1)&&(n=","),r===n)throw new Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||u.BAD_DELIMITERS.indexOf(r)>-1)&&(r=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var c=0,h=!1;this.parse=function(e,u,f){if("string"!=typeof e)throw new Error("Input must be a string");var d=e.length,p=n.length,_=i.length,m=r.length,g=O(s);c=0;var y=[],b=[],k=[],w=0;if(!e)return N();if(a||!1!==a&&-1===e.indexOf(t)){for(var E=e.split(i),x=0;x<E.length;x++){if(k=E[x],c+=k.length,x!==E.length-1)c+=i.length;else if(f)return N();if(!r||k.substring(0,m)!==r){if(g){if(y=[],D(k.split(n)),F(),h)return N()}else D(k.split(n));if(o&&x>=o)return y=y.slice(0,o),N(!0)}}return N()}for(var C=e.indexOf(n,c),R=e.indexOf(i,c),S=new RegExp(v(l)+v(t),"g"),T=e.indexOf(t,c);;)if(e[c]!==t)if(r&&0===k.length&&e.substring(c,c+m)===r){if(-1===R)return N();c=R+_,R=e.indexOf(i,c),C=e.indexOf(n,c)}else if(-1!==C&&(C<R||-1===R))k.push(e.substring(c,C)),c=C+p,C=e.indexOf(n,c);else{if(-1===R)break;if(k.push(e.substring(c,R)),j(R+_),g&&(F(),h))return N();if(o&&y.length>=o)return N(!0)}else for(T=c,c++;;){if(-1===(T=e.indexOf(t,T+1)))return f||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:y.length,index:c}),L();if(T===d-1)return L(e.substring(c,T).replace(S,t));if(t!==l||e[T+1]!==l){if(t===l||0===T||e[T-1]!==l){-1!==C&&C<T+1&&(C=e.indexOf(n,T+1)),-1!==R&&R<T+1&&(R=e.indexOf(i,T+1));var $=I(-1===R?C:Math.min(C,R));if(e[T+1+$]===n){k.push(e.substring(c,T).replace(S,t)),c=T+1+$+p,e[T+1+$+p]!==t&&(T=e.indexOf(t,c)),C=e.indexOf(n,c),R=e.indexOf(i,c);break}var A=I(R);if(e.substring(T+1+A,T+1+A+_)===i){if(k.push(e.substring(c,T).replace(S,t)),j(T+1+A+_),C=e.indexOf(n,c),T=e.indexOf(t,c),g&&(F(),h))return N();if(o&&y.length>=o)return N(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:y.length,index:c}),T++}}else T++}return L();function D(e){y.push(e),w=c}function I(t){var n=0;if(-1!==t){var i=e.substring(T+1,t);i&&""===i.trim()&&(n=i.length)}return n}function L(t){return f||(void 0===t&&(t=e.substring(c)),k.push(t),c=d,D(k),g&&F()),N()}function j(t){c=t,D(k),k=[],R=e.indexOf(i,c)}function N(e){return{data:y,errors:b,meta:{delimiter:n,linebreak:i,aborted:h,truncated:!!e,cursor:w+(u||0)}}}function F(){s(N()),y=[],b=[]}},this.abort=function(){h=!0},this.getCharIndex=function(){return c}}function k(){if(!u.WORKERS_SUPPORTED)return!1;var e=n(),i=new t.Worker(e);return i.onmessage=w,i.id=a++,o[i.id]=i,i}function w(e){var t=e.data,n=o[t.workerId],i=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var r={abort:function(){i=!0,E(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:x,resume:x};if(O(n.userStep)){for(var s=0;s<t.results.data.length&&(n.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},r),!i);s++);delete t.results}else O(n.userChunk)&&(n.userChunk(t.results,r,t.file),delete t.results)}t.finished&&!i&&E(t.workerId,t.results)}function E(e,t){var n=o[e];O(n.userComplete)&&n.userComplete(t),n.terminate(),delete o[e]}function x(){throw new Error("Not implemented.")}function C(e){var n=e.data;if(void 0===u.WORKER_ID&&n&&(u.WORKER_ID=n.workerId),"string"==typeof n.input)t.postMessage({workerId:u.WORKER_ID,results:u.parse(n.input,n.config),finished:!0});else if(t.File&&n.input instanceof File||n.input instanceof Object){var i=u.parse(n.input,n.config);i&&t.postMessage({workerId:u.WORKER_ID,results:i,finished:!0})}}function R(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=R(e[n]);return t}function S(e,t){return function(){e.apply(t,arguments)}}function O(e){return"function"==typeof e}return s&&(t.onmessage=C),d.prototype=Object.create(f.prototype),d.prototype.constructor=d,p.prototype=Object.create(f.prototype),p.prototype.constructor=p,_.prototype=Object.create(_.prototype),_.prototype.constructor=_,m.prototype=Object.create(f.prototype),m.prototype.constructor=m,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(g.prototype=Object.create(f.prototype),g.prototype.constructor=g),u}()}(K);var H=K.exports;function Q(e){y(e,"svelte-g1wob2",".link.svelte-g1wob2{color:blue;text-decoration:underline;cursor:pointer}")}function J(e){let t,n,i,r;const s=e[6].default,o=c(s,e,e[5],null);return{c(){t=w("button"),o&&o.c()},l(e){t=R(e,"BUTTON",{});var n=C(t);o&&o.l(n),n.forEach(k)},m(s,a){b(s,t,a),o&&o.m(t,null),n=!0,i||(r=x(t,"click",(function(){u(e[4](e[0],e[1],e[3]))&&e[4](e[0],e[1],e[3]).apply(this,arguments)})),i=!0)},p(t,i){e=t,o&&o.p&&(!n||32&i)&&d(o,s,e,e[5],n?f(s,e[5],i,null):p(e[5]),null)},i(e){n||(B(o,e),n=!0)},o(e){U(o,e),n=!1},d(e){e&&k(t),o&&o.d(e),i=!1,r()}}}function X(e){let t,n,i,r;const s=e[6].default,o=c(s,e,e[5],null);return{c(){t=w("span"),o&&o.c(),this.h()},l(e){t=R(e,"SPAN",{class:!0});var n=C(t);o&&o.l(n),n.forEach(k),this.h()},h(){var e,n,i;e=t,n="class",null==(i="link svelte-g1wob2")?e.removeAttribute(n):e.getAttribute(n)!==i&&e.setAttribute(n,i)},m(s,a){b(s,t,a),o&&o.m(t,null),n=!0,i||(r=x(t,"click",(function(){u(e[4](e[0],e[1],e[3]))&&e[4](e[0],e[1],e[3]).apply(this,arguments)})),i=!0)},p(t,i){e=t,o&&o.p&&(!n||32&i)&&d(o,s,e,e[5],n?f(s,e[5],i,null):p(e[5]),null)},i(e){n||(B(o,e),n=!0)},o(e){U(o,e),n=!1},d(e){e&&k(t),o&&o.d(e),i=!1,r()}}}function Z(e){let t,n,i,r;const s=[X,J],o=[];function u(e,t){return"link"===e[2]?0:1}return t=u(e),n=o[t]=s[t](e),{c(){n.c(),i=E()},l(e){n.l(e),i=E()},m(e,n){o[t].m(e,n),b(e,i,n),r=!0},p(e,[r]){let l=t;t=u(e),t===l?o[t].p(e,r):(z={r:0,c:[],p:z},U(o[l],1,1,(()=>{o[l]=null})),z.r||a(z.c),z=z.p,n=o[t],n?n.p(e,r):(n=o[t]=s[t](e),n.c()),B(n,1),n.m(i.parentNode,i))},i(e){r||(B(n),r=!0)},o(e){U(n),r=!1},d(e){o[t].d(e),e&&k(i)}}}function G(e,t,n){let{$$slots:i={},$$scope:r}=t,{data:s}=t,{filename:o="filename"}=t,{type:a="link"}=t,{bom:u=2}=t;return e.$$set=e=>{"data"in e&&n(0,s=e.data),"filename"in e&&n(1,o=e.filename),"type"in e&&n(2,a=e.type),"bom"in e&&n(3,u=e.bom),"$$scope"in e&&n(5,r=e.$$scope)},[s,o,a,u,function(e,t,n){const i=n?"\ufeff":"";let r=null;r="object"==typeof e&&H?H.unparse(e):e;const s=new Blob([`${i}${r}`],{type:"text/csv;charset=utf-8;"});let o=null;o=navigator.msSaveBlob?navigator.msSaveBlob(s,`${t}.csv`):window.URL.createObjectURL(s);const a=document.createElement("a");a.href=o,a.setAttribute("download",`${t}.csv`),a.click(),a.remove()},r,i]}e.CSVDownloader=class extends class{$destroy(){!function(e,t){const n=e.$$;null!==n.fragment&&(a(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=r}$on(e,t){const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}$set(e){var t;this.$$set&&(t=e,0!==Object.keys(t).length)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}{constructor(e){super(),W(this,e,G,Z,l,{data:0,filename:1,type:2,bom:3},Q)}},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){e.exports=function e(){var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{};function n(){var n=t.URL||t.webkitURL||null,i=e.toString();return u.BLOB_URL||(u.BLOB_URL=n.createObjectURL(new Blob(["(",i,")();"],{type:"text/javascript"})))}var r=!t.document&&!!t.postMessage,s=r&&/blob:/i.test((t.location||{}).protocol),o={},a=0,u={};if(u.parse=c,u.unparse=h,u.RECORD_SEP=String.fromCharCode(30),u.UNIT_SEP=String.fromCharCode(31),u.BYTE_ORDER_MARK="\ufeff",u.BAD_DELIMITERS=["\r","\n",'"',u.BYTE_ORDER_MARK],u.WORKERS_SUPPORTED=!r&&!!t.Worker,u.NODE_STREAM_INPUT=1,u.LocalChunkSize=10485760,u.RemoteChunkSize=5242880,u.DefaultDelimiter=",",u.Parser=b,u.ParserHandle=y,u.NetworkStreamer=d,u.FileStreamer=p,u.StringStreamer=_,u.ReadableStreamStreamer=m,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(u.DuplexStreamStreamer=g),t.jQuery){var l=t.jQuery;l.fn.parse=function(e){var n=e.config||{},i=[];return this.each((function(e){if("INPUT"!==l(this).prop("tagName").toUpperCase()||"file"!==l(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var r=0;r<this.files.length;r++)i.push({file:this.files[r],inputElem:this,instanceConfig:l.extend({},n)})})),r(),this;function r(){if(0!==i.length){var t=i[0];if(O(e.before)){var n=e.before(t.file,t.inputElem);if("object"==typeof n){if("abort"===n.action)return void s("AbortError",t.file,t.inputElem,n.reason);if("skip"===n.action)return void o();"object"==typeof n.config&&(t.instanceConfig=l.extend(t.instanceConfig,n.config))}else if("skip"===n)return void o()}var r=t.instanceConfig.complete;t.instanceConfig.complete=function(e){O(r)&&r(e,t.file,t.inputElem),o()},u.parse(t.file,t.instanceConfig)}else O(e.complete)&&e.complete()}function s(t,n,i,r){O(e.error)&&e.error({name:t},n,i,r)}function o(){i.splice(0,1),r()}}}function c(e,n){var i=(n=n||{}).dynamicTyping||!1;if(O(i)&&(n.dynamicTypingFunction=i,i={}),n.dynamicTyping=i,n.transform=!!O(n.transform)&&n.transform,n.worker&&u.WORKERS_SUPPORTED){var r=k();return r.userStep=n.step,r.userChunk=n.chunk,r.userComplete=n.complete,r.userError=n.error,n.step=O(n.step),n.chunk=O(n.chunk),n.complete=O(n.complete),n.error=O(n.error),delete n.worker,void r.postMessage({input:e,config:n,workerId:r.id})}var s=null;return e===u.NODE_STREAM_INPUT&&"undefined"==typeof PAPA_BROWSER_CONTEXT?(s=new g(n)).getStream():("string"==typeof e?s=n.download?new d(n):new _(n):!0===e.readable&&O(e.read)&&O(e.on)?s=new m(n):(t.File&&e instanceof File||e instanceof Object)&&(s=new p(n)),s.stream(e))}function h(e,t){var n=!1,i=!0,r=",",s="\r\n",o='"',a=o+o,l=!1,c=null,h=!1;d();var f=new RegExp(v(o),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,l);if("object"==typeof e[0])return p(c||Object.keys(e[0]),e,l)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),p(e.fields||[],e.data||[],l);throw new Error("Unable to serialize unrecognized input");function d(){if("object"==typeof t){if("string"!=typeof t.delimiter||u.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(r=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(l=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(o=t.quoteChar),"boolean"==typeof t.header&&(i=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");c=t.columns}void 0!==t.escapeChar&&(a=t.escapeChar+o),"boolean"==typeof t.escapeFormulae&&(h=t.escapeFormulae)}}function p(e,t,n){var o="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&e.length>0,u=!Array.isArray(t[0]);if(a&&i){for(var l=0;l<e.length;l++)l>0&&(o+=r),o+=_(e[l],l);t.length>0&&(o+=s)}for(var c=0;c<t.length;c++){var h=a?e.length:t[c].length,f=!1,d=a?0===Object.keys(t[c]).length:0===t[c].length;if(n&&!a&&(f="greedy"===n?""===t[c].join("").trim():1===t[c].length&&0===t[c][0].length),"greedy"===n&&a){for(var p=[],m=0;m<h;m++){var g=u?e[m]:m;p.push(t[c][g])}f=""===p.join("").trim()}if(!f){for(var y=0;y<h;y++){y>0&&!d&&(o+=r);var v=a&&u?e[y]:y;o+=_(t[c][v],y)}c<t.length-1&&(!n||h>0&&!d)&&(o+=s)}}return o}function _(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===h&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var i=e.toString().replace(f,a);return"boolean"==typeof n&&n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||m(i,u.BAD_DELIMITERS)||i.indexOf(r)>-1||" "===i.charAt(0)||" "===i.charAt(i.length-1)?o+i+o:i}function m(e,t){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return!0;return!1}}function f(e){function n(e){var t=S(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new y(t),this._handle.streamer=this,this._config=t}this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},n.call(this,e),this.parseChunk=function(e,n){if(this.isFirstChunk&&O(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i)}this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e;this._partialLine="";var o=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var a=o.meta.cursor;this._finished||(this._partialLine=r.substring(a-this._baseIndex),this._baseIndex=a),o&&o.data&&(this._rowCount+=o.data.length);var l=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(s)t.postMessage({results:o,workerId:u.WORKER_ID,finished:l});else if(O(this._config.chunk)&&!n){if(this._config.chunk(o,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);o=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(o.data),this._completeResults.errors=this._completeResults.errors.concat(o.errors),this._completeResults.meta=o.meta),this._completed||!l||!O(this._config.complete)||o&&o.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),l||o&&o.meta.paused||this._nextChunk(),o}this._halted=!0},this._sendError=function(e){O(this._config.error)?this._config.error(e):s&&this._config.error&&t.postMessage({workerId:u.WORKER_ID,error:e,finished:!1})}}function d(e){var t;function n(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(e=e||{}).chunkSize||(e.chunkSize=u.RemoteChunkSize),f.call(this,e),this._nextChunk=r?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),r||(t.onload=R(this._chunkLoaded,this),t.onerror=R(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!r),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var n in e)t.setRequestHeader(n,e[n])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+i)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}r&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||t.status>=400?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=n(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function p(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=u.LocalChunkSize),f.call(this,e);var i="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,i?((t=new FileReader).onload=R(this._chunkLoaded,this),t.onerror=R(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var r=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,r)}var s=t.readAsText(e,this._config.encoding);i||this._chunkLoaded({target:{result:s}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function _(e){var t;e=e||{},f.call(this,e),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function m(e){e=e||{},f.call(this,e);var t=[],n=!0,i=!1;this.pause=function(){f.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){f.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){i&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=R((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=R((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=R((function(){this._streamCleanUp(),i=!0,this._streamData("")}),this),this._streamCleanUp=R((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function g(e){var t=i.default.Duplex,n=S(e),r=!0,s=!1,o=[],a=null;this._onCsvData=function(e){var t=e.data;a.push(t)||this._handle.paused()||this._handle.pause()},this._onCsvComplete=function(){a.push(null)},n.step=R(this._onCsvData,this),n.complete=R(this._onCsvComplete,this),f.call(this,n),this._nextChunk=function(){s&&1===o.length&&(this._finished=!0),o.length?o.shift()():r=!0},this._addToParseQueue=function(e,t){o.push(R((function(){if(this.parseChunk("string"==typeof e?e:e.toString(n.encoding)),O(t))return t()}),this)),r&&(r=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(e,t,n){this._addToParseQueue(e,n)},this._onWriteComplete=function(){s=!0,this._addToParseQueue("")},this.getStream=function(){return a},(a=new t({readableObjectMode:!0,decodeStrings:!1,read:R(this._onRead,this),write:R(this._onWrite,this)})).once("finish",R(this._onWriteComplete,this))}function y(e){var t,n,i,r=Math.pow(2,53),s=-r,o=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,l=this,c=0,h=0,f=!1,d=!1,p=[],_={data:[],errors:[],meta:{}};if(O(e.step)){var m=e.step;e.step=function(t){if(_=t,w())k();else{if(k(),0===_.data.length)return;c+=t.data.length,e.preview&&c>e.preview?n.abort():(_.data=_.data[0],m(_,l))}}}function g(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function y(e){if(o.test(e)){var t=parseFloat(e);if(t>s&&t<r)return!0}return!1}function k(){if(_&&i&&(A("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+u.DefaultDelimiter+"'"),i=!1),e.skipEmptyLines)for(var t=0;t<_.data.length;t++)g(_.data[t])&&_.data.splice(t--,1);return w()&&E(),R()}function w(){return e.header&&0===p.length}function E(){if(_)if(Array.isArray(_.data[0])){for(var t=0;w()&&t<_.data.length;t++)_.data[t].forEach(n);_.data.splice(0,1)}else _.data.forEach(n);function n(t,n){O(e.transformHeader)&&(t=e.transformHeader(t,n)),p.push(t)}}function x(t){return e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)}function C(e,t){return x(e)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(y(t)?parseFloat(t):a.test(t)?new Date(t):""===t?null:t):t}function R(){if(!_||!e.header&&!e.dynamicTyping&&!e.transform)return _;function t(t,n){var i,r=e.header?{}:[];for(i=0;i<t.length;i++){var s=i,o=t[i];e.header&&(s=i>=p.length?"__parsed_extra":p[i]),e.transform&&(o=e.transform(o,s)),o=C(s,o),"__parsed_extra"===s?(r[s]=r[s]||[],r[s].push(o)):r[s]=o}return e.header&&(i>p.length?A("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+i,h+n):i<p.length&&A("FieldMismatch","TooFewFields","Too few fields: expected "+p.length+" fields but parsed "+i,h+n)),r}var n=1;return!_.data.length||Array.isArray(_.data[0])?(_.data=_.data.map(t),n=_.data.length):_.data=t(_.data,0),e.header&&_.meta&&(_.meta.fields=p),h+=n,_}function $(t,n,i,r,s){var o,a,l,c;s=s||[",","\t","|",";",u.RECORD_SEP,u.UNIT_SEP];for(var h=0;h<s.length;h++){var f=s[h],d=0,p=0,_=0;l=void 0;for(var m=new b({comments:r,delimiter:f,newline:n,preview:10}).parse(t),y=0;y<m.data.length;y++)if(i&&g(m.data[y]))_++;else{var v=m.data[y].length;p+=v,void 0!==l?v>0&&(d+=Math.abs(v-l),l=v):l=v}m.data.length>0&&(p/=m.data.length-_),(void 0===a||d<=a)&&(void 0===c||p>c)&&p>1.99&&(a=d,o=f,c=p)}return e.delimiter=o,{successful:!!o,bestDelimiter:o}}function T(e,t){e=e.substring(0,1048576);var n=new RegExp(v(t)+"([^]*?)"+v(t),"gm"),i=(e=e.replace(n,"")).split("\r"),r=e.split("\n"),s=r.length>1&&r[0].length<i[0].length;if(1===i.length||s)return"\n";for(var o=0,a=0;a<i.length;a++)"\n"===i[a][0]&&o++;return o>=i.length/2?"\r\n":"\r"}function A(e,t,n,i){var r={type:e,code:t,message:n};void 0!==i&&(r.row=i),_.errors.push(r)}this.parse=function(r,s,o){var a=e.quoteChar||'"';if(e.newline||(e.newline=T(r,a)),i=!1,e.delimiter)O(e.delimiter)&&(e.delimiter=e.delimiter(r),_.meta.delimiter=e.delimiter);else{var l=$(r,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);l.successful?e.delimiter=l.bestDelimiter:(i=!0,e.delimiter=u.DefaultDelimiter),_.meta.delimiter=e.delimiter}var c=S(e);return e.preview&&e.header&&c.preview++,t=r,n=new b(c),_=n.parse(t,s,o),k(),f?{meta:{paused:!0}}:_||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,n.abort(),t=O(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){l.streamer._halted?(f=!1,l.streamer.parseChunk(t,!0)):setTimeout(l.resume,3)},this.aborted=function(){return d},this.abort=function(){d=!0,n.abort(),_.meta.aborted=!0,O(e.complete)&&e.complete(_),t=""}}function v(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(e){var t,n=(e=e||{}).delimiter,i=e.newline,r=e.comments,s=e.step,o=e.preview,a=e.fastMode,l=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(l=e.escapeChar),("string"!=typeof n||u.BAD_DELIMITERS.indexOf(n)>-1)&&(n=","),r===n)throw new Error("Comment character same as delimiter");!0===r?r="#":("string"!=typeof r||u.BAD_DELIMITERS.indexOf(r)>-1)&&(r=!1),"\n"!==i&&"\r"!==i&&"\r\n"!==i&&(i="\n");var c=0,h=!1;this.parse=function(e,u,f){if("string"!=typeof e)throw new Error("Input must be a string");var d=e.length,p=n.length,_=i.length,m=r.length,g=O(s);c=0;var y=[],b=[],k=[],w=0;if(!e)return F();if(a||!1!==a&&-1===e.indexOf(t)){for(var E=e.split(i),x=0;x<E.length;x++){if(k=E[x],c+=k.length,x!==E.length-1)c+=i.length;else if(f)return F();if(!r||k.substring(0,m)!==r){if(g){if(y=[],D(k.split(n)),N(),h)return F()}else D(k.split(n));if(o&&x>=o)return y=y.slice(0,o),F(!0)}}return F()}for(var C=e.indexOf(n,c),S=e.indexOf(i,c),R=new RegExp(v(l)+v(t),"g"),$=e.indexOf(t,c);;)if(e[c]!==t)if(r&&0===k.length&&e.substring(c,c+m)===r){if(-1===S)return F();c=S+_,S=e.indexOf(i,c),C=e.indexOf(n,c)}else if(-1!==C&&(C<S||-1===S))k.push(e.substring(c,C)),c=C+p,C=e.indexOf(n,c);else{if(-1===S)break;if(k.push(e.substring(c,S)),j(S+_),g&&(N(),h))return F();if(o&&y.length>=o)return F(!0)}else for($=c,c++;;){if(-1===($=e.indexOf(t,$+1)))return f||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:y.length,index:c}),L();if($===d-1)return L(e.substring(c,$).replace(R,t));if(t!==l||e[$+1]!==l){if(t===l||0===$||e[$-1]!==l){-1!==C&&C<$+1&&(C=e.indexOf(n,$+1)),-1!==S&&S<$+1&&(S=e.indexOf(i,$+1));var T=I(-1===S?C:Math.min(C,S));if(e[$+1+T]===n){k.push(e.substring(c,$).replace(R,t)),c=$+1+T+p,e[$+1+T+p]!==t&&($=e.indexOf(t,c)),C=e.indexOf(n,c),S=e.indexOf(i,c);break}var A=I(S);if(e.substring($+1+A,$+1+A+_)===i){if(k.push(e.substring(c,$).replace(R,t)),j($+1+A+_),C=e.indexOf(n,c),$=e.indexOf(t,c),g&&(N(),h))return F();if(o&&y.length>=o)return F(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:y.length,index:c}),$++}}else $++}return L();function D(e){y.push(e),w=c}function I(t){var n=0;if(-1!==t){var i=e.substring($+1,t);i&&""===i.trim()&&(n=i.length)}return n}function L(t){return f||(void 0===t&&(t=e.substring(c)),k.push(t),c=d,D(k),g&&N()),F()}function j(t){c=t,D(k),k=[],S=e.indexOf(i,c)}function F(e){return{data:y,errors:b,meta:{delimiter:n,linebreak:i,aborted:h,truncated:!!e,cursor:w+(u||0)}}}function N(){s(F()),y=[],b=[]}},this.abort=function(){h=!0},this.getCharIndex=function(){return c}}function k(){if(!u.WORKERS_SUPPORTED)return!1;var e=n(),i=new t.Worker(e);return i.onmessage=w,i.id=a++,o[i.id]=i,i}function w(e){var t=e.data,n=o[t.workerId],i=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var r={abort:function(){i=!0,E(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:x,resume:x};if(O(n.userStep)){for(var s=0;s<t.results.data.length&&(n.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},r),!i);s++);delete t.results}else O(n.userChunk)&&(n.userChunk(t.results,r,t.file),delete t.results)}t.finished&&!i&&E(t.workerId,t.results)}function E(e,t){var n=o[e];O(n.userComplete)&&n.userComplete(t),n.terminate(),delete o[e]}function x(){throw new Error("Not implemented.")}function C(e){var n=e.data;if(void 0===u.WORKER_ID&&n&&(u.WORKER_ID=n.workerId),"string"==typeof n.input)t.postMessage({workerId:u.WORKER_ID,results:u.parse(n.input,n.config),finished:!0});else if(t.File&&n.input instanceof File||n.input instanceof Object){var i=u.parse(n.input,n.config);i&&t.postMessage({workerId:u.WORKER_ID,results:i,finished:!0})}}function S(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=S(e[n]);return t}function R(e,t){return function(){e.apply(t,arguments)}}function O(e){return"function"==typeof e}return s&&(t.onmessage=C),d.prototype=Object.create(f.prototype),d.prototype.constructor=d,p.prototype=Object.create(f.prototype),p.prototype.constructor=p,_.prototype=Object.create(_.prototype),_.prototype.constructor=_,m.prototype=Object.create(f.prototype),m.prototype.constructor=m,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(g.prototype=Object.create(f.prototype),g.prototype.constructor=g),u}()}(H);var Q=H.exports;function J(e){y(e,"svelte-g1wob2",".link.svelte-g1wob2{color:blue;text-decoration:underline;cursor:pointer}")}function V(e){let t,n,i,r;const s=e[6].default,o=c(s,e,e[5],null);return{c(){t=w("button"),o&&o.c()},l(e){t=S(e,"BUTTON",{});var n=C(t);o&&o.l(n),n.forEach(k)},m(s,a){b(s,t,a),o&&o.m(t,null),n=!0,i||(r=x(t,"click",(function(){u(e[4](e[0],e[1],e[3]))&&e[4](e[0],e[1],e[3]).apply(this,arguments)})),i=!0)},p(t,i){e=t,o&&o.p&&(!n||32&i)&&d(o,s,e,e[5],n?f(s,e[5],i,null):p(e[5]),null)},i(e){n||(B(o,e),n=!0)},o(e){U(o,e),n=!1},d(e){e&&k(t),o&&o.d(e),i=!1,r()}}}function X(e){let t,n,i,r;const s=e[6].default,o=c(s,e,e[5],null);return{c(){t=w("span"),o&&o.c(),this.h()},l(e){t=S(e,"SPAN",{class:!0});var n=C(t);o&&o.l(n),n.forEach(k),this.h()},h(){var e,n,i;e=t,n="class",null==(i="link svelte-g1wob2")?e.removeAttribute(n):e.getAttribute(n)!==i&&e.setAttribute(n,i)},m(s,a){b(s,t,a),o&&o.m(t,null),n=!0,i||(r=x(t,"click",(function(){u(e[4](e[0],e[1],e[3]))&&e[4](e[0],e[1],e[3]).apply(this,arguments)})),i=!0)},p(t,i){e=t,o&&o.p&&(!n||32&i)&&d(o,s,e,e[5],n?f(s,e[5],i,null):p(e[5]),null)},i(e){n||(B(o,e),n=!0)},o(e){U(o,e),n=!1},d(e){e&&k(t),o&&o.d(e),i=!1,r()}}}function Z(e){let t,n,i,r;const s=[X,V],o=[];function u(e,t){return"link"===e[2]?0:1}return t=u(e),n=o[t]=s[t](e),{c(){n.c(),i=E()},l(e){n.l(e),i=E()},m(e,n){o[t].m(e,n),b(e,i,n),r=!0},p(e,[r]){let l=t;t=u(e),t===l?o[t].p(e,r):(z={r:0,c:[],p:z},U(o[l],1,1,(()=>{o[l]=null})),z.r||a(z.c),z=z.p,n=o[t],n?n.p(e,r):(n=o[t]=s[t](e),n.c()),B(n,1),n.m(i.parentNode,i))},i(e){r||(B(n),r=!0)},o(e){U(n),r=!1},d(e){o[t].d(e),e&&k(i)}}}function G(e,t,n){let{$$slots:i={},$$scope:r}=t,{data:s}=t,{filename:o="filename"}=t,{type:a="link"}=t,{bom:u=2}=t;return e.$$set=e=>{"data"in e&&n(0,s=e.data),"filename"in e&&n(1,o=e.filename),"type"in e&&n(2,a=e.type),"bom"in e&&n(3,u=e.bom),"$$scope"in e&&n(5,r=e.$$scope)},[s,o,a,u,function(e,t,n){const i=n?"\ufeff":"";let r=null;r="object"==typeof e?Q.unparse(e):e;const s=new Blob([`${i}${r}`],{type:"text/csv;charset=utf-8;"});let o=null;o=navigator.msSaveBlob?navigator.msSaveBlob(s,`${t}.csv`):window.URL.createObjectURL(s);const a=document.createElement("a");a.href=o,a.setAttribute("download",`${t}.csv`),a.click(),a.remove()},r,i]}function Y(e,t,n){return[function(e,t){return Q.unparse(e,t)}]}function ee(e,t,n){return[function(e,t){Q.parse(e,Object.assign({},{download:!0},t))}]}function te(e,t,n){return[function(e,t){return Q.parse(e,t)}]}e.CSVDownloader=class extends K{constructor(e){super(),W(this,e,G,Z,l,{data:0,filename:1,type:2,bom:3},J)}},e.jsonToCSVr=class extends K{constructor(e){super(),W(this,e,Y,null,l,{jsonToCSV:0})}get jsonToCSV(){return this.$$.ctx[0]}},e.readRemoteFile=class extends K{constructor(e){super(),W(this,e,ee,null,l,{readRemoteFile:0})}get readRemoteFile(){return this.$$.ctx[0]}},e.readString=class extends K{constructor(e){super(),W(this,e,te,null,l,{readString:0})}get readString(){return this.$$.ctx[0]}},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=svelte-csv.js.map
{
"name": "svelte-csv",
"version": "1.2.7",
"version": "1.2.8",
"main": "dist/svelte-csv.js",

@@ -97,4 +97,5 @@ "module": "dist/svelte-csv.es.js",

"dependencies": {
"@types/papaparse": "^5.3.1",
"papaparse": "^5.3.1"
}
}

@@ -19,18 +19,17 @@ # svelte-csv

## ℹī¸ Usage
## ℹī¸ Note on usage with SvelteKit
You need to install `papaparse` manually if you get error `'/node_modules/papaparse/papaparse.min.js?v=8573111b' does not provide an export named 'default'`.
If you are using `svelte-csv` with SvelteKit, you need to configure `svelte.config.js` as follows:
papaparse is available on npm. It can be installed with the following command:
```
npm install papaparse @types/papaparse --save
kit: {
// ...
vite: {
optimizeDeps: {
include: ['papaparse']
}
}
}
```
papaparse is available on yarn as well. It can be installed with the following command:
```
yarn add papaparse @types/papaparse --save
```
## 📚 Useful Features

@@ -195,3 +194,3 @@

Latest version 1.2.5 (2022-02-12):
Latest version 1.2.8 (2022-02-15):

@@ -198,0 +197,0 @@ * Fix `'/node_modules/papaparse/papaparse.min.js?v=8573111b' does not provide an export named 'default`

export { default as CSVDownloader } from './CSVDownloader.svelte';
// export { default as jsonToCSVr } from './jsonToCSV.svelte';
// export { default as readRemoteFile } from './readRemoteFile.svelte';
// export { default as readString } from './readString.svelte';
export { default as jsonToCSVr } from './jsonToCSV.svelte';
export { default as readRemoteFile } from './readRemoteFile.svelte';
export { default as readString } from './readString.svelte';

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡ī¸ by Socket Inc