From 145383d416afcf4ec0035de385e8793a45bb4ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20PENHO=C3=8BT?= Date: Mon, 21 Feb 2022 17:19:09 +0100 Subject: [PATCH] Nouvelle compilation. --- public/JS/exampleWithCSV.app.js | 2 +- public/JS/exampleWithHTML.app.js | 2 +- public/JS/exampleWithJSON.app.js | 2 +- public/JS/exampleWithMixedFields.app.js | 2 +- public/JS/exampleWithUL.app.js | 2 +- public/JS/exampleWithUserFile.app.js | 2 +- src/build/SearchEngine.js | 62 +++++++++++++++++++----- src/build/demo/exampleWithCSV.js | 2 +- src/build/demo/exampleWithJSON.js | 2 +- src/build/demo/exampleWithMixedFields.js | 2 +- src/build/demo/exampleWithUL.js | 2 +- src/build/errors.js | 1 + 12 files changed, 62 insertions(+), 21 deletions(-) diff --git a/public/JS/exampleWithCSV.app.js b/public/JS/exampleWithCSV.app.js index 369e2e6..1c89d06 100644 --- a/public/JS/exampleWithCSV.app.js +++ b/public/JS/exampleWithCSV.app.js @@ -1,2 +1,2 @@ /*! For license information please see exampleWithCSV.app.js.LICENSE.txt */ -(()=>{var e={196:(e,t,r)=>{"use strict";r.d(t,{q:()=>k});var n=function(e,t){return et?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 et?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"string"==typeof e&&("asc"===e||"desc"===e)};function k(e){var t,r;return 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;as||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)}}((r="asc","string"==typeof(t=e)&&O(t)?r=t:t&&"object"==typeof t&&t.order&&O(t.order)&&(r=t.order),{order:r}))}},460: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=r&&/blob:/i.test((t.location||{}).protocol),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(["(",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?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&&(c=t.escapeFormulae)}}();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),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=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._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(){if(v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t=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=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=o)return I(!0)}else for(x=d,d++;;){if(-1===(x=e.indexOf(t,x+1)))return h||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:d}),C();if(x===f-1)return C(e.substring(d,x).replace(N,t));if(t!==u||e[x+1]!==u){if(t===u||0===x||e[x-1]!==u){-1!==k&&k=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:d}),x++}}else x++}return C();function M(e){b.push(e),S=d}function T(t){var r=0;if(-1!==t){var n=e.substring(x+1,t);n&&""===n.trim()&&(r=n.length)}return r}function C(t){return h||(void 0===t&&(t=e.substring(d)),E.push(t),d=f,M(E),_&&V()),I()}function P(t){d=t,M(E),E=[],R=e.indexOf(n,d)}function I(e){return{data:b,errors:y,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function V(){s(I()),b=[],y=[]}},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{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.",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(658),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;r0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]",allEnding:"",fieldsBegining:"",fieldsEnding:"",fieldDisplaying:"#FIELDNAME",linesBegining:"",linesEnding:"",lineBegining:"",lineEnding:"",dataDisplaying:"#VALUE"},e}(),m=r(658),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",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="",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector");this.pages.selectedValue=1;var i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView()}))}},e}(),_=r(658),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="",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;n0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='
';""!==this.label&&(e+='")),e+='0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> 
'),this._datasViewElt.eltDOM.innerHTML=e;var t=document.getElementById("freeDatas2HTMLSearchTxt"),r=this;t.addEventListener("input",(function(e){e.preventDefault(),r._inputValue=t.value;var n=t.value.length;r.automaticSearch&&(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()})),document.getElementById("freeDatas2HTMLSearchBtn").addEventListener("click",(function(e){e.preventDefault();var n=t.value.length;(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()}))},e.prototype.dataIsOk=function(e){if(0===this._inputValue.length)return!0;for(var t in e)if(-1!==this._fields2Search.indexOf(t)&&-1!==e[t].toLowerCase().indexOf(this._inputValue.toLowerCase()))return!0;return!1},e}(),y=r(196).q,w=r(658),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"+e+" :",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"+t+"",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(196).q,k=r(658),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;t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=n&&a fabrice@le-fab-lab.com"),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(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1] 100000","> 1 et < 100 000","≤ 1","Traces","Inexistant"];return"desc"===r&&n.reverse(),n.indexOf(e)>n.indexOf(t)?-1:n.indexOf(e)Affichage petits écrans !",allEnding:"",linesBegining:"
    ",linesEnding:"
",lineBegining:"
    • ",lineEnding:"
  • ",dataDisplaying:"
  • #FIELDNAME : #VALUE
  • "},t.datasRender=r):(r.settings.allBegining="",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='
    Désolé, mais un problème technique empêche l\'affichage des données.
    ',[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())}))})()})(); \ No newline at end of file +(()=>{var e={196:(e,t,r)=>{"use strict";r.d(t,{q:()=>k});var n=function(e,t){return et?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 et?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"string"==typeof e&&("asc"===e||"desc"===e)};function k(e){var t,r;return 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;as||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)}}((r="asc","string"==typeof(t=e)&&O(t)?r=t:t&&"object"==typeof t&&t.order&&O(t.order)&&(r=t.order),{order:r}))}},460: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=r&&/blob:/i.test((t.location||{}).protocol),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(["(",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?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&&(c=t.escapeFormulae)}}();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),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=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._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(){if(v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t=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=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=o)return I(!0)}else for(x=d,d++;;){if(-1===(x=e.indexOf(t,x+1)))return h||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:d}),C();if(x===f-1)return C(e.substring(d,x).replace(N,t));if(t!==u||e[x+1]!==u){if(t===u||0===x||e[x-1]!==u){-1!==k&&k=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:d}),x++}}else x++}return C();function M(e){b.push(e),S=d}function T(t){var r=0;if(-1!==t){var n=e.substring(x+1,t);n&&""===n.trim()&&(r=n.length)}return r}function C(t){return h||(void 0===t&&(t=e.substring(d)),E.push(t),d=f,M(E),_&&V()),I()}function P(t){d=t,M(E),E=[],R=e.indexOf(n,d)}function I(e){return{data:b,errors:y,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function V(){s(I()),b=[],y=[]}},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{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(658),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;r0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]",allEnding:"
    ",fieldsBegining:"",fieldsEnding:"",fieldDisplaying:"#FIELDNAME",linesBegining:"",linesEnding:"",lineBegining:"",lineEnding:"",dataDisplaying:"#VALUE"},e}(),m=r(658),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",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="",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector");this.pages.selectedValue=1;var i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView()}))}},e}(),_=r(658),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;n0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='
    ';""!==this.label&&(e+='")),e+='0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> 
    '),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"+e+" :",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"+t+"",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(196).q,k=r(658),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;t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=n&&a fabrice@le-fab-lab.com"),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(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1] 100000","> 1 et < 100 000","≤ 1","Traces","Inexistant"];return"desc"===r&&n.reverse(),n.indexOf(e)>n.indexOf(t)?-1:n.indexOf(e)Affichage petits écrans !",allEnding:"",linesBegining:"
      ",linesEnding:"
    ",lineBegining:"
    • ",lineEnding:"
  • ",dataDisplaying:"
  • #FIELDNAME : #VALUE
  • "},t.datasRender=r):(r.settings.allBegining="",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='
    Désolé, mais un problème technique empêche l\'affichage des données.
    ',[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())}))})()})(); \ No newline at end of file diff --git a/public/JS/exampleWithHTML.app.js b/public/JS/exampleWithHTML.app.js index eab39ab..8774cc3 100644 --- a/public/JS/exampleWithHTML.app.js +++ b/public/JS/exampleWithHTML.app.js @@ -1,2 +1,2 @@ /*! For license information please see exampleWithHTML.app.js.LICENSE.txt */ -(()=>{var e={196:(e,t,r)=>{"use strict";r.d(t,{q:()=>k});var n=function(e,t){return et?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 et?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"string"==typeof e&&("asc"===e||"desc"===e)};function k(e){var t,r;return 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;as||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)}}((r="asc","string"==typeof(t=e)&&O(t)?r=t:t&&"object"==typeof t&&t.order&&O(t.order)&&(r=t.order),{order:r}))}},460: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=r&&/blob:/i.test((t.location||{}).protocol),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(["(",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?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&&(c=t.escapeFormulae)}}();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),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=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._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(){if(v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t=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=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=o)return I(!0)}else for(D=d,d++;;){if(-1===(D=e.indexOf(t,D+1)))return h||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:d}),C();if(D===f-1)return C(e.substring(d,D).replace(N,t));if(t!==u||e[D+1]!==u){if(t===u||0===D||e[D-1]!==u){-1!==k&&k=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:d}),D++}}else D++}return C();function M(e){b.push(e),S=d}function T(t){var r=0;if(-1!==t){var n=e.substring(D+1,t);n&&""===n.trim()&&(r=n.length)}return r}function C(t){return h||(void 0===t&&(t=e.substring(d)),E.push(t),d=f,M(E),_&&V()),I()}function P(t){d=t,M(E),E=[],R=e.indexOf(n,d)}function I(e){return{data:b,errors:y,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function V(){s(I()),b=[],y=[]}},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{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.",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(658),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;r0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]",allEnding:"
    ",fieldsBegining:"",fieldsEnding:"",fieldDisplaying:"#FIELDNAME",linesBegining:"",linesEnding:"",lineBegining:"",lineEnding:"",dataDisplaying:"#VALUE"},e}(),m=r(658),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:k.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=k.checkInDOMById(t.displayElement);for(var r=[],n=0,i=t.values;n",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="",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector");this.pages.selectedValue=1;var i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView()}))}},e}(),_=r(658),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="",0===e.fields.length||0===e.datas.length)throw new Error(_.filterNeedDatas);if(this._datasViewElt=k.checkInDOMById(t),this._converter=e,void 0!==r&&0!==r.length)for(var n=0,i=r;n0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='
    ';""!==this.label&&(e+='")),e+='0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> 
    '),this._datasViewElt.eltDOM.innerHTML=e;var t=document.getElementById("freeDatas2HTMLSearchTxt"),r=this;t.addEventListener("input",(function(e){e.preventDefault(),r._inputValue=t.value;var n=t.value.length;r.automaticSearch&&(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()})),document.getElementById("freeDatas2HTMLSearchBtn").addEventListener("click",(function(e){e.preventDefault();var n=t.value.length;(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()}))},e.prototype.dataIsOk=function(e){if(0===this._inputValue.length)return!0;for(var t in e)if(-1!==this._fields2Search.indexOf(t)&&-1!==e[t].toLowerCase().indexOf(this._inputValue.toLowerCase()))return!0;return!1}}(),r(196).q),y=r(658),w=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(y.filterNeedDatas);if(!e.checkFieldExist(Number(t)))throw new Error(y.selectorFieldNotFound);this._datasViewElt=k.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"+e+" :",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"+t+"",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}(),F=r(196).q,O=r(658),k=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(O.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;t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=n&&a fabrice@le-fab-lab.com"),e=void 0,t=void 0,i=function(){var e,t,r,n,i,s,a;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(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]Affichage petits écrans !",allEnding:"",linesBegining:"
      ",linesEnding:"
    ",lineBegining:"
    • ",lineEnding:"
  • ",dataDisplaying:"
  • #FIELDNAME : #VALUE
  • "},e.datasRender=t):(t.settings.allBegining="",e.datasRender=t),(r=new v(e,{id:"pages"},"Page à afficher :")).options={displayElement:{id:"paginationOptions"},values:[15,30,50],name:"Nombre de lignes par page :"},r.selectedValue=15,e.pagination=r,r.options2HTML(),(n=new w(e,3,{id:"filtre1"})).filter2HTML(),e.datasFilters=[n],window.innerWidth>=800&&(i=new S(e,2),s=new S(e,3),e.datasSortingFields=[i,s]),e.datasViewElt={id:"datas"},e.refreshView(),[3,3];case 2:return a=o.sent(),console.error(a),document.getElementById("datas").innerHTML='
    Désolé, mais un problème technique empêche l\'affichage des données.
    ',[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())}))})()})(); \ No newline at end of file +(()=>{var e={196:(e,t,r)=>{"use strict";r.d(t,{q:()=>k});var n=function(e,t){return et?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 et?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"string"==typeof e&&("asc"===e||"desc"===e)};function k(e){var t,r;return 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;as||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)}}((r="asc","string"==typeof(t=e)&&O(t)?r=t:t&&"object"==typeof t&&t.order&&O(t.order)&&(r=t.order),{order:r}))}},460: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=r&&/blob:/i.test((t.location||{}).protocol),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(["(",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?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&&(c=t.escapeFormulae)}}();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),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=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._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(){if(v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t=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=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=o)return I(!0)}else for(x=d,d++;;){if(-1===(x=e.indexOf(t,x+1)))return h||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:d}),C();if(x===f-1)return C(e.substring(d,x).replace(N,t));if(t!==u||e[x+1]!==u){if(t===u||0===x||e[x-1]!==u){-1!==k&&k=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:d}),x++}}else x++}return C();function M(e){b.push(e),S=d}function T(t){var r=0;if(-1!==t){var n=e.substring(x+1,t);n&&""===n.trim()&&(r=n.length)}return r}function C(t){return h||(void 0===t&&(t=e.substring(d)),E.push(t),d=f,M(E),_&&V()),I()}function P(t){d=t,M(E),E=[],R=e.indexOf(n,d)}function I(e){return{data:b,errors:y,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function V(){s(I()),b=[],y=[]}},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{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(658),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;r0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]",allEnding:"
    ",fieldsBegining:"",fieldsEnding:"",fieldDisplaying:"#FIELDNAME",linesBegining:"",linesEnding:"",lineBegining:"",lineEnding:"",dataDisplaying:"#VALUE"},e}(),m=r(658),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:k.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=k.checkInDOMById(t.displayElement);for(var r=[],n=0,i=t.values;n",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="",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector");this.pages.selectedValue=1;var i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView()}))}},e}(),_=r(658),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=k.checkInDOMById(t),this._converter=e,void 0!==r&&0!==r.length)for(var n=0,i=r;n0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='
    ';""!==this.label&&(e+='")),e+='0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> 
    '),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"+e+" :",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"+t+"",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}(),F=r(196).q,O=r(658),k=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(O.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;t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=n&&a fabrice@le-fab-lab.com"),e=void 0,t=void 0,i=function(){var e,t,r,n,i,s,a;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(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]Affichage petits écrans !",allEnding:"",linesBegining:"
      ",linesEnding:"
    ",lineBegining:"
    • ",lineEnding:"
  • ",dataDisplaying:"
  • #FIELDNAME : #VALUE
  • "},e.datasRender=t):(t.settings.allBegining="",e.datasRender=t),(r=new v(e,{id:"pages"},"Page à afficher :")).options={displayElement:{id:"paginationOptions"},values:[15,30,50],name:"Nombre de lignes par page :"},r.selectedValue=15,e.pagination=r,r.options2HTML(),(n=new w(e,3,{id:"filtre1"})).filter2HTML(),e.datasFilters=[n],window.innerWidth>=800&&(i=new S(e,2),s=new S(e,3),e.datasSortingFields=[i,s]),e.datasViewElt={id:"datas"},e.refreshView(),[3,3];case 2:return a=o.sent(),console.error(a),document.getElementById("datas").innerHTML='
    Désolé, mais un problème technique empêche l\'affichage des données.
    ',[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())}))})()})(); \ No newline at end of file diff --git a/public/JS/exampleWithJSON.app.js b/public/JS/exampleWithJSON.app.js index 779a75a..cc928cd 100644 --- a/public/JS/exampleWithJSON.app.js +++ b/public/JS/exampleWithJSON.app.js @@ -1,2 +1,2 @@ /*! For license information please see exampleWithJSON.app.js.LICENSE.txt */ -(()=>{var e={196:(e,t,r)=>{"use strict";r.d(t,{q:()=>k});var n=function(e,t){return et?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 et?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"string"==typeof e&&("asc"===e||"desc"===e)};function k(e){var t,r;return 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;as||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)}}((r="asc","string"==typeof(t=e)&&O(t)?r=t:t&&"object"==typeof t&&t.order&&O(t.order)&&(r=t.order),{order:r}))}},460: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=r&&/blob:/i.test((t.location||{}).protocol),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(["(",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?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&&(c=t.escapeFormulae)}}();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),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=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._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(){if(v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t=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=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=o)return I(!0)}else for(x=d,d++;;){if(-1===(x=e.indexOf(t,x+1)))return h||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:d}),C();if(x===f-1)return C(e.substring(d,x).replace(N,t));if(t!==u||e[x+1]!==u){if(t===u||0===x||e[x-1]!==u){-1!==k&&k=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:d}),x++}}else x++}return C();function M(e){b.push(e),S=d}function T(t){var r=0;if(-1!==t){var n=e.substring(x+1,t);n&&""===n.trim()&&(r=n.length)}return r}function C(t){return h||(void 0===t&&(t=e.substring(d)),E.push(t),d=f,M(E),_&&V()),I()}function P(t){d=t,M(E),E=[],R=e.indexOf(n,d)}function I(e){return{data:b,errors:y,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function V(){s(I()),b=[],y=[]}},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{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.",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(658),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;r0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]",allEnding:"
    ",fieldsBegining:"",fieldsEnding:"",fieldDisplaying:"#FIELDNAME",linesBegining:"",linesEnding:"",lineBegining:"",lineEnding:"",dataDisplaying:"#VALUE"},e}(),m=r(658),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",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="",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector");this.pages.selectedValue=1;var i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView()}))}},e}(),_=r(658),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="",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;n0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='
    ';""!==this.label&&(e+='")),e+='0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> 
    '),this._datasViewElt.eltDOM.innerHTML=e;var t=document.getElementById("freeDatas2HTMLSearchTxt"),r=this;t.addEventListener("input",(function(e){e.preventDefault(),r._inputValue=t.value;var n=t.value.length;r.automaticSearch&&(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()})),document.getElementById("freeDatas2HTMLSearchBtn").addEventListener("click",(function(e){e.preventDefault();var n=t.value.length;(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()}))},e.prototype.dataIsOk=function(e){if(0===this._inputValue.length)return!0;for(var t in e)if(-1!==this._fields2Search.indexOf(t)&&-1!==e[t].toLowerCase().indexOf(this._inputValue.toLowerCase()))return!0;return!1},e}(),y=r(196).q,w=r(658),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"+e+" :",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"+t+"",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(196).q,k=r(658),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;t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=n&&a fabrice@le-fab-lab.com"),e=void 0,t=void 0,i=function(){var e,t,r,n,i,s,a,o,l;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(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]Affichage petits écrans !",allEnding:"",linesBegining:"
      ",linesEnding:"
    ",lineBegining:"
    • ",lineEnding:"
  • ",dataDisplaying:"
  • #FIELDNAME : #VALUE
  • "},e.datasRender=t):(t.settings.allBegining="",e.datasRender=t),(r=new v(e,{id:"pages"},"Page à afficher :")).options={displayElement:{id:"paginationOptions"},values:[15,30,90,150],name:"Nombre de lignes par page :"},r.selectedValue=15,e.pagination=r,r.options2HTML(),window.innerWidth>=800&&(n=new F(e,0),i=new F(e,1),s=new F(e,2),e.datasSortingFields=[n,i,s]),(a=new E(e,0,{id:"filtre1"})).filter2HTML(),(o=new b(e,{id:"search"},[2,3])).label="Qui cherche trouve ?",o.btnTxt="Va chercher !",o.automaticSearch=!0,o.nbCharsForSearch=2,o.placeholder="Tapes en NB, chef !",o.filter2HTML(),e.datasFilters=[a,o],e.datasViewElt={id:"datas"},e.datasCounterElt={id:"compteur"},e.refreshView(),[3,3];case 2:return l=u.sent(),console.error(l),document.getElementById("datas").innerHTML='
    Désolé, mais un problème technique empêche l\'affichage des données.
    ',[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())}))})()})(); \ No newline at end of file +(()=>{var e={196:(e,t,r)=>{"use strict";r.d(t,{q:()=>k});var n=function(e,t){return et?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 et?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"string"==typeof e&&("asc"===e||"desc"===e)};function k(e){var t,r;return 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;as||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)}}((r="asc","string"==typeof(t=e)&&O(t)?r=t:t&&"object"==typeof t&&t.order&&O(t.order)&&(r=t.order),{order:r}))}},460: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=r&&/blob:/i.test((t.location||{}).protocol),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(["(",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?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&&(c=t.escapeFormulae)}}();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),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=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._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(){if(v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t=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=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=o)return I(!0)}else for(x=d,d++;;){if(-1===(x=e.indexOf(t,x+1)))return h||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:d}),C();if(x===f-1)return C(e.substring(d,x).replace(N,t));if(t!==u||e[x+1]!==u){if(t===u||0===x||e[x-1]!==u){-1!==k&&k=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:d}),x++}}else x++}return C();function M(e){b.push(e),S=d}function T(t){var r=0;if(-1!==t){var n=e.substring(x+1,t);n&&""===n.trim()&&(r=n.length)}return r}function C(t){return h||(void 0===t&&(t=e.substring(d)),E.push(t),d=f,M(E),_&&V()),I()}function P(t){d=t,M(E),E=[],R=e.indexOf(n,d)}function I(e){return{data:b,errors:y,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function V(){s(I()),b=[],y=[]}},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{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(658),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;r0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]",allEnding:"
    ",fieldsBegining:"",fieldsEnding:"",fieldDisplaying:"#FIELDNAME",linesBegining:"",linesEnding:"",lineBegining:"",lineEnding:"",dataDisplaying:"#VALUE"},e}(),m=r(658),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",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="",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector");this.pages.selectedValue=1;var i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView()}))}},e}(),_=r(658),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;n0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='
    ';""!==this.label&&(e+='")),e+='0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> 
    '),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"+e+" :",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"+t+"",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(196).q,k=r(658),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;t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=n&&a fabrice@le-fab-lab.com"),e=void 0,t=void 0,i=function(){var e,t,r,n,i,s,a,o,l;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(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]Affichage petits écrans !",allEnding:"",linesBegining:"
      ",linesEnding:"
    ",lineBegining:"
    • ",lineEnding:"
  • ",dataDisplaying:"
  • #FIELDNAME : #VALUE
  • "},e.datasRender=t):(t.settings.allBegining="",e.datasRender=t),(r=new v(e,{id:"pages"},"Page à afficher :")).options={displayElement:{id:"paginationOptions"},values:[15,30,90,150],name:"Nombre de lignes par page :"},r.selectedValue=15,e.pagination=r,r.options2HTML(),window.innerWidth>=800&&(n=new F(e,0),i=new F(e,1),s=new F(e,2),e.datasSortingFields=[n,i,s]),(a=new E(e,0,{id:"filtre1"})).filter2HTML(),(o=new b(e,{id:"search"},[2,3])).label="Qui cherche trouve ?",o.btnTxt="Va chercher !",o.automaticSearch=!0,o.nbCharsForSearch=2,o.placeholder="Tapes en NB, chef !",o.filter2HTML(),e.datasFilters=[a,o],e.datasViewElt={id:"datas"},e.datasCounterElt={id:"compteur"},e.refreshView(),[3,3];case 2:return l=u.sent(),console.error(l),document.getElementById("datas").innerHTML='
    Désolé, mais un problème technique empêche l\'affichage des données.
    ',[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())}))})()})(); \ No newline at end of file diff --git a/public/JS/exampleWithMixedFields.app.js b/public/JS/exampleWithMixedFields.app.js index 6ee99d7..57b5bb3 100644 --- a/public/JS/exampleWithMixedFields.app.js +++ b/public/JS/exampleWithMixedFields.app.js @@ -1,2 +1,2 @@ /*! For license information please see exampleWithMixedFields.app.js.LICENSE.txt */ -(()=>{var e={196:(e,t,r)=>{"use strict";r.d(t,{q:()=>k});var n=function(e,t){return et?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 et?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"string"==typeof e&&("asc"===e||"desc"===e)};function k(e){var t,r;return 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;as||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)}}((r="asc","string"==typeof(t=e)&&O(t)?r=t:t&&"object"==typeof t&&t.order&&O(t.order)&&(r=t.order),{order:r}))}},460: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=r&&/blob:/i.test((t.location||{}).protocol),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(["(",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?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&&(c=t.escapeFormulae)}}();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),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=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._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(){if(v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t=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=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=o)return I(!0)}else for(x=d,d++;;){if(-1===(x=e.indexOf(t,x+1)))return h||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:d}),C();if(x===f-1)return C(e.substring(d,x).replace(N,t));if(t!==u||e[x+1]!==u){if(t===u||0===x||e[x-1]!==u){-1!==k&&k=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:d}),x++}}else x++}return C();function M(e){b.push(e),S=d}function T(t){var r=0;if(-1!==t){var n=e.substring(x+1,t);n&&""===n.trim()&&(r=n.length)}return r}function C(t){return h||(void 0===t&&(t=e.substring(d)),E.push(t),d=f,M(E),_&&V()),I()}function P(t){d=t,M(E),E=[],R=e.indexOf(n,d)}function I(e){return{data:b,errors:y,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function V(){s(I()),b=[],y=[]}},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{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.",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(658),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;r0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]",allEnding:"
    ",fieldsBegining:"",fieldsEnding:"",fieldDisplaying:"#FIELDNAME",linesBegining:"",linesEnding:"",lineBegining:"",lineEnding:"",dataDisplaying:"#VALUE"},e}(),m=r(658),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:O.checkInDOMById(t),name:r},this._converter=e}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=O.checkInDOMById(t.displayElement);for(var r=[],n=0,i=t.values;n",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="",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector");this.pages.selectedValue=1;var i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView()}))}}}(),r(658)),_=(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="",0===e.fields.length||0===e.datas.length)throw new Error(v.filterNeedDatas);if(this._datasViewElt=O.checkInDOMById(t),this._converter=e,void 0!==r&&0!==r.length)for(var n=0,i=r;n0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='
    ';""!==this.label&&(e+='")),e+='0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> 
    '),this._datasViewElt.eltDOM.innerHTML=e;var t=document.getElementById("freeDatas2HTMLSearchTxt"),r=this;t.addEventListener("input",(function(e){e.preventDefault(),r._inputValue=t.value;var n=t.value.length;r.automaticSearch&&(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()})),document.getElementById("freeDatas2HTMLSearchBtn").addEventListener("click",(function(e){e.preventDefault();var n=t.value.length;(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()}))},e.prototype.dataIsOk=function(e){if(0===this._inputValue.length)return!0;for(var t in e)if(-1!==this._fields2Search.indexOf(t)&&-1!==e[t].toLowerCase().indexOf(this._inputValue.toLowerCase()))return!0;return!1}}(),r(196).q),b=r(658),y=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(b.filterNeedDatas);if(!e.checkFieldExist(Number(t)))throw new Error(b.selectorFieldNotFound);this._datasViewElt=O.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"+e+" :",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"+t+"",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()}))}}(),function(e,t,r,n){return new(r||(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())}))}),S=r(196).q,F=r(658),O=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(F.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;t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=n&&a fabrice@le-fab-lab.com"),e=void 0,t=void 0,i=function(){var e,t,r,n,i,s;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(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]').concat(e.anchor,""):"".concat(e.anchor,"")},r=function(e){return""!==e.url?'
  • ').concat(e.url,"
  • "):""},(n=new R({allBegining:"
      ",allEnding:"
    ",datasLinesDisplaying:"
    • ##1##
    • Mots-clés : ##2##.
    • ##0##
  • "})).fieldRenders=[{name:"anchor",rend2HTML:t},{name:"url",rend2HTML:r}],e.datasRender=n,(i=new y(e,2,{id:"filtre1"},",")).filter2HTML("Mots-clés"),e.datasFilters=[i],e.datasViewElt={id:"datas"},e.refreshView(),[3,3];case 2:return s=a.sent(),console.error(s),document.getElementById("datas").innerHTML='
    Désolé, mais un problème technique empêche l\'affichage des données.
    ',[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())}))})()})(); \ No newline at end of file +(()=>{var e={196:(e,t,r)=>{"use strict";r.d(t,{q:()=>k});var n=function(e,t){return et?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 et?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"string"==typeof e&&("asc"===e||"desc"===e)};function k(e){var t,r;return 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;as||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)}}((r="asc","string"==typeof(t=e)&&O(t)?r=t:t&&"object"==typeof t&&t.order&&O(t.order)&&(r=t.order),{order:r}))}},460: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=r&&/blob:/i.test((t.location||{}).protocol),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(["(",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?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&&(c=t.escapeFormulae)}}();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),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=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._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(){if(v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t=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=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=o)return I(!0)}else for(x=d,d++;;){if(-1===(x=e.indexOf(t,x+1)))return h||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:d}),C();if(x===f-1)return C(e.substring(d,x).replace(N,t));if(t!==u||e[x+1]!==u){if(t===u||0===x||e[x-1]!==u){-1!==k&&k=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:d}),x++}}else x++}return C();function M(e){b.push(e),S=d}function T(t){var r=0;if(-1!==t){var n=e.substring(x+1,t);n&&""===n.trim()&&(r=n.length)}return r}function C(t){return h||(void 0===t&&(t=e.substring(d)),E.push(t),d=f,M(E),_&&V()),I()}function P(t){d=t,M(E),E=[],R=e.indexOf(n,d)}function I(e){return{data:b,errors:y,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function V(){s(I()),b=[],y=[]}},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{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(658),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;r0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]",allEnding:"",fieldsBegining:"",fieldsEnding:"",fieldDisplaying:"#FIELDNAME",linesBegining:"",linesEnding:"",lineBegining:"",lineEnding:"",dataDisplaying:"#VALUE"},e}(),m=r(658),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:O.checkInDOMById(t),name:r},this._converter=e}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=O.checkInDOMById(t.displayElement);for(var r=[],n=0,i=t.values;n",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="",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector");this.pages.selectedValue=1;var i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView()}))}}}(),r(658)),_=(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(v.filterNeedDatas);if(this._datasViewElt=O.checkInDOMById(t),this._converter=e,void 0!==r&&0!==r.length)for(var n=0,i=r;n0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='
    ';""!==this.label&&(e+='")),e+='0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> 
    '),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"+e+" :",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"+t+"",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()}))}}(),function(e,t,r,n){return new(r||(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())}))}),S=r(196).q,F=r(658),O=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(F.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;t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=n&&a fabrice@le-fab-lab.com"),e=void 0,t=void 0,i=function(){var e,t,r,n,i,s;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(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]').concat(e.anchor,""):"".concat(e.anchor,"")},r=function(e){return""!==e.url?'
  • ').concat(e.url,"
  • "):""},(n=new R({allBegining:"
      ",allEnding:"
    ",datasLinesDisplaying:"
    • ##1##
    • Mots-clés : ##2##.
    • ##0##
  • "})).fieldRenders=[{name:"anchor",rend2HTML:t},{name:"url",rend2HTML:r}],e.datasRender=n,(i=new y(e,2,{id:"filtre1"},",")).filter2HTML("Mots-clés"),e.datasFilters=[i],e.datasViewElt={id:"datas"},e.refreshView(),[3,3];case 2:return s=a.sent(),console.error(s),document.getElementById("datas").innerHTML='
    Désolé, mais un problème technique empêche l\'affichage des données.
    ',[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())}))})()})(); \ No newline at end of file diff --git a/public/JS/exampleWithUL.app.js b/public/JS/exampleWithUL.app.js index e4192b2..f286547 100644 --- a/public/JS/exampleWithUL.app.js +++ b/public/JS/exampleWithUL.app.js @@ -1,2 +1,2 @@ /*! For license information please see exampleWithUL.app.js.LICENSE.txt */ -(()=>{var e={196:(e,t,r)=>{"use strict";r.d(t,{q:()=>k});var n=function(e,t){return et?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 et?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"string"==typeof e&&("asc"===e||"desc"===e)};function k(e){var t,r;return 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;as||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)}}((r="asc","string"==typeof(t=e)&&O(t)?r=t:t&&"object"==typeof t&&t.order&&O(t.order)&&(r=t.order),{order:r}))}},460: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=r&&/blob:/i.test((t.location||{}).protocol),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(["(",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?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&&(c=t.escapeFormulae)}}();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),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=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._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(){if(v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t=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=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=o)return I(!0)}else for(D=d,d++;;){if(-1===(D=e.indexOf(t,D+1)))return h||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:d}),C();if(D===f-1)return C(e.substring(d,D).replace(N,t));if(t!==u||e[D+1]!==u){if(t===u||0===D||e[D-1]!==u){-1!==k&&k=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:d}),D++}}else D++}return C();function M(e){b.push(e),S=d}function T(t){var r=0;if(-1!==t){var n=e.substring(D+1,t);n&&""===n.trim()&&(r=n.length)}return r}function C(t){return h||(void 0===t&&(t=e.substring(d)),E.push(t),d=f,M(E),_&&V()),I()}function P(t){d=t,M(E),E=[],R=e.indexOf(n,d)}function I(e){return{data:b,errors:y,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function V(){s(I()),b=[],y=[]}},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{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.",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=r(658),t=function(){function t(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(t.prototype,"url",{get:function(){return this._url},set:function(t){if(0===t.trim().length)throw new Error(e.remoteSourceNeedUrl);try{var r=new URL(t);if(-1===this.allowedUrlProtocol.indexOf(r.protocol))throw new Error}catch(t){throw console.error(t),new Error(e.remoteSourceUrlFail)}this._url=t.trim()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"headers",{get:function(){return this._headers},set:function(t){for(var r=["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"],n=0,i=t;n0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]",allEnding:"",fieldsBegining:"",fieldsEnding:"",fieldDisplaying:"#FIELDNAME",linesBegining:"",linesEnding:"",lineBegining:"",lineEnding:"",dataDisplaying:"#VALUE"},e}(),h=r(658),f=(function(){function e(e,t,r){if(void 0===r&&(r="Pages"),0===e.fields.length)throw new Error(h.paginationNeedDatas);this._pages={displayElement:y.checkInDOMById(t),name:r},this._converter=e}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(h.needPositiveInteger);if(void 0!==this.options&&-1===this.options.values.indexOf(t))throw new Error(h.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=y.checkInDOMById(t.displayElement);for(var r=[],n=0,i=t.values;n",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="",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector");this.pages.selectedValue=1;var i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView()}))}}}(),r(658)),p=(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="",0===e.fields.length||0===e.datas.length)throw new Error(f.filterNeedDatas);if(this._datasViewElt=y.checkInDOMById(t),this._converter=e,void 0!==r&&0!==r.length)for(var n=0,i=r;n0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='
    ';""!==this.label&&(e+='")),e+='0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> 
    '),this._datasViewElt.eltDOM.innerHTML=e;var t=document.getElementById("freeDatas2HTMLSearchTxt"),r=this;t.addEventListener("input",(function(e){e.preventDefault(),r._inputValue=t.value;var n=t.value.length;r.automaticSearch&&(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()})),document.getElementById("freeDatas2HTMLSearchBtn").addEventListener("click",(function(e){e.preventDefault();var n=t.value.length;(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()}))},e.prototype.dataIsOk=function(e){if(0===this._inputValue.length)return!0;for(var t in e)if(-1!==this._fields2Search.indexOf(t)&&-1!==e[t].toLowerCase().indexOf(this._inputValue.toLowerCase()))return!0;return!1}}(),r(196).q),g=r(658),m=(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(g.filterNeedDatas);if(!e.checkFieldExist(Number(t)))throw new Error(g.selectorFieldNotFound);this._datasViewElt=y.checkInDOMById(r),this._converter=e,this._datasFieldNb=t,void 0!==n&&""!==n&&(this._separator=n),this._name=this._converter.fields[this._datasFieldNb],this.setValues()}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"+e+" :",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"+t+"",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}(),_=r(196).q,b=r(658),y=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 c,e){case"CSV":this.parser=new s;break;case"HTML":this.parser=new o;break;case"JSON":this.parser=new u}""!==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(b.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;t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=n&&a"+this._converter.fields[i.datasFieldNb]+""+this.rendSettings.fieldEnding}t+=this.rendSettings.allEnding,this._datasViewElt.eltDOM.innerHTML=t;for(var s=function(e){document.getElementById("freeDatas2HTMLSorting"+e.datasFieldNb).addEventListener("click",(function(t){t.preventDefault(),void 0===e.order||"desc"===e.order?e.order="asc":e.order="desc",e.converter.datasSortedField=e,e.converter.refreshView()}))},a=0,o=this.datasSortingFields;a#LABEL
      ",allEnding:"
    ",fieldBeginning:"
  • ",fieldEnding:"
  • "},e}();console.log("Hello, ami développeur :-)\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/exampleWithJSON.ts\nUn bug ? Une suggestion ? => fabrice@le-fab-lab.com"),E=void 0,S=void 0,O=function(){var e,t,r,n,i,s,a;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(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]Liste des éléments chimiques :",allEnding:"",linesBegining:"
      ",linesEnding:"
    ",lineBegining:"
    • ",lineEnding:"
  • ",dataDisplaying:"
  • #FIELDNAME : #VALUE
  • "},e.datasRender=t,r=new v(e,0),n=new v(e,1),i=new v(e,2),(s=new k(e,{id:"classement"})).datasSortingFields=[r,n,i],s.rendSettings.allBeginning="

    #LABEL

      ",s.rend2HTML("Champ sur lequel classer les données :"),e.datasViewElt={id:"datas"},e.refreshView(),[3,3];case 2:return a=o.sent(),console.error(a),document.getElementById("datas").innerHTML='
      Désolé, mais un problème technique empêche l\'affichage des données.
      ',[3,3];case 3:return[2]}}))},new((F=void 0)||(F=Promise))((function(e,t){function r(e){try{i(O.next(e))}catch(e){t(e)}}function n(e){try{i(O.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof F?i:new F((function(e){e(i)}))).then(r,n)}i((O=O.apply(E,S||[])).next())}))})()})(); \ No newline at end of file +(()=>{var e={196:(e,t,r)=>{"use strict";r.d(t,{q:()=>k});var n=function(e,t){return et?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 et?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"string"==typeof e&&("asc"===e||"desc"===e)};function k(e){var t,r;return 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;as||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)}}((r="asc","string"==typeof(t=e)&&O(t)?r=t:t&&"object"==typeof t&&t.order&&O(t.order)&&(r=t.order),{order:r}))}},460: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=r&&/blob:/i.test((t.location||{}).protocol),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(["(",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?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&&(c=t.escapeFormulae)}}();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),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=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._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(){if(v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t=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=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=o)return I(!0)}else for(D=d,d++;;){if(-1===(D=e.indexOf(t,D+1)))return h||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:d}),C();if(D===f-1)return C(e.substring(d,D).replace(N,t));if(t!==u||e[D+1]!==u){if(t===u||0===D||e[D-1]!==u){-1!==k&&k=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:d}),D++}}else D++}return C();function M(e){b.push(e),S=d}function T(t){var r=0;if(-1!==t){var n=e.substring(D+1,t);n&&""===n.trim()&&(r=n.length)}return r}function C(t){return h||(void 0===t&&(t=e.substring(d)),E.push(t),d=f,M(E),_&&V()),I()}function P(t){d=t,M(E),E=[],R=e.indexOf(n,d)}function I(e){return{data:b,errors:y,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function V(){s(I()),b=[],y=[]}},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{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=r(658),t=function(){function t(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(t.prototype,"url",{get:function(){return this._url},set:function(t){if(0===t.trim().length)throw new Error(e.remoteSourceNeedUrl);try{var r=new URL(t);if(-1===this.allowedUrlProtocol.indexOf(r.protocol))throw new Error}catch(t){throw console.error(t),new Error(e.remoteSourceUrlFail)}this._url=t.trim()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"headers",{get:function(){return this._headers},set:function(t){for(var r=["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"],n=0,i=t;n0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]",allEnding:"",fieldsBegining:"",fieldsEnding:"",fieldDisplaying:"#FIELDNAME",linesBegining:"",linesEnding:"",lineBegining:"",lineEnding:"",dataDisplaying:"#VALUE"},e}(),h=r(658),f=(function(){function e(e,t,r){if(void 0===r&&(r="Pages"),0===e.fields.length)throw new Error(h.paginationNeedDatas);this._pages={displayElement:y.checkInDOMById(t),name:r},this._converter=e}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(h.needPositiveInteger);if(void 0!==this.options&&-1===this.options.values.indexOf(t))throw new Error(h.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=y.checkInDOMById(t.displayElement);for(var r=[],n=0,i=t.values;n",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="",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector");this.pages.selectedValue=1;var i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView()}))}}}(),r(658)),p=(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(f.filterNeedDatas);if(this._datasViewElt=y.checkInDOMById(t),this._converter=e,void 0!==r&&0!==r.length)for(var n=0,i=r;n0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='
      ';""!==this.label&&(e+='")),e+='0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> 
      '),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"+e+" :",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"+t+"",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}(),_=r(196).q,b=r(658),y=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 c,e){case"CSV":this.parser=new s;break;case"HTML":this.parser=new o;break;case"JSON":this.parser=new u}""!==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(b.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;t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=n&&a"+this._converter.fields[i.datasFieldNb]+""+this.rendSettings.fieldEnding}t+=this.rendSettings.allEnding,this._datasViewElt.eltDOM.innerHTML=t;for(var s=function(e){document.getElementById("freeDatas2HTMLSorting"+e.datasFieldNb).addEventListener("click",(function(t){t.preventDefault(),void 0===e.order||"desc"===e.order?e.order="asc":e.order="desc",e.converter.datasSortedField=e,e.converter.refreshView()}))},a=0,o=this.datasSortingFields;a#LABEL
        ",allEnding:"
      ",fieldBeginning:"
    • ",fieldEnding:"
    • "},e}();console.log("Hello, ami développeur :-)\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/exampleWithJSON.ts\nUn bug ? Une suggestion ? => fabrice@le-fab-lab.com"),E=void 0,S=void 0,O=function(){var e,t,r,n,i,s,a;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(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]Liste des éléments chimiques :",allEnding:"",linesBegining:"
        ",linesEnding:"
      ",lineBegining:"
      • ",lineEnding:"
    • ",dataDisplaying:"
    • #FIELDNAME : #VALUE
    • "},e.datasRender=t,r=new v(e,0),n=new v(e,1),i=new v(e,2),(s=new k(e,{id:"classement"})).datasSortingFields=[r,n,i],s.rendSettings.allBeginning="

      #LABEL

        ",s.rend2HTML("Champ sur lequel classer les données :"),e.datasViewElt={id:"datas"},e.refreshView(),[3,3];case 2:return a=o.sent(),console.error(a),document.getElementById("datas").innerHTML='
        Désolé, mais un problème technique empêche l\'affichage des données.
        ',[3,3];case 3:return[2]}}))},new((F=void 0)||(F=Promise))((function(e,t){function r(e){try{i(O.next(e))}catch(e){t(e)}}function n(e){try{i(O.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):(i=t.value,i instanceof F?i:new F((function(e){e(i)}))).then(r,n)}i((O=O.apply(E,S||[])).next())}))})()})(); \ No newline at end of file diff --git a/public/JS/exampleWithUserFile.app.js b/public/JS/exampleWithUserFile.app.js index 3e9a0ba..da28c3e 100644 --- a/public/JS/exampleWithUserFile.app.js +++ b/public/JS/exampleWithUserFile.app.js @@ -1,2 +1,2 @@ /*! For license information please see exampleWithUserFile.app.js.LICENSE.txt */ -(()=>{var e={196:(e,t,r)=>{"use strict";r.d(t,{q:()=>k});var n=function(e,t){return et?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 et?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"string"==typeof e&&("asc"===e||"desc"===e)};function k(e){var t,r;return 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;as||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)}}((r="asc","string"==typeof(t=e)&&O(t)?r=t:t&&"object"==typeof t&&t.order&&O(t.order)&&(r=t.order),{order:r}))}},460: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=r&&/blob:/i.test((t.location||{}).protocol),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(["(",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?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&&(c=t.escapeFormulae)}}();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),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=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._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(){if(v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t=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=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=o)return I(!0)}else for(x=d,d++;;){if(-1===(x=e.indexOf(t,x+1)))return h||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:d}),C();if(x===f-1)return C(e.substring(d,x).replace(N,t));if(t!==u||e[x+1]!==u){if(t===u||0===x||e[x-1]!==u){-1!==k&&k=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:d}),x++}}else x++}return C();function M(e){b.push(e),S=d}function T(t){var r=0;if(-1!==t){var n=e.substring(x+1,t);n&&""===n.trim()&&(r=n.length)}return r}function C(t){return h||(void 0===t&&(t=e.substring(d)),E.push(t),d=f,M(E),_&&V()),I()}function P(t){d=t,M(E),E=[],R=e.indexOf(n,d)}function I(e){return{data:b,errors:y,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function V(){s(I()),b=[],y=[]}},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{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.",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=r(658),t=function(){function t(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(t.prototype,"url",{get:function(){return this._url},set:function(t){if(0===t.trim().length)throw new Error(e.remoteSourceNeedUrl);try{var r=new URL(t);if(-1===this.allowedUrlProtocol.indexOf(r.protocol))throw new Error}catch(t){throw console.error(t),new Error(e.remoteSourceUrlFail)}this._url=t.trim()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"headers",{get:function(){return this._headers},set:function(t){for(var r=["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"],n=0,i=t;n0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]",allEnding:"",fieldsBegining:"",fieldsEnding:"",fieldDisplaying:"#FIELDNAME",linesBegining:"",linesEnding:"",lineBegining:"",lineEnding:"",dataDisplaying:"#VALUE"},e}(),h=r(658),f=function(){function e(e,t,r){if(void 0===r&&(r="Pages"),0===e.fields.length)throw new Error(h.paginationNeedDatas);this._pages={displayElement:E.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(h.needPositiveInteger);if(void 0!==this.options&&-1===this.options.values.indexOf(t))throw new Error(h.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=E.checkInDOMById(t.displayElement);for(var r=[],n=0,i=t.values;n",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="",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector");this.pages.selectedValue=1;var i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView()}))}},e}(),p=r(658),g=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="",0===e.fields.length||0===e.datas.length)throw new Error(p.filterNeedDatas);if(this._datasViewElt=E.checkInDOMById(t),this._converter=e,void 0!==r&&0!==r.length)for(var n=0,i=r;n0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='
        ';""!==this.label&&(e+='")),e+='0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> 
        '),this._datasViewElt.eltDOM.innerHTML=e;var t=document.getElementById("freeDatas2HTMLSearchTxt"),r=this;t.addEventListener("input",(function(e){e.preventDefault(),r._inputValue=t.value;var n=t.value.length;r.automaticSearch&&(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()})),document.getElementById("freeDatas2HTMLSearchBtn").addEventListener("click",(function(e){e.preventDefault();var n=t.value.length;(0===r.nbCharsForSearch||0===n||n>=r.nbCharsForSearch)&&r._converter.refreshView()}))},e.prototype.dataIsOk=function(e){if(0===this._inputValue.length)return!0;for(var t in e)if(-1!==this._fields2Search.indexOf(t)&&-1!==e[t].toLowerCase().indexOf(this._inputValue.toLowerCase()))return!0;return!1},e}(),m=r(196).q,v=r(658),_=(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(v.filterNeedDatas);if(!e.checkFieldExist(Number(t)))throw new Error(v.selectorFieldNotFound);this._datasViewElt=E.checkInDOMById(r),this._converter=e,this._datasFieldNb=t,void 0!==n&&""!==n&&(this._separator=n),this._name=this._converter.fields[this._datasFieldNb],this.setValues()}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"+e+" :",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"+t+"",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}(),y=r(196).q,w=r(658),E=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 c,e){case"CSV":this.parser=new s;break;case"HTML":this.parser=new o;break;case"JSON":this.parser=new u}""!==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(w.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;t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=n&&a fabrice@le-fab-lab.com"),function(){try{var e,t=document.getElementById("datas"),r=document.getElementById("displayOptions"),n=document.getElementById("myFile"),i=document.getElementById("userSettings"),s=document.getElementById("pages"),a=document.getElementById("paginationOptions"),o=document.getElementById("search");if(null===t||null===r||null===n||null===i||null===s||null===a||null===o)throw new Error("Tous les éléments HTML nécessaires au fonctionnement n'ont pas été trouvés dans la page;");var l=new c;l.settings.allBegining="",n.addEventListener("change",(function(i){t.innerHTML="",r.innerHTML="",s.innerHTML="",a.innerHTML="",o.innerHTML="",(e=new E("CSV")).datasRender=l;var u=n.files;if(null!==u&&1===u.length)if("csv"!==u[0].name.substring(u[0].name.lastIndexOf(".")+1))r.innerHTML="

        Le fichier que vous avez sélectionné ne semble pas être un fichier CSV.

        ";else{var d=new FileReader;d.onload=function(t){return n=this,i=void 0,a=function(){var t,n;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(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1] Valider',[2]}}))},new((s=void 0)||(s=Promise))((function(e,t){function r(e){try{l(a.next(e))}catch(e){t(e)}}function o(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(r,o)}l((a=a.apply(n,i||[])).next())}));var n,i,s,a},d.readAsText(u[0])}})),i.addEventListener("submit",(function(r){r.preventDefault(),t.innerHTML="";for(var n,i=[],s=0;sMerci de sélectionner les champs que vous souhaitez afficher !

        ";else{e.fields2Rend=i,e.datasViewElt={id:"datas"};var a=new g(e,{id:"search"});a.label="Qui cherche trouve ?",a.btnTxt="Va chercher !",a.automaticSearch=!0,a.nbCharsForSearch=2,a.placeholder="Saisir un moins 2 caractères",a.filter2HTML(),e.datasFilters=[a];var o=new f(e,{id:"pages"},"Page à afficher :");o.options={displayElement:{id:"paginationOptions"},values:[10,20,50,100,500],name:"Choix de pagination :"},o.selectedValue=20,e.pagination=o,o.options2HTML(),e.datasCounterElt={id:"counter"};var l=void 0;for(e.datasSortingFields=[],s=0;sDésolé, mais un problème technique empêche le fonctionnement normal de cette page.'}}()})()})(); \ No newline at end of file +(()=>{var e={196:(e,t,r)=>{"use strict";r.d(t,{q:()=>k});var n=function(e,t){return et?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 et?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"string"==typeof e&&("asc"===e||"desc"===e)};function k(e){var t,r;return 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;as||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)}}((r="asc","string"==typeof(t=e)&&O(t)?r=t:t&&"object"==typeof t&&t.order&&O(t.order)&&(r=t.order),{order:r}))}},460: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=r&&/blob:/i.test((t.location||{}).protocol),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(["(",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?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&&(c=t.escapeFormulae)}}();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),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=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._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(){if(v&&n&&(O("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+a.DefaultDelimiter+"'"),n=!1),e.skipEmptyLines)for(var t=0;t=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=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=o)return I(!0)}else for(N=d,d++;;){if(-1===(N=e.indexOf(t,N+1)))return h||y.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:d}),C();if(N===f-1)return C(e.substring(d,N).replace(x,t));if(t!==u||e[N+1]!==u){if(t===u||0===N||e[N-1]!==u){-1!==k&&k=o)return I(!0);break}y.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:d}),N++}}else N++}return C();function D(e){b.push(e),S=d}function T(t){var r=0;if(-1!==t){var n=e.substring(N+1,t);n&&""===n.trim()&&(r=n.length)}return r}function C(t){return h||(void 0===t&&(t=e.substring(d)),E.push(t),d=f,D(E),_&&V()),I()}function P(t){d=t,D(E),E=[],R=e.indexOf(n,d)}function I(e){return{data:b,errors:y,meta:{delimiter:r,linebreak:n,aborted:c,truncated:!!e,cursor:S+(a||0)}}}function V(){s(I()),b=[],y=[]}},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{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=r(658),t=function(){function t(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(t.prototype,"url",{get:function(){return this._url},set:function(t){if(0===t.trim().length)throw new Error(e.remoteSourceNeedUrl);try{var r=new URL(t);if(-1===this.allowedUrlProtocol.indexOf(r.protocol))throw new Error}catch(t){throw console.error(t),new Error(e.remoteSourceUrlFail)}this._url=t.trim()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"headers",{get:function(){return this._headers},set:function(t){for(var r=["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"],n=0,i=t;n0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]",allEnding:"
        Nombre de résultats :
        ",fieldsBegining:"",fieldsEnding:"",fieldDisplaying:"#FIELDNAME",linesBegining:"",linesEnding:"",lineBegining:"",lineEnding:"",dataDisplaying:"#VALUE"},e}(),h=r(658),f=function(){function e(e,t,r){if(void 0===r&&(r="Pages"),0===e.fields.length)throw new Error(h.paginationNeedDatas);this._pages={displayElement:E.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(h.needPositiveInteger);if(void 0!==this.options&&-1===this.options.values.indexOf(t))throw new Error(h.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=E.checkInDOMById(t.displayElement);for(var r=[],n=0,i=t.values;n",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="",this.pages.displayElement.eltDOM.innerHTML=t;var n=document.getElementById("freeDatas2HTMLPagesSelector");this.pages.selectedValue=1;var i=this;n.addEventListener("change",(function(e){i.pages.selectedValue=Number(n.value),i._converter.refreshView()}))}},e}(),p=r(658),g=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(p.filterNeedDatas);if(this._datasViewElt=E.checkInDOMById(t),this._converter=e,void 0!==r&&0!==r.length)for(var n=0,i=r;n0&&""===this.placeholder&&(this.placeholder="Please enter at least NB characters.");var e='
        ';""!==this.label&&(e+='")),e+='0?e+=' placeholder="'.concat(this.placeholder.replace("NB",""+this.nbCharsForSearch),'"'):""!==this.placeholder&&(e+=' placeholder="'.concat(this.placeholder,'"')),e+='> 
        '),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"+e+" :",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"+t+"",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}(),y=r(196).q,w=r(658),E=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 c,e){case"CSV":this.parser=new s;break;case"HTML":this.parser=new o;break;case"JSON":this.parser=new u}""!==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(w.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;t0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=n&&a fabrice@le-fab-lab.com"),function(){try{var e,t=document.getElementById("datas"),r=document.getElementById("displayOptions"),n=document.getElementById("myFile"),i=document.getElementById("userSettings"),s=document.getElementById("pages"),a=document.getElementById("paginationOptions"),o=document.getElementById("search");if(null===t||null===r||null===n||null===i||null===s||null===a||null===o)throw new Error("Tous les éléments HTML nécessaires au fonctionnement n'ont pas été trouvés dans la page;");var l=new c;l.settings.allBegining="",n.addEventListener("change",(function(i){t.innerHTML="",r.innerHTML="",s.innerHTML="",a.innerHTML="",o.innerHTML="",(e=new E("CSV")).datasRender=l;var u=n.files;if(null!==u&&1===u.length)if("csv"!==u[0].name.substring(u[0].name.lastIndexOf(".")+1))r.innerHTML="

        Le fichier que vous avez sélectionné ne semble pas être un fichier CSV.

        ";else{var d=new FileReader;d.onload=function(t){return n=this,i=void 0,a=function(){var t,n;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(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1] Valider',[2]}}))},new((s=void 0)||(s=Promise))((function(e,t){function r(e){try{l(a.next(e))}catch(e){t(e)}}function o(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(r,o)}l((a=a.apply(n,i||[])).next())}));var n,i,s,a},d.readAsText(u[0])}})),i.addEventListener("submit",(function(r){r.preventDefault(),t.innerHTML="";for(var n,i=[],s=0;sMerci de sélectionner les champs que vous souhaitez afficher !

        ";else{e.fields2Rend=i,e.datasViewElt={id:"datas"};var a=new g(e,{id:"search"});a.label="Qui cherche trouve ?",a.btnTxt="Va chercher !",a.automaticSearch=!0,a.nbCharsForSearch=2,a.placeholder="Saisir un moins 2 caractères",a.filter2HTML(),e.datasFilters=[a];var o=new f(e,{id:"pages"},"Page à afficher :");o.options={displayElement:{id:"paginationOptions"},values:[10,20,50,100,500],name:"Choix de pagination :"},o.selectedValue=20,e.pagination=o,o.options2HTML(),e.datasCounterElt={id:"counter"};var l=void 0;for(e.datasSortingFields=[],s=0;sDésolé, mais un problème technique empêche le fonctionnement normal de cette page.'}}()})()})(); \ No newline at end of file diff --git a/src/build/SearchEngine.js b/src/build/SearchEngine.js index aaf5edd..eb0173d 100644 --- a/src/build/SearchEngine.js +++ b/src/build/SearchEngine.js @@ -10,6 +10,13 @@ var SearchEngine = (function () { this.placeholder = ""; this.automaticSearch = false; this._inputValue = ""; + this.searchMode = { + accentOff: true, + caseOff: true, + separatedWords: true, + specialCharsOff: true, + specialCharsWhiteList: "", + }; if (converter.fields.length === 0 || converter.datas.length === 0) throw new Error(errors.filterNeedDatas); else { @@ -49,6 +56,8 @@ var SearchEngine = (function () { set: function (txt) { if (txt.trim() !== "" && txt.length <= 30) this._btnTxt = txt; + else + console.error(errors.searchBtnTxtFail); }, enumerable: true, configurable: true @@ -83,29 +92,60 @@ var SearchEngine = (function () { var searchInput = document.getElementById("freeDatas2HTMLSearchTxt"), mySearch = this; searchInput.addEventListener("input", function (e) { e.preventDefault(); - mySearch._inputValue = searchInput.value; - var searchLength = searchInput.value.length; + mySearch._inputValue = searchInput.value.trim(); + var searchLength = mySearch._inputValue.length; if (mySearch.automaticSearch && (mySearch.nbCharsForSearch === 0 || (searchLength === 0) || (searchLength >= mySearch.nbCharsForSearch))) mySearch._converter.refreshView(); }); var searchBtn = document.getElementById("freeDatas2HTMLSearchBtn"); searchBtn.addEventListener("click", function (e) { e.preventDefault(); - var searchLength = searchInput.value.length; - if ((mySearch.nbCharsForSearch === 0 || (searchLength === 0) || (searchLength >= mySearch.nbCharsForSearch))) - mySearch._converter.refreshView(); + mySearch._converter.refreshView(); }); }; + SearchEngine.prototype.searchPreProcessing = function (searchElement) { + var finalString = searchElement; + if (this.searchMode.accentOff) + finalString = finalString.normalize("NFD").replace(/[\u0300-\u036f]/g, ""); + if (this.searchMode.caseOff) + finalString = finalString.toLowerCase(); + if (this.searchMode.specialCharsOff) { + var validChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 " + this.searchMode.specialCharsWhiteList; + var validString = ""; + for (var _i = 0, finalString_1 = finalString; _i < finalString_1.length; _i++) { + var letter = finalString_1[_i]; + if (validChars.indexOf(letter) !== -1) + validString += letter; + } + finalString = validString; + } + return finalString; + }; SearchEngine.prototype.dataIsOk = function (data) { - if (this._inputValue.length === 0) + var realSearch = this.searchPreProcessing(this._inputValue.trim()); + if (realSearch.length === 0) return true; - for (var field in data) { - if (this._fields2Search.indexOf(field) !== -1) { - if (data[field].toLowerCase().indexOf(this._inputValue.toLowerCase()) !== -1) - return true; + var searchedWords = []; + if (this.searchMode.separatedWords) + searchedWords = realSearch.split(" "); + else + searchedWords[0] = realSearch; + var nbFound = 0; + for (var _i = 0, searchedWords_1 = searchedWords; _i < searchedWords_1.length; _i++) { + var word = searchedWords_1[_i]; + for (var field in data) { + if (this._fields2Search.indexOf(field) !== -1) { + if (this.searchPreProcessing(data[field]).indexOf(word.trim()) !== -1) { + nbFound++; + break; + } + } } } - return false; + if (nbFound < searchedWords.length) + return false; + else + return true; }; return SearchEngine; }()); diff --git a/src/build/demo/exampleWithCSV.js b/src/build/demo/exampleWithCSV.js index 468d2f2..538dffe 100644 --- a/src/build/demo/exampleWithCSV.js +++ b/src/build/demo/exampleWithCSV.js @@ -54,7 +54,7 @@ var initialise = function () { return __awaiter(void 0, void 0, void 0, function return 0; }; converter = new FreeDatas2HTML("CSV"); - converter.parser.setRemoteSource({ url: "http://localhost:8080/datas/elements-chimiques.csv" }); + converter.parser.setRemoteSource({ url: "https://freedatas2html.le-fab-lab.com/datas/elements-chimiques.csv" }); return [4, converter.run()]; case 1: _a.sent(); diff --git a/src/build/demo/exampleWithJSON.js b/src/build/demo/exampleWithJSON.js index df008bd..9ae0626 100644 --- a/src/build/demo/exampleWithJSON.js +++ b/src/build/demo/exampleWithJSON.js @@ -42,7 +42,7 @@ var initialise = function () { return __awaiter(void 0, void 0, void 0, function case 0: _a.trys.push([0, 2, , 3]); converter = new FreeDatas2HTML("JSON"); - converter.parser.setRemoteSource({ url: "http://localhost:8080/datas/posts2.json", withCredentials: true, headers: [{ key: "Authorization", value: "Token YWxhZGRpbjpvcGVuc2VzYW1l" }] }); + converter.parser.setRemoteSource({ url: "https://freedatas2html.le-fab-lab.com/datas/posts2.json" }); return [4, converter.run()]; case 1: _a.sent(); diff --git a/src/build/demo/exampleWithMixedFields.js b/src/build/demo/exampleWithMixedFields.js index 2907d7c..8530628 100644 --- a/src/build/demo/exampleWithMixedFields.js +++ b/src/build/demo/exampleWithMixedFields.js @@ -43,7 +43,7 @@ var initialise = function () { return __awaiter(void 0, void 0, void 0, function case 0: _a.trys.push([0, 2, , 3]); converter = new FreeDatas2HTML("JSON"); - converter.parser.setRemoteSource({ url: "http://localhost:8080/datas/links.json" }); + converter.parser.setRemoteSource({ url: "https://freedatas2html.le-fab-lab.com/datas/links.json" }); return [4, converter.run()]; case 1: _a.sent(); diff --git a/src/build/demo/exampleWithUL.js b/src/build/demo/exampleWithUL.js index a13a92a..218955b 100644 --- a/src/build/demo/exampleWithUL.js +++ b/src/build/demo/exampleWithUL.js @@ -43,7 +43,7 @@ var initialise = function () { return __awaiter(void 0, void 0, void 0, function case 0: _a.trys.push([0, 2, , 3]); converter = new FreeDatas2HTML("CSV"); - converter.parser.setRemoteSource({ url: "http://localhost:8080/datas/elements-chimiques.csv" }); + converter.parser.setRemoteSource({ url: "https://freedatas2html.le-fab-lab.com/datas/elements-chimiques.csv" }); return [4, converter.run()]; case 1: _a.sent(); diff --git a/src/build/errors.js b/src/build/errors.js index 1526e9e..d159dfa 100644 --- a/src/build/errors.js +++ b/src/build/errors.js @@ -29,6 +29,7 @@ module.exports = 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",
        Nombre de résultats :