!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("dmein",[],e):"object"==typeof exports?exports.dmein=e():t.dmein=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;r0?e:{status:"OK"}};var o=this._validateConstructionProps(e);if("ERR"===o.status)throw o;this._assignProps(e)}var e,r,a;return e=t,(r=[{key:"headers",get:function(){var t=this.rows;if(!Array.isArray(t)||t.length<1)return[];var e=t.length,r=49;e<50&&(r=e);var n=t.slice(0,r).map((function(t){return Object.keys(t)})).flat();return Array.from(new Set(n))}}])&&o(e.prototype,r),a&&o(e,a),t}();var i=function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.asTable=function(){if(!r.export)return null;try{return new a({id:r.id,label:r.label,rows:r.export()})}catch(t){throw t}},this.getProperties=function(){var t=[];return t=Array.isArray(r.tables)?0===r.tables.length?[]:r.tables.map((function(t){return t.getProperties()})):[],{id:r.id,label:r.label,type:r.type,tables:t,isValid:r.isValid}},this.importTables=function(t){console.log('Function importTables has been depricated, please use "setTables()"'),r.setTables(t)},this.setTables=function(t){var e=r._validateTables(t);if("ERR"===e.status)throw e;var n=[];n=Array.isArray(t)?t:[t],r.tables=n},this._assignProps=function(t){r.id=t.id,r.label=t.label,r.type="Nodule",r.isValid=!0,t.tables?r.setTables(t.tables):r.tables=[]},this._validateTables=function(t){var e={status:"ERR",error:{label:"Not all imported Tables are valid",messages:[]}},r=[];if(!t)return e.error.messages.push("No Tables imported"),e;r=Array.isArray(t)?t:[t];for(var n=0;nn.filterParams[t]}:n.filterType===s.GREATEREQUAL?r=function(e){return e[t]>=n.filterParams[t]}:n.filterType===s.LESSER?r=function(e){return e[t]0?e:{status:"OK"}},n._validateType=function(t){var e={status:"ERR",error:{label:"Filter Type is not valid",messages:[]}};return Object.values(s).indexOf(t)<0&&e.error.messages.push("Type must be one of: ".concat(Object.keys(s))),e.error.messages.length>0?e:{status:"OK"}},n._assignProps(t),n}return r}(i);function m(t){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function g(t){for(var e=1;e0?e:{status:"OK"}},n._assignProps(t),n}return r}(i);function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var r=[],n=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return r}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return _(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0?e:{status:"OK"}},n._assignProps(t),n}return r}(i);e.default={Table:a,Nodule:i,FilterNodule:h,JoinNodule:E,TransformNodule:D}}])}));