!function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=0)}([function(t,r,e){"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)}e.r(r),e.d(r,"Table",(function(){return o})),e.d(r,"Nodule",(function(){return a})),e.d(r,"FilterNodule",(function(){return h})),e.d(r,"JoinNodule",(function(){return j})),e.d(r,"TransformNodule",(function(){return L}));var o=function t(r){var e=this;!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,t),this.getProperties=function(){return{id:e.id,label:e.label,rows:e.rows,type:e.type,isValid:e.isValid}},this.export=function(){return e.rows},this.setRows=function(t){var r=e._validateRows(t);if("ERR"===r.status)throw r;Array.isArray(t)?e.rows=t:e.rows=[t]},this._assignProps=function(t){e.id=t.id,e.label=t.label,e.type="Table",e.isValid=!0,t.rows?e.setRows(t.rows):e.rows=[]},this._validateConstructionProps=function(t){var r={status:"ERR",error:{label:"Error Creating Table",messages:[]}};return t?(t.id||r.error.messages.push("No id on creation of Table"),t.label||r.error.messages.push("No label on creation of Table"),0===r.error.messages.length?{status:"OK"}:r):(r.error.messages.push("No props on creation of Table"),r)},this._validateRows=function(t){var r={status:"ERR",error:{label:"Error Creating Table",messages:[]}},e=[];0===(e=Array.isArray(t)?t:[t]).length&&r.error.messages.push("No Tables imported");for(var o=0;o0?r:{status:"OK"}};var o=this._validateConstructionProps(r);if("ERR"===o.status)throw o;this._assignProps(r)};var a=function t(r){var e=this;!function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,t),this.asTable=function(){if(!e.export)return null;try{return new o({id:e.id,label:e.label,rows:e.export()})}catch(t){throw t}},this.getProperties=function(){var t=[];return t=Array.isArray(e.tables)?0===e.tables.length?[]:e.tables.map((function(t){return t.getProperties()})):[],{id:e.id,label:e.label,type:e.type,tables:t,isValid:e.isValid}},this.importTables=function(t){var r=e._validateTables(t);if("ERR"===r.status)throw r;var n=[];n=Array.isArray(t)?t:[t],e.tables=n},this._assignProps=function(t){e.id=t.id,e.label=t.label,e.type="Nodule",e.isValid=!0,t.tables?e.importTables(t.tables):e.tables=[]},this._validateTables=function(t){var r={status:"ERR",error:{label:"Not all imported Tables are valid",messages:[]}},e=[];if(!t)return r.error.messages.push("No Tables imported"),r;e=Array.isArray(t)?t:[t];for(var n=0;nn.filterParams[t]}:n.filterType===i.GREATEREQUAL?e=function(r){return r[t]>=n.filterParams[t]}:n.filterType===i.LESSER?e=function(r){return r[t]0?r:{status:"OK"}},n._validateType=function(t){var r={status:"ERR",error:{label:"Filter Type is not valid",messages:[]}};return Object.values(i).indexOf(t)<0&&r.error.messages.push("Type must be one of: ".concat(Object.keys(i))),r.error.messages.length>0?r:{status:"OK"}},n._assignProps(t),n}return e}(a);function d(t){return(d="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 m(t,r){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),e.push.apply(e,n)}return e}function v(t){for(var r=1;r0?r:{status:"OK"}},n._assignProps(t),n}return e}(a);function E(t){return(E="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 T(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var e=[],n=!0,o=!1,a=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(e.push(i.value),!r||e.length!==r);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(o)throw a}}return e}(t,r)||function(t,r){if(!t)return;if("string"==typeof t)return _(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return _(t,r)}(t,r)||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,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e0?r:{status:"OK"}},n._assignProps(t),n}return e}(a);r.default={Table:o,Nodule:a,FilterNodule:h,JoinNodule:j,TransformNodule:L}}]);