@gudhub/core 1.1.92 → 1.1.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,7 +46,7 @@ var e=require("process"),r=require("./utils"),t=require("./helpers/normalizeHead
46
46
  },{"./../utils":"Feqj","./transformData":"IAOH","../cancel/isCancel":"mXc0","../defaults":"A14q"}],"fBI1":[function(require,module,exports) {
47
47
  "use strict";var e=require("../utils");module.exports=function(n,t){t=t||{};var r={},o=["url","method","data"],i=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function c(n,t){return e.isPlainObject(n)&&e.isPlainObject(t)?e.merge(n,t):e.isPlainObject(t)?e.merge({},t):e.isArray(t)?t.slice():t}function d(o){e.isUndefined(t[o])?e.isUndefined(n[o])||(r[o]=c(void 0,n[o])):r[o]=c(n[o],t[o])}e.forEach(o,function(n){e.isUndefined(t[n])||(r[n]=c(void 0,t[n]))}),e.forEach(i,d),e.forEach(a,function(o){e.isUndefined(t[o])?e.isUndefined(n[o])||(r[o]=c(void 0,n[o])):r[o]=c(void 0,t[o])}),e.forEach(s,function(e){e in t?r[e]=c(n[e],t[e]):e in n&&(r[e]=c(void 0,n[e]))});var f=o.concat(i).concat(a).concat(s),u=Object.keys(n).concat(Object.keys(t)).filter(function(e){return-1===f.indexOf(e)});return e.forEach(u,d),r};
48
48
  },{"../utils":"Feqj"}],"b3VU":[function(require,module,exports) {
49
- module.exports={_args:[["axios@0.21.4","/home/atlasiko/Work/gudhub"]],_from:"axios@0.21.4",_id:"axios@0.21.4",_inBundle:!1,_integrity:"sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",_location:"/axios",_phantomChildren:{},_requested:{type:"version",registry:!0,raw:"axios@0.21.4",name:"axios",escapedName:"axios",rawSpec:"0.21.4",saveSpec:null,fetchSpec:"0.21.4"},_requiredBy:["/"],_resolved:"https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",_spec:"0.21.4",_where:"/home/atlasiko/Work/gudhub",author:{name:"Matt Zabriskie"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},bugs:{url:"https://github.com/axios/axios/issues"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}],dependencies:{"follow-redirects":"^1.14.0"},description:"Promise based HTTP client for the browser and node.js",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},homepage:"https://axios-http.com",jsdelivr:"dist/axios.min.js",keywords:["xhr","http","ajax","promise","node"],license:"MIT",main:"index.js",name:"axios",repository:{type:"git",url:"git+https://github.com/axios/axios.git"},scripts:{build:"NODE_ENV=production grunt build",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",examples:"node ./examples/server.js",fix:"eslint --fix lib/**/*.js",postversion:"git push && git push --tags",preversion:"npm test",start:"node ./sandbox/server.js",test:"grunt test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},typings:"./index.d.ts",unpkg:"dist/axios.min.js",version:"0.21.4"};
49
+ module.exports={name:"axios",version:"0.21.4",description:"Promise based HTTP client for the browser and node.js",main:"index.js",scripts:{test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},repository:{type:"git",url:"https://github.com/axios/axios.git"},keywords:["xhr","http","ajax","promise","node"],author:"Matt Zabriskie",license:"MIT",bugs:{url:"https://github.com/axios/axios/issues"},homepage:"https://axios-http.com",devDependencies:{coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},browser:{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},jsdelivr:"dist/axios.min.js",unpkg:"dist/axios.min.js",typings:"./index.d.ts",dependencies:{"follow-redirects":"^1.14.0"},bundlesize:[{path:"./dist/axios.min.js",threshold:"5kB"}]};
50
50
  },{}],"bSmC":[function(require,module,exports) {
51
51
  "use strict";var r=require("./../../package.json"),n={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){n[r]=function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r}});var e={},o=r.version.split(".");function t(r,n){for(var e=n?n.split("."):o,t=r.split("."),i=0;i<3;i++){if(e[i]>t[i])return!0;if(e[i]<t[i])return!1}return!1}function i(r,n,e){if("object"!=typeof r)throw new TypeError("options must be an object");for(var o=Object.keys(r),t=o.length;t-- >0;){var i=o[t],s=n[i];if(s){var a=r[i],u=void 0===a||s(a,i,r);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==e)throw Error("Unknown option "+i)}}n.transitional=function(n,o,i){var s=o&&t(o);function a(n,e){return"[Axios v"+r.version+"] Transitional option '"+n+"'"+e+(i?". "+i:"")}return function(r,t,i){if(!1===n)throw new Error(a(t," has been removed in "+o));return s&&!e[t]&&(e[t]=!0,console.warn(a(t," has been deprecated since v"+o+" and will be removed in the near future"))),!n||n(r,t,i)}},module.exports={isOlderVersion:t,assertOptions:i,validators:n};
52
52
  },{"./../../package.json":"b3VU"}],"trUU":[function(require,module,exports) {
@@ -71,7 +71,7 @@ module.exports=require("./lib/axios");
71
71
 
72
72
  },{}],"nksM":[function(require,module,exports) {
73
73
  var global = arguments[3];
74
- var t=arguments[3],e="function"==typeof Map&&Map.prototype,r=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&r&&"function"==typeof r.get?r.get:null,o=e&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=i&&u&&"function"==typeof u.get?u.get:null,c=i&&Set.prototype.forEach,a="function"==typeof WeakMap&&WeakMap.prototype,f=a?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype,y=p?WeakSet.prototype.has:null,g="function"==typeof WeakRef&&WeakRef.prototype,b=g?WeakRef.prototype.deref:null,s=Boolean.prototype.valueOf,S=Object.prototype.toString,h=Function.prototype.toString,m=String.prototype.match,d=String.prototype.slice,v=String.prototype.replace,j=String.prototype.toUpperCase,O=String.prototype.toLowerCase,w=RegExp.prototype.test,_=Array.prototype.concat,x=Array.prototype.join,W=Array.prototype.slice,k=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,L="function"==typeof Symbol&&"object"==typeof Symbol.iterator,$="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===L||"symbol")?Symbol.toStringTag:null,q=Object.prototype.propertyIsEnumerable,A=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function I(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||w.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-k(-t):k(t);if(n!==t){var o=String(n),i=d.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var N=require("./util.inspect"),P=N.custom,R=V(P)?P:null,D={__proto__:null,double:'"',single:"'"},B={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function C(t,e,r){var n=r.quoteStyle||e,o=D[n];return o+t+o}function z(t){return v.call(String(t),/"/g,"&quot;")}function F(t){return!("[object Array]"!==tt(t)||$&&"object"==typeof t&&$ in t)}function H(t){return!("[object Date]"!==tt(t)||$&&"object"==typeof t&&$ in t)}function U(t){return!("[object RegExp]"!==tt(t)||$&&"object"==typeof t&&$ in t)}function G(t){return!("[object Error]"!==tt(t)||$&&"object"==typeof t&&$ in t)}function J(t){return!("[object String]"!==tt(t)||$&&"object"==typeof t&&$ in t)}function K(t){return!("[object Number]"!==tt(t)||$&&"object"==typeof t&&$ in t)}function Q(t){return!("[object Boolean]"!==tt(t)||$&&"object"==typeof t&&$ in t)}function V(t){if(L)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!T)return!1;try{return T.call(t),!0}catch(e){}return!1}function X(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(e){}return!1}module.exports=function e(r,i,u,a){var f=i||{};if(Z(f,"quoteStyle")&&!Z(D,f.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Z(f,"maxStringLength")&&("number"==typeof f.maxStringLength?f.maxStringLength<0&&f.maxStringLength!==1/0:null!==f.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var p=!Z(f,"customInspect")||f.customInspect;if("boolean"!=typeof p&&"symbol"!==p)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Z(f,"indent")&&null!==f.indent&&"\t"!==f.indent&&!(parseInt(f.indent,10)===f.indent&&f.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Z(f,"numericSeparator")&&"boolean"!=typeof f.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=f.numericSeparator;if(void 0===r)return"undefined";if(null===r)return"null";if("boolean"==typeof r)return r?"true":"false";if("string"==typeof r)return at(r,f);if("number"==typeof r){if(0===r)return 1/0/r>0?"0":"-0";var g=String(r);return y?I(r,g):g}if("bigint"==typeof r){var b=String(r)+"n";return y?I(r,b):b}var S=void 0===f.depth?5:f.depth;if(void 0===u&&(u=0),u>=S&&S>0&&"object"==typeof r)return F(r)?"[Array]":"[Object]";var h=st(f,u);if(void 0===a)a=[];else if(rt(a,r)>=0)return"[Circular]";function m(t,r,n){if(r&&(a=W.call(a)).push(r),n){var o={depth:f.depth};return Z(f,"quoteStyle")&&(o.quoteStyle=f.quoteStyle),e(t,o,u+1,a)}return e(t,f,u+1,a)}if("function"==typeof r&&!U(r)){var j=et(r),w=ht(r,m);return"[Function"+(j?": "+j:" (anonymous)")+"]"+(w.length>0?" { "+x.call(w,", ")+" }":"")}if(V(r)){var k=L?v.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(r);return"object"!=typeof r||L?k:pt(k)}if(ct(r)){for(var M="<"+O.call(String(r.nodeName)),P=r.attributes||[],B=0;B<P.length;B++)M+=" "+P[B].name+"="+C(z(P[B].value),"double",f);return M+=">",r.childNodes&&r.childNodes.length&&(M+="..."),M+="</"+O.call(String(r.nodeName))+">"}if(F(r)){if(0===r.length)return"[]";var Y=ht(r,m);return h&&!bt(Y)?"["+St(Y,h)+"]":"[ "+x.call(Y,", ")+" ]"}if(G(r)){var ft=ht(r,m);return"cause"in Error.prototype||!("cause"in r)||q.call(r,"cause")?0===ft.length?"["+String(r)+"]":"{ ["+String(r)+"] "+x.call(ft,", ")+" }":"{ ["+String(r)+"] "+x.call(_.call("[cause]: "+m(r.cause),ft),", ")+" }"}if("object"==typeof r&&p){if(R&&"function"==typeof r[R]&&N)return N(r,{depth:S-u});if("symbol"!==p&&"function"==typeof r.inspect)return r.inspect()}if(nt(r)){var mt=[];return o&&o.call(r,function(t,e){mt.push(m(e,r,!0)+" => "+m(t,r))}),gt("Map",n.call(r),mt,h)}if(ut(r)){var dt=[];return c&&c.call(r,function(t){dt.push(m(t,r))}),gt("Set",l.call(r),dt,h)}if(ot(r))return yt("WeakMap");if(lt(r))return yt("WeakSet");if(it(r))return yt("WeakRef");if(K(r))return pt(m(Number(r)));if(X(r))return pt(m(E.call(r)));if(Q(r))return pt(s.call(r));if(J(r))return pt(m(String(r)));if("undefined"!=typeof window&&r===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&r===globalThis||void 0!==t&&r===t)return"{ [object globalThis] }";if(!H(r)&&!U(r)){var vt=ht(r,m),jt=A?A(r)===Object.prototype:r instanceof Object||r.constructor===Object,Ot=r instanceof Object?"":"null prototype",wt=!jt&&$&&Object(r)===r&&$ in r?d.call(tt(r),8,-1):Ot?"Object":"",_t=(jt||"function"!=typeof r.constructor?"":r.constructor.name?r.constructor.name+" ":"")+(wt||Ot?"["+x.call(_.call([],wt||[],Ot||[]),": ")+"] ":"");return 0===vt.length?_t+"{}":h?_t+"{"+St(vt,h)+"}":_t+"{ "+x.call(vt,", ")+" }"}return String(r)};var Y=Object.prototype.hasOwnProperty||function(t){return t in this};function Z(t,e){return Y.call(t,e)}function tt(t){return S.call(t)}function et(t){if(t.name)return t.name;var e=m.call(h.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function rt(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function nt(t){if(!n||!t||"object"!=typeof t)return!1;try{n.call(t);try{l.call(t)}catch(e){return!0}return t instanceof Map}catch(r){}return!1}function ot(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{y.call(t,y)}catch(e){return!0}return t instanceof WeakMap}catch(r){}return!1}function it(t){if(!b||!t||"object"!=typeof t)return!1;try{return b.call(t),!0}catch(e){}return!1}function ut(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t);try{n.call(t)}catch(e){return!0}return t instanceof Set}catch(r){}return!1}function lt(t){if(!y||!t||"object"!=typeof t)return!1;try{y.call(t,y);try{f.call(t,f)}catch(e){return!0}return t instanceof WeakSet}catch(r){}return!1}function ct(t){return!(!t||"object"!=typeof t)&&("undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}function at(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return at(d.call(t,0,e.maxStringLength),e)+n}var o=B[e.quoteStyle||"single"];return o.lastIndex=0,C(v.call(v.call(t,o,"\\$1"),/[\x00-\x1f]/g,ft),"single",e)}function ft(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+j.call(e.toString(16))}function pt(t){return"Object("+t+")"}function yt(t){return t+" { ? }"}function gt(t,e,r,n){return t+" ("+e+") {"+(n?St(r,n):x.call(r,", "))+"}"}function bt(t){for(var e=0;e<t.length;e++)if(rt(t[e],"\n")>=0)return!1;return!0}function st(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=x.call(Array(t.indent+1)," ")}return{base:r,prev:x.call(Array(e+1),r)}}function St(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+x.call(t,","+r)+"\n"+e.prev}function ht(t,e){var r=F(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=Z(t,o)?e(t[o],t):""}var i,u="function"==typeof M?M(t):[];if(L){i={};for(var l=0;l<u.length;l++)i["$"+u[l]]=u[l]}for(var c in t)Z(t,c)&&(r&&String(Number(c))===c&&c<t.length||L&&i["$"+c]instanceof Symbol||(w.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if("function"==typeof M)for(var a=0;a<u.length;a++)q.call(t,u[a])&&n.push("["+e(u[a])+"]: "+e(t[u[a]],t));return n}
74
+ var t=arguments[3],e="function"==typeof Map&&Map.prototype,r=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&r&&"function"==typeof r.get?r.get:null,o=e&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=i&&u&&"function"==typeof u.get?u.get:null,c=i&&Set.prototype.forEach,a="function"==typeof WeakMap&&WeakMap.prototype,f=a?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype,y=p?WeakSet.prototype.has:null,g="function"==typeof WeakRef&&WeakRef.prototype,s=g?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,S=Object.prototype.toString,h=Function.prototype.toString,m=String.prototype.match,d=String.prototype.slice,v=String.prototype.replace,j=String.prototype.toUpperCase,O=String.prototype.toLowerCase,w=RegExp.prototype.test,_=Array.prototype.concat,x=Array.prototype.join,W=Array.prototype.slice,k=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,L="function"==typeof Symbol&&"object"==typeof Symbol.iterator,$="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===L||"symbol")?Symbol.toStringTag:null,q=Object.prototype.propertyIsEnumerable,A=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function I(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||w.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-k(-t):k(t);if(n!==t){var o=String(n),i=d.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var N=require("./util.inspect"),P=N.custom,R=X(P)?P:null,D={__proto__:null,double:'"',single:"'"},B={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function C(t,e,r){var n=r.quoteStyle||e,o=D[n];return o+t+o}function z(t){return v.call(String(t),/"/g,"&quot;")}function F(t){return!$||!("object"==typeof t&&($ in t||void 0!==t[$]))}function H(t){return"[object Array]"===et(t)&&F(t)}function U(t){return"[object Date]"===et(t)&&F(t)}function G(t){return"[object RegExp]"===et(t)&&F(t)}function J(t){return"[object Error]"===et(t)&&F(t)}function K(t){return"[object String]"===et(t)&&F(t)}function Q(t){return"[object Number]"===et(t)&&F(t)}function V(t){return"[object Boolean]"===et(t)&&F(t)}function X(t){if(L)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!T)return!1;try{return T.call(t),!0}catch(e){}return!1}function Y(t){if(!t||"object"!=typeof t||!E)return!1;try{return E.call(t),!0}catch(e){}return!1}module.exports=function e(r,i,u,a){var f=i||{};if(tt(f,"quoteStyle")&&!tt(D,f.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(tt(f,"maxStringLength")&&("number"==typeof f.maxStringLength?f.maxStringLength<0&&f.maxStringLength!==1/0:null!==f.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var p=!tt(f,"customInspect")||f.customInspect;if("boolean"!=typeof p&&"symbol"!==p)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(tt(f,"indent")&&null!==f.indent&&"\t"!==f.indent&&!(parseInt(f.indent,10)===f.indent&&f.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(tt(f,"numericSeparator")&&"boolean"!=typeof f.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=f.numericSeparator;if(void 0===r)return"undefined";if(null===r)return"null";if("boolean"==typeof r)return r?"true":"false";if("string"==typeof r)return ft(r,f);if("number"==typeof r){if(0===r)return 1/0/r>0?"0":"-0";var g=String(r);return y?I(r,g):g}if("bigint"==typeof r){var s=String(r)+"n";return y?I(r,s):s}var S=void 0===f.depth?5:f.depth;if(void 0===u&&(u=0),u>=S&&S>0&&"object"==typeof r)return H(r)?"[Array]":"[Object]";var h=St(f,u);if(void 0===a)a=[];else if(nt(a,r)>=0)return"[Circular]";function m(t,r,n){if(r&&(a=W.call(a)).push(r),n){var o={depth:f.depth};return tt(f,"quoteStyle")&&(o.quoteStyle=f.quoteStyle),e(t,o,u+1,a)}return e(t,f,u+1,a)}if("function"==typeof r&&!G(r)){var j=rt(r),w=mt(r,m);return"[Function"+(j?": "+j:" (anonymous)")+"]"+(w.length>0?" { "+x.call(w,", ")+" }":"")}if(X(r)){var k=L?v.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(r);return"object"!=typeof r||L?k:yt(k)}if(at(r)){for(var M="<"+O.call(String(r.nodeName)),P=r.attributes||[],B=0;B<P.length;B++)M+=" "+P[B].name+"="+C(z(P[B].value),"double",f);return M+=">",r.childNodes&&r.childNodes.length&&(M+="..."),M+="</"+O.call(String(r.nodeName))+">"}if(H(r)){if(0===r.length)return"[]";var F=mt(r,m);return h&&!bt(F)?"["+ht(F,h)+"]":"[ "+x.call(F,", ")+" ]"}if(J(r)){var Z=mt(r,m);return"cause"in Error.prototype||!("cause"in r)||q.call(r,"cause")?0===Z.length?"["+String(r)+"]":"{ ["+String(r)+"] "+x.call(Z,", ")+" }":"{ ["+String(r)+"] "+x.call(_.call("[cause]: "+m(r.cause),Z),", ")+" }"}if("object"==typeof r&&p){if(R&&"function"==typeof r[R]&&N)return N(r,{depth:S-u});if("symbol"!==p&&"function"==typeof r.inspect)return r.inspect()}if(ot(r)){var pt=[];return o&&o.call(r,function(t,e){pt.push(m(e,r,!0)+" => "+m(t,r))}),st("Map",n.call(r),pt,h)}if(lt(r)){var dt=[];return c&&c.call(r,function(t){dt.push(m(t,r))}),st("Set",l.call(r),dt,h)}if(it(r))return gt("WeakMap");if(ct(r))return gt("WeakSet");if(ut(r))return gt("WeakRef");if(Q(r))return yt(m(Number(r)));if(Y(r))return yt(m(E.call(r)));if(V(r))return yt(b.call(r));if(K(r))return yt(m(String(r)));if("undefined"!=typeof window&&r===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&r===globalThis||void 0!==t&&r===t)return"{ [object globalThis] }";if(!U(r)&&!G(r)){var vt=mt(r,m),jt=A?A(r)===Object.prototype:r instanceof Object||r.constructor===Object,Ot=r instanceof Object?"":"null prototype",wt=!jt&&$&&Object(r)===r&&$ in r?d.call(et(r),8,-1):Ot?"Object":"",_t=(jt||"function"!=typeof r.constructor?"":r.constructor.name?r.constructor.name+" ":"")+(wt||Ot?"["+x.call(_.call([],wt||[],Ot||[]),": ")+"] ":"");return 0===vt.length?_t+"{}":h?_t+"{"+ht(vt,h)+"}":_t+"{ "+x.call(vt,", ")+" }"}return String(r)};var Z=Object.prototype.hasOwnProperty||function(t){return t in this};function tt(t,e){return Z.call(t,e)}function et(t){return S.call(t)}function rt(t){if(t.name)return t.name;var e=m.call(h.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function nt(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function ot(t){if(!n||!t||"object"!=typeof t)return!1;try{n.call(t);try{l.call(t)}catch(e){return!0}return t instanceof Map}catch(r){}return!1}function it(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{y.call(t,y)}catch(e){return!0}return t instanceof WeakMap}catch(r){}return!1}function ut(t){if(!s||!t||"object"!=typeof t)return!1;try{return s.call(t),!0}catch(e){}return!1}function lt(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t);try{n.call(t)}catch(e){return!0}return t instanceof Set}catch(r){}return!1}function ct(t){if(!y||!t||"object"!=typeof t)return!1;try{y.call(t,y);try{f.call(t,f)}catch(e){return!0}return t instanceof WeakSet}catch(r){}return!1}function at(t){return!(!t||"object"!=typeof t)&&("undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"string"==typeof t.nodeName&&"function"==typeof t.getAttribute)}function ft(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return ft(d.call(t,0,e.maxStringLength),e)+n}var o=B[e.quoteStyle||"single"];return o.lastIndex=0,C(v.call(v.call(t,o,"\\$1"),/[\x00-\x1f]/g,pt),"single",e)}function pt(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+j.call(e.toString(16))}function yt(t){return"Object("+t+")"}function gt(t){return t+" { ? }"}function st(t,e,r,n){return t+" ("+e+") {"+(n?ht(r,n):x.call(r,", "))+"}"}function bt(t){for(var e=0;e<t.length;e++)if(nt(t[e],"\n")>=0)return!1;return!0}function St(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=x.call(Array(t.indent+1)," ")}return{base:r,prev:x.call(Array(e+1),r)}}function ht(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+x.call(t,","+r)+"\n"+e.prev}function mt(t,e){var r=H(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=tt(t,o)?e(t[o],t):""}var i,u="function"==typeof M?M(t):[];if(L){i={};for(var l=0;l<u.length;l++)i["$"+u[l]]=u[l]}for(var c in t)tt(t,c)&&(r&&String(Number(c))===c&&c<t.length||L&&i["$"+c]instanceof Symbol||(w.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if("function"==typeof M)for(var a=0;a<u.length;a++)q.call(t,u[a])&&n.push("["+e(u[a])+"]: "+e(t[u[a]],t));return n}
75
75
  },{"./util.inspect":"sC8V"}],"XSCy":[function(require,module,exports) {
76
76
  "use strict";var n=require("object-inspect"),e=require("es-errors/type"),t=function(n,e,t){for(var r,u=n;null!=(r=u.next);u=r)if(r.key===e)return u.next=r.next,t||(r.next=n.next,n.next=r),r},r=function(n,e){if(n){var r=t(n,e);return r&&r.value}},u=function(n,e,r){var u=t(n,e);u?u.value=r:n.next={key:e,next:n.next,value:r}},i=function(n,e){return!!n&&!!t(n,e)},o=function(n,e){if(n)return t(n,e,!0)};module.exports=function(){var t,c={assert:function(t){if(!c.has(t))throw new e("Side channel does not contain "+n(t))},delete:function(n){var e=t&&t.next,r=o(t,n);return r&&e&&e===r&&(t=void 0),!!r},get:function(n){return r(t,n)},has:function(n){return i(t,n)},set:function(n,e){t||(t={next:void 0}),u(t,n,e)}};return c};
77
77
  },{"object-inspect":"nksM","es-errors/type":"aoYB"}],"s18g":[function(require,module,exports) {
@@ -98,7 +98,13 @@ var t=arguments[3],e="function"==typeof Map&&Map.prototype,r=Object.getOwnProper
98
98
  "use strict";module.exports=Math.min;
99
99
  },{}],"fePs":[function(require,module,exports) {
100
100
  "use strict";module.exports=Math.pow;
101
- },{}],"j6YI":[function(require,module,exports) {
101
+ },{}],"E78z":[function(require,module,exports) {
102
+ "use strict";module.exports=Math.round;
103
+ },{}],"NIVq":[function(require,module,exports) {
104
+ "use strict";module.exports=Number.isNaN||function(e){return e!=e};
105
+ },{}],"s7kq":[function(require,module,exports) {
106
+ "use strict";var r=require("./isNaN");module.exports=function(e){return r(e)||0===e?e:e<0?-1:1};
107
+ },{"./isNaN":"NIVq"}],"j6YI":[function(require,module,exports) {
102
108
  "use strict";module.exports=Object.getOwnPropertyDescriptor;
103
109
  },{}],"Bp8W":[function(require,module,exports) {
104
110
  "use strict";var e=require("./gOPD");if(e)try{e([],"length")}catch(r){e=null}module.exports=e;
@@ -108,7 +114,11 @@ var t=arguments[3],e="function"==typeof Map&&Map.prototype,r=Object.getOwnProper
108
114
  "use strict";module.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var o in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var y=Object.getOwnPropertyDescriptor(t,e);if(42!==y.value||!0!==y.enumerable)return!1}return!0};
109
115
  },{}],"khja":[function(require,module,exports) {
110
116
  "use strict";var o="undefined"!=typeof Symbol&&Symbol,e=require("./shams");module.exports=function(){return"function"==typeof o&&("function"==typeof Symbol&&("symbol"==typeof o("foo")&&("symbol"==typeof Symbol("bar")&&e())))};
111
- },{"./shams":"Ht9r"}],"sg3h":[function(require,module,exports) {
117
+ },{"./shams":"Ht9r"}],"d70E":[function(require,module,exports) {
118
+ "use strict";module.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null;
119
+ },{}],"nP7Q":[function(require,module,exports) {
120
+ "use strict";var e=require("es-object-atoms");module.exports=e.getPrototypeOf||null;
121
+ },{"es-object-atoms":"s18g"}],"sg3h":[function(require,module,exports) {
112
122
  "use strict";var t="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,r=Math.max,o="[object Function]",e=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var e=0;e<n.length;e+=1)r[e+t.length]=n[e];return r},i=function(t,n){for(var r=[],o=n||0,e=0;o<t.length;o+=1,e+=1)r[e]=t[o];return r},p=function(t,n){for(var r="",o=0;o<t.length;o+=1)r+=t[o],o+1<t.length&&(r+=n);return r};module.exports=function(u){var a=this;if("function"!=typeof a||n.apply(a)!==o)throw new TypeError(t+a);for(var c,f=i(arguments,1),l=r(0,a.length-f.length),h=[],y=0;y<l;y++)h[y]="$"+y;if(c=Function("binder","return function ("+p(h,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof c){var t=a.apply(this,e(f,arguments));return Object(t)===t?t:this}return a.apply(u,e(f,arguments))}),a.prototype){var g=function(){};g.prototype=a.prototype,c.prototype=new g,g.prototype=null}return c};
113
123
  },{}],"KNOk":[function(require,module,exports) {
114
124
  "use strict";var e=require("./implementation");module.exports=Function.prototype.bind||e;
@@ -124,11 +134,13 @@ var t=arguments[3],e="function"==typeof Map&&Map.prototype,r=Object.getOwnProper
124
134
  "use strict";var e=require("function-bind"),r=require("es-errors/type"),i=require("./functionCall"),n=require("./actualApply");module.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new r("a function is required");return n(e,i,t)};
125
135
  },{"function-bind":"KNOk","es-errors/type":"aoYB","./functionCall":"gVAC","./actualApply":"GINC"}],"npPU":[function(require,module,exports) {
126
136
  "use strict";var t,e=require("call-bind-apply-helpers"),o=require("gopd");try{t=[].__proto__===Array.prototype}catch(n){if(!(n&&"object"==typeof n&&"code"in n&&"ERR_PROTO_ACCESS"===n.code))throw n}var r=!!t&&o&&o(Object.prototype,"__proto__"),p=Object,c=p.getPrototypeOf;module.exports=r&&"function"==typeof r.get?e([r.get]):"function"==typeof c&&function(t){return c(null==t?t:p(t))};
127
- },{"call-bind-apply-helpers":"PVMc","gopd":"Bp8W"}],"bKRI":[function(require,module,exports) {
137
+ },{"call-bind-apply-helpers":"PVMc","gopd":"Bp8W"}],"knap":[function(require,module,exports) {
138
+ "use strict";var e=require("./Reflect.getPrototypeOf"),t=require("./Object.getPrototypeOf"),r=require("dunder-proto/get");module.exports=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:r?function(e){return r(e)}:null;
139
+ },{"./Reflect.getPrototypeOf":"d70E","./Object.getPrototypeOf":"nP7Q","dunder-proto/get":"npPU"}],"bKRI":[function(require,module,exports) {
128
140
  "use strict";var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,o=require("function-bind");module.exports=o.call(t,e);
129
141
  },{"function-bind":"KNOk"}],"aOC8":[function(require,module,exports) {
130
- "use strict";var r,e=require("es-object-atoms"),t=require("es-errors"),o=require("es-errors/eval"),n=require("es-errors/range"),a=require("es-errors/ref"),y=require("es-errors/syntax"),i=require("es-errors/type"),p=require("es-errors/uri"),f=require("math-intrinsics/abs"),s=require("math-intrinsics/floor"),u=require("math-intrinsics/max"),c=require("math-intrinsics/min"),l=require("math-intrinsics/pow"),A=Function,d=function(r){try{return A('"use strict"; return ('+r+").constructor;")()}catch(e){}},P=require("gopd"),g=require("es-define-property"),m=function(){throw new i},h=P?function(){try{return arguments.callee,m}catch(r){try{return P(arguments,"callee").get}catch(e){return m}}}():m,S=require("has-symbols")(),b=require("dunder-proto/get"),I="function"==typeof Reflect&&Reflect.getPrototypeOf||e.getPrototypeOf||b,F=require("call-bind-apply-helpers/functionApply"),E=require("call-bind-apply-helpers/functionCall"),U={},w="undefined"!=typeof Uint8Array&&I?I(Uint8Array):r,v={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":S&&I?I([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":U,"%AsyncGenerator%":U,"%AsyncGeneratorFunction%":U,"%AsyncIteratorPrototype%":U,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":o,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":A,"%GeneratorFunction%":U,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&I?I(I([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&S&&I?I((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":P,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":n,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&S&&I?I((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&I?I(""[Symbol.iterator]()):r,"%Symbol%":S?Symbol:r,"%SyntaxError%":y,"%ThrowTypeError%":h,"%TypedArray%":w,"%TypeError%":i,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":p,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%Function.prototype.call%":E,"%Function.prototype.apply%":F,"%Object.defineProperty%":g,"%Math.abs%":f,"%Math.floor%":s,"%Math.max%":u,"%Math.min%":c,"%Math.pow%":l};if(I)try{null.error}catch(T){var R=I(I(T));v["%Error.prototype%"]=R}var q=function r(e){var t;if("%AsyncFunction%"===e)t=d("async function () {}");else if("%GeneratorFunction%"===e)t=d("function* () {}");else if("%AsyncGeneratorFunction%"===e)t=d("async function* () {}");else if("%AsyncGenerator%"===e){var o=r("%AsyncGeneratorFunction%");o&&(t=o.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=r("%AsyncGenerator%");n&&I&&(t=I(n.prototype))}return v[e]=t,t},x={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},B=require("function-bind"),M=require("hasown"),O=B.call(E,Array.prototype.concat),_=B.call(F,Array.prototype.splice),G=B.call(E,String.prototype.replace),k=B.call(E,String.prototype.slice),N=B.call(E,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,C=function(r){var e=k(r,0,1),t=k(r,-1);if("%"===e&&"%"!==t)throw new y("invalid intrinsic syntax, expected closing `%`");if("%"===t&&"%"!==e)throw new y("invalid intrinsic syntax, expected opening `%`");var o=[];return G(r,j,function(r,e,t,n){o[o.length]=t?G(n,W,"$1"):e||r}),o},D=function(r,e){var t,o=r;if(M(x,o)&&(o="%"+(t=x[o])[0]+"%"),M(v,o)){var n=v[o];if(n===U&&(n=q(o)),void 0===n&&!e)throw new i("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:t,name:o,value:n}}throw new y("intrinsic "+r+" does not exist!")};module.exports=function(r,e){if("string"!=typeof r||0===r.length)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new i('"allowMissing" argument must be a boolean');if(null===N(/^%?[^%]*%?$/,r))throw new y("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=C(r),o=t.length>0?t[0]:"",n=D("%"+o+"%",e),a=n.name,p=n.value,f=!1,s=n.alias;s&&(o=s[0],_(t,O([0,1],s)));for(var u=1,c=!0;u<t.length;u+=1){var l=t[u],A=k(l,0,1),d=k(l,-1);if(('"'===A||"'"===A||"`"===A||'"'===d||"'"===d||"`"===d)&&A!==d)throw new y("property names with quotes must have matching quotes");if("constructor"!==l&&c||(f=!0),M(v,a="%"+(o+="."+l)+"%"))p=v[a];else if(null!=p){if(!(l in p)){if(!e)throw new i("base intrinsic for "+r+" exists, but the property is not available.");return}if(P&&u+1>=t.length){var g=P(p,l);p=(c=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:p[l]}else c=M(p,l),p=p[l];c&&!f&&(v[a]=p)}}return p};
131
- },{"es-object-atoms":"s18g","es-errors":"ZzPn","es-errors/eval":"VfWL","es-errors/range":"swZI","es-errors/ref":"uS63","es-errors/syntax":"HWda","es-errors/type":"aoYB","es-errors/uri":"fdKl","math-intrinsics/abs":"ehHL","math-intrinsics/floor":"DH8E","math-intrinsics/max":"pLkS","math-intrinsics/min":"zo3s","math-intrinsics/pow":"fePs","gopd":"Bp8W","es-define-property":"pdg1","has-symbols":"khja","dunder-proto/get":"npPU","call-bind-apply-helpers/functionApply":"dcFc","call-bind-apply-helpers/functionCall":"gVAC","function-bind":"KNOk","hasown":"bKRI"}],"UT4K":[function(require,module,exports) {
142
+ "use strict";var r,e=require("es-object-atoms"),t=require("es-errors"),o=require("es-errors/eval"),n=require("es-errors/range"),a=require("es-errors/ref"),y=require("es-errors/syntax"),i=require("es-errors/type"),p=require("es-errors/uri"),s=require("math-intrinsics/abs"),f=require("math-intrinsics/floor"),u=require("math-intrinsics/max"),c=require("math-intrinsics/min"),l=require("math-intrinsics/pow"),A=require("math-intrinsics/round"),d=require("math-intrinsics/sign"),P=Function,g=function(r){try{return P('"use strict"; return ('+r+").constructor;")()}catch(e){}},m=require("gopd"),h=require("es-define-property"),S=function(){throw new i},b=m?function(){try{return arguments.callee,S}catch(r){try{return m(arguments,"callee").get}catch(e){return S}}}():S,I=require("has-symbols")(),F=require("get-proto"),E=require("get-proto/Object.getPrototypeOf"),U=require("get-proto/Reflect.getPrototypeOf"),w=require("call-bind-apply-helpers/functionApply"),v=require("call-bind-apply-helpers/functionCall"),R={},q="undefined"!=typeof Uint8Array&&F?F(Uint8Array):r,O={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":I&&F?F([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":R,"%AsyncGenerator%":R,"%AsyncGeneratorFunction%":R,"%AsyncIteratorPrototype%":R,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":o,"%Float16Array%":"undefined"==typeof Float16Array?r:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":P,"%GeneratorFunction%":R,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":I&&F?F(F([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&I&&F?F((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":m,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":n,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&I&&F?F((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":I&&F?F(""[Symbol.iterator]()):r,"%Symbol%":I?Symbol:r,"%SyntaxError%":y,"%ThrowTypeError%":b,"%TypedArray%":q,"%TypeError%":i,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":p,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%Function.prototype.call%":v,"%Function.prototype.apply%":w,"%Object.defineProperty%":h,"%Object.getPrototypeOf%":E,"%Math.abs%":s,"%Math.floor%":f,"%Math.max%":u,"%Math.min%":c,"%Math.pow%":l,"%Math.round%":A,"%Math.sign%":d,"%Reflect.getPrototypeOf%":U};if(F)try{null.error}catch(z){var x=F(F(z));O["%Error.prototype%"]=x}var B=function r(e){var t;if("%AsyncFunction%"===e)t=g("async function () {}");else if("%GeneratorFunction%"===e)t=g("function* () {}");else if("%AsyncGeneratorFunction%"===e)t=g("async function* () {}");else if("%AsyncGenerator%"===e){var o=r("%AsyncGeneratorFunction%");o&&(t=o.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=r("%AsyncGenerator%");n&&F&&(t=F(n.prototype))}return O[e]=t,t},M={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},_=require("function-bind"),G=require("hasown"),j=_.call(v,Array.prototype.concat),k=_.call(w,Array.prototype.splice),N=_.call(v,String.prototype.replace),W=_.call(v,String.prototype.slice),C=_.call(v,RegExp.prototype.exec),D=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,T=/\\(\\)?/g,J=function(r){var e=W(r,0,1),t=W(r,-1);if("%"===e&&"%"!==t)throw new y("invalid intrinsic syntax, expected closing `%`");if("%"===t&&"%"!==e)throw new y("invalid intrinsic syntax, expected opening `%`");var o=[];return N(r,D,function(r,e,t,n){o[o.length]=t?N(n,T,"$1"):e||r}),o},V=function(r,e){var t,o=r;if(G(M,o)&&(o="%"+(t=M[o])[0]+"%"),G(O,o)){var n=O[o];if(n===R&&(n=B(o)),void 0===n&&!e)throw new i("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:t,name:o,value:n}}throw new y("intrinsic "+r+" does not exist!")};module.exports=function(r,e){if("string"!=typeof r||0===r.length)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new i('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,r))throw new y("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var t=J(r),o=t.length>0?t[0]:"",n=V("%"+o+"%",e),a=n.name,p=n.value,s=!1,f=n.alias;f&&(o=f[0],k(t,j([0,1],f)));for(var u=1,c=!0;u<t.length;u+=1){var l=t[u],A=W(l,0,1),d=W(l,-1);if(('"'===A||"'"===A||"`"===A||'"'===d||"'"===d||"`"===d)&&A!==d)throw new y("property names with quotes must have matching quotes");if("constructor"!==l&&c||(s=!0),G(O,a="%"+(o+="."+l)+"%"))p=O[a];else if(null!=p){if(!(l in p)){if(!e)throw new i("base intrinsic for "+r+" exists, but the property is not available.");return}if(m&&u+1>=t.length){var P=m(p,l);p=(c=!!P)&&"get"in P&&!("originalValue"in P.get)?P.get:p[l]}else c=G(p,l),p=p[l];c&&!s&&(O[a]=p)}}return p};
143
+ },{"es-object-atoms":"s18g","es-errors":"ZzPn","es-errors/eval":"VfWL","es-errors/range":"swZI","es-errors/ref":"uS63","es-errors/syntax":"HWda","es-errors/type":"aoYB","es-errors/uri":"fdKl","math-intrinsics/abs":"ehHL","math-intrinsics/floor":"DH8E","math-intrinsics/max":"pLkS","math-intrinsics/min":"zo3s","math-intrinsics/pow":"fePs","math-intrinsics/round":"E78z","math-intrinsics/sign":"s7kq","gopd":"Bp8W","es-define-property":"pdg1","has-symbols":"khja","get-proto":"knap","get-proto/Object.getPrototypeOf":"nP7Q","get-proto/Reflect.getPrototypeOf":"d70E","call-bind-apply-helpers/functionApply":"dcFc","call-bind-apply-helpers/functionCall":"gVAC","function-bind":"KNOk","hasown":"bKRI"}],"UT4K":[function(require,module,exports) {
132
144
  "use strict";var e=require("get-intrinsic"),r=require("call-bind-apply-helpers"),t=r([e("%String.prototype.indexOf%")]);module.exports=function(i,n){var o=e(i,!!n);return"function"==typeof o&&t(i,".prototype.")>-1?r([o]):o};
133
145
  },{"get-intrinsic":"aOC8","call-bind-apply-helpers":"PVMc"}],"A2ko":[function(require,module,exports) {
134
146
  "use strict";var e=require("get-intrinsic"),t=require("call-bound"),r=require("object-inspect"),n=require("es-errors/type"),o=e("%Map%",!0),i=t("Map.prototype.get",!0),p=t("Map.prototype.set",!0),u=t("Map.prototype.has",!0),a=t("Map.prototype.delete",!0),s=t("Map.prototype.size",!0);module.exports=!!o&&function(){var e,t={assert:function(e){if(!t.has(e))throw new n("Side channel does not contain "+r(e))},delete:function(t){if(e){var r=a(e,t);return 0===s(e)&&(e=void 0),r}return!1},get:function(t){if(e)return i(e,t)},has:function(t){return!!e&&u(e,t)},set:function(t,r){e||(e=new o),p(e,t,r)}};return t};
@@ -143,27 +155,27 @@ var t=arguments[3],e="function"==typeof Map&&Map.prototype,r=Object.getOwnProper
143
155
  },{"./formats":"XaX2"}],"mwZo":[function(require,module,exports) {
144
156
  "use strict";var e=require("side-channel"),r=require("./utils"),o=require("./formats"),t=Object.prototype.hasOwnProperty,n={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},a=Array.isArray,i=Array.prototype.push,l=function(e,r){i.apply(e,a(r)?r:[r])},s=Date.prototype.toISOString,c=o.default,f={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:r.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:o.formatters[c],indices:!1,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},u=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e},d={},y=function o(t,n,i,s,c,y,p,m,v,h,w,b,g,D,E,T,k,N){for(var S=t,A=N,I=0,O=!1;void 0!==(A=A.get(d))&&!O;){var K=A.get(t);if(I+=1,void 0!==K){if(K===I)throw new RangeError("Cyclic object value");O=!0}void 0===A.get(d)&&(I=0)}if("function"==typeof h?S=h(n,S):S instanceof Date?S=g(S):"comma"===i&&a(S)&&(S=r.maybeMap(S,function(e){return e instanceof Date?g(e):e})),null===S){if(y)return v&&!T?v(n,f.encoder,k,"key",D):n;S=""}if(u(S)||r.isBuffer(S))return v?[E(T?n:v(n,f.encoder,k,"key",D))+"="+E(v(S,f.encoder,k,"value",D))]:[E(n)+"="+E(String(S))];var j,R=[];if(void 0===S)return R;if("comma"===i&&a(S))T&&v&&(S=r.maybeMap(S,v)),j=[{value:S.length>0?S.join(",")||null:void 0}];else if(a(h))j=h;else{var x=Object.keys(S);j=w?x.sort(w):x}var P=m?String(n).replace(/\./g,"%2E"):String(n),z=s&&a(S)&&1===S.length?P+"[]":P;if(c&&a(S)&&0===S.length)return z+"[]";for(var F=0;F<j.length;++F){var H=j[F],Q="object"==typeof H&&H&&void 0!==H.value?H.value:S[H];if(!p||null!==Q){var V=b&&m?String(H).replace(/\./g,"%2E"):String(H),q=a(S)?"function"==typeof i?i(z,V):z:z+(b?"."+V:"["+V+"]");N.set(t,I);var B=e();B.set(d,N),l(R,o(Q,q,i,s,c,y,p,m,"comma"===i&&T&&a(S)?null:v,h,w,b,g,D,E,T,k,B))}}return R},p=function(e){if(!e)return f;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var r=e.charset||f.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=o.default;if(void 0!==e.format){if(!t.call(o.formatters,e.format))throw new TypeError("Unknown format option provided.");i=e.format}var l,s=o.formatters[i],c=f.filter;if(("function"==typeof e.filter||a(e.filter))&&(c=e.filter),l=e.arrayFormat in n?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":f.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=void 0===e.allowDots?!0===e.encodeDotInKeys||f.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:f.addQueryPrefix,allowDots:u,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:f.allowEmptyArrays,arrayFormat:l,charset:r,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:f.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?f.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:f.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:f.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:f.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:f.encodeValuesOnly,filter:c,format:i,formatter:s,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:f.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:f.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:f.strictNullHandling}};module.exports=function(r,o){var t,i=r,s=p(o);"function"==typeof s.filter?i=(0,s.filter)("",i):a(s.filter)&&(t=s.filter);var c=[];if("object"!=typeof i||null===i)return"";var f=n[s.arrayFormat],u="comma"===f&&s.commaRoundTrip;t||(t=Object.keys(i)),s.sort&&t.sort(s.sort);for(var d=e(),m=0;m<t.length;++m){var v=t[m],h=i[v];s.skipNulls&&null===h||l(c,y(h,v,f,u,s.allowEmptyArrays,s.strictNullHandling,s.skipNulls,s.encodeDotInKeys,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.format,s.formatter,s.encodeValuesOnly,s.charset,d))}var w=c.join(s.delimiter),b=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&("iso-8859-1"===s.charset?b+="utf8=%26%2310003%3B&":b+="utf8=%E2%9C%93&"),w.length>0?b+w:""};
145
157
  },{"side-channel":"lzf1","./utils":"Qri1","./formats":"XaX2"}],"snX5":[function(require,module,exports) {
146
- "use strict";var e=require("./utils"),t=Object.prototype.hasOwnProperty,r=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},i=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},a=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l="utf8=%26%2310003%3B",n="utf8=%E2%9C%93",s=function(s,p){var c={__proto__:null},d=p.ignoreQueryPrefix?s.replace(/^\?/,""):s;d=d.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y,u=p.parameterLimit===1/0?void 0:p.parameterLimit,f=d.split(p.delimiter,u),m=-1,h=p.charset;if(p.charsetSentinel)for(y=0;y<f.length;++y)0===f[y].indexOf("utf8=")&&(f[y]===n?h="utf-8":f[y]===l&&(h="iso-8859-1"),m=y,y=f.length);for(y=0;y<f.length;++y)if(y!==m){var w,b,g=f[y],v=g.indexOf("]="),D=-1===v?g.indexOf("="):v+1;-1===D?(w=p.decoder(g,o.decoder,h,"key"),b=p.strictNullHandling?null:""):(w=p.decoder(g.slice(0,D),o.decoder,h,"key"),b=e.maybeMap(a(g.slice(D+1),p),function(e){return p.decoder(e,o.decoder,h,"value")})),b&&p.interpretNumericEntities&&"iso-8859-1"===h&&(b=i(String(b))),g.indexOf("[]=")>-1&&(b=r(b)?[b]:b);var E=t.call(c,w);E&&"combine"===p.duplicates?c[w]=e.combine(c[w],b):E&&"last"!==p.duplicates||(c[w]=b)}return c},p=function(e,t,r,o){for(var i=o?t:a(t,r),l=e.length-1;l>=0;--l){var n,s=e[l];if("[]"===s&&r.parseArrays)n=r.allowEmptyArrays&&(""===i||r.strictNullHandling&&null===i)?[]:[].concat(i);else{n=r.plainObjects?{__proto__:null}:{};var p="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=r.decodeDotInKeys?p.replace(/%2E/g,"."):p,d=parseInt(c,10);r.parseArrays||""!==c?!isNaN(d)&&s!==c&&String(d)===c&&d>=0&&r.parseArrays&&d<=r.arrayLimit?(n=[])[d]=i:"__proto__"!==c&&(n[c]=i):n={0:i}}i=n}return i},c=function(e,r,o,i){if(e){var a=o.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/g,n=o.depth>0&&/(\[[^[\]]*])/.exec(a),s=n?a.slice(0,n.index):a,c=[];if(s){if(!o.plainObjects&&t.call(Object.prototype,s)&&!o.allowPrototypes)return;c.push(s)}for(var d=0;o.depth>0&&null!==(n=l.exec(a))&&d<o.depth;){if(d+=1,!o.plainObjects&&t.call(Object.prototype,n[1].slice(1,-1))&&!o.allowPrototypes)return;c.push(n[1])}if(n){if(!0===o.strictDepth)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");c.push("["+a.slice(n.index)+"]")}return p(c,r,o,i)}},d=function(t){if(!t)return o;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=void 0===t.charset?o.charset:t.charset,i=void 0===t.duplicates?o.duplicates:t.duplicates;if("combine"!==i&&"first"!==i&&"last"!==i)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||o.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:o.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:o.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:o.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:o.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:o.decoder,delimiter:"string"==typeof t.delimiter||e.isRegExp(t.delimiter)?t.delimiter:o.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:o.depth,duplicates:i,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:o.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:o.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:o.strictDepth,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:o.strictNullHandling}};module.exports=function(t,r){var o=d(r);if(""===t||null==t)return o.plainObjects?{__proto__:null}:{};for(var i="string"==typeof t?s(t,o):t,a=o.plainObjects?{__proto__:null}:{},l=Object.keys(i),n=0;n<l.length;++n){var p=l[n],y=c(p,i[p],o,"string"==typeof t);a=e.merge(a,y,o)}return!0===o.allowSparse?a:e.compact(a)};
158
+ "use strict";var e=require("./utils"),t=Object.prototype.hasOwnProperty,r=Array.isArray,o={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},i=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},a=function(e,t,r){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},n="utf8=%26%2310003%3B",l="utf8=%E2%9C%93",s=function(s,c){var p={__proto__:null},d=c.ignoreQueryPrefix?s.replace(/^\?/,""):s;d=d.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=c.parameterLimit===1/0?void 0:c.parameterLimit,m=d.split(c.delimiter,c.throwOnLimitExceeded?y+1:y);if(c.throwOnLimitExceeded&&m.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(1===y?"":"s")+" allowed.");var u,f=-1,h=c.charset;if(c.charsetSentinel)for(u=0;u<m.length;++u)0===m[u].indexOf("utf8=")&&(m[u]===l?h="utf-8":m[u]===n&&(h="iso-8859-1"),f=u,u=m.length);for(u=0;u<m.length;++u)if(u!==f){var w,b,g=m[u],E=g.indexOf("]="),O=-1===E?g.indexOf("="):E+1;-1===O?(w=c.decoder(g,o.decoder,h,"key"),b=c.strictNullHandling?null:""):(w=c.decoder(g.slice(0,O),o.decoder,h,"key"),b=e.maybeMap(a(g.slice(O+1),c,r(p[w])?p[w].length:0),function(e){return c.decoder(e,o.decoder,h,"value")})),b&&c.interpretNumericEntities&&"iso-8859-1"===h&&(b=i(String(b))),g.indexOf("[]=")>-1&&(b=r(b)?[b]:b);var v=t.call(p,w);v&&"combine"===c.duplicates?p[w]=e.combine(p[w],b):v&&"last"!==c.duplicates||(p[w]=b)}return p},c=function(t,r,o,i){var n=0;if(t.length>0&&"[]"===t[t.length-1]){var l=t.slice(0,-1).join("");n=Array.isArray(r)&&r[l]?r[l].length:0}for(var s=i?r:a(r,o,n),c=t.length-1;c>=0;--c){var p,d=t[c];if("[]"===d&&o.parseArrays)p=o.allowEmptyArrays&&(""===s||o.strictNullHandling&&null===s)?[]:e.combine([],s);else{p=o.plainObjects?{__proto__:null}:{};var y="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,m=o.decodeDotInKeys?y.replace(/%2E/g,"."):y,u=parseInt(m,10);o.parseArrays||""!==m?!isNaN(u)&&d!==m&&String(u)===m&&u>=0&&o.parseArrays&&u<=o.arrayLimit?(p=[])[u]=s:"__proto__"!==m&&(p[m]=s):p={0:s}}s=p}return s},p=function(e,r,o,i){if(e){var a=o.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,n=/(\[[^[\]]*])/g,l=o.depth>0&&/(\[[^[\]]*])/.exec(a),s=l?a.slice(0,l.index):a,p=[];if(s){if(!o.plainObjects&&t.call(Object.prototype,s)&&!o.allowPrototypes)return;p.push(s)}for(var d=0;o.depth>0&&null!==(l=n.exec(a))&&d<o.depth;){if(d+=1,!o.plainObjects&&t.call(Object.prototype,l[1].slice(1,-1))&&!o.allowPrototypes)return;p.push(l[1])}if(l){if(!0===o.strictDepth)throw new RangeError("Input depth exceeded depth option of "+o.depth+" and strictDepth is true");p.push("["+a.slice(l.index)+"]")}return c(p,r,o,i)}},d=function(t){if(!t)return o;if(void 0!==t.allowEmptyArrays&&"boolean"!=typeof t.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==t.decodeDotInKeys&&"boolean"!=typeof t.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==t.throwOnLimitExceeded&&"boolean"!=typeof t.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=void 0===t.charset?o.charset:t.charset,i=void 0===t.duplicates?o.duplicates:t.duplicates;if("combine"!==i&&"first"!==i&&"last"!==i)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===t.allowDots?!0===t.decodeDotInKeys||o.allowDots:!!t.allowDots,allowEmptyArrays:"boolean"==typeof t.allowEmptyArrays?!!t.allowEmptyArrays:o.allowEmptyArrays,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:o.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:o.arrayLimit,charset:r,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:o.comma,decodeDotInKeys:"boolean"==typeof t.decodeDotInKeys?t.decodeDotInKeys:o.decodeDotInKeys,decoder:"function"==typeof t.decoder?t.decoder:o.decoder,delimiter:"string"==typeof t.delimiter||e.isRegExp(t.delimiter)?t.delimiter:o.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:o.depth,duplicates:i,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:o.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:o.plainObjects,strictDepth:"boolean"==typeof t.strictDepth?!!t.strictDepth:o.strictDepth,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:o.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof t.throwOnLimitExceeded&&t.throwOnLimitExceeded}};module.exports=function(t,r){var o=d(r);if(""===t||null==t)return o.plainObjects?{__proto__:null}:{};for(var i="string"==typeof t?s(t,o):t,a=o.plainObjects?{__proto__:null}:{},n=Object.keys(i),l=0;l<n.length;++l){var c=n[l],y=p(c,i[c],o,"string"==typeof t);a=e.merge(a,y,o)}return!0===o.allowSparse?a:e.compact(a)};
147
159
  },{"./utils":"Qri1"}],"hIRQ":[function(require,module,exports) {
148
160
  "use strict";var r=require("./stringify"),e=require("./parse"),s=require("./formats");module.exports={formats:s,parse:e,stringify:r};
149
161
  },{"./stringify":"mwZo","./parse":"snX5","./formats":"XaX2"}],"hDvy":[function(require,module,exports) {
150
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GudHubHttpsService=void 0;var t=n(require("axios")),e=require("./utils.js"),r=n(require("qs"));function n(t){return t&&t.__esModule?t:{default:t}}function o(t){return(o="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 i(){i=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),u=new q(n||[]);return a(i,"_invoke",{value:S(t,r,u)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var v="suspendedStart",y="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function E(){}var P={};l(P,s,function(){return this});var x=Object.getPrototypeOf,L=x&&x(x(H([])));L&&L!==r&&n.call(L,s)&&(P=L);var T=E.prototype=w.prototype=Object.create(P);function k(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function r(i,a,u,s){var c=p(t[i],t,a);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==o(l)&&n.call(l,"__await")?e.resolve(l.__await).then(function(t){r("next",t,u,s)},function(t){r("throw",t,u,s)}):e.resolve(l).then(function(t){f.value=t,u(f)},function(t){return r("throw",t,u,s)})}s(c.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=v;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=R(u,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var c=p(e,r,n);if("normal"===c.type){if(o=n.done?m:y,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=m,n.method="throw",n.arg=c.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function q(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function H(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(o(e)+" is not iterable")}return b.prototype=E,a(T,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:b,configurable:!0}),b.displayName=l(E,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,l(t,f,"GeneratorFunction")),t.prototype=Object.create(T),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,c,function(){return this}),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(T),l(T,f,"Generator"),l(T,s,function(){return this}),l(T,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=H,q.prototype={constructor:q,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),c=n.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:H(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function a(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function u(t){a(i,n,o,u,s,"next",t)}function s(t){a(i,n,o,u,s,"throw",t)}u(void 0)})}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function f(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=h(t,"string");return"symbol"==o(e)?e:e+""}function h(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var p=exports.GudHubHttpsService=function(){return f(function t(e){s(this,t),this.root=e,this.requestPromises=[]},[{key:"init",value:function(t){this.getToken=t}},{key:"get",value:function(){var r=u(i().mark(function r(n){var o,a,u,s=this;return i().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.getToken();case 2:if(o=r.sent,a=this.getHashCode(n),!this.requestPromises[a]){r.next=6;break}return r.abrupt("return",this.requestPromises[a].promise);case 6:return u=new Promise(function(r,i){var a;n.externalResource?a=n.url:(a=s.root+n.url,a="".concat(a).concat(/\?/.test(a)?"&":"?","token=").concat(o).concat((0,e.convertObjToUrlParams)(n.params))),t.default.get(a,{validateStatus:function(t){return t<400}}).then(function(t){200!=t.status&&console.error("GUDHUB HTTP SERVICE: GET ERROR: ".concat(t.status),t),r(t.data)}).catch(function(t){console.error("GUDHUB HTTP SERVICE: GET ERROR: ".concat(t.response.status,"\n"),t),console.log("Request message: ",n),t.response&&t.response.data&&console.log("Error response data: ",t.response.data),i(t)})}),this.pushPromise(u,a),r.abrupt("return",u);case 9:case"end":return r.stop()}},r,this)}));return function(t){return r.apply(this,arguments)}}()},{key:"post",value:function(){var e=u(i().mark(function e(n){var o,a,u=this;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.getHashCode(n),e.next=3,this.getToken();case 3:if(n.form.token=e.sent,!this.requestPromises[o]){e.next=6;break}return e.abrupt("return",this.requestPromises[o].promise);case 6:return a=new Promise(function(e,o){t.default.post(u.root+n.url,r.default.stringify(n.form),{maxBodyLength:1/0,headers:n.headers||{"Content-Type":"application/x-www-form-urlencoded"},validateStatus:function(t){return t<400}}).then(function(t){200!=t.status&&console.error("GUDHUB HTTP SERVICE: POST ERROR: ".concat(t.status),t),e(t.data)}).catch(function(t){console.error("GUDHUB HTTP SERVICE: POST ERROR: ".concat(t.response.status,"\n"),t),console.log("Request message: ",n),o(t)})}),this.pushPromise(a,o),e.abrupt("return",a);case 9:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"axiosRequest",value:function(e){var n=this.getHashCode(e);if(this.requestPromises[n])return this.requestPromises[n].promise;var o=e.method?e.method.toLowerCase():"get",a=e.url,s=e.headers||{};e.form&&(s["Content-Type"]="application/x-www-form-urlencoded");var c=new Promise(function(){var n=u(i().mark(function n(u,c){var f,l;return i().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,t.default[o](a,"post"===o?r.default.stringify(e.form)||e.body:{headers:s},"post"===o?{headers:s}:{});case 3:f=n.sent,l=f.data,u(l),n.next=13;break;case 8:n.prev=8,n.t0=n.catch(0),console.log("ERROR -> GUDHUB HTTP SERVICE -> SIMPLE POST :",n.t0.message),console.log("Request message: ",e),c(n.t0);case 13:case"end":return n.stop()}},n,null,[[0,8]])}));return function(t,e){return n.apply(this,arguments)}}());return this.pushPromise(c,n),c}},{key:"pushPromise",value:function(t,e){var r=this;this.requestPromises[e]={promise:t,hesh:e,callback:t.then(function(){r.destroyPromise(e)}).catch(function(t){r.destroyPromise(e)})}}},{key:"destroyPromise",value:function(t){this.requestPromises=this.requestPromises.filter(function(e){return e.hesh!==t})}},{key:"getHashCode",value:function(t){var e=0,n=r.default.stringify(t);if(0==n.length)return e;for(var o=0;o<n.length;o++){e=(e<<5)-e+n.charCodeAt(o),e&=e}return"h"+e}}])}();
162
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GudHubHttpsService=void 0;var t=n(require("axios")),e=require("./utils.js"),r=n(require("qs"));function n(t){return t&&t.__esModule?t:{default:t}}function o(t){return(o="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 i(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function u(r,n,o,i){var u=n&&n.prototype instanceof c?n:c,f=Object.create(u.prototype);return s(f,"_invoke",function(r,n,o){var i,s,u,c=0,f=o||[],l=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,r){return i=e,s=0,u=t,p.n=r,a}};function h(r,n){for(s=r,u=n,e=0;!l&&c&&!o&&e<f.length;e++){var o,i=f[e],h=p.p,v=i[2];r>3?(o=v===n)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=r<2&&h<i[1])?(s=0,p.v=n,p.n=i[1]):h<v&&(o=r<3||i[0]>n||n>v)&&(i[4]=r,i[5]=n,p.n=v,s=0))}if(o||r>1)return a;throw l=!0,n}return function(o,f,v){if(c>1)throw TypeError("Generator is already running");for(l&&1===f&&h(f,v),s=f,u=v;(e=s<2?t:u)||!l;){i||(s?s<3?(s>1&&(p.n=-1),h(s,u)):p.n=u:p.v=u);try{if(c=2,i){if(s||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,s<2&&(s=0)}else 1===s&&(e=i.return)&&e.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((e=(l=p.n<0)?u:r.call(n,p))!==a)break}catch(e){i=t,s=1,u=e}finally{c=1}}return{value:e,done:l}}}(r,o,i),!0),f}var a={};function c(){}function f(){}function l(){}e=Object.getPrototypeOf;var p=[][n]?e(e([][n]())):(s(e={},n,function(){return this}),e),h=l.prototype=c.prototype=Object.create(p);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,s(t,o,"GeneratorFunction")),t.prototype=Object.create(h),t}return f.prototype=l,s(h,"constructor",l),s(l,"constructor",f),f.displayName="GeneratorFunction",s(l,o,"GeneratorFunction"),s(h),s(h,o,"Generator"),s(h,n,function(){return this}),s(h,"toString",function(){return"[object Generator]"}),(i=function(){return{w:u,m:v}})()}function s(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}(s=function(t,e,r,n){if(e)o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r;else{var i=function(e,r){s(t,e,function(t){return this._invoke(e,r,t)})};i("next",0),i("throw",1),i("return",2)}})(t,e,r,n)}function u(t,e,r,n,o,i,s){try{var u=t[i](s),a=u.value}catch(t){return void r(t)}u.done?e(a):Promise.resolve(a).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function s(t){u(i,n,o,s,a,"next",t)}function a(t){u(i,n,o,s,a,"throw",t)}s(void 0)})}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function l(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var e=h(t,"string");return"symbol"==o(e)?e:e+""}function h(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var v=exports.GudHubHttpsService=function(){return l(function t(e){c(this,t),this.root=e,this.requestPromises=[]},[{key:"init",value:function(t){this.getToken=t}},{key:"get",value:function(){var r=a(i().m(function r(n){var o,s,u,a=this;return i().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,this.getToken();case 1:if(o=r.v,s=this.getHashCode(n),!this.requestPromises[s]){r.n=2;break}return r.a(2,this.requestPromises[s].promise);case 2:return u=new Promise(function(r,i){var s;n.externalResource?s=n.url:(s=a.root+n.url,s="".concat(s).concat(/\?/.test(s)?"&":"?","token=").concat(o).concat((0,e.convertObjToUrlParams)(n.params))),t.default.get(s,{validateStatus:function(t){return t<400}}).then(function(t){200!=t.status&&console.error("GUDHUB HTTP SERVICE: GET ERROR: ".concat(t.status),t),r(t.data)}).catch(function(t){console.error("GUDHUB HTTP SERVICE: GET ERROR: ".concat(t.response.status,"\n"),t),console.log("Request message: ",n),t.response&&t.response.data&&console.log("Error response data: ",t.response.data),i(t)})}),this.pushPromise(u,s),r.a(2,u)}},r,this)}));return function(t){return r.apply(this,arguments)}}()},{key:"post",value:function(){var e=a(i().m(function e(n){var o,s,u=this;return i().w(function(e){for(;;)switch(e.n){case 0:return o=this.getHashCode(n),e.n=1,this.getToken();case 1:if(n.form.token=e.v,!this.requestPromises[o]){e.n=2;break}return e.a(2,this.requestPromises[o].promise);case 2:return s=new Promise(function(e,o){t.default.post(u.root+n.url,r.default.stringify(n.form),{maxBodyLength:1/0,headers:n.headers||{"Content-Type":"application/x-www-form-urlencoded"},validateStatus:function(t){return t<400}}).then(function(t){200!=t.status&&console.error("GUDHUB HTTP SERVICE: POST ERROR: ".concat(t.status),t),e(t.data)}).catch(function(t){console.error("GUDHUB HTTP SERVICE: POST ERROR: ".concat(t.response.status,"\n"),t),console.log("Request message: ",n),o(t)})}),this.pushPromise(s,o),e.a(2,s)}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"axiosRequest",value:function(e){var n=this.getHashCode(e);if(this.requestPromises[n])return this.requestPromises[n].promise;var o=e.method?e.method.toLowerCase():"get",s=e.url,u=e.headers||{};e.form&&(u["Content-Type"]="application/x-www-form-urlencoded");var c=new Promise(function(){var n=a(i().m(function n(a,c){var f,l,p;return i().w(function(n){for(;;)switch(n.n){case 0:return n.p=0,n.n=1,t.default[o](s,"post"===o?r.default.stringify(e.form)||e.body:{headers:u},"post"===o?{headers:u}:{});case 1:f=n.v,l=f.data,a(l),n.n=3;break;case 2:n.p=2,p=n.v,console.log("ERROR -> GUDHUB HTTP SERVICE -> SIMPLE POST :",p.message),console.log("Request message: ",e),c(p);case 3:return n.a(2)}},n,null,[[0,2]])}));return function(t,e){return n.apply(this,arguments)}}());return this.pushPromise(c,n),c}},{key:"pushPromise",value:function(t,e){var r=this;this.requestPromises[e]={promise:t,hesh:e,callback:t.then(function(){r.destroyPromise(e)}).catch(function(t){r.destroyPromise(e)})}}},{key:"destroyPromise",value:function(t){this.requestPromises=this.requestPromises.filter(function(e){return e.hesh!==t})}},{key:"getHashCode",value:function(t){var e=0,n=r.default.stringify(t);if(0==n.length)return e;for(var o=0;o<n.length;o++){e=(e<<5)-e+n.charCodeAt(o),e&=e}return"h"+e}}])}();
151
163
  },{"axios":"O4Aa","./utils.js":"EgeI","qs":"hIRQ"}],"Lc8J":[function(require,module,exports) {
152
164
  "use strict";function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(e)}function e(o){var e="";for(var t in o)o.hasOwnProperty(t)&&o[t]&&(e+="."+o[t]);return e?e.substring(1):"any"}function t(e,t,n){return null==e||"string"!=typeof e?(console.log("Listener type is \"undefined\" or not have actual 'type' for subscribe"),!1):null==t||"object"!==o(t)?(console.log("Listener destination is \"undefined\" or not have actual 'type' for subscribe"),!1):"function"==typeof n||(console.log("Listener is not a function for subscribe!"),!1)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkParams=t,exports.createId=e;
153
165
  },{}],"E3xI":[function(require,module,exports) {
154
166
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PipeService=void 0;var e=require("./utils.js");function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t(e){return s(e)||i(e)||o(e)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,r){if(e){if("string"==typeof e)return u(e,r);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(e,r):void 0}}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function s(e){if(Array.isArray(e))return u(e)}function u(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function a(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function c(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function f(e,r,t){return r&&c(e.prototype,r),t&&c(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var t=b(e,"string");return"symbol"==r(t)?t:t+""}function b(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var y=exports.PipeService=function(){return f(function e(){a(this,e),this.subscribers={},this.messageBox={}},[{key:"on",value:function(r,t,n){var o=this;return(0,e.checkParams)(r,t,n)&&r.split(" ").map(function(r){return r+":"+(0,e.createId)(t)}).forEach(function(e){o.subscribers[e]||(o.subscribers[e]=new Set),o.subscribers[e].add(n),o.checkMessageBox(e)}),this}},{key:"emit",value:function(r,t,n,o){var i=this;return r.split(" ").forEach(function(s){var u=s+":"+(0,e.createId)(t);if(i.subscribers[u]){if(0==i.subscribers[u].size)return i.messageBox[u]=[r,t,n,o,!1],i;i.subscribers[u].forEach(function(e){e(null,n,o)})}else i.messageBox[u]=[r,t,n,o,!1]}),this}},{key:"onRoot",value:function(e,r,t){return this.on(e,r,t)}},{key:"destroy",value:function(r,t,n){var o=this;return r.split(" ").forEach(function(r){var i=r+":"+(0,e.createId)(t);o.subscribers[i]&&n&&o.subscribers[i].delete(n),o.subscribers[i]&&!n&&delete o.subscribers[i]}),this}},{key:"checkMessageBox",value:function(e){var r=this;this.cleanMesssageBox(),this.messageBox[e]&&setTimeout(function(){r.messageBox[e]&&(r.emit.apply(r,t(r.messageBox[e])),r.messageBox[e][4]=!0)},0)}},{key:"cleanMesssageBox",value:function(){for(var e in this.messageBox)this.messageBox[e][4]&&delete this.messageBox[e]}}])}();
155
167
  },{"./utils.js":"Lc8J"}],"FJWL":[function(require,module,exports) {
156
- "use strict";function e(e,t,a){return[{data_type:"text",name:"Text",icon:"text_icon",url:t+"/"+e+"text_data.js",type:"gh_element",technology:"angular"},{data_type:"text_opt",name:"Options",icon:"option_gh_element",url:t+"/"+e+"text_options_data.js",type:"gh_element",technology:"angular"},{data_type:"number",name:"Number",icon:"number",url:t+"/"+e+"number_data.js",type:"gh_element",technology:"angular"},{data_type:"task_board",name:"Task Board",icon:"task_board",url:t+"/"+e+"task_board_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer",name:"visualizer",icon:"visualizer",url:t+"/"+e+"visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"enterprice_visualizer",name:"Enterprice Visualizer",icon:"visualizer",private:!0,url:t+"/"+e+"enterprice_visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"email",name:"Email",icon:"email",url:t+"/"+e+"email_data.js",type:"gh_element",technology:"angular"},{data_type:"date",name:"Date",icon:"date_gh_element",url:t+"/"+e+"date_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_button",name:"Radio Button",icon:"radio_button_gh_element",url:t+"/"+e+"radio_button_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_icon",name:"Radio icon",icon:"radio_icon_gh_element",url:t+"/"+e+"radio_icon_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_phone",name:"Twilio Phone",icon:"phone_twilio_gh_element",url:t+"/"+e+"twilio_phone_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_autodialer",name:"Twilio Auto Dialer",icon:"twilio_dialer",url:t+"/"+e+"twillio_autodialer_data.js",type:"gh_element",technology:"angular"},{data_type:"color",name:"Color",icon:"paint_gh_element",url:t+"/"+e+"color_data.js",type:"gh_element",technology:"angular"},{data_type:"charts",name:"Charts",icon:"graph_gh_element",url:t+"/"+e+"charts_data.js",type:"gh_element",technology:"angular"},{data_type:"funnel_chart",name:"Funnel chart",icon:"funnel_chart_gh_element",url:t+"/"+e+"funnel_chart_data.js",type:"gh_element",technology:"angular"},{data_type:"add_items_from_template",name:"Add items from template",icon:"contact_second",url:t+"/"+e+"add_items_from_template_data.js",type:"gh_element",technology:"angular"},{data_type:"item_ref",name:"Reference",icon:"reference",url:t+"/"+e+"itemRef_data.js",type:"gh_element",technology:"angular"},{data_type:"calendar",name:"Calendar",icon:"calendar",js:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/main.js?t=4",css:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"data_ref",name:"Data Reference",icon:"data_reference",url:t+"/"+e+"data_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"table",name:"Table",icon:"table",url:t+"/"+e+"table_data.js",type:"gh_element",technology:"angular"},{data_type:"tile",name:"Tile table",icon:"tile_table",url:t+"/"+e+"tile_data.js",type:"gh_element",technology:"angular"},{data_type:"file",name:"File",icon:"box",url:t+"/"+e+"file_data.js",type:"gh_element",technology:"angular"},{data_type:"image",name:"Image",icon:"image",url:t+"/"+e+"image_data.js",type:"gh_element",technology:"angular"},{data_type:"text_editor",name:"Text Editor",icon:"square",url:t+"/"+e+"text_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"tinymse",name:"Text editor MSE",icon:"tag",url:t+"/"+e+"tinymse_data.js",type:"gh_element",technology:"angular"},{data_type:"duration",name:"Duration",icon:"number_gh_element",url:t+"/"+e+"duration_data.js",type:"gh_element",technology:"angular"},{data_type:"user",name:"User",icon:"user_gh_element",url:t+"/"+e+"user_data.js",type:"gh_element",technology:"angular"},{data_type:"app",name:"App",icon:"app",url:t+"/"+e+"application_data.js",type:"gh_element",technology:"angular"},{data_type:"field",name:"Field",icon:"field_gh_element",url:t+"/"+e+"field_data.js",type:"gh_element",technology:"angular"},{data_type:"available",name:"Available",icon:"availible_gh_element",url:t+"/"+e+"available_data.js",type:"gh_element",technology:"angular"},{data_type:"view_list",name:"View List",icon:"view_list",url:t+"/"+e+"view_list_data.js",type:"gh_element",technology:"angular"},{data_type:"calculator",name:"Calculator",icon:"calculator",url:t+"/"+e+"calculator_data.js",type:"gh_element",technology:"angular"},{data_type:"string_join",name:"String Joiner",icon:"string_join_gh_element",url:t+"/"+e+"string_joiner_data.js",type:"gh_element",technology:"angular"},{data_type:"signature",name:"Signature",icon:"signature",url:t+"/"+e+"signature_data.js",type:"gh_element",technology:"angular"},{data_type:"sendEmail",name:"Send Email",icon:"send_email_gh_element",url:t+"/"+e+"send_email_data.js",type:"gh_element",technology:"angular"},{data_type:"boolean",name:"Yes/No",icon:"boolen_gh_element",url:t+"/"+e+"boolean_data.js",type:"gh_element",technology:"angular"},{data_type:"product_gallery",name:"Product gallery",icon:"product_gallery",url:t+"/"+e+"product_gallery_data.js",type:"gh_element",technology:"angular"},{data_type:"online_inventory",name:"Online inventory",icon:"slab",url:t+"/"+e+"online_inventory_data.js",type:"gh_element",technology:"angular"},{data_type:"3d_edges",name:"3D Edges",icon:"3d_edges_gh_element",url:t+"/"+e+"3d_edges_data.js",type:"gh_element",technology:"angular"},{data_type:"color_list",name:"Color list",icon:"circular_gh_element",url:t+"/"+e+"color_list_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_link",name:"Go to Link",icon:"go_to_link",url:t+"/"+e+"go_to_link_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_view",name:"Go to View",icon:"go_to_view",url:t+"/"+e+"go_to_view_data.js",type:"gh_element",technology:"angular"},{data_type:"range",name:"Range",icon:"range_gh_element",url:t+"/"+e+"range_data.js",type:"gh_element",technology:"angular"},{data_type:"barcode",name:"Barcode",icon:"barcode_gh_element",url:t+"/"+e+"barcode_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_add",name:"Item remote add",icon:"remote_add_gh_element",url:t+"/"+e+"item_remote_add_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_update",name:"Item remote update",icon:"remote_update_gh_element",url:t+"/"+e+"item_remote_update_data.js",type:"gh_element",technology:"angular"},{data_type:"timeline",name:"Timeline",icon:"timeline",url:t+"/"+e+"timeline_data.js",type:"gh_element",technology:"angular"},{data_type:"delete_item",name:"Delete Item",icon:"rubbish",url:t+"/"+e+"delete_action.js",type:"gh_element",technology:"angular"},{data_type:"print_doc",name:"Print document",icon:"print",url:t+"/"+e+"print_doc_action.js",type:"gh_element",technology:"angular"},{data_type:"open_item",name:"Open Item",icon:"delete",private:!0,url:t+"/"+e+"open_item_action.js",type:"gh_element",technology:"angular"},{data_type:"edit_template",name:"Edit template",icon:"delete",private:!0,url:t+"/"+e+"edit_template_action.js",type:"gh_element",technology:"angular"},{data_type:"open_app",private:!0,name:"Open App",icon:"delete",url:t+"/"+e+"open_app_action.js",type:"gh_element",technology:"angular"},{data_type:"user_settings",private:!0,name:"User Settings",icon:"delete",url:t+"/"+e+"user_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"app_sharing",name:"Sharing",icon:"sharing",url:t+"/"+e+"sharing_action.js",type:"gh_element",technology:"angular"},{data_type:"app_constructor",private:!0,name:"App constructor",icon:"app_constructor",url:t+"/"+e+"app_constructor_action.js",type:"gh_element",technology:"angular"},{data_type:"app_settings",name:"App Settings",icon:"configuration",url:t+"/"+e+"app_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"export_csv",name:"Export CSV",icon:"export_csv",url:t+"/"+e+"export_csv.js",type:"gh_element",technology:"angular"},{data_type:"import_csv",name:"Import CSV",icon:"import_csv",url:t+"/"+e+"import_csv.js",type:"gh_element",technology:"angular"},{data_type:"add_items",name:"Add Items",icon:"plus",url:t+"/"+e+"add_items_action.js",type:"gh_element",technology:"angular"},{data_type:"update_items",name:"Update Items",icon:"update",url:t+"/"+e+"update_items_action.js",type:"gh_element",technology:"angular"},{data_type:"install_app",name:"Install",icon:"install",url:t+"/"+e+"install_app_action.js",type:"gh_element",technology:"angular"},{data_type:"search_action",name:"Search",icon:"search",url:t+"/"+e+"search_action.js",type:"gh_element",technology:"angular"},{data_type:"filter_table",name:"Table filter",icon:"filter",url:t+"/"+e+"filter_table_action.js",type:"gh_element",technology:"angular"},{data_type:"slider",name:"Slider",icon:"slider",url:t+"/"+e+"slider_data.js",type:"gh_element",technology:"angular"},{data_type:"clone_item",name:"Clone Item",icon:"double_plus",url:t+"/"+e+"clone_item_action.js",type:"gh_element",technology:"angular"},{data_type:"close",name:"Close",icon:"cross",url:t+"/"+e+"close_action.js",type:"gh_element",technology:"angular"},{data_type:"phone",name:"Phone",icon:"phone_thin",url:t+"/"+e+"phone_data.js",type:"gh_element",technology:"angular"},{data_type:"link",name:"Link",icon:"link_gh_element",url:t+"/"+e+"link_data.js",type:"gh_element",technology:"angular"},{data_type:"sheduling",name:"Sheduling",icon:"scheduling",url:t+"/"+e+"sheduling_data.js",type:"gh_element",technology:"angular"},{data_type:"qrcode",name:"QR Code",icon:"qr_code",url:t+"/"+e+"qrcode_data.js",type:"gh_element",technology:"angular"},{data_type:"graph2d",name:"Graph",icon:"graph",url:t+"/"+e+"graph2d_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool",name:"Quote tool",icon:"quoters",url:t+"/"+e+"quote_tool_data.js",type:"gh_element",technology:"angular"},{data_type:"cards",name:"Cards",icon:"cards",url:t+"/"+e+"cards_data.js",type:"gh_element",technology:"angular"},{data_type:"jsonConstructor",name:"Json Constructor",icon:"button",url:t+"/"+e+"json_constructor_data.js",type:"gh_element",technology:"angular"},{data_type:"button",name:"Button",icon:"button",js:"https://gudhub.com/modules/button_action/button_action.js?t=1",type:"gh_element",technology:"class"},{data_type:"editorjs",name:"EditorJS",icon:"code_editor",js:"https://gudhub.com/modules/Editor-Js/dist/main.js?t=2",css:"https://gudhub.com/modules/Editor-Js/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"filter_advanced",name:"Filter Advanced",icon:"filter_advanced",url:t+"/"+e+"filter_advanced_data.js",type:"gh_element",technology:"angular"},{data_type:"code_editor",name:"Code Editor",icon:"code_editor",url:t+"/"+e+"code_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"icon",name:"Icon",icon:"icon_gh_element",url:t+"/"+e+"icon_data.js",type:"gh_element",technology:"angular"},{data_type:"quoteRequest",name:"Quote Request",icon:"invoices",url:t+"/"+e+"quote_request_data.js",type:"gh_element",technology:"angular"},{data_type:"view_container",name:"View Container",icon:"pencil",url:t+"/"+e+"view_container_data.js",type:"gh_element",technology:"angular"},{data_type:"element_ref",name:"Element Reference",icon:"cloudSync_gh_element",url:t+"/"+e+"element_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer",name:"Quote Tool Renderer",icon:"l_counter",url:t+"/"+e+"quote_tool_objects_renderer_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer_generator",name:"Quote Tool Parts Generator",icon:"l_counter_arrow",url:t+"/"+e+"quote_tool_objects_renderer_generator_data.js",type:"gh_element",technology:"angular"},{data_type:"trigger",name:"Trigger",icon:"job",url:t+"/"+e+"trigger_data.js",type:"gh_element",technology:"angular"},{data_type:"voting",name:"Voting",icon:"like_gh_element",url:t+"/"+e+"voting_data.js",type:"gh_element",technology:"angular"},{data_type:"view_tabs",name:"View Tab",icon:"tabs",url:t+"/"+e+"view_tabs.js",type:"gh_element",technology:"angular"},{data_type:"filter_tabs",name:"Filter Tabs",icon:"filter_tabs_gh_element",url:t+"/"+e+"filter_tabs.js",type:"gh_element",technology:"angular"},{data_type:"gps_coords",name:"GPS Coords",icon:"location_gh_element",url:t+"/"+e+"gps_coords.js",type:"gh_element",technology:"angular"},{data_type:"google_map",name:"Google Map",icon:"location",url:t+"/"+e+"google_map_data.js",type:"gh_element",technology:"angular"},{data_type:"data_migrations",name:"Data migrations",icon:"view_list_gh_element",url:t+"/"+e+"data_migrations.js",type:"gh_element",technology:"angular"},{data_type:"additional_settings",name:"Additional Settings",icon:"",private:!0,url:t+"/"+e+"gh_additional_settings_data.js",type:"gh_element",technology:"angular"},{data_type:"send_request",name:"Send Request",icon:"send_request_gh_element",url:t+"/"+e+"send_request_data.js",type:"gh_element",technology:"angular"},{data_type:"webcam",name:"Web camera",icon:"webcam_gh_element",url:t+"/"+e+"webcam_data.js",type:"gh_element",technology:"angular"},{data_type:"json_viewer",name:"JSON viewer",icon:"json_gh_element",url:t+"/"+e+"json_viewer_data.js",type:"gh_element",technology:"angular"},{data_type:"notifications",name:"Notifications",icon:"full_gh_element",url:t+"/"+e+"notifications_data.js",type:"gh_element",technology:"angular"},{data_type:"api",name:"API",icon:"job",url:t+"/"+e+"api_data.js",type:"gh_element",technology:"angular"},{data_type:"smart_input",name:"Smart Input",icon:"roket",url:t+"/"+e+"smart_input_data.js",type:"gh_element",technology:"angular"},{data_type:"json_editor",name:"JSON Editor",icon:"code",url:t+"/"+e+"json_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"grapes_html_editor",name:"Grapes Html Editor",icon:"code_editor",url:t+"/"+e+"grapes_html_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"quiz",name:"Quiz",icon:"quiz_gh_element",url:t+"/"+e+"quiz_data.js",type:"gh_element",technology:"angular"},{data_type:"password_input",name:"Password",icon:"lock_gh_element",url:t+"/"+e+"password_input_data.js",type:"gh_element",technology:"angular"},{data_type:"vs_code",name:"VS Code",icon:"code_editor",url:t+"/"+e+"vs_code_data.js",type:"gh_element",technology:"angular"},{data_type:"nested_list",name:"Nested List",icon:"scheduling",js:"https://gudhub.com/modules/Nested-List/dist/main.js?t=2",css:"https://gudhub.com/modules/Nested-List/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"countertop_smart_quote",name:"Countertop Smart Quote",icon:"quoters",url:t+"/"+e+"countertop_smart_quote_data.js",type:"gh_element",technology:"angular"},{data_type:"markdown_viewer",name:"Markdown viewer",icon:"code_editor",js:"https://gudhub.com/modules/markdown-it-gh-element/dist/main.js?t=1",css:"https://gudhub.com/modules/markdown-it-gh-element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"html_viewer",name:"HTML Viewer",icon:"code_editor",js:"https://gudhub.com/modules/HTML-Viewer/dist/main.js?t=1",css:"https://gudhub.com/modules/HTML-Viewer/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"element_customizer",name:"Element Customizer",icon:"pencil",url:t+"/"+e+"element_customizer_data.js",type:"gh_element",technology:"angular"},{data_type:"task",name:"Task",icon:"table",url:t+"/"+e+"task_data.js",type:"gh_element",technology:"angular"},{data_type:"cron_picker",name:"Cron Picker",icon:"table",js:"https://gudhub.com/modules/Cron-Picker/dist/main.js?t=2",css:"https://gudhub.com/modules/Cron-Picker/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"balance_sheet",name:"Balance Sheet",icon:"table",js:"https://gudhub.com/modules/balance-sheet/dist/main.js?t=2",css:"https://gudhub.com/modules/balance-sheet/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"quote_form",name:"Quote Form",icon:"table",js:"https://gudhub.com/modules/countertop-quote-form/dist/main.js",css:"https://gudhub.com/modules/countertop-quote-form/dist/style.css",type:"gh_element",technology:"class"},{data_type:"static_nested_list",name:"Nested Filter",icon:"scheduling",js:"https://gudhub.com/modules/nested-filter/dist/main.js?t=1",css:"https://gudhub.com/modules/nested-filter/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"conversations",name:"Conversations",icon:"timeline",js:"https://gudhub.com/modules/conversation/dist/main.js?t=1",css:"https://gudhub.com/modules/conversation/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"study_journal",name:"Study Journal",icon:"timeline",js:"https://gudhub.com/modules/Study-Journal/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Journal/dist/style.css",type:"gh_element",technology:"class"},{data_type:"study_schedule",name:"Study Schedule",icon:"timeline",js:"https://gudhub.com/modules/Study-Schedule/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Schedule/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"avatar",name:"Avatar",icon:"user",js:"https://gudhub.com/modules/Gh-Avatar/dist/main.js?t=1",css:"https://gudhub.com/modules/Gh-Avatar/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"text_area",name:"Text Area",icon:"text_icon",js:"https://gudhub.com/modules/text-area-ghe/dist/main.js?t=3",css:"https://gudhub.com/modules/text-area-ghe/dist/style.css",type:"gh_element",technology:"class"},{data_type:"resource_calendar",name:"Resource Сalendar",icon:"calendar",url:t+"/"+e+"resource_calendar_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer_with_control_panel",name:"Visualizer With Control Panel",icon:"visualizer",url:t+"/"+e+"visualizer_with_control_panel_data.js",type:"gh_element",technology:"angular"},{data_type:"svg_to_pdf",name:"SVG To PDF",icon:"box",js:"https://gudhub.com/modules/SVG-to-PDF-Gh-Element/dist/main.js",css:"https://gudhub.com/modules/SVG-to-PDF-Gh-Element/dist/style.css",type:"gh_element",technology:"class"},{data_type:"recycle_bin",name:"Recycle Bin",icon:"recycle_bin",url:t+"/"+e+"recycle_bin_data.js",type:"gh_element",technology:"angular"},{data_type:"API",name:"API",url:t+"/"+a+"api_node.js",type:"automation",icon:"automation_api",private:!0},{data_type:"Calculator",name:"Calculator",url:t+"/"+a+"calculator.js",type:"automation",icon:"automation_calculator"},{data_type:"CompareItems",name:"Compare Items",url:t+"/"+a+"compare_items.js",type:"automation",icon:"automation_compare_items"},{data_type:"Constants",name:"Constants",url:t+"/"+a+"constants.js",type:"automation",icon:"automation_constants"},{data_type:"CreateFiles",name:"Create Files",url:t+"/"+a+"create_files.js",type:"automation",icon:"automation_create_files"},{data_type:"CreateItemsApi",name:"Create Items Api",url:t+"/"+a+"create_item_api.js",type:"automation",icon:"automation_create_items_api"},{data_type:"FileDuplicate",name:"File Duplicate",url:t+"/"+a+"file_duplicate.js",type:"automation",icon:"automation_file_duplicate"},{data_type:"Filter",name:"Filter",url:t+"/"+a+"filter_node.js",type:"automation",icon:"filter"},{data_type:"GetItemByItemRef",name:"Get Item By Item Ref",url:t+"/"+a+"get_item_by_item_ref.js",type:"automation",icon:"automation_get_item_by_item_ref"},{data_type:"GetItems",name:"Get Items",url:t+"/"+a+"get_items.js",type:"automation",icon:"automation_get_items"},{data_type:"GhElementNode",name:"Gh Element Node",url:t+"/"+a+"gh_element_node.js",type:"automation",icon:"automation_gh_element_node",private:!0,created_for:["GhElement"]},{data_type:"IfCondition",name:"If Condition",url:t+"/"+a+"if_condition.js",type:"automation",icon:"automation_if_condition"},{data_type:"ItemConstructor",name:"Item Constructor",url:t+"/"+a+"item_constructor.js",type:"automation",icon:"automation_item_constructor"},{data_type:"ItemDestructor",name:"Item Destructor",url:t+"/"+a+"item_destructor.js",type:"automation",icon:"automation_item_destructor"},{data_type:"JSONScheme",name:"JSON Scheme",url:t+"/"+a+"json_scheme.js",type:"automation",icon:"automation_json_scheme"},{data_type:"MergeItems",name:"Merge Items",url:t+"/"+a+"merge_items.js",type:"automation",icon:"automation_merge_items"},{data_type:"MessageConstructor",name:"Message Constructor",url:t+"/"+a+"message_constructor.js",type:"automation",icon:"automation_message_constructor"},{data_type:"ObjectToItem",name:"Object To Item",url:t+"/"+a+"obj_to_item.js",type:"automation",icon:"automation_object_to_item"},{data_type:"ObjectConstructor",name:"Object Constructor",url:t+"/"+a+"object_constructor.js",type:"automation",icon:"automation_object_constructor"},{data_type:"ObjectDestructor",name:"Object Destructor",url:t+"/"+a+"object_destructor.js",type:"automation",icon:"automation_object_destructor"},{data_type:"PopulateElement",name:"Populate Element",url:t+"/"+a+"populate_element.js",type:"automation",icon:"automation_populate_element",private:!0,created_for:["GhElement"]},{data_type:"PopulateItems",name:"Populate Items",url:t+"/"+a+"populate_items.js",type:"automation",icon:"automation_populate_items"},{data_type:"PopulateWithDate",name:"Populate With Date",url:t+"/"+a+"populate_with_date.js",type:"automation",icon:"automation_populate_with_date"},{data_type:"PopulateWithItemRef",name:"Populate with Item Ref",url:t+"/"+a+"populate_with_item_ref.js",type:"automation",icon:"automation_populate_with_item_ref"},{data_type:"PopUpForm",name:"Pop Up Form",url:t+"/"+a+"popup_form.js",type:"automation",icon:"automation_pop_up_form",private:!0,created_for:["Quiz","GhElement","SmartInput","Iterator"]},{data_type:"QuizForm",name:"Quiz Form",url:t+"/"+a+"quiz_form.js",type:"automation",icon:"automation_quiz_form",private:!0,created_for:["Quiz"]},{data_type:"QuizNode",name:"Quiz Node",url:t+"/"+a+"quiz_node.js",type:"automation",icon:"automation_quiz_node",private:!0},{data_type:"Request",name:"Request",url:t+"/"+a+"request_node.js",type:"automation",icon:"automation_request"},{data_type:"Response",name:"Response",url:t+"/"+a+"response_node.js",type:"automation",icon:"automation_response",private:!0,created_for:["API"]},{data_type:"SmartInput",name:"Smart Input",url:t+"/"+a+"smart_input.js",type:"automation",icon:"automation_smart_input",private:!0},{data_type:"Trigger",name:"Trigger",url:t+"/"+a+"trigger_node.js",type:"automation",icon:"automation_trigger",private:!0},{data_type:"TwilioSMS",name:"Twilio SMS",url:t+"/"+a+"twilio_sms.js",type:"automation",icon:"automation_twilio"},{data_type:"TwilioAuth",name:"Twilio Auth",url:t+"/"+a+"twilio_auth.js",type:"automation",icon:"table"},{data_type:"TwilioDevice",name:"Twilio Device",url:t+"/"+a+"twilio_device.js",type:"automation",icon:"table"},{data_type:"UpdateItemsApi",name:"Update Items Api",url:t+"/"+a+"update_items_api.js",type:"automation",icon:"automation_update_items_api"},{data_type:"GoogleCalendar",name:"Google Calendar",url:t+"/"+a+"google_calendar.js",type:"automation",icon:"calendar"},{data_type:"VerifyEmail",name:"Verify email",url:t+"/"+a+"verify_email.js",type:"automation",icon:"check_in_circle"},{data_type:"Iterator",name:"Iterator",url:t+"/"+a+"iterator.js",type:"automation",icon:"update"},{data_type:"IteratorInput",name:"Iterator Input",url:t+"/"+a+"iterator_input.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"IteratorOutput",name:"Iterator Output",url:t+"/"+a+"iterator_output.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"SendEmail",name:"Send email",url:t+"/"+a+"send_email.js",type:"automation",icon:"email"},{data_type:"FileReader",name:"File Reader",url:t+"/"+a+"file_reader.js",type:"automation",icon:"file"},{data_type:"WebsitesChecker",name:"Websites Checker",url:t+"/"+a+"websites_checker.js",type:"automation",icon:"world"},{data_type:"VoiceMachineDetection",name:"Voice Machine Detection",url:t+"/"+a+"voice_machine_detection.js",type:"automation",icon:"automation_calculator"},{data_type:"Task",name:"Task",url:t+"/"+a+"task.js",type:"automation",icon:"automation_calculator",private:!0},{data_type:"DeleteItems",name:"Delete Items",url:t+"/"+a+"delete_items.js",type:"automation",icon:"rubbish"},{data_type:"GoToItem",name:"Go To Item",url:t+"/"+a+"go_to_item.js",type:"automation",icon:"cursor_point"},{data_type:"FireWorks",name:"Fire Works",url:t+"/"+a+"fireworks_node.js",type:"automation",icon:"weeding_party"},{data_type:"SendMessage",name:"Send Message",url:t+"/"+a+"send_message.js",type:"automation",icon:"speech_bubble"},{data_type:"TurboSMS",name:"Turbo SMS",url:t+"/"+a+"turbo_sms.js",type:"automation",icon:"email"},{data_type:"JsCode",name:"Js Code",url:t+"/"+a+"js_code.js",type:"automation",icon:"code_editor"}]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
168
+ "use strict";function e(e,t,a){return[{data_type:"text",name:"Text",icon:"text_icon",url:t+"/"+e+"text_data.js",type:"gh_element",technology:"angular"},{data_type:"text_opt",name:"Options",icon:"option_gh_element",url:t+"/"+e+"text_options_data.js",type:"gh_element",technology:"angular"},{data_type:"number",name:"Number",icon:"number",url:t+"/"+e+"number_data.js",type:"gh_element",technology:"angular"},{data_type:"task_board",name:"Task Board",icon:"task_board",url:t+"/"+e+"task_board_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer",name:"visualizer",icon:"visualizer",url:t+"/"+e+"visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"enterprice_visualizer",name:"Enterprice Visualizer",icon:"visualizer",private:!0,url:t+"/"+e+"enterprice_visualizer_data.js",type:"gh_element",technology:"angular"},{data_type:"email",name:"Email",icon:"email",url:t+"/"+e+"email_data.js",type:"gh_element",technology:"angular"},{data_type:"date",name:"Date",icon:"date_gh_element",url:t+"/"+e+"date_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_button",name:"Radio Button",icon:"radio_button_gh_element",url:t+"/"+e+"radio_button_data.js",type:"gh_element",technology:"angular"},{data_type:"radio_icon",name:"Radio icon",icon:"radio_icon_gh_element",url:t+"/"+e+"radio_icon_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_phone",name:"Twilio Phone",icon:"phone_twilio_gh_element",url:t+"/"+e+"twilio_phone_data.js",type:"gh_element",technology:"angular"},{data_type:"twilio_autodialer",name:"Twilio Auto Dialer",icon:"twilio_dialer",url:t+"/"+e+"twillio_autodialer_data.js",type:"gh_element",technology:"angular"},{data_type:"color",name:"Color",icon:"paint_gh_element",url:t+"/"+e+"color_data.js",type:"gh_element",technology:"angular"},{data_type:"charts",name:"Charts",icon:"graph_gh_element",url:t+"/"+e+"charts_data.js",type:"gh_element",technology:"angular"},{data_type:"funnel_chart",name:"Funnel chart",icon:"funnel_chart_gh_element",url:t+"/"+e+"funnel_chart_data.js",type:"gh_element",technology:"angular"},{data_type:"add_items_from_template",name:"Add items from template",icon:"contact_second",url:t+"/"+e+"add_items_from_template_data.js",type:"gh_element",technology:"angular"},{data_type:"item_ref",name:"Reference",icon:"reference",url:t+"/"+e+"itemRef_data.js",type:"gh_element",technology:"angular"},{data_type:"calendar",name:"Calendar",icon:"calendar",js:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/main.js?t=6",css:"https://gudhub.com/modules/FullCalendar-Gh-Element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"data_ref",name:"Data Reference",icon:"data_reference",url:t+"/"+e+"data_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"table",name:"Table",icon:"table",url:t+"/"+e+"table_data.js",type:"gh_element",technology:"angular"},{data_type:"tile",name:"Tile table",icon:"tile_table",url:t+"/"+e+"tile_data.js",type:"gh_element",technology:"angular"},{data_type:"file",name:"File",icon:"box",url:t+"/"+e+"file_data.js",type:"gh_element",technology:"angular"},{data_type:"image",name:"Image",icon:"image",url:t+"/"+e+"image_data.js",type:"gh_element",technology:"angular"},{data_type:"text_editor",name:"Text Editor",icon:"square",url:t+"/"+e+"text_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"tinymse",name:"Text editor MSE",icon:"tag",url:t+"/"+e+"tinymse_data.js",type:"gh_element",technology:"angular"},{data_type:"duration",name:"Duration",icon:"number_gh_element",url:t+"/"+e+"duration_data.js",type:"gh_element",technology:"angular"},{data_type:"user",name:"User",icon:"user_gh_element",url:t+"/"+e+"user_data.js",type:"gh_element",technology:"angular"},{data_type:"app",name:"App",icon:"app",url:t+"/"+e+"application_data.js",type:"gh_element",technology:"angular"},{data_type:"field",name:"Field",icon:"field_gh_element",url:t+"/"+e+"field_data.js",type:"gh_element",technology:"angular"},{data_type:"available",name:"Available",icon:"availible_gh_element",url:t+"/"+e+"available_data.js",type:"gh_element",technology:"angular"},{data_type:"view_list",name:"View List",icon:"view_list",url:t+"/"+e+"view_list_data.js",type:"gh_element",technology:"angular"},{data_type:"calculator",name:"Calculator",icon:"calculator",url:t+"/"+e+"calculator_data.js",type:"gh_element",technology:"angular"},{data_type:"string_join",name:"String Joiner",icon:"string_join_gh_element",url:t+"/"+e+"string_joiner_data.js",type:"gh_element",technology:"angular"},{data_type:"signature",name:"Signature",icon:"signature",url:t+"/"+e+"signature_data.js",type:"gh_element",technology:"angular"},{data_type:"sendEmail",name:"Send Email",icon:"send_email_gh_element",url:t+"/"+e+"send_email_data.js",type:"gh_element",technology:"angular"},{data_type:"boolean",name:"Yes/No",icon:"boolen_gh_element",url:t+"/"+e+"boolean_data.js",type:"gh_element",technology:"angular"},{data_type:"product_gallery",name:"Product gallery",icon:"product_gallery",url:t+"/"+e+"product_gallery_data.js",type:"gh_element",technology:"angular"},{data_type:"online_inventory",name:"Online inventory",icon:"slab",url:t+"/"+e+"online_inventory_data.js",type:"gh_element",technology:"angular"},{data_type:"3d_edges",name:"3D Edges",icon:"3d_edges_gh_element",url:t+"/"+e+"3d_edges_data.js",type:"gh_element",technology:"angular"},{data_type:"color_list",name:"Color list",icon:"circular_gh_element",url:t+"/"+e+"color_list_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_link",name:"Go to Link",icon:"go_to_link",url:t+"/"+e+"go_to_link_data.js",type:"gh_element",technology:"angular"},{data_type:"go_to_view",name:"Go to View",icon:"go_to_view",url:t+"/"+e+"go_to_view_data.js",type:"gh_element",technology:"angular"},{data_type:"range",name:"Range",icon:"range_gh_element",url:t+"/"+e+"range_data.js",type:"gh_element",technology:"angular"},{data_type:"barcode",name:"Barcode",icon:"barcode_gh_element",url:t+"/"+e+"barcode_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_add",name:"Item remote add",icon:"remote_add_gh_element",url:t+"/"+e+"item_remote_add_data.js",type:"gh_element",technology:"angular"},{data_type:"item_remote_update",name:"Item remote update",icon:"remote_update_gh_element",url:t+"/"+e+"item_remote_update_data.js",type:"gh_element",technology:"angular"},{data_type:"timeline",name:"Timeline",icon:"timeline",url:t+"/"+e+"timeline_data.js",type:"gh_element",technology:"angular"},{data_type:"delete_item",name:"Delete Item",icon:"rubbish",url:t+"/"+e+"delete_action.js",type:"gh_element",technology:"angular"},{data_type:"print_doc",name:"Print document",icon:"print",url:t+"/"+e+"print_doc_action.js",type:"gh_element",technology:"angular"},{data_type:"open_item",name:"Open Item",icon:"delete",private:!0,url:t+"/"+e+"open_item_action.js",type:"gh_element",technology:"angular"},{data_type:"edit_template",name:"Edit template",icon:"delete",private:!0,url:t+"/"+e+"edit_template_action.js",type:"gh_element",technology:"angular"},{data_type:"open_app",private:!0,name:"Open App",icon:"delete",url:t+"/"+e+"open_app_action.js",type:"gh_element",technology:"angular"},{data_type:"user_settings",private:!0,name:"User Settings",icon:"delete",url:t+"/"+e+"user_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"app_sharing",name:"Sharing",icon:"sharing",url:t+"/"+e+"sharing_action.js",type:"gh_element",technology:"angular"},{data_type:"app_constructor",private:!0,name:"App constructor",icon:"app_constructor",url:t+"/"+e+"app_constructor_action.js",type:"gh_element",technology:"angular"},{data_type:"app_settings",name:"App Settings",icon:"configuration",url:t+"/"+e+"app_settings_action.js",type:"gh_element",technology:"angular"},{data_type:"export_csv",name:"Export CSV",icon:"export_csv",url:t+"/"+e+"export_csv.js",type:"gh_element",technology:"angular"},{data_type:"import_csv",name:"Import CSV",icon:"import_csv",url:t+"/"+e+"import_csv.js",type:"gh_element",technology:"angular"},{data_type:"add_items",name:"Add Items",icon:"plus",url:t+"/"+e+"add_items_action.js",type:"gh_element",technology:"angular"},{data_type:"update_items",name:"Update Items",icon:"update",url:t+"/"+e+"update_items_action.js",type:"gh_element",technology:"angular"},{data_type:"install_app",name:"Install",icon:"install",url:t+"/"+e+"install_app_action.js",type:"gh_element",technology:"angular"},{data_type:"search_action",name:"Search",icon:"search",url:t+"/"+e+"search_action.js",type:"gh_element",technology:"angular"},{data_type:"filter_table",name:"Table filter",icon:"filter",url:t+"/"+e+"filter_table_action.js",type:"gh_element",technology:"angular"},{data_type:"slider",name:"Slider",icon:"slider",url:t+"/"+e+"slider_data.js",type:"gh_element",technology:"angular"},{data_type:"clone_item",name:"Clone Item",icon:"double_plus",url:t+"/"+e+"clone_item_action.js",type:"gh_element",technology:"angular"},{data_type:"close",name:"Close",icon:"cross",url:t+"/"+e+"close_action.js",type:"gh_element",technology:"angular"},{data_type:"phone",name:"Phone",icon:"phone_thin",url:t+"/"+e+"phone_data.js",type:"gh_element",technology:"angular"},{data_type:"link",name:"Link",icon:"link_gh_element",url:t+"/"+e+"link_data.js",type:"gh_element",technology:"angular"},{data_type:"sheduling",name:"Sheduling",icon:"scheduling",url:t+"/"+e+"sheduling_data.js",type:"gh_element",technology:"angular"},{data_type:"qrcode",name:"QR Code",icon:"qr_code",url:t+"/"+e+"qrcode_data.js",type:"gh_element",technology:"angular"},{data_type:"graph2d",name:"Graph",icon:"graph",url:t+"/"+e+"graph2d_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool",name:"Quote tool",icon:"quoters",url:t+"/"+e+"quote_tool_data.js",type:"gh_element",technology:"angular"},{data_type:"cards",name:"Cards",icon:"cards",url:t+"/"+e+"cards_data.js",type:"gh_element",technology:"angular"},{data_type:"jsonConstructor",name:"Json Constructor",icon:"button",url:t+"/"+e+"json_constructor_data.js",type:"gh_element",technology:"angular"},{data_type:"button",name:"Button",icon:"button",js:"https://gudhub.com/modules/button_action/button_action.js?t=1",type:"gh_element",technology:"class"},{data_type:"editorjs",name:"EditorJS",icon:"code_editor",js:"https://gudhub.com/modules/Editor-Js/dist/main.js?t=2",css:"https://gudhub.com/modules/Editor-Js/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"filter_advanced",name:"Filter Advanced",icon:"filter_advanced",url:t+"/"+e+"filter_advanced_data.js",type:"gh_element",technology:"angular"},{data_type:"code_editor",name:"Code Editor",icon:"code_editor",url:t+"/"+e+"code_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"icon",name:"Icon",icon:"icon_gh_element",url:t+"/"+e+"icon_data.js",type:"gh_element",technology:"angular"},{data_type:"quoteRequest",name:"Quote Request",icon:"invoices",url:t+"/"+e+"quote_request_data.js",type:"gh_element",technology:"angular"},{data_type:"view_container",name:"View Container",icon:"pencil",url:t+"/"+e+"view_container_data.js",type:"gh_element",technology:"angular"},{data_type:"element_ref",name:"Element Reference",icon:"cloudSync_gh_element",url:t+"/"+e+"element_ref_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer",name:"Quote Tool Renderer",icon:"l_counter",url:t+"/"+e+"quote_tool_objects_renderer_data.js",type:"gh_element",technology:"angular"},{data_type:"quote_tool_objects_renderer_generator",name:"Quote Tool Parts Generator",icon:"l_counter_arrow",url:t+"/"+e+"quote_tool_objects_renderer_generator_data.js",type:"gh_element",technology:"angular"},{data_type:"trigger",name:"Trigger",icon:"job",url:t+"/"+e+"trigger_data.js",type:"gh_element",technology:"angular"},{data_type:"voting",name:"Voting",icon:"like_gh_element",url:t+"/"+e+"voting_data.js",type:"gh_element",technology:"angular"},{data_type:"view_tabs",name:"View Tab",icon:"tabs",url:t+"/"+e+"view_tabs.js",type:"gh_element",technology:"angular"},{data_type:"filter_tabs",name:"Filter Tabs",icon:"filter_tabs_gh_element",url:t+"/"+e+"filter_tabs.js",type:"gh_element",technology:"angular"},{data_type:"gps_coords",name:"GPS Coords",icon:"location_gh_element",url:t+"/"+e+"gps_coords.js",type:"gh_element",technology:"angular"},{data_type:"google_map",name:"Google Map",icon:"location",url:t+"/"+e+"google_map_data.js",type:"gh_element",technology:"angular"},{data_type:"data_migrations",name:"Data migrations",icon:"view_list_gh_element",url:t+"/"+e+"data_migrations.js",type:"gh_element",technology:"angular"},{data_type:"additional_settings",name:"Additional Settings",icon:"",private:!0,url:t+"/"+e+"gh_additional_settings_data.js",type:"gh_element",technology:"angular"},{data_type:"send_request",name:"Send Request",icon:"send_request_gh_element",url:t+"/"+e+"send_request_data.js",type:"gh_element",technology:"angular"},{data_type:"webcam",name:"Web camera",icon:"webcam_gh_element",url:t+"/"+e+"webcam_data.js",type:"gh_element",technology:"angular"},{data_type:"json_viewer",name:"JSON viewer",icon:"json_gh_element",url:t+"/"+e+"json_viewer_data.js",type:"gh_element",technology:"angular"},{data_type:"notifications",name:"Notifications",icon:"full_gh_element",url:t+"/"+e+"notifications_data.js",type:"gh_element",technology:"angular"},{data_type:"api",name:"API",icon:"job",url:t+"/"+e+"api_data.js",type:"gh_element",technology:"angular"},{data_type:"external_function",name:"External Function",icon:"automation_external_function",url:t+"/"+e+"external_function_data.js",type:"gh_element",technology:"angular"},{data_type:"smart_input",name:"Smart Input",icon:"roket",url:t+"/"+e+"smart_input_data.js",type:"gh_element",technology:"angular"},{data_type:"json_editor",name:"JSON Editor",icon:"code",url:t+"/"+e+"json_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"grapes_html_editor",name:"Grapes Html Editor",icon:"code_editor",url:t+"/"+e+"grapes_html_editor_data.js",type:"gh_element",technology:"angular"},{data_type:"quiz",name:"Quiz",icon:"quiz_gh_element",url:t+"/"+e+"quiz_data.js",type:"gh_element",technology:"angular"},{data_type:"password_input",name:"Password",icon:"lock_gh_element",url:t+"/"+e+"password_input_data.js",type:"gh_element",technology:"angular"},{data_type:"vs_code",name:"VS Code",icon:"code_editor",url:t+"/"+e+"vs_code_data.js",type:"gh_element",technology:"angular"},{data_type:"nested_list",name:"Nested List",icon:"scheduling",js:"https://gudhub.com/modules/Nested-List/dist/main.js?t=2",css:"https://gudhub.com/modules/Nested-List/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"countertop_smart_quote",name:"Countertop Smart Quote",icon:"quoters",url:t+"/"+e+"countertop_smart_quote_data.js",type:"gh_element",technology:"angular"},{data_type:"markdown_viewer",name:"Markdown viewer",icon:"code_editor",js:"https://gudhub.com/modules/markdown-it-gh-element/dist/main.js?t=1",css:"https://gudhub.com/modules/markdown-it-gh-element/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"html_viewer",name:"HTML Viewer",icon:"code_editor",js:"https://gudhub.com/modules/HTML-Viewer/dist/main.js?t=1",css:"https://gudhub.com/modules/HTML-Viewer/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"element_customizer",name:"Element Customizer",icon:"pencil",url:t+"/"+e+"element_customizer_data.js",type:"gh_element",technology:"angular"},{data_type:"task",name:"Task",icon:"table",url:t+"/"+e+"task_data.js",type:"gh_element",technology:"angular"},{data_type:"cron_picker",name:"Cron Picker",icon:"table",js:"https://gudhub.com/modules/Cron-Picker/dist/main.js?t=2",css:"https://gudhub.com/modules/Cron-Picker/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"balance_sheet",name:"Balance Sheet",icon:"table",js:"https://gudhub.com/modules/balance-sheet/dist/main.js?t=2",css:"https://gudhub.com/modules/balance-sheet/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"quote_form",name:"Quote Form",icon:"table",js:"https://gudhub.com/modules/countertop-quote-form/dist/main.js",css:"https://gudhub.com/modules/countertop-quote-form/dist/style.css",type:"gh_element",technology:"class"},{data_type:"static_nested_list",name:"Nested Filter",icon:"scheduling",js:"https://gudhub.com/modules/nested-filter/dist/main.js?t=1",css:"https://gudhub.com/modules/nested-filter/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"conversations",name:"Conversations",icon:"timeline",js:"https://gudhub.com/modules/conversation/dist/main.js?t=1",css:"https://gudhub.com/modules/conversation/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"study_journal",name:"Study Journal",icon:"timeline",js:"https://gudhub.com/modules/Study-Journal/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Journal/dist/style.css",type:"gh_element",technology:"class"},{data_type:"study_schedule",name:"Study Schedule",icon:"timeline",js:"https://gudhub.com/modules/Study-Schedule/dist/main.js?t=1",css:"https://gudhub.com/modules/Study-Schedule/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"avatar",name:"Avatar",icon:"user",js:"https://gudhub.com/modules/Gh-Avatar/dist/main.js?t=1",css:"https://gudhub.com/modules/Gh-Avatar/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"text_area",name:"Text Area",icon:"text_icon",js:"https://gudhub.com/modules/text-area-ghe/dist/main.js?t=3",css:"https://gudhub.com/modules/text-area-ghe/dist/style.css",type:"gh_element",technology:"class"},{data_type:"resource_calendar",name:"Resource Сalendar",icon:"calendar",url:t+"/"+e+"resource_calendar_data.js",type:"gh_element",technology:"angular"},{data_type:"visualizer_with_control_panel",name:"Visualizer With Control Panel",icon:"visualizer",url:t+"/"+e+"visualizer_with_control_panel_data.js",type:"gh_element",technology:"angular"},{data_type:"svg_to_pdf",name:"SVG To PDF",icon:"box",js:"https://gudhub.com/modules/SVG-to-PDF-Gh-Element/dist/main.js",css:"https://gudhub.com/modules/SVG-to-PDF-Gh-Element/dist/style.css",type:"gh_element",technology:"class"},{data_type:"recycle_bin",name:"Recycle Bin",icon:"recycle_bin",url:t+"/"+e+"recycle_bin_data.js",type:"gh_element",technology:"angular"},{data_type:"API",name:"API",url:t+"/"+a+"api_node.js",type:"automation",icon:"automation_api",private:!0},{data_type:"ExternalFunction",name:"External Function",url:t+"/"+a+"external_function_node.js",type:"automation",icon:"automation_external_function"},{data_type:"Function",name:"Function",url:t+"/"+a+"function_node.js",type:"automation",icon:"automation_function",private:!0},{data_type:"Return",name:"Return",url:t+"/"+a+"return_node.js",type:"automation",icon:"automation_return",private:!0},{data_type:"ChatGPTThread",name:"ChatGPT Thread",url:t+"/"+a+"chat_gpt_thread_node.js",type:"automation",icon:"automation_chat_gpt_thread"},{data_type:"Calculator",name:"Calculator",url:t+"/"+a+"calculator.js",type:"automation",icon:"automation_calculator"},{data_type:"CompareItems",name:"Compare Items",url:t+"/"+a+"compare_items.js",type:"automation",icon:"automation_compare_items"},{data_type:"Constants",name:"Constants",url:t+"/"+a+"constants.js",type:"automation",icon:"automation_constants"},{data_type:"CreateFiles",name:"Create Files",url:t+"/"+a+"create_files.js",type:"automation",icon:"automation_create_files"},{data_type:"CreateItemsApi",name:"Create Items Api",url:t+"/"+a+"create_item_api.js",type:"automation",icon:"automation_create_items_api"},{data_type:"FileDuplicate",name:"File Duplicate",url:t+"/"+a+"file_duplicate.js",type:"automation",icon:"automation_file_duplicate"},{data_type:"Filter",name:"Filter",url:t+"/"+a+"filter_node.js",type:"automation",icon:"filter"},{data_type:"GetItemByItemRef",name:"Get Item By Item Ref",url:t+"/"+a+"get_item_by_item_ref.js",type:"automation",icon:"automation_get_item_by_item_ref"},{data_type:"GetItems",name:"Get Items",url:t+"/"+a+"get_items.js",type:"automation",icon:"automation_get_items"},{data_type:"GhElementNode",name:"Gh Element Node",url:t+"/"+a+"gh_element_node.js",type:"automation",icon:"automation_gh_element_node",private:!0,created_for:["GhElement"]},{data_type:"IfCondition",name:"If Condition",url:t+"/"+a+"if_condition.js",type:"automation",icon:"automation_if_condition"},{data_type:"ItemConstructor",name:"Item Constructor",url:t+"/"+a+"item_constructor.js",type:"automation",icon:"automation_item_constructor"},{data_type:"ItemDestructor",name:"Item Destructor",url:t+"/"+a+"item_destructor.js",type:"automation",icon:"automation_item_destructor"},{data_type:"JSONScheme",name:"JSON Scheme",url:t+"/"+a+"json_scheme.js",type:"automation",icon:"automation_json_scheme"},{data_type:"MergeItems",name:"Merge Items",url:t+"/"+a+"merge_items.js",type:"automation",icon:"automation_merge_items"},{data_type:"MessageConstructor",name:"Message Constructor",url:t+"/"+a+"message_constructor.js",type:"automation",icon:"automation_message_constructor"},{data_type:"ObjectToItem",name:"Object To Item",url:t+"/"+a+"obj_to_item.js",type:"automation",icon:"automation_object_to_item"},{data_type:"ObjectConstructor",name:"Object Constructor",url:t+"/"+a+"object_constructor.js",type:"automation",icon:"automation_object_constructor"},{data_type:"ObjectDestructor",name:"Object Destructor",url:t+"/"+a+"object_destructor.js",type:"automation",icon:"automation_object_destructor"},{data_type:"PopulateElement",name:"Populate Element",url:t+"/"+a+"populate_element.js",type:"automation",icon:"automation_populate_element",private:!0,created_for:["GhElement"]},{data_type:"PopulateItems",name:"Populate Items",url:t+"/"+a+"populate_items.js",type:"automation",icon:"automation_populate_items"},{data_type:"PopulateWithDate",name:"Populate With Date",url:t+"/"+a+"populate_with_date.js",type:"automation",icon:"automation_populate_with_date"},{data_type:"PopulateWithItemRef",name:"Populate with Item Ref",url:t+"/"+a+"populate_with_item_ref.js",type:"automation",icon:"automation_populate_with_item_ref"},{data_type:"PopUpForm",name:"Pop Up Form",url:t+"/"+a+"popup_form.js",type:"automation",icon:"automation_pop_up_form",private:!0,created_for:["Quiz","GhElement","SmartInput","Iterator"]},{data_type:"QuizForm",name:"Quiz Form",url:t+"/"+a+"quiz_form.js",type:"automation",icon:"automation_quiz_form",private:!0,created_for:["Quiz"]},{data_type:"QuizNode",name:"Quiz Node",url:t+"/"+a+"quiz_node.js",type:"automation",icon:"automation_quiz_node",private:!0},{data_type:"Request",name:"Request",url:t+"/"+a+"request_node.js",type:"automation",icon:"automation_request"},{data_type:"Response",name:"Response",url:t+"/"+a+"response_node.js",type:"automation",icon:"automation_response",private:!0,created_for:["API"]},{data_type:"SmartInput",name:"Smart Input",url:t+"/"+a+"smart_input.js",type:"automation",icon:"automation_smart_input",private:!0},{data_type:"Trigger",name:"Trigger",url:t+"/"+a+"trigger_node.js",type:"automation",icon:"automation_trigger",private:!0},{data_type:"TwilioSMS",name:"Twilio SMS",url:t+"/"+a+"twilio_sms.js",type:"automation",icon:"automation_twilio"},{data_type:"TwilioAuth",name:"Twilio Auth",url:t+"/"+a+"twilio_auth.js",type:"automation",icon:"table"},{data_type:"TwilioDevice",name:"Twilio Device",url:t+"/"+a+"twilio_device.js",type:"automation",icon:"table"},{data_type:"UpdateItemsApi",name:"Update Items Api",url:t+"/"+a+"update_items_api.js",type:"automation",icon:"automation_update_items_api"},{data_type:"GoogleCalendar",name:"Google Calendar",url:t+"/"+a+"google_calendar.js",type:"automation",icon:"calendar"},{data_type:"VerifyEmail",name:"Verify email",url:t+"/"+a+"verify_email.js",type:"automation",icon:"check_in_circle"},{data_type:"Iterator",name:"Iterator",url:t+"/"+a+"iterator.js",type:"automation",icon:"update"},{data_type:"IteratorInput",name:"Iterator Input",url:t+"/"+a+"iterator_input.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"IteratorOutput",name:"Iterator Output",url:t+"/"+a+"iterator_output.js",type:"automation",icon:"arrow_right",private:!0},{data_type:"SendEmail",name:"Send email",url:t+"/"+a+"send_email.js",type:"automation",icon:"email"},{data_type:"FileReader",name:"File Reader",url:t+"/"+a+"file_reader.js",type:"automation",icon:"file"},{data_type:"WebsitesChecker",name:"Websites Checker",url:t+"/"+a+"websites_checker.js",type:"automation",icon:"world"},{data_type:"VoiceMachineDetection",name:"Voice Machine Detection",url:t+"/"+a+"voice_machine_detection.js",type:"automation",icon:"automation_calculator"},{data_type:"Task",name:"Task",url:t+"/"+a+"task.js",type:"automation",icon:"automation_calculator",private:!0},{data_type:"DeleteItems",name:"Delete Items",url:t+"/"+a+"delete_items.js",type:"automation",icon:"rubbish"},{data_type:"GoToItem",name:"Go To Item",url:t+"/"+a+"go_to_item.js",type:"automation",icon:"cursor_point"},{data_type:"FireWorks",name:"Fire Works",url:t+"/"+a+"fireworks_node.js",type:"automation",icon:"weeding_party"},{data_type:"SendMessage",name:"Send Message",url:t+"/"+a+"send_message.js",type:"automation",icon:"speech_bubble"},{data_type:"TurboSMS",name:"Turbo SMS",url:t+"/"+a+"turbo_sms.js",type:"automation",icon:"email"},{data_type:"JsCode",name:"Js Code",url:t+"/"+a+"js_code.js",type:"automation",icon:"code_editor"}]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
157
169
  },{}],"CSHe":[function(require,module,exports) {
158
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Storage=void 0;var t=e(require("./ModulesList.js"));function e(t){return t&&t.__esModule?t:{default:t}}function r(t){return(r="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 n(t){return u(t)||a(t)||o(t)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t,e){if(t){if("string"==typeof t)return s(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function a(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function u(t){if(Array.isArray(t))return s(t)}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function c(){c=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:S(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function _(){}var L={};f(L,u,function(){return this});var O=Object.getPrototypeOf,x=O&&O(O(N([])));x&&x!==n&&i.call(x,u)&&(L=x);var j=_.prototype=b.prototype=Object.create(L);function k(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){function n(o,a,u,s){var c=h(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==r(f)&&i.call(f,"__await")?e.resolve(f.__await).then(function(t){n("next",t,u,s)},function(t){n("throw",t,u,s)}):e.resolve(f).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,s)})}s(c.arg)}var a;o(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,i){n(t,r,e,i)})}return a=a?a.then(i,i):i()}})}function S(e,r,n){var i=y;return function(o,a){if(i===d)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var s=P(u,n);if(s){if(s===g)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===y)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?m:v,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=m,n.method="throw",n.arg=c.arg)}}}function P(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(r(e)+" is not iterable")}return w.prototype=_,o(j,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:w,configurable:!0}),w.displayName=f(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,f(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},k(E.prototype),f(E.prototype,s,function(){return this}),e.AsyncIterator=E,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new E(p(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(j),f(j,l,"Generator"),f(j,u,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return u.type="throw",u.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;I(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function l(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){l(o,n,i,a,u,"next",t)}function u(t){l(o,n,i,a,u,"throw",t)}a(void 0)})}}function p(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 h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach(function(e){y(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function y(t,e,r){return(e=g(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,g(n.key),n)}}function m(t,e,r){return e&&d(t.prototype,e),r&&d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function g(t){var e=b(t,"string");return"symbol"==r(e)?e:e+""}function b(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var w=exports.Storage=function(){return m(function e(r,n,i){v(this,e),this.apps_list=[],this.users_list=[],this.user={},this.modulesList=(0,t.default)(r,n,i),this.ghComponentsPromises=[]},[{key:"getMainStorage",value:function(){return this}},{key:"getAppsList",value:function(){return this.apps_list}},{key:"getUser",value:function(){return this.user}},{key:"getUsersList",value:function(){return this.users_list}},{key:"getModulesList",value:function(t,e,r){return void 0===t?this.modulesList:0==e?this.modulesList.filter(function(e){return e.created_for?e.type===t&&e.private&&e.created_for.includes(r):e.type===t&&!e.private}):this.modulesList.filter(function(e){return e.type===t})}},{key:"getModuleUrl",value:function(t){return this.modulesList.find(function(e){return e.data_type==t})}},{key:"setUser",value:function(t){this.user=t,this.users_list.push(t)}},{key:"updateUser",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.avatar_128&&(t.avatar_128=t.avatar_128+"?"+(new Date).getTime()),t.avatar_512&&(t.avatar_512=t.avatar_512+"?"+(new Date).getTime()),this.user=h(h({},this.user),t),this.users_list=this.users_list.filter(function(e){return e.user_id!=t.user_id}),this.users_list.push(this.user)}},{key:"unsetUser",value:function(){this.user={}}},{key:"getApp",value:function(t){for(var e=0;e<this.apps_list.length;e++)if(this.apps_list[e].app_id==t)return this.apps_list[e]}},{key:"unsetApps",value:function(){this.apps_list=[]}},{key:"updateApp",value:function(t){return this.apps_list=this.apps_list.map(function(e){return e.app_id==t.app_id?t:e}),this.apps_list}},{key:"deleteApp",value:function(t){return this.apps_list=this.apps_list.filter(function(e){return e.app_id!=t}),this.apps_list}},{key:"updateItemsInApp",value:function(){var t=f(c().mark(function t(e,r){var n;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getApp(r);case 2:return(n=t.sent)&&(n.items_list=updateItems(e,n.items_list,this.pipeService.emit.bind(this.pipeService),r),this.updateApp(n)),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"addItemsToApp",value:function(){var t=f(c().mark(function t(e,r){var i,o;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getApp(r);case 2:return(i=t.sent)&&((o=i.items_list).push.apply(o,n(e)),this.updateApp(i),this.pipeService.emit("gh_items_update",{app_id:r},e)),t.abrupt("return",i);case 5:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"deleteItemsInApp",value:function(){var t=f(c().mark(function t(e,r){var n;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getApp(r);case 2:return(n=t.sent)&&(n.items_list=n.items_list.filter(function(t){return!e.find(function(e){return e.item_id==t.item_id})}),this.updateApp(n)),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()}])}();
170
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Storage=void 0;var t=e(require("./ModulesList.js"));function e(t){return t&&t.__esModule?t:{default:t}}function r(t){return(r="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 n(t){return s(t)||u(t)||o(t)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function u(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function s(t){if(Array.isArray(t))return a(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function c(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var a=n&&n.prototype instanceof s?n:s,c=Object.create(a.prototype);return p(c,"_invoke",function(r,n,i){var o,s,a,c=0,p=i||[],f=!1,l={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return o=e,s=0,a=t,l.n=r,u}};function y(r,n){for(s=r,a=n,e=0;!f&&c&&!i&&e<p.length;e++){var i,o=p[e],y=l.p,v=o[2];r>3?(i=v===n)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=t):o[0]<=y&&((i=r<2&&y<o[1])?(s=0,l.v=n,l.n=o[1]):y<v&&(i=r<3||o[0]>n||n>v)&&(o[4]=r,o[5]=n,l.n=v,s=0))}if(i||r>1)return u;throw f=!0,n}return function(i,p,v){if(c>1)throw TypeError("Generator is already running");for(f&&1===p&&y(p,v),s=p,a=v;(e=s<2?t:a)||!f;){o||(s?s<3?(s>1&&(l.n=-1),y(s,a)):l.n=a:l.v=a);try{if(c=2,o){if(s||(i="next"),e=o[i]){if(!(e=e.call(o,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,s<2&&(s=0)}else 1===s&&(e=o.return)&&e.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=t}else if((e=(f=l.n<0)?a:r.call(n,l))!==u)break}catch(e){o=t,s=1,a=e}finally{c=1}}return{value:e,done:f}}}(r,i,o),!0),c}var u={};function s(){}function a(){}function f(){}e=Object.getPrototypeOf;var l=[][n]?e(e([][n]())):(p(e={},n,function(){return this}),e),y=f.prototype=s.prototype=Object.create(l);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,p(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t}return a.prototype=f,p(y,"constructor",f),p(f,"constructor",a),a.displayName="GeneratorFunction",p(f,i,"GeneratorFunction"),p(y),p(y,i,"Generator"),p(y,n,function(){return this}),p(y,"toString",function(){return"[object Generator]"}),(c=function(){return{w:o,m:v}})()}function p(t,e,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}(p=function(t,e,r,n){if(e)i?i(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r;else{var o=function(e,r){p(t,e,function(t){return this._invoke(e,r,t)})};o("next",0),o("throw",1),o("return",2)}})(t,e,r,n)}function f(t,e,r,n,i,o,u){try{var s=t[o](u),a=s.value}catch(t){return void r(t)}s.done?e(a):Promise.resolve(a).then(n,i)}function l(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function u(t){f(o,n,i,u,s,"next",t)}function s(t){f(o,n,i,u,s,"throw",t)}u(void 0)})}}function y(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 v(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach(function(e){h(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function h(t,e,r){return(e=_(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_(n.key),n)}}function b(t,e,r){return e&&m(t.prototype,e),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function _(t){var e=g(t,"string");return"symbol"==r(e)?e:e+""}function g(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var O=exports.Storage=function(){return b(function e(r,n,i){d(this,e),this.apps_list=[],this.users_list=[],this.user={},this.modulesList=(0,t.default)(r,n,i),this.ghComponentsPromises=[]},[{key:"getMainStorage",value:function(){return this}},{key:"getAppsList",value:function(){return this.apps_list}},{key:"getUser",value:function(){return this.user}},{key:"getUsersList",value:function(){return this.users_list}},{key:"getModulesList",value:function(t,e,r){return void 0===t?this.modulesList:0==e?this.modulesList.filter(function(e){return e.created_for?e.type===t&&e.private&&e.created_for.includes(r):e.type===t&&!e.private}):this.modulesList.filter(function(e){return e.type===t})}},{key:"getModuleUrl",value:function(t){return this.modulesList.find(function(e){return e.data_type==t})}},{key:"setUser",value:function(t){this.user=t,this.users_list.push(t)}},{key:"updateUser",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.avatar_128&&(t.avatar_128=t.avatar_128+"?"+(new Date).getTime()),t.avatar_512&&(t.avatar_512=t.avatar_512+"?"+(new Date).getTime()),this.user=v(v({},this.user),t),this.users_list=this.users_list.filter(function(e){return e.user_id!=t.user_id}),this.users_list.push(this.user)}},{key:"unsetUser",value:function(){this.user={}}},{key:"getApp",value:function(t){for(var e=0;e<this.apps_list.length;e++)if(this.apps_list[e].app_id==t)return this.apps_list[e]}},{key:"unsetApps",value:function(){this.apps_list=[]}},{key:"updateApp",value:function(t){return this.apps_list=this.apps_list.map(function(e){return e.app_id==t.app_id?t:e}),this.apps_list}},{key:"deleteApp",value:function(t){return this.apps_list=this.apps_list.filter(function(e){return e.app_id!=t}),this.apps_list}},{key:"updateItemsInApp",value:function(){var t=l(c().m(function t(e,r){var n;return c().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.getApp(r);case 1:return(n=t.v)&&(n.items_list=updateItems(e,n.items_list,this.pipeService.emit.bind(this.pipeService),r),this.updateApp(n)),t.a(2,n)}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"addItemsToApp",value:function(){var t=l(c().m(function t(e,r){var i,o;return c().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.getApp(r);case 1:return(i=t.v)&&((o=i.items_list).push.apply(o,n(e)),this.updateApp(i),this.pipeService.emit("gh_items_update",{app_id:r},e)),t.a(2,i)}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"deleteItemsInApp",value:function(){var t=l(c().m(function t(e,r){var n;return c().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.getApp(r);case 1:return(n=t.v)&&(n.items_list=n.items_list.filter(function(t){return!e.find(function(e){return e.item_id==t.item_id})}),this.updateApp(n)),t.a(2,n)}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()}])}();
159
171
  },{"./ModulesList.js":"FJWL"}],"p58b":[function(require,module,exports) {
160
172
  "use strict";module.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};
161
173
  },{}],"pHMV":[function(require,module,exports) {
162
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketApi=void 0;var t=e(require("ws"));function e(t){return t&&t.__esModule?t:{default:t}}function r(){r=function(){return e};var t,e={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",u=c.asyncIterator||"@@asyncIterator",h=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),c=new P(n||[]);return a(i,"_invoke",{value:O(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var v="suspendedStart",y="suspendedYield",d="executing",w="completed",m={};function g(){}function b(){}function k(){}var x={};f(x,s,function(){return this});var E=Object.getPrototypeOf,L=E&&E(E(H([])));L&&L!==n&&o.call(L,s)&&(x=L);var _=k.prototype=g.prototype=Object.create(x);function S(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function T(t,e){function r(n,a,c,s){var u=p(t[n],t,a);if("throw"!==u.type){var h=u.arg,f=h.value;return f&&"object"==i(f)&&o.call(f,"__await")?e.resolve(f.__await).then(function(t){r("next",t,c,s)},function(t){r("throw",t,c,s)}):e.resolve(f).then(function(t){h.value=t,c(h)},function(t){return r("throw",t,c,s)})}s(u.arg)}var n;a(this,"_invoke",{value:function(t,o){function i(){return new e(function(e,n){r(t,o,e,n)})}return n=n?n.then(i,i):i()}})}function O(e,r,n){var o=v;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===w){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var s=j(c,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=w,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var u=p(e,r,n);if("normal"===u.type){if(o=n.done?w:y,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=w,n.method="throw",n.arg=u.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function B(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(B,this),this.reset(!0)}function H(e){if(e||""===e){var r=e[s];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function r(){for(;++n<e.length;)if(o.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(i(e)+" is not iterable")}return b.prototype=k,a(_,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:b,configurable:!0}),b.displayName=f(k,h,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,f(t,h,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(T.prototype),f(T.prototype,u,function(){return this}),e.AsyncIterator=T,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new T(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(_),f(_,h,"Generator"),f(_,s,function(){return this}),f(_,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=H,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:H(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function n(t,e,r,n,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise(function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,s,"next",t)}function s(t){n(a,o,i,c,s,"throw",t)}c(void 0)})}}function i(t){return(i="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 a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function s(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=h(t,"string");return"symbol"==i(e)?e:e+""}function h(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var f=exports.WebSocketApi=function(){return s(function t(e,r){a(this,t),this.websocket=null,this.connected=!1,this.queue=[],this.url=e,this.auth=r,this.heartBeatTimeStemp=1e13,this.ALLOWED_HEART_BEAT_DELEY=12e3,this.firstHeartBeat=!0,this.reload=!0,this.isBrowser=!["undefined"==typeof window?"undefined":i(window),"undefined"==typeof document?"undefined":i(document)].includes("undefined")},[{key:"addSubscription",value:function(){var t=o(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.auth.getToken();case 2:n=t.sent,o="token=".concat(n,"/~/app_id=").concat(e),this.connected&&this.websocket.send(o),this.queue.push(e);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"onOpen",value:function(){var t=o(r().mark(function t(){var e,n=this;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.reload=!0,console.log("websocket opened"),this.connected=!0,t.next=5,this.auth.getToken();case 5:e=t.sent,this.queue.forEach(function(t){var r="token=".concat(e,"/~/app_id=").concat(t);n.websocket.send(r)});case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"onError",value:function(t){console.log("websocket error: ",t),this.websocket.close()}},{key:"onClose",value:function(){console.log("websocket close"),this.connected=!1;try{this.initWebSocket(this.onMassageHandler,this.refreshAppsHandler)}catch(t){console.log(t)}}},{key:"onMessage",value:function(){var t=o(r().mark(function t(e){var n,o,i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(n=this.isBrowser?e.data:e).match(/HeartBeat/)){t.next=10;break}if(o=(new Date).getTime()-this.heartBeatTimeStemp,!(this.ALLOWED_HEART_BEAT_DELEY<o)){t.next=8;break}return t.next=6,this.onConnectionLost();case 6:t.next=10;break;case 8:this.websocket.send("HeartBeat"),this.heartBeatTimeStemp=(new Date).getTime();case 10:if(this.firstHeartBeat&&(this.connectionChecker(),this.firstHeartBeat=!1),!n.match(/[{}]/)){t.next=17;break}return i=JSON.parse(n),t.next=15,this.auth.getToken();case 15:a=t.sent,i.token!=a&&this.onMassageHandler(i);case 17:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"initWebSocket",value:function(e,r){this.onMassageHandler=e,this.refreshAppsHandler=r,this.isBrowser?(this.websocket=new WebSocket(this.url),this.websocket.onopen=this.onOpen.bind(this),this.websocket.onerror=this.onError.bind(this),this.websocket.onclose=this.onClose.bind(this),this.websocket.onmessage=this.onMessage.bind(this)):(this.websocket=new t.default(this.url),this.websocket.on("open",this.onOpen),this.websocket.on("error",this.onError),this.websocket.on("close",this.onClose),this.websocket.on("message",this.onMessage)),console.log("websocket initialized")}},{key:"connectionChecker",value:function(){var t=this;setInterval(o(r().mark(function e(){var n;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(new Date).getTime()-t.heartBeatTimeStemp,!(t.ALLOWED_HEART_BEAT_DELEY<n)){e.next=4;break}return e.next=4,t.onConnectionLost();case 4:case"end":return e.stop()}},e)})),1e3)}},{key:"onConnectionLost",value:function(){var t=o(r().mark(function t(){return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.auth.getVersion();case 3:this.reload&&(this.reload=!1,console.log("Connected"),this.heartBeatTimeStemp=1e13,this.websocket.close()),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.log(t.t0);case 9:case"end":return t.stop()}},t,this,[[0,6]])}));return function(){return t.apply(this,arguments)}}()}])}();
174
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketApi=void 0;var e=t(require("ws"));function t(e){return e&&e.__esModule?e:{default:e}}function n(){var e,t,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.toStringTag||"@@toStringTag";function c(n,o,i,s){var c=o&&o.prototype instanceof u?o:u,f=Object.create(c.prototype);return r(f,"_invoke",function(n,r,o){var i,s,c,u=0,f=o||[],h=!1,l={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,s=0,c=e,l.n=n,a}};function p(n,r){for(s=n,c=r,t=0;!h&&u&&!o&&t<f.length;t++){var o,i=f[t],p=l.p,b=i[2];n>3?(o=b===r)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(s=0,l.v=r,l.n=i[1]):p<b&&(o=n<3||i[0]>r||r>b)&&(i[4]=n,i[5]=r,l.n=b,s=0))}if(o||n>1)return a;throw h=!0,r}return function(o,f,b){if(u>1)throw TypeError("Generator is already running");for(h&&1===f&&p(f,b),s=f,c=b;(t=s<2?e:c)||!h;){i||(s?s<3?(s>1&&(l.n=-1),p(s,c)):l.n=c:l.v=c);try{if(u=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(h=l.n<0)?c:n.call(r,l))!==a)break}catch(t){i=e,s=1,c=t}finally{u=1}}return{value:t,done:h}}}(n,i,s),!0),f}var a={};function u(){}function f(){}function h(){}t=Object.getPrototypeOf;var l=[][i]?t(t([][i]())):(r(t={},i,function(){return this}),t),p=h.prototype=u.prototype=Object.create(l);function b(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,r(e,s,"GeneratorFunction")),e.prototype=Object.create(p),e}return f.prototype=h,r(p,"constructor",h),r(h,"constructor",f),f.displayName="GeneratorFunction",r(h,s,"GeneratorFunction"),r(p),r(p,s,"Generator"),r(p,i,function(){return this}),r(p,"toString",function(){return"[object Generator]"}),(n=function(){return{w:c,m:b}})()}function r(e,t,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(r=function(e,t,n,o){if(t)i?i(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n;else{var s=function(t,n){r(e,t,function(e){return this._invoke(t,n,e)})};s("next",0),s("throw",1),s("return",2)}})(e,t,n,o)}function o(e,t,n,r,o,i,s){try{var c=e[i](s),a=c.value}catch(e){return void n(e)}c.done?t(a):Promise.resolve(a).then(r,o)}function i(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var s=e.apply(t,n);function c(e){o(s,r,i,c,a,"next",e)}function a(e){o(s,r,i,c,a,"throw",e)}c(void 0)})}}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function u(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=h(e,"string");return"symbol"==s(t)?t:t+""}function h(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var l=exports.WebSocketApi=function(){return u(function e(t,n){c(this,e),this.websocket=null,this.connected=!1,this.queue=[],this.url=t,this.auth=n,this.heartBeatTimeStemp=1e13,this.ALLOWED_HEART_BEAT_DELEY=12e3,this.firstHeartBeat=!0,this.reload=!0,this.isBrowser=!["undefined"==typeof window?"undefined":s(window),"undefined"==typeof document?"undefined":s(document)].includes("undefined")},[{key:"addSubscription",value:function(){var e=i(n().m(function e(t){var r,o;return n().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.auth.getToken();case 1:r=e.v,o="token=".concat(r,"/~/app_id=").concat(t),this.connected&&this.websocket.send(o),this.queue.push(t);case 2:return e.a(2)}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"onOpen",value:function(){var e=i(n().m(function e(){var t,r=this;return n().w(function(e){for(;;)switch(e.n){case 0:return this.reload=!0,console.log("websocket opened"),this.connected=!0,e.n=1,this.auth.getToken();case 1:t=e.v,this.queue.forEach(function(e){var n="token=".concat(t,"/~/app_id=").concat(e);r.websocket.send(n)});case 2:return e.a(2)}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"onError",value:function(e){console.log("websocket error: ",e),this.websocket.close()}},{key:"onClose",value:function(){console.log("websocket close"),this.connected=!1;try{this.initWebSocket(this.onMassageHandler,this.refreshAppsHandler)}catch(e){console.log(e)}}},{key:"onMessage",value:function(){var e=i(n().m(function e(t){var r,o,i,s;return n().w(function(e){for(;;)switch(e.n){case 0:if(!(r=this.isBrowser?t.data:t).match(/HeartBeat/)){e.n=3;break}if(o=(new Date).getTime()-this.heartBeatTimeStemp,!(this.ALLOWED_HEART_BEAT_DELEY<o)){e.n=2;break}return e.n=1,this.onConnectionLost();case 1:e.n=3;break;case 2:this.websocket.send("HeartBeat"),this.heartBeatTimeStemp=(new Date).getTime();case 3:if(this.firstHeartBeat&&(this.connectionChecker(),this.firstHeartBeat=!1),!r.match(/[{}]/)){e.n=5;break}return i=JSON.parse(r),e.n=4,this.auth.getToken();case 4:s=e.v,i.token!=s&&this.onMassageHandler(i);case 5:return e.a(2)}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"initWebSocket",value:function(t,n){this.onMassageHandler=t,this.refreshAppsHandler=n,this.isBrowser?(this.websocket=new WebSocket(this.url),this.websocket.onopen=this.onOpen.bind(this),this.websocket.onerror=this.onError.bind(this),this.websocket.onclose=this.onClose.bind(this),this.websocket.onmessage=this.onMessage.bind(this)):(this.websocket=new e.default(this.url),this.websocket.on("open",this.onOpen),this.websocket.on("error",this.onError),this.websocket.on("close",this.onClose),this.websocket.on("message",this.onMessage)),console.log("websocket initialized")}},{key:"connectionChecker",value:function(){var e=this;setInterval(i(n().m(function t(){var r;return n().w(function(t){for(;;)switch(t.n){case 0:if(r=(new Date).getTime()-e.heartBeatTimeStemp,!(e.ALLOWED_HEART_BEAT_DELEY<r)){t.n=1;break}return t.n=1,e.onConnectionLost();case 1:return t.a(2)}},t)})),1e3)}},{key:"onConnectionLost",value:function(){var e=i(n().m(function e(){var t;return n().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,this.auth.getVersion();case 1:this.reload&&(this.reload=!1,console.log("Connected"),this.heartBeatTimeStemp=1e13,this.websocket.close()),e.n=3;break;case 2:e.p=2,t=e.v,console.log(t);case 3:return e.a(2)}},e,this,[[0,2]])}));return function(){return e.apply(this,arguments)}}()}])}();
163
175
  },{"ws":"p58b"}],"TPH7":[function(require,module,exports) {
164
176
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.wss_url=exports.server_url=exports.port=exports.node_server_url=exports.file_server_url=exports.automation_modules_path=exports.async_modules_path=void 0;var e=exports.server_url="https://gudhub.com/GudHub_Test",s=exports.wss_url="wss://gudhub.com/GudHub/ws/app/",r=exports.node_server_url="https://gudhub.com/api/services/prod",t=exports.async_modules_path="build/latest/async_modules_node/",o=exports.automation_modules_path="build/latest/automation_modules/",u=exports.file_server_url="https://gudhub.com",p=exports.port=9e3;
165
177
  },{}],"DvAj":[function(require,module,exports) {
166
- "use strict";function t(r){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})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(e){s=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,a=Object.create(o.prototype),u=new G(n||[]);return i(a,"_invoke",{value:O(t,e,u)}),a}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function b(){}function w(){}function _(){}var x={};s(x,c,function(){return this});var L=Object.getPrototypeOf,E=L&&L(L(I([])));E&&E!==o&&a.call(E,c)&&(x=E);var S=_.prototype=b.prototype=Object.create(x);function k(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function A(r,e){function n(o,i,u,c){var l=p(r[o],r,i);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==t(s)&&a.call(s,"__await")?e.resolve(s.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(s).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,c)})}c(l.arg)}var o;i(this,"_invoke",{value:function(t,r){function a(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(a,a):a()}})}function O(t,r,n){var o=y;return function(a,i){if(o===d)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=p(t,r,n);if("normal"===l.type){if(o=n.done?g:v,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=g,n.method="throw",n.arg=l.arg)}}}function j(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,j(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=p(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function M(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function P(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function I(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,i=function t(){for(;++o<r.length;)if(a.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return i.next=i}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=_,i(S,"constructor",{value:_,configurable:!0}),i(_,"constructor",{value:w,configurable:!0}),w.displayName=s(_,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,s(t,f,"GeneratorFunction")),t.prototype=Object.create(S),t},n.awrap=function(t){return{__await:t}},k(A.prototype),s(A.prototype,l,function(){return this}),n.AsyncIterator=A,n.async=function(t,r,e,o,a){void 0===a&&(a=Promise);var i=new A(h(t,r,e,o),a);return n.isGeneratorFunction(r)?i:i.next().then(function(t){return t.done?t.value:i.next()})},k(S),s(S,f,"Generator"),s(S,c,function(){return this}),s(S,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=I,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),P(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;P(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t){return a(t)||o(t)||u(t)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function a(t){if(Array.isArray(t))return c(t)}function i(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=u(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==e.return||e.return()}finally{if(c)throw a}}}}function u(t,r){if(t){if("string"==typeof t)return c(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?c(t,r):void 0}}function c(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function l(t,r,e,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function f(t){return function(){var r=this,e=arguments;return new Promise(function(n,o){var a=t.apply(r,e);function i(t){l(a,n,o,i,u,"next",t)}function u(t){l(a,n,o,i,u,"throw",t)}i(void 0)})}}function s(t,r,e){return h.apply(this,arguments)}function h(){return(h=f(r().mark(function t(n,o,a){var u,c,l,f,s,h,p,y,v,d,g,m,b,w,_,x=arguments;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(_=function(t){return new Promise(function(r){a.on("gh_value_get",t,function e(n,o){a.destroy("gh_value_get",t,e),r(o)}).emit("gh_value_get",{},t)})},u=x.length>3&&void 0!==x[3]?x[3]:{},c=[],l={variableMethodcurrent_app:function(){return[u.current_app_id||u.app_id]},variableMethodelement_app:function(){return[u.element_app_id]},variableMethodcurrent_item:function(){return["".concat(u.current_app_id||u.app_id,".").concat(u.item_id)]},variableMethoduser_id:function(){return[o.getUser().user_id]},variableMethoduser_email:function(t){return[o.getUser().username]},variableMethodtoday:function(t){var r=new Date,e=new Date(r.getFullYear(),r.getMonth(),r.getDate()),n=new Date(r.getFullYear(),r.getMonth(),r.getDate()+1);return[e.valueOf().toString()+":"+n.valueOf().toString()]},variableMethodvariable:function(t){return[u[t]]}},!n){t.next=40;break}f=i(n),t.prev=6,f.s();case 8:if((s=f.n()).done){t.next=32;break}if(!(h=s.value)){t.next=29;break}t.t0=h.input_type,t.next="variable"===t.t0?14:"field"===t.t0?19:25;break;case 14:h.valuesArray=[],p=i(null==h?void 0:h.input_value.split(","));try{for(p.s();!(y=p.n()).done;)v=y.value,d=h.input_type+"Method"+v,"function"==typeof(g=l[d])?h.valuesArray?(m=h.valuesArray).push.apply(m,e(g())):h.valuesArray=g():h.valuesArray?(b=h.valuesArray).push.apply(b,e(l.variableMethodvariable(v))):h.valuesArray=l.variableMethodvariable(v)}catch(r){p.e(r)}finally{p.f()}return c.push(h),t.abrupt("break",27);case 19:return t.next=21,_({app_id:u.current_app_id||u.app_id,item_id:u.item_id,field_id:h.input_value});case 21:return null!=(w=t.sent)&&h.valuesArray.push(w),c.push(h),t.abrupt("break",27);case 25:return c.push(h),t.abrupt("break",27);case 27:t.next=30;break;case 29:c.push(h);case 30:t.next=8;break;case 32:t.next=37;break;case 34:t.prev=34,t.t1=t.catch(6),f.e(t.t1);case 37:return t.prev=37,f.f(),t.finish(37);case 40:return t.abrupt("return",c);case 41:case"end":return t.stop()}},t,null,[[6,34,37,40]])}))).apply(this,arguments)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.filterPreparation=s;
178
+ "use strict";function e(){var r,n,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function u(e,o,a,i){var u=o&&o.prototype instanceof l?o:l,f=Object.create(u.prototype);return t(f,"_invoke",function(e,t,o){var a,i,u,l=0,f=o||[],p=!1,s={p:0,n:0,v:r,a:v,f:v.bind(r,4),d:function(e,t){return a=e,i=0,u=r,s.n=t,c}};function v(e,t){for(i=e,u=t,n=0;!p&&l&&!o&&n<f.length;n++){var o,a=f[n],v=s.p,y=a[2];e>3?(o=y===t)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=r):a[0]<=v&&((o=e<2&&v<a[1])?(i=0,s.v=t,s.n=a[1]):v<y&&(o=e<3||a[0]>t||t>y)&&(a[4]=e,a[5]=t,s.n=y,i=0))}if(o||e>1)return c;throw p=!0,t}return function(o,f,y){if(l>1)throw TypeError("Generator is already running");for(p&&1===f&&v(f,y),i=f,u=y;(n=i<2?r:u)||!p;){a||(i?i<3?(i>1&&(s.n=-1),v(i,u)):s.n=u:s.v=u);try{if(l=2,a){if(i||(o="next"),n=a[o]){if(!(n=n.call(a,u)))throw TypeError("iterator result is not an object");if(!n.done)return n;u=n.value,i<2&&(i=0)}else 1===i&&(n=a.return)&&n.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=r}else if((n=(p=s.n<0)?u:e.call(t,s))!==c)break}catch(n){a=r,i=1,u=n}finally{l=1}}return{value:n,done:p}}}(e,a,i),!0),f}var c={};function l(){}function f(){}function p(){}n=Object.getPrototypeOf;var s=[][a]?n(n([][a]())):(t(n={},a,function(){return this}),n),v=p.prototype=l.prototype=Object.create(s);function y(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,t(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e}return f.prototype=p,t(v,"constructor",p),t(p,"constructor",f),f.displayName="GeneratorFunction",t(p,i,"GeneratorFunction"),t(v),t(v,i,"Generator"),t(v,a,function(){return this}),t(v,"toString",function(){return"[object Generator]"}),(e=function(){return{w:u,m:y}})()}function t(e,r,n,o){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}(t=function(e,r,n,o){if(r)a?a(e,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[r]=n;else{var i=function(r,n){t(e,r,function(e){return this._invoke(r,n,e)})};i("next",0),i("throw",1),i("return",2)}})(e,r,n,o)}function r(e){return a(e)||o(e)||u(e)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e){if(Array.isArray(e))return c(e)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t,r,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function f(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){l(a,n,o,i,u,"next",e)}function u(e){l(a,n,o,i,u,"throw",e)}i(void 0)})}}function p(e,t,r){return s.apply(this,arguments)}function s(){return(s=f(e().m(function t(n,o,a){var u,c,l,f,p,s,v,y,d,h,b,_,m,g,w,A,S,M=arguments;return e().w(function(e){for(;;)switch(e.n){case 0:if(w=function(e){return new Promise(function(t){a.on("gh_value_get",e,function r(n,o){a.destroy("gh_value_get",e,r),t(o)}).emit("gh_value_get",{},e)})},u=M.length>3&&void 0!==M[3]?M[3]:{},c=[],l={variableMethodcurrent_app:function(){return[u.current_app_id||u.app_id]},variableMethodelement_app:function(){return[u.element_app_id]},variableMethodcurrent_item:function(){return["".concat(u.current_app_id||u.app_id,".").concat(u.item_id)]},variableMethoduser_id:function(){return[o.getUser().user_id]},variableMethoduser_email:function(e){return[o.getUser().username]},variableMethodtoday:function(e){var t=new Date,r=new Date(t.getFullYear(),t.getMonth(),t.getDate()),n=new Date(t.getFullYear(),t.getMonth(),t.getDate()+1);return[r.valueOf().toString()+":"+n.valueOf().toString()]},variableMethodvariable:function(e){return[u[e]]}},!n){e.n=13;break}f=i(n),e.p=1,f.s();case 2:if((p=f.n()).done){e.n=10;break}if(!(s=p.value)){e.n=8;break}A=s.input_type,e.n="variable"===A?3:"field"===A?4:6;break;case 3:s.valuesArray=[],v=i(null==s?void 0:s.input_value.split(","));try{for(v.s();!(y=v.n()).done;)d=y.value,h=s.input_type+"Method"+d,"function"==typeof(b=l[h])?s.valuesArray?(_=s.valuesArray).push.apply(_,r(b())):s.valuesArray=b():s.valuesArray?(m=s.valuesArray).push.apply(m,r(l.variableMethodvariable(d))):s.valuesArray=l.variableMethodvariable(d)}catch(t){v.e(t)}finally{v.f()}return c.push(s),e.a(3,7);case 4:return e.n=5,w({app_id:u.current_app_id||u.app_id,item_id:u.item_id,field_id:s.input_value});case 5:return null!=(g=e.v)&&s.valuesArray.push(g),c.push(s),e.a(3,7);case 6:return c.push(s),e.a(3,7);case 7:e.n=9;break;case 8:c.push(s);case 9:e.n=2;break;case 10:e.n=12;break;case 11:e.p=11,S=e.v,f.e(S);case 12:return e.p=12,f.f(),e.f(12);case 13:return e.a(2,c)}},t,null,[[1,11,12,13]])}))).apply(this,arguments)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.filterPreparation=p;
167
179
  },{}],"jqRt":[function(require,module,exports) {
168
180
  "use strict";function e(e,n,o){return n=i(n),t(e,r()?Reflect.construct(n,o||[],i(e).constructor):n.apply(e,o))}function t(e,t){if(t&&("object"==b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return n(e)}function n(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r=function(){return!!e})()}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e){return l(e)||h(e)||u(e)||s()}function s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}function h(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function l(e){if(Array.isArray(e))return f(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function g(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k(r.key),r)}}function m(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e){var t=M(e,"string");return"symbol"==b(t)?t:t+""}function M(e,t){if("object"!=b(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e){return Array.isArray?Array.isArray(e):"[object Array]"===$(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var w=1/0;function L(e){if("string"==typeof e)return e;var t=e+"";return"0"==t&&1/e==-w?"-0":t}function S(e){return null==e?"":L(e)}function _(e){return"string"==typeof e}function O(e){return"number"==typeof e}function A(e){return!0===e||!1===e||E(e)&&"[object Boolean]"==$(e)}function j(e){return"object"===b(e)}function E(e){return j(e)&&null!==e}function I(e){return null!=e}function C(e){return!e.trim().length}function $(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var N="Extended search is not available",P="Incorrect 'index' type",R=function(e){return"Invalid value for key ".concat(e)},F=function(e){return"Pattern length exceeds max of ".concat(e,".")},W=function(e){return"Missing ".concat(e," property in key")},T=function(e){return"Property 'weight' in key '".concat(e,"' must be a positive integer")},D=Object.prototype.hasOwnProperty,z=function(){return m(function e(t){var n=this;y(this,e),this._keys=[],this._keyMap={};var r=0;t.forEach(function(e){var t=K(e);r+=t.weight,n._keys.push(t),n._keyMap[t.id]=t,r+=t.weight}),this._keys.forEach(function(e){e.weight/=r})},[{key:"get",value:function(e){return this._keyMap[e]}},{key:"keys",value:function(){return this._keys}},{key:"toJSON",value:function(){return JSON.stringify(this._keys)}}])}();function K(e){var t=null,n=null,r=null,i=1,o=null;if(_(e)||x(e))r=e,t=q(e),n=B(e);else{if(!D.call(e,"name"))throw new Error(W("name"));var c=e.name;if(r=c,D.call(e,"weight")&&(i=e.weight)<=0)throw new Error(T(c));t=q(c),n=B(c),o=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:o}}function q(e){return x(e)?e:e.split(".")}function B(e){return x(e)?e.join("."):e}function H(e,t){var n=[],r=!1,i=function(e,t,o){if(I(e))if(t[o]){var c=e[t[o]];if(!I(c))return;if(o===t.length-1&&(_(c)||O(c)||A(c)))n.push(S(c));else if(x(c)){r=!0;for(var a=0,s=c.length;a<s;a+=1)i(c[a],t,o+1)}else t.length&&i(c,t,o+1)}else n.push(e)};return i(e,_(t)?t.split("."):t,0),r?n:n[0]}var J={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},U={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}},V={location:0,threshold:.6,distance:100},Q={useExtendedSearch:!1,getFn:H,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},G=v(v(v(v({},U),J),V),Q),X=/[^ ]+/g;function Y(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,n=new Map,r=Math.pow(10,t);return{get:function(t){var i=t.match(X).length;if(n.has(i))return n.get(i);var o=1/Math.pow(i,.5*e),c=parseFloat(Math.round(o*r)/r);return n.set(i,c),c},clear:function(){n.clear()}}}var Z=function(){return m(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.getFn,r=void 0===n?G.getFn:n,i=t.fieldNormWeight,o=void 0===i?G.fieldNormWeight:i;y(this,e),this.norm=Y(o,3),this.getFn=r,this.isCreated=!1,this.setIndexRecords()},[{key:"setSources",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.docs=e}},{key:"setIndexRecords",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.records=e}},{key:"setKeys",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.keys=t,this._keysMap={},t.forEach(function(t,n){e._keysMap[t.id]=n})}},{key:"create",value:function(){var e=this;!this.isCreated&&this.docs.length&&(this.isCreated=!0,_(this.docs[0])?this.docs.forEach(function(t,n){e._addString(t,n)}):this.docs.forEach(function(t,n){e._addObject(t,n)}),this.norm.clear())}},{key:"add",value:function(e){var t=this.size();_(e)?this._addString(e,t):this._addObject(e,t)}},{key:"removeAt",value:function(e){this.records.splice(e,1);for(var t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}},{key:"getValueForItemAtKeyId",value:function(e,t){return e[this._keysMap[t]]}},{key:"size",value:function(){return this.records.length}},{key:"_addString",value:function(e,t){if(I(e)&&!C(e)){var n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}}},{key:"_addObject",value:function(e,t){var n=this,r={i:t,$:{}};this.keys.forEach(function(t,i){var o=t.getFn?t.getFn(e):n.getFn(e,t.path);if(I(o))if(x(o)){for(var c=[],a=[{nestedArrIndex:-1,value:o}];a.length;){var s=a.pop(),u=s.nestedArrIndex,h=s.value;if(I(h))if(_(h)&&!C(h)){var l={v:h,i:u,n:n.norm.get(h)};c.push(l)}else x(h)&&h.forEach(function(e,t){a.push({nestedArrIndex:t,value:e})})}r.$[i]=c}else if(_(o)&&!C(o)){var f={v:o,n:n.norm.get(o)};r.$[i]=f}}),this.records.push(r)}},{key:"toJSON",value:function(){return{keys:this.keys,records:this.records}}}])}();function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.getFn,i=void 0===r?G.getFn:r,o=n.fieldNormWeight,c=void 0===o?G.fieldNormWeight:o,a=new Z({getFn:i,fieldNormWeight:c});return a.setKeys(e.map(K)),a.setSources(t),a.create(),a}function te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.getFn,r=void 0===n?G.getFn:n,i=t.fieldNormWeight,o=void 0===i?G.fieldNormWeight:i,c=e.keys,a=e.records,s=new Z({getFn:r,fieldNormWeight:o});return s.setKeys(c),s.setIndexRecords(a),s}function ne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.errors,r=void 0===n?0:n,i=t.currentLocation,o=void 0===i?0:i,c=t.expectedLocation,a=void 0===c?0:c,s=t.distance,u=void 0===s?G.distance:s,h=t.ignoreLocation,l=void 0===h?G.ignoreLocation:h,f=r/e.length;if(l)return f;var d=Math.abs(a-o);return u?f+d/u:d?1:f}function re(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G.minMatchCharLength,n=[],r=-1,i=-1,o=0,c=e.length;o<c;o+=1){var a=e[o];a&&-1===r?r=o:a||-1===r||((i=o-1)-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}var ie=32;function oe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=r.location,o=void 0===i?G.location:i,c=r.distance,a=void 0===c?G.distance:c,s=r.threshold,u=void 0===s?G.threshold:s,h=r.findAllMatches,l=void 0===h?G.findAllMatches:h,f=r.minMatchCharLength,d=void 0===f?G.minMatchCharLength:f,v=r.includeMatches,g=void 0===v?G.includeMatches:v,y=r.ignoreLocation,p=void 0===y?G.ignoreLocation:y;if(t.length>ie)throw new Error(F(ie));for(var m,k=t.length,M=e.length,b=Math.max(0,Math.min(o,M)),x=u,w=b,L=d>1||g,S=L?Array(M):[];(m=e.indexOf(t,w))>-1;){var _=ne(t,{currentLocation:m,expectedLocation:b,distance:a,ignoreLocation:p});if(x=Math.min(_,x),w=m+k,L)for(var O=0;O<k;)S[m+O]=1,O+=1}w=-1;for(var A=[],j=1,E=k+M,I=1<<k-1,C=0;C<k;C+=1){for(var $=0,N=E;$<N;){ne(t,{errors:C,currentLocation:b+N,expectedLocation:b,distance:a,ignoreLocation:p})<=x?$=N:E=N,N=Math.floor((E-$)/2+$)}E=N;var P=Math.max(1,b-N+1),R=l?M:Math.min(b+N,M)+k,W=Array(R+2);W[R+1]=(1<<C)-1;for(var T=R;T>=P;T-=1){var D=T-1,z=n[e.charAt(D)];if(L&&(S[D]=+!!z),W[T]=(W[T+1]<<1|1)&z,C&&(W[T]|=(A[T+1]|A[T])<<1|1|A[T+1]),W[T]&I&&(j=ne(t,{errors:C,currentLocation:D,expectedLocation:b,distance:a,ignoreLocation:p}))<=x){if(x=j,(w=D)<=b)break;P=Math.max(1,2*b-w)}}if(ne(t,{errors:C+1,currentLocation:b,expectedLocation:b,distance:a,ignoreLocation:p})>x)break;A=W}var K={isMatch:w>=0,score:Math.max(.001,j)};if(L){var q=re(S,d);q.length?g&&(K.indices=q):K.isMatch=!1}return K}function ce(e){for(var t={},n=0,r=e.length;n<r;n+=1){var i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}var ae=function(){return m(function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.location,o=void 0===i?G.location:i,c=r.threshold,a=void 0===c?G.threshold:c,s=r.distance,u=void 0===s?G.distance:s,h=r.includeMatches,l=void 0===h?G.includeMatches:h,f=r.findAllMatches,d=void 0===f?G.findAllMatches:f,v=r.minMatchCharLength,g=void 0===v?G.minMatchCharLength:v,p=r.isCaseSensitive,m=void 0===p?G.isCaseSensitive:p,k=r.ignoreLocation,M=void 0===k?G.ignoreLocation:k;if(y(this,e),this.options={location:o,threshold:a,distance:u,includeMatches:l,findAllMatches:d,minMatchCharLength:g,isCaseSensitive:m,ignoreLocation:M},this.pattern=m?t:t.toLowerCase(),this.chunks=[],this.pattern.length){var b=function(e,t){n.chunks.push({pattern:e,alphabet:ce(e),startIndex:t})},x=this.pattern.length;if(x>ie){for(var w=0,L=x%ie,S=x-L;w<S;)b(this.pattern.substr(w,ie),w),w+=ie;if(L){var _=x-ie;b(this.pattern.substr(_),_)}}else b(this.pattern,0)}},[{key:"searchIn",value:function(e){var t=this.options,n=t.isCaseSensitive,r=t.includeMatches;if(n||(e=e.toLowerCase()),this.pattern===e){var i={isMatch:!0,score:0};return r&&(i.indices=[[0,e.length-1]]),i}var o=this.options,c=o.location,s=o.distance,u=o.threshold,h=o.findAllMatches,l=o.minMatchCharLength,f=o.ignoreLocation,d=[],v=0,g=!1;this.chunks.forEach(function(t){var n=t.pattern,i=t.alphabet,o=t.startIndex,y=oe(e,n,i,{location:c+o,distance:s,threshold:u,findAllMatches:h,minMatchCharLength:l,includeMatches:r,ignoreLocation:f}),p=y.isMatch,m=y.score,k=y.indices;p&&(g=!0),v+=m,p&&k&&(d=[].concat(a(d),a(k)))});var y={isMatch:g,score:g?v/this.chunks.length:1};return g&&r&&(y.indices=d),y}}])}(),se=function(){return m(function e(t){y(this,e),this.pattern=t},[{key:"search",value:function(){}}],[{key:"isMultiMatch",value:function(e){return ue(e,this.multiRegex)}},{key:"isSingleMatch",value:function(e){return ue(e,this.singleRegex)}}])}();function ue(e,t){var n=e.match(t);return n?n[1]:null}var he=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"exact"}},{key:"multiRegex",get:function(){return/^="(.*)"$/}},{key:"singleRegex",get:function(){return/^=(.*)$/}}])}(),le=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){var t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"$/}},{key:"singleRegex",get:function(){return/^!(.*)$/}}])}(),fe=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}],[{key:"type",get:function(){return"prefix-exact"}},{key:"multiRegex",get:function(){return/^\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^\^(.*)$/}}])}(),de=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-prefix-exact"}},{key:"multiRegex",get:function(){return/^!\^"(.*)"$/}},{key:"singleRegex",get:function(){return/^!\^(.*)$/}}])}(),ve=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}],[{key:"type",get:function(){return"suffix-exact"}},{key:"multiRegex",get:function(){return/^"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^(.*)\$$/}}])}(),ge=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}],[{key:"type",get:function(){return"inverse-suffix-exact"}},{key:"multiRegex",get:function(){return/^!"(.*)"\$$/}},{key:"singleRegex",get:function(){return/^!(.*)\$$/}}])}(),ye=function(t){function n(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.location,c=void 0===o?G.location:o,a=i.threshold,s=void 0===a?G.threshold:a,u=i.distance,h=void 0===u?G.distance:u,l=i.includeMatches,f=void 0===l?G.includeMatches:l,d=i.findAllMatches,v=void 0===d?G.findAllMatches:d,g=i.minMatchCharLength,p=void 0===g?G.minMatchCharLength:g,m=i.isCaseSensitive,k=void 0===m?G.isCaseSensitive:m,M=i.ignoreLocation,b=void 0===M?G.ignoreLocation:M;return y(this,n),(r=e(this,n,[t]))._bitapSearch=new ae(t,{location:c,threshold:s,distance:h,includeMatches:f,findAllMatches:v,minMatchCharLength:p,isCaseSensitive:k,ignoreLocation:b}),r}return o(n,se),m(n,[{key:"search",value:function(e){return this._bitapSearch.searchIn(e)}}],[{key:"type",get:function(){return"fuzzy"}},{key:"multiRegex",get:function(){return/^"(.*)"$/}},{key:"singleRegex",get:function(){return/^(.*)$/}}])}(),pe=function(t){function n(t){return y(this,n),e(this,n,[t])}return o(n,se),m(n,[{key:"search",value:function(e){for(var t,n=0,r=[],i=this.pattern.length;(t=e.indexOf(this.pattern,n))>-1;)n=t+i,r.push([t,n-1]);var o=!!r.length;return{isMatch:o,score:o?0:1,indices:r}}}],[{key:"type",get:function(){return"include"}},{key:"multiRegex",get:function(){return/^'"(.*)"$/}},{key:"singleRegex",get:function(){return/^'(.*)$/}}])}(),me=[he,pe,fe,de,ge,ve,le,ye],ke=me.length,Me=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,be="|";function xe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.split(be).map(function(e){for(var n=e.trim().split(Me).filter(function(e){return e&&!!e.trim()}),r=[],i=0,o=n.length;i<o;i+=1){for(var c=n[i],a=!1,s=-1;!a&&++s<ke;){var u=me[s],h=u.isMultiMatch(c);h&&(r.push(new u(h,t)),a=!0)}if(!a)for(s=-1;++s<ke;){var l=me[s],f=l.isSingleMatch(c);if(f){r.push(new l(f,t));break}}}return r})}var we=new Set([ye.type,pe.type]),Le=function(){return m(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.isCaseSensitive,i=void 0===r?G.isCaseSensitive:r,o=n.includeMatches,c=void 0===o?G.includeMatches:o,a=n.minMatchCharLength,s=void 0===a?G.minMatchCharLength:a,u=n.ignoreLocation,h=void 0===u?G.ignoreLocation:u,l=n.findAllMatches,f=void 0===l?G.findAllMatches:l,d=n.location,v=void 0===d?G.location:d,g=n.threshold,p=void 0===g?G.threshold:g,m=n.distance,k=void 0===m?G.distance:m;y(this,e),this.query=null,this.options={isCaseSensitive:i,includeMatches:c,minMatchCharLength:s,findAllMatches:f,ignoreLocation:h,location:v,threshold:p,distance:k},this.pattern=i?t:t.toLowerCase(),this.query=xe(this.pattern,this.options)},[{key:"searchIn",value:function(e){var t=this.query;if(!t)return{isMatch:!1,score:1};var n=this.options,r=n.includeMatches;e=n.isCaseSensitive?e:e.toLowerCase();for(var i=0,o=[],c=0,s=0,u=t.length;s<u;s+=1){var h=t[s];o.length=0,i=0;for(var l=0,f=h.length;l<f;l+=1){var d=h[l],v=d.search(e),g=v.isMatch,y=v.indices,p=v.score;if(!g){c=0,i=0,o.length=0;break}if(i+=1,c+=p,r){var m=d.constructor.type;we.has(m)?o=[].concat(a(o),a(y)):o.push(y)}}if(i){var k={isMatch:!0,score:c/i};return r&&(k.indices=o),k}}return{isMatch:!1,score:1}}}],[{key:"condition",value:function(e,t){return t.useExtendedSearch}}])}(),Se=[];function _e(){Se.push.apply(Se,arguments)}function Oe(e,t){for(var n=0,r=Se.length;n<r;n+=1){var i=Se[n];if(i.condition(e,t))return new i(e,t)}return new ae(e,t)}var Ae={AND:"$and",OR:"$or"},je={PATH:"$path",PATTERN:"$val"},Ee=function(e){return!(!e[Ae.AND]&&!e[Ae.OR])},Ie=function(e){return!!e[je.PATH]},Ce=function(e){return!x(e)&&j(e)&&!Ee(e)},$e=function(e){return g({},Ae.AND,Object.keys(e).map(function(t){return g({},t,e[t])}))};function Ne(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).auto,r=void 0===n||n,i=function(e){var n=Object.keys(e),o=Ie(e);if(!o&&n.length>1&&!Ee(e))return i($e(e));if(Ce(e)){var c=o?e[je.PATH]:n[0],a=o?e[je.PATTERN]:e[c];if(!_(a))throw new Error(R(c));var s={keyId:B(c),pattern:a};return r&&(s.searcher=Oe(a,t)),s}var u={children:[],operator:n[0]};return n.forEach(function(t){var n=e[t];x(n)&&n.forEach(function(e){u.children.push(i(e))})}),u};return Ee(e)||(e=$e(e)),i(e)}function Pe(e,t){var n=t.ignoreFieldNorm,r=void 0===n?G.ignoreFieldNorm:n;e.forEach(function(e){var t=1;e.matches.forEach(function(e){var n=e.key,i=e.norm,o=e.score,c=n?n.weight:null;t*=Math.pow(0===o&&c?Number.EPSILON:o,(c||1)*(r?1:i))}),e.score=t})}function Re(e,t){var n=e.matches;t.matches=[],I(n)&&n.forEach(function(e){if(I(e.indices)&&e.indices.length){var n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.src),e.idx>-1&&(n.refIndex=e.idx),t.matches.push(n)}})}function Fe(e,t){t.score=e.score}function We(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.includeMatches,i=void 0===r?G.includeMatches:r,o=n.includeScore,c=void 0===o?G.includeScore:o,a=[];return i&&a.push(Re),c&&a.push(Fe),e.map(function(e){var n=e.idx,r={item:t[n],refIndex:n};return a.length&&a.forEach(function(t){t(e,r)}),r})}var Te=exports.default=function(){return m(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;y(this,e),this.options=v(v({},G),n),this.options.useExtendedSearch,this._keyStore=new z(this.options.keys),this.setCollection(t,r)},[{key:"setCollection",value:function(e,t){if(this._docs=e,t&&!(t instanceof Z))throw new Error(P);this._myIndex=t||ee(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}},{key:"add",value:function(e){I(e)&&(this._docs.push(e),this._myIndex.add(e))}},{key:"remove",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!1},t=[],n=0,r=this._docs.length;n<r;n+=1){var i=this._docs[n];e(i,n)&&(this.removeAt(n),n-=1,r-=1,t.push(i))}return t}},{key:"removeAt",value:function(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}},{key:"getIndex",value:function(){return this._myIndex}},{key:"search",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).limit,n=void 0===t?-1:t,r=this.options,i=r.includeMatches,o=r.includeScore,c=r.shouldSort,a=r.sortFn,s=r.ignoreFieldNorm,u=_(e)?_(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Pe(u,{ignoreFieldNorm:s}),c&&u.sort(a),O(n)&&n>-1&&(u=u.slice(0,n)),We(u,this._docs,{includeMatches:i,includeScore:o})}},{key:"_searchStringList",value:function(e){var t=Oe(e,this.options),n=this._myIndex.records,r=[];return n.forEach(function(e){var n=e.v,i=e.i,o=e.n;if(I(n)){var c=t.searchIn(n),a=c.isMatch,s=c.score,u=c.indices;a&&r.push({item:n,idx:i,matches:[{score:s,value:n,norm:o,indices:u}]})}}),r}},{key:"_searchLogical",value:function(e){var t=this,n=Ne(e,this.options),r=function(e,n,i){if(!e.children){var o=e.keyId,c=e.searcher,s=t._findMatches({key:t._keyStore.get(o),value:t._myIndex.getValueForItemAtKeyId(n,o),searcher:c});return s&&s.length?[{idx:i,item:n,matches:s}]:[]}for(var u=[],h=0,l=e.children.length;h<l;h+=1){var f=e.children[h],d=r(f,n,i);if(d.length)u.push.apply(u,a(d));else if(e.operator===Ae.AND)return[]}return u},i=this._myIndex.records,o={},c=[];return i.forEach(function(e){var t=e.$,i=e.i;if(I(t)){var s=r(n,t,i);s.length&&(o[i]||(o[i]={idx:i,item:t,matches:[]},c.push(o[i])),s.forEach(function(e){var t,n=e.matches;(t=o[i].matches).push.apply(t,a(n))}))}}),c}},{key:"_searchObjectList",value:function(e){var t=this,n=Oe(e,this.options),r=this._myIndex,i=r.keys,o=r.records,c=[];return o.forEach(function(e){var r=e.$,o=e.i;if(I(r)){var s=[];i.forEach(function(e,i){s.push.apply(s,a(t._findMatches({key:e,value:r[i],searcher:n})))}),s.length&&c.push({idx:o,item:r,matches:s})}}),c}},{key:"_findMatches",value:function(e){var t=e.key,n=e.value,r=e.searcher;if(!I(n))return[];var i=[];if(x(n))n.forEach(function(e){var n=e.v,o=e.i,c=e.n;if(I(n)){var a=r.searchIn(n),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:n,idx:o,norm:c,indices:h})}});else{var o=n.v,c=n.n,a=r.searchIn(o),s=a.isMatch,u=a.score,h=a.indices;s&&i.push({score:u,key:t,value:o,norm:c,indices:h})}return i}}])}();Te.version="6.6.2",Te.createIndex=ee,Te.parseIndex=te,Te.config=G,Te.parseQuery=Ne,_e(Le);
169
181
  },{}],"zsiC":[function(require,module,exports) {
@@ -218,67 +230,65 @@ function o(e){return module.exports=o="function"==typeof Symbol&&"symbol"==typeo
218
230
  },{}],"S7Iy":[function(require,module,exports) {
219
231
  "use strict";function t(e){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})(e)}function e(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 r(t){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?e(Object(o),!0).forEach(function(e){n(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function n(t,e,r){return(e=o(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(e){var r=i(e,"string");return"symbol"==t(r)?r:r+""}function i(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}function u(t,e,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"children",u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,c={},f=[];t.forEach(function(t){c[t[e]]=r(r({},t),{},n({},i,[]))}),t.forEach(function(t){var r=t[o];r&&c[r]?c[r][i].push(c[t[e]]):f.push(c[t[e]])});var l=function(t){t.forEach(function(t){t[i].length>0&&l(t[i])}),u&&t.sort(function(t,e){var r,n;return(null!==(r=t[u])&&void 0!==r?r:1/0)-(null!==(n=e[u])&&void 0!==n?n:1/0)})};l(f);var a=function(t){t.forEach(function(t){0===t[i].length?delete t[i]:a(t[i])})};return a(f),f}Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeNestedList=u;
220
232
  },{}],"vno1":[function(require,module,exports) {
221
- "use strict";function t(e){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})(e)}function e(){e=function(){return n};var r,n={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(r){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,o=Object.create(i.prototype),u=new F(n||[]);return a(o,"_invoke",{value:S(t,r,u)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var p="suspendedStart",y="suspendedYield",v="executing",g="completed",m={};function w(){}function b(){}function _(){}var x={};l(x,c,function(){return this});var L=Object.getPrototypeOf,E=L&&L(L(G([])));E&&E!==i&&o.call(E,c)&&(x=E);var O=_.prototype=w.prototype=Object.create(x);function j(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function P(e,r){function n(i,a,u,c){var f=d(e[i],e,a);if("throw"!==f.type){var s=f.arg,l=s.value;return l&&"object"==t(l)&&o.call(l,"__await")?r.resolve(l.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(l).then(function(t){s.value=t,u(s)},function(t){return n("throw",t,u,c)})}c(f.arg)}var i;a(this,"_invoke",{value:function(t,e){function o(){return new r(function(r,i){n(t,e,r,i)})}return i=i?i.then(o,o):o()}})}function S(t,e,n){var i=p;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:r,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var c=k(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var f=d(t,e,n);if("normal"===f.type){if(i=n.done?g:y,f.arg===m)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(i=g,n.method="throw",n.arg=f.arg)}}}function k(t,e){var n=e.method,i=t.iterator[n];if(i===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(i,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,m;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function G(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function t(){for(;++i<e.length;)if(o.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return b.prototype=_,a(O,"constructor",{value:_,configurable:!0}),a(_,"constructor",{value:b,configurable:!0}),b.displayName=l(_,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,l(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},n.awrap=function(t){return{__await:t}},j(P.prototype),l(P.prototype,f,function(){return this}),n.AsyncIterator=P,n.async=function(t,e,r,i,o){void 0===o&&(o=Promise);var a=new P(h(t,e,r,i),o);return n.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(O),l(O,s,"Generator"),l(O,c,function(){return this}),l(O,"toString",function(){return"[object Generator]"}),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=G,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,i){return u.type="throw",u.arg=t,e.next=n,i&&(e.method="next",e.arg=r),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),f=o.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;T(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:G(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(t,e,r,n,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,i)}function n(t){return function(){var e=this,n=arguments;return new Promise(function(i,o){var a=t.apply(e,n);function u(t){r(a,i,o,u,c,"next",t)}function c(t){r(a,i,o,u,c,"throw",t)}u(void 0)})}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,e,r){return e&&o(t.prototype,e),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(e){var r=c(e,"string");return"symbol"==t(r)?r:r+""}function c(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var f=exports.default=function(){return a(function t(e){i(this,t),this.gudhub=e},[{key:"mergeFieldLists",value:function(t,e){var r=this,n=JSON.parse(JSON.stringify(t)),i=JSON.parse(JSON.stringify(e)),o=i.map(function(t){return t.field_id});return i.length?i.reduce(function(t,e){var n=null;if(t.find(function(t,r){return e.field_id==t.field_id&&(n=r,!0)}))t[n]=r.gudhub.util.mergeObjects(t[n],e);else{var i=e.data_model&&e.data_model.interpretation&&e.data_model.interpretation.find(function(t){return"table"==t.src})||{settings:{show_field:1}};if(i.settings.show_field){var o=r.gudhub.util.mergeObjects({show:1},i),a=r.gudhub.util.mergeObjects(o,e);t.push(a)}}return t},n).filter(function(t){return t.show&&-1!=o.indexOf(t.field_id)}):[]}},{key:"createFieldsListToView",value:function(t,r){var i=this,o=this;return new Promise(function(){var a=n(e().mark(function n(a){var u,c,f;return e().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return f=function(t){var e=0;u.forEach(function(r,n){t.find(function(t){return r.field_id==t.field_id})?(e==u.length-1&&a(t),e++):o.gudhub.ghconstructor.getInstance(r.data_type).then(function(n){if(n){var i=n.getTemplate().model.data_model.interpretation.find(function(t){return"table"==t.src});i||(i={settings:{show_field:1}}),t.push({field_id:r.field_id,show:i.settings.show_field}),e==u.length-1&&a(t)}e++},function(t){e++})})},e.next=3,i.gudhub.getFieldModels(t);case 3:u=e.sent,0!==r.length?(c=[],r.forEach(function(t,e){var n=u.find(function(e){return t.field_id==e.field_id});if(n){var i=n.data_model.interpretation.find(function(t){return"table"==t.src});i||(i={settings:{show_field:1}}),c.push({field_id:n.field_id,show:t.show,width:t.width?t.width:"150px"})}e+1==r.length&&f(c)})):f(r);case 5:case"end":return e.stop()}},n)}));return function(t){return a.apply(this,arguments)}}())}},{key:"createFieldsListToViewWithDataType",value:function(t,r){var i=this;return new Promise(function(){var o=n(e().mark(function o(a){var u,c,f,s;return e().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return u=[],o.next=3,i.gudhub.getFieldModels(t);case 3:c=o.sent,f=c.map(function(t){return+t.field_id}),s=[],u=c.reduce(function(t,r){return t.find(function(t,e){return r.field_id==t.field_id})||(t.push({field_id:r.field_id,data_type:r.data_type}),s.push(new Promise(function(){var o=n(e().mark(function n(o){var a,u,c;return e().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i.gudhub.ghconstructor.getInstance(r.data_type);case 2:a=e.sent,u=a.getTemplate(),c=u.model.data_model.interpretation.find(function(t){return"table"==t.src})||{settings:{show_field:1}},t.find(function(t){return t.field_id==r.field_id}).show=c.settings.show_field,o(!0);case 7:case"end":return e.stop()}},n)}));return function(t){return o.apply(this,arguments)}}()))),t},r),Promise.all(s).then(function(){u=u.filter(function(t){return-1!=f.indexOf(t.field_id)}),a(u)});case 8:case"end":return o.stop()}},o)}));return function(t){return o.apply(this,arguments)}}())}}])}();
233
+ "use strict";function t(e){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})(e)}function e(){var t,r,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",u=i.toStringTag||"@@toStringTag";function f(e,i,o,u){var f=i&&i.prototype instanceof c?i:c,l=Object.create(f.prototype);return n(l,"_invoke",function(e,n,i){var o,u,f,c=0,l=i||[],d=!1,s={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,u=0,f=t,s.n=n,a}};function p(e,n){for(u=e,f=n,r=0;!d&&c&&!i&&r<l.length;r++){var i,o=l[r],p=s.p,h=o[2];e>3?(i=h===n)&&(f=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=e<2&&p<o[1])?(u=0,s.v=n,s.n=o[1]):p<h&&(i=e<3||o[0]>n||n>h)&&(o[4]=e,o[5]=n,s.n=h,u=0))}if(i||e>1)return a;throw d=!0,n}return function(i,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),u=l,f=h;(r=u<2?t:f)||!d;){o||(u?u<3?(u>1&&(s.n=-1),p(u,f)):s.n=f:s.v=f);try{if(c=2,o){if(u||(i="next"),r=o[i]){if(!(r=r.call(o,f)))throw TypeError("iterator result is not an object");if(!r.done)return r;f=r.value,u<2&&(u=0)}else 1===u&&(r=o.return)&&r.call(o),u<2&&(f=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=t}else if((r=(d=s.n<0)?f:e.call(n,s))!==a)break}catch(r){o=t,u=1,f=r}finally{c=1}}return{value:r,done:d}}}(e,o,u),!0),l}var a={};function c(){}function l(){}function d(){}r=Object.getPrototypeOf;var s=[][o]?r(r([][o]())):(n(r={},o,function(){return this}),r),p=d.prototype=c.prototype=Object.create(s);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,n(t,u,"GeneratorFunction")),t.prototype=Object.create(p),t}return l.prototype=d,n(p,"constructor",d),n(d,"constructor",l),l.displayName="GeneratorFunction",n(d,u,"GeneratorFunction"),n(p),n(p,u,"Generator"),n(p,o,function(){return this}),n(p,"toString",function(){return"[object Generator]"}),(e=function(){return{w:f,m:h}})()}function n(t,e,r,i){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}(n=function(t,e,r,i){if(e)o?o(t,e,{value:r,enumerable:!i,configurable:!i,writable:!i}):t[e]=r;else{var u=function(e,r){n(t,e,function(t){return this._invoke(e,r,t)})};u("next",0),u("throw",1),u("return",2)}})(t,e,r,i)}function r(t,e,n,r,i,o,u){try{var f=t[o](u),a=f.value}catch(t){return void n(t)}f.done?e(a):Promise.resolve(a).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise(function(i,o){var u=t.apply(e,n);function f(t){r(u,i,o,f,a,"next",t)}function a(t){r(u,i,o,f,a,"throw",t)}f(void 0)})}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,a(r.key),r)}}function f(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(e){var n=c(e,"string");return"symbol"==t(n)?n:n+""}function c(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,n||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var l=exports.default=function(){return f(function t(e){o(this,t),this.gudhub=e},[{key:"mergeFieldLists",value:function(t,e){var n=this,r=JSON.parse(JSON.stringify(t)),i=JSON.parse(JSON.stringify(e)),o=i.map(function(t){return t.field_id});return i.length?i.reduce(function(t,e){var r=null;if(t.find(function(t,n){return e.field_id==t.field_id&&(r=n,!0)}))t[r]=n.gudhub.util.mergeObjects(t[r],e);else{var i=e.data_model&&e.data_model.interpretation&&e.data_model.interpretation.find(function(t){return"table"==t.src})||{settings:{show_field:1}};if(i.settings.show_field){var o=n.gudhub.util.mergeObjects({show:1},i),u=n.gudhub.util.mergeObjects(o,e);t.push(u)}}return t},r).filter(function(t){return t.show&&-1!=o.indexOf(t.field_id)}):[]}},{key:"createFieldsListToView",value:function(t,n){var r=this,o=this;return new Promise(function(){var u=i(e().m(function i(u){var f,a,c;return e().w(function(e){for(;;)switch(e.n){case 0:return c=function(t){var e=0;f.forEach(function(n,r){t.find(function(t){return n.field_id==t.field_id})?(e==f.length-1&&u(t),e++):o.gudhub.ghconstructor.getInstance(n.data_type).then(function(r){if(r){var i=r.getTemplate().model.data_model.interpretation.find(function(t){return"table"==t.src});i||(i={settings:{show_field:1}}),t.push({field_id:n.field_id,show:i.settings.show_field}),e==f.length-1&&u(t)}e++},function(t){e++})})},e.n=1,r.gudhub.getFieldModels(t);case 1:f=e.v,0!==n.length?(a=[],n.forEach(function(t,e){var r=f.find(function(e){return t.field_id==e.field_id});if(r){var i=r.data_model.interpretation.find(function(t){return"table"==t.src});i||(i={settings:{show_field:1}}),a.push({field_id:r.field_id,show:t.show,width:t.width?t.width:"150px"})}e+1==n.length&&c(a)})):c(n);case 2:return e.a(2)}},i)}));return function(t){return u.apply(this,arguments)}}())}},{key:"createFieldsListToViewWithDataType",value:function(t,n){var r=this;return new Promise(function(){var o=i(e().m(function o(u){var f,a,c,l;return e().w(function(o){for(;;)switch(o.n){case 0:return f=[],o.n=1,r.gudhub.getFieldModels(t);case 1:a=o.v,c=a.map(function(t){return+t.field_id}),l=[],f=a.reduce(function(t,n){return t.find(function(t,e){return n.field_id==t.field_id})||(t.push({field_id:n.field_id,data_type:n.data_type}),l.push(new Promise(function(){var o=i(e().m(function i(o){var u,f,a;return e().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,r.gudhub.ghconstructor.getInstance(n.data_type);case 1:u=e.v,f=u.getTemplate(),a=f.model.data_model.interpretation.find(function(t){return"table"==t.src})||{settings:{show_field:1}},t.find(function(t){return t.field_id==n.field_id}).show=a.settings.show_field,o(!0);case 2:return e.a(2)}},i)}));return function(t){return o.apply(this,arguments)}}()))),t},n),Promise.all(l).then(function(){f=f.filter(function(t){return-1!=c.indexOf(t.field_id)}),u(f)});case 2:return o.a(2)}},o)}));return function(t){return o.apply(this,arguments)}}())}}])}();
222
234
  },{}],"DfIi":[function(require,module,exports) {
223
- "use strict";function t(e){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})(e)}function e(){e=function(){return n};var r,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(r){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new G(n||[]);return a(i,"_invoke",{value:S(t,r,c)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function x(){}var L={};f(L,u,function(){return this});var E=Object.getPrototypeOf,O=E&&E(E(T([])));O&&O!==o&&i.call(O,u)&&(L=O);var _=x.prototype=w.prototype=Object.create(L);function j(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function I(e,r){function n(o,a,c,u){var s=p(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,c,u)},function(t){n("throw",t,c,u)}):r.resolve(f).then(function(t){l.value=t,c(l)},function(t){return n("throw",t,c,u)})}u(s.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,o){n(t,e,r,o)})}return o=o?o.then(i,i):i()}})}function S(t,e,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(t,e,n);if("normal"===s.type){if(o=n.done?m:v,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function k(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,k(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return b.prototype=x,a(_,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},n.awrap=function(t){return{__await:t}},j(I.prototype),f(I.prototype,s,function(){return this}),n.AsyncIterator=I,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new I(h(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(_),f(_,l,"Generator"),f(_,u,function(){return this}),f(_,"toString",function(){return"[object Generator]"}),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=T,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return c.type="throw",c.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var a=t.apply(e,n);function c(t){r(a,o,i,c,u,"next",t)}function u(t){r(a,o,i,c,u,"throw",t)}c(void 0)})}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(e){var r=u(e,"string");return"symbol"==t(r)?r:r+""}function u(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var s=exports.default=function(){return a(function t(e){o(this,t),this.gudhub=e,this.selectedItems={}},[{key:"selectItems",value:function(){var t=n(e().mark(function t(r,n){var o,i,a;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.selectedItems.hasOwnProperty(r)){t.next=6;break}return this.selectedItems[r]={items:[],app:[]},t.next=4,this.gudhub.getApp(r);case 4:o=t.sent,this.selectedItems[r].app=o;case 6:i=this.selectedItems[r],a=i.items.map(function(t){return t.item_id}),n.forEach(function(t){-1!=a.indexOf(t.item_id)?i.items.splice(a.indexOf(t.item_id),1):i.items[i.items.length]=t});case 9:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"getSelectedItems",value:function(t){return this.selectedItems[t]?this.selectedItems[t]:{items:[],app:[]}}},{key:"clearSelectedItems",value:function(t){this.selectedItems[t]&&(this.selectedItems[t].items=[])}},{key:"isItemSelected",value:function(t,e){var r=this.getSelectedItems(t);return null!==r&&-1!=(r=r.items.map(function(t){return t.item_id})).indexOf(e)}}])}();
235
+ "use strict";function t(e){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})(e)}function e(){var t,n,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function c(e,o,i,u){var c=o&&o.prototype instanceof f?o:f,s=Object.create(c.prototype);return r(s,"_invoke",function(e,r,o){var i,u,c,f=0,s=o||[],l=!1,p={p:0,n:0,v:t,a:m,f:m.bind(t,4),d:function(e,r){return i=e,u=0,c=t,p.n=r,a}};function m(e,r){for(u=e,c=r,n=0;!l&&f&&!o&&n<s.length;n++){var o,i=s[n],m=p.p,y=i[2];e>3?(o=y===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=m&&((o=e<2&&m<i[1])?(u=0,p.v=r,p.n=i[1]):m<y&&(o=e<3||i[0]>r||r>y)&&(i[4]=e,i[5]=r,p.n=y,u=0))}if(o||e>1)return a;throw l=!0,r}return function(o,s,y){if(f>1)throw TypeError("Generator is already running");for(l&&1===s&&m(s,y),u=s,c=y;(n=u<2?t:c)||!l;){i||(u?u<3?(u>1&&(p.n=-1),m(u,c)):p.n=c:p.v=c);try{if(f=2,i){if(u||(o="next"),n=i[o]){if(!(n=n.call(i,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,u<2&&(u=0)}else 1===u&&(n=i.return)&&n.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((n=(l=p.n<0)?c:e.call(r,p))!==a)break}catch(n){i=t,u=1,c=n}finally{f=1}}return{value:n,done:l}}}(e,i,u),!0),s}var a={};function f(){}function s(){}function l(){}n=Object.getPrototypeOf;var p=[][i]?n(n([][i]())):(r(n={},i,function(){return this}),n),m=l.prototype=f.prototype=Object.create(p);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,r(t,u,"GeneratorFunction")),t.prototype=Object.create(m),t}return s.prototype=l,r(m,"constructor",l),r(l,"constructor",s),s.displayName="GeneratorFunction",r(l,u,"GeneratorFunction"),r(m),r(m,u,"Generator"),r(m,i,function(){return this}),r(m,"toString",function(){return"[object Generator]"}),(e=function(){return{w:c,m:y}})()}function r(t,e,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}(r=function(t,e,n,o){if(e)i?i(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n;else{var u=function(e,n){r(t,e,function(t){return this._invoke(e,n,t)})};u("next",0),u("throw",1),u("return",2)}})(t,e,n,o)}function n(t,e,r,n,o,i,u){try{var c=t[i](u),a=c.value}catch(t){return void r(t)}c.done?e(a):Promise.resolve(a).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise(function(o,i){var u=t.apply(e,r);function c(t){n(u,o,i,c,a,"next",t)}function a(t){n(u,o,i,c,a,"throw",t)}c(void 0)})}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function c(t,e,r){return e&&u(t.prototype,e),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(e){var r=f(e,"string");return"symbol"==t(r)?r:r+""}function f(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var s=exports.default=function(){return c(function t(e){i(this,t),this.gudhub=e,this.selectedItems={}},[{key:"selectItems",value:function(){var t=o(e().m(function t(r,n){var o,i,u;return e().w(function(t){for(;;)switch(t.n){case 0:if(this.selectedItems.hasOwnProperty(r)){t.n=2;break}return this.selectedItems[r]={items:[],app:[]},t.n=1,this.gudhub.getApp(r);case 1:o=t.v,this.selectedItems[r].app=o;case 2:i=this.selectedItems[r],u=i.items.map(function(t){return t.item_id}),n.forEach(function(t){-1!=u.indexOf(t.item_id)?i.items.splice(u.indexOf(t.item_id),1):i.items[i.items.length]=t});case 3:return t.a(2)}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"getSelectedItems",value:function(t){return this.selectedItems[t]?this.selectedItems[t]:{items:[],app:[]}}},{key:"clearSelectedItems",value:function(t){this.selectedItems[t]&&(this.selectedItems[t].items=[])}},{key:"isItemSelected",value:function(t,e){var r=this.getSelectedItems(t);return null!==r&&-1!=(r=r.items.map(function(t){return t.item_id})).indexOf(e)}}])}();
224
236
  },{}],"xR4c":[function(require,module,exports) {
225
237
  "use strict";function e(){return'function createList(items) {\n return items.reduce(\n (acc, item) => {\n acc.list[item.item_id] = item;\n acc.ids.push(item.item_id);\n return acc;\n },\n { ids: [], list: {} }\n );\n };\n function compareItemsLists(oldItems, newItems) {\n const { ids: oldIds, list: oldList } = createList(oldItems);\n const { ids: newIds, list: newList } = createList(newItems);\n\n const deletedItemsIds = oldIds.filter((id) => !newIds.includes(id));\n const recentItemsIds = oldIds.filter((id) => !deletedItemsIds.includes(id));\n const newItemsIds = newIds.filter((id) => !oldIds.includes(id));\n\n const diff_fields_items = {};\n const diff_fields_items_Ids = [];\n \n recentItemsIds.forEach((id) => {\n const newItem = newList[id];\n const oldItem = oldList[id];\n\n oldItem.fields.forEach((field1) => {\n const sameField = newItem.fields.find(\n (field2) => Number(field2.field_id) === Number(field1.field_id)\n );\n\n if (!sameField) {\n if (!diff_fields_items[newItem.item_id]) {\n diff_fields_items[newItem.item_id] = [];\n diff_fields_items_Ids.push(newItem.item_id);\n }\n\n return diff_fields_items[newItem.item_id].push(field1);\n }\n\n if (field1.field_value != sameField.field_value) {\n if (!diff_fields_items[newItem.item_id]) {\n diff_fields_items[newItem.item_id] = [];\n diff_fields_items_Ids.push(newItem.item_id);\n }\n return diff_fields_items[newItem.item_id].push(field1);\n }\n });\n });\n\n return {\n newItems: newItemsIds.reduce((acc, id) => {\n acc.push(newList[id]);\n return acc;\n }, []),\n deletedItems: deletedItemsIds.reduce((acc, id) => {\n acc.push(oldList[id]);\n return acc;\n }, []),\n diff_fields_items_Ids,\n diff_fields_items,\n diff_items: diff_fields_items_Ids.reduce((acc, id) => {\n acc.push(oldList[id]);\n return acc;\n }, []),\n };\n }\n\n self.addEventListener("message", (event) => {\n const { items_list1, items_list2 } = event.data;\n\n const diff = compareItemsLists(items_list1, items_list2);\n self.postMessage({ diff });\n });'}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compare_items_lists_Worker=e;
226
238
  },{}],"nKaW":[function(require,module,exports) {
227
- "use strict";function t(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 e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r(t){return a(t)||o(t)||i(t)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function o(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function a(t){if(Array.isArray(t))return u(t)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function c(){c=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,a=Object.create(o.prototype),u=new I(n||[]);return i(a,"_invoke",{value:P(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d="suspendedStart",y="suspendedYield",v="executing",b="completed",m={};function g(){}function _(){}function w(){}var x={};f(x,a,function(){return this});var O=Object.getPrototypeOf,k=O&&O(O(T([])));k&&k!==r&&n.call(k,a)&&(x=k);var j=w.prototype=g.prototype=Object.create(x);function L(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function E(t,e){function r(i,o,a,u){var c=h(t[i],t,o);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==p(f)&&n.call(f,"__await")?e.resolve(f.__await).then(function(t){r("next",t,a,u)},function(t){r("throw",t,a,u)}):e.resolve(f).then(function(t){s.value=t,a(s)},function(t){return r("throw",t,a,u)})}u(c.arg)}var o;i(this,"_invoke",{value:function(t,n){function i(){return new e(function(e,i){r(t,n,e,i)})}return o=o?o.then(i,i):i()}})}function P(e,r,n){var i=d;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===b){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var c=S(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var s=h(e,r,n);if("normal"===s.type){if(i=n.done?b:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=b,n.method="throw",n.arg=s.arg)}}}function S(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(p(e)+" is not iterable")}return _.prototype=w,i(j,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:_,configurable:!0}),_.displayName=f(w,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},L(E.prototype),f(E.prototype,u,function(){return this}),e.AsyncIterator=E,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var a=new E(l(t,r,n,i),o);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},L(j),f(j,s,"Generator"),f(j,a,function(){return this}),f(j,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function i(n,i){return u.type="throw",u.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function s(t,e,r){return(e=f(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function f(t){var e=l(t,"string");return"symbol"==p(e)?e:e+""}function l(t,e){if("object"!=p(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function p(t){return(p="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 h(t,e,r,n,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,i)}function d(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){h(o,n,i,a,u,"next",t)}function u(t){h(o,n,i,a,u,"throw",t)}a(void 0)})}}function y(t,n,i,o,a){function u(t,e,r){return f.apply(this,arguments)}function f(){return(f=d(c().mark(function t(e,r,n){var i,o,a,f,h;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=null,"array"!==e.type){t.next=13;break}if(!Number(e.is_static)){t.next=10;break}return t.t0=Array,t.next=6,b(e.childs,r,n);case 6:t.t1=t.sent,i=new t.t0(t.t1),t.next=13;break;case 10:return t.next=12,l(e,r,n);case 12:i=t.sent;case 13:if("object"!==e.type){t.next=23;break}if(!Number(e.current_item)){t.next=20;break}return t.next=17,y(e,r);case 17:i=t.sent,t.next=23;break;case 20:return t.next=22,b(e.childs,r,n);case 22:i=t.sent;case 23:if("property"!==e.type){t.next=27;break}return t.next=26,g(e,r,n);case 26:i=t.sent;case 27:if("object"!==p(e)||void 0!==e.type){t.next=41;break}o={},t.t2=c().keys(e);case 30:if((t.t3=t.t2()).done){t.next=40;break}if(a=t.t3.value,!e.hasOwnProperty(a)){t.next=38;break}return f=e[a],t.next=36,u(f,r,n);case 36:h=t.sent,o[a]=h[f.property_name];case 38:t.next=30;break;case 40:return t.abrupt("return",o);case 41:return t.abrupt("return",s({},e.property_name,i));case 42:case"end":return t.stop()}},t)}))).apply(this,arguments)}function l(t,e,r){return h.apply(this,arguments)}function h(){return(h=d(c().mark(function t(e,n,a){var u,s,f,l,p,h,y;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.gudhub.getApp(Number(e.app_id));case 2:return u=t.sent,t.next=5,O(e.filter,u.items_list,a,n);case 5:return s=t.sent,e.isSortable&&e.field_id_to_sort&&""!==e.field_id_to_sort&&(f=s.flatMap(function(t){var r=t.fields.find(function(t){return t.field_id==e.field_id_to_sort});return r&&""!=r.field_value?t:[]}),l=s.filter(function(t){if(!f.includes(t))return t}),f=f.sort(function(t,r){return"desc"==e.sortType?r.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value-t.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value:t.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value-r.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value}),s=[].concat(r(f),r(l))),e.offset&&(p=e.use_variables_for_limit_and_offset&&o?o[e.offset]:/^[0-9]+$/.test(e.offset)?e.offset:0,s=s.slice(p)),e.limit&&0!==(h=e.use_variables_for_limit_and_offset&&o?o[e.limit]:/^[0-9]+$/.test(e.limit)||0)&&(s=s.slice(0,h)),y=s.map(function(){var t=d(c().mark(function t(r){return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",b(e.childs,r,u.app_id));case 1:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),t.abrupt("return",Promise.all(y));case 11:case"end":return t.stop()}},t)}))).apply(this,arguments)}function y(t,e){return v.apply(this,arguments)}function v(){return(v=d(c().mark(function t(e,r){var n,o;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.gudhub.getApp(e.app_id);case 2:return n=t.sent,o=n.items_list||[],t.abrupt("return",b(e.childs,r||o[0],n.app_id));case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}function b(t,e,r){return m.apply(this,arguments)}function m(){return(m=d(c().mark(function t(r,n,i){var o,a;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r.map(function(){var t=d(c().mark(function t(e){return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",u(e,n,i));case 1:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}());case 2:return o=t.sent,t.next=5,Promise.all(o);case 5:return a=t.sent,t.abrupt("return",a.reduce(function(t,r){return e(e({},t),r)},{}));case 7:case"end":return t.stop()}},t)}))).apply(this,arguments)}function g(t,e,r){return _.apply(this,arguments)}function _(){return(_=d(c().mark(function t(e,n,o){var a,u,s,f,l;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:t.t0=e.property_type,t.next="static"===t.t0?3:"variable"===t.t0?4:"field_id"===t.t0?9:"function"===t.t0?10:(t.t0,20);break;case 3:return t.abrupt("return",e.static_field_value);case 4:t.t1=e.variable_type,t.next="app_id"===t.t1?7:(t.t1,8);break;case 7:return t.abrupt("return",o);case 8:return t.abrupt("return","".concat(o,".").concat(n.item_id));case 9:return t.abrupt("return",e.field_id);case 10:if("function"!=typeof e.function){t.next=15;break}return a=e.function.apply(e,[n,o,i.gudhub].concat(r(e.args))),t.abrupt("return",a);case 15:return u=new Function("item, appId, gudhub","return (async "+e.function+")(item, appId, gudhub)"),t.next=18,u(n,o,i.gudhub);case 18:return s=t.sent,t.abrupt("return",s);case 20:if(e.field_id||!e.name_space){t.next=24;break}return t.next=23,i.gudhub.getFieldIdByNameSpace(o,e.name_space);case 23:e.field_id=t.sent;case 24:if(!Boolean(Number(e.interpretation))){t.next=31;break}return t.next=27,i.gudhub.getInterpretationById(Number(o),Number(n.item_id),Number(e.field_id),"value");case 27:return f=t.sent,t.abrupt("return",f);case 31:return t.next=33,i.gudhub.getFieldValue(Number(o),Number(n.item_id),Number(e.field_id));case 33:return l=t.sent,t.abrupt("return",l);case 35:case"end":return t.stop()}},t)}))).apply(this,arguments)}function w(t,e,r,n,i){return x.apply(this,arguments)}function x(){return(x=d(c().mark(function t(n,a,u,s,f){var l;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.gudhub.prefilter(JSON.parse(JSON.stringify(n)),e({element_app_id:a,app_id:u,item_id:s},o));case 2:return l=t.sent,t.abrupt("return",i.gudhub.filter(f,[].concat(r(l),r(n))));case 4:case"end":return t.stop()}},t)}))).apply(this,arguments)}function O(){return k.apply(this,arguments)}function k(){return(k=d(c().mark(function t(){var e,n,i,o,a=arguments;return c().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:[],n=a.length>1&&void 0!==a[1]?a[1]:[],i=a.length>2&&void 0!==a[2]?a[2]:"",o=a.length>3&&void 0!==a[3]?a[3]:{},t.abrupt("return",e.length?w(e,i,i,o.item_id,n):r(n));case 5:case"end":return t.stop()}},t)}))).apply(this,arguments)}return u(t,n,a,o)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compiler=y;
239
+ "use strict";function t(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 e(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?t(Object(n),!0).forEach(function(t){l(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):t(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function r(t){return u(t)||o(t)||i(t)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function o(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function u(t){if(Array.isArray(t))return a(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function c(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}}function f(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var c=n&&n.prototype instanceof a?n:a,f=Object.create(c.prototype);return s(f,"_invoke",function(r,n,i){var o,a,c,f=0,s=i||[],l=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return o=e,a=0,c=t,p.n=r,u}};function d(r,n){for(a=r,c=n,e=0;!l&&f&&!i&&e<s.length;e++){var i,o=s[e],d=p.p,y=o[2];r>3?(i=y===n)&&(c=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=r<2&&d<o[1])?(a=0,p.v=n,p.n=o[1]):d<y&&(i=r<3||o[0]>n||n>y)&&(o[4]=r,o[5]=n,p.n=y,a=0))}if(i||r>1)return u;throw l=!0,n}return function(i,s,y){if(f>1)throw TypeError("Generator is already running");for(l&&1===s&&d(s,y),a=s,c=y;(e=a<2?t:c)||!l;){o||(a?a<3?(a>1&&(p.n=-1),d(a,c)):p.n=c:p.v=c);try{if(f=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(l=p.n<0)?c:r.call(n,p))!==u)break}catch(e){o=t,a=1,c=e}finally{f=1}}return{value:e,done:l}}}(r,i,o),!0),f}var u={};function a(){}function c(){}function l(){}e=Object.getPrototypeOf;var p=[][n]?e(e([][n]())):(s(e={},n,function(){return this}),e),d=l.prototype=a.prototype=Object.create(p);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,s(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return c.prototype=l,s(d,"constructor",l),s(l,"constructor",c),c.displayName="GeneratorFunction",s(l,i,"GeneratorFunction"),s(d),s(d,i,"Generator"),s(d,n,function(){return this}),s(d,"toString",function(){return"[object Generator]"}),(f=function(){return{w:o,m:y}})()}function s(t,e,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}(s=function(t,e,r,n){if(e)i?i(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r;else{var o=function(e,r){s(t,e,function(t){return this._invoke(e,r,t)})};o("next",0),o("throw",1),o("return",2)}})(t,e,r,n)}function l(t,e,r){return(e=p(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(t){var e=d(t,"string");return"symbol"==y(e)?e:e+""}function d(t,e){if("object"!=y(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function y(t){return(y="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 b(t,e,r,n,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,i)}function v(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function u(t){b(o,n,i,u,a,"next",t)}function a(t){b(o,n,i,u,a,"throw",t)}u(void 0)})}}function m(t,n,i,o,u){function a(t,e,r){return s.apply(this,arguments)}function s(){return(s=v(f().m(function t(e,r,n){var i,o,u,s,d,v,m,h,w;return f().w(function(t){for(;;)switch(t.n){case 0:if(i=null,"array"!==e.type){t.n=4;break}if(!Number(e.is_static)){t.n=2;break}return v=Array,t.n=1,_(e.childs,r,n);case 1:m=t.v,i=new v(m),t.n=4;break;case 2:return t.n=3,p(e,r,n);case 3:i=t.v;case 4:if("object"!==e.type){t.n=8;break}if(!Number(e.current_item)){t.n=6;break}return t.n=5,b(e,r);case 5:i=t.v,t.n=8;break;case 6:return t.n=7,_(e.childs,r,n);case 7:i=t.v;case 8:if("property"!==e.type){t.n=10;break}return t.n=9,g(e,r,n);case 9:i=t.v;case 10:if("object"!==y(e)||void 0!==e.type){t.n=15;break}o={},h=c(e);case 11:if((w=h()).done){t.n=14;break}if(u=w.value,!e.hasOwnProperty(u)){t.n=13;break}return s=e[u],t.n=12,a(s,r,n);case 12:d=t.v,o[u]=d[s.property_name];case 13:t.n=11;break;case 14:return t.a(2,o);case 15:return t.a(2,l({},e.property_name,i))}},t)}))).apply(this,arguments)}function p(t,e,r){return d.apply(this,arguments)}function d(){return(d=v(f().m(function t(e,n,u){var a,c,s,l,p,d,y;return f().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.gudhub.getApp(Number(e.app_id));case 1:return a=t.v,t.n=2,S(e.filter,a.items_list,u,n);case 2:return c=t.v,e.isSortable&&e.field_id_to_sort&&""!==e.field_id_to_sort&&(s=c.flatMap(function(t){var r=t.fields.find(function(t){return t.field_id==e.field_id_to_sort});return r&&""!=r.field_value?t:[]}),l=c.filter(function(t){if(!s.includes(t))return t}),s=s.sort(function(t,r){return"desc"==e.sortType?r.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value-t.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value:t.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value-r.fields.find(function(t){return t.field_id==e.field_id_to_sort}).field_value}),c=[].concat(r(s),r(l))),e.offset&&(p=e.use_variables_for_limit_and_offset&&o?o[e.offset]:/^[0-9]+$/.test(e.offset)?e.offset:0,c=c.slice(p)),e.limit&&0!==(d=e.use_variables_for_limit_and_offset&&o?o[e.limit]:/^[0-9]+$/.test(e.limit)||0)&&(c=c.slice(0,d)),y=c.map(function(){var t=v(f().m(function t(r){return f().w(function(t){for(;;)switch(t.n){case 0:return t.a(2,_(e.childs,r,a.app_id))}},t)}));return function(e){return t.apply(this,arguments)}}()),t.a(2,Promise.all(y))}},t)}))).apply(this,arguments)}function b(t,e){return m.apply(this,arguments)}function m(){return(m=v(f().m(function t(e,r){var n,o;return f().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.gudhub.getApp(e.app_id);case 1:return n=t.v,o=n.items_list||[],t.a(2,_(e.childs,r||o[0],n.app_id))}},t)}))).apply(this,arguments)}function _(t,e,r){return h.apply(this,arguments)}function h(){return(h=v(f().m(function t(r,n,i){var o,u;return f().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,r.map(function(){var t=v(f().m(function t(e){return f().w(function(t){for(;;)switch(t.n){case 0:return t.a(2,a(e,n,i))}},t)}));return function(e){return t.apply(this,arguments)}}());case 1:return o=t.v,t.n=2,Promise.all(o);case 2:return u=t.v,t.a(2,u.reduce(function(t,r){return e(e({},t),r)},{}))}},t)}))).apply(this,arguments)}function g(t,e,r){return w.apply(this,arguments)}function w(){return(w=v(f().m(function t(e,n,o){var u,a,c,s,l,p,d;return f().w(function(t){for(;;)switch(t.n){case 0:p=e.property_type,t.n="static"===p?1:"variable"===p?2:"field_id"===p?5:"function"===p?6:9;break;case 1:return t.a(2,e.static_field_value);case 2:d=e.variable_type,t.n="app_id"===d?3:4;break;case 3:return t.a(2,o);case 4:return t.a(2,"".concat(o,".").concat(n.item_id));case 5:return t.a(2,e.field_id);case 6:if("function"!=typeof e.function){t.n=7;break}return u=e.function.apply(e,[n,o,i.gudhub].concat(r(e.args))),t.a(2,u);case 7:return a=new Function("item, appId, gudhub","return (async "+e.function+")(item, appId, gudhub)"),t.n=8,a(n,o,i.gudhub);case 8:return c=t.v,t.a(2,c);case 9:if(e.field_id||!e.name_space){t.n=11;break}return t.n=10,i.gudhub.getFieldIdByNameSpace(o,e.name_space);case 10:e.field_id=t.v;case 11:if(!Boolean(Number(e.interpretation))){t.n=13;break}return t.n=12,i.gudhub.getInterpretationById(Number(o),Number(n.item_id),Number(e.field_id),"value");case 12:return s=t.v,t.a(2,s);case 13:return t.n=14,i.gudhub.getFieldValue(Number(o),Number(n.item_id),Number(e.field_id));case 14:return l=t.v,t.a(2,l);case 15:return t.a(2)}},t)}))).apply(this,arguments)}function O(t,e,r,n,i){return j.apply(this,arguments)}function j(){return(j=v(f().m(function t(n,u,a,c,s){var l;return f().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.gudhub.prefilter(JSON.parse(JSON.stringify(n)),e({element_app_id:u,app_id:a,item_id:c},o));case 1:return l=t.v,t.a(2,i.gudhub.filter(s,[].concat(r(l),r(n))))}},t)}))).apply(this,arguments)}function S(){return P.apply(this,arguments)}function P(){return(P=v(f().m(function t(){var e,n,i,o,u=arguments;return f().w(function(t){for(;;)switch(t.n){case 0:return e=u.length>0&&void 0!==u[0]?u[0]:[],n=u.length>1&&void 0!==u[1]?u[1]:[],i=u.length>2&&void 0!==u[2]?u[2]:"",o=u.length>3&&void 0!==u[3]?u[3]:{},t.a(2,e.length?O(e,i,i,o.item_id,n):r(n))}},t)}))).apply(this,arguments)}return a(t,n,u,o)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compiler=m;
228
240
  },{}],"zqOZ":[function(require,module,exports) {
229
- "use strict";function e(e,n){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=t(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function t(e,t){if(e){if("string"==typeof e)return n(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function r(){r=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(e,t,n){e[t]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function p(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new S(r||[]);return o(a,"_invoke",{value:I(e,n,u)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",_="suspendedYield",v="executing",m="completed",y={};function g(){}function w(){}function b(){}var E={};l(E,c,function(){return this});var x=Object.getPrototypeOf,k=x&&x(x(T([])));k&&k!==n&&i.call(k,c)&&(E=k);var A=b.prototype=g.prototype=Object.create(E);function P(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function O(e,t){function n(r,o,u,c){var s=d(e[r],e,o);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==a(l)&&i.call(l,"__await")?t.resolve(l.__await).then(function(e){n("next",e,u,c)},function(e){n("throw",e,u,c)}):t.resolve(l).then(function(e){f.value=e,u(f)},function(e){return n("throw",e,u,c)})}c(s.arg)}var r;o(this,"_invoke",{value:function(e,i){function o(){return new t(function(t,r){n(e,i,t,r)})}return r=r?r.then(o,o):o()}})}function I(t,n,r){var i=h;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var c=L(u,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===h)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var s=d(t,n,r);if("normal"===s.type){if(i=r.done?m:_,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(i=m,r.method="throw",r.arg=s.arg)}}}function L(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=d(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function T(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(a(t)+" is not iterable")}return w.prototype=b,o(A,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:w,configurable:!0}),w.displayName=l(b,f,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,f,"GeneratorFunction")),e.prototype=Object.create(A),e},t.awrap=function(e){return{__await:e}},P(O.prototype),l(O.prototype,s,function(){return this}),t.AsyncIterator=O,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new O(p(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then(function(e){return e.done?e.value:a.next()})},P(A),l(A,f,"Generator"),l(A,c,function(){return this}),l(A,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=T,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return u.type="throw",u.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function i(e,t,n,r,i,o,a){try{var u=e[o](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,i)}function o(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function u(e){i(a,r,o,u,c,"next",e)}function c(e){i(a,r,o,u,c,"throw",e)}u(void 0)})}}function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function s(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=l(e,"string");return"symbol"==a(t)?t:t+""}function l(e,t){if("object"!=a(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var p=exports.default=function(){return s(function e(t){u(this,e),this.gudhub=t,this.appsConnectingMap={apps:[],fields:[],items:[],views:[]}},[{key:"createAppsFromTemplate",value:function(e,t,n,r){var i=this,o=this;return new Promise(function(u){var c=100/(6*e.apps.length),s=0;o.createApps(e,function(e){s+=1,n&&n.call(i,{percent:s*c,status:e})},r).then(function(e){o.createItems(e,t,function(e){"string"==typeof e?(s+=1,n&&n.call(i,{percent:s*c,status:e})):"object"===a(e)&&(n&&n.call(i,{status:"Done",apps:e}),u())},r)})})}},{key:"createItems",value:function(e,t,n,i){var a=this;return new Promise(function(){var u=o(r().mark(function u(c){var s,f,l,p,d,h;return r().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return s=t||1e5,f=a,l=[],p=[],u.next=6,f.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});case 6:d=u.sent,h=d.accesstoken,e.forEach(function(e){p.push(new Promise(function(){var t=o(r().mark(function t(o){var u,c,p;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!i){t.next=6;break}return t.next=3,f.gudhub.req.axiosRequest({url:"https://gudhub.com/GudHub_Test/api/app/get?token=".concat(h,"&app_id=").concat(f._searchOldAppId(e.app_id,f.appsConnectingMap.apps)),method:"GET"});case 3:u=t.sent,t.next=9;break;case 6:return t.next=8,f.gudhub.getApp(f._searchOldAppId(e.app_id,f.appsConnectingMap.apps));case 8:u=t.sent;case 9:n&&n.call(a,"GET APP: ".concat(u.app_name," (Items steps)")),c=JSON.parse(JSON.stringify(u)),p=c.items_list.map(function(e){return{index_number:e.index_number,item_id:0,fields:[]}}).filter(function(e,t){return t<=s}),f.gudhub.addNewItems(e.app_id,p).then(function(t){n&&n.call(a,"ADD NEW ITEMS: ".concat(u.app_name," (Items steps)")),e.items_list=t,f._updateMap(e.items_list,c.items_list),f._addFieldValue(c.items_list,e.items_list,f.appsConnectingMap),l.push(e),o()});case 13:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()))}),Promise.all(p).then(function(){l.forEach(function(e){e.items_list.forEach(function(e){e.fields.forEach(function(e){f.appsConnectingMap.fields.forEach(function(t){e.field_id===t.old_field_id&&(e.field_id=t.new_field_id,e.element_id=t.new_field_id)})})})}),f.deleteField(l),f.replaceValue(l,f.appsConnectingMap).then(function(){var e=[];l.forEach(function(t){e.push(new Promise(function(e){var r=t.items_list.map(function(e){return e.fields.forEach(function(e){delete e.data_id}),e});f.gudhub.updateItems(t.app_id,r).then(function(){n&&n.call(a,"REPLACE VALUE: ".concat(t.app_name," (Items steps)")),e()})}))}),Promise.all(e).then(function(){n.call(a,l),c()})})});case 10:case"end":return u.stop()}},u)}));return function(e){return u.apply(this,arguments)}}())}},{key:"deleteField",value:function(e){e.forEach(function(e){e.items_list.forEach(function(t){t.fields=t.fields.filter(function(t){return e.field_list.findIndex(function(e){return e.field_id==t.field_id})>-1})})})}},{key:"replaceValue",value:function(e,t){var n=this;return new Promise(function(){var i=o(r().mark(function i(o){var a,u;return r().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:a=[],u=n,e.forEach(function(e){e.field_list.forEach(function(n){"item_ref"===n.data_type&&u._replaceValueItemRef(e,n,t),a.push(new Promise(function(t){u.gudhub.ghconstructor.getInstance(n.data_type).then(function(r){return void 0===r?(console.log("ERROR WHILE GETTING INSTANCE OF ",n.data_type),void t({type:n.data_type})):"file"==r.getTemplate().constructor?u.gudhub.util.fileInstallerHelper(e.app_id,e.items_list,n.field_id).then(function(e){t(e)}):void("document"==r.getTemplate().constructor?u.documentInstallerHelper(e.app_id,e.items_list,n.field_id).then(function(e){t(r)}):t(r))})}))})}),a.length>0?Promise.all(a).then(function(e){o(e)}):o(result);case 4:case"end":return r.stop()}},i)}));return function(e){return i.apply(this,arguments)}}())}},{key:"documentInstallerHelper",value:function(t,n,i){var a=this,u=[];return new Promise(function(){var c=o(r().mark(function o(c){var s,f,l,p,d,h,_;return r().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:s=e(n),r.prev=1,s.s();case 3:if((f=s.n()).done){r.next=19;break}if(l=f.value,p=l.item_id,!((d=l.fields.find(function(e){return e.element_id===i}))&&d.field_value&&d.field_value.length>0)){r.next=17;break}return r.next=10,a.gudhub.getDocument({_id:d.field_value});case 10:if(!(h=r.sent)||!h.data){r.next=17;break}return r.next=14,a.gudhub.createDocument({app_id:t,item_id:p,element_id:i,data:h.data});case 14:_=r.sent,d.field_value=_._id,u.push(l);case 17:r.next=3;break;case 19:r.next=24;break;case 21:r.prev=21,r.t0=r.catch(1),s.e(r.t0);case 24:return r.prev=24,s.f(),r.finish(24);case 27:c(u);case 28:case"end":return r.stop()}},o,null,[[1,21,24,27]])}));return function(e){return c.apply(this,arguments)}}())}},{key:"_replaceValueItemRef",value:function(e,t,n){e.items_list.forEach(function(e){e.fields.forEach(function(e){if(e.field_id===t.field_id&&e.field_value){var r=e.field_value.split(",");r.forEach(function(e,t){var i=e.split(".");n.apps.forEach(function(e){i[0]==e.old_app_id&&(i[0]=e.new_app_id)}),n.items.forEach(function(e){i[1]==e.old_item_id&&(i[1]=e.new_item_id)}),r[t]=i.join(".")}),e.field_value=r.join(",")}})})}},{key:"_addFieldValue",value:function(e,t,n){t.forEach(function(t){n.items.forEach(function(n){t.item_id===n.new_item_id&&e.forEach(function(e){n.old_item_id===e.item_id&&(t.fields=e.fields)})})})}},{key:"_updateMap",value:function(e,t){var n=this;t.forEach(function(t){e.forEach(function(e){t.index_number===e.index_number&&n.appsConnectingMap.items.push({old_item_id:t.item_id,new_item_id:e.item_id})})})}},{key:"_searchOldAppId",value:function(e,t){var n=0;return t.forEach(function(t){t.new_app_id===e&&(n=t.old_app_id)}),n}},{key:"createApps",value:function(t,n,i){var a=this,u=this,c={step_size:100/(3*t.apps.length),apps:[]};return new Promise(function(){var s=o(r().mark(function o(s){var f,l,p,d,h,_,v,m;return r().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return f={},l=[],p=[],o.next=5,u.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});case 5:d=o.sent,h=d.accesstoken,_=e(t.apps),o.prev=8,m=r().mark(function e(){var o,d,_,m;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=v.value,!i){e.next=7;break}return e.next=4,u.gudhub.req.axiosRequest({url:"https://gudhub.com/GudHub_Test/api/app/get?token=".concat(h,"&app_id=").concat(o),method:"GET"});case 4:d=e.sent,e.next=10;break;case 7:return e.next=9,u.gudhub.getApp(o);case 9:d=e.sent;case 10:n&&n.call(a,"GET APP: ".concat(d.app_name," (App steps)")),_=JSON.parse(JSON.stringify(d)),f[_.app_id]=_,c.apps.push(_.icon),(m=u.prepareAppTemplate(_)).app_name=m.app_name+" New",m.privacy=1,t.data_to_change&&(t.data_to_change.name&&(m.app_name=t.data_to_change.name),t.data_to_change.icon&&(m.icon=t.data_to_change.icon)),u.resetViewsIds(m),u.gudhub.createNewApp(m).then(function(e){n&&n.call(a,"CREATE NEW APP: ".concat(d.app_name," (App steps)")),l.push(e),u.mapApp(_,e,u.appsConnectingMap),t.apps.length==l.length&&(u.connectApps(l,u.appsConnectingMap,f),l.forEach(function(e){u.gudhub.updateApp(e).then(function(e){n&&n.call(a,"UPDATE APP: ".concat(d.app_name," (App steps)")),p.push(e),t.apps.length==p.length&&s(p)})}))});case 20:case"end":return e.stop()}},e)}),_.s();case 11:if((v=_.n()).done){o.next=15;break}return o.delegateYield(m(),"t0",13);case 13:o.next=11;break;case 15:o.next=20;break;case 17:o.prev=17,o.t1=o.catch(8),_.e(o.t1);case 20:return o.prev=20,_.f(),o.finish(20);case 23:case"end":return o.stop()}},o,null,[[8,17,20,23]])}));return function(e){return s.apply(this,arguments)}}())}},{key:"mapApp",value:function(e,t,n){n.apps.push({old_app_id:e.app_id,new_app_id:t.app_id,old_view_init:e.view_init,new_view_init:t.view_init}),e.field_list.forEach(function(e){t.field_list.forEach(function(t){e.name_space==t.name_space&&n.fields.push({name_space:e.name_space,old_field_id:e.field_id,new_field_id:t.field_id})})}),e.views_list.forEach(function(e){t.views_list.forEach(function(t){e.name==t.name&&n.views.push({name:e.name,old_view_id:e.view_id,new_view_id:t.view_id})})})}},{key:"crawling",value:function(e,t){var n=null===e?[]:Object.keys(e),r=this;n.length>0&&n.forEach(function(n){var i=e[n];void 0!==i&&"string"!=typeof e&&(t(n,i,e),r.crawling(i,t))})}},{key:"resetViewsIds",value:function(e){e.view_init=0,this.crawling(e.views_list,function(e,t,n){"view_id"!=e&&"container_id"!=e||(n[e]=0)})}},{key:"connectApps",value:function(e,t,n){var r=this;return e.forEach(function(e){t.apps.forEach(function(n){e.view_init===n.new_view_init&&t.views.forEach(function(t){n.old_view_init===t.old_view_id&&(e.view_init=t.new_view_id)})}),r.crawling(e.field_list,function(i,o,a){var u=function(e,t){return t.some(function(t){return-1!==e.indexOf(t)})};if(u(i,["field_id","FieldId","destination_field","element_id"])){var c=String(o).split(","),s=[];t.fields.forEach(function(e){c.forEach(function(t){t==e.old_field_id&&s.push(e.new_field_id)})}),s.length&&(a[i]=s.join(","))}if(u(i,["app_id","AppId","destination_app"])&&t.apps.forEach(function(e){o==e.old_app_id&&(a[i]=e.new_app_id)}),u(i,["view_id"])&&t.views.forEach(function(e){o==e.old_view_id&&(a[i]=e.new_view_id)}),u(i,["src"])&&isFinite(o)){var f=t.apps.find(function(t){return t.new_app_id===e.app_id}).old_app_id,l=r.findPath(n[f].views_list,"container_id",o);a[i]="".concat(r.getValueByPath(e.views_list,l,"container_id"))}if(-1!==i.indexOf("trigger")&&o.model&&o.model.nodes){var p=o.model.nodes,d=["inputs","outputs"],h=function(e){d.forEach(function(n){var r=p[e];Object.keys(r[n]).filter(function(e){return""!==e&&!isNaN(e)}).forEach(function(e){var i=t.fields.filter(function(t){return t.old_field_id==e});if(0!==i.length&&i[0].new_field_id){var o=i[0].new_field_id.toString(),a=r[n][e];a.connections.forEach(function(t){t.input==e&&(t.input=o),t.output==e&&(t.output=o)}),delete r[n][e],r[n][o]=a}})})};for(var _ in p)h(_)}})}),e}},{key:"getValueByPath",value:function(e,t,n){var r=e;return t.split(".").forEach(function(e){r=r[e]}),r[n]}},{key:"findPath",value:function(e,t,n){var r=!1,i=!1,o=[];return this.crawling(e,function(e,u,c){i&&o.reverse().forEach(function(e){i&&(e.delete=!0,e.parent===c&&(i=!1,(o=o.filter(function(e){return!e.delete})).reverse()))}),r||("object"===a(c[e])&&o.push({prop:e,parent:c}),u==n&&t===e?r=!0:Object.keys(c).pop()===e&&"object"!==a(c[e])&&(i=!0))}),o.map(function(e){return e.prop}).join(".")}},{key:"prepareAppTemplate",value:function(e){var t=JSON.parse(JSON.stringify(e));return this.crawling(t.views_list,function(e,t,n){"element_id"==e&&(n.element_id=-Number(t),n.create_element=-Number(t))}),t.field_list.forEach(function(e){e.create_field=-Number(e.field_id),e.element_id=-Number(e.field_id),e.field_id=-Number(e.field_id),e.field_value=""}),t.items_list=[],delete t.app_id,delete t.icon.id,delete t.group_id,delete t.trash,delete t.last_update,delete t.file_list,t}}])}();
241
+ "use strict";function e(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(c(e)+" is not iterable")}function t(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=n(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,c=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return u=e.done,e},e:function(e){c=!0,o=e},f:function(){try{u||null==i.return||i.return()}finally{if(c)throw o}}}}function n(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function r(){var e,t,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function u(n,i,r,o){var u=i&&i.prototype instanceof f?i:f,l=Object.create(u.prototype);return a(l,"_invoke",function(n,i,r){var a,o,u,f=0,l=r||[],s=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,o=0,u=e,p.n=n,c}};function d(n,i){for(o=n,u=i,t=0;!s&&f&&!r&&t<l.length;t++){var r,a=l[t],d=p.p,_=a[2];n>3?(r=_===i)&&(u=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=d&&((r=n<2&&d<a[1])?(o=0,p.v=i,p.n=a[1]):d<_&&(r=n<3||a[0]>i||i>_)&&(a[4]=n,a[5]=i,p.n=_,o=0))}if(r||n>1)return c;throw s=!0,i}return function(r,l,_){if(f>1)throw TypeError("Generator is already running");for(s&&1===l&&d(l,_),o=l,u=_;(t=o<2?e:u)||!s;){a||(o?o<3?(o>1&&(p.n=-1),d(o,u)):p.n=u:p.v=u);try{if(f=2,a){if(o||(r="next"),t=a[r]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,o<2&&(o=0)}else 1===o&&(t=a.return)&&t.call(a),o<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),o=1);a=e}else if((t=(s=p.n<0)?u:n.call(i,p))!==c)break}catch(t){a=e,o=1,u=t}finally{f=1}}return{value:t,done:s}}}(n,r,o),!0),l}var c={};function f(){}function l(){}function s(){}t=Object.getPrototypeOf;var p=[][i]?t(t([][i]())):(a(t={},i,function(){return this}),t),d=s.prototype=f.prototype=Object.create(p);function _(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,a(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=s,a(d,"constructor",s),a(s,"constructor",l),l.displayName="GeneratorFunction",a(s,o,"GeneratorFunction"),a(d),a(d,o,"Generator"),a(d,i,function(){return this}),a(d,"toString",function(){return"[object Generator]"}),(r=function(){return{w:u,m:_}})()}function a(e,t,n,i){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}(a=function(e,t,n,i){if(t)r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n;else{var o=function(t,n){a(e,t,function(e){return this._invoke(t,n,e)})};o("next",0),o("throw",1),o("return",2)}})(e,t,n,i)}function o(e,t,n,i,r,a,o){try{var u=e[a](o),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(i,r)}function u(e){return function(){var t=this,n=arguments;return new Promise(function(i,r){var a=e.apply(t,n);function u(e){o(a,i,r,u,c,"next",e)}function c(e){o(a,i,r,u,c,"throw",e)}u(void 0)})}}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,p(i.key),i)}}function s(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e){var t=d(e,"string");return"symbol"==c(t)?t:t+""}function d(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=c(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _=exports.default=function(){return s(function e(t){f(this,e),this.gudhub=t,this.appsConnectingMap={apps:[],fields:[],items:[],views:[]}},[{key:"createAppsFromTemplate",value:function(e,t,n,i){var r=this,a=this;return new Promise(function(o){var u=100/(6*e.apps.length),f=0;a.createApps(e,function(e){f+=1,n&&n.call(r,{percent:f*u,status:e})},i).then(function(e){a.createItems(e,t,function(e){"string"==typeof e?(f+=1,n&&n.call(r,{percent:f*u,status:e})):"object"===c(e)&&(n&&n.call(r,{status:"Done",apps:e}),o())},i)})})}},{key:"createItems",value:function(e,t,n,i){var a=this;return new Promise(function(){var o=u(r().m(function o(c){var f,l,s,p,d,_;return r().w(function(o){for(;;)switch(o.n){case 0:return f=t||1e5,l=a,s=[],p=[],o.n=1,l.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});case 1:d=o.v,_=d.accesstoken,e.forEach(function(e){p.push(new Promise(function(){var t=u(r().m(function t(o){var u,c,p;return r().w(function(t){for(;;)switch(t.n){case 0:if(!i){t.n=2;break}return t.n=1,l.gudhub.req.axiosRequest({url:"https://gudhub.com/GudHub_Test/api/app/get?token=".concat(_,"&app_id=").concat(l._searchOldAppId(e.app_id,l.appsConnectingMap.apps)),method:"GET"});case 1:u=t.v,t.n=4;break;case 2:return t.n=3,l.gudhub.getApp(l._searchOldAppId(e.app_id,l.appsConnectingMap.apps));case 3:u=t.v;case 4:n&&n.call(a,"GET APP: ".concat(u.app_name," (Items steps)")),c=JSON.parse(JSON.stringify(u)),p=c.items_list.map(function(e){return{index_number:e.index_number,item_id:0,fields:[]}}).filter(function(e,t){return t<=f}),l.gudhub.addNewItems(e.app_id,p).then(function(t){n&&n.call(a,"ADD NEW ITEMS: ".concat(u.app_name," (Items steps)")),e.items_list=t,l._updateMap(e.items_list,c.items_list),l._addFieldValue(c.items_list,e.items_list,l.appsConnectingMap),s.push(e),o()});case 5:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}()))}),Promise.all(p).then(function(){s.forEach(function(e){e.items_list.forEach(function(e){e.fields.forEach(function(e){l.appsConnectingMap.fields.forEach(function(t){e.field_id===t.old_field_id&&(e.field_id=t.new_field_id,e.element_id=t.new_field_id)})})})}),l.deleteField(s),l.replaceValue(s,l.appsConnectingMap).then(function(){var e=[];s.forEach(function(t){e.push(new Promise(function(e){var i=t.items_list.map(function(e){return e.fields.forEach(function(e){delete e.data_id}),e});l.gudhub.updateItems(t.app_id,i).then(function(){n&&n.call(a,"REPLACE VALUE: ".concat(t.app_name," (Items steps)")),e()})}))}),Promise.all(e).then(function(){n.call(a,s),c()})})});case 2:return o.a(2)}},o)}));return function(e){return o.apply(this,arguments)}}())}},{key:"deleteField",value:function(e){e.forEach(function(e){e.items_list.forEach(function(t){t.fields=t.fields.filter(function(t){return e.field_list.findIndex(function(e){return e.field_id==t.field_id})>-1})})})}},{key:"replaceValue",value:function(e,t){var n=this;return new Promise(function(){var i=u(r().m(function i(a){var o,u;return r().w(function(i){for(;;)switch(i.n){case 0:o=[],u=n,e.forEach(function(e){e.field_list.forEach(function(n){"item_ref"===n.data_type&&u._replaceValueItemRef(e,n,t),o.push(new Promise(function(t){u.gudhub.ghconstructor.getInstance(n.data_type).then(function(i){return void 0===i?(console.log("ERROR WHILE GETTING INSTANCE OF ",n.data_type),void t({type:n.data_type})):"file"==i.getTemplate().constructor?u.gudhub.util.fileInstallerHelper(e.app_id,e.items_list,n.field_id).then(function(e){t(e)}):void("document"==i.getTemplate().constructor?u.documentInstallerHelper(e.app_id,e.items_list,n.field_id).then(function(e){t(i)}):t(i))})}))})}),o.length>0?Promise.all(o).then(function(e){a(e)}):a(result);case 1:return i.a(2)}},i)}));return function(e){return i.apply(this,arguments)}}())}},{key:"documentInstallerHelper",value:function(e,n,i){var a=this,o=[];return new Promise(function(){var c=u(r().m(function u(c){var f,l,s,p,d,_,h,v;return r().w(function(r){for(;;)switch(r.n){case 0:f=t(n),r.p=1,f.s();case 2:if((l=f.n()).done){r.n=6;break}if(s=l.value,p=s.item_id,!((d=s.fields.find(function(e){return e.element_id===i}))&&d.field_value&&d.field_value.length>0)){r.n=5;break}return r.n=3,a.gudhub.getDocument({_id:d.field_value});case 3:if(!(_=r.v)||!_.data){r.n=5;break}return r.n=4,a.gudhub.createDocument({app_id:e,item_id:p,element_id:i,data:_.data});case 4:h=r.v,d.field_value=h._id,o.push(s);case 5:r.n=2;break;case 6:r.n=8;break;case 7:r.p=7,v=r.v,f.e(v);case 8:return r.p=8,f.f(),r.f(8);case 9:c(o);case 10:return r.a(2)}},u,null,[[1,7,8,9]])}));return function(e){return c.apply(this,arguments)}}())}},{key:"_replaceValueItemRef",value:function(e,t,n){e.items_list.forEach(function(e){e.fields.forEach(function(e){if(e.field_id===t.field_id&&e.field_value){var i=e.field_value.split(",");i.forEach(function(e,t){var r=e.split(".");n.apps.forEach(function(e){r[0]==e.old_app_id&&(r[0]=e.new_app_id)}),n.items.forEach(function(e){r[1]==e.old_item_id&&(r[1]=e.new_item_id)}),i[t]=r.join(".")}),e.field_value=i.join(",")}})})}},{key:"_addFieldValue",value:function(e,t,n){t.forEach(function(t){n.items.forEach(function(n){t.item_id===n.new_item_id&&e.forEach(function(e){n.old_item_id===e.item_id&&(t.fields=e.fields)})})})}},{key:"_updateMap",value:function(e,t){var n=this;t.forEach(function(t){e.forEach(function(e){t.index_number===e.index_number&&n.appsConnectingMap.items.push({old_item_id:t.item_id,new_item_id:e.item_id})})})}},{key:"_searchOldAppId",value:function(e,t){var n=0;return t.forEach(function(t){t.new_app_id===e&&(n=t.old_app_id)}),n}},{key:"createApps",value:function(n,i,a){var o=this,c=this,f={step_size:100/(3*n.apps.length),apps:[]};return new Promise(function(){var l=u(r().m(function u(l){var s,p,d,_,h,v,m,y,b;return r().w(function(u){for(;;)switch(u.n){case 0:return s={},p=[],d=[],u.n=1,c.gudhub.req.axiosRequest({method:"POST",url:"https://gudhub.com/GudHub_Test/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});case 1:_=u.v,h=_.accesstoken,v=t(n.apps),u.p=2,y=r().m(function e(){var t,u,_,v;return r().w(function(e){for(;;)switch(e.n){case 0:if(t=m.value,!a){e.n=2;break}return e.n=1,c.gudhub.req.axiosRequest({url:"https://gudhub.com/GudHub_Test/api/app/get?token=".concat(h,"&app_id=").concat(t),method:"GET"});case 1:u=e.v,e.n=4;break;case 2:return e.n=3,c.gudhub.getApp(t);case 3:u=e.v;case 4:i&&i.call(o,"GET APP: ".concat(u.app_name," (App steps)")),_=JSON.parse(JSON.stringify(u)),s[_.app_id]=_,f.apps.push(_.icon),(v=c.prepareAppTemplate(_)).app_name=v.app_name+" New",v.privacy=1,n.data_to_change&&(n.data_to_change.name&&(v.app_name=n.data_to_change.name),n.data_to_change.icon&&(v.icon=n.data_to_change.icon)),c.resetViewsIds(v),c.gudhub.createNewApp(v).then(function(e){i&&i.call(o,"CREATE NEW APP: ".concat(u.app_name," (App steps)")),p.push(e),c.mapApp(_,e,c.appsConnectingMap),n.apps.length==p.length&&(c.connectApps(p,c.appsConnectingMap,s),p.forEach(function(e){c.gudhub.updateApp(e).then(function(e){i&&i.call(o,"UPDATE APP: ".concat(u.app_name," (App steps)")),d.push(e),n.apps.length==d.length&&l(d)})}))});case 5:return e.a(2)}},e)}),v.s();case 3:if((m=v.n()).done){u.n=5;break}return u.d(e(y()),4);case 4:u.n=3;break;case 5:u.n=7;break;case 6:u.p=6,b=u.v,v.e(b);case 7:return u.p=7,v.f(),u.f(7);case 8:return u.a(2)}},u,null,[[2,6,7,8]])}));return function(e){return l.apply(this,arguments)}}())}},{key:"mapApp",value:function(e,t,n){n.apps.push({old_app_id:e.app_id,new_app_id:t.app_id,old_view_init:e.view_init,new_view_init:t.view_init}),e.field_list.forEach(function(e){t.field_list.forEach(function(t){e.name_space==t.name_space&&n.fields.push({name_space:e.name_space,old_field_id:e.field_id,new_field_id:t.field_id})})}),e.views_list.forEach(function(e){t.views_list.forEach(function(t){e.name==t.name&&n.views.push({name:e.name,old_view_id:e.view_id,new_view_id:t.view_id})})})}},{key:"crawling",value:function(e,t){var n=null===e?[]:Object.keys(e),i=this;n.length>0&&n.forEach(function(n){var r=e[n];void 0!==r&&"string"!=typeof e&&(t(n,r,e),i.crawling(r,t))})}},{key:"resetViewsIds",value:function(e){e.view_init=0,this.crawling(e.views_list,function(e,t,n){"view_id"!=e&&"container_id"!=e||(n[e]=0)})}},{key:"connectApps",value:function(e,t,n){var i=this;return e.forEach(function(e){t.apps.forEach(function(n){e.view_init===n.new_view_init&&t.views.forEach(function(t){n.old_view_init===t.old_view_id&&(e.view_init=t.new_view_id)})}),i.crawling(e.field_list,function(r,a,o){var u=function(e,t){return t.some(function(t){return-1!==e.indexOf(t)})};if(u(r,["field_id","FieldId","destination_field","element_id"])){var c=String(a).split(","),f=[];t.fields.forEach(function(e){c.forEach(function(t){t==e.old_field_id&&f.push(e.new_field_id)})}),f.length&&(o[r]=f.join(","))}if(u(r,["app_id","AppId","destination_app"])&&t.apps.forEach(function(e){a==e.old_app_id&&(o[r]=e.new_app_id)}),u(r,["view_id"])&&t.views.forEach(function(e){a==e.old_view_id&&(o[r]=e.new_view_id)}),u(r,["src"])&&isFinite(a)){var l=t.apps.find(function(t){return t.new_app_id===e.app_id}).old_app_id,s=i.findPath(n[l].views_list,"container_id",a);o[r]="".concat(i.getValueByPath(e.views_list,s,"container_id"))}if(-1!==r.indexOf("trigger")&&a.model&&a.model.nodes){var p=a.model.nodes,d=["inputs","outputs"],_=function(e){d.forEach(function(n){var i=p[e];Object.keys(i[n]).filter(function(e){return""!==e&&!isNaN(e)}).forEach(function(e){var r=t.fields.filter(function(t){return t.old_field_id==e});if(0!==r.length&&r[0].new_field_id){var a=r[0].new_field_id.toString(),o=i[n][e];o.connections.forEach(function(t){t.input==e&&(t.input=a),t.output==e&&(t.output=a)}),delete i[n][e],i[n][a]=o}})})};for(var h in p)_(h)}})}),e}},{key:"getValueByPath",value:function(e,t,n){var i=e;return t.split(".").forEach(function(e){i=i[e]}),i[n]}},{key:"findPath",value:function(e,t,n){var i=!1,r=!1,a=[];return this.crawling(e,function(e,o,u){r&&a.reverse().forEach(function(e){r&&(e.delete=!0,e.parent===u&&(r=!1,(a=a.filter(function(e){return!e.delete})).reverse()))}),i||("object"===c(u[e])&&a.push({prop:e,parent:u}),o==n&&t===e?i=!0:Object.keys(u).pop()===e&&"object"!==c(u[e])&&(r=!0))}),a.map(function(e){return e.prop}).join(".")}},{key:"prepareAppTemplate",value:function(e){var t=JSON.parse(JSON.stringify(e));return this.crawling(t.views_list,function(e,t,n){"element_id"==e&&(n.element_id=-Number(t),n.create_element=-Number(t))}),t.field_list.forEach(function(e){e.create_field=-Number(e.field_id),e.element_id=-Number(e.field_id),e.field_id=-Number(e.field_id),e.field_value=""}),t.items_list=[],delete t.app_id,delete t.icon.id,delete t.group_id,delete t.trash,delete t.last_update,delete t.file_list,t}}])}();
230
242
  },{}],"E7yc":[function(require,module,exports) {
231
243
  "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e){return o(e)||i(e)||n(e)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(e,t){if(e){if("string"==typeof e)return u(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function o(e){if(Array.isArray(e))return u(e)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function a(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(t){var r=s(t,"string");return"symbol"==e(r)?r:r+""}function s(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileHelper=void 0;var d=exports.FileHelper=function(){return a(function e(t){l(this,e),this.gudhub=t},[{key:"fileInstallerHelper",value:function(e,r,n){var i=this;return new Promise(function(o){var u=[[]],l=Promise.resolve(),f=[];r.forEach(function(t){var r=t.item_id,i=t.fields.find(function(e){return e.element_id===n});i&&i.field_value&&i.field_value.split(".").forEach(function(t){var i={source:t,destination:{app_id:e,item_id:r,element_id:n}};10!==u[u.length-1].length?u[u.length-1].push(i):u.push([i])})}),u.forEach(function(e){l=l.then(function(){return i.gudhub.duplicateFile(e)}).then(function(e){f=[].concat(t(f),t(e))})}),l.then(function(){r.forEach(function(e){var t=e.item_id,r=e.fields.find(function(e){return e.element_id===n});r&&r.field_value&&(r.field_value="",f.forEach(function(e){e.item_id===t&&(r.field_value=r.field_value.split(",").filter(function(e){return e}).concat(e.file_id).join(","))}))}),o()})})}}])}();
232
244
  },{}],"AefJ":[function(require,module,exports) {
233
245
  "use strict";function e(e,t){return JSON.stringify(e)===JSON.stringify(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareObjects=e;
234
246
  },{}],"ndUf":[function(require,module,exports) {
235
- "use strict";function t(r){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})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(e){s=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),u=new N(n||[]);return a(i,"_invoke",{value:S(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function x(){}var L={};s(L,c,function(){return this});var E=Object.getPrototypeOf,j=E&&E(E(T([])));j&&j!==o&&i.call(j,c)&&(L=j);var _=x.prototype=b.prototype=Object.create(L);function k(t){["next","throw","return"].forEach(function(r){s(t,r,function(t){return this._invoke(r,t)})})}function O(r,e){function n(o,a,u,c){var f=p(r[o],r,a);if("throw"!==f.type){var l=f.arg,s=l.value;return s&&"object"==t(s)&&i.call(s,"__await")?e.resolve(s.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(s).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,c)})}c(f.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function S(t,r,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(t,r,n);if("normal"===f.type){if(o=n.done?m:v,f.arg===g)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=m,n.method="throw",n.arg=f.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function G(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function T(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=x,a(_,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=s(x,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,s(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},n.awrap=function(t){return{__await:t}},k(O.prototype),s(O.prototype,f,function(){return this}),n.AsyncIterator=O,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(_),s(_,l,"Generator"),s(_,c,function(){return this}),s(_,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=T,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(G),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),G(e),g}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;G(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},n}function e(t,r){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=n(t))||r&&t&&"number"==typeof t.length){e&&(t=e);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==e.return||e.return()}finally{if(c)throw a}}}}function n(t,r){if(t){if("string"==typeof t)return o(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?o(t,r):void 0}}function o(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}function i(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function a(t){return function(){var r=this,e=arguments;return new Promise(function(n,o){var a=t.apply(r,e);function u(t){i(a,n,o,u,c,"next",t)}function c(t){i(a,n,o,u,c,"throw",t)}u(void 0)})}}function u(t){return c.apply(this,arguments)}function c(){return(c=a(r().mark(function t(n){var o,i,a,c,l;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(n);case 2:o=!0,i=e(n),t.prev=4,i.s();case 6:if((a=i.n()).done){t.next=19;break}return c=a.value,t.next=10,f(c);case 10:if("pending"!==(l=t.sent).state){t.next=14;break}return o=!1,t.abrupt("break",19);case 14:if("rejected"!==l.state){t.next=17;break}throw l.reason;case 17:t.next=6;break;case 19:t.next=24;break;case 21:t.prev=21,t.t0=t.catch(4),i.e(t.t0);case 24:return t.prev=24,i.f(),t.finish(24);case 27:if(!o){t.next=29;break}return t.abrupt("return",!0);case 29:return t.abrupt("return",u(n));case 30:case"end":return t.stop()}},t,null,[[4,21,24,27]])}))).apply(this,arguments)}function f(t){var r={state:"pending"};return Promise.race([t,r]).then(function(t){return t===r?t:{state:"resolved",value:t}},function(t){return{state:"rejected",reason:t}})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.dynamicPromiseAll=u;
247
+ "use strict";function t(){var n,e,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function u(t,o,a,i){var u=o&&o.prototype instanceof f?o:f,s=Object.create(u.prototype);return r(s,"_invoke",function(t,r,o){var a,i,u,f=0,s=o||[],l=!1,p={p:0,n:0,v:n,a:v,f:v.bind(n,4),d:function(t,r){return a=t,i=0,u=n,p.n=r,c}};function v(t,r){for(i=t,u=r,e=0;!l&&f&&!o&&e<s.length;e++){var o,a=s[e],v=p.p,y=a[2];t>3?(o=y===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=n):a[0]<=v&&((o=t<2&&v<a[1])?(i=0,p.v=r,p.n=a[1]):v<y&&(o=t<3||a[0]>r||r>y)&&(a[4]=t,a[5]=r,p.n=y,i=0))}if(o||t>1)return c;throw l=!0,r}return function(o,s,y){if(f>1)throw TypeError("Generator is already running");for(l&&1===s&&v(s,y),i=s,u=y;(e=i<2?n:u)||!l;){a||(i?i<3?(i>1&&(p.n=-1),v(i,u)):p.n=u:p.v=u);try{if(f=2,a){if(i||(o="next"),e=a[o]){if(!(e=e.call(a,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,i<2&&(i=0)}else 1===i&&(e=a.return)&&e.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=n}else if((e=(l=p.n<0)?u:t.call(r,p))!==c)break}catch(e){a=n,i=1,u=e}finally{f=1}}return{value:e,done:l}}}(t,a,i),!0),s}var c={};function f(){}function s(){}function l(){}e=Object.getPrototypeOf;var p=[][a]?e(e([][a]())):(r(e={},a,function(){return this}),e),v=l.prototype=f.prototype=Object.create(p);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,r(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t}return s.prototype=l,r(v,"constructor",l),r(l,"constructor",s),s.displayName="GeneratorFunction",r(l,i,"GeneratorFunction"),r(v),r(v,i,"Generator"),r(v,a,function(){return this}),r(v,"toString",function(){return"[object Generator]"}),(t=function(){return{w:u,m:y}})()}function r(t,n,e,o){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}(r=function(t,n,e,o){if(n)a?a(t,n,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[n]=e;else{var i=function(n,e){r(t,n,function(t){return this._invoke(n,e,t)})};i("next",0),i("throw",1),i("return",2)}})(t,n,e,o)}function n(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=e(t))||r&&t&&"number"==typeof t.length){n&&(t=n);var o=0,a=function(){};return{s:a,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw i}}}}function e(t,r){if(t){if("string"==typeof t)return o(t,r);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,r):void 0}}function o(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=Array(r);n<r;n++)e[n]=t[n];return e}function a(t,r,n,e,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void n(t)}u.done?r(c):Promise.resolve(c).then(e,o)}function i(t){return function(){var r=this,n=arguments;return new Promise(function(e,o){var i=t.apply(r,n);function u(t){a(i,e,o,u,c,"next",t)}function c(t){a(i,e,o,u,c,"throw",t)}u(void 0)})}}function u(t){return c.apply(this,arguments)}function c(){return(c=i(t().m(function r(e){var o,a,i,c,s,l;return t().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.all(e);case 1:o=!0,a=n(e),t.p=2,a.s();case 3:if((i=a.n()).done){t.n=7;break}return c=i.value,t.n=4,f(c);case 4:if("pending"!==(s=t.v).state){t.n=5;break}return o=!1,t.a(3,7);case 5:if("rejected"!==s.state){t.n=6;break}throw s.reason;case 6:t.n=3;break;case 7:t.n=9;break;case 8:t.p=8,l=t.v,a.e(l);case 9:return t.p=9,a.f(),t.f(9);case 10:if(!o){t.n=11;break}return t.a(2,!0);case 11:return t.a(2,u(e))}},r,null,[[2,8,9,10]])}))).apply(this,arguments)}function f(t){var r={state:"pending"};return Promise.race([t,r]).then(function(t){return t===r?t:{state:"resolved",value:t}},function(t){return{state:"rejected",reason:t}})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.dynamicPromiseAll=u;
236
248
  },{}],"Owq4":[function(require,module,exports) {
237
249
  "use strict";function e(e,t){if(!e||!e.length)return[];if(!e[0].fields.length)return e;var r=t&&t.sort_field_id||e[0].fields[0].field_id;function s(e){for(var t=null,s=0;s<e.fields.length;s++)if(e.fields[s].field_id==r){t=e.fields[s].field_value;break}return t}return e.sort(function(e,t){var r=s(e),d=s(t);return null===r?-1:null===d?1:/^\d+$/.test(r)&&/^\d+$/.test(d)?Number(r)<Number(d)?-1:1:/^\d+$/.test(r)||/^\d+$/.test(d)?/^\d+$/.test(r)?-1:1:r.toLowerCase()>d.toLowerCase()?1:-1}),t&&t.descending?e.reverse():e}Object.defineProperty(exports,"__esModule",{value:!0}),exports.sortItems=e;
238
250
  },{}],"mWlG":[function(require,module,exports) {
239
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Utils=void 0;var e=require("./filter/filterPreparation.js"),t=k(require("./filter/filter.js")),r=require("./filter/mergeFilters.js"),n=require("./json_to_items/json_to_items.js"),i=require("./merge_compare_items/merge_compare_items.js"),o=require("./filter/group.js"),u=require("./filter/utils.js"),a=k(require("./populate_items/populate_items.js")),c=require("./get_date/get_date.js"),s=require("./merge_objects/merge_objects.js"),l=require("./merge_chunks/merge_chunks.js"),f=require("./nested_list/nested_list.js"),p=k(require("./MergeFields/MergeFields.js")),h=k(require("./ItemsSelection/ItemsSelection.js")),m=require("./compare_items_lists_worker/compare_items_lists.worker.js"),v=require("./json_constructor/json_constructor.js"),y=k(require("./AppsTemplateService/AppsTemplateService.js")),d=require("./FIleHelper/FileHelper.js"),g=require("./compareObjects/compareObjects.js"),w=require("./dynamicPromiseAll/dynamicPromiseAll.js"),b=require("./filter/sortItems.js");function k(e){return e&&e.__esModule?e:{default:e}}function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(){_=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function s(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof d?t:d,u=Object.create(o.prototype),a=new q(n||[]);return i(u,"_invoke",{value:F(e,r,a)}),u}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",h="suspendedYield",m="executing",v="completed",y={};function d(){}function g(){}function w(){}var b={};s(b,u,function(){return this});var k=Object.getPrototypeOf,L=k&&k(k(P([])));L&&L!==r&&n.call(L,u)&&(b=L);var I=w.prototype=d.prototype=Object.create(b);function S(e){["next","throw","return"].forEach(function(t){s(e,t,function(e){return this._invoke(t,e)})})}function x(e,t){function r(i,o,u,a){var c=f(e[i],e,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==j(l)&&n.call(l,"__await")?t.resolve(l.__await).then(function(e){r("next",e,u,a)},function(e){r("throw",e,u,a)}):t.resolve(l).then(function(e){s.value=e,u(s)},function(e){return r("throw",e,u,a)})}a(c.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t(function(t,i){r(e,n,t,i)})}return o=o?o.then(i,i):i()}})}function F(t,r,n){var i=p;return function(o,u){if(i===m)throw Error("Generator is already running");if(i===v){if("throw"===o)throw u;return{value:e,done:!0}}for(n.method=o,n.arg=u;;){var a=n.delegate;if(a){var c=E(a,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=m;var s=f(t,r,n);if("normal"===s.type){if(i=n.done?v:h,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=v,n.method="throw",n.arg=s.arg)}}}function E(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,E(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var u=o.arg;return u?u.done?(r[t.resultName]=u.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(j(t)+" is not iterable")}return g.prototype=w,i(I,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:g,configurable:!0}),g.displayName=s(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,s(e,c,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},S(x.prototype),s(x.prototype,a,function(){return this}),t.AsyncIterator=x,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var u=new x(l(e,r,n,i),o);return t.isGeneratorFunction(r)?u:u.next().then(function(e){return e.done?e.value:u.next()})},S(I),s(I,c,"Generator"),s(I,u,function(){return this}),s(I,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=P,q.prototype={constructor:q,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return a.type="throw",a.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],a=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var c=n.call(u,"catchLoc"),s=n.call(u,"finallyLoc");if(c&&s){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),O(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;O(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function L(e,t,r,n,i,o,u){try{var a=e[o](u),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,i)}function I(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function u(e){L(o,n,i,u,a,"next",e)}function a(e){L(o,n,i,u,a,"throw",e)}u(void 0)})}}function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function F(e,t,r){return t&&x(e.prototype,t),r&&x(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function E(e){var t=T(e,"string");return"symbol"==j(t)?t:t+""}function T(e,t){if("object"!=j(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var O=exports.Utils=function(){return F(function e(t){S(this,e),this.gudhub=t,this.MergeFields=new p.default(t),this.ItemsSelection=new h.default(t),this.AppsTemplateService=new y.default(t),this.FileHelper=new d.FileHelper(t)},[{key:"prefilter",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,e.filterPreparation)(t,this.gudhub.storage,this.gudhub.pipeService,r)}},{key:"filter",value:function(e,r){return(0,t.default)(e,r)}},{key:"mergeFilters",value:function(e,t){return(0,r.mergeFilters)(e,t)}},{key:"group",value:function(e,t){return(0,o.group)(e,t)}},{key:"getFilteredItems",value:function(){var e=I(_().mark(function e(){var t,r,n,i,o,a,c,s,l,f,p,h=arguments;return _().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.length>0&&void 0!==h[0]?h[0]:[],r=h.length>1&&void 0!==h[1]?h[1]:[],n=h.length>2?h[2]:void 0,i=h.length>3?h[3]:void 0,o=h.length>4?h[4]:void 0,a=h.length>5&&void 0!==h[5]?h[5]:"",c=h.length>6?h[6]:void 0,s=h.length>7?h[7]:void 0,e.next=10,this.prefilter(r,{element_app_id:n,app_id:i,item_id:o});case 10:return l=e.sent,f=this.filter(t,l),p=this.group(a,f),e.abrupt("return",p.filter(function(e){return!c||1===(0,u.searchValue)([e],c).length}).filter(function(e){return!s||1===(0,u.searchValue)([e],s).length}));case 14:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"jsonToItems",value:function(e,t){return(0,n.jsonToItems)(e,t)}},{key:"getDate",value:function(e){return(0,c.getDate)(e)}},{key:"checkRecurringDate",value:function(e,t){return(0,c.checkRecurringDate)(e,t)}},{key:"populateItems",value:function(e,t,r){return(0,a.default)(e,t,r)}},{key:"populateWithDate",value:function(e,t){return(0,c.populateWithDate)(e,t)}},{key:"populateWithItemRef",value:function(e,t,r,n,o,u){return(0,i.populateWithItemRef)(e,t,r,n,o,u)}},{key:"compareItems",value:function(e,t,r){return(0,i.compareItems)(e,t,r)}},{key:"mergeItems",value:function(e,t,r){return(0,i.mergeItems)(e,t,r)}},{key:"mergeObjects",value:function(e,t,r){return(0,s.mergeObjects)(e,t,r)}},{key:"makeNestedList",value:function(e,t,r,n,i){return(0,f.makeNestedList)(e,t,r,n,i)}},{key:"mergeChunks",value:function(e){return(0,l.mergeChunks)(e)}},{key:"mergeFieldLists",value:function(e,t){return this.MergeFields.mergeFieldLists(e,t)}},{key:"createFieldsListToView",value:function(e,t){return this.MergeFields.createFieldsListToView(e,t)}},{key:"createFieldsListToViewWithDataType",value:function(e,t){return this.MergeFields.createFieldsListToViewWithDataType(e,t)}},{key:"selectItems",value:function(e,t){return this.ItemsSelection.selectItems(e,t)}},{key:"getSelectedItems",value:function(e){return this.ItemsSelection.getSelectedItems(e)}},{key:"clearSelectedItems",value:function(e){return this.ItemsSelection.clearSelectedItems(e)}},{key:"isItemSelected",value:function(e,t){return this.ItemsSelection.isItemSelected(e,t)}},{key:"jsonConstructor",value:function(e,t,r,n){return(0,v.compiler)(e,t,this,r,n)}},{key:"fileInstallerHelper",value:function(e,t,r){return this.FileHelper.fileInstallerHelper(e,t,r)}},{key:"createAppsFromTemplate",value:function(e,t,r,n){return this.AppsTemplateService.createAppsFromTemplate(e,t,r,n)}},{key:"createApps",value:function(e){return this.AppsTemplateService.createApps(e)}},{key:"createItems",value:function(e,t){return this.AppsTemplateService.createItems(e,t)}},{key:"compareObjects",value:function(e,t){return(0,g.compareObjects)(e,t)}},{key:"compareAppsItemsLists",value:function(e,t,r){var n=new Blob([(0,m.compare_items_lists_Worker)()],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(n)),this.worker.postMessage({items_list1:e,items_list2:t}),this.worker.addEventListener("message",function(e){var t=e.data.diff;r(t)})}},{key:"dynamicPromiseAll",value:function(e){return(0,w.dynamicPromiseAll)(e)}},{key:"sortItems",value:function(e,t){return(0,b.sortItems)(e,t)}},{key:"debounce",value:function(e,t){var r;return function(){for(var n=this,i=arguments.length,o=new Array(i),u=0;u<i;u++)o[u]=arguments[u];clearTimeout(r),r=setTimeout(function(){e.apply(n,o)},t)}}}])}();
251
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Utils=void 0;var e=require("./filter/filterPreparation.js"),t=b(require("./filter/filter.js")),r=require("./filter/mergeFilters.js"),n=require("./json_to_items/json_to_items.js"),i=require("./merge_compare_items/merge_compare_items.js"),o=require("./filter/group.js"),u=require("./filter/utils.js"),s=b(require("./populate_items/populate_items.js")),l=require("./get_date/get_date.js"),a=require("./merge_objects/merge_objects.js"),c=require("./merge_chunks/merge_chunks.js"),f=require("./nested_list/nested_list.js"),p=b(require("./MergeFields/MergeFields.js")),m=b(require("./ItemsSelection/ItemsSelection.js")),v=require("./compare_items_lists_worker/compare_items_lists.worker.js"),y=require("./json_constructor/json_constructor.js"),h=b(require("./AppsTemplateService/AppsTemplateService.js")),d=require("./FIleHelper/FileHelper.js"),g=require("./compareObjects/compareObjects.js"),j=require("./dynamicPromiseAll/dynamicPromiseAll.js"),k=require("./filter/sortItems.js");function b(e){return e&&e.__esModule?e:{default:e}}function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(){var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var l=n&&n.prototype instanceof s?n:s,a=Object.create(l.prototype);return w(a,"_invoke",function(r,n,i){var o,s,l,a=0,c=i||[],f=!1,p={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,r){return o=t,s=0,l=e,p.n=r,u}};function m(r,n){for(s=r,l=n,t=0;!f&&a&&!i&&t<c.length;t++){var i,o=c[t],m=p.p,v=o[2];r>3?(i=v===n)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=m&&((i=r<2&&m<o[1])?(s=0,p.v=n,p.n=o[1]):m<v&&(i=r<3||o[0]>n||n>v)&&(o[4]=r,o[5]=n,p.n=v,s=0))}if(i||r>1)return u;throw f=!0,n}return function(i,c,v){if(a>1)throw TypeError("Generator is already running");for(f&&1===c&&m(c,v),s=c,l=v;(t=s<2?e:l)||!f;){o||(s?s<3?(s>1&&(p.n=-1),m(s,l)):p.n=l:p.v=l);try{if(a=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(f=p.n<0)?l:r.call(n,p))!==u)break}catch(t){o=e,s=1,l=t}finally{a=1}}return{value:t,done:f}}}(r,i,o),!0),a}var u={};function s(){}function l(){}function a(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(w(t={},n,function(){return this}),t),f=a.prototype=s.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,w(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return l.prototype=a,w(f,"constructor",a),w(a,"constructor",l),l.displayName="GeneratorFunction",w(a,i,"GeneratorFunction"),w(f),w(f,i,"Generator"),w(f,n,function(){return this}),w(f,"toString",function(){return"[object Generator]"}),(I=function(){return{w:o,m:p}})()}function w(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(w=function(e,t,r,n){if(t)i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r;else{var o=function(t,r){w(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}})(e,t,r,n)}function S(e,t,r,n,i,o,u){try{var s=e[o](u),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,i)}function F(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function u(e){S(o,n,i,u,s,"next",e)}function s(e){S(o,n,i,u,s,"throw",e)}u(void 0)})}}function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,P(n.key),n)}}function O(e,t,r){return t&&q(e.prototype,t),r&&q(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function P(e){var t=A(e,"string");return"symbol"==_(t)?t:t+""}function A(e,t){if("object"!=_(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=_(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L=exports.Utils=function(){return O(function e(t){T(this,e),this.gudhub=t,this.MergeFields=new p.default(t),this.ItemsSelection=new m.default(t),this.AppsTemplateService=new h.default(t),this.FileHelper=new d.FileHelper(t)},[{key:"prefilter",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,e.filterPreparation)(t,this.gudhub.storage,this.gudhub.pipeService,r)}},{key:"filter",value:function(e,r){return(0,t.default)(e,r)}},{key:"mergeFilters",value:function(e,t){return(0,r.mergeFilters)(e,t)}},{key:"group",value:function(e,t){return(0,o.group)(e,t)}},{key:"getFilteredItems",value:function(){var e=F(I().m(function e(){var t,r,n,i,o,s,l,a,c,f,p,m=arguments;return I().w(function(e){for(;;)switch(e.n){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:[],r=m.length>1&&void 0!==m[1]?m[1]:[],n=m.length>2?m[2]:void 0,i=m.length>3?m[3]:void 0,o=m.length>4?m[4]:void 0,s=m.length>5&&void 0!==m[5]?m[5]:"",l=m.length>6?m[6]:void 0,a=m.length>7?m[7]:void 0,e.n=1,this.prefilter(r,{element_app_id:n,app_id:i,item_id:o});case 1:return c=e.v,f=this.filter(t,c),p=this.group(s,f),e.a(2,p.filter(function(e){return!l||1===(0,u.searchValue)([e],l).length}).filter(function(e){return!a||1===(0,u.searchValue)([e],a).length}))}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"jsonToItems",value:function(e,t){return(0,n.jsonToItems)(e,t)}},{key:"getDate",value:function(e){return(0,l.getDate)(e)}},{key:"checkRecurringDate",value:function(e,t){return(0,l.checkRecurringDate)(e,t)}},{key:"populateItems",value:function(e,t,r){return(0,s.default)(e,t,r)}},{key:"populateWithDate",value:function(e,t){return(0,l.populateWithDate)(e,t)}},{key:"populateWithItemRef",value:function(e,t,r,n,o,u){return(0,i.populateWithItemRef)(e,t,r,n,o,u)}},{key:"compareItems",value:function(e,t,r){return(0,i.compareItems)(e,t,r)}},{key:"mergeItems",value:function(e,t,r){return(0,i.mergeItems)(e,t,r)}},{key:"mergeObjects",value:function(e,t,r){return(0,a.mergeObjects)(e,t,r)}},{key:"makeNestedList",value:function(e,t,r,n,i){return(0,f.makeNestedList)(e,t,r,n,i)}},{key:"mergeChunks",value:function(e){return(0,c.mergeChunks)(e)}},{key:"mergeFieldLists",value:function(e,t){return this.MergeFields.mergeFieldLists(e,t)}},{key:"createFieldsListToView",value:function(e,t){return this.MergeFields.createFieldsListToView(e,t)}},{key:"createFieldsListToViewWithDataType",value:function(e,t){return this.MergeFields.createFieldsListToViewWithDataType(e,t)}},{key:"selectItems",value:function(e,t){return this.ItemsSelection.selectItems(e,t)}},{key:"getSelectedItems",value:function(e){return this.ItemsSelection.getSelectedItems(e)}},{key:"clearSelectedItems",value:function(e){return this.ItemsSelection.clearSelectedItems(e)}},{key:"isItemSelected",value:function(e,t){return this.ItemsSelection.isItemSelected(e,t)}},{key:"jsonConstructor",value:function(e,t,r,n){return(0,y.compiler)(e,t,this,r,n)}},{key:"fileInstallerHelper",value:function(e,t,r){return this.FileHelper.fileInstallerHelper(e,t,r)}},{key:"createAppsFromTemplate",value:function(e,t,r,n){return this.AppsTemplateService.createAppsFromTemplate(e,t,r,n)}},{key:"createApps",value:function(e){return this.AppsTemplateService.createApps(e)}},{key:"createItems",value:function(e,t){return this.AppsTemplateService.createItems(e,t)}},{key:"compareObjects",value:function(e,t){return(0,g.compareObjects)(e,t)}},{key:"compareAppsItemsLists",value:function(e,t,r){var n=new Blob([(0,v.compare_items_lists_Worker)()],{type:"application/javascript"});this.worker=new Worker(URL.createObjectURL(n)),this.worker.postMessage({items_list1:e,items_list2:t}),this.worker.addEventListener("message",function(e){var t=e.data.diff;r(t)})}},{key:"dynamicPromiseAll",value:function(e){return(0,j.dynamicPromiseAll)(e)}},{key:"sortItems",value:function(e,t){return(0,k.sortItems)(e,t)}},{key:"debounce",value:function(e,t){var r;return function(){for(var n=this,i=arguments.length,o=new Array(i),u=0;u<i;u++)o[u]=arguments[u];clearTimeout(r),r=setTimeout(function(){e.apply(n,o)},t)}}}])}();
240
252
  },{"./filter/filterPreparation.js":"DvAj","./filter/filter.js":"mbGN","./filter/mergeFilters.js":"LXWr","./json_to_items/json_to_items.js":"UCDv","./merge_compare_items/merge_compare_items.js":"xDLX","./filter/group.js":"VgUi","./filter/utils.js":"zsiC","./populate_items/populate_items.js":"EzAv","./get_date/get_date.js":"VzfS","./merge_objects/merge_objects.js":"EE1j","./merge_chunks/merge_chunks.js":"AMYJ","./nested_list/nested_list.js":"S7Iy","./MergeFields/MergeFields.js":"vno1","./ItemsSelection/ItemsSelection.js":"DfIi","./compare_items_lists_worker/compare_items_lists.worker.js":"xR4c","./json_constructor/json_constructor.js":"nKaW","./AppsTemplateService/AppsTemplateService.js":"zqOZ","./FIleHelper/FileHelper.js":"E7yc","./compareObjects/compareObjects.js":"AefJ","./dynamicPromiseAll/dynamicPromiseAll.js":"ndUf","./filter/sortItems.js":"Owq4"}],"rK64":[function(require,module,exports) {
241
- "use strict";function t(r){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})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{h({},"")}catch(e){h=function(t,r,e){return t[r]=e}}function p(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new j(n||[]);return a(i,"_invoke",{value:O(t,e,u)}),i}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var v="suspendedStart",y="suspendedYield",g="executing",d="completed",m={};function w(){}function b(){}function k(){}var x={};h(x,s,function(){return this});var L=Object.getPrototypeOf,U=L&&L(L(P([])));U&&U!==o&&i.call(U,s)&&(x=U);var E=k.prototype=w.prototype=Object.create(x);function S(t){["next","throw","return"].forEach(function(r){h(t,r,function(t){return this._invoke(r,t)})})}function A(r,e){function n(o,a,u,s){var c=l(r[o],r,a);if("throw"!==c.type){var f=c.arg,h=f.value;return h&&"object"==t(h)&&i.call(h,"__await")?e.resolve(h.__await).then(function(t){n("next",t,u,s)},function(t){n("throw",t,u,s)}):e.resolve(h).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,s)})}s(c.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function O(t,r,n){var o=v;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var s=T(u,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var c=l(t,r,n);if("normal"===c.type){if(o=n.done?d:y,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=d,n.method="throw",n.arg=c.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=l(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function _(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function q(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function P(r){if(r||""===r){var n=r[s];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=k,a(E,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:b,configurable:!0}),b.displayName=h(k,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,h(t,f,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},S(A.prototype),h(A.prototype,c,function(){return this}),n.AsyncIterator=A,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new A(p(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(E),h(E,f,"Generator"),h(E,s,function(){return this}),h(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),q(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;q(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void e(t)}u.done?r(s):Promise.resolve(s).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,s,"next",t)}function s(t){e(a,o,i,u,s,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=s(r,"string");return"symbol"==t(e)?e:e+""}function s(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Auth=void 0;var c=exports.Auth=function(){return a(function t(r,e){o(this,t),this.req=r,this.storage=e},[{key:"login",value:function(){var t=n(r().mark(function t(){var e,n,o,i,a=arguments;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=a.length>0&&void 0!==a[0]?a[0]:{},n=e.username,o=e.password,t.next=3,this.loginApi(n,o);case 3:return i=t.sent,this.storage.updateUser(i),t.abrupt("return",i);case 6:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"loginWithToken",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.loginWithTokenApi(e);case 2:return n=t.sent,this.storage.updateUser(n),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"logout",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.logoutApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"signup",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.signupApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"updateToken",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateTokenApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"updateUser",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateUserApi(e);case 2:return n=t.sent,this.storage.updateUser(n),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"updateAvatar",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.avatarUploadApi(e);case 2:return n=t.sent,this.storage.updateUser(n),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"getUsersList",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getUsersListApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"loginApi",value:function(){var t=n(r().mark(function t(e,n){var o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login"),form:{username:e,password:n}});case 3:return o=t.sent,t.abrupt("return",o);case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"loginWithTokenApi",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login?accesstoken=").concat(e)});case 3:return n=t.sent,t.abrupt("return",n);case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(r){return t.apply(this,arguments)}}()},{key:"updateTokenApi",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login"),form:{auth_key:e}});case 3:return n=t.sent,t.abrupt("return",n);case 7:t.prev=7,t.t0=t.catch(0),console.log(t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])}));return function(r){return t.apply(this,arguments)}}()},{key:"logoutApi",value:function(t){return this.req.post({url:"/auth/logout",form:{token:t}})}},{key:"signupApi",value:function(t){return this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/singup"),form:{user:JSON.stringify(t)}})}},{key:"getUsersListApi",value:function(t){return this.req.get({url:"/auth/userlist",params:{keyword:t}})}},{key:"updateUserApi",value:function(t){return this.req.post({url:"/auth/updateuser",form:{user:JSON.stringify(t)}})}},{key:"avatarUploadApi",value:function(t){return this.req.post({url:"/auth/avatar-upload",form:{image:t}})}},{key:"getUserByIdApi",value:function(t){return this.req.get({url:"/auth/getuserbyid",params:{id:t}})}},{key:"getVersion",value:function(){return this.req.get({url:"/version"})}},{key:"getUserFromStorage",value:function(t){return this.storage.getUsersList().find(function(r){return r.user_id==t})}},{key:"saveUserToStorage",value:function(t){var r=this.storage.getUsersList(),e=r.find(function(r){return r.user_id==t.user_id});return e||(r.push(t),t)}},{key:"getUserById",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.getUserFromStorage(e)){t.next=9;break}return t.next=4,this.getUserByIdApi(e);case 4:if(o=t.sent){t.next=7;break}return t.abrupt("return",null);case 7:(n=this.getUserFromStorage(e))||(this.saveUserToStorage(o),n=o);case 9:return t.abrupt("return",n);case 10:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"getToken",value:function(){var t=n(r().mark(function t(){var e,n,o,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=new Date(this.storage.getUser().expirydate),n=new Date,o=this.storage.getUser().accesstoken,!(e<n)&&o){t.next=9;break}return t.next=6,this.updateToken(this.storage.getUser().auth_key);case 6:i=t.sent,this.storage.updateUser(i),o=i.accesstoken;case 9:return t.abrupt("return",o);case 10:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()}])}();
253
+ "use strict";function t(r){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})(r)}function r(){var t,n,o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function a(r,o,u,i){var a=o&&o.prototype instanceof c?o:c,f=Object.create(a.prototype);return e(f,"_invoke",function(r,e,o){var u,i,a,c=0,f=o||[],p=!1,l={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(r,e){return u=r,i=0,a=t,l.n=e,s}};function h(r,e){for(i=r,a=e,n=0;!p&&c&&!o&&n<f.length;n++){var o,u=f[n],h=l.p,v=u[2];r>3?(o=v===e)&&(a=u[(i=u[4])?5:(i=3,3)],u[4]=u[5]=t):u[0]<=h&&((o=r<2&&h<u[1])?(i=0,l.v=e,l.n=u[1]):h<v&&(o=r<3||u[0]>e||e>v)&&(u[4]=r,u[5]=e,l.n=v,i=0))}if(o||r>1)return s;throw p=!0,e}return function(o,f,v){if(c>1)throw TypeError("Generator is already running");for(p&&1===f&&h(f,v),i=f,a=v;(n=i<2?t:a)||!p;){u||(i?i<3?(i>1&&(l.n=-1),h(i,a)):l.n=a:l.v=a);try{if(c=2,u){if(i||(o="next"),n=u[o]){if(!(n=n.call(u,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,i<2&&(i=0)}else 1===i&&(n=u.return)&&n.call(u),i<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),i=1);u=t}else if((n=(p=l.n<0)?a:r.call(e,l))!==s)break}catch(n){u=t,i=1,a=n}finally{c=1}}return{value:n,done:p}}}(r,u,i),!0),f}var s={};function c(){}function f(){}function p(){}n=Object.getPrototypeOf;var l=[][u]?n(n([][u]())):(e(n={},u,function(){return this}),n),h=p.prototype=c.prototype=Object.create(l);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,e(t,i,"GeneratorFunction")),t.prototype=Object.create(h),t}return f.prototype=p,e(h,"constructor",p),e(p,"constructor",f),f.displayName="GeneratorFunction",e(p,i,"GeneratorFunction"),e(h),e(h,i,"Generator"),e(h,u,function(){return this}),e(h,"toString",function(){return"[object Generator]"}),(r=function(){return{w:a,m:v}})()}function e(t,r,n,o){var u=Object.defineProperty;try{u({},"",{})}catch(t){u=0}(e=function(t,r,n,o){if(r)u?u(t,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[r]=n;else{var i=function(r,n){e(t,r,function(t){return this._invoke(r,n,t)})};i("next",0),i("throw",1),i("return",2)}})(t,r,n,o)}function n(t,r,e,n,o,u,i){try{var a=t[u](i),s=a.value}catch(t){return void e(t)}a.done?r(s):Promise.resolve(s).then(n,o)}function o(t){return function(){var r=this,e=arguments;return new Promise(function(o,u){var i=t.apply(r,e);function a(t){n(i,o,u,a,s,"next",t)}function s(t){n(i,o,u,a,s,"throw",t)}a(void 0)})}}function u(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(r){var e=c(r,"string");return"symbol"==t(e)?e:e+""}function c(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Auth=void 0;var f=exports.Auth=function(){return a(function t(r,e){u(this,t),this.req=r,this.storage=e},[{key:"login",value:function(){var t=o(r().m(function t(){var e,n,o,u,i=arguments;return r().w(function(t){for(;;)switch(t.n){case 0:return e=i.length>0&&void 0!==i[0]?i[0]:{},n=e.username,o=e.password,t.n=1,this.loginApi(n,o);case 1:return u=t.v,this.storage.updateUser(u),t.a(2,u)}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"loginWithToken",value:function(){var t=o(r().m(function t(e){var n;return r().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.loginWithTokenApi(e);case 1:return n=t.v,this.storage.updateUser(n),t.a(2,n)}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"logout",value:function(){var t=o(r().m(function t(e){var n;return r().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.logoutApi(e);case 1:return n=t.v,t.a(2,n)}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"signup",value:function(){var t=o(r().m(function t(e){var n;return r().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.signupApi(e);case 1:return n=t.v,t.a(2,n)}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"updateToken",value:function(){var t=o(r().m(function t(e){var n;return r().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.updateTokenApi(e);case 1:return n=t.v,t.a(2,n)}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"updateUser",value:function(){var t=o(r().m(function t(e){var n;return r().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.updateUserApi(e);case 1:return n=t.v,this.storage.updateUser(n),t.a(2,n)}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"updateAvatar",value:function(){var t=o(r().m(function t(e){var n;return r().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.avatarUploadApi(e);case 1:return n=t.v,this.storage.updateUser(n),t.a(2,n)}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"getUsersList",value:function(){var t=o(r().m(function t(e){var n;return r().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.getUsersListApi(e);case 1:return n=t.v,t.a(2,n)}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"loginApi",value:function(){var t=o(r().m(function t(e,n){var o,u;return r().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login"),form:{username:e,password:n}});case 1:return o=t.v,t.a(2,o);case 2:t.p=2,u=t.v,console.log(u);case 3:return t.a(2)}},t,this,[[0,2]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"loginWithTokenApi",value:function(){var t=o(r().m(function t(e){var n,o;return r().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login?accesstoken=").concat(e)});case 1:return n=t.v,t.a(2,n);case 2:t.p=2,o=t.v,console.log(o);case 3:return t.a(2)}},t,this,[[0,2]])}));return function(r){return t.apply(this,arguments)}}()},{key:"updateTokenApi",value:function(){var t=o(r().m(function t(e){var n,o;return r().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/login"),form:{auth_key:e}});case 1:return n=t.v,t.a(2,n);case 2:t.p=2,o=t.v,console.log(o);case 3:return t.a(2)}},t,this,[[0,2]])}));return function(r){return t.apply(this,arguments)}}()},{key:"logoutApi",value:function(t){return this.req.post({url:"/auth/logout",form:{token:t}})}},{key:"signupApi",value:function(t){return this.req.axiosRequest({method:"POST",url:"".concat(this.req.root,"/auth/singup"),form:{user:JSON.stringify(t)}})}},{key:"getUsersListApi",value:function(t){return this.req.get({url:"/auth/userlist",params:{keyword:t}})}},{key:"updateUserApi",value:function(t){return this.req.post({url:"/auth/updateuser",form:{user:JSON.stringify(t)}})}},{key:"avatarUploadApi",value:function(t){return this.req.post({url:"/auth/avatar-upload",form:{image:t}})}},{key:"getUserByIdApi",value:function(t){return this.req.get({url:"/auth/getuserbyid",params:{id:t}})}},{key:"getVersion",value:function(){return this.req.get({url:"/version"})}},{key:"getUserFromStorage",value:function(t){return this.storage.getUsersList().find(function(r){return r.user_id==t})}},{key:"saveUserToStorage",value:function(t){var r=this.storage.getUsersList(),e=r.find(function(r){return r.user_id==t.user_id});return e||(r.push(t),t)}},{key:"getUserById",value:function(){var t=o(r().m(function t(e){var n,o;return r().w(function(t){for(;;)switch(t.n){case 0:if(n=this.getUserFromStorage(e)){t.n=3;break}return t.n=1,this.getUserByIdApi(e);case 1:if(o=t.v){t.n=2;break}return t.a(2,null);case 2:(n=this.getUserFromStorage(e))||(this.saveUserToStorage(o),n=o);case 3:return t.a(2,n)}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"getToken",value:function(){var t=o(r().m(function t(){var e,n,o,u;return r().w(function(t){for(;;)switch(t.n){case 0:if(e=new Date(this.storage.getUser().expirydate),n=new Date,o=this.storage.getUser().accesstoken,!(e<n)&&o){t.n=2;break}return t.n=1,this.updateToken(this.storage.getUser().auth_key);case 1:u=t.v,this.storage.updateUser(u),o=u.accesstoken;case 2:return t.a(2,o)}},t,this)}));return function(){return t.apply(this,arguments)}}()}])}();
242
254
  },{}],"UV2u":[function(require,module,exports) {
243
255
  "use strict";function e(o){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(o)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.IS_WEB=void 0;var o=exports.IS_WEB=!["undefined"==typeof window?"undefined":e(window),"undefined"==typeof document?"undefined":e(document)].includes("undefined");
244
256
  },{}],"osSN":[function(require,module,exports) {
245
- var define;
246
257
  var global = arguments[3];
247
- var define,global=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=createAngularModuleInstance;var _axios=_interopRequireDefault(require("axios")),_consts=require("./../consts.js");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var a=t&&t.prototype instanceof y?t:y,u=Object.create(a.prototype),i=new C(n||[]);return o(u,"_invoke",{value:k(e,r,i)}),u}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",p="suspendedYield",g="executing",h="completed",m={};function y(){}function _(){}function v(){}var x={};l(x,u,function(){return this});var w=Object.getPrototypeOf,b=w&&w(w(O([])));b&&b!==r&&n.call(b,u)&&(x=b);var L=v.prototype=y.prototype=Object.create(x);function E(e){["next","throw","return"].forEach(function(t){l(e,t,function(e){return this._invoke(t,e)})})}function R(e,t){function r(o,a,u,i){var c=f(e[o],e,a);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==_typeof(s)&&n.call(s,"__await")?t.resolve(s.__await).then(function(e){r("next",e,u,i)},function(e){r("throw",e,u,i)}):t.resolve(s).then(function(e){l.value=e,u(l)},function(e){return r("throw",e,u,i)})}i(c.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t(function(t,o){r(e,n,t,o)})}return a=a?a.then(o,o):o()}})}function k(t,r,n){var o=d;return function(a,u){if(o===g)throw Error("Generator is already running");if(o===h){if("throw"===a)throw u;return{value:e,done:!0}}for(n.method=a,n.arg=u;;){var i=n.delegate;if(i){var c=M(i,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?h:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=h,n.method="throw",n.arg=l.arg)}}}function M(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,M(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var u=a.arg;return u?u.done?(r[t.resultName]=u.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function O(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(_typeof(t)+" is not iterable")}return _.prototype=v,o(L,"constructor",{value:v,configurable:!0}),o(v,"constructor",{value:_,configurable:!0}),_.displayName=l(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,l(e,c,"GeneratorFunction")),e.prototype=Object.create(L),e},t.awrap=function(e){return{__await:e}},E(R.prototype),l(R.prototype,i,function(){return this}),t.AsyncIterator=R,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var u=new R(s(e,r,n,o),a);return t.isGeneratorFunction(r)?u:u.next().then(function(e){return e.done?e.value:u.next()})},E(L),l(L,c,"Generator"),l(L,u,function(){return this}),l(L,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=O,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(I),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return i.type="throw",i.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],i=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=n.call(u,"catchLoc"),l=n.call(u,"finallyLoc");if(c&&l){if(this.prev<u.catchLoc)return o(u.catchLoc,!0);if(this.prev<u.finallyLoc)return o(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return o(u.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return o(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var u=a?a.completion:{};return u.type=e,u.arg=t,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:O(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function asyncGeneratorStep(e,t,r,n,o,a,u){try{var i=e[a](u),c=i.value}catch(e){return void r(e)}i.done?t(c):Promise.resolve(c).then(n,o)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function u(e){asyncGeneratorStep(a,n,o,u,i,"next",e)}function i(e){asyncGeneratorStep(a,n,o,u,i,"throw",e)}u(void 0)})}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var $q={when:function(e){return new Promise(function(t){t(e)})}},factoryReturns={},angular={module:function(){return angular},directive:function(){return angular},factory:function(e,t){try{"object"===_typeof(t)?factoryReturns[e]=t[t.length-1]($q):factoryReturns[e]=t($q)}catch(r){console.log("Errror in data type: ",e),console.log(r)}return angular},service:function(){return angular},run:function(){return angular},filter:function(){return angular},controller:function(){return angular},value:function(){return angular},element:function(){return angular},injector:function(){return angular},invoke:function(){return angular}};function createAngularModuleInstance(e,t,r,n,o){return _createAngularModuleInstance.apply(this,arguments)}function _createAngularModuleInstance(){return _createAngularModuleInstance=_asyncToGenerator(_regeneratorRuntime().mark(function _callee5(gudhub,module_id,module_url,angularInjector,nodeWindow){var angularModule,importedClass,module,_module,proxy,response,code,encodedCode,_module2,result;return _regeneratorRuntime().wrap(function _callee5$(_context5){for(;;)switch(_context5.prev=_context5.next){case 0:if(_context5.prev=0,!_consts.IS_WEB){_context5.next=25;break}if(!window.angular){_context5.next=17;break}if(angularInjector.has(module_id)){_context5.next=6;break}return _context5.next=6,angularInjector.get("$ocLazyLoad").load(module_url);case 6:return _context5.next=8,angularInjector.get(module_id);case 8:return angularModule=_context5.sent,_context5.next=11,_axios.default.get(module_url);case 11:module=_context5.sent,module=module.data;try{eval(module)}catch(error){console.error("ERROR WHILE EVAL() IN GHCONSTRUCTOR. MODULE ID: ".concat(module_id)),console.log(error)}importedClass=factoryReturns[module_id],_context5.next=23;break;case 17:return _context5.next=19,_axios.default.get(module_url);case 19:_module=_context5.sent,_module=_module.data;try{eval(_module)}catch(err){console.log("Error while importing module: ".concat(module_id)),console.log(err)}importedClass=factoryReturns[module_id];case 23:_context5.next=50;break;case 25:return proxy=new Proxy(nodeWindow,{get:function(e,t){var r=e[t];if("symbol"!==_typeof(r))return r},set:function(e,t,r){return"symbol"!==_typeof(r)&&(e[t]=r,global[t]=r,!0)}}),global.hasOwnProperty("window")||(global.window=proxy,global.document=nodeWindow.document,global.Element=nodeWindow.Element,global.CharacterData=nodeWindow.CharacterData,global.this=proxy,global.self=proxy,global.Blob=nodeWindow.Blob,global.Node=nodeWindow.Node,global.navigator=nodeWindow.navigator,global.HTMLElement=nodeWindow.HTMLElement,global.XMLHttpRequest=nodeWindow.XMLHttpRequest,global.WebSocket=nodeWindow.WebSocket,global.crypto=nodeWindow.crypto,global.DOMParser=nodeWindow.DOMParser,global.document.queryCommandSupported=function(e){return!1},global.angular=angular),_context5.prev=27,_context5.next=30,_axios.default.get(module_url);case 30:return response=_context5.sent,code=response.data,encodedCode=encodeURIComponent(code),encodedCode="data:text/javascript;charset=utf-8,"+encodedCode,_context5.prev=34,_context5.next=37,import(encodedCode);case 37:_module2=_context5.sent,_context5.next=44;break;case 40:_context5.prev=40,_context5.t0=_context5.catch(34),console.log("Error while importing module: ".concat(module_id)),console.log(_context5.t0);case 44:_module2&&_module2.default?importedClass=new _module2.default:console.error("Module ".concat(module_id," didn't export a default class")),_context5.next=50;break;case 47:_context5.prev=47,_context5.t1=_context5.catch(27),console.error("Error fetching module code:",_context5.t1);case 50:return result={type:module_id,getTemplate:function(e,t,r,n,o,a){var u="false"!==r;return importedClass.getTemplate(e,t,u,n,o,a)},getDefaultValue:function(e,t,r,n){return new Promise(function(){var o=_asyncToGenerator(_regeneratorRuntime().mark(function o(a){var u,i;return _regeneratorRuntime().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!(u=importedClass.getDefaultValue)){o.next=8;break}return o.next=4,u(e,t,r,n);case 4:i=o.sent,a(i),o.next=9;break;case 8:a(null);case 9:case"end":return o.stop()}},o)}));return function(e){return o.apply(this,arguments)}}())},getSettings:function(e,t,r){return importedClass.getSettings(e,t,r)},filter:{getSearchOptions:function(e){var t=importedClass;return t.filter&&t.filter.getSearchOptions?importedClass.filter.getSearchOptions(e)||null:[]},getDropdownValues:function(){var e=importedClass;return e.filter&&e.filter.getDropdownValues?e.filter.getDropdownValues()||null:[]}},getInterpretation:function(e,t,r,n,o,a){return new Promise(function(){var u=_asyncToGenerator(_regeneratorRuntime().mark(function u(i){var c,l,s,f;return _regeneratorRuntime().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return c=importedClass,u.prev=1,u.next=4,c.getInterpretation(gudhub,e,a,o,n,r);case 4:return l=u.sent,s=l.find(function(e){return e.id==t})||l.find(function(e){return"default"==e.id}),u.next=8,s.content();case 8:f=u.sent,i({html:f}),u.next=16;break;case 12:u.prev=12,u.t0=u.catch(1),console.log("ERROR IN ".concat(module_id),u.t0),i({html:"<span>no interpretation</span>"});case 16:case"end":return u.stop()}},u,null,[[1,12]])}));return function(e){return u.apply(this,arguments)}}())},getInterpretationsList:function(e,t,r,n){return importedClass.getInterpretation(e,t,r,n)},getInterpretatedValue:function(e,t,r,n){return new Promise(function(){var o=_asyncToGenerator(_regeneratorRuntime().mark(function o(a){var u,i;return _regeneratorRuntime().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!(u=importedClass.getInterpretatedValue)){o.next=8;break}return o.next=4,u(e,t,r,n);case 4:i=o.sent,a(i),o.next=9;break;case 8:a(e);case 9:case"end":return o.stop()}},o)}));return function(e){return o.apply(this,arguments)}}())},onMessage:function(e,t,r){return new Promise(function(){var n=_asyncToGenerator(_regeneratorRuntime().mark(function n(o){var a,u;return _regeneratorRuntime().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!(a=importedClass.onMessage)){n.next=6;break}return n.next=4,a(e,t,r);case 4:u=n.sent,o(u);case 6:o(null);case 7:case"end":return n.stop()}},n)}));return function(e){return n.apply(this,arguments)}}())}},_consts.IS_WEB&&(result.extendController=function(e){angularModule.getActionScope(e)},result.runAction=function(e){try{angularModule.runAction(e)}catch(t){}},result.getWindowScope=function(e){return angularModule.getWindowScope(e)},result.getWindowHTML=function(e){return angularModule.getWindowHTML(e)}),_context5.abrupt("return",result);case 55:_context5.prev=55,_context5.t2=_context5.catch(0),console.log(_context5.t2),console.log("Failed in createAngularModuleInstance (ghconstructor). Module id: ".concat(module_id,"."));case 59:case"end":return _context5.stop()}},_callee5,null,[[0,55],[27,47],[34,40]])})),_createAngularModuleInstance.apply(this,arguments)}
258
+ var global=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=createAngularModuleInstance;var _axios=_interopRequireDefault(require("axios")),_consts=require("./../consts.js");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _regenerator(){var e,n,t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",o=t.toStringTag||"@@toStringTag";function a(t,r,o,a){var l=r&&r.prototype instanceof c?r:c,i=Object.create(l.prototype);return _regeneratorDefine2(i,"_invoke",function(t,r,o){var a,c,l,i=0,s=o||[],d=!1,f={p:0,n:0,v:e,a:g,f:g.bind(e,4),d:function(n,t){return a=n,c=0,l=e,f.n=t,u}};function g(t,r){for(c=t,l=r,n=0;!d&&i&&!o&&n<s.length;n++){var o,a=s[n],g=f.p,_=a[2];t>3?(o=_===r)&&(l=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=e):a[0]<=g&&((o=t<2&&g<a[1])?(c=0,f.v=r,f.n=a[1]):g<_&&(o=t<3||a[0]>r||r>_)&&(a[4]=t,a[5]=r,f.n=_,c=0))}if(o||t>1)return u;throw d=!0,r}return function(o,s,_){if(i>1)throw TypeError("Generator is already running");for(d&&1===s&&g(s,_),c=s,l=_;(n=c<2?e:l)||!d;){a||(c?c<3?(c>1&&(f.n=-1),g(c,l)):f.n=l:f.v=l);try{if(i=2,a){if(c||(o="next"),n=a[o]){if(!(n=n.call(a,l)))throw TypeError("iterator result is not an object");if(!n.done)return n;l=n.value,c<2&&(c=0)}else 1===c&&(n=a.return)&&n.call(a),c<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),c=1);a=e}else if((n=(d=f.n<0)?l:t.call(r,f))!==u)break}catch(n){a=e,c=1,l=n}finally{i=1}}return{value:n,done:d}}}(t,o,a),!0),i}var u={};function c(){}function l(){}function i(){}n=Object.getPrototypeOf;var s=[][r]?n(n([][r]())):(_regeneratorDefine2(n={},r,function(){return this}),n),d=i.prototype=c.prototype=Object.create(s);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=i,_regeneratorDefine2(d,"constructor",i),_regeneratorDefine2(i,"constructor",l),l.displayName="GeneratorFunction",_regeneratorDefine2(i,o,"GeneratorFunction"),_regeneratorDefine2(d),_regeneratorDefine2(d,o,"Generator"),_regeneratorDefine2(d,r,function(){return this}),_regeneratorDefine2(d,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:a,m:f}})()}function _regeneratorDefine2(e,n,t,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(_regeneratorDefine2=function(e,n,t,r){if(n)o?o(e,n,{value:t,enumerable:!r,configurable:!r,writable:!r}):e[n]=t;else{var a=function(n,t){_regeneratorDefine2(e,n,function(e){return this._invoke(n,t,e)})};a("next",0),a("throw",1),a("return",2)}})(e,n,t,r)}function asyncGeneratorStep(e,n,t,r,o,a,u){try{var c=e[a](u),l=c.value}catch(e){return void t(e)}c.done?n(l):Promise.resolve(l).then(r,o)}function _asyncToGenerator(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var a=e.apply(n,t);function u(e){asyncGeneratorStep(a,r,o,u,c,"next",e)}function c(e){asyncGeneratorStep(a,r,o,u,c,"throw",e)}u(void 0)})}}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var $q={when:function(e){return new Promise(function(n){n(e)})}},factoryReturns={},angular={module:function(){return angular},directive:function(){return angular},factory:function(e,n){try{"object"===_typeof(n)?factoryReturns[e]=n[n.length-1]($q):factoryReturns[e]=n($q)}catch(t){console.log("Errror in data type: ",e),console.log(t)}return angular},service:function(){return angular},run:function(){return angular},filter:function(){return angular},controller:function(){return angular},value:function(){return angular},element:function(){return angular},injector:function(){return angular},invoke:function(){return angular}};function createAngularModuleInstance(e,n,t,r,o){return _createAngularModuleInstance.apply(this,arguments)}function _createAngularModuleInstance(){return _createAngularModuleInstance=_asyncToGenerator(_regenerator().m(function _callee5(gudhub,module_id,module_url,angularInjector,nodeWindow){var angularModule,importedClass,module,_module,proxy,response,code,encodedCode,_module2,result,_t2,_t3,_t4;return _regenerator().w(function(_context5){for(;;)switch(_context5.n){case 0:if(_context5.p=0,!_consts.IS_WEB){_context5.n=7;break}if(!window.angular){_context5.n=4;break}if(angularInjector.has(module_id)){_context5.n=1;break}return _context5.n=1,angularInjector.get("$ocLazyLoad").load(module_url);case 1:return _context5.n=2,angularInjector.get(module_id);case 2:return angularModule=_context5.v,_context5.n=3,_axios.default.get(module_url);case 3:module=_context5.v,module=module.data;try{eval(module)}catch(error){console.error("ERROR WHILE EVAL() IN GHCONSTRUCTOR. MODULE ID: ".concat(module_id)),console.log(error)}importedClass=factoryReturns[module_id],_context5.n=6;break;case 4:return _context5.n=5,_axios.default.get(module_url);case 5:_module=_context5.v,_module=_module.data;try{eval(_module)}catch(err){console.log("Error while importing module: ".concat(module_id)),console.log(err)}importedClass=factoryReturns[module_id];case 6:_context5.n=15;break;case 7:return proxy=new Proxy(nodeWindow,{get:function(e,n){var t=e[n];if("symbol"!==_typeof(t))return t},set:function(e,n,t){return"symbol"!==_typeof(t)&&(e[n]=t,global[n]=t,!0)}}),global.hasOwnProperty("window")||(global.window=proxy,global.document=nodeWindow.document,global.Element=nodeWindow.Element,global.CharacterData=nodeWindow.CharacterData,global.this=proxy,global.self=proxy,global.Blob=nodeWindow.Blob,global.Node=nodeWindow.Node,global.navigator=nodeWindow.navigator,global.HTMLElement=nodeWindow.HTMLElement,global.XMLHttpRequest=nodeWindow.XMLHttpRequest,global.WebSocket=nodeWindow.WebSocket,global.crypto=nodeWindow.crypto,global.DOMParser=nodeWindow.DOMParser,global.document.queryCommandSupported=function(e){return!1},global.angular=angular),_context5.p=8,_context5.n=9,_axios.default.get(module_url);case 9:return response=_context5.v,code=response.data,encodedCode=encodeURIComponent(code),encodedCode="data:text/javascript;charset=utf-8,"+encodedCode,_context5.p=10,_context5.n=11,import(encodedCode);case 11:_module2=_context5.v,_context5.n=13;break;case 12:_context5.p=12,_t2=_context5.v,console.log("Error while importing module: ".concat(module_id)),console.log(_t2);case 13:_module2&&_module2.default?importedClass=new _module2.default:console.error("Module ".concat(module_id," didn't export a default class")),_context5.n=15;break;case 14:_context5.p=14,_t3=_context5.v,console.error("Error fetching module code:",_t3);case 15:return result={type:module_id,getTemplate:function(e,n,t,r,o,a){var u="false"!==t;return importedClass.getTemplate(e,n,u,r,o,a)},getDefaultValue:function(e,n,t,r){return new Promise(function(){var o=_asyncToGenerator(_regenerator().m(function o(a){var u,c;return _regenerator().w(function(o){for(;;)switch(o.n){case 0:if(!(u=importedClass.getDefaultValue)){o.n=2;break}return o.n=1,u(e,n,t,r);case 1:c=o.v,a(c),o.n=3;break;case 2:a(null);case 3:return o.a(2)}},o)}));return function(e){return o.apply(this,arguments)}}())},getSettings:function(e,n,t){return importedClass.getSettings(e,n,t)},filter:{getSearchOptions:function(e){var n=importedClass;return n.filter&&n.filter.getSearchOptions?importedClass.filter.getSearchOptions(e)||null:[]},getDropdownValues:function(){var e=importedClass;return e.filter&&e.filter.getDropdownValues?e.filter.getDropdownValues()||null:[]}},getInterpretation:function(e,n,t,r,o,a){return new Promise(function(){var u=_asyncToGenerator(_regenerator().m(function u(c){var l,i,s,d,f;return _regenerator().w(function(u){for(;;)switch(u.n){case 0:return l=importedClass,u.p=1,u.n=2,l.getInterpretation(gudhub,e,a,o,r,t);case 2:return i=u.v,s=i.find(function(e){return e.id==n})||i.find(function(e){return"default"==e.id}),u.n=3,s.content();case 3:d=u.v,c({html:d}),u.n=5;break;case 4:u.p=4,f=u.v,console.log("ERROR IN ".concat(module_id),f),c({html:"<span>no interpretation</span>"});case 5:return u.a(2)}},u,null,[[1,4]])}));return function(e){return u.apply(this,arguments)}}())},getInterpretationsList:function(e,n,t,r){return importedClass.getInterpretation(e,n,t,r)},getInterpretatedValue:function(e,n,t,r){return new Promise(function(){var o=_asyncToGenerator(_regenerator().m(function o(a){var u,c;return _regenerator().w(function(o){for(;;)switch(o.n){case 0:if(!(u=importedClass.getInterpretatedValue)){o.n=2;break}return o.n=1,u(e,n,t,r);case 1:c=o.v,a(c),o.n=3;break;case 2:a(e);case 3:return o.a(2)}},o)}));return function(e){return o.apply(this,arguments)}}())},onMessage:function(e,n,t){return new Promise(function(){var r=_asyncToGenerator(_regenerator().m(function r(o){var a,u;return _regenerator().w(function(r){for(;;)switch(r.n){case 0:if(!(a=importedClass.onMessage)){r.n=2;break}return r.n=1,a(e,n,t);case 1:u=r.v,o(u);case 2:o(null);case 3:return r.a(2)}},r)}));return function(e){return r.apply(this,arguments)}}())}},_consts.IS_WEB&&(result.extendController=function(e){angularModule.getActionScope(e)},result.runAction=function(e){try{angularModule.runAction(e)}catch(n){}},result.getWindowScope=function(e){return angularModule.getWindowScope(e)},result.getWindowHTML=function(e){return angularModule.getWindowHTML(e)}),_context5.a(2,result);case 16:_context5.p=16,_t4=_context5.v,console.log(_t4),console.log("Failed in createAngularModuleInstance (ghconstructor). Module id: ".concat(module_id,"."));case 17:return _context5.a(2)}},_callee5,null,[[10,12],[8,14],[0,16]])})),_createAngularModuleInstance.apply(this,arguments)}
248
259
  },{"axios":"O4Aa","./../consts.js":"UV2u"}],"DsUm":[function(require,module,exports) {
249
- var define;
250
260
  var global = arguments[3];
251
- var t,e=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=s;var r=o(require("axios")),n=require("./../consts.js");function o(t){return t&&t.__esModule?t:{default:t}}function a(t){return(a="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 i(){"use strict";i=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var a=e&&e.prototype instanceof w?e:w,i=Object.create(a.prototype),c=new T(n||[]);return o(i,"_invoke",{value:P(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var d="suspendedStart",y="suspendedYield",v="executing",g="completed",m={};function w(){}function x(){}function b(){}var E={};f(E,u,function(){return this});var L=Object.getPrototypeOf,S=L&&L(L(N([])));S&&S!==r&&n.call(S,u)&&(E=S);var k=b.prototype=w.prototype=Object.create(E);function O(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function _(t,e){function r(o,i,c,u){var s=h(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==a(f)&&n.call(f,"__await")?e.resolve(f.__await).then(function(t){r("next",t,c,u)},function(t){r("throw",t,c,u)}):e.resolve(f).then(function(t){l.value=t,c(l)},function(t){return r("throw",t,c,u)})}u(s.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e(function(e,o){r(t,n,e,o)})}return i=i?i.then(o,o):o()}})}function P(e,r,n){var o=d;return function(a,i){if(o===v)throw Error("Generator is already running");if(o===g){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=j(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?g:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(a(e)+" is not iterable")}return x.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:x,configurable:!0}),x.displayName=f(b,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},O(_.prototype),f(_.prototype,s,function(){return this}),e.AsyncIterator=_,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new _(p(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then(function(t){return t.done?t.value:i.next()})},O(k),f(k,l,"Generator"),f(k,u,function(){return this}),f(k,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(u&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function c(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function i(t){c(a,n,o,i,u,"next",t)}function u(t){c(a,n,o,i,u,"throw",t)}i(void 0)})}}function s(t,e,r,n,o){return l.apply(this,arguments)}function l(){return(l=u(i().mark(function t(o,a,c,s,l){var f,p,h,d,y,v;return i().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,c||console.error("JS link must be provided for this data type - ".concat(a)),f=function(t){return n.IS_WEB||e.hasOwnProperty("window")||(e.window=proxy,e.document=l.document,e.Element=l.Element,e.CharacterData=l.CharacterData,e.this=proxy,e.self=proxy,e.Blob=l.Blob,e.Node=l.Node,e.navigator=l.navigator,e.HTMLElement=l.HTMLElement,e.XMLHttpRequest=l.XMLHttpRequest,e.WebSocket=l.WebSocket,e.crypto=l.crypto,e.DOMParser=l.DOMParser,e.Symbol=l.Symbol,e.document.queryCommandSupported=function(t){return console.log("QUERY COMMAND SUPPORTED: ",t),!1},e.angular=angular),new Promise(function(){var e=u(i().mark(function e(n){var o,c;return i().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.get(t).catch(function(e){console.log("Failed to fetch: ".concat(t," in ghconstructor. Module id: ").concat(a))});case 2:o=e.sent,c=encodeURIComponent(o.data),n("data:text/javascript;charset=utf-8,"+c);case 6:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}())},t.next=5,f(c);case 5:return p=t.sent,t.prev=6,t.next=9,import(p);case 9:h=t.sent,t.next=16;break;case 12:t.prev=12,t.t0=t.catch(6),console.log("Error while importing module: ".concat(a)),console.log(t.t0);case 16:return d=new h.default(a),s&&n.IS_WEB&&((y=document.createElement("link")).href=s,y.setAttribute("data-module",a),y.setAttribute("rel","stylesheet"),document.getElementsByTagName("head")[0].appendChild(y)),v={type:a,getTemplate:function(t,e,r,n,o,a){var i="false"!==r;return d.getTemplate(t,e,i,n,o,a)},getDefaultValue:function(t,e,r,n){return new Promise(function(){var o=u(i().mark(function o(a){var c,u;return i().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!(c=d.getDefaultValue)){o.next=8;break}return o.next=4,c(t,e,r,n);case 4:u=o.sent,a(u),o.next=9;break;case 8:a(null);case 9:case"end":return o.stop()}},o)}));return function(t){return o.apply(this,arguments)}}())},getSettings:function(t,e,r){return d.getSettings(t,e,r)},filter:{getSearchOptions:function(t){var e=d;return e.filter&&e.filter.getSearchOptions?d.filter.getSearchOptions(t):[]},getDropdownValues:function(){var t=d;return t.filter&&t.filter.getDropdownValues?t.filter.getDropdownValues():[]}},getInterpretation:function(t,e,r,n,c,s){return new Promise(function(){var l=u(i().mark(function u(l){var f,p,h,y;return i().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return f=d,i.prev=1,i.next=4,f.getInterpretation(o,t,s,c,n,r);case 4:return p=i.sent,h=p.find(function(t){return t.id==e})||p.find(function(t){return"default"==t.id}),i.next=8,h.content();case 8:y=i.sent,l({html:y}),i.next=16;break;case 12:i.prev=12,i.t0=i.catch(1),console.log("ERROR IN ".concat(a),i.t0),l({html:"<span>no interpretation</span>"});case 16:case"end":return i.stop()}},u,null,[[1,12]])}));return function(t){return l.apply(this,arguments)}}())},getInterpretationsList:function(t,e,r,n){return d.getInterpretation(t,e,r,n)},getInterpretatedValue:function(t,e,r,n){return new Promise(function(){var o=u(i().mark(function o(a){var c,u;return i().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!(c=d.getInterpretatedValue)){o.next=8;break}return o.next=4,c(t,e,r,n);case 4:u=o.sent,a(u),o.next=9;break;case 8:a(t);case 9:case"end":return o.stop()}},o)}));return function(t){return o.apply(this,arguments)}}())},onMessage:function(t,e,r){return new Promise(function(){var n=u(i().mark(function n(o){var a,c;return i().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!(a=d.onMessage)){n.next=6;break}return n.next=4,a(t,e,r);case 4:c=n.sent,o(c);case 6:o(null);case 7:case"end":return n.stop()}},n)}));return function(t){return n.apply(this,arguments)}}())},extendController:function(t){d.getActionScope(t)},runAction:function(t){try{d.runAction(t)}catch(e){}},getWindowScope:function(t){return d.getWindowScope(t)},getWindowHTML:function(t){return d.getWindowHTML(t)}},t.abrupt("return",v);case 22:t.prev=22,t.t1=t.catch(0),console.log(t.t1),console.log("Failed in createClassInstance (ghconstructor). Module id: ".concat(a,". JS url: ").concat(c));case 26:case"end":return t.stop()}},t,null,[[0,22],[6,12]])}))).apply(this,arguments)}
261
+ var t=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=i;var e=r(require("axios")),n=require("./../consts.js");function r(t){return t&&t.__esModule?t:{default:t}}function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",u=n.toStringTag||"@@toStringTag";function c(n,r,o,u){var c=r&&r.prototype instanceof s?r:s,f=Object.create(c.prototype);return a(f,"_invoke",function(n,r,o){var a,u,c,s=0,f=o||[],l=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return a=e,u=0,c=t,p.n=n,i}};function d(n,r){for(u=n,c=r,e=0;!l&&s&&!o&&e<f.length;e++){var o,a=f[e],d=p.p,v=a[2];n>3?(o=v===r)&&(c=a[(u=a[4])?5:(u=3,3)],a[4]=a[5]=t):a[0]<=d&&((o=n<2&&d<a[1])?(u=0,p.v=r,p.n=a[1]):d<v&&(o=n<3||a[0]>r||r>v)&&(a[4]=n,a[5]=r,p.n=v,u=0))}if(o||n>1)return i;throw l=!0,r}return function(o,f,v){if(s>1)throw TypeError("Generator is already running");for(l&&1===f&&d(f,v),u=f,c=v;(e=u<2?t:c)||!l;){a||(u?u<3?(u>1&&(p.n=-1),d(u,c)):p.n=c:p.v=c);try{if(s=2,a){if(u||(o="next"),e=a[o]){if(!(e=e.call(a,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=a.return)&&e.call(a),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);a=t}else if((e=(l=p.n<0)?c:n.call(r,p))!==i)break}catch(e){a=t,u=1,c=e}finally{s=1}}return{value:e,done:l}}}(n,o,u),!0),f}var i={};function s(){}function f(){}function l(){}e=Object.getPrototypeOf;var p=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),d=l.prototype=s.prototype=Object.create(p);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,a(t,u,"GeneratorFunction")),t.prototype=Object.create(d),t}return f.prototype=l,a(d,"constructor",l),a(l,"constructor",f),f.displayName="GeneratorFunction",a(l,u,"GeneratorFunction"),a(d),a(d,u,"Generator"),a(d,r,function(){return this}),a(d,"toString",function(){return"[object Generator]"}),(o=function(){return{w:c,m:v}})()}function a(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}(a=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var u=function(e,n){a(t,e,function(t){return this._invoke(e,n,t)})};u("next",0),u("throw",1),u("return",2)}})(t,e,n,r)}function u(t,e,n,r,o,a,u){try{var c=t[a](u),i=c.value}catch(t){return void n(t)}c.done?e(i):Promise.resolve(i).then(r,o)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var a=t.apply(e,n);function c(t){u(a,r,o,c,i,"next",t)}function i(t){u(a,r,o,c,i,"throw",t)}c(void 0)})}}function i(t,e,n,r,o){return s.apply(this,arguments)}function s(){return(s=c(o().m(function r(a,u,i,s,f){var l,p,d,v,g,h,m,y;return o().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,i||console.error("JS link must be provided for this data type - ".concat(u)),l=function(r){return n.IS_WEB||t.hasOwnProperty("window")||(t.window=proxy,t.document=f.document,t.Element=f.Element,t.CharacterData=f.CharacterData,t.this=proxy,t.self=proxy,t.Blob=f.Blob,t.Node=f.Node,t.navigator=f.navigator,t.HTMLElement=f.HTMLElement,t.XMLHttpRequest=f.XMLHttpRequest,t.WebSocket=f.WebSocket,t.crypto=f.crypto,t.DOMParser=f.DOMParser,t.Symbol=f.Symbol,t.document.queryCommandSupported=function(t){return console.log("QUERY COMMAND SUPPORTED: ",t),!1},t.angular=angular),new Promise(function(){var t=c(o().m(function t(n){var a,c;return o().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.default.get(r).catch(function(t){console.log("Failed to fetch: ".concat(r," in ghconstructor. Module id: ").concat(u))});case 1:a=t.v,c=encodeURIComponent(a.data),n("data:text/javascript;charset=utf-8,"+c);case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}())},r.n=1,l(i);case 1:return p=r.v,r.p=2,r.n=3,import(p);case 3:d=r.v,r.n=5;break;case 4:r.p=4,m=r.v,console.log("Error while importing module: ".concat(u)),console.log(m);case 5:return v=new d.default(u),s&&n.IS_WEB&&((g=document.createElement("link")).href=s,g.setAttribute("data-module",u),g.setAttribute("rel","stylesheet"),document.getElementsByTagName("head")[0].appendChild(g)),h={type:u,getTemplate:function(t,e,n,r,o,a){var u="false"!==n;return v.getTemplate(t,e,u,r,o,a)},getDefaultValue:function(t,e,n,r){return new Promise(function(){var a=c(o().m(function a(u){var c,i;return o().w(function(o){for(;;)switch(o.n){case 0:if(!(c=v.getDefaultValue)){o.n=2;break}return o.n=1,c(t,e,n,r);case 1:i=o.v,u(i),o.n=3;break;case 2:u(null);case 3:return o.a(2)}},a)}));return function(t){return a.apply(this,arguments)}}())},getSettings:function(t,e,n){return v.getSettings(t,e,n)},filter:{getSearchOptions:function(t){var e=v;return e.filter&&e.filter.getSearchOptions?v.filter.getSearchOptions(t):[]},getDropdownValues:function(){var t=v;return t.filter&&t.filter.getDropdownValues?t.filter.getDropdownValues():[]}},getInterpretation:function(t,e,n,r,i,s){return new Promise(function(){var f=c(o().m(function c(f){var l,p,d,g,h;return o().w(function(o){for(;;)switch(o.n){case 0:return l=v,o.p=1,o.n=2,l.getInterpretation(a,t,s,i,r,n);case 2:return p=o.v,d=p.find(function(t){return t.id==e})||p.find(function(t){return"default"==t.id}),o.n=3,d.content();case 3:g=o.v,f({html:g}),o.n=5;break;case 4:o.p=4,h=o.v,console.log("ERROR IN ".concat(u),h),f({html:"<span>no interpretation</span>"});case 5:return o.a(2)}},c,null,[[1,4]])}));return function(t){return f.apply(this,arguments)}}())},getInterpretationsList:function(t,e,n,r){return v.getInterpretation(t,e,n,r)},getInterpretatedValue:function(t,e,n,r){return new Promise(function(){var a=c(o().m(function a(u){var c,i;return o().w(function(o){for(;;)switch(o.n){case 0:if(!(c=v.getInterpretatedValue)){o.n=2;break}return o.n=1,c(t,e,n,r);case 1:i=o.v,u(i),o.n=3;break;case 2:u(t);case 3:return o.a(2)}},a)}));return function(t){return a.apply(this,arguments)}}())},onMessage:function(t,e,n){return new Promise(function(){var r=c(o().m(function r(a){var u,c;return o().w(function(r){for(;;)switch(r.n){case 0:if(!(u=v.onMessage)){r.n=2;break}return r.n=1,u(t,e,n);case 1:c=r.v,a(c);case 2:a(null);case 3:return r.a(2)}},r)}));return function(t){return r.apply(this,arguments)}}())},extendController:function(t){v.getActionScope(t)},runAction:function(t){try{v.runAction(t)}catch(e){}},getWindowScope:function(t){return v.getWindowScope(t)},getWindowHTML:function(t){return v.getWindowHTML(t)}},r.a(2,h);case 6:r.p=6,y=r.v,console.log(y),console.log("Failed in createClassInstance (ghconstructor). Module id: ".concat(u,". JS url: ").concat(i));case 7:return r.a(2)}},r,null,[[2,4],[0,6]])}))).apply(this,arguments)}
252
262
  },{"axios":"O4Aa","./../consts.js":"UV2u"}],"Htuh":[function(require,module,exports) {
253
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GHConstructor=void 0;var t=r(require("./createAngularModuleInstance.js")),e=r(require("./createClassInstance.js"));function r(t){return t&&t.__esModule?t:{default:t}}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(){o=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new G(n||[]);return a(i,"_invoke",{value:P(t,r,u)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",g="completed",m={};function b(){}function w(){}function x(){}var L={};f(L,c,function(){return this});var j=Object.getPrototypeOf,k=j&&j(j(T([])));k&&k!==r&&i.call(k,c)&&(L=k);var E=x.prototype=b.prototype=Object.create(L);function _(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function r(o,a,u,c){var s=p(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&i.call(f,"__await")?e.resolve(f.__await).then(function(t){r("next",t,u,c)},function(t){r("throw",t,u,c)}):e.resolve(f).then(function(t){l.value=t,u(l)},function(t){return r("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e(function(e,o){r(t,n,e,o)})}return o=o?o.then(i,i):i()}})}function P(e,r,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=S(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(e,r,n);if("normal"===s.type){if(o=n.done?g:v,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(n(e)+" is not iterable")}return w.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},_(O.prototype),f(O.prototype,s,function(){return this}),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},_(E),f(E,l,"Generator"),f(E,c,function(){return this}),f(E,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function i(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function u(t){i(a,n,o,u,c,"next",t)}function c(t){i(a,n,o,u,c,"throw",t)}u(void 0)})}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function s(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=f(t,"string");return"symbol"==n(e)?e:e+""}function f(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var h=exports.GHConstructor=function(){return s(function t(e){u(this,t),this.gudhub=e,this.cache={},this.modulesQueue={},this.angularInjector,this.nodeWindow},[{key:"getInstance",value:function(){var t=a(o().mark(function t(e){return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.getCached(e)){t.next=4;break}return t.abrupt("return",this.getCached(e));case 4:if(!this.modulesQueue[e]){t.next=9;break}return t.next=7,this.modulesQueue[e];case 7:t.next=12;break;case 9:return this.modulesQueue[e]=this.createInstance(e),t.next=12,this.modulesQueue[e];case 12:return t.abrupt("return",this.getCached(e));case 13:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"pupToCache",value:function(t,e){this.cache[t]=e}},{key:"getCached",value:function(t){return this.cache[t]}},{key:"initAngularInjector",value:function(t){this.angularInjector=t}},{key:"initJsdomWindow",value:function(t){this.nodeWindow=t}},{key:"createInstance",value:function(){var r=a(o().mark(function r(n){var i,a;return o().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(i=this.gudhub.storage.getModuleUrl(n)){r.next=4;break}return console.log("Cannot find module: ".concat(n)),r.abrupt("return");case 4:if("gh_element"!==i.type){r.next=15;break}if("angular"!==i.technology){r.next=11;break}return r.next=8,(0,t.default)(this.gudhub,n,i.url,this.angularInjector,this.nodeWindow);case 8:a=r.sent,r.next=15;break;case 11:if("class"!==i.technology){r.next=15;break}return r.next=14,(0,e.default)(this.gudhub,n,i.js,i.css,this.nodeWindow);case 14:a=r.sent;case 15:return a&&this.pupToCache(n,a),r.abrupt("return",a);case 17:case"end":return r.stop()}},r,this)}));return function(t){return r.apply(this,arguments)}}()}])}();
263
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GHConstructor=void 0;var t=n(require("./createAngularModuleInstance.js")),e=n(require("./createClassInstance.js"));function n(t){return t&&t.__esModule?t:{default:t}}function r(t){return(r="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(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function a(n,r,o,i){var a=r&&r.prototype instanceof s?r:s,f=Object.create(a.prototype);return u(f,"_invoke",function(n,r,o){var u,i,a,s=0,f=o||[],l=!1,h={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,n){return u=e,i=0,a=t,h.n=n,c}};function y(n,r){for(i=n,a=r,e=0;!l&&s&&!o&&e<f.length;e++){var o,u=f[e],y=h.p,p=u[2];n>3?(o=p===r)&&(a=u[(i=u[4])?5:(i=3,3)],u[4]=u[5]=t):u[0]<=y&&((o=n<2&&y<u[1])?(i=0,h.v=r,h.n=u[1]):y<p&&(o=n<3||u[0]>r||r>p)&&(u[4]=n,u[5]=r,h.n=p,i=0))}if(o||n>1)return c;throw l=!0,r}return function(o,f,p){if(s>1)throw TypeError("Generator is already running");for(l&&1===f&&y(f,p),i=f,a=p;(e=i<2?t:a)||!l;){u||(i?i<3?(i>1&&(h.n=-1),y(i,a)):h.n=a:h.v=a);try{if(s=2,u){if(i||(o="next"),e=u[o]){if(!(e=e.call(u,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,i<2&&(i=0)}else 1===i&&(e=u.return)&&e.call(u),i<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),i=1);u=t}else if((e=(l=h.n<0)?a:n.call(r,h))!==c)break}catch(e){u=t,i=1,a=e}finally{s=1}}return{value:e,done:l}}}(n,o,i),!0),f}var c={};function s(){}function f(){}function l(){}e=Object.getPrototypeOf;var h=[][r]?e(e([][r]())):(u(e={},r,function(){return this}),e),y=l.prototype=s.prototype=Object.create(h);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,u(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t}return f.prototype=l,u(y,"constructor",l),u(l,"constructor",f),f.displayName="GeneratorFunction",u(l,i,"GeneratorFunction"),u(y),u(y,i,"Generator"),u(y,r,function(){return this}),u(y,"toString",function(){return"[object Generator]"}),(o=function(){return{w:a,m:p}})()}function u(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}(u=function(t,e,n,r){if(e)o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n;else{var i=function(e,n){u(t,e,function(t){return this._invoke(e,n,t)})};i("next",0),i("throw",1),i("return",2)}})(t,e,n,r)}function i(t,e,n,r,o,u,i){try{var a=t[u](i),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)}function a(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var u=t.apply(e,n);function a(t){i(u,r,o,a,c,"next",t)}function c(t){i(u,r,o,a,c,"throw",t)}a(void 0)})}}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,l(r.key),r)}}function f(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=h(t,"string");return"symbol"==r(e)?e:e+""}function h(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var y=exports.GHConstructor=function(){return f(function t(e){c(this,t),this.gudhub=e,this.cache={},this.modulesQueue={},this.angularInjector,this.nodeWindow},[{key:"getInstance",value:function(){var t=a(o().m(function t(e){return o().w(function(t){for(;;)switch(t.n){case 0:if(!this.getCached(e)){t.n=1;break}return t.a(2,this.getCached(e));case 1:if(!this.modulesQueue[e]){t.n=3;break}return t.n=2,this.modulesQueue[e];case 2:t.n=4;break;case 3:return this.modulesQueue[e]=this.createInstance(e),t.n=4,this.modulesQueue[e];case 4:return t.a(2,this.getCached(e))}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"pupToCache",value:function(t,e){this.cache[t]=e}},{key:"getCached",value:function(t){return this.cache[t]}},{key:"initAngularInjector",value:function(t){this.angularInjector=t}},{key:"initJsdomWindow",value:function(t){this.nodeWindow=t}},{key:"createInstance",value:function(){var n=a(o().m(function n(r){var u,i;return o().w(function(n){for(;;)switch(n.n){case 0:if(u=this.gudhub.storage.getModuleUrl(r)){n.n=1;break}return console.log("Cannot find module: ".concat(r)),n.a(2);case 1:if("gh_element"!==u.type){n.n=5;break}if("angular"!==u.technology){n.n=3;break}return n.n=2,(0,t.default)(this.gudhub,r,u.url,this.angularInjector,this.nodeWindow);case 2:i=n.v,n.n=5;break;case 3:if("class"!==u.technology){n.n=5;break}return n.n=4,(0,e.default)(this.gudhub,r,u.js,u.css,this.nodeWindow);case 4:i=n.v;case 5:return i&&this.pupToCache(r,i),n.a(2,i)}},n,this)}));return function(t){return n.apply(this,arguments)}}()}])}();
254
264
  },{"./createAngularModuleInstance.js":"osSN","./createClassInstance.js":"DsUm"}],"q0my":[function(require,module,exports) {
255
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppProcessor=void 0;var t=require("../consts.js");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 r(t){return a(t)||i(t)||c(t)||n()}function n(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function i(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function a(t){if(Array.isArray(t))return f(t)}function o(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 p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){s(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function s(t,e,r){return(e=m(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=c(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,p=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){p=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(p)throw a}}}}function c(t,e){if(t){if("string"==typeof t)return f(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function l(){l=function(){return r};var t,r={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},p=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,o=Object.create(i.prototype),p=new N(n||[]);return a(o,"_invoke",{value:O(t,r,p)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=f;var v="suspendedStart",d="suspendedYield",g="executing",_="completed",m={};function y(){}function w(){}function b(){}var A={};c(A,p,function(){return this});var x=Object.getPrototypeOf,S=x&&x(x(F([])));S&&S!==n&&i.call(S,p)&&(A=S);var k=b.prototype=y.prototype=Object.create(A);function L(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function j(t,r){function n(a,o,p,s){var u=h(t[a],t,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,p,s)},function(t){n("throw",t,p,s)}):r.resolve(f).then(function(t){c.value=t,p(c)},function(t){return n("throw",t,p,s)})}s(u.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,i){n(t,e,r,i)})}return o=o?o.then(i,i):i()}})}function O(e,r,n){var i=v;return function(a,o){if(i===g)throw Error("Generator is already running");if(i===_){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var p=n.delegate;if(p){var s=E(p,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=_,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=g;var u=h(e,r,n);if("normal"===u.type){if(i=n.done?_:d,u.arg===m)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(i=_,n.method="throw",n.arg=u.arg)}}}function E(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=h(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function F(r){if(r||""===r){var n=r[p];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var a=-1,o=function e(){for(;++a<r.length;)if(i.call(r,a))return e.value=r[a],e.done=!1,e;return e.value=t,e.done=!0,e};return o.next=o}}throw new TypeError(e(r)+" is not iterable")}return w.prototype=b,a(k,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=c(b,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,c(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},r.awrap=function(t){return{__await:t}},L(j.prototype),c(j.prototype,s,function(){return this}),r.AsyncIterator=j,r.async=function(t,e,n,i,a){void 0===a&&(a=Promise);var o=new j(f(t,e,n,i),a);return r.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},L(k),c(k,u,"Generator"),c(k,p,function(){return this}),c(k,"toString",function(){return"[object Generator]"}),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=F,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return p.type="throw",p.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],p=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=i.call(o,"catchLoc"),u=i.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;I(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function h(t,e,r,n,i,a,o){try{var p=t[a](o),s=p.value}catch(t){return void r(t)}p.done?e(s):Promise.resolve(s).then(n,i)}function v(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function o(t){h(a,n,i,o,p,"next",t)}function p(t){h(a,n,i,o,p,"throw",t)}o(void 0)})}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}function _(t,e,r){return e&&g(t.prototype,e),r&&g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function m(t){var r=y(t,"string");return"symbol"==e(r)?r:r+""}function y(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var w=exports.AppProcessor=function(){return _(function t(e,r,n,i,a,o,p){d(this,t),this.storage=e,this.pipeService=r,this.req=n,this.ws=i,this.applistReceived=!1,this.activateSW=p,this.chunksManager=a,this.util=o,this.appListeners()},[{key:"createNewAppApi",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/app/create",form:{app:JSON.stringify(e)}});case 3:return(r=t.sent).from_apps_list=!0,t.abrupt("return",r);case 8:return t.prev=8,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 12:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e){return t.apply(this,arguments)}}()},{key:"updateAppApi",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/app/update",form:{app:JSON.stringify(e)}});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"deleteAppApi",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/app/delete",form:{app_id:e}});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"getAppListApi",value:function(){var t=v(l().mark(function t(){var e;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.get({url:"/api/applist/get"});case 3:return e=t.sent,t.abrupt("return",e.apps_list.map(function(t){return t.from_apps_list=!0,t}));case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(){return t.apply(this,arguments)}}()},{key:"getAppApi",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.get({url:"/api/app/get",params:{app_id:e}});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"getAppListFromStorage",value:function(){return this.storage.getAppsList()}},{key:"getAppFromStorage",value:function(t){var e=this.storage.getApp(t);return e&&e.field_list.length?e:null}},{key:"addNewAppToStorage",value:function(t){return this.storage.getAppsList().push(t)}},{key:"saveAppInStorage",value:function(t){t.items_object={};for(var e=0;e<t.items_list.length;e++){t.items_object[t.items_list[e].item_id]={};for(var r=0;r<t.items_list[e].fields.length;r++)t.items_object[t.items_list[e].item_id][t.items_list[e].fields[r].field_id]=t.items_list[e].fields[r]}var n=this.storage.getApp(t.app_id);return n?(t.from_apps_list=n.from_apps_list,t.permission=n.permission,this.storage.updateApp(t)):(t.from_apps_list=!1,this.addNewAppToStorage(t)),this.getAppFromStorage(t.app_id)}},{key:"updateAppFieldsAndViews",value:function(t){var e=this,r=this.getAppFromStorage(t.app_id);t.items_list=r.items_list,t.file_list=r.file_list,t.from_apps_list=r.from_apps_list,t.items_object=r.items_object,this.storage.updateApp(t),this.pipeService.emit("gh_app_views_update",{app_id:t.app_id},t.views_list),t.field_list.forEach(function(r){e.pipeService.emit("gh_model_update",{app_id:t.app_id,field_id:r.field_id},r)})}},{key:"updateAppInStorage",value:function(t){this.storage.getApp(t.app_id)?(this.storage.updateApp(t),this.pipeService.emit("gh_app_update",{app_id:t.app_id},t),this.pipeService.emit("gh_items_update",{app_id:t.app_id},t.items_list)):this.addNewAppToStorage(t)}},{key:"deletingAppFromStorage",value:function(t){var e=this.storage.getAppsList();return e.forEach(function(r,n){r.app_id==t&&e.splice(n)}),e}},{key:"updateAppsListInStorage",value:function(){var t,e=u(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);try{for(e.s();!(t=e.n()).done;){var r=t.value,n=this.storage.getApp(r.app_id);n?(n.from_apps_list=r.from_apps_list,n.permission=r.permission):this.addNewAppToStorage(r)}}catch(i){e.e(i)}finally{e.f()}}},{key:"refreshApps",value:function(){var t=v(l().mark(function t(){var e,r,n,i,a,o,p,s=arguments;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e=s.length>0&&void 0!==s[0]?s[0]:[],r=u(e),t.prev=2,r.s();case 4:if((n=r.n()).done){t.next=19;break}if(null==(i=n.value)){t.next=17;break}return t.prev=7,t.next=10,this.getAppApi(i);case 10:if(a=t.sent){for(a.items_object={},o=0;o<a.items_list.length;o++)for(a.items_object[a.items_list[o].item_id]={},p=0;p<a.items_list[o].fields.length;p++)a.items_object[a.items_list[o].item_id][a.items_list[o].fields[p].field_id]=a.items_list[o].fields[p];this.updateAppInStorage(a),this.pipeService.emit("gh_app_views_update",{app_id:a.app_id},a.views_list)}t.next=17;break;case 14:t.prev=14,t.t0=t.catch(7),console.log(t.t0);case 17:t.next=4;break;case 19:t.next=24;break;case 21:t.prev=21,t.t1=t.catch(2),r.e(t.t1);case 24:return t.prev=24,r.f(),t.finish(24);case 27:console.log("Apps refreshed: ",JSON.stringify(e));case 28:case"end":return t.stop()}},t,this,[[2,21,24,27],[7,14]])}));return function(){return t.apply(this,arguments)}}()},{key:"refreshAppsList",value:function(){var t=v(l().mark(function t(){var e,r,n;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.getAppListFromStorage(),t.next=3,this.getAppListApi();case 3:r=t.sent,n=r.map(function(t){return p(p({},t),e.find(function(e){return e.app_id===t.app_id}))}),this.updateAppsListInStorage(n),this.pipeService.emit("gh_apps_list_refreshed",{});case 7:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getAppsList",value:function(){var t=v(l().mark(function t(){var e,r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.getAppListFromStorage(),this.applistReceived){t.next=11;break}return t.next=4,this.getAppListApi();case 4:if(r=t.sent){t.next=7;break}return t.abrupt("return",null);case 7:this.updateAppsListInStorage(r),this.applistReceived=!0,e=r,this.getApp(this.storage.getUser().app_init);case 11:return t.abrupt("return",e);case 12:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getAppInfo",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getAppsList();case 2:return r=t.sent,t.abrupt("return",r?r.find(function(t){return t.app_id==e}):null);case 4:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"deleteApp",value:function(){var t=v(l().mark(function t(e){return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.deleteAppApi(e);case 2:return t.abrupt("return",this.deletingAppFromStorage(e));case 3:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getApp",value:function(){var t=v(l().mark(function t(e){var n,i,a=this,o=arguments;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o.length>1&&void 0!==o[1]&&o[1],e){t.next=3;break}return t.abrupt("return",null);case 3:if(n=this.getAppFromStorage(e)){t.next=11;break}return t.next=7,this.getAppApi(e);case 7:if(i=t.sent){t.next=10;break}return t.abrupt("return",null);case 10:i.chunks&&i.chunks.length?(this.chunksManager.getChunks(e,i.chunks).then(function(t){i.items_list=a.util.mergeChunks([].concat(r(t),[i])),a.saveAppInStorage(i),a.pipeService.emit("gh_items_update",{app_id:e},i.items_list)}),n=i,this.saveAppInStorage(i)):(n=this.getAppFromStorage(e))||(n=i,this.saveAppInStorage(i),this.ws.addSubscription(e));case 11:return t.abrupt("return",n);case 12:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateApp",value:function(){var t=v(l().mark(function t(e){var r,n;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e.views_list&&e.views_list.length&&e.show){t.next=6;break}return t.next=3,this.getApp(e.app_id);case 3:r=t.sent,e.views_list&&e.views_list.length||(e.views_list=r.views_list),void 0===e.show&&(e.show=r.show);case 6:return t.next=8,this.updateAppApi(e);case 8:return n=t.sent,this.updateAppFieldsAndViews(n),t.abrupt("return",n);case 11:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateAppInfo",value:function(){var t=v(l().mark(function t(){var e,r=arguments;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},this.pipeService.emit("gh_app_info_update",{app_id:e.app_id},e),t.abrupt("return",this.updateApp(e));case 3:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"createNewApp",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.createNewAppApi(e);case 2:return(r=t.sent).items_object={},this.addNewAppToStorage(r),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getAppViews",value:function(){var t=v(l().mark(function t(e){var r;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=5;break}return t.next=3,this.getApp(e);case 3:return r=t.sent,t.abrupt("return",r.views_list);case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"clearAppProcessor",value:function(){this.getAppListPromises=null,this.getAppPromises={},this.applistReceived=!1}},{key:"appListeners",value:function(){var e=this;this.pipeService.onRoot("gh_app_get",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||!n.app_id){t.next=5;break}return t.next=3,e.getApp(n.app_id);case 3:i=t.sent,e.pipeService.emit("gh_app_get",n,i);case 5:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_apps_list_get",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAppsList();case 2:i=t.sent,e.pipeService.emit("gh_apps_list_get",n,i);case 4:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_delete_app",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.deleteApp(n.app_id);case 2:i=t.sent,e.pipeService.emit("gh_apps_list_update",{recipient:"all"},i);case 4:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_update",{},function(){var t=v(l().mark(function t(r,n){var i,a;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n.app.items_list=[],n.app.file_list=[],t.next=4,e.updateApp(n.app);case 4:return i=t.sent,e.pipeService.emit("gh_app_views_update",{app_id:i.app_id},i.views_list),t.next=8,e.getAppsList();case 8:a=t.sent,e.pipeService.emit("gh_apps_list_update",{recipient:"all"},a),i.field_list.forEach(function(t){e.pipeService.emit("gh_model_update",{app_id:i.app_id,field_id:t.field_id},t)});case 11:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_view_get",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||!n.app_id){t.next=5;break}return t.next=3,e.getApp(n.app_id);case 3:(i=t.sent).views_list.forEach(function(t,r){t.view_id==n.view_id&&e.pipeService.emit("gh_app_view_get",n,i.views_list[r])});case 5:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_info_get",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getAppInfo(n.app_id);case 2:(i=t.sent)&&e.pipeService.emit("gh_app_info_get",n,i);case 4:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_info_update",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!n||!n.app){t.next=5;break}return t.next=3,e.updateAppInfo(n.app);case 3:i=t.sent,e.pipeService.emit("gh_app_info_update",{app_id:n.app.app_id},i);case 5:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_create",{},function(){var t=v(l().mark(function t(r,n){var i;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.createNewApp(n.app);case 2:return t.next=4,e.getAppsList();case 4:i=t.sent,e.pipeService.emit("gh_apps_list_update",{recipient:"all"},i);case 6:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()),t.IS_WEB&&this.activateSW&&navigator.serviceWorker.addEventListener("message",function(){var t=v(l().mark(function t(r){var n;return l().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if("refresh app"!==r.data.type){t.next=7;break}return t.next=3,e.getApp(r.data.payload.app_id);case 3:(n=t.sent)&&e.util.compareAppsItemsLists(n.items_list,r.data.payload.items_list.filter(function(t){return!t.trash}),function(t){var n=t.diff_fields_items,i=t.diff_fields_items_Ids,a=t.diff_items,o=t.newItems,p=t.deletedItems;(a.length||o.length||p.length)&&(e.pipeService.emit("gh_items_update",{app_id:r.data.payload.app_id},r.data.payload.items_list.filter(function(t){return!t.trash})),a.forEach(function(t){return e.pipeService.emit("gh_item_update",{app_id:r.data.payload.app_id,item_id:t.item_id},t)})),i.forEach(function(t){var i=n[t];i&&i.forEach(function(n){e.pipeService.emit("gh_value_update",{app_id:r.data.payload.app_id,item_id:t,field_id:n.field_id},n.field_value)})})}),r.data.payload.items_list=e.util.mergeChunks([n,r.data.payload]),e.saveAppInStorage(r.data.payload);case 7:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}())}}])}();
265
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppProcessor=void 0;var t=require("../consts.js");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 r(t){return a(t)||n(t)||c(t)||i()}function i(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function a(t){if(Array.isArray(t))return f(t)}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach(function(e){s(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function s(t,e,r){return(e=y(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=c(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,p=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return p=t.done,t},e:function(t){o=!0,a=t},f:function(){try{p||null==r.return||r.return()}finally{if(o)throw a}}}}function c(t,e){if(t){if("string"==typeof t)return f(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function l(){var t,e,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",n=r.toStringTag||"@@toStringTag";function a(r,i,n,a){var s=i&&i.prototype instanceof o?i:o,u=Object.create(s.prototype);return h(u,"_invoke",function(r,i,n){var a,o,s,u=0,c=n||[],f=!1,l={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,r){return a=e,o=0,s=t,l.n=r,p}};function h(r,i){for(o=r,s=i,e=0;!f&&u&&!n&&e<c.length;e++){var n,a=c[e],h=l.p,v=a[2];r>3?(n=v===i)&&(s=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=t):a[0]<=h&&((n=r<2&&h<a[1])?(o=0,l.v=i,l.n=a[1]):h<v&&(n=r<3||a[0]>i||i>v)&&(a[4]=r,a[5]=i,l.n=v,o=0))}if(n||r>1)return p;throw f=!0,i}return function(n,c,v){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&h(c,v),o=c,s=v;(e=o<2?t:s)||!f;){a||(o?o<3?(o>1&&(l.n=-1),h(o,s)):l.n=s:l.v=s);try{if(u=2,a){if(o||(n="next"),e=a[n]){if(!(e=e.call(a,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,o<2&&(o=0)}else 1===o&&(e=a.return)&&e.call(a),o<2&&(s=TypeError("The iterator does not provide a '"+n+"' method"),o=1);a=t}else if((e=(f=l.n<0)?s:r.call(i,l))!==p)break}catch(e){a=t,o=1,s=e}finally{u=1}}return{value:e,done:f}}}(r,n,a),!0),u}var p={};function o(){}function s(){}function u(){}e=Object.getPrototypeOf;var c=[][i]?e(e([][i]())):(h(e={},i,function(){return this}),e),f=u.prototype=o.prototype=Object.create(c);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,h(t,n,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=u,h(f,"constructor",u),h(u,"constructor",s),s.displayName="GeneratorFunction",h(u,n,"GeneratorFunction"),h(f),h(f,n,"Generator"),h(f,i,function(){return this}),h(f,"toString",function(){return"[object Generator]"}),(l=function(){return{w:a,m:v}})()}function h(t,e,r,i){var n=Object.defineProperty;try{n({},"",{})}catch(t){n=0}(h=function(t,e,r,i){if(e)n?n(t,e,{value:r,enumerable:!i,configurable:!i,writable:!i}):t[e]=r;else{var a=function(e,r){h(t,e,function(t){return this._invoke(e,r,t)})};a("next",0),a("throw",1),a("return",2)}})(t,e,r,i)}function v(t,e,r,i,n,a,p){try{var o=t[a](p),s=o.value}catch(t){return void r(t)}o.done?e(s):Promise.resolve(s).then(i,n)}function d(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var a=t.apply(e,r);function p(t){v(a,i,n,p,o,"next",t)}function o(t){v(a,i,n,p,o,"throw",t)}p(void 0)})}}function _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function g(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,y(i.key),i)}}function m(t,e,r){return e&&g(t.prototype,e),r&&g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function y(t){var r=w(t,"string");return"symbol"==e(r)?r:r+""}function w(t,r){if("object"!=e(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,r||"default");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var A=exports.AppProcessor=function(){return m(function t(e,r,i,n,a,p,o){_(this,t),this.storage=e,this.pipeService=r,this.req=i,this.ws=n,this.applistReceived=!1,this.activateSW=o,this.chunksManager=a,this.util=p,this.appListeners()},[{key:"createNewAppApi",value:function(){var t=d(l().m(function t(e){var r,i;return l().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.req.post({url:"/api/app/create",form:{app:JSON.stringify(e)}});case 1:return(r=t.v).from_apps_list=!0,t.a(2,r);case 2:return t.p=2,i=t.v,console.log(i),t.a(2,null)}},t,this,[[0,2]])}));return function(e){return t.apply(this,arguments)}}()},{key:"updateAppApi",value:function(){var t=d(l().m(function t(e){var r,i;return l().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.req.post({url:"/api/app/update",form:{app:JSON.stringify(e)}});case 1:return r=t.v,t.a(2,r);case 2:return t.p=2,i=t.v,console.log(i),t.a(2,null)}},t,this,[[0,2]])}));return function(e){return t.apply(this,arguments)}}()},{key:"deleteAppApi",value:function(){var t=d(l().m(function t(e){var r,i;return l().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.req.post({url:"/api/app/delete",form:{app_id:e}});case 1:return r=t.v,t.a(2,r);case 2:return t.p=2,i=t.v,console.log(i),t.a(2,null)}},t,this,[[0,2]])}));return function(e){return t.apply(this,arguments)}}()},{key:"getAppListApi",value:function(){var t=d(l().m(function t(){var e,r;return l().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.req.get({url:"/api/applist/get"});case 1:return e=t.v,t.a(2,e.apps_list.map(function(t){return t.from_apps_list=!0,t}));case 2:return t.p=2,r=t.v,console.log(r),t.a(2,null)}},t,this,[[0,2]])}));return function(){return t.apply(this,arguments)}}()},{key:"getAppApi",value:function(){var t=d(l().m(function t(e){var r,i;return l().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.req.get({url:"/api/app/get",params:{app_id:e}});case 1:return r=t.v,t.a(2,r);case 2:return t.p=2,i=t.v,console.log(i),t.a(2,null)}},t,this,[[0,2]])}));return function(e){return t.apply(this,arguments)}}()},{key:"getAppListFromStorage",value:function(){return this.storage.getAppsList()}},{key:"getAppFromStorage",value:function(t){var e=this.storage.getApp(t);return e&&e.field_list.length?e:null}},{key:"addNewAppToStorage",value:function(t){return this.storage.getAppsList().push(t)}},{key:"saveAppInStorage",value:function(t){t.items_object={};for(var e=0;e<t.items_list.length;e++){t.items_object[t.items_list[e].item_id]={};for(var r=0;r<t.items_list[e].fields.length;r++)t.items_object[t.items_list[e].item_id][t.items_list[e].fields[r].field_id]=t.items_list[e].fields[r]}var i=this.storage.getApp(t.app_id);return i?(t.from_apps_list=i.from_apps_list,t.permission=i.permission,this.storage.updateApp(t)):(t.from_apps_list=!1,this.addNewAppToStorage(t)),this.getAppFromStorage(t.app_id)}},{key:"updateAppFieldsAndViews",value:function(t){var e=this,r=this.getAppFromStorage(t.app_id);t.items_list=r.items_list,t.file_list=r.file_list,t.from_apps_list=r.from_apps_list,t.items_object=r.items_object,this.storage.updateApp(t),this.pipeService.emit("gh_app_views_update",{app_id:t.app_id},t.views_list),t.field_list.forEach(function(r){e.pipeService.emit("gh_model_update",{app_id:t.app_id,field_id:r.field_id},r)})}},{key:"updateAppInStorage",value:function(t){this.storage.getApp(t.app_id)?(this.storage.updateApp(t),this.pipeService.emit("gh_app_update",{app_id:t.app_id},t),this.pipeService.emit("gh_items_update",{app_id:t.app_id},t.items_list)):this.addNewAppToStorage(t)}},{key:"deletingAppFromStorage",value:function(t){var e=this.storage.getAppsList();return e.forEach(function(r,i){r.app_id==t&&e.splice(i)}),e}},{key:"updateAppsListInStorage",value:function(){var t,e=u(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);try{for(e.s();!(t=e.n()).done;){var r=t.value,i=this.storage.getApp(r.app_id);i?(i.from_apps_list=r.from_apps_list,i.permission=r.permission):this.addNewAppToStorage(r)}}catch(n){e.e(n)}finally{e.f()}}},{key:"refreshApps",value:function(){var t=d(l().m(function t(){var e,r,i,n,a,p,o,s,c,f=arguments;return l().w(function(t){for(;;)switch(t.n){case 0:e=f.length>0&&void 0!==f[0]?f[0]:[],r=u(e),t.p=1,r.s();case 2:if((i=r.n()).done){t.n=7;break}if(null==(n=i.value)){t.n=6;break}return t.p=3,t.n=4,this.getAppApi(n);case 4:if(a=t.v){for(a.items_object={},p=0;p<a.items_list.length;p++)for(a.items_object[a.items_list[p].item_id]={},o=0;o<a.items_list[p].fields.length;o++)a.items_object[a.items_list[p].item_id][a.items_list[p].fields[o].field_id]=a.items_list[p].fields[o];this.updateAppInStorage(a),this.pipeService.emit("gh_app_views_update",{app_id:a.app_id},a.views_list)}t.n=6;break;case 5:t.p=5,s=t.v,console.log(s);case 6:t.n=2;break;case 7:t.n=9;break;case 8:t.p=8,c=t.v,r.e(c);case 9:return t.p=9,r.f(),t.f(9);case 10:console.log("Apps refreshed: ",JSON.stringify(e));case 11:return t.a(2)}},t,this,[[3,5],[1,8,9,10]])}));return function(){return t.apply(this,arguments)}}()},{key:"refreshAppsList",value:function(){var t=d(l().m(function t(){var e,r,i;return l().w(function(t){for(;;)switch(t.n){case 0:return e=this.getAppListFromStorage(),t.n=1,this.getAppListApi();case 1:r=t.v,i=r.map(function(t){return o(o({},t),e.find(function(e){return e.app_id===t.app_id}))}),this.updateAppsListInStorage(i),this.pipeService.emit("gh_apps_list_refreshed",{});case 2:return t.a(2)}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getAppsList",value:function(){var t=d(l().m(function t(){var e,r;return l().w(function(t){for(;;)switch(t.n){case 0:if(e=this.getAppListFromStorage(),this.applistReceived){t.n=3;break}return t.n=1,this.getAppListApi();case 1:if(r=t.v){t.n=2;break}return t.a(2,null);case 2:this.updateAppsListInStorage(r),this.applistReceived=!0,e=r,this.getApp(this.storage.getUser().app_init);case 3:return t.a(2,e)}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"getAppInfo",value:function(){var t=d(l().m(function t(e){var r;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.getAppsList();case 1:return r=t.v,t.a(2,r?r.find(function(t){return t.app_id==e}):null)}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"deleteApp",value:function(){var t=d(l().m(function t(e){return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.deleteAppApi(e);case 1:return t.a(2,this.deletingAppFromStorage(e))}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getApp",value:function(){var t=d(l().m(function t(e){var i,n,a=this,p=arguments;return l().w(function(t){for(;;)switch(t.n){case 0:if(p.length>1&&void 0!==p[1]&&p[1],e){t.n=1;break}return t.a(2,null);case 1:if(i=this.getAppFromStorage(e)){t.n=4;break}return t.n=2,this.getAppApi(e);case 2:if(n=t.v){t.n=3;break}return t.a(2,null);case 3:n.chunks&&n.chunks.length?(this.chunksManager.getChunks(e,n.chunks).then(function(t){n.items_list=a.util.mergeChunks([].concat(r(t),[n])),a.saveAppInStorage(n),a.pipeService.emit("gh_items_update",{app_id:e},n.items_list)}),i=n,this.saveAppInStorage(n)):(i=this.getAppFromStorage(e))||(i=n,this.saveAppInStorage(n),this.ws.addSubscription(e));case 4:return t.a(2,i)}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateApp",value:function(){var t=d(l().m(function t(e){var r,i;return l().w(function(t){for(;;)switch(t.n){case 0:if(e.views_list&&e.views_list.length&&e.show){t.n=2;break}return t.n=1,this.getApp(e.app_id);case 1:r=t.v,e.views_list&&e.views_list.length||(e.views_list=r.views_list),void 0===e.show&&(e.show=r.show);case 2:return t.n=3,this.updateAppApi(e);case 3:return i=t.v,this.updateAppFieldsAndViews(i),t.a(2,i)}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateAppInfo",value:function(){var t=d(l().m(function t(){var e,r=arguments;return l().w(function(t){for(;;)switch(t.n){case 0:return e=r.length>0&&void 0!==r[0]?r[0]:{},this.pipeService.emit("gh_app_info_update",{app_id:e.app_id},e),t.a(2,this.updateApp(e))}},t,this)}));return function(){return t.apply(this,arguments)}}()},{key:"createNewApp",value:function(){var t=d(l().m(function t(e){var r;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.createNewAppApi(e);case 1:return(r=t.v).items_object={},this.addNewAppToStorage(r),t.a(2,r)}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getAppViews",value:function(){var t=d(l().m(function t(e){var r;return l().w(function(t){for(;;)switch(t.n){case 0:if(!e){t.n=2;break}return t.n=1,this.getApp(e);case 1:return r=t.v,t.a(2,r.views_list);case 2:return t.a(2)}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"clearAppProcessor",value:function(){this.getAppListPromises=null,this.getAppPromises={},this.applistReceived=!1}},{key:"appListeners",value:function(){var e=this;this.pipeService.onRoot("gh_app_get",{},function(){var t=d(l().m(function t(r,i){var n;return l().w(function(t){for(;;)switch(t.n){case 0:if(!i||!i.app_id){t.n=2;break}return t.n=1,e.getApp(i.app_id);case 1:n=t.v,e.pipeService.emit("gh_app_get",i,n);case 2:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_apps_list_get",{},function(){var t=d(l().m(function t(r,i){var n;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.getAppsList();case 1:n=t.v,e.pipeService.emit("gh_apps_list_get",i,n);case 2:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_delete_app",{},function(){var t=d(l().m(function t(r,i){var n;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.deleteApp(i.app_id);case 1:n=t.v,e.pipeService.emit("gh_apps_list_update",{recipient:"all"},n);case 2:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_update",{},function(){var t=d(l().m(function t(r,i){var n,a;return l().w(function(t){for(;;)switch(t.n){case 0:return i.app.items_list=[],i.app.file_list=[],t.n=1,e.updateApp(i.app);case 1:return n=t.v,e.pipeService.emit("gh_app_views_update",{app_id:n.app_id},n.views_list),t.n=2,e.getAppsList();case 2:a=t.v,e.pipeService.emit("gh_apps_list_update",{recipient:"all"},a),n.field_list.forEach(function(t){e.pipeService.emit("gh_model_update",{app_id:n.app_id,field_id:t.field_id},t)});case 3:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_view_get",{},function(){var t=d(l().m(function t(r,i){var n;return l().w(function(t){for(;;)switch(t.n){case 0:if(!i||!i.app_id){t.n=2;break}return t.n=1,e.getApp(i.app_id);case 1:(n=t.v).views_list.forEach(function(t,r){t.view_id==i.view_id&&e.pipeService.emit("gh_app_view_get",i,n.views_list[r])});case 2:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_info_get",{},function(){var t=d(l().m(function t(r,i){var n;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.getAppInfo(i.app_id);case 1:(n=t.v)&&e.pipeService.emit("gh_app_info_get",i,n);case 2:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_info_update",{},function(){var t=d(l().m(function t(r,i){var n;return l().w(function(t){for(;;)switch(t.n){case 0:if(!i||!i.app){t.n=2;break}return t.n=1,e.updateAppInfo(i.app);case 1:n=t.v,e.pipeService.emit("gh_app_info_update",{app_id:i.app.app_id},n);case 2:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_app_create",{},function(){var t=d(l().m(function t(r,i){var n;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.createNewApp(i.app);case 1:return t.n=2,e.getAppsList();case 2:n=t.v,e.pipeService.emit("gh_apps_list_update",{recipient:"all"},n);case 3:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),t.IS_WEB&&this.activateSW&&navigator.serviceWorker.addEventListener("message",function(){var t=d(l().m(function t(r){var i;return l().w(function(t){for(;;)switch(t.n){case 0:if("refresh app"!==r.data.type){t.n=2;break}return t.n=1,e.getApp(r.data.payload.app_id);case 1:(i=t.v)&&e.util.compareAppsItemsLists(i.items_list,r.data.payload.items_list.filter(function(t){return!t.trash}),function(t){var i=t.diff_fields_items,n=t.diff_fields_items_Ids,a=t.diff_items,p=t.newItems,o=t.deletedItems;(a.length||p.length||o.length)&&(e.pipeService.emit("gh_items_update",{app_id:r.data.payload.app_id},r.data.payload.items_list.filter(function(t){return!t.trash})),a.forEach(function(t){return e.pipeService.emit("gh_item_update",{app_id:r.data.payload.app_id,item_id:t.item_id},t)})),n.forEach(function(t){var n=i[t];n&&n.forEach(function(i){e.pipeService.emit("gh_value_update",{app_id:r.data.payload.app_id,item_id:t,field_id:i.field_id},i.field_value)})})}),r.data.payload.items_list=e.util.mergeChunks([i,r.data.payload]),e.saveAppInStorage(r.data.payload);case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}())}}])}();
256
266
  },{"../consts.js":"UV2u"}],"UUd3":[function(require,module,exports) {
257
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ItemProcessor=void 0;var t=require("../utils.js");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 r(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 n(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach(function(e){i(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function i(t,e,r){return(e=f(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(){o=function(){return r};var t,r={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},s=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",p=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,o=Object.create(i.prototype),u=new N(n||[]);return a(o,"_invoke",{value:E(t,r,u)}),o}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=l;var d="suspendedStart",m="suspendedYield",v="executing",y="completed",_={};function g(){}function w(){}function b(){}var x={};f(x,s,function(){return this});var S=Object.getPrototypeOf,k=S&&S(S(F([])));k&&k!==n&&i.call(k,s)&&(x=k);var O=b.prototype=g.prototype=Object.create(x);function j(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function I(t,r){function n(o,a,u,s){var c=h(t[o],t,a);if("throw"!==c.type){var p=c.arg,f=p.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,u,s)},function(t){n("throw",t,u,s)}):r.resolve(f).then(function(t){p.value=t,u(p)},function(t){return n("throw",t,u,s)})}s(c.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,i){n(t,e,r,i)})}return o=o?o.then(i,i):i()}})}function E(e,r,n){var i=d;return function(o,a){if(i===v)throw Error("Generator is already running");if(i===y){if("throw"===o)throw a;return{value:t,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var s=L(u,n);if(s){if(s===_)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===d)throw i=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=v;var c=h(e,r,n);if("normal"===c.type){if(i=n.done?y:m,c.arg===_)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=y,n.method="throw",n.arg=c.arg)}}}function L(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,L(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),_;var o=h(i,e.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,_;var a=o.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,_):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,_)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function F(r){if(r||""===r){var n=r[s];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(i.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(e(r)+" is not iterable")}return w.prototype=b,a(O,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:w,configurable:!0}),w.displayName=f(b,p,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,f(t,p,"GeneratorFunction")),t.prototype=Object.create(O),t},r.awrap=function(t){return{__await:t}},j(I.prototype),f(I.prototype,c,function(){return this}),r.AsyncIterator=I,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var a=new I(l(t,e,n,i),o);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(O),f(O,p,"Generator"),f(O,s,function(){return this}),f(O,"toString",function(){return"[object Generator]"}),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=F,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return u.type="throw",u.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,_):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),_}},r}function a(t,e,r,n,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,i)}function u(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function u(t){a(o,n,i,u,s,"next",t)}function s(t){a(o,n,i,u,s,"throw",t)}u(void 0)})}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,f(n.key),n)}}function p(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t){var r=l(t,"string");return"symbol"==e(r)?r:r+""}function l(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var h=exports.ItemProcessor=function(){return p(function t(e,r,n,i,o){s(this,t),this.storage=e,this.pipeService=r,this.req=n,this.appProcessor=i,this.util=o,this.itemListeners()},[{key:"addItemsApi",value:function(){var t=u(o().mark(function t(e,r){var n;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/items/add",form:{items:JSON.stringify(r),app_id:e}});case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e,r){return t.apply(this,arguments)}}()},{key:"updateItemsApi",value:function(){var t=u(o().mark(function t(e,r){var n;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/api/items/update",form:{items:JSON.stringify(r),app_id:e}});case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e,r){return t.apply(this,arguments)}}()},{key:"deleteItemsApi",value:function(t){try{var e=this.req.post({url:"/api/items/delete",form:{items_ids:JSON.stringify(t)}});return e.from_apps_list=!0,e}catch(r){return console.log(r),null}}},{key:"addItemsToStorage",value:function(){var t=u(o().mark(function t(e,r){var n,i=this;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.appProcessor.getApp(e);case 2:return(n=t.sent)&&(r.forEach(function(t){n.items_list.push(t),n.items_object[t.item_id]={};for(var r=0;r<t.fields.length;r++)n.items_object[t.item_id][t.fields[r].field_id]=t.fields[r];i.pipeService.emit("gh_item_update",{app_id:e},[t])}),this.pipeService.emit("gh_items_update",{app_id:e},n.items_list),this.storage.updateApp(n)),t.abrupt("return",n);case 5:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"updateItemsInStorage",value:function(){var t=u(o().mark(function t(e,r){var n,i=this;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.pipeService.emit("gh_items_update",{app_id:e},r),t.next=3,this.appProcessor.getApp(e);case 3:return(n=t.sent)&&r&&r.forEach(function(t){var r={app_id:e};i.pipeService.emit("gh_item_update",r,[t]),r.item_id=t.item_id,i.pipeService.emit("gh_item_update",r,t);var o=n.items_list.find(function(e){return e.item_id==t.item_id});o&&t.fields.forEach(function(t){var e=o.fields.find(function(e){return e.field_id==t.field_id});r.field_id=t.field_id,e?e.field_value!=t.field_value&&(e.field_value=t.field_value,n.items_object[o.item_id][e.field_id]=e,i.pipeService.emit("gh_value_update",r,t.field_value)):(o.fields.push(t),n.items_object[o.item_id][t.field_id]=t,i.pipeService.emit("gh_value_update",r,t.field_value))})}),t.abrupt("return",r);case 6:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"deleteItemsFromStorage",value:function(){var t=u(o().mark(function t(e){var r,n,i=arguments;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:[],t.next=3,this.appProcessor.getApp(e);case 3:(n=t.sent)&&(n.items_list=n.items_list.filter(function(t){return!r.find(function(e){return t.item_id==e.item_id})||(delete n.items_object[t.item_id],!1)}),this.pipeService.emit("gh_items_update",{app_id:e},n.items_list),this.storage.updateApp(n));case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"getItems",value:function(){var t=u(o().mark(function t(e){var r,n=arguments;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n.length>1&&void 0!==n[1]&&n[1],t.next=3,this.appProcessor.getApp(e);case 3:if(r=t.sent){t.next=6;break}return t.abrupt("return",null);case 6:return t.abrupt("return",r.items_list);case 7:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"addNewItems",value:function(){var e=u(o().mark(function e(r,i){var a,u;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.map(function(e){return n(n({},e),{},{fields:(0,t.filterFields)(e.fields)})}),e.next=3,this.addItemsApi(r,a);case 3:return u=e.sent,e.next=6,this.addItemsToStorage(r,u);case 6:return this.pipeService.emit("gh_items_add",{app_id:r},u),e.abrupt("return",u);case 8:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"updateItems",value:function(){var e=u(o().mark(function e(r,i){var a,u;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=i.map(function(e){return n(n({},e),{},{fields:(0,t.filterFields)(e.fields)})}),e.next=3,this.updateItemsApi(r,a);case 3:return u=e.sent,e.next=6,this.updateItemsInStorage(r,u);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"deleteItems",value:function(){var t=u(o().mark(function t(e,r){var n=this;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.deleteItemsApi(r).then(function(){var t=u(o().mark(function t(r){return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.deleteItemsFromStorage(e,r);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()));case 1:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"restoreItems",value:function(){var t=u(o().mark(function t(e,r){var n,i;return o().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r.map(function(t){return{item_id:t,trash:!1}}),t.next=3,this.updateItemsApi(e,n);case 3:return i=t.sent,t.next=6,this.updateItemsInStorage(e,i);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"itemListeners",value:function(){var t=this;this.pipeService.onRoot("gh_items_get",{},function(){var e=u(o().mark(function e(r,n){var i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.app_id){e.next=5;break}return e.next=3,t.getItems(n.app_id);case 3:(i=e.sent)?t.pipeService.emit("gh_items_get",n,i):t.pipeService.emit("gh_items_get",n,[]);case 5:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_items_add",{},function(){var e=u(o().mark(function e(r,n){var i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n&&n.app_id&&n.items)){e.next=5;break}return e.next=3,t.addNewItems(n.app_id,n.items);case 3:(i=e.sent)?t.pipeService.emit("gh_items_add",n,i):t.pipeService.emit("gh_items_add",n,[]);case 5:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_items_update",{},function(){var e=u(o().mark(function e(r,n){var i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n&&n.app_id&&n.items)){e.next=5;break}return e.next=3,t.updateItems(n.app_id,n.items);case 3:(i=e.sent)?t.pipeService.emit("gh_items_update",n,i):t.pipeService.emit("gh_items_update",n,[]);case 5:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_item_get",{},function(){var e=u(o().mark(function e(r,n){var i,a;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.app_id){e.next=6;break}return e.next=3,t.getItems(n.app_id);case 3:i=e.sent,a=i.find(function(t){return t.item_id==n.item_id}),t.pipeService.emit("gh_item_get",n,a);case 6:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_filtered_items_get",{},function(){var e=u(o().mark(function e(r,n){var i,a;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.element_app_id){e.next=8;break}return e.next=3,t.getItems(n.element_app_id);case 3:return i=e.sent,e.next=6,t.util.getFilteredItems(i,n.filters_list,n.element_app_id,n.app_id,n.item_id,n.field_groupe,n.search,n.search_params);case 6:a=e.sent,t.pipeService.emit("gh_filtered_items_get",n,a);case 8:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}()),this.pipeService.onRoot("gh_filter_items",{},function(){var e=u(o().mark(function e(r,n){var i;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!n||!n.items){e.next=5;break}return e.next=3,t.util.getFilteredItems(n.items,n.filters_list,n.element_app_id,n.app_id,n.item_id,n.field_groupe,n.search,n.search_params);case 3:i=e.sent,t.pipeService.emit("gh_filter_items",n,i);case 5:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}())}}])}();
267
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ItemProcessor=void 0;var e=require("../utils.js");function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function i(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function n(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(){var e,t,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",n=r.toStringTag||"@@toStringTag";function a(r,i,n,o){var a=i&&i.prototype instanceof c?i:c,p=Object.create(a.prototype);return u(p,"_invoke",function(r,i,n){var o,u,a,c=0,p=n||[],f=!1,l={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,r){return o=t,u=0,a=e,l.n=r,s}};function m(r,i){for(u=r,a=i,t=0;!f&&c&&!n&&t<p.length;t++){var n,o=p[t],m=l.p,d=o[2];r>3?(n=d===i)&&(a=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=m&&((n=r<2&&m<o[1])?(u=0,l.v=i,l.n=o[1]):m<d&&(n=r<3||o[0]>i||i>d)&&(o[4]=r,o[5]=i,l.n=d,u=0))}if(n||r>1)return s;throw f=!0,i}return function(n,p,d){if(c>1)throw TypeError("Generator is already running");for(f&&1===p&&m(p,d),u=p,a=d;(t=u<2?e:a)||!f;){o||(u?u<3?(u>1&&(l.n=-1),m(u,a)):l.n=a:l.v=a);try{if(c=2,o){if(u||(n="next"),t=o[n]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,u<2&&(u=0)}else 1===u&&(t=o.return)&&t.call(o),u<2&&(a=TypeError("The iterator does not provide a '"+n+"' method"),u=1);o=e}else if((t=(f=l.n<0)?a:r.call(i,l))!==s)break}catch(t){o=e,u=1,a=t}finally{c=1}}return{value:t,done:f}}}(r,n,o),!0),p}var s={};function c(){}function p(){}function f(){}t=Object.getPrototypeOf;var l=[][i]?t(t([][i]())):(u(t={},i,function(){return this}),t),m=f.prototype=c.prototype=Object.create(l);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,u(e,n,"GeneratorFunction")),e.prototype=Object.create(m),e}return p.prototype=f,u(m,"constructor",f),u(f,"constructor",p),p.displayName="GeneratorFunction",u(f,n,"GeneratorFunction"),u(m),u(m,n,"Generator"),u(m,i,function(){return this}),u(m,"toString",function(){return"[object Generator]"}),(o=function(){return{w:a,m:d}})()}function u(e,t,r,i){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}(u=function(e,t,r,i){if(t)n?n(e,t,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[t]=r;else{var o=function(t,r){u(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}})(e,t,r,i)}function a(e,t,r,i,n,o,u){try{var a=e[o](u),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(i,n)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var o=e.apply(t,r);function u(e){a(o,i,n,u,s,"next",e)}function s(e){a(o,i,n,u,s,"throw",e)}u(void 0)})}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,l(i.key),i)}}function f(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(e){var r=m(e,"string");return"symbol"==t(r)?r:r+""}function m(e,r){if("object"!=t(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,r||"default");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}var d=exports.ItemProcessor=function(){return f(function e(t,r,i,n,o){c(this,e),this.storage=t,this.pipeService=r,this.req=i,this.appProcessor=n,this.util=o,this.itemListeners()},[{key:"addItemsApi",value:function(){var e=s(o().m(function e(t,r){var i,n;return o().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,this.req.post({url:"/api/items/add",form:{items:JSON.stringify(r),app_id:t}});case 1:return i=e.v,e.a(2,i);case 2:return e.p=2,n=e.v,console.log(n),e.a(2,null)}},e,this,[[0,2]])}));return function(t,r){return e.apply(this,arguments)}}()},{key:"updateItemsApi",value:function(){var e=s(o().m(function e(t,r){var i,n;return o().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,e.n=1,this.req.post({url:"/api/items/update",form:{items:JSON.stringify(r),app_id:t}});case 1:return i=e.v,e.a(2,i);case 2:return e.p=2,n=e.v,console.log(n),e.a(2,null)}},e,this,[[0,2]])}));return function(t,r){return e.apply(this,arguments)}}()},{key:"deleteItemsApi",value:function(e){try{var t=this.req.post({url:"/api/items/delete",form:{items_ids:JSON.stringify(e)}});return t.from_apps_list=!0,t}catch(r){return console.log(r),null}}},{key:"addItemsToStorage",value:function(){var e=s(o().m(function e(t,r){var i,n=this;return o().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.appProcessor.getApp(t);case 1:return(i=e.v)&&(r.forEach(function(e){i.items_list.push(e),i.items_object[e.item_id]={};for(var r=0;r<e.fields.length;r++)i.items_object[e.item_id][e.fields[r].field_id]=e.fields[r];n.pipeService.emit("gh_item_update",{app_id:t},[e])}),this.pipeService.emit("gh_items_update",{app_id:t},i.items_list),this.storage.updateApp(i)),e.a(2,i)}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"updateItemsInStorage",value:function(){var e=s(o().m(function e(t,r){var i,n=this;return o().w(function(e){for(;;)switch(e.n){case 0:return this.pipeService.emit("gh_items_update",{app_id:t},r),e.n=1,this.appProcessor.getApp(t);case 1:return(i=e.v)&&r&&r.forEach(function(e){var r={app_id:t};n.pipeService.emit("gh_item_update",r,[e]),r.item_id=e.item_id,n.pipeService.emit("gh_item_update",r,e);var o=i.items_list.find(function(t){return t.item_id==e.item_id});o&&e.fields.forEach(function(e){var t=o.fields.find(function(t){return t.field_id==e.field_id});r.field_id=e.field_id,t?t.field_value!=e.field_value&&(t.field_value=e.field_value,i.items_object[o.item_id][t.field_id]=t,n.pipeService.emit("gh_value_update",r,e.field_value)):(o.fields.push(e),i.items_object[o.item_id][e.field_id]=e,n.pipeService.emit("gh_value_update",r,e.field_value))})}),e.a(2,r)}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"deleteItemsFromStorage",value:function(){var e=s(o().m(function e(t){var r,i,n=arguments;return o().w(function(e){for(;;)switch(e.n){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:[],e.n=1,this.appProcessor.getApp(t);case 1:(i=e.v)&&(i.items_list=i.items_list.filter(function(e){return!r.find(function(t){return e.item_id==t.item_id})||(delete i.items_object[e.item_id],!1)}),this.pipeService.emit("gh_items_update",{app_id:t},i.items_list),this.storage.updateApp(i));case 2:return e.a(2)}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"getItems",value:function(){var e=s(o().m(function e(t){var r,i=arguments;return o().w(function(e){for(;;)switch(e.n){case 0:return i.length>1&&void 0!==i[1]&&i[1],e.n=1,this.appProcessor.getApp(t);case 1:if(r=e.v){e.n=2;break}return e.a(2,null);case 2:return e.a(2,r.items_list)}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"addNewItems",value:function(){var t=s(o().m(function t(r,n){var u,a;return o().w(function(t){for(;;)switch(t.n){case 0:return u=n.map(function(t){return i(i({},t),{},{fields:(0,e.filterFields)(t.fields)})}),t.n=1,this.addItemsApi(r,u);case 1:return a=t.v,t.n=2,this.addItemsToStorage(r,a);case 2:return this.pipeService.emit("gh_items_add",{app_id:r},a),t.a(2,a)}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"updateItems",value:function(){var t=s(o().m(function t(r,n){var u,a;return o().w(function(t){for(;;)switch(t.n){case 0:return u=n.map(function(t){return i(i({},t),{},{fields:(0,e.filterFields)(t.fields)})}),t.n=1,this.updateItemsApi(r,u);case 1:return a=t.v,t.n=2,this.updateItemsInStorage(r,a);case 2:return t.a(2,t.v)}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"deleteItems",value:function(){var e=s(o().m(function e(t,r){var i=this;return o().w(function(e){for(;;)switch(e.n){case 0:return e.a(2,this.deleteItemsApi(r).then(function(){var e=s(o().m(function e(r){return o().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,i.deleteItemsFromStorage(t,r);case 1:return e.a(2,e.v)}},e)}));return function(t){return e.apply(this,arguments)}}()))}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"restoreItems",value:function(){var e=s(o().m(function e(t,r){var i,n;return o().w(function(e){for(;;)switch(e.n){case 0:return i=r.map(function(e){return{item_id:e,trash:!1}}),e.n=1,this.updateItemsApi(t,i);case 1:return n=e.v,e.n=2,this.updateItemsInStorage(t,n);case 2:return e.a(2,e.v)}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"itemListeners",value:function(){var e=this;this.pipeService.onRoot("gh_items_get",{},function(){var t=s(o().m(function t(r,i){var n;return o().w(function(t){for(;;)switch(t.n){case 0:if(!i||!i.app_id){t.n=2;break}return t.n=1,e.getItems(i.app_id);case 1:(n=t.v)?e.pipeService.emit("gh_items_get",i,n):e.pipeService.emit("gh_items_get",i,[]);case 2:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_items_add",{},function(){var t=s(o().m(function t(r,i){var n;return o().w(function(t){for(;;)switch(t.n){case 0:if(!(i&&i.app_id&&i.items)){t.n=2;break}return t.n=1,e.addNewItems(i.app_id,i.items);case 1:(n=t.v)?e.pipeService.emit("gh_items_add",i,n):e.pipeService.emit("gh_items_add",i,[]);case 2:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_items_update",{},function(){var t=s(o().m(function t(r,i){var n;return o().w(function(t){for(;;)switch(t.n){case 0:if(!(i&&i.app_id&&i.items)){t.n=2;break}return t.n=1,e.updateItems(i.app_id,i.items);case 1:(n=t.v)?e.pipeService.emit("gh_items_update",i,n):e.pipeService.emit("gh_items_update",i,[]);case 2:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_item_get",{},function(){var t=s(o().m(function t(r,i){var n,u;return o().w(function(t){for(;;)switch(t.n){case 0:if(!i||!i.app_id){t.n=2;break}return t.n=1,e.getItems(i.app_id);case 1:n=t.v,u=n.find(function(e){return e.item_id==i.item_id}),e.pipeService.emit("gh_item_get",i,u);case 2:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_filtered_items_get",{},function(){var t=s(o().m(function t(r,i){var n,u;return o().w(function(t){for(;;)switch(t.n){case 0:if(!i||!i.element_app_id){t.n=3;break}return t.n=1,e.getItems(i.element_app_id);case 1:return n=t.v,t.n=2,e.util.getFilteredItems(n,i.filters_list,i.element_app_id,i.app_id,i.item_id,i.field_groupe,i.search,i.search_params);case 2:u=t.v,e.pipeService.emit("gh_filtered_items_get",i,u);case 3:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}()),this.pipeService.onRoot("gh_filter_items",{},function(){var t=s(o().m(function t(r,i){var n;return o().w(function(t){for(;;)switch(t.n){case 0:if(!i||!i.items){t.n=2;break}return t.n=1,e.util.getFilteredItems(i.items,i.filters_list,i.element_app_id,i.app_id,i.item_id,i.field_groupe,i.search,i.search_params);case 1:n=t.v,e.pipeService.emit("gh_filter_items",i,n);case 2:return t.a(2)}},t)}));return function(e,r){return t.apply(this,arguments)}}())}}])}();
258
268
  },{"../utils.js":"EgeI"}],"PoPF":[function(require,module,exports) {
259
- "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(){t=function(){return n};var r,n={},i=Object.prototype,o=i.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function p(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(r){p=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof _?t:_,o=Object.create(i.prototype),u=new N(n||[]);return a(o,"_invoke",{value:S(e,r,u)}),o}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}n.wrap=f;var h="suspendedStart",v="suspendedYield",y="executing",g="completed",m={};function _(){}function b(){}function w(){}var x={};p(x,c,function(){return this});var k=Object.getPrototypeOf,O=k&&k(k(I([])));O&&O!==i&&o.call(O,c)&&(x=O);var P=w.prototype=_.prototype=Object.create(x);function F(e){["next","throw","return"].forEach(function(t){p(e,t,function(e){return this._invoke(t,e)})})}function j(t,r){function n(i,a,u,c){var s=d(t[i],t,a);if("throw"!==s.type){var l=s.arg,p=l.value;return p&&"object"==e(p)&&o.call(p,"__await")?r.resolve(p.__await).then(function(e){n("next",e,u,c)},function(e){n("throw",e,u,c)}):r.resolve(p).then(function(e){l.value=e,u(l)},function(e){return n("throw",e,u,c)})}c(s.arg)}var i;a(this,"_invoke",{value:function(e,t){function o(){return new r(function(r,i){n(e,t,r,i)})}return i=i?i.then(o,o):o()}})}function S(e,t,n){var i=h;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:r,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var c=L(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===h)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var s=d(e,t,n);if("normal"===s.type){if(i=n.done?g:v,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=g,n.method="throw",n.arg=s.arg)}}}function L(e,t){var n=t.method,i=e.iterator[n];if(i===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=r,L(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=d(i,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,m;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,m):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function e(){for(;++i<t.length;)if(o.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=r,e.done=!0,e};return a.next=a}}throw new TypeError(e(t)+" is not iterable")}return b.prototype=w,a(P,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:b,configurable:!0}),b.displayName=p(w,l,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,p(e,l,"GeneratorFunction")),e.prototype=Object.create(P),e},n.awrap=function(e){return{__await:e}},F(j.prototype),p(j.prototype,s,function(){return this}),n.AsyncIterator=j,n.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var a=new j(f(e,t,r,i),o);return n.isGeneratorFunction(t)?a:a.next().then(function(e){return e.done?e.value:a.next()})},F(P),p(P,l,"Generator"),p(P,c,function(){return this}),p(P,"toString",function(){return"[object Generator]"}),n.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},n.values=I,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,i){return u.type="throw",u.arg=e,t.next=n,i&&(t.method="next",t.arg=r),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),s=o.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:I(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t,r){return(t=l(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t,r,n,i,o,a){try{var u=e[o](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function u(e){o(a,n,i,u,c,"next",e)}function c(e){o(a,n,i,u,c,"throw",e)}u(void 0)})}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function s(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function l(t){var r=p(t,"string");return"symbol"==e(r)?r:r+""}function p(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FieldProcessor=void 0;var f=exports.FieldProcessor=function(){return s(function e(t,r,n,i,o){u(this,e),this.storage=t,this.req=r,this.appProcessor=n,this.itemProcessor=i,this.pipeService=o,this.fieldListeners()},[{key:"deleteFieldApi",value:function(e){return this.req.post({url:"/api/app/delete-field",form:{field_id:e}})}},{key:"updatedFieldApi",value:function(){var e=a(t().mark(function e(r){var i,o,a,u=arguments;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=u.length>1&&void 0!==u[1]?u[1]:{},e.next=3,this.appProcessor.getApp(r);case 3:return o=e.sent,a={app_id:r,app_name:o.app_name,group_id:o.group_id,icon:o.icon,field_list:o.field_list.map(function(e){return e.field_id==i.field_id?n(n({},e),i):e}),views_list:o.views_list},e.abrupt("return",this.appProcessor.updateApp(a));case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"setFieldValueApi",value:function(e,t,r,n){var i=[{item_id:t,fields:[{field_id:r,field_value:n}]}];return this.itemProcessor.updateItems(e,i)}},{key:"deleteFieldInStorage",value:function(e,t){var r=this.storage.getApp(e);return r.field_list=r.field_list.filter(function(e){return e.file_id!=t}),r.items_list=r.items_list.map(function(e){return e.fields=e.fields.filter(function(e){return e.field_id!=t}),e}),this.storage.updateApp(r),!0}},{key:"updateFieldInStorage",value:function(e,t){var r=this.storage.getApp(e);return r.field_list=r.field_list.map(function(e){return e.field_id==t.field_id?n(n({},e),t):e}),this.storage.updateApp(r),t}},{key:"updateFieldValue",value:function(e,t,r,n){var i=this.storage.getApp(e);return i.items_list.forEach(function(e){e.item_id==t&&e.fields.forEach(function(t){t.field_id==r&&(t.field_value=n,i.items_object[e.item_id][t.field_id]=t)})}),this.storage.updateApp(i),n}},{key:"getField",value:function(){var e=a(t().mark(function e(r,n){var i,o;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appProcessor.getApp(r);case 2:if(i=e.sent){e.next=5;break}return e.abrupt("return",null);case 5:o=0;case 6:if(!(o<i.field_list.length)){e.next=12;break}if(i.field_list[o].field_id!=n){e.next=9;break}return e.abrupt("return",i.field_list[o]);case 9:o++,e.next=6;break;case 12:return e.abrupt("return",null);case 13:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getFieldIdByNameSpace",value:function(){var e=a(t().mark(function e(r,n){var i,o;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appProcessor.getApp(r);case 2:if(i=e.sent){e.next=5;break}return e.abrupt("return",null);case 5:o=0;case 6:if(!(o<i.field_list.length)){e.next=12;break}if(i.field_list[o].name_space!=n){e.next=9;break}return e.abrupt("return",i.field_list[o].field_id);case 9:o++,e.next=6;break;case 12:return e.abrupt("return",null);case 13:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getFieldModels",value:function(){var e=a(t().mark(function e(r){var n;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.appProcessor.getApp(r);case 2:if(n=e.sent){e.next=5;break}return e.abrupt("return",null);case 5:return e.abrupt("return",n.field_list);case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"updateField",value:function(){var e=a(t().mark(function e(r,n){var i;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r&&n){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.updatedFieldApi(r,n);case 4:return i=e.sent,e.abrupt("return",this.updateFieldInStorage(r,i));case 6:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"deleteField",value:function(){var e=a(t().mark(function e(r,n){return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.deleteFieldApi(n);case 2:return e.abrupt("return",this.deleteFieldInStorage(r,n));case 3:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getFieldValue",value:function(){var e=a(t().mark(function e(r,n,i){var o,a;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=null,e.next=3,this.appProcessor.getApp(r);case 3:a=e.sent;try{o=a.items_object[n][i].field_value}catch(t){}return e.abrupt("return",o);case 6:case"end":return e.stop()}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"setFieldValue",value:function(){var e=a(t().mark(function e(r,n,i,o){return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r&&n&&i){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.setFieldValueApi(r,n,i,o);case 4:return e.abrupt("return",this.updateFieldValue(r,n,i,o));case 5:case"end":return e.stop()}},e,this)}));return function(t,r,n,i){return e.apply(this,arguments)}}()},{key:"fieldListeners",value:function(){var e=this;this.pipeService.onRoot("gh_value_get",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(i.app_id&&i.item_id&&i.field_id)){t.next=5;break}return t.next=3,e.getFieldValue(i.app_id,i.item_id,i.field_id);case 3:o=t.sent,e.pipeService.emit("gh_value_get",i,o);case 5:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_value_set",{},function(){var r=a(t().mark(function r(n,i){return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i.item_id&&(e.setFieldValue(i.app_id,i.item_id,i.field_id,i.new_value),delete i.new_value);case 1:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_model_get",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.getField(i.app_id,i.field_id);case 3:o=t.sent,e.pipeService.emit("gh_model_get",i,o),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log("Field model: ",t.t0);case 10:case"end":return t.stop()}},r,null,[[0,7]])}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_model_update",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.updateField(i.app_id,i.field_model);case 2:o=t.sent,e.pipeService.emit("gh_model_update",{app_id:i.app_id,field_id:i.field_id},o);case 4:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_models_get",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getFieldModels(i.app_id);case 2:o=t.sent,e.pipeService.emit("gh_models_get",i,o);case 4:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_model_delete",{},function(){var r=a(t().mark(function r(n,i){var o;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.deleteField(i.app_id,i.field_id);case 2:o=t.sent,e.pipeService.emit("gh_model_delete",i,o);case 4:case"end":return t.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}())}}])}();
269
+ "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(){var e,n,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",u=i.toStringTag||"@@toStringTag";function a(t,i,o,u){var a=i&&i.prototype instanceof l?i:l,s=Object.create(a.prototype);return r(s,"_invoke",function(t,r,i){var o,u,a,l=0,s=i||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return o=t,u=0,a=e,p.n=r,c}};function d(t,r){for(u=t,a=r,n=0;!f&&l&&!i&&n<s.length;n++){var i,o=s[n],d=p.p,v=o[2];t>3?(i=v===r)&&(a=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=t<2&&d<o[1])?(u=0,p.v=r,p.n=o[1]):d<v&&(i=t<3||o[0]>r||r>v)&&(o[4]=t,o[5]=r,p.n=v,u=0))}if(i||t>1)return c;throw f=!0,r}return function(i,s,v){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&d(s,v),u=s,a=v;(n=u<2?e:a)||!f;){o||(u?u<3?(u>1&&(p.n=-1),d(u,a)):p.n=a:p.v=a);try{if(l=2,o){if(u||(i="next"),n=o[i]){if(!(n=n.call(o,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,u<2&&(u=0)}else 1===u&&(n=o.return)&&n.call(o),u<2&&(a=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=e}else if((n=(f=p.n<0)?a:t.call(r,p))!==c)break}catch(n){o=e,u=1,a=n}finally{l=1}}return{value:n,done:f}}}(t,o,u),!0),s}var c={};function l(){}function s(){}function f(){}n=Object.getPrototypeOf;var p=[][o]?n(n([][o]())):(r(n={},o,function(){return this}),n),d=f.prototype=l.prototype=Object.create(p);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,r(e,u,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=f,r(d,"constructor",f),r(f,"constructor",s),s.displayName="GeneratorFunction",r(f,u,"GeneratorFunction"),r(d),r(d,u,"Generator"),r(d,o,function(){return this}),r(d,"toString",function(){return"[object Generator]"}),(t=function(){return{w:a,m:v}})()}function r(e,t,n,i){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(r=function(e,t,n,i){if(t)o?o(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n;else{var u=function(t,n){r(e,t,function(e){return this._invoke(t,n,e)})};u("next",0),u("throw",1),u("return",2)}})(e,t,n,i)}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e,t,r){return(t=f(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t,r,n,i,o,u){try{var a=e[o](u),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,i)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){u(o,n,i,a,c,"next",e)}function c(e){u(o,n,i,a,c,"throw",e)}a(void 0)})}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function s(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(t){var r=p(t,"string");return"symbol"==e(r)?r:r+""}function p(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,r||"default");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FieldProcessor=void 0;var d=exports.FieldProcessor=function(){return s(function e(t,r,n,i,o){c(this,e),this.storage=t,this.req=r,this.appProcessor=n,this.itemProcessor=i,this.pipeService=o,this.fieldListeners()},[{key:"deleteFieldApi",value:function(e){return this.req.post({url:"/api/app/delete-field",form:{field_id:e}})}},{key:"updatedFieldApi",value:function(){var e=a(t().m(function e(r){var n,o,u,a=arguments;return t().w(function(e){for(;;)switch(e.n){case 0:return n=a.length>1&&void 0!==a[1]?a[1]:{},e.n=1,this.appProcessor.getApp(r);case 1:return o=e.v,u={app_id:r,app_name:o.app_name,group_id:o.group_id,icon:o.icon,field_list:o.field_list.map(function(e){return e.field_id==n.field_id?i(i({},e),n):e}),views_list:o.views_list},e.a(2,this.appProcessor.updateApp(u))}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"setFieldValueApi",value:function(e,t,r,n){var i=[{item_id:t,fields:[{field_id:r,field_value:n}]}];return this.itemProcessor.updateItems(e,i)}},{key:"deleteFieldInStorage",value:function(e,t){var r=this.storage.getApp(e);return r.field_list=r.field_list.filter(function(e){return e.file_id!=t}),r.items_list=r.items_list.map(function(e){return e.fields=e.fields.filter(function(e){return e.field_id!=t}),e}),this.storage.updateApp(r),!0}},{key:"updateFieldInStorage",value:function(e,t){var r=this.storage.getApp(e);return r.field_list=r.field_list.map(function(e){return e.field_id==t.field_id?i(i({},e),t):e}),this.storage.updateApp(r),t}},{key:"updateFieldValue",value:function(e,t,r,n){var i=this.storage.getApp(e);return i.items_list.forEach(function(e){e.item_id==t&&e.fields.forEach(function(t){t.field_id==r&&(t.field_value=n,i.items_object[e.item_id][t.field_id]=t)})}),this.storage.updateApp(i),n}},{key:"getField",value:function(){var e=a(t().m(function e(r,n){var i,o;return t().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.appProcessor.getApp(r);case 1:if(i=e.v){e.n=2;break}return e.a(2,null);case 2:o=0;case 3:if(!(o<i.field_list.length)){e.n=5;break}if(i.field_list[o].field_id!=n){e.n=4;break}return e.a(2,i.field_list[o]);case 4:o++,e.n=3;break;case 5:return e.a(2,null)}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getFieldIdByNameSpace",value:function(){var e=a(t().m(function e(r,n){var i,o;return t().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.appProcessor.getApp(r);case 1:if(i=e.v){e.n=2;break}return e.a(2,null);case 2:o=0;case 3:if(!(o<i.field_list.length)){e.n=5;break}if(i.field_list[o].name_space!=n){e.n=4;break}return e.a(2,i.field_list[o].field_id);case 4:o++,e.n=3;break;case 5:return e.a(2,null)}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getFieldModels",value:function(){var e=a(t().m(function e(r){var n;return t().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.appProcessor.getApp(r);case 1:if(n=e.v){e.n=2;break}return e.a(2,null);case 2:return e.a(2,n.field_list)}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"updateField",value:function(){var e=a(t().m(function e(r,n){var i;return t().w(function(e){for(;;)switch(e.n){case 0:if(r&&n){e.n=1;break}return e.a(2);case 1:return e.n=2,this.updatedFieldApi(r,n);case 2:return i=e.v,e.a(2,this.updateFieldInStorage(r,i))}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"deleteField",value:function(){var e=a(t().m(function e(r,n){return t().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.deleteFieldApi(n);case 1:return e.a(2,this.deleteFieldInStorage(r,n))}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"getFieldValue",value:function(){var e=a(t().m(function e(r,n,i){var o,u;return t().w(function(e){for(;;)switch(e.n){case 0:return o=null,e.n=1,this.appProcessor.getApp(r);case 1:u=e.v;try{o=u.items_object[n][i].field_value}catch(t){}return e.a(2,o)}},e,this)}));return function(t,r,n){return e.apply(this,arguments)}}()},{key:"setFieldValue",value:function(){var e=a(t().m(function e(r,n,i,o){return t().w(function(e){for(;;)switch(e.n){case 0:if(r&&n&&i){e.n=1;break}return e.a(2);case 1:return e.n=2,this.setFieldValueApi(r,n,i,o);case 2:return e.a(2,this.updateFieldValue(r,n,i,o))}},e,this)}));return function(t,r,n,i){return e.apply(this,arguments)}}()},{key:"fieldListeners",value:function(){var e=this;this.pipeService.onRoot("gh_value_get",{},function(){var r=a(t().m(function r(n,i){var o;return t().w(function(t){for(;;)switch(t.n){case 0:if(!(i.app_id&&i.item_id&&i.field_id)){t.n=2;break}return t.n=1,e.getFieldValue(i.app_id,i.item_id,i.field_id);case 1:o=t.v,e.pipeService.emit("gh_value_get",i,o);case 2:return t.a(2)}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_value_set",{},function(){var r=a(t().m(function r(n,i){return t().w(function(t){for(;;)switch(t.n){case 0:i.item_id&&(e.setFieldValue(i.app_id,i.item_id,i.field_id,i.new_value),delete i.new_value);case 1:return t.a(2)}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_model_get",{},function(){var r=a(t().m(function r(n,i){var o,u;return t().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,e.getField(i.app_id,i.field_id);case 1:o=t.v,e.pipeService.emit("gh_model_get",i,o),t.n=3;break;case 2:t.p=2,u=t.v,console.log("Field model: ",u);case 3:return t.a(2)}},r,null,[[0,2]])}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_model_update",{},function(){var r=a(t().m(function r(n,i){var o;return t().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.updateField(i.app_id,i.field_model);case 1:o=t.v,e.pipeService.emit("gh_model_update",{app_id:i.app_id,field_id:i.field_id},o);case 2:return t.a(2)}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_models_get",{},function(){var r=a(t().m(function r(n,i){var o;return t().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.getFieldModels(i.app_id);case 1:o=t.v,e.pipeService.emit("gh_models_get",i,o);case 2:return t.a(2)}},r)}));return function(e,t){return r.apply(this,arguments)}}()),this.pipeService.onRoot("gh_model_delete",{},function(){var r=a(t().m(function r(n,i){var o;return t().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,e.deleteField(i.app_id,i.field_id);case 1:o=t.v,e.pipeService.emit("gh_model_delete",i,o);case 2:return t.a(2)}},r)}));return function(e,t){return r.apply(this,arguments)}}())}}])}();
260
270
  },{}],"XUT2":[function(require,module,exports) {
261
- "use strict";function t(e){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})(e)}function e(t){return o(t)||i(t)||n(t)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function i(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function o(t){if(Array.isArray(t))return a(t)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function u(){u=function(){return r};var e,r={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:L(t,r,u)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var v="suspendedStart",d="suspendedYield",y="executing",g="completed",m={};function w(){}function b(){}function x(){}var _={};f(_,c,function(){return this});var F=Object.getPrototypeOf,k=F&&F(F(N([])));k&&k!==n&&i.call(k,c)&&(_=k);var S=x.prototype=w.prototype=Object.create(_);function E(t){["next","throw","return"].forEach(function(e){f(t,e,function(t){return this._invoke(e,t)})})}function A(e,r){function n(o,a,u,c){var s=h(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(f).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,c)})}c(s.arg)}var a;o(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,i){n(t,e,r,i)})}return a=a?a.then(i,i):i()}})}function L(t,r,n){var i=v;return function(o,a){if(i===y)throw Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(n.method=o,n.arg=a;;){var u=n.delegate;if(u){var c=O(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===v)throw i=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=y;var s=h(t,r,n);if("normal"===s.type){if(i=n.done?g:d,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=g,n.method="throw",n.arg=s.arg)}}}function O(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,m;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return b.prototype=x,o(S,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},r.awrap=function(t){return{__await:t}},E(A.prototype),f(A.prototype,s,function(){return this}),r.AsyncIterator=A,r.async=function(t,e,n,i,o){void 0===o&&(o=Promise);var a=new A(p(t,e,n,i),o);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},E(S),f(S,l,"Generator"),f(S,c,function(){return this}),f(S,"toString",function(){return"[object Generator]"}),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=N,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,i){return u.type="throw",u.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;P(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},r}function c(t,e,r,n,i,o,a){try{var u=t[o](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,i)}function s(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(t){c(o,n,i,a,u,"next",t)}function u(t){c(o,n,i,a,u,"throw",t)}a(void 0)})}}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function p(t,e,r){return e&&f(t.prototype,e),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(e){var r=v(e,"string");return"symbol"==t(r)?r:r+""}function v(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileManager=void 0;var d=exports.FileManager=function(){return p(function t(e,r,n,i){l(this,t),this.storage=e,this.pipeService=r,this.req=n,this.appProcessor=i},[{key:"uploadFileApi",value:function(){var t=s(u().mark(function t(e,r,n){var i,o;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,i={"file-0":e,app_id:r,item_id:n},t.next=4,this.req.post({url:"/file/formupload",form:i});case 4:return o=t.sent,t.abrupt("return",o);case 8:return t.prev=8,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 12:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"uploadFileFromStringApi",value:function(){var t=s(u().mark(function t(e){var r;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.post({url:"/file/upload",form:{file:JSON.stringify(e)}});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"updateFileFromStringApi",value:function(){var t=s(u().mark(function t(e,r,n,i,o,a,c){var s,l;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,s={file_name:n,extension:i,file_id:r,format:o,source:e,alt:a,title:c},t.next=4,this.req.post({url:"/file/update",form:{file:JSON.stringify(s)}});case 4:return l=t.sent,t.abrupt("return",l);case 8:return t.prev=8,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 12:case"end":return t.stop()}},t,this,[[0,8]])}));return function(e,r,n,i,o,a,u){return t.apply(this,arguments)}}()},{key:"duplicateFileApi",value:function(){var t=s(u().mark(function t(e){return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.req.post({url:"/api/new/file/duplicate",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{files:JSON.stringify(e)}}));case 1:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"downloadFileFromString",value:function(){var t=s(u().mark(function t(e,r){var n,i;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.isFileExists(e,r);case 2:if(!t.sent){t.next=12;break}return t.next=5,this.getFile(e,r);case 5:return n=t.sent,t.next=8,this.req.get({url:n.url+"?timestamp="+n.last_update,externalResource:!0});case 8:return i=t.sent,t.abrupt("return",{file:n,data:i,type:"file"});case 12:return t.abrupt("return",!1);case 13:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"duplicateFile",value:function(){var t=s(u().mark(function t(e){var r,n=this;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.duplicateFileApi(e);case 2:return(r=t.sent).forEach(function(t){n.addFileToStorage(t.app_id,t)}),t.abrupt("return",r);case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"deleteFileApi",value:function(){var t=s(u().mark(function t(e){var r;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.get({url:"/file/delete?file_id=".concat(e)});case 3:return r=t.sent,t.abrupt("return",r);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(e){return t.apply(this,arguments)}}()},{key:"addFileToStorage",value:function(t,e){var r=this.storage.getApp(t);r&&(r.file_list.push(e),this.storage.updateApp(r),this.pipeService.emit("gh_file_upload",{app_id:t,item_id:e.item_id,file_id:e.file_id},e))}},{key:"addFilesToStorage",value:function(t,r){var n,i=this,o=this.storage.getApp(t);o&&((n=o.file_list).push.apply(n,e(r)),this.storage.updateApp(o),r.forEach(function(e){i.pipeService.emit("gh_file_upload",{app_id:t,item_id:e.item_id,file_id:e.file_id},e)}))}},{key:"deleteFileFromStorage",value:function(t,e){var r,n=this.storage.getApp(e);n&&(n.file_list=n.file_list.filter(function(e){return e.file_id!=t||(r=e,!1)}),this.storage.updateApp(n),this.pipeService.emit("gh_file_delete",{file_id:t},r))}},{key:"updateFileInStorage",value:function(t,e,r){var n=this.storage.getApp(e);n&&(n.file_list=n.file_list.map(function(e){return e.file_id==t?r:e}),this.storage.updateApp(n),this.pipeService.emit("gh_file_update",{file_id:t}))}},{key:"getFile",value:function(){var t=s(u().mark(function t(e,r){var n;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.appProcessor.getApp(e);case 2:return n=t.sent,t.abrupt("return",new Promise(function(t,e){var i=n.file_list.find(function(t){return t.file_id==r});t(i||"")}));case 4:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"getFiles",value:function(){var t=s(u().mark(function t(e){var r,n,i=arguments;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:[],t.next=3,this.appProcessor.getApp(e);case 3:return n=t.sent,t.abrupt("return",new Promise(function(t,e){var i=n.file_list.filter(function(t){return r.some(function(e){return e==t.file_id})});t(i||"")}));case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"uploadFile",value:function(){var t=s(u().mark(function t(e,r,n){var i;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.uploadFileApi(e,r,n);case 2:return i=t.sent,this.addFileToStorage(r,i),t.abrupt("return",i);case 5:case"end":return t.stop()}},t,this)}));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"uploadFileFromString",value:function(){var t=s(u().mark(function t(e){var r;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.uploadFileFromStringApi(e);case 2:return r=t.sent,this.addFileToStorage(r.app_id,r),t.abrupt("return",r);case 5:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateFileFromString",value:function(){var t=s(u().mark(function t(e,r,n,i,o,a,c){var s;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.updateFileFromStringApi(e,r,n,i,o,a,c);case 2:return s=t.sent,this.updateFileInStorage(r,s.app_id,s),t.abrupt("return",s);case 5:case"end":return t.stop()}},t,this)}));return function(e,r,n,i,o,a,u){return t.apply(this,arguments)}}()},{key:"deleteFile",value:function(){var t=s(u().mark(function t(e,r){return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.deleteFileApi(e);case 2:return this.deleteFileFromStorage(e,r),t.abrupt("return",!0);case 4:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"isFileExists",value:function(){var t=s(u().mark(function t(e,r){var n,i;return u().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/,!Boolean(r)){t.next=12;break}return t.next=4,this.getFile(e,r);case 4:if(i=t.sent,!Boolean(i)){t.next=9;break}return t.abrupt("return",n.test(i.url));case 9:return t.abrupt("return",!1);case 10:t.next=13;break;case 12:return t.abrupt("return",!1);case 13:case"end":return t.stop()}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()}])}();
271
+ "use strict";function t(e){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})(e)}function e(t){return o(t)||i(t)||n(t)||r()}function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function n(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}function i(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function o(t){if(Array.isArray(t))return u(t)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function a(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var a=n&&n.prototype instanceof l?n:l,f=Object.create(a.prototype);return c(f,"_invoke",function(r,n,i){var o,a,c,l=0,f=i||[],s=!1,p={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(e,r){return o=e,a=0,c=t,p.n=r,u}};function v(r,n){for(a=r,c=n,e=0;!s&&l&&!i&&e<f.length;e++){var i,o=f[e],v=p.p,h=o[2];r>3?(i=h===n)&&(c=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=v&&((i=r<2&&v<o[1])?(a=0,p.v=n,p.n=o[1]):v<h&&(i=r<3||o[0]>n||n>h)&&(o[4]=r,o[5]=n,p.n=h,a=0))}if(i||r>1)return u;throw s=!0,n}return function(i,f,h){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&v(f,h),a=f,c=h;(e=a<2?t:c)||!s;){o||(a?a<3?(a>1&&(p.n=-1),v(a,c)):p.n=c:p.v=c);try{if(l=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(s=p.n<0)?c:r.call(n,p))!==u)break}catch(e){o=t,a=1,c=e}finally{l=1}}return{value:e,done:s}}}(r,i,o),!0),f}var u={};function l(){}function f(){}function s(){}e=Object.getPrototypeOf;var p=[][n]?e(e([][n]())):(c(e={},n,function(){return this}),e),v=s.prototype=l.prototype=Object.create(p);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,c(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t}return f.prototype=s,c(v,"constructor",s),c(s,"constructor",f),f.displayName="GeneratorFunction",c(s,i,"GeneratorFunction"),c(v),c(v,i,"Generator"),c(v,n,function(){return this}),c(v,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:h}})()}function c(t,e,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}(c=function(t,e,r,n){if(e)i?i(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r;else{var o=function(e,r){c(t,e,function(t){return this._invoke(e,r,t)})};o("next",0),o("throw",1),o("return",2)}})(t,e,r,n)}function l(t,e,r,n,i,o,u){try{var a=t[o](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,i)}function f(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function u(t){l(o,n,i,u,a,"next",t)}function a(t){l(o,n,i,u,a,"throw",t)}u(void 0)})}}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function v(t,e,r){return e&&p(t.prototype,e),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function h(e){var r=d(e,"string");return"symbol"==t(r)?r:r+""}function d(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,r||"default");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.FileManager=void 0;var y=exports.FileManager=function(){return v(function t(e,r,n,i){s(this,t),this.storage=e,this.pipeService=r,this.req=n,this.appProcessor=i},[{key:"uploadFileApi",value:function(){var t=f(a().m(function t(e,r,n){var i,o,u;return a().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,i={"file-0":e,app_id:r,item_id:n},t.n=1,this.req.post({url:"/file/formupload",form:i});case 1:return o=t.v,t.a(2,o);case 2:return t.p=2,u=t.v,console.log(u),t.a(2,null)}},t,this,[[0,2]])}));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"uploadFileFromStringApi",value:function(){var t=f(a().m(function t(e){var r,n;return a().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.req.post({url:"/file/upload",form:{file:JSON.stringify(e)}});case 1:return r=t.v,t.a(2,r);case 2:return t.p=2,n=t.v,console.log(n),t.a(2,null)}},t,this,[[0,2]])}));return function(e){return t.apply(this,arguments)}}()},{key:"updateFileFromStringApi",value:function(){var t=f(a().m(function t(e,r,n,i,o,u,c){var l,f,s;return a().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,l={file_name:n,extension:i,file_id:r,format:o,source:e,alt:u,title:c},t.n=1,this.req.post({url:"/file/update",form:{file:JSON.stringify(l)}});case 1:return f=t.v,t.a(2,f);case 2:return t.p=2,s=t.v,console.log(s),t.a(2,null)}},t,this,[[0,2]])}));return function(e,r,n,i,o,u,a){return t.apply(this,arguments)}}()},{key:"duplicateFileApi",value:function(){var t=f(a().m(function t(e){return a().w(function(t){for(;;)switch(t.n){case 0:return t.a(2,this.req.post({url:"/api/new/file/duplicate",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{files:JSON.stringify(e)}}))}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"downloadFileFromString",value:function(){var t=f(a().m(function t(e,r){var n,i;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.isFileExists(e,r);case 1:if(!t.v){t.n=4;break}return t.n=2,this.getFile(e,r);case 2:return n=t.v,t.n=3,this.req.get({url:n.url+"?timestamp="+n.last_update,externalResource:!0});case 3:return i=t.v,t.a(2,{file:n,data:i,type:"file"});case 4:return t.a(2,!1);case 5:return t.a(2)}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"duplicateFile",value:function(){var t=f(a().m(function t(e){var r,n=this;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.duplicateFileApi(e);case 1:return(r=t.v).forEach(function(t){n.addFileToStorage(t.app_id,t)}),t.a(2,r)}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"deleteFileApi",value:function(){var t=f(a().m(function t(e){var r,n;return a().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.req.get({url:"/file/delete?file_id=".concat(e)});case 1:return r=t.v,t.a(2,r);case 2:return t.p=2,n=t.v,console.log(n),t.a(2,null)}},t,this,[[0,2]])}));return function(e){return t.apply(this,arguments)}}()},{key:"addFileToStorage",value:function(t,e){var r=this.storage.getApp(t);r&&(r.file_list.push(e),this.storage.updateApp(r),this.pipeService.emit("gh_file_upload",{app_id:t,item_id:e.item_id,file_id:e.file_id},e))}},{key:"addFilesToStorage",value:function(t,r){var n,i=this,o=this.storage.getApp(t);o&&((n=o.file_list).push.apply(n,e(r)),this.storage.updateApp(o),r.forEach(function(e){i.pipeService.emit("gh_file_upload",{app_id:t,item_id:e.item_id,file_id:e.file_id},e)}))}},{key:"deleteFileFromStorage",value:function(t,e){var r,n=this.storage.getApp(e);n&&(n.file_list=n.file_list.filter(function(e){return e.file_id!=t||(r=e,!1)}),this.storage.updateApp(n),this.pipeService.emit("gh_file_delete",{file_id:t},r))}},{key:"updateFileInStorage",value:function(t,e,r){var n=this.storage.getApp(e);n&&(n.file_list=n.file_list.map(function(e){return e.file_id==t?r:e}),this.storage.updateApp(n),this.pipeService.emit("gh_file_update",{file_id:t}))}},{key:"getFile",value:function(){var t=f(a().m(function t(e,r){var n;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.appProcessor.getApp(e);case 1:return n=t.v,t.a(2,new Promise(function(t,e){var i=n.file_list.find(function(t){return t.file_id==r});t(i||"")}))}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"getFiles",value:function(){var t=f(a().m(function t(e){var r,n,i=arguments;return a().w(function(t){for(;;)switch(t.n){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:[],t.n=1,this.appProcessor.getApp(e);case 1:return n=t.v,t.a(2,new Promise(function(t,e){var i=n.file_list.filter(function(t){return r.some(function(e){return e==t.file_id})});t(i||"")}))}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"uploadFile",value:function(){var t=f(a().m(function t(e,r,n){var i;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.uploadFileApi(e,r,n);case 1:return i=t.v,this.addFileToStorage(r,i),t.a(2,i)}},t,this)}));return function(e,r,n){return t.apply(this,arguments)}}()},{key:"uploadFileFromString",value:function(){var t=f(a().m(function t(e){var r;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.uploadFileFromStringApi(e);case 1:return r=t.v,this.addFileToStorage(r.app_id,r),t.a(2,r)}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateFileFromString",value:function(){var t=f(a().m(function t(e,r,n,i,o,u,c){var l;return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.updateFileFromStringApi(e,r,n,i,o,u,c);case 1:return l=t.v,this.updateFileInStorage(r,l.app_id,l),t.a(2,l)}},t,this)}));return function(e,r,n,i,o,u,a){return t.apply(this,arguments)}}()},{key:"deleteFile",value:function(){var t=f(a().m(function t(e,r){return a().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.deleteFileApi(e);case 1:return this.deleteFileFromStorage(e,r),t.a(2,!0)}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()},{key:"isFileExists",value:function(){var t=f(a().m(function t(e,r){var n,i;return a().w(function(t){for(;;)switch(t.n){case 0:if(n=/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/,!Boolean(r)){t.n=4;break}return t.n=1,this.getFile(e,r);case 1:if(i=t.v,!Boolean(i)){t.n=2;break}return t.a(2,n.test(i.url));case 2:return t.a(2,!1);case 3:t.n=5;break;case 4:return t.a(2,!1);case 5:return t.a(2)}},t,this)}));return function(e,r){return t.apply(this,arguments)}}()}])}();
262
272
  },{}],"KHGc":[function(require,module,exports) {
263
- "use strict";function t(r){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})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function h(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{h({},"")}catch(e){h=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),u=new G(n||[]);return a(i,"_invoke",{value:S(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=l;var v="suspendedStart",y="suspendedYield",g="executing",m="completed",d={};function b(){}function w(){}function x(){}var k={};h(k,c,function(){return this});var L=Object.getPrototypeOf,E=L&&L(L(T([])));E&&E!==o&&i.call(E,c)&&(k=E);var P=x.prototype=b.prototype=Object.create(k);function j(t){["next","throw","return"].forEach(function(r){h(t,r,function(t){return this._invoke(r,t)})})}function O(r,e){function n(o,a,u,c){var s=p(r[o],r,a);if("throw"!==s.type){var f=s.arg,h=f.value;return h&&"object"==t(h)&&i.call(h,"__await")?e.resolve(h.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(h).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function S(t,r,n){var o=v;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=_(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=p(t,r,n);if("normal"===s.type){if(o=n.done?m:y,s.arg===d)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=m,n.method="throw",n.arg=s.arg)}}}function _(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,_(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function C(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function T(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=x,a(P,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=h(x,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,h(t,f,"GeneratorFunction")),t.prototype=Object.create(P),t},n.awrap=function(t){return{__await:t}},j(O.prototype),h(O.prototype,s,function(){return this}),n.AsyncIterator=O,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new O(l(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(P),h(P,f,"Generator"),h(P,c,function(){return this}),h(P,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=T,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),d},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),C(e),d}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;C(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=c(r,"string");return"symbol"==t(e)?e:e+""}function c(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChunksManager=void 0;var s=exports.ChunksManager=function(){return a(function t(r,e,n,i){o(this,t),this.storage=r,this.pipeService=e,this.req=n,this.util=i,this.itemListeners()},[{key:"getChunkApi",value:function(){var t=n(r().mark(function t(e,n){var o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.axiosRequest({url:"".concat(this.req.root,"/api/get-items-chunk/").concat(e,"/").concat(n),method:"GET"});case 3:return o=t.sent,t.abrupt("return",o);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getLastChunkApi",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.req.axiosRequest({url:"".concat(this.req.root,"/api/get-last-items-chunk/").concat(e),method:"GET"});case 3:return n=t.sent,t.abrupt("return",n);case 7:return t.prev=7,t.t0=t.catch(0),console.log(t.t0),t.abrupt("return",null);case 11:case"end":return t.stop()}},t,this,[[0,7]])}));return function(r){return t.apply(this,arguments)}}()},{key:"getChunk",value:function(t,r){return this.getChunkApi(t,r)}},{key:"getChunks",value:function(){var t=n(r().mark(function t(e,n){var o,i=this;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(o=[],!n){t.next=5;break}return t.next=4,Promise.all(n.map(function(t){return i.getChunkApi(e,t)}));case 4:o=t.sent;case 5:return t.abrupt("return",o);case 6:case"end":return t.stop()}},t)}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getLastChunk",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getLastChunkApi(e);case 2:return n=t.sent,t.abrupt("return",n);case 4:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()},{key:"itemListeners",value:function(){}},{key:"getApp",value:function(){var t=n(r().mark(function t(e){var n;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}return t.abrupt("return",null);case 2:if(n=this.getAppFromStorage(e)){t.next=16;break}if(!this.getAppPromises[e]){t.next=6;break}return t.abrupt("return",this.getAppPromises[e]);case 6:return this.getAppPromises[e]=this.getAppApi(e),t.next=9,this.getAppPromises[e];case 9:if(!(n=t.sent)){t.next=15;break}this.saveAppInStorage(n),this.ws.addSubscription(e),t.next=16;break;case 15:return t.abrupt("return",null);case 16:return t.abrupt("return",n);case 17:case"end":return t.stop()}},t,this)}));return function(r){return t.apply(this,arguments)}}()}])}();
273
+ "use strict";function t(n){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})(n)}function n(){var t,e,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function a(n,o,i,u){var a=o&&o.prototype instanceof s?o:s,f=Object.create(a.prototype);return r(f,"_invoke",function(n,r,o){var i,u,a,s=0,f=o||[],p=!1,l={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(n,r){return i=n,u=0,a=t,l.n=r,c}};function h(n,r){for(u=n,a=r,e=0;!p&&s&&!o&&e<f.length;e++){var o,i=f[e],h=l.p,v=i[2];n>3?(o=v===r)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(u=0,l.v=r,l.n=i[1]):h<v&&(o=n<3||i[0]>r||r>v)&&(i[4]=n,i[5]=r,l.n=v,u=0))}if(o||n>1)return c;throw p=!0,r}return function(o,f,v){if(s>1)throw TypeError("Generator is already running");for(p&&1===f&&h(f,v),u=f,a=v;(e=u<2?t:a)||!p;){i||(u?u<3?(u>1&&(l.n=-1),h(u,a)):l.n=a:l.v=a);try{if(s=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(p=l.n<0)?a:n.call(r,l))!==c)break}catch(e){i=t,u=1,a=e}finally{s=1}}return{value:e,done:p}}}(n,i,u),!0),f}var c={};function s(){}function f(){}function p(){}e=Object.getPrototypeOf;var l=[][i]?e(e([][i]())):(r(e={},i,function(){return this}),e),h=p.prototype=s.prototype=Object.create(l);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,r(t,u,"GeneratorFunction")),t.prototype=Object.create(h),t}return f.prototype=p,r(h,"constructor",p),r(p,"constructor",f),f.displayName="GeneratorFunction",r(p,u,"GeneratorFunction"),r(h),r(h,u,"Generator"),r(h,i,function(){return this}),r(h,"toString",function(){return"[object Generator]"}),(n=function(){return{w:a,m:v}})()}function r(t,n,e,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}(r=function(t,n,e,o){if(n)i?i(t,n,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[n]=e;else{var u=function(n,e){r(t,n,function(t){return this._invoke(n,e,t)})};u("next",0),u("throw",1),u("return",2)}})(t,n,e,o)}function e(t,n,r,e,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?n(c):Promise.resolve(c).then(e,o)}function o(t){return function(){var n=this,r=arguments;return new Promise(function(o,i){var u=t.apply(n,r);function a(t){e(u,o,i,a,c,"next",t)}function c(t){e(u,o,i,a,c,"throw",t)}a(void 0)})}}function i(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function u(t,n){for(var r=0;r<n.length;r++){var e=n[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,c(e.key),e)}}function a(t,n,r){return n&&u(t.prototype,n),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(n){var r=s(n,"string");return"symbol"==t(r)?r:r+""}function s(n,r){if("object"!=t(n)||!n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var o=e.call(n,r||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(n)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ChunksManager=void 0;var f=exports.ChunksManager=function(){return a(function t(n,r,e,o){i(this,t),this.storage=n,this.pipeService=r,this.req=e,this.util=o,this.itemListeners()},[{key:"getChunkApi",value:function(){var t=o(n().m(function t(r,e){var o,i;return n().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.req.axiosRequest({url:"".concat(this.req.root,"/api/get-items-chunk/").concat(r,"/").concat(e),method:"GET"});case 1:return o=t.v,t.a(2,o);case 2:return t.p=2,i=t.v,console.log(i),t.a(2,null)}},t,this,[[0,2]])}));return function(n,r){return t.apply(this,arguments)}}()},{key:"getLastChunkApi",value:function(){var t=o(n().m(function t(r){var e,o;return n().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.req.axiosRequest({url:"".concat(this.req.root,"/api/get-last-items-chunk/").concat(r),method:"GET"});case 1:return e=t.v,t.a(2,e);case 2:return t.p=2,o=t.v,console.log(o),t.a(2,null)}},t,this,[[0,2]])}));return function(n){return t.apply(this,arguments)}}()},{key:"getChunk",value:function(t,n){return this.getChunkApi(t,n)}},{key:"getChunks",value:function(){var t=o(n().m(function t(r,e){var o,i=this;return n().w(function(t){for(;;)switch(t.n){case 0:if(o=[],!e){t.n=2;break}return t.n=1,Promise.all(e.map(function(t){return i.getChunkApi(r,t)}));case 1:o=t.v;case 2:return t.a(2,o)}},t)}));return function(n,r){return t.apply(this,arguments)}}()},{key:"getLastChunk",value:function(){var t=o(n().m(function t(r){var e;return n().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,this.getLastChunkApi(r);case 1:return e=t.v,t.a(2,e)}},t,this)}));return function(n){return t.apply(this,arguments)}}()},{key:"itemListeners",value:function(){}},{key:"getApp",value:function(){var t=o(n().m(function t(r){var e;return n().w(function(t){for(;;)switch(t.n){case 0:if(r){t.n=1;break}return t.a(2,null);case 1:if(e=this.getAppFromStorage(r)){t.n=5;break}if(!this.getAppPromises[r]){t.n=2;break}return t.a(2,this.getAppPromises[r]);case 2:return this.getAppPromises[r]=this.getAppApi(r),t.n=3,this.getAppPromises[r];case 3:if(!(e=t.v)){t.n=4;break}this.saveAppInStorage(e),this.ws.addSubscription(r),t.n=5;break;case 4:return t.a(2,null);case 5:return t.a(2,e)}},t,this)}));return function(n){return t.apply(this,arguments)}}()}])}();
264
274
  },{}],"K1Gs":[function(require,module,exports) {
265
275
  "use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(t){var n=i(t,"string");return"symbol"==e(n)?n:n+""}function i(t,n){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,n||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.DocumentManager=void 0;var u=exports.DocumentManager=function(){return r(function e(n,r){t(this,e),this.req=n,this.pipeService=r},[{key:"createDocument",value:function(e){return this.emitDocumentInsert(e),this.req.post({url:"/api/new/document/insert-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}},{key:"emitDocumentInsert",value:function(e){var t="string"==typeof e.data?JSON.parse(e.data):e.data;this.pipeService.emit("gh_document_insert_one",{app_id:e.app_id,item_id:e.item_id,element_id:e.element_id},t)}},{key:"getDocument",value:function(e){return this.req.post({url:"/api/new/document/find-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}},{key:"getDocuments",value:function(e){return this.req.post({url:"/api/new/document/find",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}},{key:"deleteDocument",value:function(e){return this.req.post({url:"/api/new/document/remove-one",headers:{"Content-Type":"application/x-www-form-urlencoded"},form:{document:JSON.stringify(e)}})}}])}();
266
276
  },{}],"X4Dt":[function(require,module,exports) {
267
- "use strict";function t(e){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})(e)}function e(){e=function(){return n};var r,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",f=u.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(r){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new N(n||[]);return a(i,"_invoke",{value:I(t,r,u)}),i}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",d="suspendedYield",v="executing",g="completed",m={};function b(){}function w(){}function x(){}var _={};l(_,c,function(){return this});var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==o&&i.call(L,c)&&(_=L);var E=x.prototype=b.prototype=Object.create(_);function j(t){["next","throw","return"].forEach(function(e){l(t,e,function(t){return this._invoke(e,t)})})}function O(e,r){function n(o,a,u,c){var s=p(e[o],e,a);if("throw"!==s.type){var f=s.arg,l=f.value;return l&&"object"==t(l)&&i.call(l,"__await")?r.resolve(l.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(l).then(function(t){f.value=t,u(f)},function(t){return n("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,o){n(t,e,r,o)})}return o=o?o.then(i,i):i()}})}function I(t,e,n){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var s=p(t,e,n);if("normal"===s.type){if(o=n.done?g:d,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function P(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,P(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function G(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return w.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,f,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,f,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},j(O.prototype),l(O.prototype,s,function(){return this}),n.AsyncIterator=O,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new O(h(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(E),l(E,f,"Generator"),l(E,c,function(){return this}),l(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=T,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(G),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return u.type="throw",u.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),G(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;G(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),m}},n}function r(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,c,"next",t)}function c(t){r(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(e){var r=c(e,"string");return"symbol"==t(r)?r:r+""}function c(e,r){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Interpritate=void 0;var s=exports.Interpritate=function(){return a(function t(e){o(this,t),this.gudhub=e},[{key:"getInterpretationObj",value:function(){var t=n(e().mark(function t(r,n,o,i,a,u){var c,s,f,l,h;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(c=[],s=n.data_model.interpretation.find(function(t){return t.src==o})||n.data_model.interpretation.find(function(t){return"table"==t.src})||{id:"default"},f=s,!r.data_model||!r.data_model.interpretation){t.next=22;break}for(l=0;l<r.data_model.interpretation.length;l++)r.data_model.interpretation[l].src!=o&&r.data_model.interpretation[l].src!=i||c.push(r.data_model.interpretation[l]);l=0;case 6:if(!(l<c.length)){t.next=22;break}if(!(c[l].settings&&c[l].settings.condition_filter&&c[l].settings.filters_list.length>0)){t.next=18;break}return t.next=10,gudhub.getItem(u,a);case 10:if(!(h=t.sent)){t.next=16;break}if(!(gudhub.filter([h],c[l].settings.filters_list).length>0)){t.next=16;break}return f=c[l],t.abrupt("break",22);case 16:t.next=19;break;case 18:f=gudhub.mergeObjects(f,c[l]);case 19:l++,t.next=6;break;case 22:return t.abrupt("return",f);case 23:case"end":return t.stop()}},t)}));return function(e,r,n,o,i,a){return t.apply(this,arguments)}}()},{key:"getInterpretation",value:function(t,r,o,i,a,u,c){var s=this;return new Promise(function(){var f=n(e().mark(function f(l,h){var p;return e().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:(p=r&&r.data_type?r.data_type:o)?gudhub.ghconstructor.getInstance(p).then(function(){var o=n(e().mark(function n(o){var f;return e().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=5;break}return e.next=3,s.getInterpretationObj(r,o.getTemplate().model,i,c,a,u);case 3:f=e.sent,o.getInterpretation(t,f.id,p,r,a,u).then(function(t){l(gudhub.mergeObjects(t,f))},function(t){h()});case 5:case"end":return e.stop()}},n)}));return function(t){return o.apply(this,arguments)}}(),function(t){}):console.error("Get Interpretation: data_type is undefined",o,r);case 2:case"end":return f.stop()}},f)}));return function(t,e){return f.apply(this,arguments)}}())}},{key:"getInterpretationById",value:function(){var t=n(e().mark(function t(r,n,o,i){var a,u,c,s,f,l,h=arguments;return e().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a=h.length>4&&void 0!==h[4]?h[4]:null,u=h.length>5&&void 0!==h[5]?h[5]:null,null!=a){t.next=8;break}return t.next=5,this.gudhub.getFieldValue(r,n,o);case 5:t.t0=t.sent,t.next=9;break;case 8:t.t0=a;case 9:if(c=t.t0,null!=u){t.next=16;break}return t.next=13,this.gudhub.getField(r,o);case 13:t.t1=t.sent,t.next=17;break;case 16:t.t1=u;case 17:if(null!=(s=t.t1)){t.next=20;break}return t.abrupt("return","");case 20:return t.next=22,this.gudhub.ghconstructor.getInstance(s.data_type);case 22:return f=t.sent,t.next=25,f.getInterpretation(c,i,s.data_type,s,n,r);case 25:if("<span>no interpretation</span>"!=(l=t.sent).html){t.next=30;break}return t.abrupt("return",c);case 30:return t.abrupt("return",l.html);case 31:case"end":return t.stop()}},t,this)}));return function(e,r,n,o){return t.apply(this,arguments)}}()}])}();
277
+ "use strict";function t(e){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})(e)}function e(){var t,r,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";function u(e,o,i,a){var u=o&&o.prototype instanceof f?o:f,s=Object.create(u.prototype);return n(s,"_invoke",function(e,n,o){var i,a,u,f=0,s=o||[],l=!1,p={p:0,n:0,v:t,a:b,f:b.bind(t,4),d:function(e,n){return i=e,a=0,u=t,p.n=n,c}};function b(e,n){for(a=e,u=n,r=0;!l&&f&&!o&&r<s.length;r++){var o,i=s[r],b=p.p,d=i[2];e>3?(o=d===n)&&(u=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=b&&((o=e<2&&b<i[1])?(a=0,p.v=n,p.n=i[1]):b<d&&(o=e<3||i[0]>n||n>d)&&(i[4]=e,i[5]=n,p.n=d,a=0))}if(o||e>1)return c;throw l=!0,n}return function(o,s,d){if(f>1)throw TypeError("Generator is already running");for(l&&1===s&&b(s,d),a=s,u=d;(r=a<2?t:u)||!l;){i||(a?a<3?(a>1&&(p.n=-1),b(a,u)):p.n=u:p.v=u);try{if(f=2,i){if(a||(o="next"),r=i[o]){if(!(r=r.call(i,u)))throw TypeError("iterator result is not an object");if(!r.done)return r;u=r.value,a<2&&(a=0)}else 1===a&&(r=i.return)&&r.call(i),a<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((r=(l=p.n<0)?u:e.call(n,p))!==c)break}catch(r){i=t,a=1,u=r}finally{f=1}}return{value:r,done:l}}}(e,i,a),!0),s}var c={};function f(){}function s(){}function l(){}r=Object.getPrototypeOf;var p=[][i]?r(r([][i]())):(n(r={},i,function(){return this}),r),b=l.prototype=f.prototype=Object.create(p);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,n(t,a,"GeneratorFunction")),t.prototype=Object.create(b),t}return s.prototype=l,n(b,"constructor",l),n(l,"constructor",s),s.displayName="GeneratorFunction",n(l,a,"GeneratorFunction"),n(b),n(b,a,"Generator"),n(b,i,function(){return this}),n(b,"toString",function(){return"[object Generator]"}),(e=function(){return{w:u,m:d}})()}function n(t,e,r,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}(n=function(t,e,r,o){if(e)i?i(t,e,{value:r,enumerable:!o,configurable:!o,writable:!o}):t[e]=r;else{var a=function(e,r){n(t,e,function(t){return this._invoke(e,r,t)})};a("next",0),a("throw",1),a("return",2)}})(t,e,r,o)}function r(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function o(t){return function(){var e=this,n=arguments;return new Promise(function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,c,"next",t)}function c(t){r(a,o,i,u,c,"throw",t)}u(void 0)})}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,c(r.key),r)}}function u(t,e,n){return e&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(e){var n=f(e,"string");return"symbol"==t(n)?n:n+""}function f(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Interpritate=void 0;var s=exports.Interpritate=function(){return u(function t(e){i(this,t),this.gudhub=e},[{key:"getInterpretationObj",value:function(){var t=o(e().m(function t(n,r,o,i,a,u){var c,f,s,l,p;return e().w(function(t){for(;;)switch(t.n){case 0:if(c=[],f=r.data_model.interpretation.find(function(t){return t.src==o})||r.data_model.interpretation.find(function(t){return"table"==t.src})||{id:"default"},s=f,!n.data_model||!n.data_model.interpretation){t.n=6;break}for(l=0;l<n.data_model.interpretation.length;l++)n.data_model.interpretation[l].src!=o&&n.data_model.interpretation[l].src!=i||c.push(n.data_model.interpretation[l]);l=0;case 1:if(!(l<c.length)){t.n=6;break}if(!(c[l].settings&&c[l].settings.condition_filter&&c[l].settings.filters_list.length>0)){t.n=4;break}return t.n=2,gudhub.getItem(u,a);case 2:if(!(p=t.v)){t.n=3;break}if(!(gudhub.filter([p],c[l].settings.filters_list).length>0)){t.n=3;break}return s=c[l],t.a(3,6);case 3:t.n=5;break;case 4:s=gudhub.mergeObjects(s,c[l]);case 5:l++,t.n=1;break;case 6:return t.a(2,s)}},t)}));return function(e,n,r,o,i,a){return t.apply(this,arguments)}}()},{key:"getInterpretation",value:function(t,n,r,i,a,u,c){var f=this;return new Promise(function(){var s=o(e().m(function s(l,p){var b;return e().w(function(s){for(;;)switch(s.n){case 0:(b=n&&n.data_type?n.data_type:r)?gudhub.ghconstructor.getInstance(b).then(function(){var r=o(e().m(function r(o){var s;return e().w(function(e){for(;;)switch(e.n){case 0:if(!o){e.n=2;break}return e.n=1,f.getInterpretationObj(n,o.getTemplate().model,i,c,a,u);case 1:s=e.v,o.getInterpretation(t,s.id,b,n,a,u).then(function(t){l(gudhub.mergeObjects(t,s))},function(t){p()});case 2:return e.a(2)}},r)}));return function(t){return r.apply(this,arguments)}}(),function(t){}):console.error("Get Interpretation: data_type is undefined",r,n);case 1:return s.a(2)}},s)}));return function(t,e){return s.apply(this,arguments)}}())}},{key:"getInterpretationById",value:function(){var t=o(e().m(function t(n,r,o,i){var a,u,c,f,s,l,p,b,d=arguments;return e().w(function(t){for(;;)switch(t.n){case 0:if(a=d.length>4&&void 0!==d[4]?d[4]:null,u=d.length>5&&void 0!==d[5]?d[5]:null,null!=a){t.n=2;break}return t.n=1,this.gudhub.getFieldValue(n,r,o);case 1:p=t.v,t.n=3;break;case 2:p=a;case 3:if(c=p,null!=u){t.n=5;break}return t.n=4,this.gudhub.getField(n,o);case 4:b=t.v,t.n=6;break;case 5:b=u;case 6:if(null!=(f=b)){t.n=7;break}return t.a(2,"");case 7:return t.n=8,this.gudhub.ghconstructor.getInstance(f.data_type);case 8:return s=t.v,t.n=9,s.getInterpretation(c,i,f.data_type,f,r,n);case 9:if("<span>no interpretation</span>"!=(l=t.v).html){t.n=10;break}return t.a(2,c);case 10:return t.a(2,l.html);case 11:return t.a(2)}},t,this)}));return function(e,n,r,o){return t.apply(this,arguments)}}()}])}();
268
278
  },{}],"sPce":[function(require,module,exports) {
269
279
  "use strict";function e(e,s){switch(s.api){case"/items/update":console.log("/items/update - ",s),e.itemProcessor.updateItemsInStorage(s.app_id,s.response);break;case"/items/add":console.log("/items/add - ",s),e.itemProcessor.addItemsToStorage(s.app_id,s.response);break;case"/items/delete":console.log("/items/delete - ",s),e.itemProcessor.deleteItemsFromStorage(s.app_id,s.response);break;case"/app/update":console.log("/app/update - ",s),e.appProcessor.updateAppFieldsAndViews(s.response);break;case"/file/delete":console.log("file/delete - ",s),e.fileManager.deleteFileFromStorage(s.response.file_id,s.app_id);break;case"/file/upload":console.log("file/upload - ",s),e.fileManager.addFileToStorage(s.app_id,s.response);break;case"/file/formupload":console.log("file/formupload - ",s);break;case"/file/update":e.fileManager.updateFileInStorage(s.response.file_id,s.response.app_id,s.response),console.log("file/update - ",s);break;case"/new/file/duplicate":e.fileManager.addFilesToStorage(s.app_id,s.response),console.log("new/file/duplicate - ",s);break;case"/api/new/document/insert-one":e.documentManager.emitDocumentInsert(s.response),console.log("/api/new/document/insert-one - ",s);break;case"/ws/emit-to-user":console.log("/ws/emit-to-user - ",s);break;case"/ws/broadcast-to-app-subscribers":console.log("/ws/broadcast-to-app-subscribers - ",s);var o=JSON.parse(s.response);if(!o.data_type)return;e.ghconstructor.getInstance(o.data_type).then(function(e){e.onMessage(s.app_id,s.user_id,o)});break;default:console.warn("WEBSOCKETS is not process this API:",s.api)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebsocketHandler=e;
270
280
  },{}],"qJXG":[function(require,module,exports) {
271
- "use strict";function t(r){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})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,u=o.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",p=a.toStringTag||"@@toStringTag";function h(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{h({},"")}catch(e){h=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,u=Object.create(o.prototype),a=new A(n||[]);return i(u,"_invoke",{value:O(t,e,a)}),u}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=l;var v="suspendedStart",g="suspendedYield",y="executing",d="completed",m={};function b(){}function w(){}function x(){}var k={};h(k,c,function(){return this});var _=Object.getPrototypeOf,L=_&&_(_(q([])));L&&L!==o&&u.call(L,c)&&(k=L);var E=x.prototype=b.prototype=Object.create(k);function j(t){["next","throw","return"].forEach(function(r){h(t,r,function(t){return this._invoke(r,t)})})}function G(r,e){function n(o,i,a,c){var s=f(r[o],r,i);if("throw"!==s.type){var p=s.arg,h=p.value;return h&&"object"==t(h)&&u.call(h,"__await")?e.resolve(h.__await).then(function(t){n("next",t,a,c)},function(t){n("throw",t,a,c)}):e.resolve(h).then(function(t){p.value=t,a(p)},function(t){return n("throw",t,a,c)})}c(s.arg)}var o;i(this,"_invoke",{value:function(t,r){function u(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(u,u):u()}})}function O(t,r,n){var o=v;return function(u,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===u)throw i;return{value:e,done:!0}}for(n.method=u,n.arg=i;;){var a=n.delegate;if(a){var c=T(a,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var s=f(t,r,n);if("normal"===s.type){if(o=n.done?d:g,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var u=f(o,t.iterator,r.arg);if("throw"===u.type)return r.method="throw",r.arg=u.arg,r.delegate=null,m;var i=u.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function S(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function q(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,i=function t(){for(;++o<r.length;)if(u.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return i.next=i}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=x,i(E,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:w,configurable:!0}),w.displayName=h(x,p,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,h(t,p,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},j(G.prototype),h(G.prototype,s,function(){return this}),n.AsyncIterator=G,n.async=function(t,r,e,o,u){void 0===u&&(u=Promise);var i=new G(l(t,r,e,o),u);return n.isGeneratorFunction(r)?i:i.next().then(function(t){return t.done?t.value:i.next()})},j(E),h(E,p,"Generator"),h(E,c,function(){return this}),h(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=q,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&u.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return a.type="throw",a.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=u.call(i,"catchLoc"),s=u.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&u.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),S(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;S(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:q(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,u,i){try{var a=t[u](i),c=a.value}catch(t){return void e(t)}a.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,u){var i=t.apply(r,n);function a(t){e(i,o,u,a,c,"next",t)}function c(t){e(i,o,u,a,c,"throw",t)}a(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function i(t,r,e){return r&&u(t.prototype,r),e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(r){var e=c(r,"string");return"symbol"==t(e)?e:e+""}function c(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GroupManager=void 0;var s=exports.GroupManager=function(){return i(function t(r,e){o(this,t),this.req=e,this.gudhub=r},[{key:"createGroupApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,group_name:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/create-group",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"updateGroupApi",value:function(){var t=n(r().mark(function t(e,n){var o,u;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=n,t.t2=e,o={token:t.t0,group_name:t.t1,group_id:t.t2},t.next=9,this.req.post({url:"/api/sharing-group/update-group",form:o});case 9:return u=t.sent,t.abrupt("return",u);case 13:return t.prev=13,t.t3=t.catch(0),console.log(t.t3),t.abrupt("return",null);case 17:case"end":return t.stop()}},t,this,[[0,13]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"deleteGroupApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,group_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/delete-group",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"addUserToGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var u,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,u={token:t.t0,group_id:t.t1,user_id:t.t2,group_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/add-user-to-group",form:u});case 10:return i=t.sent,t.abrupt("return",i);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"getUsersByGroupApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,group_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/get-users-by-group",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"updateUserInGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var u,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,u={token:t.t0,user_id:t.t1,group_id:t.t2,group_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/update-user-in-group",form:u});case 10:return i=t.sent,t.abrupt("return",i);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"deleteUserFromGroupApi",value:function(){var t=n(r().mark(function t(e,n){var o,u;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,o={token:t.t0,user_id:t.t1,group_id:t.t2},t.next=9,this.req.post({url:"/api/sharing-group/delete-user-from-group",form:o});case 9:return u=t.sent,t.abrupt("return",u);case 13:return t.prev=13,t.t3=t.catch(0),console.log(t.t3),t.abrupt("return",null);case 17:case"end":return t.stop()}},t,this,[[0,13]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getGroupsByUserApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,user_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/get-groups-by-user",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()}])}();
281
+ "use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function t(){var r,e,o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function a(t,o,u,i){var a=o&&o.prototype instanceof s?o:s,p=Object.create(a.prototype);return n(p,"_invoke",function(t,n,o){var u,i,a,s=0,p=o||[],f=!1,l={p:0,n:0,v:r,a:h,f:h.bind(r,4),d:function(t,n){return u=t,i=0,a=r,l.n=n,c}};function h(t,n){for(i=t,a=n,e=0;!f&&s&&!o&&e<p.length;e++){var o,u=p[e],h=l.p,v=u[2];t>3?(o=v===n)&&(a=u[(i=u[4])?5:(i=3,3)],u[4]=u[5]=r):u[0]<=h&&((o=t<2&&h<u[1])?(i=0,l.v=n,l.n=u[1]):h<v&&(o=t<3||u[0]>n||n>v)&&(u[4]=t,u[5]=n,l.n=v,i=0))}if(o||t>1)return c;throw f=!0,n}return function(o,p,v){if(s>1)throw TypeError("Generator is already running");for(f&&1===p&&h(p,v),i=p,a=v;(e=i<2?r:a)||!f;){u||(i?i<3?(i>1&&(l.n=-1),h(i,a)):l.n=a:l.v=a);try{if(s=2,u){if(i||(o="next"),e=u[o]){if(!(e=e.call(u,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,i<2&&(i=0)}else 1===i&&(e=u.return)&&e.call(u),i<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),i=1);u=r}else if((e=(f=l.n<0)?a:t.call(n,l))!==c)break}catch(e){u=r,i=1,a=e}finally{s=1}}return{value:e,done:f}}}(t,u,i),!0),p}var c={};function s(){}function p(){}function f(){}e=Object.getPrototypeOf;var l=[][u]?e(e([][u]())):(n(e={},u,function(){return this}),e),h=f.prototype=s.prototype=Object.create(l);function v(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,f):(r.__proto__=f,n(r,i,"GeneratorFunction")),r.prototype=Object.create(h),r}return p.prototype=f,n(h,"constructor",f),n(f,"constructor",p),p.displayName="GeneratorFunction",n(f,i,"GeneratorFunction"),n(h),n(h,i,"Generator"),n(h,u,function(){return this}),n(h,"toString",function(){return"[object Generator]"}),(t=function(){return{w:a,m:v}})()}function n(r,t,e,o){var u=Object.defineProperty;try{u({},"",{})}catch(r){u=0}(n=function(r,t,e,o){if(t)u?u(r,t,{value:e,enumerable:!o,configurable:!o,writable:!o}):r[t]=e;else{var i=function(t,e){n(r,t,function(r){return this._invoke(t,e,r)})};i("next",0),i("throw",1),i("return",2)}})(r,t,e,o)}function e(r,t,n,e,o,u,i){try{var a=r[u](i),c=a.value}catch(r){return void n(r)}a.done?t(c):Promise.resolve(c).then(e,o)}function o(r){return function(){var t=this,n=arguments;return new Promise(function(o,u){var i=r.apply(t,n);function a(r){e(i,o,u,a,c,"next",r)}function c(r){e(i,o,u,a,c,"throw",r)}a(void 0)})}}function u(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function i(r,t){for(var n=0;n<t.length;n++){var e=t[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,c(e.key),e)}}function a(r,t,n){return t&&i(r.prototype,t),n&&i(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function c(t){var n=s(t,"string");return"symbol"==r(n)?n:n+""}function s(t,n){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,n||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.GroupManager=void 0;var p=exports.GroupManager=function(){return a(function r(t,n){u(this,r),this.req=n,this.gudhub=t},[{key:"createGroupApi",value:function(){var r=o(t().m(function r(n){var e,o,u,i;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return u=r.v,e={token:u,group_name:n},r.n=2,this.req.post({url:"/api/sharing-group/create-group",form:e});case 2:return o=r.v,r.a(2,o);case 3:return r.p=3,i=r.v,console.log(i),r.a(2,null)}},r,this,[[0,3]])}));return function(t){return r.apply(this,arguments)}}()},{key:"updateGroupApi",value:function(){var r=o(t().m(function r(n,e){var o,u,i,a;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return i=r.v,o={token:i,group_name:e,group_id:n},r.n=2,this.req.post({url:"/api/sharing-group/update-group",form:o});case 2:return u=r.v,r.a(2,u);case 3:return r.p=3,a=r.v,console.log(a),r.a(2,null)}},r,this,[[0,3]])}));return function(t,n){return r.apply(this,arguments)}}()},{key:"deleteGroupApi",value:function(){var r=o(t().m(function r(n){var e,o,u,i;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return u=r.v,e={token:u,group_id:n},r.n=2,this.req.post({url:"/api/sharing-group/delete-group",form:e});case 2:return o=r.v,r.a(2,o);case 3:return r.p=3,i=r.v,console.log(i),r.a(2,null)}},r,this,[[0,3]])}));return function(t){return r.apply(this,arguments)}}()},{key:"addUserToGroupApi",value:function(){var r=o(t().m(function r(n,e,o){var u,i,a,c;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return a=r.v,u={token:a,group_id:n,user_id:e,group_permission:o},r.n=2,this.req.post({url:"/api/sharing-group/add-user-to-group",form:u});case 2:return i=r.v,r.a(2,i);case 3:return r.p=3,c=r.v,console.log(c),r.a(2,null)}},r,this,[[0,3]])}));return function(t,n,e){return r.apply(this,arguments)}}()},{key:"getUsersByGroupApi",value:function(){var r=o(t().m(function r(n){var e,o,u,i;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return u=r.v,e={token:u,group_id:n},r.n=2,this.req.post({url:"/api/sharing-group/get-users-by-group",form:e});case 2:return o=r.v,r.a(2,o);case 3:return r.p=3,i=r.v,console.log(i),r.a(2,null)}},r,this,[[0,3]])}));return function(t){return r.apply(this,arguments)}}()},{key:"updateUserInGroupApi",value:function(){var r=o(t().m(function r(n,e,o){var u,i,a,c;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return a=r.v,u={token:a,user_id:n,group_id:e,group_permission:o},r.n=2,this.req.post({url:"/api/sharing-group/update-user-in-group",form:u});case 2:return i=r.v,r.a(2,i);case 3:return r.p=3,c=r.v,console.log(c),r.a(2,null)}},r,this,[[0,3]])}));return function(t,n,e){return r.apply(this,arguments)}}()},{key:"deleteUserFromGroupApi",value:function(){var r=o(t().m(function r(n,e){var o,u,i,a;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return i=r.v,o={token:i,user_id:n,group_id:e},r.n=2,this.req.post({url:"/api/sharing-group/delete-user-from-group",form:o});case 2:return u=r.v,r.a(2,u);case 3:return r.p=3,a=r.v,console.log(a),r.a(2,null)}},r,this,[[0,3]])}));return function(t,n){return r.apply(this,arguments)}}()},{key:"getGroupsByUserApi",value:function(){var r=o(t().m(function r(n){var e,o,u,i;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return u=r.v,e={token:u,user_id:n},r.n=2,this.req.post({url:"/api/sharing-group/get-groups-by-user",form:e});case 2:return o=r.v,r.a(2,o);case 3:return r.p=3,i=r.v,console.log(i),r.a(2,null)}},r,this,[[0,3]])}));return function(t){return r.apply(this,arguments)}}()}])}();
272
282
  },{}],"Z7AV":[function(require,module,exports) {
273
- "use strict";function t(r){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})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",p=u.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(e){f=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:G(t,e,u)}),i}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=l;var v="suspendedStart",y="suspendedYield",g="executing",d="completed",m={};function b(){}function w(){}function x(){}var k={};f(k,c,function(){return this});var L=Object.getPrototypeOf,_=L&&L(L(N([])));_&&_!==o&&i.call(_,c)&&(k=_);var E=x.prototype=b.prototype=Object.create(k);function j(t){["next","throw","return"].forEach(function(r){f(t,r,function(t){return this._invoke(r,t)})})}function O(r,e){function n(o,a,u,c){var s=h(r[o],r,a);if("throw"!==s.type){var p=s.arg,f=p.value;return f&&"object"==t(f)&&i.call(f,"__await")?e.resolve(f.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(f).then(function(t){p.value=t,u(p)},function(t){return n("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function G(t,r,n){var o=v;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=S(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=h(t,r,n);if("normal"===s.type){if(o=n.done?d:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=d,n.method="throw",n.arg=s.arg)}}}function S(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function A(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function P(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function T(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function N(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,p,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,p,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},j(O.prototype),f(O.prototype,s,function(){return this}),n.AsyncIterator=O,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new O(l(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(E),f(E,p,"Generator"),f(E,c,function(){return this}),f(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=N,T.prototype={constructor:T,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(P),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),P(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;P(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:N(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=c(r,"string");return"symbol"==t(e)?e:e+""}function c(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppGroupSharing=void 0;var s=exports.AppGroupSharing=function(){return a(function t(r,e){o(this,t),this.req=e,this.gudhub=r},[{key:"addAppToGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,i={token:t.t0,app_id:t.t1,group_id:t.t2,app_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/add-app-to-group",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"getAppsByGroupApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,group_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/get-apps-by-group",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"updateAppInGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=n,t.t2=e,t.t3=o,i={token:t.t0,group_id:t.t1,app_id:t.t2,app_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/update-app-in-group",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"deleteAppFromGroupApi",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=n,t.t2=e,t.t3=o,i={token:t.t0,group_id:t.t1,app_id:t.t2,app_permission:t.t3},t.next=10,this.req.post({url:"/api/sharing-group/delete-app-from-group",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"getGroupsByAppApi",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,app_id:t.t1},t.next=8,this.req.post({url:"/api/sharing-group/get-groups-by-app",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()}])}();
283
+ "use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function t(){var r,e,o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function a(t,o,u,i){var a=o&&o.prototype instanceof c?o:c,s=Object.create(a.prototype);return n(s,"_invoke",function(t,n,o){var u,i,a,c=0,s=o||[],f=!1,l={p:0,n:0,v:r,a:v,f:v.bind(r,4),d:function(t,n){return u=t,i=0,a=r,l.n=n,p}};function v(t,n){for(i=t,a=n,e=0;!f&&c&&!o&&e<s.length;e++){var o,u=s[e],v=l.p,h=u[2];t>3?(o=h===n)&&(a=u[(i=u[4])?5:(i=3,3)],u[4]=u[5]=r):u[0]<=v&&((o=t<2&&v<u[1])?(i=0,l.v=n,l.n=u[1]):v<h&&(o=t<3||u[0]>n||n>h)&&(u[4]=t,u[5]=n,l.n=h,i=0))}if(o||t>1)return p;throw f=!0,n}return function(o,s,h){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&v(s,h),i=s,a=h;(e=i<2?r:a)||!f;){u||(i?i<3?(i>1&&(l.n=-1),v(i,a)):l.n=a:l.v=a);try{if(c=2,u){if(i||(o="next"),e=u[o]){if(!(e=e.call(u,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,i<2&&(i=0)}else 1===i&&(e=u.return)&&e.call(u),i<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),i=1);u=r}else if((e=(f=l.n<0)?a:t.call(n,l))!==p)break}catch(e){u=r,i=1,a=e}finally{c=1}}return{value:e,done:f}}}(t,u,i),!0),s}var p={};function c(){}function s(){}function f(){}e=Object.getPrototypeOf;var l=[][u]?e(e([][u]())):(n(e={},u,function(){return this}),e),v=f.prototype=c.prototype=Object.create(l);function h(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,f):(r.__proto__=f,n(r,i,"GeneratorFunction")),r.prototype=Object.create(v),r}return s.prototype=f,n(v,"constructor",f),n(f,"constructor",s),s.displayName="GeneratorFunction",n(f,i,"GeneratorFunction"),n(v),n(v,i,"Generator"),n(v,u,function(){return this}),n(v,"toString",function(){return"[object Generator]"}),(t=function(){return{w:a,m:h}})()}function n(r,t,e,o){var u=Object.defineProperty;try{u({},"",{})}catch(r){u=0}(n=function(r,t,e,o){if(t)u?u(r,t,{value:e,enumerable:!o,configurable:!o,writable:!o}):r[t]=e;else{var i=function(t,e){n(r,t,function(r){return this._invoke(t,e,r)})};i("next",0),i("throw",1),i("return",2)}})(r,t,e,o)}function e(r,t,n,e,o,u,i){try{var a=r[u](i),p=a.value}catch(r){return void n(r)}a.done?t(p):Promise.resolve(p).then(e,o)}function o(r){return function(){var t=this,n=arguments;return new Promise(function(o,u){var i=r.apply(t,n);function a(r){e(i,o,u,a,p,"next",r)}function p(r){e(i,o,u,a,p,"throw",r)}a(void 0)})}}function u(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")}function i(r,t){for(var n=0;n<t.length;n++){var e=t[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,p(e.key),e)}}function a(r,t,n){return t&&i(r.prototype,t),n&&i(r,n),Object.defineProperty(r,"prototype",{writable:!1}),r}function p(t){var n=c(t,"string");return"symbol"==r(n)?n:n+""}function c(t,n){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var o=e.call(t,n||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppGroupSharing=void 0;var s=exports.AppGroupSharing=function(){return a(function r(t,n){u(this,r),this.req=n,this.gudhub=t},[{key:"addAppToGroupApi",value:function(){var r=o(t().m(function r(n,e,o){var u,i,a,p;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return a=r.v,u={token:a,app_id:n,group_id:e,app_permission:o},r.n=2,this.req.post({url:"/api/sharing-group/add-app-to-group",form:u});case 2:return i=r.v,r.a(2,i);case 3:return r.p=3,p=r.v,console.log(p),r.a(2,null)}},r,this,[[0,3]])}));return function(t,n,e){return r.apply(this,arguments)}}()},{key:"getAppsByGroupApi",value:function(){var r=o(t().m(function r(n){var e,o,u,i;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return u=r.v,e={token:u,group_id:n},r.n=2,this.req.post({url:"/api/sharing-group/get-apps-by-group",form:e});case 2:return o=r.v,r.a(2,o);case 3:return r.p=3,i=r.v,console.log(i),r.a(2,null)}},r,this,[[0,3]])}));return function(t){return r.apply(this,arguments)}}()},{key:"updateAppInGroupApi",value:function(){var r=o(t().m(function r(n,e,o){var u,i,a,p;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return a=r.v,u={token:a,group_id:e,app_id:n,app_permission:o},r.n=2,this.req.post({url:"/api/sharing-group/update-app-in-group",form:u});case 2:return i=r.v,r.a(2,i);case 3:return r.p=3,p=r.v,console.log(p),r.a(2,null)}},r,this,[[0,3]])}));return function(t,n,e){return r.apply(this,arguments)}}()},{key:"deleteAppFromGroupApi",value:function(){var r=o(t().m(function r(n,e,o){var u,i,a,p;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return a=r.v,u={token:a,group_id:e,app_id:n,app_permission:o},r.n=2,this.req.post({url:"/api/sharing-group/delete-app-from-group",form:u});case 2:return i=r.v,r.a(2,i);case 3:return r.p=3,p=r.v,console.log(p),r.a(2,null)}},r,this,[[0,3]])}));return function(t,n,e){return r.apply(this,arguments)}}()},{key:"getGroupsByAppApi",value:function(){var r=o(t().m(function r(n){var e,o,u,i;return t().w(function(r){for(;;)switch(r.n){case 0:return r.p=0,r.n=1,this.gudhub.auth.getToken();case 1:return u=r.v,e={token:u,app_id:n},r.n=2,this.req.post({url:"/api/sharing-group/get-groups-by-app",form:e});case 2:return o=r.v,r.a(2,o);case 3:return r.p=3,i=r.v,console.log(i),r.a(2,null)}},r,this,[[0,3]])}));return function(t){return r.apply(this,arguments)}}()}])}();
274
284
  },{}],"LS0j":[function(require,module,exports) {
275
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GroupSharing=void 0;var t=require("../groupManager/GroupManager.js"),r=require("./AppGroupSharing.js");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 n(){n=function(){return r};var t,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",p=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(t){f=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof w?r:w,i=Object.create(o.prototype),u=new M(n||[]);return a(i,"_invoke",{value:E(t,e,u)}),i}function l(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var y="suspendedStart",v="suspendedYield",g="executing",d="completed",m={};function w(){}function b(){}function G(){}var x={};f(x,c,function(){return this});var _=Object.getPrototypeOf,L=_&&_(_(T([])));L&&L!==o&&i.call(L,c)&&(x=L);var A=G.prototype=w.prototype=Object.create(x);function S(t){["next","throw","return"].forEach(function(r){f(t,r,function(t){return this._invoke(r,t)})})}function k(t,r){function n(o,a,u,c){var p=l(t[o],t,a);if("throw"!==p.type){var s=p.arg,f=s.value;return f&&"object"==e(f)&&i.call(f,"__await")?r.resolve(f.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):r.resolve(f).then(function(t){s.value=t,u(s)},function(t){return n("throw",t,u,c)})}c(p.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r(function(r,o){n(t,e,r,o)})}return o=o?o.then(i,i):i()}})}function E(r,e,n){var o=y;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var p=l(r,e,n);if("normal"===p.type){if(o=n.done?d:v,p.arg===m)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=d,n.method="throw",n.arg=p.arg)}}}function j(r,e){var n=e.method,o=r.iterator[n];if(o===t)return e.delegate=null,"throw"===n&&r.iterator.return&&(e.method="return",e.arg=t,j(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=l(o,r.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,m;var a=i.arg;return a?a.done?(e[r.resultName]=a.value,e.next=r.nextLoc,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,m):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function O(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function P(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function T(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(i.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(e(r)+" is not iterable")}return b.prototype=G,a(A,"constructor",{value:G,configurable:!0}),a(G,"constructor",{value:b,configurable:!0}),b.displayName=f(G,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===b||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,G):(t.__proto__=G,f(t,s,"GeneratorFunction")),t.prototype=Object.create(A),t},r.awrap=function(t){return{__await:t}},S(k.prototype),f(k.prototype,p,function(){return this}),r.AsyncIterator=k,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new k(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(A),f(A,s,"Generator"),f(A,c,function(){return this}),f(A,"toString",function(){return"[object Generator]"}),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=T,M.prototype={constructor:M,reset:function(r){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!r)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(n,o){return u.type="throw",u.arg=r,e.next=n,o&&(e.method="next",e.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),p=i.call(a,"finallyLoc");if(c&&p){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!p)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),P(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;P(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={iterator:T(r),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=t),m}},r}function o(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function i(t){return function(){var r=this,e=arguments;return new Promise(function(n,i){var a=t.apply(r,e);function u(t){o(a,n,i,u,c,"next",t)}function c(t){o(a,n,i,u,c,"throw",t)}u(void 0)})}}function a(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function c(t,r,e){return r&&u(t.prototype,r),e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var r=s(t,"string");return"symbol"==e(r)?r:r+""}function s(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}var f=exports.GroupSharing=function(){return c(function e(n,o,i){a(this,e),this.req=o,this.gudhub=n,this.pipeService=i,this.groupManager=new t.GroupManager(n,o),this.appGroupSharing=new r.AppGroupSharing(n,o)},[{key:"createGroup",value:function(t){return this.groupManager.createGroupApi(t)}},{key:"updateGroup",value:function(t,r){return this.groupManager.updateGroupApi(t,r)}},{key:"deleteGroup",value:function(t){return this.groupManager.deleteGroupApi(t)}},{key:"addUserToGroup",value:function(){var t=i(n().mark(function t(r,e,o){var i;return n().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.groupManager.addUserToGroupApi(r,e,o);case 2:return i=t.sent,this.pipeService.emit("group_members_add",{app_id:"group_sharing"},i),t.abrupt("return",i);case 5:case"end":return t.stop()}},t,this)}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"getUsersByGroup",value:function(t){return this.groupManager.getUsersByGroupApi(t)}},{key:"updateUserInGroup",value:function(){var t=i(n().mark(function t(r,e,o){var i;return n().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.groupManager.updateUserInGroupApi(r,e,o);case 2:return i=t.sent,this.pipeService.emit("group_members_update",{app_id:"group_sharing"},i),t.abrupt("return",i);case 5:case"end":return t.stop()}},t,this)}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"deleteUserFromGroup",value:function(){var t=i(n().mark(function t(r,e){var o;return n().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.groupManager.deleteUserFromGroupApi(r,e);case 2:return o=t.sent,this.pipeService.emit("group_members_delete",{app_id:"group_sharing"},o),t.abrupt("return",o);case 5:case"end":return t.stop()}},t,this)}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getGroupsByUser",value:function(t){return this.groupManager.getGroupsByUserApi(t)}},{key:"addAppToGroup",value:function(t,r,e){return this.appGroupSharing.addAppToGroupApi(t,r,e)}},{key:"getAppsByGroup",value:function(t){return this.appGroupSharing.getAppsByGroupApi(t)}},{key:"updateAppInGroup",value:function(t,r,e){return this.appGroupSharing.updateAppInGroupApi(t,r,e)}},{key:"deleteAppFromGroup",value:function(t,r,e){return this.appGroupSharing.deleteAppFromGroupApi(t,r,e)}},{key:"getGroupsByApp",value:function(t){return this.appGroupSharing.getGroupsByAppApi(t)}}])}();
285
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GroupSharing=void 0;var r=require("../groupManager/GroupManager.js"),e=require("./AppGroupSharing.js");function t(r){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function n(){var r,e,t="function"==typeof Symbol?Symbol:{},u=t.iterator||"@@iterator",i=t.toStringTag||"@@toStringTag";function p(t,n,u,i){var p=n&&n.prototype instanceof c?n:c,s=Object.create(p.prototype);return o(s,"_invoke",function(t,n,o){var u,i,p,c=0,s=o||[],f=!1,l={p:0,n:0,v:r,a:y,f:y.bind(r,4),d:function(e,t){return u=e,i=0,p=r,l.n=t,a}};function y(t,n){for(i=t,p=n,e=0;!f&&c&&!o&&e<s.length;e++){var o,u=s[e],y=l.p,v=u[2];t>3?(o=v===n)&&(p=u[(i=u[4])?5:(i=3,3)],u[4]=u[5]=r):u[0]<=y&&((o=t<2&&y<u[1])?(i=0,l.v=n,l.n=u[1]):y<v&&(o=t<3||u[0]>n||n>v)&&(u[4]=t,u[5]=n,l.n=v,i=0))}if(o||t>1)return a;throw f=!0,n}return function(o,s,v){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,v),i=s,p=v;(e=i<2?r:p)||!f;){u||(i?i<3?(i>1&&(l.n=-1),y(i,p)):l.n=p:l.v=p);try{if(c=2,u){if(i||(o="next"),e=u[o]){if(!(e=e.call(u,p)))throw TypeError("iterator result is not an object");if(!e.done)return e;p=e.value,i<2&&(i=0)}else 1===i&&(e=u.return)&&e.call(u),i<2&&(p=TypeError("The iterator does not provide a '"+o+"' method"),i=1);u=r}else if((e=(f=l.n<0)?p:t.call(n,l))!==a)break}catch(e){u=r,i=1,p=e}finally{c=1}}return{value:e,done:f}}}(t,u,i),!0),s}var a={};function c(){}function s(){}function f(){}e=Object.getPrototypeOf;var l=[][u]?e(e([][u]())):(o(e={},u,function(){return this}),e),y=f.prototype=c.prototype=Object.create(l);function v(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,f):(r.__proto__=f,o(r,i,"GeneratorFunction")),r.prototype=Object.create(y),r}return s.prototype=f,o(y,"constructor",f),o(f,"constructor",s),s.displayName="GeneratorFunction",o(f,i,"GeneratorFunction"),o(y),o(y,i,"Generator"),o(y,u,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),(n=function(){return{w:p,m:v}})()}function o(r,e,t,n){var u=Object.defineProperty;try{u({},"",{})}catch(r){u=0}(o=function(r,e,t,n){if(e)u?u(r,e,{value:t,enumerable:!n,configurable:!n,writable:!n}):r[e]=t;else{var i=function(e,t){o(r,e,function(r){return this._invoke(e,t,r)})};i("next",0),i("throw",1),i("return",2)}})(r,e,t,n)}function u(r,e,t,n,o,u,i){try{var p=r[u](i),a=p.value}catch(r){return void t(r)}p.done?e(a):Promise.resolve(a).then(n,o)}function i(r){return function(){var e=this,t=arguments;return new Promise(function(n,o){var i=r.apply(e,t);function p(r){u(i,n,o,p,a,"next",r)}function a(r){u(i,n,o,p,a,"throw",r)}p(void 0)})}}function p(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function a(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,s(n.key),n)}}function c(r,e,t){return e&&a(r.prototype,e),t&&a(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function s(r){var e=f(r,"string");return"symbol"==t(e)?e:e+""}function f(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}var l=exports.GroupSharing=function(){return c(function t(n,o,u){p(this,t),this.req=o,this.gudhub=n,this.pipeService=u,this.groupManager=new r.GroupManager(n,o),this.appGroupSharing=new e.AppGroupSharing(n,o)},[{key:"createGroup",value:function(r){return this.groupManager.createGroupApi(r)}},{key:"updateGroup",value:function(r,e){return this.groupManager.updateGroupApi(r,e)}},{key:"deleteGroup",value:function(r){return this.groupManager.deleteGroupApi(r)}},{key:"addUserToGroup",value:function(){var r=i(n().m(function r(e,t,o){var u;return n().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,this.groupManager.addUserToGroupApi(e,t,o);case 1:return u=r.v,this.pipeService.emit("group_members_add",{app_id:"group_sharing"},u),r.a(2,u)}},r,this)}));return function(e,t,n){return r.apply(this,arguments)}}()},{key:"getUsersByGroup",value:function(r){return this.groupManager.getUsersByGroupApi(r)}},{key:"updateUserInGroup",value:function(){var r=i(n().m(function r(e,t,o){var u;return n().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,this.groupManager.updateUserInGroupApi(e,t,o);case 1:return u=r.v,this.pipeService.emit("group_members_update",{app_id:"group_sharing"},u),r.a(2,u)}},r,this)}));return function(e,t,n){return r.apply(this,arguments)}}()},{key:"deleteUserFromGroup",value:function(){var r=i(n().m(function r(e,t){var o;return n().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,this.groupManager.deleteUserFromGroupApi(e,t);case 1:return o=r.v,this.pipeService.emit("group_members_delete",{app_id:"group_sharing"},o),r.a(2,o)}},r,this)}));return function(e,t){return r.apply(this,arguments)}}()},{key:"getGroupsByUser",value:function(r){return this.groupManager.getGroupsByUserApi(r)}},{key:"addAppToGroup",value:function(r,e,t){return this.appGroupSharing.addAppToGroupApi(r,e,t)}},{key:"getAppsByGroup",value:function(r){return this.appGroupSharing.getAppsByGroupApi(r)}},{key:"updateAppInGroup",value:function(r,e,t){return this.appGroupSharing.updateAppInGroupApi(r,e,t)}},{key:"deleteAppFromGroup",value:function(r,e,t){return this.appGroupSharing.deleteAppFromGroupApi(r,e,t)}},{key:"getGroupsByApp",value:function(r){return this.appGroupSharing.getGroupsByAppApi(r)}}])}();
276
286
  },{"../groupManager/GroupManager.js":"qJXG","./AppGroupSharing.js":"Z7AV"}],"XaHW":[function(require,module,exports) {
277
- "use strict";function t(r){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})(r)}function r(){r=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",s=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{f({},"")}catch(e){f=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),u=new G(n||[]);return a(i,"_invoke",{value:S(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var v="suspendedStart",y="suspendedYield",d="executing",g="completed",m={};function b(){}function w(){}function x(){}var k={};f(k,c,function(){return this});var L=Object.getPrototypeOf,_=L&&L(L(q([])));_&&_!==o&&i.call(_,c)&&(k=_);var E=x.prototype=b.prototype=Object.create(k);function j(t){["next","throw","return"].forEach(function(r){f(t,r,function(t){return this._invoke(r,t)})})}function O(r,e){function n(o,a,u,c){var s=p(r[o],r,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?e.resolve(f.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(f).then(function(t){l.value=t,u(l)},function(t){return n("throw",t,u,c)})}c(s.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function S(t,r,n){var o=v;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===g){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var s=p(t,r,n);if("normal"===s.type){if(o=n.done?g:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=g,n.method="throw",n.arg=s.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function T(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function N(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function q(r){if(r||""===r){var n=r[c];if(n)return n.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function t(){for(;++o<r.length;)if(i.call(r,o))return t.value=r[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(r)+" is not iterable")}return w.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,l,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},n.awrap=function(t){return{__await:t}},j(O.prototype),f(O.prototype,s,function(){return this}),n.AsyncIterator=O,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},j(E),f(E,l,"Generator"),f(E,c,function(){return this}),f(E,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=q,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),m},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),N(e),m}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;N(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:q(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},n}function e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(r){var e=c(r,"string");return"symbol"==t(e)?e:e+""}function c(r,e){if("object"!=t(r)||!r)return r;var n=r[Symbol.toPrimitive];if(void 0!==n){var o=n.call(r,e||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Sharing=void 0;var s=exports.Sharing=function(){return a(function t(r,e){o(this,t),this.req=e,this.gudhub=r},[{key:"add",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,i={token:t.t0,app_id:t.t1,user_id:t.t2,sharing_permission:t.t3},t.next=10,this.req.post({url:"/sharing/add",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"update",value:function(){var t=n(r().mark(function t(e,n,o){var i,a;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,t.t3=o,i={token:t.t0,app_id:t.t1,user_id:t.t2,sharing_permission:t.t3},t.next=10,this.req.post({url:"/sharing/update",form:i});case 10:return a=t.sent,t.abrupt("return",a);case 14:return t.prev=14,t.t4=t.catch(0),console.log(t.t4),t.abrupt("return",null);case 18:case"end":return t.stop()}},t,this,[[0,14]])}));return function(r,e,n){return t.apply(this,arguments)}}()},{key:"delete",value:function(){var t=n(r().mark(function t(e,n){var o,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,o={token:t.t0,app_id:t.t1,user_id:t.t2},t.next=9,this.req.post({url:"/sharing/delete",form:o});case 9:return i=t.sent,t.abrupt("return",i);case 13:return t.prev=13,t.t3=t.catch(0),console.log(t.t3),t.abrupt("return",null);case 17:case"end":return t.stop()}},t,this,[[0,13]])}));return function(r,e){return t.apply(this,arguments)}}()},{key:"getAppUsers",value:function(){var t=n(r().mark(function t(e){var n,o;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,n={token:t.t0,app_id:t.t1},t.next=8,this.req.post({url:"/sharing/get-app-users",form:n});case 8:return o=t.sent,t.abrupt("return",o);case 12:return t.prev=12,t.t2=t.catch(0),console.log(t.t2),t.abrupt("return",null);case 16:case"end":return t.stop()}},t,this,[[0,12]])}));return function(r){return t.apply(this,arguments)}}()},{key:"addInvitation",value:function(){var t=n(r().mark(function t(e,n){var o,i;return r().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.gudhub.auth.getToken();case 3:return t.t0=t.sent,t.t1=e,t.t2=n,o={token:t.t0,guests_emails:t.t1,apps:t.t2},t.next=9,this.req.post({url:"/api/invitation/add",form:o});case 9:return i=t.sent,t.abrupt("return",i);case 13:return t.prev=13,t.t3=t.catch(0),console.log(t.t3),t.abrupt("return",null);case 17:case"end":return t.stop()}},t,this,[[0,13]])}));return function(r,e){return t.apply(this,arguments)}}()}])}();
287
+ "use strict";function t(r){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})(r)}function r(){var t,e,o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function a(r,o,u,i){var a=o&&o.prototype instanceof s?o:s,f=Object.create(a.prototype);return n(f,"_invoke",function(r,n,o){var u,i,a,s=0,f=o||[],p=!1,l={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(r,n){return u=r,i=0,a=t,l.n=n,c}};function v(r,n){for(i=r,a=n,e=0;!p&&s&&!o&&e<f.length;e++){var o,u=f[e],v=l.p,h=u[2];r>3?(o=h===n)&&(a=u[(i=u[4])?5:(i=3,3)],u[4]=u[5]=t):u[0]<=v&&((o=r<2&&v<u[1])?(i=0,l.v=n,l.n=u[1]):v<h&&(o=r<3||u[0]>n||n>h)&&(u[4]=r,u[5]=n,l.n=h,i=0))}if(o||r>1)return c;throw p=!0,n}return function(o,f,h){if(s>1)throw TypeError("Generator is already running");for(p&&1===f&&v(f,h),i=f,a=h;(e=i<2?t:a)||!p;){u||(i?i<3?(i>1&&(l.n=-1),v(i,a)):l.n=a:l.v=a);try{if(s=2,u){if(i||(o="next"),e=u[o]){if(!(e=e.call(u,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,i<2&&(i=0)}else 1===i&&(e=u.return)&&e.call(u),i<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),i=1);u=t}else if((e=(p=l.n<0)?a:r.call(n,l))!==c)break}catch(e){u=t,i=1,a=e}finally{s=1}}return{value:e,done:p}}}(r,u,i),!0),f}var c={};function s(){}function f(){}function p(){}e=Object.getPrototypeOf;var l=[][u]?e(e([][u]())):(n(e={},u,function(){return this}),e),v=p.prototype=s.prototype=Object.create(l);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,n(t,i,"GeneratorFunction")),t.prototype=Object.create(v),t}return f.prototype=p,n(v,"constructor",p),n(p,"constructor",f),f.displayName="GeneratorFunction",n(p,i,"GeneratorFunction"),n(v),n(v,i,"Generator"),n(v,u,function(){return this}),n(v,"toString",function(){return"[object Generator]"}),(r=function(){return{w:a,m:h}})()}function n(t,r,e,o){var u=Object.defineProperty;try{u({},"",{})}catch(t){u=0}(n=function(t,r,e,o){if(r)u?u(t,r,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[r]=e;else{var i=function(r,e){n(t,r,function(t){return this._invoke(r,e,t)})};i("next",0),i("throw",1),i("return",2)}})(t,r,e,o)}function e(t,r,n,e,o,u,i){try{var a=t[u](i),c=a.value}catch(t){return void n(t)}a.done?r(c):Promise.resolve(c).then(e,o)}function o(t){return function(){var r=this,n=arguments;return new Promise(function(o,u){var i=t.apply(r,n);function a(t){e(i,o,u,a,c,"next",t)}function c(t){e(i,o,u,a,c,"throw",t)}a(void 0)})}}function u(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,c(e.key),e)}}function a(t,r,n){return r&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(r){var n=s(r,"string");return"symbol"==t(n)?n:n+""}function s(r,n){if("object"!=t(r)||!r)return r;var e=r[Symbol.toPrimitive];if(void 0!==e){var o=e.call(r,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(r)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.Sharing=void 0;var f=exports.Sharing=function(){return a(function t(r,n){u(this,t),this.req=n,this.gudhub=r},[{key:"add",value:function(){var t=o(r().m(function t(n,e,o){var u,i,a,c;return r().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return a=t.v,u={token:a,app_id:n,user_id:e,sharing_permission:o},t.n=2,this.req.post({url:"/sharing/add",form:u});case 2:return i=t.v,t.a(2,i);case 3:return t.p=3,c=t.v,console.log(c),t.a(2,null)}},t,this,[[0,3]])}));return function(r,n,e){return t.apply(this,arguments)}}()},{key:"update",value:function(){var t=o(r().m(function t(n,e,o){var u,i,a,c;return r().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return a=t.v,u={token:a,app_id:n,user_id:e,sharing_permission:o},t.n=2,this.req.post({url:"/sharing/update",form:u});case 2:return i=t.v,t.a(2,i);case 3:return t.p=3,c=t.v,console.log(c),t.a(2,null)}},t,this,[[0,3]])}));return function(r,n,e){return t.apply(this,arguments)}}()},{key:"delete",value:function(){var t=o(r().m(function t(n,e){var o,u,i,a;return r().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return i=t.v,o={token:i,app_id:n,user_id:e},t.n=2,this.req.post({url:"/sharing/delete",form:o});case 2:return u=t.v,t.a(2,u);case 3:return t.p=3,a=t.v,console.log(a),t.a(2,null)}},t,this,[[0,3]])}));return function(r,n){return t.apply(this,arguments)}}()},{key:"getAppUsers",value:function(){var t=o(r().m(function t(n){var e,o,u,i;return r().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return u=t.v,e={token:u,app_id:n},t.n=2,this.req.post({url:"/sharing/get-app-users",form:e});case 2:return o=t.v,t.a(2,o);case 3:return t.p=3,i=t.v,console.log(i),t.a(2,null)}},t,this,[[0,3]])}));return function(r){return t.apply(this,arguments)}}()},{key:"addInvitation",value:function(){var t=o(r().m(function t(n,e){var o,u,i,a;return r().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,this.gudhub.auth.getToken();case 1:return i=t.v,o={token:i,guests_emails:n,apps:e},t.n=2,this.req.post({url:"/api/invitation/add",form:o});case 2:return u=t.v,t.a(2,u);case 3:return t.p=3,a=t.v,console.log(a),t.a(2,null)}},t,this,[[0,3]])}));return function(r,n){return t.apply(this,arguments)}}()}])}();
278
288
  },{}],"quyV":[function(require,module,exports) {
279
- "use strict";function t(){t=function(){return n};var e,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,r,e){t[r]=e.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",f=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function l(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{l({},"")}catch(e){l=function(t,r,e){return t[r]=e}}function h(t,r,e,n){var o=r&&r.prototype instanceof b?r:b,i=Object.create(o.prototype),u=new G(n||[]);return a(i,"_invoke",{value:k(t,e,u)}),i}function p(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function x(){}var L={};l(L,c,function(){return this});var E=Object.getPrototypeOf,_=E&&E(E(F([])));_&&_!==o&&i.call(_,c)&&(L=_);var j=x.prototype=b.prototype=Object.create(L);function O(t){["next","throw","return"].forEach(function(r){l(t,r,function(t){return this._invoke(r,t)})})}function S(t,e){function n(o,a,u,c){var f=p(t[o],t,a);if("throw"!==f.type){var s=f.arg,l=s.value;return l&&"object"==r(l)&&i.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,u,c)},function(t){n("throw",t,u,c)}):e.resolve(l).then(function(t){s.value=t,u(s)},function(t){return n("throw",t,u,c)})}c(f.arg)}var o;a(this,"_invoke",{value:function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var f=p(t,r,n);if("normal"===f.type){if(o=n.done?m:v,f.arg===g)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=m,n.method="throw",n.arg=f.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function T(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function F(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(i.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(r(t)+" is not iterable")}return w.prototype=x,a(j,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=l(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===w||"GeneratorFunction"===(r.displayName||r.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,l(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},n.awrap=function(t){return{__await:t}},O(S.prototype),l(S.prototype,f,function(){return this}),n.AsyncIterator=S,n.async=function(t,r,e,o,i){void 0===i&&(i=Promise);var a=new S(h(t,r,e,o),i);return n.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},O(j),l(j,s,"Generator"),l(j,c,function(){return this}),l(j,"toString",function(){return"[object Generator]"}),n.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=F,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(T),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),f=i.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=r&&r<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=r,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,r){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&r&&(this.next=r),g},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),T(e),g}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;T(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},n}function r(t){return(r="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 e(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var a=t.apply(r,n);function u(t){e(a,o,i,u,c,"next",t)}function c(t){e(a,o,i,u,c,"throw",t)}u(void 0)})}}function o(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function i(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function a(t,r,e){return r&&i(t.prototype,r),e&&i(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=c(t,"string");return"symbol"==r(e)?e:e+""}function c(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketEmitter=void 0;var f=exports.WebSocketEmitter=function(){return a(function t(r){o(this,t),this.gudhub=r},[{key:"emitToUser",value:function(){var e=n(t().mark(function e(n,o){var i,a;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i={user_id:n,data:"object"===r(o)?JSON.stringify(o):o},t.next=3,this.gudhub.req.post({url:"/ws/emit-to-user",form:i});case 3:return a=t.sent,t.abrupt("return",a);case 5:case"end":return t.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"broadcastToAppSubscribers",value:function(){var r=n(t().mark(function r(e,n,o){var i,a;return t().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return i={app_id:e,data:JSON.stringify({data_type:n,data:o})},t.next=3,this.gudhub.req.post({url:"/ws/broadcast-to-app-subscribers",form:i});case 3:return a=t.sent,t.abrupt("return",a);case 5:case"end":return t.stop()}},r,this)}));return function(t,e,n){return r.apply(this,arguments)}}()}])}();
289
+ "use strict";function t(){var e,n,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.toStringTag||"@@toStringTag";function a(t,o,i,u){var a=o&&o.prototype instanceof f?o:f,s=Object.create(a.prototype);return r(s,"_invoke",function(t,r,o){var i,u,a,f=0,s=o||[],p=!1,l={p:0,n:0,v:e,a:y,f:y.bind(e,4),d:function(t,r){return i=t,u=0,a=e,l.n=r,c}};function y(t,r){for(u=t,a=r,n=0;!p&&f&&!o&&n<s.length;n++){var o,i=s[n],y=l.p,b=i[2];t>3?(o=b===r)&&(a=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=y&&((o=t<2&&y<i[1])?(u=0,l.v=r,l.n=i[1]):y<b&&(o=t<3||i[0]>r||r>b)&&(i[4]=t,i[5]=r,l.n=b,u=0))}if(o||t>1)return c;throw p=!0,r}return function(o,s,b){if(f>1)throw TypeError("Generator is already running");for(p&&1===s&&y(s,b),u=s,a=b;(n=u<2?e:a)||!p;){i||(u?u<3?(u>1&&(l.n=-1),y(u,a)):l.n=a:l.v=a);try{if(f=2,i){if(u||(o="next"),n=i[o]){if(!(n=n.call(i,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,u<2&&(u=0)}else 1===u&&(n=i.return)&&n.call(i),u<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((n=(p=l.n<0)?a:t.call(r,l))!==c)break}catch(n){i=e,u=1,a=n}finally{f=1}}return{value:n,done:p}}}(t,i,u),!0),s}var c={};function f(){}function s(){}function p(){}n=Object.getPrototypeOf;var l=[][i]?n(n([][i]())):(r(n={},i,function(){return this}),n),y=p.prototype=f.prototype=Object.create(l);function b(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,r(t,u,"GeneratorFunction")),t.prototype=Object.create(y),t}return s.prototype=p,r(y,"constructor",p),r(p,"constructor",s),s.displayName="GeneratorFunction",r(p,u,"GeneratorFunction"),r(y),r(y,u,"Generator"),r(y,i,function(){return this}),r(y,"toString",function(){return"[object Generator]"}),(t=function(){return{w:a,m:b}})()}function r(t,e,n,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}(r=function(t,e,n,o){if(e)i?i(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n;else{var u=function(e,n){r(t,e,function(t){return this._invoke(e,n,t)})};u("next",0),u("throw",1),u("return",2)}})(t,e,n,o)}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 n(t,r,e,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void e(t)}a.done?r(c):Promise.resolve(c).then(n,o)}function o(t){return function(){var r=this,e=arguments;return new Promise(function(o,i){var u=t.apply(r,e);function a(t){n(u,o,i,a,c,"next",t)}function c(t){n(u,o,i,a,c,"throw",t)}a(void 0)})}}function i(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function u(t,r){for(var e=0;e<r.length;e++){var n=r[e];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function a(t,r,e){return r&&u(t.prototype,r),e&&u(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var r=f(t,"string");return"symbol"==e(r)?r:r+""}function f(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.WebSocketEmitter=void 0;var s=exports.WebSocketEmitter=function(){return a(function t(r){i(this,t),this.gudhub=r},[{key:"emitToUser",value:function(){var r=o(t().m(function r(n,o){var i,u;return t().w(function(t){for(;;)switch(t.n){case 0:return i={user_id:n,data:"object"===e(o)?JSON.stringify(o):o},t.n=1,this.gudhub.req.post({url:"/ws/emit-to-user",form:i});case 1:return u=t.v,t.a(2,u)}},r,this)}));return function(t,e){return r.apply(this,arguments)}}()},{key:"broadcastToAppSubscribers",value:function(){var r=o(t().m(function r(e,n,o){var i,u;return t().w(function(t){for(;;)switch(t.n){case 0:return i={app_id:e,data:JSON.stringify({data_type:n,data:o})},t.n=1,this.gudhub.req.post({url:"/ws/broadcast-to-app-subscribers",form:i});case 1:return u=t.v,t.a(2,u)}},r,this)}));return function(t,e,n){return r.apply(this,arguments)}}()}])}();
280
290
  },{}],"U9gy":[function(require,module,exports) {
281
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GudHub=void 0;var e=require("./gudhub-https-service.js"),t=require("./PipeService/PipeService.js"),r=require("./Storage/Storage.js"),n=require("./WebSocket/WebSocket.js"),i=require("./config.js"),o=require("./Utils/Utils.js"),u=require("./Auth/Auth.js"),s=require("./GHConstructor/ghconstructor.js"),a=require("./AppProcessor/AppProcessor.js"),c=require("./ItemProcessor/ItemProcessor.js"),l=require("./FieldProcessor/FieldProcessor.js"),h=require("./FileManager/FileManager.js"),p=require("./ChunksManager/ChunksManager.js"),f=require("./DocumentManager/DocumentManager.js"),d=require("./GHConstructor/interpritate.js"),v=require("./consts.js"),g=require("./WebSocket/WebsocketHandler.js"),y=require("./Utils/sharing/GroupSharing.js"),m=require("./Utils/sharing/Sharing.js"),k=require("./WebSocket/WebSocketEmitter.js");function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},u=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function l(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,u=Object.create(o.prototype),s=new A(n||[]);return i(u,"_invoke",{value:j(e,r,s)}),u}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=l;var p="suspendedStart",f="suspendedYield",d="executing",v="completed",g={};function y(){}function m(){}function k(){}var S={};c(S,u,function(){return this});var P=Object.getPrototypeOf,_=P&&P(P(E([])));_&&_!==r&&n.call(_,u)&&(S=_);var x=k.prototype=y.prototype=Object.create(S);function F(e){["next","throw","return"].forEach(function(t){c(e,t,function(e){return this._invoke(t,e)})})}function I(e,t){function r(i,o,u,s){var a=h(e[i],e,o);if("throw"!==a.type){var c=a.arg,l=c.value;return l&&"object"==w(l)&&n.call(l,"__await")?t.resolve(l.__await).then(function(e){r("next",e,u,s)},function(e){r("throw",e,u,s)}):t.resolve(l).then(function(e){c.value=e,u(c)},function(e){return r("throw",e,u,s)})}s(a.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t(function(t,i){r(e,n,t,i)})}return o=o?o.then(i,i):i()}})}function j(t,r,n){var i=p;return function(o,u){if(i===d)throw Error("Generator is already running");if(i===v){if("throw"===o)throw u;return{value:e,done:!0}}for(n.method=o,n.arg=u;;){var s=n.delegate;if(s){var a=L(s,n);if(a){if(a===g)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===p)throw i=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=d;var c=h(t,r,n);if("normal"===c.type){if(i=n.done?v:f,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=v,n.method="throw",n.arg=c.arg)}}}function L(t,r){var n=r.method,i=t.iterator[n];if(i===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=h(i,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var u=o.arg;return u?u.done?(r[t.resultName]=u.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):u:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function W(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function q(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(W,this),this.reset(!0)}function E(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(w(t)+" is not iterable")}return m.prototype=k,i(x,"constructor",{value:k,configurable:!0}),i(k,"constructor",{value:m,configurable:!0}),m.displayName=c(k,a,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,c(e,a,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},F(I.prototype),c(I.prototype,s,function(){return this}),t.AsyncIterator=I,t.async=function(e,r,n,i,o){void 0===o&&(o=Promise);var u=new I(l(e,r,n,i),o);return t.isGeneratorFunction(r)?u:u.next().then(function(e){return e.done?e.value:u.next()})},F(x),c(x,a,"Generator"),c(x,u,function(){return this}),c(x,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=E,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(q),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var u=this.tryEntries[o],s=u.completion;if("root"===u.tryLoc)return i("end");if(u.tryLoc<=this.prev){var a=n.call(u,"catchLoc"),c=n.call(u,"finallyLoc");if(a&&c){if(this.prev<u.catchLoc)return i(u.catchLoc,!0);if(this.prev<u.finallyLoc)return i(u.finallyLoc)}else if(a){if(this.prev<u.catchLoc)return i(u.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return i(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var u=o?o.completion:{};return u.type=e,u.arg=t,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),q(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;q(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:E(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function S(e,t,r,n,i,o,u){try{var s=e[o](u),a=s.value}catch(e){return void r(e)}s.done?t(a):Promise.resolve(a).then(n,i)}function P(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function u(e){S(o,n,i,u,s,"next",e)}function s(e){S(o,n,i,u,s,"throw",e)}u(void 0)})}}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,I(n.key),n)}}function F(e,t,r){return t&&x(e.prototype,t),r&&x(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function I(e){var t=j(e,"string");return"symbol"==w(t)?t:t+""}function j(e,t){if("object"!=w(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var L=exports.GudHub=function(){return F(function v(w){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{server_url:i.server_url,wss_url:i.wss_url,node_server_url:i.node_server_url,initWebsocket:!1,activateSW:!1,swLink:"",async_modules_path:i.async_modules_path,file_server_url:i.file_server_url,automation_modules_path:i.automation_modules_path,accesstoken:this.accesstoken,expirydate:this.expirydate};_(this,v),this.config=b,this.ghconstructor=new s.GHConstructor(this),this.interpritate=new d.Interpritate(this),this.pipeService=new t.PipeService,this.storage=new r.Storage(b.async_modules_path,b.file_server_url,b.automation_modules_path),this.util=new o.Utils(this),this.req=new e.GudHubHttpsService(b.server_url),this.auth=new u.Auth(this.req,this.storage),this.sharing=new m.Sharing(this,this.req),this.groupSharing=new y.GroupSharing(this,this.req,this.pipeService),w?this.storage.setUser({auth_key:w}):b.accesstoken&&b.expirydate&&this.storage.setUser({accesstoken:b.accesstoken,expirydate:b.expirydate}),this.req.init(this.auth.getToken.bind(this.auth)),this.ws=new n.WebSocketApi(b.wss_url,this.auth),this.chunksManager=new p.ChunksManager(this.storage,this.pipeService,this.req,this.util),this.appProcessor=new a.AppProcessor(this.storage,this.pipeService,this.req,this.ws,this.chunksManager,this.util,b.activateSW),this.itemProcessor=new c.ItemProcessor(this.storage,this.pipeService,this.req,this.appProcessor,this.util),this.fieldProcessor=new l.FieldProcessor(this.storage,this.req,this.appProcessor,this.itemProcessor,this.pipeService),this.fileManager=new h.FileManager(this.storage,this.pipeService,this.req,this.appProcessor),this.documentManager=new f.DocumentManager(this.req,this.pipeService),this.websocketsemitter=new k.WebSocketEmitter(this),b.initWebsocket&&this.ws.initWebSocket(g.WebsocketHandler.bind(this,this),this.appProcessor.refreshApps.bind(this.appProcessor));b.activateSW&&this.activateSW(b.swLink)},[{key:"activateSW",value:function(){var e=P(b().mark(function e(t){var r;return b().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(v.IS_WEB&&"serviceWorker"in window.navigator)){e.next=14;break}return e.prev=1,e.next=4,window.navigator.serviceWorker.register(t);case 4:(r=e.sent).update().then(function(){return console.log("%cSW ->>> Service worker successful updated","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")}).catch(function(){return console.warn("SW ->>> Service worker is not updated")}),console.log("%cSW ->>> Service worker is registered","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",r),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(1),console.warn("%cSW ->>> Service worker is not registered","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",e.t0);case 12:e.next=15;break;case 14:console.log("%cSW ->>> ServiceWorkers not supported","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;");case 15:case"end":return e.stop()}},e,null,[[1,9]])}));return function(t){return e.apply(this,arguments)}}()},{key:"on",value:function(e,t,r){return this.pipeService.on(e,t,r),this}},{key:"emit",value:function(e,t,r,n){return this.pipeService.emit(e,t,r,n),this}},{key:"destroy",value:function(e,t,r){return this.pipeService.destroy(e,t,r),this}},{key:"prefilter",value:function(e,t){return this.util.prefilter(e,t)}},{key:"debounce",value:function(e,t){return this.util.debounce(e,t)}},{key:"emitToUser",value:function(e,t){return this.websocketsemitter.emitToUser(e,t)}},{key:"broadcastToAppSubscribers",value:function(e,t,r){return this.websocketsemitter.broadcastToAppSubscribers(e,t,r)}},{key:"getInterpretation",value:function(e,t,r,n,i,o,u){return this.interpritate.getInterpretation(e,t,r,n,i,o,u)}},{key:"getInterpretationById",value:function(e,t,r,n,i,o){return this.interpritate.getInterpretationById(e,t,r,n,i,o)}},{key:"filter",value:function(e,t){return this.util.filter(e,t)}},{key:"mergeFilters",value:function(e,t){return this.util.mergeFilters(e,t)}},{key:"group",value:function(e,t){return this.util.group(e,t)}},{key:"getFilteredItems",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.util.getFilteredItems(e,t,r.element_app_id,r.app_id,r.item_id,r.field_group,r.search,r.search_params)}},{key:"sortItems",value:function(e,t){return this.util.sortItems(e,t)}},{key:"jsonToItems",value:function(e,t){return this.util.jsonToItems(e,t)}},{key:"getDate",value:function(e){return this.util.getDate(e)}},{key:"populateWithDate",value:function(e,t){return this.util.populateWithDate(e,t)}},{key:"checkRecurringDate",value:function(e,t){return this.util.checkRecurringDate(e,t)}},{key:"populateItems",value:function(e,t,r){return this.util.populateItems(e,t,r)}},{key:"populateWithItemRef",value:function(e,t,r,n,i,o){return this.util.populateWithItemRef(e,t,r,n,i,o)}},{key:"compareItems",value:function(e,t,r){return this.util.compareItems(e,t,r)}},{key:"mergeItems",value:function(e,t,r){return this.util.mergeItems(e,t,r)}},{key:"mergeObjects",value:function(e,t){return this.util.mergeObjects(e,t)}},{key:"makeNestedList",value:function(e,t,r,n,i){return this.util.makeNestedList(e,t,r,n,i)}},{key:"jsonConstructor",value:function(e,t,r,n){return this.util.jsonConstructor(e,t,r,n)}},{key:"getAppsList",value:function(){return this.appProcessor.getAppsList()}},{key:"getAppInfo",value:function(e){return this.appProcessor.getAppInfo(e)}},{key:"deleteApp",value:function(e){return this.appProcessor.deleteApp(e)}},{key:"getApp",value:function(e){return this.appProcessor.getApp(e)}},{key:"updateApp",value:function(e){return this.appProcessor.updateApp(e)}},{key:"updateAppInfo",value:function(e){return this.appProcessor.updateAppInfo(e)}},{key:"createNewApp",value:function(e){return this.appProcessor.createNewApp(e)}},{key:"getItems",value:function(e){return this.itemProcessor.getItems(e)}},{key:"getItem",value:function(){var e=P(b().mark(function e(t,r){var n;return b().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getItems(t);case 2:if(!(n=e.sent)){e.next=5;break}return e.abrupt("return",n.find(function(e){return e.item_id==r}));case 5:case"end":return e.stop()}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"addNewItems",value:function(e,t){return this.itemProcessor.addNewItems(e,t)}},{key:"updateItems",value:function(e,t){return this.itemProcessor.updateItems(e,t)}},{key:"deleteItems",value:function(e,t){return this.itemProcessor.deleteItems(e,t)}},{key:"restoreItems",value:function(e,t){return this.itemProcessor.restoreItems(e,t)}},{key:"getField",value:function(e,t){return this.fieldProcessor.getField(e,t)}},{key:"getFieldIdByNameSpace",value:function(e,t){return this.fieldProcessor.getFieldIdByNameSpace(e,t)}},{key:"getFieldModels",value:function(e){return this.fieldProcessor.getFieldModels(e)}},{key:"updateField",value:function(e,t){return this.fieldProcessor.updateField(e,t)}},{key:"deleteField",value:function(e,t){return this.fieldProcessor.deleteField(e,t)}},{key:"getFieldValue",value:function(e,t,r){return this.fieldProcessor.getFieldValue(e,t,r)}},{key:"setFieldValue",value:function(e,t,r,n){return this.fieldProcessor.setFieldValue(e,t,r,n)}},{key:"getFile",value:function(e,t){return this.fileManager.getFile(e,t)}},{key:"getFiles",value:function(e,t){return this.fileManager.getFiles(e,t)}},{key:"uploadFile",value:function(e,t,r){return this.fileManager.uploadFile(e,t,r)}},{key:"uploadFileFromString",value:function(e,t,r,n,i,o,u){return this.fileManager.uploadFileFromString(e,t,r,n,i,o,u)}},{key:"updateFileFromString",value:function(e,t,r,n,i,o,u){return this.fileManager.updateFileFromString(e,t,r,n,i,o,u)}},{key:"deleteFile",value:function(e,t){return this.fileManager.deleteFile(e,t)}},{key:"duplicateFile",value:function(e){return this.fileManager.duplicateFile(e)}},{key:"downloadFileFromString",value:function(e,t){return this.fileManager.downloadFileFromString(e,t)}},{key:"createDocument",value:function(e){return this.documentManager.createDocument(e)}},{key:"getDocument",value:function(e){return this.documentManager.getDocument(e)}},{key:"getDocuments",value:function(e){return this.documentManager.getDocuments(e)}},{key:"deleteDocument",value:function(e){return this.documentManager.deleteDocument(e)}},{key:"login",value:function(e){return this.auth.login(e)}},{key:"loginWithToken",value:function(e){return this.auth.loginWithToken(e)}},{key:"logout",value:function(e){return this.appProcessor.clearAppProcessor(),this.auth.logout(e)}},{key:"signup",value:function(e){return this.auth.signup(e)}},{key:"getUsersList",value:function(e){return this.auth.getUsersList(e)}},{key:"updateToken",value:function(e){return this.auth.updateToken(e)}},{key:"avatarUploadApi",value:function(e){return this.auth.avatarUploadApi(e)}},{key:"getVersion",value:function(){return this.auth.getVersion()}},{key:"getUserById",value:function(e){return this.auth.getUserById(e)}},{key:"getToken",value:function(){return this.auth.getToken()}},{key:"updateUser",value:function(e){return this.auth.updateUser(e)}},{key:"updateAvatar",value:function(e){return this.auth.updateAvatar(e)}}])}();
291
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GudHub=void 0;var e=require("./gudhub-https-service.js"),t=require("./PipeService/PipeService.js"),r=require("./Storage/Storage.js"),i=require("./WebSocket/WebSocket.js"),n=require("./config.js"),o=require("./Utils/Utils.js"),u=require("./Auth/Auth.js"),s=require("./GHConstructor/ghconstructor.js"),a=require("./AppProcessor/AppProcessor.js"),c=require("./ItemProcessor/ItemProcessor.js"),l=require("./FieldProcessor/FieldProcessor.js"),p=require("./FileManager/FileManager.js"),h=require("./ChunksManager/ChunksManager.js"),f=require("./DocumentManager/DocumentManager.js"),d=require("./GHConstructor/interpritate.js"),v=require("./consts.js"),g=require("./WebSocket/WebsocketHandler.js"),y=require("./Utils/sharing/GroupSharing.js"),k=require("./Utils/sharing/Sharing.js"),m=require("./WebSocket/WebSocketEmitter.js");function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(){var e,t,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",n=r.toStringTag||"@@toStringTag";function o(r,i,n,o){var a=i&&i.prototype instanceof s?i:s,c=Object.create(a.prototype);return w(c,"_invoke",function(r,i,n){var o,s,a,c=0,l=n||[],p=!1,h={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,r){return o=t,s=0,a=e,h.n=r,u}};function f(r,i){for(s=r,a=i,t=0;!p&&c&&!n&&t<l.length;t++){var n,o=l[t],f=h.p,d=o[2];r>3?(n=d===i)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=f&&((n=r<2&&f<o[1])?(s=0,h.v=i,h.n=o[1]):f<d&&(n=r<3||o[0]>i||i>d)&&(o[4]=r,o[5]=i,h.n=d,s=0))}if(n||r>1)return u;throw p=!0,i}return function(n,l,d){if(c>1)throw TypeError("Generator is already running");for(p&&1===l&&f(l,d),s=l,a=d;(t=s<2?e:a)||!p;){o||(s?s<3?(s>1&&(h.n=-1),f(s,a)):h.n=a:h.v=a);try{if(c=2,o){if(s||(n="next"),t=o[n]){if(!(t=t.call(o,a)))throw TypeError("iterator result is not an object");if(!t.done)return t;a=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+n+"' method"),s=1);o=e}else if((t=(p=h.n<0)?a:r.call(i,h))!==u)break}catch(t){o=e,s=1,a=t}finally{c=1}}return{value:t,done:p}}}(r,n,o),!0),c}var u={};function s(){}function a(){}function c(){}t=Object.getPrototypeOf;var l=[][i]?t(t([][i]())):(w(t={},i,function(){return this}),t),p=c.prototype=s.prototype=Object.create(l);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,w(e,n,"GeneratorFunction")),e.prototype=Object.create(p),e}return a.prototype=c,w(p,"constructor",c),w(c,"constructor",a),a.displayName="GeneratorFunction",w(c,n,"GeneratorFunction"),w(p),w(p,n,"Generator"),w(p,i,function(){return this}),w(p,"toString",function(){return"[object Generator]"}),(S=function(){return{w:o,m:h}})()}function w(e,t,r,i){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}(w=function(e,t,r,i){if(t)n?n(e,t,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[t]=r;else{var o=function(t,r){w(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}})(e,t,r,i)}function P(e,t,r,i,n,o,u){try{var s=e[o](u),a=s.value}catch(e){return void r(e)}s.done?t(a):Promise.resolve(a).then(i,n)}function F(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var o=e.apply(t,r);function u(e){P(o,i,n,u,s,"next",e)}function s(e){P(o,i,n,u,s,"throw",e)}u(void 0)})}}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,W(i.key),i)}}function j(e,t,r){return t&&_(e.prototype,t),r&&_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function W(e){var t=q(e,"string");return"symbol"==b(t)?t:t+""}function q(e,t){if("object"!=b(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=b(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var A=exports.GudHub=function(){return j(function v(b){var S=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{server_url:n.server_url,wss_url:n.wss_url,node_server_url:n.node_server_url,initWebsocket:!1,activateSW:!1,swLink:"",async_modules_path:n.async_modules_path,file_server_url:n.file_server_url,automation_modules_path:n.automation_modules_path,accesstoken:this.accesstoken,expirydate:this.expirydate};I(this,v),this.config=S,this.ghconstructor=new s.GHConstructor(this),this.interpritate=new d.Interpritate(this),this.pipeService=new t.PipeService,this.storage=new r.Storage(S.async_modules_path,S.file_server_url,S.automation_modules_path),this.util=new o.Utils(this),this.req=new e.GudHubHttpsService(S.server_url),this.auth=new u.Auth(this.req,this.storage),this.sharing=new k.Sharing(this,this.req),this.groupSharing=new y.GroupSharing(this,this.req,this.pipeService),b?this.storage.setUser({auth_key:b}):S.accesstoken&&S.expirydate&&this.storage.setUser({accesstoken:S.accesstoken,expirydate:S.expirydate}),this.req.init(this.auth.getToken.bind(this.auth)),this.ws=new i.WebSocketApi(S.wss_url,this.auth),this.chunksManager=new h.ChunksManager(this.storage,this.pipeService,this.req,this.util),this.appProcessor=new a.AppProcessor(this.storage,this.pipeService,this.req,this.ws,this.chunksManager,this.util,S.activateSW),this.itemProcessor=new c.ItemProcessor(this.storage,this.pipeService,this.req,this.appProcessor,this.util),this.fieldProcessor=new l.FieldProcessor(this.storage,this.req,this.appProcessor,this.itemProcessor,this.pipeService),this.fileManager=new p.FileManager(this.storage,this.pipeService,this.req,this.appProcessor),this.documentManager=new f.DocumentManager(this.req,this.pipeService),this.websocketsemitter=new m.WebSocketEmitter(this),S.initWebsocket&&this.ws.initWebSocket(g.WebsocketHandler.bind(this,this),this.appProcessor.refreshApps.bind(this.appProcessor));S.activateSW&&this.activateSW(S.swLink)},[{key:"activateSW",value:function(){var e=F(S().m(function e(t){var r,i;return S().w(function(e){for(;;)switch(e.n){case 0:if(!(v.IS_WEB&&"serviceWorker"in window.navigator)){e.n=5;break}return e.p=1,e.n=2,window.navigator.serviceWorker.register(t);case 2:(r=e.v).update().then(function(){return console.log("%cSW ->>> Service worker successful updated","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;")}).catch(function(){return console.warn("SW ->>> Service worker is not updated")}),console.log("%cSW ->>> Service worker is registered","display: inline-block ; background-color: #689f38 ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",r),e.n=4;break;case 3:e.p=3,i=e.v,console.warn("%cSW ->>> Service worker is not registered","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;",i);case 4:e.n=6;break;case 5:console.log("%cSW ->>> ServiceWorkers not supported","display: inline-block ; background-color: #d32f2f ; color: #ffffff ; font-weight: bold ; padding: 3px 7px; border-radius: 3px;");case 6:return e.a(2)}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}()},{key:"on",value:function(e,t,r){return this.pipeService.on(e,t,r),this}},{key:"emit",value:function(e,t,r,i){return this.pipeService.emit(e,t,r,i),this}},{key:"destroy",value:function(e,t,r){return this.pipeService.destroy(e,t,r),this}},{key:"prefilter",value:function(e,t){return this.util.prefilter(e,t)}},{key:"debounce",value:function(e,t){return this.util.debounce(e,t)}},{key:"emitToUser",value:function(e,t){return this.websocketsemitter.emitToUser(e,t)}},{key:"broadcastToAppSubscribers",value:function(e,t,r){return this.websocketsemitter.broadcastToAppSubscribers(e,t,r)}},{key:"getInterpretation",value:function(e,t,r,i,n,o,u){return this.interpritate.getInterpretation(e,t,r,i,n,o,u)}},{key:"getInterpretationById",value:function(e,t,r,i,n,o){return this.interpritate.getInterpretationById(e,t,r,i,n,o)}},{key:"filter",value:function(e,t){return this.util.filter(e,t)}},{key:"mergeFilters",value:function(e,t){return this.util.mergeFilters(e,t)}},{key:"group",value:function(e,t){return this.util.group(e,t)}},{key:"getFilteredItems",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.util.getFilteredItems(e,t,r.element_app_id,r.app_id,r.item_id,r.field_group,r.search,r.search_params)}},{key:"sortItems",value:function(e,t){return this.util.sortItems(e,t)}},{key:"jsonToItems",value:function(e,t){return this.util.jsonToItems(e,t)}},{key:"getDate",value:function(e){return this.util.getDate(e)}},{key:"populateWithDate",value:function(e,t){return this.util.populateWithDate(e,t)}},{key:"checkRecurringDate",value:function(e,t){return this.util.checkRecurringDate(e,t)}},{key:"populateItems",value:function(e,t,r){return this.util.populateItems(e,t,r)}},{key:"populateWithItemRef",value:function(e,t,r,i,n,o){return this.util.populateWithItemRef(e,t,r,i,n,o)}},{key:"compareItems",value:function(e,t,r){return this.util.compareItems(e,t,r)}},{key:"mergeItems",value:function(e,t,r){return this.util.mergeItems(e,t,r)}},{key:"mergeObjects",value:function(e,t){return this.util.mergeObjects(e,t)}},{key:"makeNestedList",value:function(e,t,r,i,n){return this.util.makeNestedList(e,t,r,i,n)}},{key:"jsonConstructor",value:function(e,t,r,i){return this.util.jsonConstructor(e,t,r,i)}},{key:"getAppsList",value:function(){return this.appProcessor.getAppsList()}},{key:"getAppInfo",value:function(e){return this.appProcessor.getAppInfo(e)}},{key:"deleteApp",value:function(e){return this.appProcessor.deleteApp(e)}},{key:"getApp",value:function(e){return this.appProcessor.getApp(e)}},{key:"updateApp",value:function(e){return this.appProcessor.updateApp(e)}},{key:"updateAppInfo",value:function(e){return this.appProcessor.updateAppInfo(e)}},{key:"createNewApp",value:function(e){return this.appProcessor.createNewApp(e)}},{key:"getItems",value:function(e){return this.itemProcessor.getItems(e)}},{key:"getItem",value:function(){var e=F(S().m(function e(t,r){var i;return S().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getItems(t);case 1:if(!(i=e.v)){e.n=2;break}return e.a(2,i.find(function(e){return e.item_id==r}));case 2:return e.a(2)}},e,this)}));return function(t,r){return e.apply(this,arguments)}}()},{key:"addNewItems",value:function(e,t){return this.itemProcessor.addNewItems(e,t)}},{key:"updateItems",value:function(e,t){return this.itemProcessor.updateItems(e,t)}},{key:"deleteItems",value:function(e,t){return this.itemProcessor.deleteItems(e,t)}},{key:"restoreItems",value:function(e,t){return this.itemProcessor.restoreItems(e,t)}},{key:"getField",value:function(e,t){return this.fieldProcessor.getField(e,t)}},{key:"getFieldIdByNameSpace",value:function(e,t){return this.fieldProcessor.getFieldIdByNameSpace(e,t)}},{key:"getFieldModels",value:function(e){return this.fieldProcessor.getFieldModels(e)}},{key:"updateField",value:function(e,t){return this.fieldProcessor.updateField(e,t)}},{key:"deleteField",value:function(e,t){return this.fieldProcessor.deleteField(e,t)}},{key:"getFieldValue",value:function(e,t,r){return this.fieldProcessor.getFieldValue(e,t,r)}},{key:"setFieldValue",value:function(e,t,r,i){return this.fieldProcessor.setFieldValue(e,t,r,i)}},{key:"getFile",value:function(e,t){return this.fileManager.getFile(e,t)}},{key:"getFiles",value:function(e,t){return this.fileManager.getFiles(e,t)}},{key:"uploadFile",value:function(e,t,r){return this.fileManager.uploadFile(e,t,r)}},{key:"uploadFileFromString",value:function(e,t,r,i,n,o,u){return this.fileManager.uploadFileFromString(e,t,r,i,n,o,u)}},{key:"updateFileFromString",value:function(e,t,r,i,n,o,u){return this.fileManager.updateFileFromString(e,t,r,i,n,o,u)}},{key:"deleteFile",value:function(e,t){return this.fileManager.deleteFile(e,t)}},{key:"duplicateFile",value:function(e){return this.fileManager.duplicateFile(e)}},{key:"downloadFileFromString",value:function(e,t){return this.fileManager.downloadFileFromString(e,t)}},{key:"createDocument",value:function(e){return this.documentManager.createDocument(e)}},{key:"getDocument",value:function(e){return this.documentManager.getDocument(e)}},{key:"getDocuments",value:function(e){return this.documentManager.getDocuments(e)}},{key:"deleteDocument",value:function(e){return this.documentManager.deleteDocument(e)}},{key:"login",value:function(e){return this.auth.login(e)}},{key:"loginWithToken",value:function(e){return this.auth.loginWithToken(e)}},{key:"logout",value:function(e){return this.appProcessor.clearAppProcessor(),this.auth.logout(e)}},{key:"signup",value:function(e){return this.auth.signup(e)}},{key:"getUsersList",value:function(e){return this.auth.getUsersList(e)}},{key:"updateToken",value:function(e){return this.auth.updateToken(e)}},{key:"avatarUploadApi",value:function(e){return this.auth.avatarUploadApi(e)}},{key:"getVersion",value:function(){return this.auth.getVersion()}},{key:"getUserById",value:function(e){return this.auth.getUserById(e)}},{key:"getToken",value:function(){return this.auth.getToken()}},{key:"updateUser",value:function(e){return this.auth.updateUser(e)}},{key:"updateAvatar",value:function(e){return this.auth.updateAvatar(e)}}])}();
282
292
  },{"./gudhub-https-service.js":"hDvy","./PipeService/PipeService.js":"E3xI","./Storage/Storage.js":"CSHe","./WebSocket/WebSocket.js":"pHMV","./config.js":"TPH7","./Utils/Utils.js":"mWlG","./Auth/Auth.js":"rK64","./GHConstructor/ghconstructor.js":"Htuh","./AppProcessor/AppProcessor.js":"q0my","./ItemProcessor/ItemProcessor.js":"UUd3","./FieldProcessor/FieldProcessor.js":"PoPF","./FileManager/FileManager.js":"XUT2","./ChunksManager/ChunksManager.js":"KHGc","./DocumentManager/DocumentManager.js":"K1Gs","./GHConstructor/interpritate.js":"X4Dt","./consts.js":"UV2u","./WebSocket/WebsocketHandler.js":"sPce","./Utils/sharing/GroupSharing.js":"LS0j","./Utils/sharing/Sharing.js":"XaHW","./WebSocket/WebSocketEmitter.js":"quyV"}],"iRRN":[function(require,module,exports) {
283
293
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"GudHub",{enumerable:!0,get:function(){return e.GudHub}}),exports.default=void 0,require("regenerator-runtime/runtime.js");var e=require("./GUDHUB/gudhub.js"),r=exports.default=e.GudHub;
284
294
  },{"regenerator-runtime/runtime.js":"KA2S","./GUDHUB/gudhub.js":"U9gy"}]},{},["iRRN"], "GudHubLibrary")