2 lines
62 KiB
JavaScript
2 lines
62 KiB
JavaScript
/*! For license information please see exampleWithCSV.app.js.LICENSE.txt */
|
|
(()=>{var e={843:(e,t,r)=>{"use strict";r.d(t,{U:()=>x});var n=function(e,t){return e<t?-1:e>t?1:0},i=/(^0x[\da-fA-F]+$|^([+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?!\.\d+)(?=\D|\s|$))|\d+)/g,s=/^\s+|\s+$/g,a=/\s+/g,o=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,l=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[/-]\d{1,4}[/-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,u=/^0+[1-9]{1}[0-9]*$/,d=/[^\x00-\x80]/,c=function(e,t){var r=e.localeCompare(t);return r?r/Math.abs(r):0},h=function(e,t){return e<t?-1:e>t?1:0},f=function(e){if(0!==e.length){var t=Number(e);if(!Number.isNaN(t))return t}},p=function(e){return e.replace(a," ").replace(s,"")},g=function(e,t,r){if(o.test(e)&&(!u.test(e)||0===t||"."!==r[t-1]))return f(e)||0},m=function(e,t,r){return{parsedNumber:g(e,t,r),normalizedString:p(e)}},v=function(e){var t=function(e){return e.replace(i,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}(e).map(m);return t},_=function(e){return"function"==typeof e},b=function(e){return Number.isNaN(e)||e instanceof Number&&Number.isNaN(e.valueOf())},y=function(e){return null===e},w=function(e){return!(null===e||"object"!=typeof e||Array.isArray(e)||e instanceof Number||e instanceof String||e instanceof Boolean||e instanceof Date)},E=function(e){return"symbol"==typeof e},S=function(e){return void 0===e},F=function(e){if("string"==typeof e||e instanceof String||("number"==typeof e||e instanceof Number)&&!b(e)||"boolean"==typeof e||e instanceof Boolean||e instanceof Date){var t=function(e){return"boolean"==typeof e||e instanceof Boolean?Number(e).toString():"number"==typeof e||e instanceof Number?e.toString():e instanceof Date?e.getTime().toString():"string"==typeof e||e instanceof String?e.toLowerCase().replace(s,""):""}(e),r=function(e){var t=f(e);return void 0!==t?t:function(e){if(l.test(e)){var t=Date.parse(e);if(!Number.isNaN(t))return t}}(e)}(t);return{parsedNumber:r,chunks:v(r?""+r:t),value:e}}return{isArray:Array.isArray(e),isFunction:_(e),isNaN:b(e),isNull:y(e),isObject:w(e),isSymbol:E(e),isUndefined:S(e),value:e}},O=function(e){return function(t,r){return function(e,t){return e.value===t.value?0:void 0!==e.parsedNumber&&void 0!==t.parsedNumber?n(e.parsedNumber,t.parsedNumber):e.chunks&&t.chunks?function(e,t){for(var r=e.length,i=t.length,s=Math.min(r,i),a=0;a<s;a++){var o=e[a],l=t[a];if(o.normalizedString!==l.normalizedString){if(""===o.normalizedString!=(""===l.normalizedString))return""===o.normalizedString?-1:1;if(void 0!==o.parsedNumber&&void 0!==l.parsedNumber){var u=n(o.parsedNumber,l.parsedNumber);return 0===u?h(o.normalizedString,l.normalizedString):u}return void 0!==o.parsedNumber||void 0!==l.parsedNumber?void 0!==o.parsedNumber?-1:1:d.test(o.normalizedString+l.normalizedString)&&o.normalizedString.localeCompare?c(o.normalizedString,l.normalizedString):h(o.normalizedString,l.normalizedString)}}return r>s||i>s?r<=s?-1:1:0}(e.chunks,t.chunks):function(e,t){return(e.chunks?!t.chunks:t.chunks)?e.chunks?-1:1:(e.isNaN?!t.isNaN:t.isNaN)?e.isNaN?-1:1:(e.isSymbol?!t.isSymbol:t.isSymbol)?e.isSymbol?-1:1:(e.isObject?!t.isObject:t.isObject)?e.isObject?-1:1:(e.isArray?!t.isArray:t.isArray)?e.isArray?-1:1:(e.isFunction?!t.isFunction:t.isFunction)?e.isFunction?-1:1:(e.isNull?!t.isNull:t.isNull)?e.isNull?-1:1:0}(e,t)}(F(t),F(r))*("desc"===e.order?-1:1)}},k=function(e){return"string"==typeof e&&("asc"===e||"desc"===e)},R=function(e){var t="asc";return"string"==typeof e&&k(e)?t=e:e&&"object"==typeof e&&e.order&&k(e.order)&&(t=e.order),{order:t}};function x(e){var t=R(e);return O(t)}},809:function(e,t){var r,n;r=function e(){"use strict";var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},r=!t.document&&!!t.postMessage,n=t.IS_PAPA_WORKER||!1,i={},s=0,a={parse:function(r,n){var o=(n=n||{}).dynamicTyping||!1;if(w(o)&&(n.dynamicTypingFunction=o,o={}),n.dynamicTyping=o,n.transform=!!w(n.transform)&&n.transform,n.worker&&a.WORKERS_SUPPORTED){var l=function(){if(!a.WORKERS_SUPPORTED)return!1;var r,n,o=(r=t.URL||t.webkitURL||null,n=e.toString(),a.BLOB_URL||(a.BLOB_URL=r.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",n,")();"],{type:"text/javascript"})))),l=new t.Worker(o);return l.onmessage=m,l.id=s++,i[l.id]=l}();return l.userStep=n.step,l.userChunk=n.chunk,l.userComplete=n.complete,l.userError=n.error,n.step=w(n.step),n.chunk=w(n.chunk),n.complete=w(n.complete),n.error=w(n.error),delete n.worker,void l.postMessage({input:r,config:n,workerId:l.id})}var f=null;return a.NODE_STREAM_INPUT,"string"==typeof r?(r=function(e){return 65279===e.charCodeAt(0)?e.slice(1):e}(r),f=n.download?new u(n):new c(n)):!0===r.readable&&w(r.read)&&w(r.on)?f=new h(n):(t.File&&r instanceof File||r instanceof Object)&&(f=new d(n)),f.stream(r)},unparse:function(e,t){var r=!1,n=!0,i=",",s="\r\n",o='"',l=o+o,u=!1,d=null,c=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||a.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(i=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(o=t.quoteChar),"boolean"==typeof t.header&&(n=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");d=t.columns}void 0!==t.escapeChar&&(l=t.escapeChar+o),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(c=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var h=new RegExp(p(o),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return f(null,e,u);if("object"==typeof e[0])return f(d||Object.keys(e[0]),e,u)}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||d),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])),f(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function f(e,t,r){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var o=Array.isArray(e)&&0<e.length,l=!Array.isArray(t[0]);if(o&&n){for(var u=0;u<e.length;u++)0<u&&(a+=i),a+=g(e[u],u);0<t.length&&(a+=s)}for(var d=0;d<t.length;d++){var c=o?e.length:t[d].length,h=!1,f=o?0===Object.keys(t[d]).length:0===t[d].length;if(r&&!o&&(h="greedy"===r?""===t[d].join("").trim():1===t[d].length&&0===t[d][0].length),"greedy"===r&&o){for(var p=[],m=0;m<c;m++){var v=l?e[m]:m;p.push(t[d][v])}h=""===p.join("").trim()}if(!h){for(var _=0;_<c;_++){0<_&&!f&&(a+=i);var b=o&&l?e[_]:_;a+=g(t[d][b],_)}d<t.length-1&&(!r||0<c&&!f)&&(a+=s)}}return a}function g(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var n=!1;c&&"string"==typeof e&&c.test(e)&&(e="'"+e,n=!0);var s=e.toString().replace(h,l);return(n=n||!0===r||"function"==typeof r&&r(e,t)||Array.isArray(r)&&r[t]||function(e,t){for(var r=0;r<t.length;r++)if(-1<e.indexOf(t[r]))return!0;return!1}(s,a.BAD_DELIMITERS)||-1<s.indexOf(i)||" "===s.charAt(0)||" "===s.charAt(s.length-1))?o+s+o:s}}};if(a.RECORD_SEP=String.fromCharCode(30),a.UNIT_SEP=String.fromCharCode(31),a.BYTE_ORDER_MARK="\ufeff",a.BAD_DELIMITERS=["\r","\n",'"',a.BYTE_ORDER_MARK],a.WORKERS_SUPPORTED=!r&&!!t.Worker,a.NODE_STREAM_INPUT=1,a.LocalChunkSize=10485760,a.RemoteChunkSize=5242880,a.DefaultDelimiter=",",a.Parser=g,a.ParserHandle=f,a.NetworkStreamer=u,a.FileStreamer=d,a.StringStreamer=c,a.ReadableStreamStreamer=h,t.jQuery){var o=t.jQuery;o.fn.parse=function(e){var r=e.config||{},n=[];return this.each((function(e){if("INPUT"!==o(this).prop("tagName").toUpperCase()||"file"!==o(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var i=0;i<this.files.length;i++)n.push({file:this.files[i],inputElem:this,instanceConfig:o.extend({},r)})})),i(),this;function i(){if(0!==n.length){var t,r,i,l=n[0];if(w(e.before)){var u=e.before(l.file,l.inputElem);if("object"==typeof u){if("abort"===u.action)return t=l.file,r=l.inputElem,i=u.reason,void(w(e.error)&&e.error({name:"AbortError"},t,r,i));if("skip"===u.action)return void s();"object"==typeof u.config&&(l.instanceConfig=o.extend(l.instanceConfig,u.config))}else if("skip"===u)return void s()}var d=l.instanceConfig.complete;l.instanceConfig.complete=function(e){w(d)&&d(e,l.file,l.inputElem),s()},a.parse(l.file,l.instanceConfig)}else w(e.complete)&&e.complete()}function s(){n.splice(0,1),i()}}}function l(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:{}},function(e){var t=b(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new f(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,r){if(this.isFirstChunk&&w(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i)}this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e;this._partialLine="";var o=this._handle.parse(s,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var l=o.meta.cursor;this._finished||(this._partialLine=s.substring(l-this._baseIndex),this._baseIndex=l),o&&o.data&&(this._rowCount+=o.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(n)t.postMessage({results:o,workerId:a.WORKER_ID,finished:u});else if(w(this._config.chunk)&&!r){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||!u||!w(this._config.complete)||o&&o.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||o&&o.meta.paused||this._nextChunk(),o}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):n&&this._config.error&&t.postMessage({workerId:a.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=a.RemoteChunkSize),l.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=y(this._chunkLoaded,this),t.onerror=y(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||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var r=t.statusText||e;this._sendError(new Error(r))}}function d(e){var t,r;(e=e||{}).chunkSize||(e.chunkSize=a.LocalChunkSize),l.call(this,e);var n="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,r=e.slice||e.webkitSlice||e.mozSlice,n?((t=new FileReader).onload=y(this._chunkLoaded,this),t.onerror=y(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 i=Math.min(this._start+this._config.chunkSize,this._input.size);e=r.call(e,this._start,i)}var s=t.readAsText(e,this._config.encoding);n||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 c(e){var t;l.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,r=this._config.chunkSize;return r?(e=t.substring(0,r),t=t.substring(r)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function h(e){l.call(this,e=e||{});var t=[],r=!0,n=!1;this.pause=function(){l.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){l.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(){n&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=y((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=y((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=y((function(){this._streamCleanUp(),n=!0,this._streamData("")}),this),this._streamCleanUp=y((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function f(e){var t,r,n,i=Math.pow(2,53),s=-i,o=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,l=/^((\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)))$/,u=this,d=0,c=0,h=!1,f=!1,m=[],v={data:[],errors:[],meta:{}};if(w(e.step)){var _=e.step;e.step=function(t){if(v=t,S())E();else{if(E(),0===v.data.length)return;d+=t.data.length,e.preview&&d>e.preview?r.abort():(v.data=v.data[0],_(v,u))}}}function y(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function E(){return v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines&&(v.data=v.data.filter((function(e){return!y(e)}))),S()&&function(){if(v)if(Array.isArray(v.data[0])){for(var t=0;S()&&t<v.data.length;t++)v.data[t].forEach(r);v.data.splice(0,1)}else v.data.forEach(r);function r(t,r){w(e.transformHeader)&&(t=e.transformHeader(t,r)),m.push(t)}}(),function(){if(!v||!e.header&&!e.dynamicTyping&&!e.transform)return v;function t(t,r){var n,i=e.header?{}:[];for(n=0;n<t.length;n++){var s=n,a=t[n];e.header&&(s=n>=m.length?"__parsed_extra":m[n]),e.transform&&(a=e.transform(a,s)),a=F(s,a),"__parsed_extra"===s?(i[s]=i[s]||[],i[s].push(a)):i[s]=a}return e.header&&(n>m.length?O("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+n,c+r):n<m.length&&O("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+n,c+r)),i}var r=1;return!v.data.length||Array.isArray(v.data[0])?(v.data=v.data.map(t),r=v.data.length):v.data=t(v.data,0),e.header&&v.meta&&(v.meta.fields=m),c+=r,v}()}function S(){return e.header&&0===m.length}function F(t,r){return n=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[n]&&(e.dynamicTyping[n]=e.dynamicTypingFunction(n)),!0===(e.dynamicTyping[n]||e.dynamicTyping)?"true"===r||"TRUE"===r||"false"!==r&&"FALSE"!==r&&(function(e){if(o.test(e)){var t=parseFloat(e);if(s<t&&t<i)return!0}return!1}(r)?parseFloat(r):l.test(r)?new Date(r):""===r?null:r):r;var n}function O(e,t,r,n){var i={type:e,code:t,message:r};void 0!==n&&(i.row=n),v.errors.push(i)}this.parse=function(i,s,o){var l=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var r=new RegExp(p(t)+"([^]*?)"+p(t),"gm"),n=(e=e.replace(r,"")).split("\r"),i=e.split("\n"),s=1<i.length&&i[0].length<n[0].length;if(1===n.length||s)return"\n";for(var a=0,o=0;o<n.length;o++)"\n"===n[o][0]&&a++;return a>=n.length/2?"\r\n":"\r"}(i,l)),n=!1,e.delimiter)w(e.delimiter)&&(e.delimiter=e.delimiter(i),v.meta.delimiter=e.delimiter);else{var u=function(t,r,n,i,s){var o,l,u,d;s=s||[",","\t","|",";",a.RECORD_SEP,a.UNIT_SEP];for(var c=0;c<s.length;c++){var h=s[c],f=0,p=0,m=0;u=void 0;for(var v=new g({comments:i,delimiter:h,newline:r,preview:10}).parse(t),_=0;_<v.data.length;_++)if(n&&y(v.data[_]))m++;else{var b=v.data[_].length;p+=b,void 0!==u?0<b&&(f+=Math.abs(b-u),u=b):u=b}0<v.data.length&&(p/=v.data.length-m),(void 0===l||f<=l)&&(void 0===d||d<p)&&1.99<p&&(l=f,o=h,d=p)}return{successful:!!(e.delimiter=o),bestDelimiter:o}}(i,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(n=!0,e.delimiter=a.DefaultDelimiter),v.meta.delimiter=e.delimiter}var d=b(e);return e.preview&&e.header&&d.preview++,t=i,r=new g(d),v=r.parse(t,s,o),E(),h?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return h},this.pause=function(){h=!0,r.abort(),t=w(e.chunk)?"":t.substring(r.getCharIndex())},this.resume=function(){u.streamer._halted?(h=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return f},this.abort=function(){f=!0,r.abort(),v.meta.aborted=!0,w(e.complete)&&e.complete(v),t=""}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t,r=(e=e||{}).delimiter,n=e.newline,i=e.comments,s=e.step,o=e.preview,l=e.fastMode,u=t=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof r||-1<a.BAD_DELIMITERS.indexOf(r))&&(r=","),i===r)throw new Error("Comment character same as delimiter");!0===i?i="#":("string"!=typeof i||-1<a.BAD_DELIMITERS.indexOf(i))&&(i=!1),"\n"!==n&&"\r"!==n&&"\r\n"!==n&&(n="\n");var d=0,c=!1;this.parse=function(a,h,f){if("string"!=typeof a)throw new Error("Input must be a string");var g=a.length,m=r.length,v=n.length,_=i.length,b=w(s),y=[],E=[],S=[],F=d=0;if(!a)return K();if(e.header&&!h){var O=a.split(n)[0].split(r),k=[],R={},x=!1;for(var N in O){var D=O[N];w(e.transformHeader)&&(D=e.transformHeader(D,N));var L=D,M=R[D]||0;for(0<M&&(x=!0,L=D+"_"+M),R[D]=M+1;k.includes(L);)L=L+"_"+M;k.push(L)}if(x){var T=a.split(n);T[0]=k.join(r),a=T.join(n)}}if(l||!1!==l&&-1===a.indexOf(t)){for(var C=a.split(n),P=0;P<C.length;P++){if(S=C[P],d+=S.length,P!==C.length-1)d+=n.length;else if(f)return K();if(!i||S.substring(0,_)!==i){if(b){if(y=[],z(S.split(r)),$(),c)return K()}else z(S.split(r));if(o&&o<=P)return y=y.slice(0,o),K(!0)}}return K()}for(var I=a.indexOf(r,d),V=a.indexOf(n,d),A=new RegExp(p(u)+p(t),"g"),H=a.indexOf(t,d);;)if(a[d]!==t)if(i&&0===S.length&&a.substring(d,d+_)===i){if(-1===V)return K();d=V+v,V=a.indexOf(n,d),I=a.indexOf(r,d)}else if(-1!==I&&(I<V||-1===V))S.push(a.substring(d,I)),d=I+m,I=a.indexOf(r,d);else{if(-1===V)break;if(S.push(a.substring(d,V)),W(V+v),b&&($(),c))return K();if(o&&y.length>=o)return K(!0)}else for(H=d,d++;;){if(-1===(H=a.indexOf(t,H+1)))return f||E.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:y.length,index:d}),q();if(H===g-1)return q(a.substring(d,H).replace(A,t));if(t!==u||a[H+1]!==u){if(t===u||0===H||a[H-1]!==u){-1!==I&&I<H+1&&(I=a.indexOf(r,H+1)),-1!==V&&V<H+1&&(V=a.indexOf(n,H+1));var j=U(-1===V?I:Math.min(I,V));if(a.substr(H+1+j,m)===r){S.push(a.substring(d,H).replace(A,t)),a[d=H+1+j+m]!==t&&(H=a.indexOf(t,d)),I=a.indexOf(r,d),V=a.indexOf(n,d);break}var B=U(V);if(a.substring(H+1+B,H+1+B+v)===n){if(S.push(a.substring(d,H).replace(A,t)),W(H+1+B+v),I=a.indexOf(r,d),H=a.indexOf(t,d),b&&($(),c))return K();if(o&&y.length>=o)return K(!0);break}E.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:y.length,index:d}),H++}}else H++}return q();function z(e){y.push(e),F=d}function U(e){var t=0;if(-1!==e){var r=a.substring(H+1,e);r&&""===r.trim()&&(t=r.length)}return t}function q(e){return f||(void 0===e&&(e=a.substring(d)),S.push(e),d=g,z(S),b&&$()),K()}function W(e){d=e,z(S),S=[],V=a.indexOf(n,d)}function K(e){return{data:y,errors:E,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:F+(h||0)}}}function $(){s(K()),y=[],E=[]}},this.abort=function(){c=!0},this.getCharIndex=function(){return d}}function m(e){var t=e.data,r=i[t.workerId],n=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){n=!0,v(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:_,resume:_};if(w(r.userStep)){for(var a=0;a<t.results.data.length&&(r.userStep({data:t.results.data[a],errors:t.results.errors,meta:t.results.meta},s),!n);a++);delete t.results}else w(r.userChunk)&&(r.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!n&&v(t.workerId,t.results)}function v(e,t){var r=i[e];w(r.userComplete)&&r.userComplete(t),r.terminate(),delete i[e]}function _(){throw new Error("Not implemented.")}function b(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var r in e)t[r]=b(e[r]);return t}function y(e,t){return function(){e.apply(t,arguments)}}function w(e){return"function"==typeof e}return n&&(t.onmessage=function(e){var r=e.data;if(void 0===a.WORKER_ID&&r&&(a.WORKER_ID=r.workerId),"string"==typeof r.input)t.postMessage({workerId:a.WORKER_ID,results:a.parse(r.input,r.config),finished:!0});else if(t.File&&r.input instanceof File||r.input instanceof Object){var n=a.parse(r.input,r.config);n&&t.postMessage({workerId:a.WORKER_ID,results:n,finished:!0})}}),(u.prototype=Object.create(l.prototype)).constructor=u,(d.prototype=Object.create(l.prototype)).constructor=d,(c.prototype=Object.create(c.prototype)).constructor=c,(h.prototype=Object.create(l.prototype)).constructor=h,a},void 0===(n=r.apply(t,[]))||(e.exports=n)},325:e=>{e.exports={converterElementNotFound:'Aucun élément HTML n\'a été trouvé ayant comme "id" : ',converterFieldNotFound:"Le champ n'existe pas dans les données ou les données n'ont pas encore été chargées.",converterNeedDatasElt:"Merci de fournir un id valide pour l'élément où afficher les données.",converterRefreshFail:"Le nom des champs et l'élement du DOM receveur sont nécessaires à l'affichage des données.",filterNeedDatas:"Le création d'un filtre nécessite la présence des données à filtrer.",pagination2HTMLFail:"Toutes les donnée nécessaires à la création des sélecteurs de pagination n'ont pas été fournies.",paginationNeedByfaultValueBeInOptions:"La valeur de pagination par défaut doit faire partie des options proposées.",paginationNeedDatas:"Il ne peut y avoir de pagination, si les données n'ont pas été récupérées.",paginationNeedOptionsValues:"Vous n'avez fourni aucune options possibles pour la pagination.",paginationOptionsDuplicatedValues:"Une valeur en doublon a été trouvée dans les options de pagination.",paginationNeedPositiveInteger:"Merci de fournir un nombre entier supérieur à zéro pour désigner chaque option de pagination.",parserDatasNotFound:"Aucune donnée n'a été trouvée.",parserElementsNotFound:"Aucun élément trouvé dans le document pour le sélecteur fourni : ",parserFail:"La lecture des données a échoué.",parserFieldNameFail:"Les noms de champs fournis doivent être uniques et ne peuvent être vides.",parserFieldsNotFound:"Aucun nom de champs n'a été trouvé par le parseur.",parserLineWithoutDatas:"Une ligne ne contenant aucune donnée valide a été trouvée.",parserMeetErrors:"Au moins une erreur a été rencontrée durant le traitement des données.",parserNeedDatas:"Merci de fournir une chaîne de caractères valide à parser.",parserNeedSource:"Merci de fournir une chaîne de caractères où une url pour les données à parser.",parserNumberOfFieldsFail:"Il n'y a pas le nombre de champs attendu pour cet enregistrement.",parserRemoteFail:"Erreur rencontrée durant l'accès aux données distantes.",parserSelectorsIsEmpty:"Les sélecteurs CSS ne peuvent pas être une chaîne vide.",parserTypeError:"Une donnée a été trouvée avec un type imprévu : ",remoteSourceHeaderUnallowed:"Le nom d'une des entêtes passées n'est pas autorisé.",remoteSourceNeedUrl:"Merci de fournir une url valide pour la source distante de données.",remoteSourceUrlFail:"L'url fournie ne semble pas valide.",renderNeedFields:"Les noms de champs doivent être fournis avant de demander l'affichage des données.",searchBtnTxtFail:"Le texte du bouton du moteur de recherche doit contenir au maximum 30 caractères.",searchFieldNotFound:"Au moins un des champs devant être utilisés par le moteur de recherche n'existe pas dans les données.",selector2HTMLFail:"Le création d'un filtre dans le DOM nécessite l'initialisation de l'élément HTML et du numéro du champs à filter.",selectorFieldIsEmpty:"Aucune donnée trouvée pour le champ du filtre",selectorFieldNotFound:"Au moins un des champs devant servir à filtrer les données n'existe pas dans le fichier.",selectorSelectedIndexNotFound:"La valeur sélectionnée n'a pas été trouvée dans la liste des champs.",sortingFieldNeedDatas:"La création d'un champ de classement nécessite la transmission de la liste des champs.",sortingFieldNotFound:"Au moins un des champs devant permettre de classer les données n'existe pas dans ceux à afficher.",sortingFieldsNbFail:"Le nombre de champs trouvés dans le DOM ne correspond pas à celui des données à classer.",sortingFieldsNotInHTML:"Les champs pouvant servir à classer les données n'ont pas été trouvés dans le DOM."}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e,t,n,i,s=r(325),a=function(){function e(e){this.allowedUrlProtocol=["https:","http:"],this._url="",this._headers=[],this._withCredentials=!1,""!==e.url&&(this.url=e.url),void 0!==e.headers&&(this.headers=e.headers),void 0!==e.withCredentials&&(this.withCredentials=e.withCredentials)}return Object.defineProperty(e.prototype,"url",{get:function(){return this._url},set:function(e){if(0===e.trim().length)throw new Error(s.remoteSourceNeedUrl);try{var t=new URL(e);if(-1===this.allowedUrlProtocol.indexOf(t.protocol))throw new Error}catch(e){throw console.error(e),new Error(s.remoteSourceUrlFail)}this._url=e.trim()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headers",{get:function(){return this._headers},set:function(e){for(var t=["Accept-Charset","Accept-Encoding","Access-Control-Request-Headers","Access-Control-Request-Method","Connection","Content-Length","Cookie","Cookie2","Date","DNT","Expect","Host","Keep-Alive","Origin","Referer","TE","Trailer","Transfer-Encoding","Upgrade","Via"],r=0,n=e;r<n.length;r++){var i=n[r];i.key=i.key.trim(),i.key.startsWith("Sec-")||i.key.startsWith("Proxy-")||-1!==t.indexOf(i.key)?console.error(s.remoteSourceHeaderIsUnallowed):this._headers.push({key:i.key,value:i.value.trim()})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"withCredentials",{get:function(){return this._withCredentials},set:function(e){this._withCredentials=e},enumerable:!1,configurable:!0}),e.prototype.getFetchSettings=function(){var e=new Headers;if(void 0!==this._headers)for(var t=0,r=this._headers;t<r.length;t++){var n=r[t];e.append(n.key,n.value)}return{method:"GET",headers:e,credentials:this._withCredentials?"include":"omit"}},e}(),o=r(809),l=r(325),u=function(){function e(e){this._datas2Parse="",this._parseResults=void 0,this.options={delimiter:"",newline:"",quoteChar:'"',escapeChar:'"',transformHeader:function(e,t){return e.trim()},preview:0,comments:"",fastMode:void 0,transform:void 0},this._privateOptions={header:!0,download:!1,downloadRequestHeaders:void 0,skipEmptyLines:"greedy",withCredentials:void 0},this._datasRemoteSource=void 0!==e?e:new a({url:""})}return e.prototype.setRemoteSource=function(e){this._datasRemoteSource=new a(e)},Object.defineProperty(e.prototype,"datasRemoteSource",{get:function(){return this._datasRemoteSource},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datas2Parse",{get:function(){return this._datas2Parse},set:function(e){if(0===e.trim().length)throw new Error(l.parserNeedDatas);this._datas2Parse=e.trim()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parseResults",{get:function(){return this._parseResults},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"privateOptions",{get:function(){return this._privateOptions},enumerable:!1,configurable:!0}),e.prototype.parse=function(){return e=this,t=void 0,n=function(){var e,t,r,n,i,s=this;return function(e,t){var r,n,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}(this,(function(a){if(t="",""!==(e=this)._datasRemoteSource.url){if(t=e._datasRemoteSource.url,this._privateOptions.download=!0,this._privateOptions.withCredentials=e._datasRemoteSource.withCredentials,void 0!==e._datasRemoteSource.headers)for(this._privateOptions.downloadRequestHeaders={},r=0,n=e._datasRemoteSource.headers;r<n.length;r++)i=n[r],this._privateOptions.downloadRequestHeaders[i.key]=i.value}else{if(""===e._datas2Parse)throw new Error(l.parserNeedSource);t=e._datas2Parse}return[2,new Promise((function(r,n){o.parse(t,{delimiter:s.options.delimiter,newline:s.options.newline,quoteChar:s.options.quoteChar,escapeChar:s.options.escapeChar,header:!0,transformHeader:s.options.transformHeader,preview:s.options.preview,comments:s.options.comments,complete:function(t){for(var i=[],s=[],a=0,o=t.meta.fields;a<o.length;a++){var u=o[a].trim();""!==u&&-1===i.indexOf(u)?i.push(u):s.push({row:-1,message:l.parserFieldNameFail})}0===i.length?n(new Error(l.parserFieldsNotFound)):(e._parseResults={datas:t.data,errors:s.concat(t.errors),fields:i},r(!0))},download:s._privateOptions.download,downloadRequestHeaders:s._privateOptions.downloadRequestHeaders,skipEmptyLines:"greedy",fastMode:s.options.fastMode,withCredentials:s._privateOptions.withCredentials,transform:s.options.transform})}))]}))},new((r=void 0)||(r=Promise))((function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,o)}l((n=n.apply(e,t||[])).next())}));var e,t,r,n},e}(),d=r(325),c=function(){function e(e){this._document2Parse=document,this._parseResults=void 0,this._fieldsSelector="table > thead > tr > th",this._rowsSelector="table > tbody > tr",this._datasSelector="tr > td",this._datasRemoteSource=void 0!==e?e:new a({url:""})}return e.prototype.setRemoteSource=function(e){this._datasRemoteSource=new a(e)},Object.defineProperty(e.prototype,"datasRemoteSource",{get:function(){return this._datasRemoteSource},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"document2Parse",{get:function(){return this._document2Parse},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fieldsSelector",{get:function(){return this._fieldsSelector},set:function(e){if(""===e.trim())throw new Error(d.parserSelectorsIsEmpty);this._fieldsSelector=e.trim()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rowsSelector",{get:function(){return this._rowsSelector},set:function(e){if(""===e.trim())throw new Error(d.parserSelectorsIsEmpty);this._rowsSelector=e.trim()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datasSelector",{get:function(){return this._datasSelector},set:function(e){if(""===e.trim())throw new Error(d.parserSelectorsIsEmpty);this._datasSelector=e.trim()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parseResults",{get:function(){return this._parseResults},enumerable:!1,configurable:!0}),e.prototype.parse=function(){return e=this,t=void 0,n=function(){var e,t,r,n,i,s,a,o,l,u,c,h,f,p;return function(e,t){var r,n,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}(this,(function(g){switch(g.label){case 0:return e=[],t=[],r=[],""===this._datasRemoteSource.url?[3,3]:(n=this._datasRemoteSource.getFetchSettings(),[4,fetch(this._datasRemoteSource.url,n)]);case 1:if(!(i=g.sent()).ok)throw new Error(d.parserRemoteFail);return[4,i.text()];case 2:s=g.sent(),a=new DOMParser,this._document2Parse=a.parseFromString(s,"text/html"),g.label=3;case 3:if(0===(o=this._document2Parse.querySelectorAll(this._fieldsSelector)).length)throw new Error(d.parserElementsNotFound+this._fieldsSelector);for(h=0;h<o.length;h++)""!==(l=(o[h].textContent+"").trim())&&-1===e.indexOf(l)?e.push(l):r.push({row:-1,message:d.parserFieldNameFail});if(0===e.length)throw new Error(d.parserFieldsNotFound);for(u=this._document2Parse.querySelectorAll(this._rowsSelector),h=0;h<u.length;h++){for((c=u[h].querySelectorAll(this._datasSelector)).length!==e.length&&r.push({row:h,message:d.parserNumberOfFieldsFail}),f={},p=0;p<c.length&&p<e.length;p++)f[e[p]]=c[p].textContent+"";0!==Object.keys(f).length?t.push(f):r.push({row:h,message:d.parserLineWithoutDatas})}return this._parseResults={datas:t,errors:r,fields:e},[2]}}))},new((r=void 0)||(r=Promise))((function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,o)}l((n=n.apply(e,t||[])).next())}));var e,t,r,n},e}(),h=r(325),f=function(){function e(e){this._datas2Parse="",this._parseResults=void 0,this._datasRemoteSource=void 0!==e?e:new a({url:""})}return e.prototype.setRemoteSource=function(e){this._datasRemoteSource=new a(e)},Object.defineProperty(e.prototype,"datasRemoteSource",{get:function(){return this._datasRemoteSource},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datas2Parse",{get:function(){return this._datas2Parse},set:function(e){if(0===e.trim().length)throw new Error(h.parserNeedDatas);this._datas2Parse=e.trim()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parseResults",{get:function(){return this._parseResults},enumerable:!1,configurable:!0}),e.prototype.parse=function(){return e=this,t=void 0,n=function(){var e,t,r,n,i,s,a,o,l,u,d,c,f,p,g,m,v,_,b,y;return function(e,t){var r,n,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}(this,(function(w){switch(w.label){case 0:return t="",""===(e=this)._datasRemoteSource.url?[3,3]:(r=e._datasRemoteSource.getFetchSettings(),[4,fetch(e._datasRemoteSource.url,r)]);case 1:if(!(n=w.sent()).ok)throw new Error(h.parserRemoteFail);return[4,n.text()];case 2:return t=w.sent(),[3,4];case 3:if(""===e._datas2Parse)throw new Error(h.parserNeedSource);t=e._datas2Parse,w.label=4;case 4:if(i=JSON.parse(t),s=["boolean","number","string"],a=[],o=[],l=[],Array.isArray(i.fields)&&Array.isArray(i.datas)){for(u=i.fields.length,d=i.datas.length,c=[],a=i.fields,g=0;g<u;g++)"string"!=typeof a[g]?l.push({row:-1,message:h.parserTypeError+typeof a[g]}):(a[g]=a[g].trim(),""!==a[g]&&-1===c.indexOf(a[g])?c.push(a[g]):l.push({row:-1,message:h.parserFieldNameFail}));if(0===(a=c).length)throw new Error(h.parserFail);for(g=0;g<d;g++){for(b={},(f=i.datas[g].length)!==u&&l.push({row:g,message:h.parserNumberOfFieldsFail}),p=0;p<f&&p<u;p++)-1===s.indexOf(typeof i.datas[g][p])?l.push({row:g,message:h.parserTypeError+typeof i.datas[g][p]}):b[a[p]]=i.datas[g][p]+"";0!==Object.keys(b).length?o.push(b):l.push({row:g,message:h.parserLineWithoutDatas})}}else{for(g=0,m=0,v=i;m<v.length;m++){for(y in _=v[m],b={},_)""===(y=y.trim())?l.push({row:-1,message:h.parserFieldNameFail}):-1===s.indexOf(typeof _[y])?l.push({row:g,message:h.parserTypeError+typeof _[y]}):(-1===a.indexOf(y)&&a.push(y),void 0!==b[y]?l.push({row:g,message:h.parserFieldNameFail}):b[y]=_[y]+"");0!==Object.keys(b).length?o.push(b):l.push({row:g,message:h.parserLineWithoutDatas}),g++}if(0===a.length)throw new Error(h.parserFail)}return e._parseResults={datas:o,errors:l,fields:a},[2]}}))},new((r=void 0)||(r=Promise))((function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,o)}l((n=n.apply(e,t||[])).next())}));var e,t,r,n},e}(),p=r(325),g=function(){function e(t){void 0===t&&(t=e.defaultSettings),this._fields=[],this.datas=[],this.settings=t}return Object.defineProperty(e.prototype,"fields",{get:function(){return this._fields},set:function(e){if(0===e.length)throw new Error(p.renderNeedFields);this._fields=e},enumerable:!1,configurable:!0}),e.prototype.rend2HTML=function(){if(0===this._fields.length)throw new Error(p.renderNeedFields);var e=this.settings.allBegining;if(void 0!==this.settings.fieldsBegining&&void 0!==this.settings.fieldDisplaying&&void 0!==this.settings.fieldsEnding){e+=this.settings.fieldsBegining;for(var t=0,r=this._fields;t<r.length;t++){var n=r[t];e+=this.settings.fieldDisplaying.replace("#FIELDNAME",n)}e+=this.settings.fieldsEnding}e+=this.settings.linesBegining;for(var i=0,s=this.datas;i<s.length;i++){var a=s[i];e+=this.settings.lineBegining;for(var o=0,l=this._fields;o<l.length;o++)void 0!==a[n=l[o]]?e+=this.settings.dataDisplaying.replace("#VALUE",a[n]).replace("#FIELDNAME",n):e+=this.settings.dataDisplaying.replace("#VALUE","").replace("#FIELDNAME",n);e+=this.settings.lineEnding}return e+(this.settings.linesEnding+this.settings.allEnding)},e.defaultSettings={allBegining:"<table>",allEnding:"</table>",fieldsBegining:"<thead><tr>",fieldsEnding:"</tr></thead>",fieldDisplaying:"<th>#FIELDNAME</th>",linesBegining:"<tbody>",linesEnding:"</tbody>",lineBegining:"<tr>",lineEnding:"</tr>",dataDisplaying:"<td>#VALUE</td>"},e}(),m=r(325),v=function(){function e(e,t,r){if(void 0===r&&(r="Pages"),0===e.fields.length)throw new Error(m.paginationNeedDatas);this._pages={displayElement:R.checkInDOMById(t),name:r},this._converter=e}return e.isPositiveInteger=function(e){return!(!1===Number.isInteger(e)||e<=0)},Object.defineProperty(e.prototype,"selectedValue",{get:function(){return this._selectedValue},set:function(t){if(void 0!==t){if(!e.isPositiveInteger(t))throw new Error(m.needPositiveInteger);if(void 0!==this.options&&-1===this.options.values.indexOf(t))throw new Error(m.paginationNeedByfaultValueBeInOptions)}this._selectedValue=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._options},set:function(t){if(void 0!==t){t.displayElement=R.checkInDOMById(t.displayElement);for(var r=[],n=0,i=t.values;n<i.length;n++){var s=i[n];if(!e.isPositiveInteger(s))throw new Error(m.needPositiveInteger);-1===r.indexOf(s)?r.push(s):console.log(m.paginationOptionsDuplicatedValues)}if(r.length<2)throw new Error(m.paginationNeedOptionsValues);if(t.values=r,void 0!==this.selectedValue&&-1===t.values.indexOf(this.selectedValue))throw new Error(m.paginationNeedByfaultValueBeInOptions);t.name=void 0===t.name?"Pagination":t.name}this._options=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pages",{get:function(){return this._pages},enumerable:!1,configurable:!0}),e.prototype.options2HTML=function(){if(void 0===this._options)throw new Error(m.pagination2HTMLFail);for(var e="<label for='freeDatas2HTMLPaginationSelector'>"+this._options.name+" </label><select name='freeDatas2HTMLPaginationSelector' id='freeDatas2HTMLPaginationSelector'><option value='0'>----</option>",t=0;t<this._options.values.length;t++)e+="<option value='"+(t+1)+"'>"+this._options.values[t]+"</option>";e+="</select>",this._options.displayElement.eltDOM.innerHTML=e;var r=document.getElementById("freeDatas2HTMLPaginationSelector");void 0!==this._selectedValue&&(r.value=""+(this._options.values.indexOf(this._selectedValue)+1));var n=this;r.addEventListener("change",(function(e){"0"===r.value?n._selectedValue=void 0:n._selectedValue=n._options.values[Number(r.value)-1],n._converter.refreshView()}))},e.prototype.pages2HTML=function(){if(void 0===this._selectedValue||this._converter.nbDatasValid<=this._selectedValue)this.pages.displayElement.eltDOM.innerHTML="";else{var e=Math.ceil(this._converter.nbDatasValid/this._selectedValue),t="<label for='freeDatas2HTMLPagesSelector'>"+this.pages.name+"</label><select name='freeDatas2HTMLPagesSelector' id='freeDatas2HTMLPagesSelector'>";this.pages.values=[];for(var r=1;r<=e;r++)t+="<option value='"+r+"'>"+r+"</option>",this.pages.values.push(r);t+="</select>",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector"),i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView(!0),n.value=""+i.pages.selectedValue}))}},e}(),_=r(325),b=function(){function e(e,t,r){if(this._datasViewElt={id:"",eltDOM:void 0},this._btnTxt="Search",this._fields2Search=[],this.label="",this.nbCharsForSearch=0,this.placeholder="",this.automaticSearch=!1,this._inputValue="",this.searchMode={accentOff:!0,caseOff:!0,separatedWords:!0,specialCharsOff:!0,specialCharsWhiteList:""},0===e.fields.length||0===e.datas.length)throw new Error(_.filterNeedDatas);if(this._datasViewElt=R.checkInDOMById(t),this._converter=e,void 0!==r&&0!==r.length)for(var n=0,i=r;n<i.length;n++){var s=i[n];if(!this._converter.checkFieldExist(s))throw new Error(_.searchFieldNotFound);this._fields2Search.push(this.converter.fields[s])}else this._fields2Search=this._converter.fields}return Object.defineProperty(e.prototype,"converter",{get:function(){return this._converter},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datasViewElt",{get:function(){return this._datasViewElt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"btnTxt",{get:function(){return this._btnTxt},set:function(e){""!==e.trim()&&e.length<=30?this._btnTxt=e:console.error(_.searchBtnTxtFail)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"inputValue",{get:function(){return this._inputValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fields2Search",{get:function(){return this._fields2Search},enumerable:!1,configurable:!0}),e.prototype.filter2HTML=function(){this.nbCharsForSearch>0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='<form id="freeDatas2HTMLSearch">';""!==this.label&&(e+='<label for="freeDatas2HTMLSearchTxt">'.concat(this.label,"</label>")),e+='<input type="search" id="freeDatas2HTMLSearchTxt" name="freeDatas2HTMLSearchTxt"',this.nbCharsForSearch>0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> <input type="submit" id="freeDatas2HTMLSearchBtn" value="'.concat(this._btnTxt,'"></form>'),this._datasViewElt.eltDOM.innerHTML=e;var t=document.getElementById("freeDatas2HTMLSearchTxt"),r=this;t.addEventListener("input",(function(e){e.preventDefault(),r._inputValue=t.value.trim();var n=r._inputValue.length;r.automaticSearch&&(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()})),document.getElementById("freeDatas2HTMLSearchBtn").addEventListener("click",(function(e){e.preventDefault(),r._converter.refreshView()}))},e.prototype.searchPreProcessing=function(e){var t=e;if(this.searchMode.accentOff&&(t=t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),this.searchMode.caseOff&&(t=t.toLowerCase()),this.searchMode.specialCharsOff){for(var r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 "+this.searchMode.specialCharsWhiteList,n="",i=0,s=t;i<s.length;i++){var a=s[i];-1!==r.indexOf(a)&&(n+=a)}t=n}return t},e.prototype.dataIsOk=function(e){var t=this.searchPreProcessing(this._inputValue.trim());if(0===t.length)return!0;var r=[];this.searchMode.separatedWords?r=t.split(" "):r[0]=t;for(var n=0,i=0,s=r;i<s.length;i++){var a=s[i];for(var o in e)if(-1!==this._fields2Search.indexOf(o)&&-1!==this.searchPreProcessing(e[o]).indexOf(a.trim())){n++;break}}return!(n<r.length)},e}(),y=r(843).U,w=r(325),E=function(){function e(e,t,r,n){if(this._datasViewElt={id:"",eltDOM:void 0},this._selectedValues=[],this._values=[],this._name="",this.isMultiple=!1,0===e.fields.length||0===e.datas.length)throw new Error(w.filterNeedDatas);if(!e.checkFieldExist(Number(t)))throw new Error(w.selectorFieldNotFound);this._datasViewElt=R.checkInDOMById(r),this._converter=e,this._datasFieldNb=t,void 0!==n&&""!==n&&(this._separator=n),this._name=this._converter.fields[this._datasFieldNb],this.setValues()}return Object.defineProperty(e.prototype,"converter",{get:function(){return this._converter},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datasViewElt",{get:function(){return this._datasViewElt},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datasFieldNb",{get:function(){return this._datasFieldNb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedValues",{get:function(){return this._selectedValues},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"separator",{get:function(){return this._separator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){return this._values},enumerable:!1,configurable:!0}),e.prototype.setValues=function(){for(var e=0,t=this._converter.datas;e<t.length;e++){var r=t[e],n=void 0;if(void 0===this._separator)""!==(n=r[this._name].trim())&&-1===this._values.indexOf(n)&&this._values.push(n);else for(var i=0,s=r[this._name].split(this._separator);i<s.length;i++)""!==(n=s[i].trim())&&-1===this._values.indexOf(n)&&this._values.push(n)}if(0===this._values.length)throw new Error(w.selectorFieldIsEmpty);void 0!==this._converter.getSortingFunctionForField(this._datasFieldNb)?this._values.sort(this._converter.getSortingFunctionForField(this._datasFieldNb).sort):this._values.sort(y())},e.prototype.filter2HTML=function(e){void 0===e&&(e=""),e=""===e?this._name:e;for(var t=this.isMultiple?" multiple":"",r="<label for='freeDatas2HTML_"+this._datasViewElt.id+"'>"+e+" :</label><select name='freeDatas2HTML_"+this._datasViewElt.id+"' id='freeDatas2HTML_"+this._datasViewElt.id+"'"+t+"><option value='0'>----</option>",n=0;n<this._values.length;n++)r+="<option value='"+(n+1)+"'>"+this._values[n]+"</option>";r+="</select>",this._datasViewElt.eltDOM.innerHTML=r;var i=document.getElementById("freeDatas2HTML_"+this._datasViewElt.id),s=this;i.addEventListener("change",(function(e){if(s._selectedValues=[],s.isMultiple)for(var t=0;t<i.selectedOptions.length;t++){var r;if(0===(r=parseInt(i.selectedOptions[t].value,10))){s._selectedValues=[];break}s._selectedValues.push(r-1)}else 0===(r=parseInt(i.value,10))?s._selectedValues=[]:s._selectedValues[0]=r-1;s._converter.refreshView()}))},e.prototype.dataIsOk=function(e){var t=function(e,t,r){if(void 0===e._separator)return t[e._name].trim()===r;for(var n=!1,i=0,s=t[e._name].split(e._separator);i<s.length;i++)if(s[i].trim()===r){n=!0;break}return n};if(0===this._selectedValues.length)return!0;if(void 0===e[this._name])return!1;for(var r=!1,n=0,i=this._selectedValues;n<i.length;n++){var s=i[n];if(void 0===this._values[s])throw new Error(w.selectorSelectedIndexNotFound);if(r=t(this,e,this._values[s]))break}return r},e}(),S=r(325),F=function(){function e(e,t,r){if(void 0===r&&(r="th"),this._order=void 0,0===e.fields.length)throw new Error(S.sortingFieldNeedDatas);if(!e.checkField2Rend(t))throw new Error(S.sortingFieldNotFound);this._converter=e,this._datasFieldNb=t,this._fieldsDOMSelector=r}return Object.defineProperty(e.prototype,"converter",{get:function(){return this._converter},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datasFieldNb",{get:function(){return this._datasFieldNb},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fieldsDOMSelector",{get:function(){return this._fieldsDOMSelector},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"order",{get:function(){return this._order},set:function(e){this._order=e},enumerable:!1,configurable:!0}),e.prototype.field2HTML=function(){var e=document.querySelectorAll(this.fieldsDOMSelector);if(void 0===e)throw new Error(S.sortingFieldsNotInHTML);if(e.length!==this._converter.realFields2Rend().length)throw new Error(S.sortingFieldsNbFail);var t=void 0,r=this._converter.getFieldDisplayRank(this._datasFieldNb);t=e[r].innerHTML,t="<a href='#freeDatas2HTMLSorting"+this._datasFieldNb+"' id='freeDatas2HTMLSorting"+this._datasFieldNb+"'>"+t+"</a>",e[r].innerHTML=t;var n=document.getElementById("freeDatas2HTMLSorting"+this._datasFieldNb),i=this;n.addEventListener("click",(function(e){e.preventDefault();var t=i._order;i._order=void 0===t||"desc"===t?"asc":"desc",i._converter.datasSortedField=i,i._converter.refreshView()}))},e}(),O=r(843).U,k=r(325),R=function(){function e(e,t,r){switch(void 0===t&&(t=""),this._datasViewElt=void 0,this.stopIfParseErrors=!1,this._datasSortingFunctions=[],this.datasFilters=[],this.datasSortingFields=[],this._fields2Rend=[],this.datasCounterElt=void 0,this._fields=[],this._datas=[],this._datas2Rend=[],this._nbDatasValid=0,this.datasRender=new g,e){case"CSV":this.parser=new u;break;case"HTML":this.parser=new c;break;case"JSON":this.parser=new f}""!==t.trim()?this.parser.datas2Parse=t:void 0!==r&&this.parser.setRemoteSource(r)}return e.checkInDOMById=function(e){var t=document.getElementById(e.id);if(null===t)throw new Error(k.converterElementNotFound+e.id);return e.eltDOM=t,e},Object.defineProperty(e.prototype,"datasViewElt",{set:function(t){this._datasViewElt=e.checkInDOMById(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datas",{get:function(){return this._datas},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fields",{get:function(){return this._fields},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nbDatasValid",{get:function(){return this._nbDatasValid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fields2Rend",{get:function(){return this._fields2Rend},set:function(e){if(0===e.length)this._fields2Rend=e;else{this._fields2Rend=[];for(var t=0,r=e;t<r.length;t++){var n=r[t];if(!this.checkFieldExist(n))throw new Error(k.converterFieldNotFound);this._fields2Rend.push(n)}}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"datas2Rend",{get:function(){return this._datas2Rend},enumerable:!1,configurable:!0}),e.prototype.getSortingFunctionForField=function(e){for(var t=0,r=this._datasSortingFunctions;t<r.length;t++){var n=r[t];if(n.datasFieldNb===e)return n}},e.prototype.run=function(){return e=this,t=void 0,n=function(){return function(e,t){var r,n,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}(this,(function(e){switch(e.label){case 0:return[4,this.parser.parse()];case 1:if(e.sent(),void 0===this.parser.parseResults)throw new Error(k.parserFail);if(this.stopIfParseErrors&&void 0!==this.parser.parseResults.errors)throw new Error(k.parserMeetErrors);return this._fields=this.parser.parseResults.fields,this._datas=this.parser.parseResults.datas,void 0!==this._datasViewElt&&this.refreshView(),[2,!0]}}))},new((r=void 0)||(r=Promise))((function(i,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function o(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,o)}l((n=n.apply(e,t||[])).next())}));var e,t,r,n},e.prototype.checkFieldExist=function(e){return void 0!==this.parser.parseResults&&void 0!==this.parser.parseResults.fields[e]},e.prototype.checkField2Rend=function(e){return 0===this._fields2Rend.length?this.checkFieldExist(e):-1!==this._fields2Rend.indexOf(e)},e.prototype.getFieldDisplayRank=function(e){return!1===this.checkField2Rend(e)?-1:0===this._fields2Rend.length?e:this._fields2Rend.indexOf(e)},e.prototype.realFields2Rend=function(){if(0===this._fields2Rend.length)return this._fields;for(var e=[],t=0,r=this._fields2Rend;t<r.length;t++){var n=r[t];e.push(this._fields[n])}return e},Object.defineProperty(e.prototype,"datasSortingFunctions",{set:function(e){this._datasSortingFunctions=[];for(var t=0,r=e;t<r.length;t++){var n=r[t];if(!this.checkFieldExist(n.datasFieldNb))throw new Error(k.converterFieldNotFound);this._datasSortingFunctions.push(n)}},enumerable:!1,configurable:!0}),e.prototype.refreshView=function(e){if(void 0===e&&(e=!1),0===this._fields.length||void 0===this._datasViewElt)throw new Error(k.converterRefreshFail);0===this._fields2Rend.length?this.datasRender.fields=this._fields:this.datasRender.fields=this.realFields2Rend(),this._datas2Rend=this.datas2HTML(e),this.datasRender.datas=this._datas2Rend,this._datasViewElt.eltDOM.innerHTML=this.datasRender.rend2HTML(),this.datasCounter2HTML();for(var t=0,r=this.datasSortingFields;t<r.length;t++)r[t].field2HTML();void 0===this.pagination||e||this.pagination.pages2HTML()},e.prototype.datasCounter2HTML=function(){void 0!==this.datasCounterElt&&(this.datasCounterElt=e.checkInDOMById(this.datasCounterElt),this.datasCounterElt.eltDOM.textContent=""+this._nbDatasValid)},e.prototype.datas2HTML=function(e){if(void 0!==this.datasSortedField){var t=this._fields[this.datasSortedField.datasFieldNb],r=this.datasSortedField.order;if(void 0!==this.getSortingFunctionForField(this.datasSortedField.datasFieldNb)){var n=this.getSortingFunctionForField(this.datasSortedField.datasFieldNb);this._datas.sort((function(e,i){return n.sort(e[t],i[t],r)}))}else this._datas.sort((function(e,n){return O({order:r})(e[t],n[t])}))}var i=0;void 0!==this.pagination&&void 0!==this.pagination.selectedValue&&void 0!==this.pagination.pages&&void 0!==this.pagination.pages.selectedValue&&(i=this.pagination.selectedValue*(this.pagination.pages.selectedValue-1));var s=void 0!==this.pagination&&void 0!==this.pagination.selectedValue?this.pagination.selectedValue:this._datas.length;void 0===this.pagination||void 0===this.pagination.pages||void 0===this.pagination.pages.selectedValue||e||(this.pagination.pages.selectedValue=1);var a=[],o=0,l=0;for(var u in this._datas){for(var d=!0,c=0;void 0!==this.datasFilters[c]&&!0===d;)d=this.datasFilters[c].dataIsOk(this._datas[u]),c++;d&&l>=i&&o<s?(a.push(this._datas[u]),o++,l++):d&&l++}if(this._nbDatasValid=l,0!==this._fields2Rend.length){var h=this.realFields2Rend(),f=[];for(var u in a){var p={};for(var g in a[u])-1!==h.indexOf(g)&&(p[g]=a[u][g]);f.push(p)}a=f}return a},e}();console.log("Hello, les dev !\nLe code source TypeScript utilisé pour faire fonctionner cette page est lisible ici : :\nhttps://forge.chapril.org/Fab_Blab/FreeDatas2HTML/src/branch/master/src/demo/exampleWithCSV.ts"),e=void 0,t=void 0,i=function(){var e,t,r,n,i,s,a,o,l,u,d,c,h;return function(e,t){var r,n,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(l){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,o[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}(this,(function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),e=function(e,t,r){void 0===r&&(r="asc");var n=["> 100000","> 1 et < 100 000","≤ 1","Traces","Inexistant"];return"desc"===r&&n.reverse(),n.indexOf(e)>n.indexOf(t)?-1:n.indexOf(e)<n.indexOf(t)?1:0},(t=new R("CSV")).parser.setRemoteSource({url:"https://freedatas2html.le-fab-lab.com/datas/elements-chimiques.csv"}),[4,t.run()];case 1:return f.sent(),r=new g,window.innerWidth<800?(r.settings={allBegining:"<h4>Affichage petits écrans !</h4>",allEnding:"",linesBegining:"<ul>",linesEnding:"</ul>",lineBegining:"<li><ul>",lineEnding:"</ul></li>",dataDisplaying:"<li><b>#FIELDNAME :</b> #VALUE</li>"},t.datasRender=r):(r.settings.allBegining="<table class='table-hover'>",t.datasRender=r),t.datasSortingFunctions=[{datasFieldNb:4,sort:e}],(n=new v(t,{id:"pages"},"Page à afficher :")).options={displayElement:{id:"paginationOptions"},values:[10,20,50,500],name:"Choix de pagination :"},n.selectedValue=10,t.pagination=n,n.options2HTML(),(i=new E(t,3,{id:"filtre1"})).filter2HTML(),(s=new E(t,4,{id:"filtre2"})).filter2HTML(),(a=new E(t,5,{id:"filtre3"},",")).isMultiple=!0,a.filter2HTML(),(o=new b(t,{id:"search"})).label="Qui cherche trouve ?",o.btnTxt="Va chercher !",o.automaticSearch=!0,o.nbCharsForSearch=2,o.placeholder="Tapes en NB, chef !",o.filter2HTML(),t.datasFilters=[i,s,a,o],window.innerWidth>=800&&(l=new F(t,0),u=new F(t,1),d=new F(t,2),c=new F(t,4),t.datasSortingFields=[l,u,d,c]),t.datasViewElt={id:"datas"},t.datasCounterElt={id:"compteur"},t.refreshView(),[3,3];case 2:return h=f.sent(),console.error(h),document.getElementById("datas").innerHTML='<div class="alert alert-warning">Désolé, mais un problème technique empêche l\'affichage des données.</div>',[3,3];case 3:return[2]}}))},new((n=void 0)||(n=Promise))((function(r,s){function a(e){try{l(i.next(e))}catch(e){s(e)}}function o(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,o)}l((i=i.apply(e,t||[])).next())}))})()})(); |