@gudhub/core 1.1.115 → 1.1.117
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.
package/umd/library.min.js
CHANGED
|
@@ -77,7 +77,7 @@ var e=require("buffer").Buffer;Object.defineProperty(exports,"__esModule",{value
|
|
|
77
77
|
},{"./speedometer.js":"muTE","./throttle.js":"TLiy","../utils.js":"Feqj"}],"Rpqp":[function(require,module,exports) {
|
|
78
78
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=t(require("../platform/index.js"));function t(e){return e&&e.__esModule?e:{default:e}}var r=exports.default=e.default.hasStandardBrowserEnv?((t,r)=>o=>(o=new URL(o,e.default.origin),t.protocol===o.protocol&&t.host===o.host&&(r||t.port===o.port)))(new URL(e.default.origin),e.default.navigator&&/(msie|trident)/i.test(e.default.navigator.userAgent)):()=>!0;
|
|
79
79
|
},{"../platform/index.js":"VfMV"}],"MLCl":[function(require,module,exports) {
|
|
80
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./../utils.js")),t=r(require("../platform/index.js"));function r(e){return e&&e.__esModule?e:{default:e}}var
|
|
80
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=r(require("./../utils.js")),t=r(require("../platform/index.js"));function r(e){return e&&e.__esModule?e:{default:e}}var n=exports.default=t.default.hasStandardBrowserEnv?{write(t,r,n,u,o,i,d){if("undefined"==typeof document)return;const s=[`${t}=${encodeURIComponent(r)}`];e.default.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),e.default.isString(u)&&s.push(`path=${u}`),e.default.isString(o)&&s.push(`domain=${o}`),!0===i&&s.push("secure"),e.default.isString(d)&&s.push(`SameSite=${d}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};
|
|
81
81
|
},{"./../utils.js":"Feqj","../platform/index.js":"VfMV"}],"R56a":[function(require,module,exports) {
|
|
82
82
|
"use strict";function e(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
83
83
|
},{}],"uRyQ":[function(require,module,exports) {
|
|
@@ -95,13 +95,13 @@ var e=require("buffer").Buffer;Object.defineProperty(exports,"__esModule",{value
|
|
|
95
95
|
},{"../cancel/CanceledError.js":"lyDU","../core/AxiosError.js":"Cb9L","../utils.js":"Feqj"}],"p8fg":[function(require,module,exports) {
|
|
96
96
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.trackStream=exports.streamChunk=exports.readBytes=void 0;const e=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,a=0;for(;a<r;)n=a+t,yield e.slice(a,n),a=n};exports.streamChunk=e;const t=async function*(t,n){for await(const a of r(t))yield*e(a,n)};exports.readBytes=t;const r=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},n=(e,r,n,a)=>{const o=t(e,r);let s,c=0,i=e=>{s||(s=!0,a&&a(e))};return new ReadableStream({async pull(e){try{const{done:r,value:a}=await o.next();if(r)return i(),void e.close();let s=a.byteLength;if(n){let e=c+=s;n(e)}e.enqueue(new Uint8Array(a))}catch(t){throw i(t),t}},cancel:e=>(i(e),o.return())},{highWaterMark:2})};exports.trackStream=n;
|
|
97
97
|
},{}],"Afwx":[function(require,module,exports) {
|
|
98
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFetch=exports.default=void 0;var e=i(require("../platform/index.js")),t=i(require("../utils.js")),r=i(require("../core/AxiosError.js")),s=i(require("../helpers/composeSignals.js")),a=require("../helpers/trackStream.js"),o=i(require("../core/AxiosHeaders.js")),n=require("../helpers/progressEventReducer.js"),u=i(require("../helpers/resolveConfig.js")),l=i(require("../core/settle.js"));function i(e){return e&&e.__esModule?e:{default:e}}const d=65536,{isFunction:f}=t.default,c=(({Request:e,Response:t})=>({Request:e,Response:t}))(t.default.global),{ReadableStream:p,TextEncoder:h}=t.default.global,g=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},y=i=>{i=t.default.merge.call({skipUndefined:!0},c,i);const{fetch:d,Request:y,Response:m}=i,w=d?f(d):"function"==typeof fetch,b=f(y),R=f(m);if(!w)return!1;const x=w&&f(p),S=w&&("function"==typeof h?(e=>t=>e.encode(t))(new h):async e=>new Uint8Array(await new y(e).arrayBuffer())),T=b&&x&&g(()=>{let t=!1;const r=new y(e.default.origin,{body:new p,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!r}),q=R&&x&&g(()=>t.default.isReadableStream(new m("").body)),v={stream:q&&(e=>e.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!v[e]&&(v[e]=((t,s)=>{let a=t&&t[e];if(a)return a.call(t);throw new r.default(`Response type '${e}' is not supported`,r.default.ERR_NOT_SUPPORT,s)}))});const E=async(r,s)=>{const a=t.default.toFiniteNumber(r.getContentLength());return null==a?(async r=>{if(null==r)return 0;if(t.default.isBlob(r))return r.size;if(t.default.isSpecCompliantForm(r)){const t=new y(e.default.origin,{method:"POST",body:r});return(await t.arrayBuffer()).byteLength}return t.default.isArrayBufferView(r)||t.default.isArrayBuffer(r)?r.byteLength:(t.default.isURLSearchParams(r)&&(r+=""),t.default.isString(r)?(await S(r)).byteLength:void 0)})(s):a};return async e=>{let{url:i,method:f,data:c,signal:p,cancelToken:h,timeout:g,onDownloadProgress:w,onUploadProgress:R,responseType:x,headers:S,withCredentials:j="same-origin",fetchOptions:O}=(0,u.default)(e),P=d||fetch;x=x?(x+"").toLowerCase():"text";let C=(0,s.default)([p,h&&h.toAbortSignal()],g),D=null;const F=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let L;try{if(R&&T&&"get"!==f&&"head"!==f&&0!==(L=await E(S,c))){let e,r=new y(i,{method:"POST",body:c,duplex:"half"});if(t.default.isFormData(c)&&(e=r.headers.get("content-type"))&&S.setContentType(e),r.body){const[e,t]=(0,n.progressEventDecorator)(L,(0,n.progressEventReducer)((0,n.asyncDecorator)(R)));c=(0,a.trackStream)(r.body,65536,e,t)}}t.default.isString(j)||(j=j?"include":"omit");const s=b&&"credentials"in y.prototype,u={...O,signal:C,method:f.toUpperCase(),headers:S.normalize().toJSON(),body:c,duplex:"half",credentials:s?j:void 0};D=b&&new y(i,u);let d=await(b?P(D,O):P(i,u));const p=q&&("stream"===x||"response"===x);if(q&&(w||p&&F)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=d[t]});const r=t.default.toFiniteNumber(d.headers.get("content-length")),[s,o]=w&&(0,n.progressEventDecorator)(r,(0,n.progressEventReducer)((0,n.asyncDecorator)(w),!0))||[];d=new m((0,a.trackStream)(d.body,65536,s,()=>{o&&o(),F&&F()}),e)}x=x||"text";let h=await v[t.default.findKey(v,x)||"text"](d,e);return!p&&F&&F(),await new Promise((t,r)=>{(0,l.default)(t,r,{data:h,headers:o.default.from(d.headers),status:d.status,statusText:d.statusText,config:e,request:D})})}catch(_){if(F&&F(),_&&"TypeError"===_.name&&/Load failed|fetch/i.test(_.message))throw Object.assign(new r.default("Network Error",r.default.ERR_NETWORK,e,D),{cause:_.cause||_});throw r.default.from(_,_&&_.code,e,D)}}},m=new Map,w=e=>{let t=e
|
|
98
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFetch=exports.default=void 0;var e=i(require("../platform/index.js")),t=i(require("../utils.js")),r=i(require("../core/AxiosError.js")),s=i(require("../helpers/composeSignals.js")),a=require("../helpers/trackStream.js"),o=i(require("../core/AxiosHeaders.js")),n=require("../helpers/progressEventReducer.js"),u=i(require("../helpers/resolveConfig.js")),l=i(require("../core/settle.js"));function i(e){return e&&e.__esModule?e:{default:e}}const d=65536,{isFunction:f}=t.default,c=(({Request:e,Response:t})=>({Request:e,Response:t}))(t.default.global),{ReadableStream:p,TextEncoder:h}=t.default.global,g=(e,...t)=>{try{return!!e(...t)}catch(r){return!1}},y=i=>{i=t.default.merge.call({skipUndefined:!0},c,i);const{fetch:d,Request:y,Response:m}=i,w=d?f(d):"function"==typeof fetch,b=f(y),R=f(m);if(!w)return!1;const x=w&&f(p),S=w&&("function"==typeof h?(e=>t=>e.encode(t))(new h):async e=>new Uint8Array(await new y(e).arrayBuffer())),T=b&&x&&g(()=>{let t=!1;const r=new y(e.default.origin,{body:new p,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!r}),q=R&&x&&g(()=>t.default.isReadableStream(new m("").body)),v={stream:q&&(e=>e.body)};w&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!v[e]&&(v[e]=((t,s)=>{let a=t&&t[e];if(a)return a.call(t);throw new r.default(`Response type '${e}' is not supported`,r.default.ERR_NOT_SUPPORT,s)}))});const E=async(r,s)=>{const a=t.default.toFiniteNumber(r.getContentLength());return null==a?(async r=>{if(null==r)return 0;if(t.default.isBlob(r))return r.size;if(t.default.isSpecCompliantForm(r)){const t=new y(e.default.origin,{method:"POST",body:r});return(await t.arrayBuffer()).byteLength}return t.default.isArrayBufferView(r)||t.default.isArrayBuffer(r)?r.byteLength:(t.default.isURLSearchParams(r)&&(r+=""),t.default.isString(r)?(await S(r)).byteLength:void 0)})(s):a};return async e=>{let{url:i,method:f,data:c,signal:p,cancelToken:h,timeout:g,onDownloadProgress:w,onUploadProgress:R,responseType:x,headers:S,withCredentials:j="same-origin",fetchOptions:O}=(0,u.default)(e),P=d||fetch;x=x?(x+"").toLowerCase():"text";let C=(0,s.default)([p,h&&h.toAbortSignal()],g),D=null;const F=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let L;try{if(R&&T&&"get"!==f&&"head"!==f&&0!==(L=await E(S,c))){let e,r=new y(i,{method:"POST",body:c,duplex:"half"});if(t.default.isFormData(c)&&(e=r.headers.get("content-type"))&&S.setContentType(e),r.body){const[e,t]=(0,n.progressEventDecorator)(L,(0,n.progressEventReducer)((0,n.asyncDecorator)(R)));c=(0,a.trackStream)(r.body,65536,e,t)}}t.default.isString(j)||(j=j?"include":"omit");const s=b&&"credentials"in y.prototype,u={...O,signal:C,method:f.toUpperCase(),headers:S.normalize().toJSON(),body:c,duplex:"half",credentials:s?j:void 0};D=b&&new y(i,u);let d=await(b?P(D,O):P(i,u));const p=q&&("stream"===x||"response"===x);if(q&&(w||p&&F)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=d[t]});const r=t.default.toFiniteNumber(d.headers.get("content-length")),[s,o]=w&&(0,n.progressEventDecorator)(r,(0,n.progressEventReducer)((0,n.asyncDecorator)(w),!0))||[];d=new m((0,a.trackStream)(d.body,65536,s,()=>{o&&o(),F&&F()}),e)}x=x||"text";let h=await v[t.default.findKey(v,x)||"text"](d,e);return!p&&F&&F(),await new Promise((t,r)=>{(0,l.default)(t,r,{data:h,headers:o.default.from(d.headers),status:d.status,statusText:d.statusText,config:e,request:D})})}catch(_){if(F&&F(),_&&"TypeError"===_.name&&/Load failed|fetch/i.test(_.message))throw Object.assign(new r.default("Network Error",r.default.ERR_NETWORK,e,D),{cause:_.cause||_});throw r.default.from(_,_&&_.code,e,D)}}},m=new Map,w=e=>{let t=e&&e.env||{};const{fetch:r,Request:s,Response:a}=t,o=[s,a,r];let n,u,l=o.length,i=m;for(;l--;)n=o[l],void 0===(u=i.get(n))&&i.set(n,u=l?new Map:y(t)),i=u;return u};exports.getFetch=w;const b=w();var R=exports.default=b;
|
|
99
99
|
},{"../platform/index.js":"VfMV","../utils.js":"Feqj","../core/AxiosError.js":"Cb9L","../helpers/composeSignals.js":"T6jO","../helpers/trackStream.js":"p8fg","../core/AxiosHeaders.js":"sDZl","../helpers/progressEventReducer.js":"hEyL","../helpers/resolveConfig.js":"qSXR","../core/settle.js":"Ztkp"}],"aHrQ":[function(require,module,exports) {
|
|
100
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("../utils.js")),t=i(require("./http.js")),r=i(require("./xhr.js")),n=o(require("./fetch.js")),a=i(require("../core/AxiosError.js"));function o(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var a,o,i={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return i;if(a=t?n:r){if(a.has(e))return a.get(e);a.set(e,i)}for(const r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((o=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,r))&&(o.get||o.set)?a(i,r,o):i[r]=e[r]);return i})(e,t)}function i(e){return e&&e.__esModule?e:{default:e}}const u={http:t.default,xhr:r.default,fetch:{get:n.getFetch}};e.default.forEach(u,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const s=e=>`- ${e}`,f=t=>e.default.isFunction(t)||null===t||!1===t;
|
|
100
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=i(require("../utils.js")),t=i(require("./http.js")),r=i(require("./xhr.js")),n=o(require("./fetch.js")),a=i(require("../core/AxiosError.js"));function o(e,t){if("function"==typeof WeakMap)var r=new WeakMap,n=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var a,o,i={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return i;if(a=t?n:r){if(a.has(e))return a.get(e);a.set(e,i)}for(const r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((o=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,r))&&(o.get||o.set)?a(i,r,o):i[r]=e[r]);return i})(e,t)}function i(e){return e&&e.__esModule?e:{default:e}}const u={http:t.default,xhr:r.default,fetch:{get:n.getFetch}};e.default.forEach(u,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(r){}Object.defineProperty(e,"adapterName",{value:t})}});const s=e=>`- ${e}`,f=t=>e.default.isFunction(t)||null===t||!1===t;function l(t,r){t=e.default.isArray(t)?t:[t];const{length:n}=t;let o,i;const l={};for(let s=0;s<n;s++){let n;if(i=o=t[s],!f(o)&&void 0===(i=u[(n=String(o)).toLowerCase()]))throw new a.default(`Unknown adapter '${n}'`);if(i&&(e.default.isFunction(i)||(i=i.get(r))))break;l[n||"#"+s]=i}if(!i){const e=Object.entries(l).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(s).join("\n"):" "+s(e[0]):"as no adapter specified";throw new a.default("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return i}var c=exports.default={getAdapter:l,adapters:u};
|
|
101
101
|
},{"../utils.js":"Feqj","./http.js":"zNfz","./xhr.js":"akUF","./fetch.js":"Afwx","../core/AxiosError.js":"Cb9L"}],"HALK":[function(require,module,exports) {
|
|
102
102
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=u;var e=d(require("./transformData.js")),r=d(require("../cancel/isCancel.js")),a=d(require("../defaults/index.js")),t=d(require("../cancel/CanceledError.js")),s=d(require("../core/AxiosHeaders.js")),n=d(require("../adapters/adapters.js"));function d(e){return e&&e.__esModule?e:{default:e}}function o(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new t.default(null,e)}function u(t){return o(t),t.headers=s.default.from(t.headers),t.data=e.default.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),n.default.getAdapter(t.adapter||a.default.adapter,t)(t).then(function(r){return o(t),r.data=e.default.call(t,t.transformResponse,r),r.headers=s.default.from(r.headers),r},function(a){return(0,r.default)(a)||(o(t),a&&a.response&&(a.response.data=e.default.call(t,t.transformResponse,a.response),a.response.headers=s.default.from(a.response.headers))),Promise.reject(a)})}
|
|
103
103
|
},{"./transformData.js":"IAOH","../cancel/isCancel.js":"mXc0","../defaults/index.js":"r0tr","../cancel/CanceledError.js":"lyDU","../core/AxiosHeaders.js":"sDZl","../adapters/adapters.js":"aHrQ"}],"xOzr":[function(require,module,exports) {
|
|
104
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VERSION=void 0;const e=exports.VERSION="1.
|
|
104
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.VERSION=void 0;const e=exports.VERSION="1.13.2";
|
|
105
105
|
},{}],"bSmC":[function(require,module,exports) {
|
|
106
106
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("../env/data.js"),t=n(require("../core/AxiosError.js"));function n(e){return e&&e.__esModule?e:{default:e}}const o={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const r={};function i(e,n,o){if("object"!=typeof e)throw new t.default("options must be an object",t.default.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],a=n[s];if(a){const n=e[s],o=void 0===n||a(n,s,e);if(!0!==o)throw new t.default("option "+s+" must be "+o,t.default.ERR_BAD_OPTION_VALUE)}else if(!0!==o)throw new t.default("Unknown option "+s,t.default.ERR_BAD_OPTION)}}o.transitional=function(n,o,i){function s(t,n){return"[Axios v"+e.VERSION+"] Transitional option '"+t+"'"+n+(i?". "+i:"")}return(e,i,a)=>{if(!1===n)throw new t.default(s(i," has been removed"+(o?" in "+o:"")),t.default.ERR_DEPRECATED);return o&&!r[i]&&(r[i]=!0,console.warn(s(i," has been deprecated since v"+o+" and will be removed in the near future"))),!n||n(e,i,a)}},o.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var s=exports.default={assertOptions:i,validators:o};
|
|
107
107
|
},{"../env/data.js":"xOzr","../core/AxiosError.js":"Cb9L"}],"trUU":[function(require,module,exports) {
|
|
@@ -113,7 +113,7 @@ var e=require("buffer").Buffer;Object.defineProperty(exports,"__esModule",{value
|
|
|
113
113
|
},{}],"FbOI":[function(require,module,exports) {
|
|
114
114
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=t;var e=r(require("./../utils.js"));function r(e){return e&&e.__esModule?e:{default:e}}function t(r){return e.default.isObject(r)&&!0===r.isAxiosError}
|
|
115
115
|
},{"./../utils.js":"Feqj"}],"Qnwc":[function(require,module,exports) {
|
|
116
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const e={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(e).forEach(([t,o])=>{e[o]=t});var t=exports.default=e;
|
|
116
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;const e={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(e).forEach(([t,o])=>{e[o]=t});var t=exports.default=e;
|
|
117
117
|
},{}],"Wzmt":[function(require,module,exports) {
|
|
118
118
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=C(require("./utils.js")),r=C(require("./helpers/bind.js")),t=C(require("./core/Axios.js")),a=C(require("./core/mergeConfig.js")),u=C(require("./defaults/index.js")),s=C(require("./helpers/formDataToJSON.js")),l=C(require("./cancel/CanceledError.js")),o=C(require("./cancel/CancelToken.js")),d=C(require("./cancel/isCancel.js")),i=require("./env/data.js"),n=C(require("./helpers/toFormData.js")),f=C(require("./core/AxiosError.js")),c=C(require("./helpers/spread.js")),p=C(require("./helpers/isAxiosError.js")),j=C(require("./core/AxiosHeaders.js")),q=C(require("./adapters/adapters.js")),x=C(require("./helpers/HttpStatusCode.js"));function C(e){return e&&e.__esModule?e:{default:e}}function A(u){const s=new t.default(u),l=(0,r.default)(t.default.prototype.request,s);return e.default.extend(l,t.default.prototype,s,{allOwnKeys:!0}),e.default.extend(l,s,null,{allOwnKeys:!0}),l.create=function(e){return A((0,a.default)(u,e))},l}const m=A(u.default);m.Axios=t.default,m.CanceledError=l.default,m.CancelToken=o.default,m.isCancel=d.default,m.VERSION=i.VERSION,m.toFormData=n.default,m.AxiosError=f.default,m.Cancel=m.CanceledError,m.all=function(e){return Promise.all(e)},m.spread=c.default,m.isAxiosError=p.default,m.mergeConfig=a.default,m.AxiosHeaders=j.default,m.formToJSON=(r=>(0,s.default)(e.default.isHTMLForm(r)?new FormData(r):r)),m.getAdapter=q.default.getAdapter,m.HttpStatusCode=x.default,m.default=m;var E=exports.default=m;
|
|
119
119
|
},{"./utils.js":"Feqj","./helpers/bind.js":"hRTX","./core/Axios.js":"trUU","./core/mergeConfig.js":"fBI1","./defaults/index.js":"r0tr","./helpers/formDataToJSON.js":"NTPf","./cancel/CanceledError.js":"lyDU","./cancel/CancelToken.js":"VgQU","./cancel/isCancel.js":"mXc0","./env/data.js":"xOzr","./helpers/toFormData.js":"wxxD","./core/AxiosError.js":"Cb9L","./helpers/spread.js":"yisB","./helpers/isAxiosError.js":"FbOI","./core/AxiosHeaders.js":"sDZl","./adapters/adapters.js":"aHrQ","./helpers/HttpStatusCode.js":"Qnwc"}],"O4Aa":[function(require,module,exports) {
|
|
@@ -206,31 +206,31 @@ var t=arguments[3],e="function"==typeof Map&&Map.prototype,r=Object.getOwnProper
|
|
|
206
206
|
},{"es-errors/type":"aoYB","object-inspect":"nksM","side-channel-list":"XSCy","side-channel-map":"A2ko","side-channel-weakmap":"oj0J"}],"XaX2":[function(require,module,exports) {
|
|
207
207
|
"use strict";var t=String.prototype.replace,r=/%20/g,C={RFC1738:"RFC1738",RFC3986:"RFC3986"};module.exports={default:C.RFC3986,formatters:{RFC1738:function(C){return t.call(C,r,"+")},RFC3986:function(t){return String(t)}},RFC1738:C.RFC1738,RFC3986:C.RFC3986};
|
|
208
208
|
},{}],"Qri1":[function(require,module,exports) {
|
|
209
|
-
"use strict";var
|
|
210
|
-
},{"./formats":"XaX2"}],"mwZo":[function(require,module,exports) {
|
|
209
|
+
"use strict";var e=require("./formats"),r=require("side-channel"),t=Object.prototype.hasOwnProperty,n=Array.isArray,o=r(),c=function(e,r){return o.set(e,r),e},u=function(e){return o.has(e)},f=function(e){return o.get(e)},i=function(e,r){o.set(e,r)},a=function(){for(var e=[],r=0;r<256;++r)e.push("%"+((r<16?"0":"")+r.toString(16)).toUpperCase());return e}(),p=function(e){for(;e.length>1;){var r=e.pop(),t=r.obj[r.prop];if(n(t)){for(var o=[],c=0;c<t.length;++c)void 0!==t[c]&&o.push(t[c]);r.obj[r.prop]=o}}},l=function(e,r){for(var t=r&&r.plainObjects?{__proto__:null}:{},n=0;n<e.length;++n)void 0!==e[n]&&(t[n]=e[n]);return t},s=function e(r,o,a){if(!o)return r;if("object"!=typeof o&&"function"!=typeof o){if(n(r))r.push(o);else{if(!r||"object"!=typeof r)return[r,o];if(u(r)){var p=f(r)+1;r[p]=o,i(r,p)}else(a&&(a.plainObjects||a.allowPrototypes)||!t.call(Object.prototype,o))&&(r[o]=!0)}return r}if(!r||"object"!=typeof r){if(u(o)){for(var s=Object.keys(o),h=a&&a.plainObjects?{__proto__:null,0:r}:{0:r},g=0;g<s.length;g++){h[parseInt(s[g],10)+1]=o[s[g]]}return c(h,f(o)+1)}return[r].concat(o)}var b=r;return n(r)&&!n(o)&&(b=l(r,a)),n(r)&&n(o)?(o.forEach(function(n,o){if(t.call(r,o)){var c=r[o];c&&"object"==typeof c&&n&&"object"==typeof n?r[o]=e(c,n,a):r.push(n)}else r[o]=n}),r):Object.keys(o).reduce(function(r,n){var c=o[n];return t.call(r,n)?r[n]=e(r[n],c,a):r[n]=c,r},b)},h=function(e,r){return Object.keys(r).reduce(function(e,t){return e[t]=r[t],e},e)},g=function(e,r,t){var n=e.replace(/\+/g," ");if("iso-8859-1"===t)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(o){return n}},b=1024,y=function(r,t,n,o,c){if(0===r.length)return r;var u=r;if("symbol"==typeof r?u=Symbol.prototype.toString.call(r):"string"!=typeof r&&(u=String(r)),"iso-8859-1"===n)return escape(u).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var f="",i=0;i<u.length;i+=b){for(var p=u.length>=b?u.slice(i,i+b):u,l=[],s=0;s<p.length;++s){var h=p.charCodeAt(s);45===h||46===h||95===h||126===h||h>=48&&h<=57||h>=65&&h<=90||h>=97&&h<=122||c===e.RFC1738&&(40===h||41===h)?l[l.length]=p.charAt(s):h<128?l[l.length]=a[h]:h<2048?l[l.length]=a[192|h>>6]+a[128|63&h]:h<55296||h>=57344?l[l.length]=a[224|h>>12]+a[128|h>>6&63]+a[128|63&h]:(s+=1,h=65536+((1023&h)<<10|1023&p.charCodeAt(s)),l[l.length]=a[240|h>>18]+a[128|h>>12&63]+a[128|h>>6&63]+a[128|63&h])}f+=l.join("")}return f},j=function(e){for(var r=[{obj:{o:e},prop:"o"}],t=[],n=0;n<r.length;++n)for(var o=r[n],c=o.obj[o.prop],u=Object.keys(c),f=0;f<u.length;++f){var i=u[f],a=c[i];"object"==typeof a&&null!==a&&-1===t.indexOf(a)&&(r.push({obj:c,prop:i}),t.push(a))}return p(r),e},v=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},O=function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},d=function(e,r,t,n){if(u(e)){var o=f(e)+1;return e[o]=r,i(e,o),e}var a=[].concat(e,r);return a.length>t?c(l(a,{plainObjects:n}),a.length-1):a},m=function(e,r){if(n(e)){for(var t=[],o=0;o<e.length;o+=1)t.push(r(e[o]));return t}return r(e)};module.exports={arrayToObject:l,assign:h,combine:d,compact:j,decode:g,encode:y,isBuffer:O,isOverflow:u,isRegExp:v,maybeMap:m,merge:s};
|
|
210
|
+
},{"./formats":"XaX2","side-channel":"lzf1"}],"mwZo":[function(require,module,exports) {
|
|
211
211
|
"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:""};
|
|
212
212
|
},{"side-channel":"lzf1","./utils":"Qri1","./formats":"XaX2"}],"snX5":[function(require,module,exports) {
|
|
213
|
-
"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,
|
|
213
|
+
"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,u=d.split(c.delimiter,c.throwOnLimitExceeded?y+1:y);if(c.throwOnLimitExceeded&&u.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(1===y?"":"s")+" allowed.");var m,f=-1,h=c.charset;if(c.charsetSentinel)for(m=0;m<u.length;++m)0===u[m].indexOf("utf8=")&&(u[m]===l?h="utf-8":u[m]===n&&(h="iso-8859-1"),f=m,m=u.length);for(m=0;m<u.length;++m)if(m!==f){var w,b,g=u[m],E=g.indexOf("]="),O=-1===E?g.indexOf("="):E+1;if(-1===O?(w=c.decoder(g,o.decoder,h,"key"),b=c.strictNullHandling?null:""):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),null!==w){var v=t.call(p,w);v&&"combine"===c.duplicates?p[w]=e.combine(p[w],b,c.arrayLimit,c.plainObjects):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=e.isOverflow(s)?s:o.allowEmptyArrays&&(""===s||o.strictNullHandling&&null===s)?[]:e.combine([],s,o.arrayLimit,o.plainObjects);else{p=o.plainObjects?{__proto__:null}:{};var y="["===d.charAt(0)&&"]"===d.charAt(d.length-1)?d.slice(1,-1):d,u=o.decodeDotInKeys?y.replace(/%2E/g,"."):y,m=parseInt(u,10);o.parseArrays||""!==u?!isNaN(m)&&d!==u&&String(m)===u&&m>=0&&o.parseArrays&&m<=o.arrayLimit?(p=[])[m]=s:"__proto__"!==u&&(p[u]=s):p={0:s}}s=p}return s},p=function(e,r){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(r.depth<=0){if(!r.plainObjects&&t.call(Object.prototype,o)&&!r.allowPrototypes)return;return[o]}var i=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(o),n=a?o.slice(0,a.index):o,l=[];if(n){if(!r.plainObjects&&t.call(Object.prototype,n)&&!r.allowPrototypes)return;l.push(n)}for(var s=0;null!==(a=i.exec(o))&&s<r.depth;){s+=1;var c=a[1].slice(1,-1);if(!r.plainObjects&&t.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(a[1])}if(a){if(!0===r.strictDepth)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");l.push("["+o.slice(a.index)+"]")}return l},d=function(e,t,r,o){if(e){var i=p(e,r);if(i)return c(i,t,r,o)}},y=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=y(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],p=d(c,i[c],o,"string"==typeof t);a=e.merge(a,p,o)}return!0===o.allowSparse?a:e.compact(a)};
|
|
214
214
|
},{"./utils":"Qri1"}],"hIRQ":[function(require,module,exports) {
|
|
215
215
|
"use strict";var r=require("./stringify"),e=require("./parse"),s=require("./formats");module.exports={formats:s,parse:e,stringify:r};
|
|
216
216
|
},{"./stringify":"mwZo","./parse":"snX5","./formats":"XaX2"}],"hDvy":[function(require,module,exports) {
|
|
217
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GudHubHttpsService=void 0;var
|
|
217
|
+
"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(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=s(t))||e&&t&&"number"==typeof t.length){r&&(t=r);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 i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function a(t,e){return l(t)||f(t,e)||s(t,e)||u()}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(t,e){if(t){if("string"==typeof t)return c(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)?c(t,e):void 0}}function c(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 f(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],s=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);s=!0);}catch(t){c=!0,o=t}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}function l(t){if(Array.isArray(t))return t}function h(){var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof u?n:u,c=Object.create(s.prototype);return y(c,"_invoke",function(r,n,o){var i,u,s,c=0,f=o||[],l=!1,h={p:0,n:0,v:t,a:y,f:y.bind(t,4),d:function(e,r){return i=e,u=0,s=t,h.n=r,a}};function y(r,n){for(u=r,s=n,e=0;!l&&c&&!o&&e<f.length;e++){var o,i=f[e],y=h.p,p=i[2];r>3?(o=p===n)&&(s=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=y&&((o=r<2&&y<i[1])?(u=0,h.v=n,h.n=i[1]):y<p&&(o=r<3||i[0]>n||n>p)&&(i[4]=r,i[5]=n,h.n=p,u=0))}if(o||r>1)return a;throw l=!0,n}return function(o,f,p){if(c>1)throw TypeError("Generator is already running");for(l&&1===f&&y(f,p),u=f,s=p;(e=u<2?t:s)||!l;){i||(u?u<3?(u>1&&(h.n=-1),y(u,s)):h.n=s:h.v=s);try{if(c=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(l=h.n<0)?s:r.call(n,h))!==a)break}catch(e){i=t,u=1,s=e}finally{c=1}}return{value:e,done:l}}}(r,o,i),!0),c}var a={};function u(){}function s(){}function c(){}e=Object.getPrototypeOf;var f=[][n]?e(e([][n]())):(y(e={},n,function(){return this}),e),l=c.prototype=u.prototype=Object.create(f);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,y(t,o,"GeneratorFunction")),t.prototype=Object.create(l),t}return s.prototype=c,y(l,"constructor",c),y(c,"constructor",s),s.displayName="GeneratorFunction",y(c,o,"GeneratorFunction"),y(l),y(l,o,"Generator"),y(l,n,function(){return this}),y(l,"toString",function(){return"[object Generator]"}),(h=function(){return{w:i,m:p}})()}function y(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}(y=function(t,e,r,n){function i(e,r){y(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(i("next",0),i("throw",1),i("return",2))})(t,e,r,n)}function p(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 m(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var i=t.apply(e,r);function a(t){p(i,n,o,a,u,"next",t)}function u(t){p(i,n,o,a,u,"throw",t)}a(void 0)})}}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 b(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=P(t,"string");return"symbol"==o(e)?e:e+""}function P(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 S=exports.GudHubHttpsService=function(){return b(function t(e){v(this,t),this.root=e,this.requestPromises=[]},[{key:"init",value:function(t){this.getToken=t}},{key:"get",value:function(){var r=m(h().m(function r(n){var o,i,a,u=this;return h().w(function(r){for(;;)switch(r.n){case 0:return r.n=1,this.getToken();case 1:if(o=r.v,i=this.getHashCode(n),!this.requestPromises[i]){r.n=2;break}return r.a(2,this.requestPromises[i].promise);case 2:return a=new Promise(function(r,i){var a;n.externalResource?a=n.url:(a=u.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(a,i),r.a(2,a)}},r,this)}));return function(t){return r.apply(this,arguments)}}()},{key:"post",value:function(){var e=m(h().m(function e(n){var o,i,a=this;return h().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 i=new Promise(function(e,o){t.default.post(a.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(i,o),e.a(2,i)}},e,this)}));return function(t){return e.apply(this,arguments)}}()},{key:"axiosRequest",value:function(e){var n=this.getHashCodeForAxiosRequest(e);if(this.requestPromises[n])return this.requestPromises[n].promise;var o=e.method?e.method.toLowerCase():"get",i=e.url,a=e.headers||{};e.form&&(a["Content-Type"]="application/x-www-form-urlencoded");var u=new Promise(function(){var n=m(h().m(function n(u,s){var c,f,l;return h().w(function(n){for(;;)switch(n.p=n.n){case 0:return n.p=0,n.n=1,t.default[o](i,"post"===o?r.default.stringify(e.form)||e.body:{headers:a},"post"===o?{headers:a}:{});case 1:c=n.v,f=c.data,u(f),n.n=3;break;case 2:n.p=2,l=n.v,console.log("ERROR -> GUDHUB HTTP SERVICE -> SIMPLE POST :",l.message),console.log("Request message: ",e),s(l);case 3:return n.a(2)}},n,null,[[0,2]])}));return function(t,e){return n.apply(this,arguments)}}());return this.pushPromise(u,n),u}},{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}},{key:"getHashCodeForAxiosRequest",value:function(t){for(var e=function(t){if(null==t)return"";if(t instanceof URLSearchParams){var r=[];t.forEach(function(t,e){return r.push([e,String(t)])}),r.sort(function(t,e){return t[0]===e[0]?t[1].localeCompare(e[1]):t[0].localeCompare(e[0])});var n=r.filter(function(t){return"token"!==a(t,1)[0]});return JSON.stringify(n)}if("undefined"!=typeof FormData&&t instanceof FormData){var u,s=[],c=i(t.entries());try{for(c.s();!(u=c.n()).done;){var f=a(u.value,2),l=f[0],h=f[1];h&&"object"===o(h)&&"name"in h&&"size"in h?s.push([l,{name:h.name,size:h.size,type:h.type||"",lastModified:h.lastModified||0}]):s.push([l,String(h)])}}catch(b){c.e(b)}finally{c.f()}s.sort(function(t,e){return t[0]===e[0]?JSON.stringify(t[1]).localeCompare(JSON.stringify(e[1])):t[0].localeCompare(e[0])});var y=s.filter(function(t){return"token"!==a(t,1)[0]});return JSON.stringify(y)}if("object"===o(t)){var p,m={},v=i(Object.keys(t).sort());try{for(v.s();!(p=v.n()).done;){var d=p.value;"token"!==d&&(m[d]=e(t[d]))}}catch(b){v.e(b)}finally{v.f()}return JSON.stringify(m)}return String(t)},r={url:t.url||"",method:(t.method||t.request_method||"GET").toUpperCase(),headers:t.headers||{},params:t.params||{},query:t.query||{},form:t.form||t.body||null,externalResource:!!t.externalResource},n=e(r),u=0,s=0;s<n.length;s++){u=(u<<5)-u+n.charCodeAt(s),u|=0}return"h"+u}}])}();
|
|
218
218
|
},{"axios":"O4Aa","./utils.js":"EgeI","qs":"hIRQ"}],"Lc8J":[function(require,module,exports) {
|
|
219
219
|
"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;
|
|
220
220
|
},{}],"E3xI":[function(require,module,exports) {
|
|
221
221
|
"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]}}])}();
|
|
222
222
|
},{"./utils.js":"Lc8J"}],"FJWL":[function(require,module,exports) {
|
|
223
|
-
"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://app.gudhub.com/modules/FullCalendar-Gh-Element/dist/main.js?t=6",css:"https://app.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:"qt_item_remote_add",name:"QT Item remote add",icon:"remote_add_gh_element",url:t+"/"+e+"qt_item_remote_add_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://app.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://app.gudhub.com/modules/Editor-Js/dist/main.js?t=2",css:"https://app.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:"qt_components_table",name:"QT components table",icon:"code_editor_gh_element",url:t+"/"+e+"quote_tool_components_table_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://app.gudhub.com/modules/Nested-List/dist/main.js?t=2",css:"https://app.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://app.gudhub.com/modules/markdown-it-gh-element/dist/main.js?t=1",css:"https://app.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://app.gudhub.com/modules/HTML-Viewer/dist/main.js?t=1",css:"https://app.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://app.gudhub.com/modules/Cron-Picker/dist/main.js?t=2",css:"https://app.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://app.gudhub.com/modules/balance-sheet/dist/main.js?t=2",css:"https://app.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://app.gudhub.com/modules/countertop-quote-form/dist/main.js",css:"https://app.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://app.gudhub.com/modules/nested-filter/dist/main.js?t=1",css:"https://app.gudhub.com/modules/nested-filter/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"conversations",name:"Conversations",icon:"timeline",js:"https://app.gudhub.com/modules/conversation/dist/main.js?t=1",css:"https://app.gudhub.com/modules/conversation/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"study_journal",name:"Study Journal",icon:"study_journal",js:"https://app.gudhub.com/modules/Study-Journal/dist/main.js?t=1",css:"https://app.gudhub.com/modules/Study-Journal/dist/style.css",type:"gh_element",technology:"class"},{data_type:"study_schedule",name:"Study Schedule",icon:"timeline",js:"https://app.gudhub.com/modules/Study-Schedule/dist/main.js?t=1",css:"https://app.gudhub.com/modules/Study-Schedule/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"avatar",name:"Avatar",icon:"user",js:"https://app.gudhub.com/modules/Gh-Avatar/dist/main.js?t=1",css:"https://app.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://app.gudhub.com/modules/text-area-ghe/dist/main.js?t=3",css:"https://app.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:"image_annotation",name:"Image Annotation",icon:"box",js:"https://app.gudhub.com/modules/gh-image-anotation/dist/main.js",css:"https://app.gudhub.com/modules/gh-image-anotation/dist/style.css",type:"gh_element",technology:"class"},{data_type:"area_map",name:"Area Map",icon:"location",js:"https://app.gudhub.com/modules/gh-area-map/dist/main.js",css:"https://app.gudhub.com/modules/gh-area-map/dist/style.css",type:"gh_element",technology:"class"},{data_type:"svg_to_pdf",name:"SVG To PDF",icon:"box",js:"https://app.gudhub.com/modules/SVG-to-PDF-Gh-Element/dist/main.js",css:"https://app.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:"assessment_journual",name:"Assessment Journual",icon:"text_icon",js:"https://app.gudhub.com/modules/Assessment-Journal/dist/main.js",css:"https://app.gudhub.com/modules/Assessment-Journal/dist/style.css",type:"gh_element",technology:"class"},{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:"Deepseek",name:"Deepseek",url:t+"/"+a+"deepseek_node.js",type:"automation",icon:"automation_deepseek"},{data_type:"UrlToMarkdown",name:"Url To Markdown",url:t+"/"+a+"url_to_markdown_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"},{data_type:"AskChatGPT",name:"Ask ChatGPT",url:t+"/"+a+"ask_chat_gpt.js",type:"automation",icon:"ask_chat_gpt"},{data_type:"TeachChatGPT",name:"Teach ChatGPT",url:t+"/"+a+"teach_chat_gpt.js",type:"automation",icon:"teach_chat_gpt"}]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
223
|
+
"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://modules.gudhub.com/FullCalendar-Gh-Element/dist/main.js?t=6",css:"https://modules.gudhub.com/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:"shared_groups",name:"Shared Groups",icon:"user_gh_element",url:t+"/"+e+"shared_groups_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:"qt_item_remote_add",name:"QT Item remote add",icon:"remote_add_gh_element",url:t+"/"+e+"qt_item_remote_add_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://modules.gudhub.com/button_action/button_action.js?t=1",type:"gh_element",technology:"class"},{data_type:"editorjs",name:"EditorJS",icon:"code_editor",js:"https://modules.gudhub.com/Editor-Js/dist/main.js?t=2",css:"https://modules.gudhub.com/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:"qt_components_table",name:"QT components table",icon:"code_editor_gh_element",url:t+"/"+e+"quote_tool_components_table_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://modules.gudhub.com/Nested-List/dist/main.js?t=2",css:"https://modules.gudhub.com/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://modules.gudhub.com/markdown-it-gh-element/dist/main.js?t=1",css:"https://modules.gudhub.com/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://modules.gudhub.com/HTML-Viewer/dist/main.js?t=1",css:"https://modules.gudhub.com/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://modules.gudhub.com/Cron-Picker/dist/main.js?t=2",css:"https://modules.gudhub.com/Cron-Picker/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"balance_sheet",name:"Balance Sheet",icon:"table",js:"https://modules.gudhub.com/balance-sheet/dist/main.js?t=2",css:"https://modules.gudhub.com/balance-sheet/dist/style.css?t=2",type:"gh_element",technology:"class"},{data_type:"quote_form",name:"Quote Form",icon:"table",js:"https://modules.gudhub.com/countertop-quote-form/dist/main.js",css:"https://modules.gudhub.com/countertop-quote-form/dist/style.css",type:"gh_element",technology:"class"},{data_type:"static_nested_list",name:"Nested Filter",icon:"scheduling",js:"https://modules.gudhub.com/nested-filter/dist/main.js?t=1",css:"https://modules.gudhub.com/nested-filter/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"conversations",name:"Conversations",icon:"timeline",js:"https://modules.gudhub.com/conversation/dist/main.js?t=1",css:"https://modules.gudhub.com/conversation/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"study_journal",name:"Study Journal",icon:"study_journal",js:"https://modules.gudhub.com/Study-Journal/dist/main.js?t=1",css:"https://modules.gudhub.com/Study-Journal/dist/style.css",type:"gh_element",technology:"class"},{data_type:"study_schedule",name:"Study Schedule",icon:"timeline",js:"https://modules.gudhub.com/Study-Schedule/dist/main.js?t=1",css:"https://modules.gudhub.com/Study-Schedule/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"avatar",name:"Avatar",icon:"user",js:"https://modules.gudhub.com/Gh-Avatar/dist/main.js?t=1",css:"https://modules.gudhub.com/Gh-Avatar/dist/style.css?t=1",type:"gh_element",technology:"class"},{data_type:"text_area",name:"Text Area",icon:"text_icon",js:"https://modules.gudhub.com/text-area-ghe/dist/main.js?t=3",css:"https://modules.gudhub.com/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:"image_annotation",name:"Image Annotation",icon:"box",js:"https://modules.gudhub.com/gh-image-anotation/dist/main.js",type:"gh_element",technology:"class"},{data_type:"area_map",name:"Area Map",icon:"location",js:"https://modules.gudhub.com/gh-area-map/dist/main.js",css:"https://modules.gudhub.com/gh-area-map/dist/style.css",type:"gh_element",technology:"class"},{data_type:"svg_to_pdf",name:"SVG To PDF",icon:"box",js:"https://modules.gudhub.com/SVG-to-PDF-Gh-Element/dist/main.js",css:"https://modules.gudhub.com/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:"assessment_journual",name:"Assessment Journual",icon:"text_icon",js:"https://modules.gudhub.com/Assessment-Journal/dist/main.js",css:"https://modules.gudhub.com/Assessment-Journal/dist/style.css",type:"gh_element",technology:"class"},{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:"Deepseek",name:"Deepseek",url:t+"/"+a+"deepseek_node.js",type:"automation",icon:"automation_deepseek"},{data_type:"UrlToMarkdown",name:"Url To Markdown",url:t+"/"+a+"url_to_markdown_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"},{data_type:"AskChatGPT",name:"Ask ChatGPT",url:t+"/"+a+"ask_chat_gpt.js",type:"automation",icon:"ask_chat_gpt"},{data_type:"TeachChatGPT",name:"Teach ChatGPT",url:t+"/"+a+"teach_chat_gpt.js",type:"automation",icon:"teach_chat_gpt"}]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
|
|
224
224
|
},{}],"CSHe":[function(require,module,exports) {
|
|
225
|
-
"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){
|
|
225
|
+
"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){function o(e,r){p(t,e,function(t){return this._invoke(e,r,t)})}e?i?i(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(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)}}()}])}();
|
|
226
226
|
},{"./ModulesList.js":"FJWL"}],"p58b":[function(require,module,exports) {
|
|
227
227
|
"use strict";module.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};
|
|
228
228
|
},{}],"pHMV":[function(require,module,exports) {
|
|
229
|
-
"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,
|
|
229
|
+
"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,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",s=r.toStringTag||"@@toStringTag";function c(n,r,i,s){var c=r&&r.prototype instanceof u?r:u,f=Object.create(c.prototype);return o(f,"_invoke",function(n,o,r){var i,s,c,u=0,f=r||[],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,o){for(s=n,c=o,t=0;!h&&u&&!r&&t<f.length;t++){var r,i=f[t],p=l.p,b=i[2];n>3?(r=b===o)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((r=n<2&&p<i[1])?(s=0,l.v=o,l.n=i[1]):p<b&&(r=n<3||i[0]>o||o>b)&&(i[4]=n,i[5]=o,l.n=b,s=0))}if(r||n>1)return a;throw h=!0,o}return function(r,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||(r="next"),t=i[r]){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 '"+r+"' method"),s=1);i=e}else if((t=(h=l.n<0)?c:n.call(o,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]())):(o(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,o(e,s,"GeneratorFunction")),e.prototype=Object.create(p),e}return f.prototype=h,o(p,"constructor",h),o(h,"constructor",f),f.displayName="GeneratorFunction",o(h,s,"GeneratorFunction"),o(p),o(p,s,"Generator"),o(p,i,function(){return this}),o(p,"toString",function(){return"[object Generator]"}),(n=function(){return{w:c,m:b}})()}function o(e,t,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(o=function(e,t,n,r){function s(t,n){o(e,t,function(e){return this._invoke(t,n,e)})}t?i?i(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(s("next",0),s("throw",1),s("return",2))})(e,t,n,r)}function r(e,t,n,o,r,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(o,r)}function i(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var s=e.apply(t,n);function c(e){r(s,o,i,c,a,"next",e)}function a(e){r(s,o,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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}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 o=n.call(e,t||"default");if("object"!=s(o))return o;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 o,r;return n().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.auth.getToken();case 1:o=e.v,r="token=".concat(o,"/~/app_id=").concat(t),this.connected&&this.websocket.send(r),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,o=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);o.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 o,r,i,s;return n().w(function(e){for(;;)switch(e.n){case 0:if(!(o=this.isBrowser?t.data:t).match(/HeartBeat/)){e.n=3;break}if(r=(new Date).getTime()-this.heartBeatTimeStemp,!(this.ALLOWED_HEART_BEAT_DELEY<r)){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),!o.match(/[{}]/)){e.n=5;break}return i=JSON.parse(o),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 o;return n().w(function(t){for(;;)switch(t.n){case 0:if(o=(new Date).getTime()-e.heartBeatTimeStemp,!(e.ALLOWED_HEART_BEAT_DELEY<o)){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.p=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)}}()}])}();
|
|
230
230
|
},{"ws":"p58b"}],"TPH7":[function(require,module,exports) {
|
|
231
231
|
"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://app.gudhub.com/GudHub",s=exports.wss_url="wss://app.gudhub.com/GudHub/ws/app/",r=exports.node_server_url="https://app.gudhub.com/api/services/prod",t=exports.async_modules_path="build/latest/async_modules_node/",o=exports.automation_modules_path="build/latest/automation_modules/",p=exports.file_server_url="https://app.gudhub.com",u=exports.port=9e3;
|
|
232
232
|
},{}],"DvAj":[function(require,module,exports) {
|
|
233
|
-
"use strict";function e(){var
|
|
233
|
+
"use strict";function e(){var t,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 r(f,"_invoke",function(e,r,o){var a,i,u,l=0,f=o||[],p=!1,s={p:0,n:0,v:t,a:v,f:v.bind(t,4),d:function(e,r){return a=e,i=0,u=t,s.n=r,c}};function v(e,r){for(i=e,u=r,n=0;!p&&l&&!o&&n<f.length;n++){var o,a=f[n],v=s.p,d=a[2];e>3?(o=d===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=t):a[0]<=v&&((o=e<2&&v<a[1])?(i=0,s.v=r,s.n=a[1]):v<d&&(o=e<3||a[0]>r||r>d)&&(a[4]=e,a[5]=r,s.n=d,i=0))}if(o||e>1)return c;throw p=!0,r}return function(o,f,d){if(l>1)throw TypeError("Generator is already running");for(p&&1===f&&v(f,d),i=f,u=d;(n=i<2?t: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=t}else if((n=(p=s.n<0)?u:e.call(r,s))!==c)break}catch(n){a=t,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]())):(r(n={},a,function(){return this}),n),v=p.prototype=l.prototype=Object.create(s);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,r(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e}return f.prototype=p,r(v,"constructor",p),r(p,"constructor",f),f.displayName="GeneratorFunction",r(p,i,"GeneratorFunction"),r(v),r(v,i,"Generator"),r(v,a,function(){return this}),r(v,"toString",function(){return"[object Generator]"}),(e=function(){return{w:u,m:d}})()}function r(e,t,n,o){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}(r=function(e,t,n,o){function i(t,n){r(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))})(e,t,n,o)}function t(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,r){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=u(e))||r&&e&&"number"==typeof e.length){t&&(e=t);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(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){c=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(c)throw a}}}}function u(e,r){if(e){if("string"==typeof e)return c(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)?c(e,r):void 0}}function c(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 l(e,r,t,n,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void t(e)}u.done?r(c):Promise.resolve(c).then(n,o)}function f(e){return function(){var r=this,t=arguments;return new Promise(function(n,o){var a=e.apply(r,t);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,r,t){return s.apply(this,arguments)}function s(){return(s=f(e().m(function r(n,o,a){var u,c,l,f,p,s,v,d,y,h,b,_,m,g,w,A,M,S=arguments;return e().w(function(e){for(;;)switch(e.p=e.n){case 0:if(w=function(e){return new Promise(function(r){a.on("gh_value_get",e,function t(n,o){a.destroy("gh_value_get",e,t),r(o)}).emit("gh_value_get",{},e)})},u=S.length>3&&void 0!==S[3]?S[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]},variableMethodshared_groups:function(){var e,r;return null!==(e=null===(r=o.user)||void 0===r||null===(r=r.shared_groups)||void 0===r?void 0:r.map(function(e){return null==e?void 0:e.group_id}))&&void 0!==e?e:[]},variableMethoduser_email:function(e){return[o.getUser().username]},variableMethodtoday:function(e){var r=new Date,t=new Date(r.getFullYear(),r.getMonth(),r.getDate()),n=new Date(r.getFullYear(),r.getMonth(),r.getDate()+1);return[t.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();!(d=v.n()).done;)y=d.value,h=s.input_type+"Method"+y,"function"==typeof(b=l[h])?s.valuesArray?(_=s.valuesArray).push.apply(_,t(b())):s.valuesArray=b():s.valuesArray?(m=s.valuesArray).push.apply(m,t(l.variableMethodvariable(y))):s.valuesArray=l.variableMethodvariable(y)}catch(r){v.e(r)}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,M=e.v,f.e(M);case 12:return e.p=12,f.f(),e.f(12);case 13:return e.a(2,c)}},r,null,[[1,11,12,13]])}))).apply(this,arguments)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.filterPreparation=p;
|
|
234
234
|
},{}],"jqRt":[function(require,module,exports) {
|
|
235
235
|
"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);
|
|
236
236
|
},{}],"zsiC":[function(require,module,exports) {
|
|
@@ -285,65 +285,65 @@ function o(e){return module.exports=o="function"==typeof Symbol&&"symbol"==typeo
|
|
|
285
285
|
},{}],"S7Iy":[function(require,module,exports) {
|
|
286
286
|
"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;
|
|
287
287
|
},{}],"vno1":[function(require,module,exports) {
|
|
288
|
-
"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){
|
|
288
|
+
"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){function u(e,r){n(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!i,configurable:!i,writable:!i}):t[e]=r:(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)}}())}}])}();
|
|
289
289
|
},{}],"DfIi":[function(require,module,exports) {
|
|
290
|
-
"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){
|
|
290
|
+
"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){function u(e,n){r(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n:(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)}}])}();
|
|
291
291
|
},{}],"xR4c":[function(require,module,exports) {
|
|
292
292
|
"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;
|
|
293
293
|
},{}],"nKaW":[function(require,module,exports) {
|
|
294
|
-
"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){
|
|
294
|
+
"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){function o(e,r){s(t,e,function(t){return this._invoke(e,r,t)})}e?i?i(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(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;
|
|
295
295
|
},{}],"zqOZ":[function(require,module,exports) {
|
|
296
|
-
"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||[],p=!1,s={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,o=0,u=e,s.n=n,c}};function d(n,i){for(o=n,u=i,t=0;!p&&f&&!r&&t<l.length;t++){var r,a=l[t],d=s.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,s.v=i,s.n=a[1]):d<_&&(r=n<3||a[0]>i||i>_)&&(a[4]=n,a[5]=i,s.n=_,o=0))}if(r||n>1)return c;throw p=!0,i}return function(r,l,_){if(f>1)throw TypeError("Generator is already running");for(p&&1===l&&d(l,_),o=l,u=_;(t=o<2?e:u)||!p;){a||(o?o<3?(o>1&&(s.n=-1),d(o,u)):s.n=u:s.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=(p=s.n<0)?u:n.call(i,s))!==c)break}catch(t){a=e,o=1,u=t}finally{f=1}}return{value:t,done:p}}}(n,r,o),!0),l}var c={};function f(){}function l(){}function p(){}t=Object.getPrototypeOf;var s=[][i]?t(t([][i]())):(a(t={},i,function(){return this}),t),d=p.prototype=f.prototype=Object.create(s);function _(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,a(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=p,a(d,"constructor",p),a(p,"constructor",l),l.displayName="GeneratorFunction",a(p,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,s(i.key),i)}}function p(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(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 p(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,p,s,d,_;return r().w(function(o){for(;;)switch(o.n){case 0:return f=t||1e5,l=a,p=[],s=[],o.n=1,l.gudhub.req.axiosRequest({method:"POST",url:"https://app.gudhub.com/GudHub/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});case 1:d=o.v,_=d.accesstoken,e.forEach(function(e){s.push(new Promise(function(){var t=u(r().m(function t(o){var u,c,s;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://app.gudhub.com/GudHub/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)),s=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,s).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),p.push(e),o()});case 5:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}()))}),Promise.all(s).then(function(){p.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(p),l.replaceValue(p,l.appsConnectingMap).then(function(){var e=[];p.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,p),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,p,s,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(p=l.value,s=p.item_id,!((d=p.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:s,element_id:i,data:_.data});case 4:h=r.v,d.field_value=h._id,o.push(p);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 p,s,d,_,h,v,m,y,b;return r().w(function(u){for(;;)switch(u.n){case 0:return p={},s=[],d=[],u.n=1,c.gudhub.req.axiosRequest({method:"POST",url:"https://app.gudhub.com/GudHub/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://app.gudhub.com/GudHub/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)),p[_.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)")),s.push(e),c.mapApp(_,e,c.appsConnectingMap),n.apps.length==s.length&&(c.connectApps(s,c.appsConnectingMap,p),s.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,p=i.findPath(n[l].views_list,"container_id",a);o[r]="".concat(i.getValueByPath(e.views_list,p,"container_id"))}if(-1!==r.indexOf("trigger")&&a.model&&a.model.nodes){var s=a.model.nodes,d=["inputs","outputs"],_=function(e){d.forEach(function(n){var i=s[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 s)_(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}}])}();
|
|
296
|
+
"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,p=Object.create(u.prototype);return a(p,"_invoke",function(n,i,r){var a,o,u,f=0,p=r||[],l=!1,s={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,o=0,u=e,s.n=n,c}};function d(n,i){for(o=n,u=i,t=0;!l&&f&&!r&&t<p.length;t++){var r,a=p[t],d=s.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,s.v=i,s.n=a[1]):d<_&&(r=n<3||a[0]>i||i>_)&&(a[4]=n,a[5]=i,s.n=_,o=0))}if(r||n>1)return c;throw l=!0,i}return function(r,p,_){if(f>1)throw TypeError("Generator is already running");for(l&&1===p&&d(p,_),o=p,u=_;(t=o<2?e:u)||!l;){a||(o?o<3?(o>1&&(s.n=-1),d(o,u)):s.n=u:s.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=(l=s.n<0)?u:n.call(i,s))!==c)break}catch(t){a=e,o=1,u=t}finally{f=1}}return{value:t,done:l}}}(n,r,o),!0),p}var c={};function f(){}function p(){}function l(){}t=Object.getPrototypeOf;var s=[][i]?t(t([][i]())):(a(t={},i,function(){return this}),t),d=l.prototype=f.prototype=Object.create(s);function _(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,a(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return p.prototype=l,a(d,"constructor",l),a(l,"constructor",p),p.displayName="GeneratorFunction",a(l,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){function o(t,n){a(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(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 p(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,s(i.key),i)}}function l(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(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 l(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,p,l,s,d,_;return r().w(function(o){for(;;)switch(o.n){case 0:return f=t||1e5,p=a,l=[],s=[],o.n=1,p.gudhub.req.axiosRequest({method:"POST",url:"https://app.gudhub.com/GudHub/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});case 1:d=o.v,_=d.accesstoken,e.forEach(function(e){s.push(new Promise(function(){var t=u(r().m(function t(o){var u,c,s;return r().w(function(t){for(;;)switch(t.n){case 0:if(!i){t.n=2;break}return t.n=1,p.gudhub.req.axiosRequest({url:"https://app.gudhub.com/GudHub/api/app/get?token=".concat(_,"&app_id=").concat(p._searchOldAppId(e.app_id,p.appsConnectingMap.apps)),method:"GET"});case 1:u=t.v,t.n=4;break;case 2:return t.n=3,p.gudhub.getApp(p._searchOldAppId(e.app_id,p.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)),s=c.items_list.map(function(e){return{index_number:e.index_number,item_id:0,fields:[]}}).filter(function(e,t){return t<=f}),p.gudhub.addNewItems(e.app_id,s).then(function(t){n&&n.call(a,"ADD NEW ITEMS: ".concat(u.app_name," (Items steps)")),e.items_list=t,p._updateMap(e.items_list,c.items_list),p._addFieldValue(c.items_list,e.items_list,p.appsConnectingMap),l.push(e),o()});case 5:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}()))}),Promise.all(s).then(function(){l.forEach(function(e){e.items_list.forEach(function(e){e.fields.forEach(function(e){p.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)})})})}),p.deleteField(l),p.replaceValue(l,p.appsConnectingMap).then(function(){var e=[];l.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});p.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,l),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,p,l,s,d,_,h,m;return r().w(function(r){for(;;)switch(r.p=r.n){case 0:f=t(n),r.p=1,f.s();case 2:if((p=f.n()).done){r.n=6;break}if(l=p.value,s=l.item_id,!((d=l.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:s,element_id:i,data:_.data});case 4:h=r.v,d.field_value=h._id,o.push(l);case 5:r.n=2;break;case 6:r.n=8;break;case 7:r.p=7,m=r.v,f.e(m);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 p=u(r().m(function u(p){var l,s,d,_,h,m,v,y,b;return r().w(function(u){for(;;)switch(u.p=u.n){case 0:return l={},s=[],d=[],u.n=1,c.gudhub.req.axiosRequest({method:"POST",url:"https://app.gudhub.com/GudHub/auth/login",form:{auth_key:"3HMOtCbC0M/1/1e4y4Uxo/Kh/aFN4V5LG2//5ixx7TZyiUfMb7IHAAHCj9PsLrOSDrZuuWkbX4BIX23f51H+eA=="}});case 1:_=u.v,h=_.accesstoken,m=t(n.apps),u.p=2,y=r().m(function e(){var t,u,_,m;return r().w(function(e){for(;;)switch(e.n){case 0:if(t=v.value,!a){e.n=2;break}return e.n=1,c.gudhub.req.axiosRequest({url:"https://app.gudhub.com/GudHub/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)),l[_.app_id]=_,f.apps.push(_.icon),(m=c.prepareAppTemplate(_)).app_name=m.app_name+" New",m.privacy=1,n.data_to_change&&(n.data_to_change.name&&(m.app_name=n.data_to_change.name),n.data_to_change.icon&&(m.icon=n.data_to_change.icon)),c.resetViewsIds(m),c.gudhub.createNewApp(m).then(function(e){i&&i.call(o,"CREATE NEW APP: ".concat(u.app_name," (App steps)")),s.push(e),c.mapApp(_,e,c.appsConnectingMap),n.apps.length==s.length&&(c.connectApps(s,c.appsConnectingMap,l),s.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&&p(d)})}))});case 5:return e.a(2)}},e)}),m.s();case 3:if((v=m.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,m.e(b);case 7:return u.p=7,m.f(),u.f(7);case 8:return u.a(2)}},u,null,[[2,6,7,8]])}));return function(e){return p.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 p=t.apps.find(function(t){return t.new_app_id===e.app_id}).old_app_id,l=i.findPath(n[p].views_list,"container_id",a);o[r]="".concat(i.getValueByPath(e.views_list,l,"container_id"))}if(-1!==r.indexOf("trigger")&&a.model&&a.model.nodes){var s=a.model.nodes,d=["inputs","outputs"],_=function(e){d.forEach(function(n){var i=s[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 s)_(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}}])}();
|
|
297
297
|
},{}],"E7yc":[function(require,module,exports) {
|
|
298
298
|
"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()})})}}])}();
|
|
299
299
|
},{}],"AefJ":[function(require,module,exports) {
|
|
300
300
|
"use strict";function e(e,t){return JSON.stringify(e)===JSON.stringify(t)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.compareObjects=e;
|
|
301
301
|
},{}],"ndUf":[function(require,module,exports) {
|
|
302
|
-
"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:
|
|
302
|
+
"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:y,f:y.bind(n,4),d:function(t,r){return a=t,i=0,u=n,p.n=r,c}};function y(t,r){for(i=t,u=r,e=0;!l&&f&&!o&&e<s.length;e++){var o,a=s[e],y=p.p,v=a[2];t>3?(o=v===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=n):a[0]<=y&&((o=t<2&&y<a[1])?(i=0,p.v=r,p.n=a[1]):y<v&&(o=t<3||a[0]>r||r>v)&&(a[4]=t,a[5]=r,p.n=v,i=0))}if(o||t>1)return c;throw l=!0,r}return function(o,s,v){if(f>1)throw TypeError("Generator is already running");for(l&&1===s&&y(s,v),i=s,u=v;(e=i<2?n:u)||!l;){a||(i?i<3?(i>1&&(p.n=-1),y(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),y=l.prototype=f.prototype=Object.create(p);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,r(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t}return s.prototype=l,r(y,"constructor",l),r(l,"constructor",s),s.displayName="GeneratorFunction",r(l,i,"GeneratorFunction"),r(y),r(y,i,"Generator"),r(y,a,function(){return this}),r(y,"toString",function(){return"[object Generator]"}),(t=function(){return{w:u,m:v}})()}function r(t,n,e,o){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}(r=function(t,n,e,o){function i(n,e){r(t,n,function(t){return this._invoke(n,e,t)})}n?a?a(t,n,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[n]=e:(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.p=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;
|
|
303
303
|
},{}],"Owq4":[function(require,module,exports) {
|
|
304
304
|
"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;
|
|
305
305
|
},{}],"mWlG":[function(require,module,exports) {
|
|
306
|
-
"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){
|
|
306
|
+
"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){function o(t,r){w(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(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)}}}])}();
|
|
307
307
|
},{"./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) {
|
|
308
|
-
"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){
|
|
308
|
+
"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){function i(r,n){e(t,r,function(t){return this._invoke(r,n,t)})}r?u?u(t,r,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[r]=n:(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.p=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.p=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.p=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)}}()}])}();
|
|
309
309
|
},{}],"UV2u":[function(require,module,exports) {
|
|
310
310
|
"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");
|
|
311
311
|
},{}],"osSN":[function(require,module,exports) {
|
|
312
312
|
var global = arguments[3];
|
|
313
|
-
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,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof c?r:c,i=Object.create(l.prototype);return _regeneratorDefine2(i,"_invoke",function(n,r,o){var a,c,l,i=0,s=o||[],d=!1,f={p:0,n:0,v:e,a:_,f:_.bind(e,4),d:function(t,n){return a=t,c=0,l=e,f.n=n,u}};function _(n,r){for(c=n,l=r,t=0;!d&&i&&!o&&t<s.length;t++){var o,a=s[t],_=f.p,p=a[2];n>3?(o=p===r)&&(l=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=e):a[0]<=_&&((o=n<2&&_<a[1])?(c=0,f.v=r,f.n=a[1]):_<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,f.n=p,c=0))}if(o||n>1)return u;throw d=!0,r}return function(o,s,p){if(i>1)throw TypeError("Generator is already running");for(d&&1===s&&_(s,p),c=s,l=p;(t=c<2?e:l)||!d;){a||(c?c<3?(c>1&&(f.n=-1),_(c,l)):f.n=l:f.v=l);try{if(i=2,a){if(c||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=a.return)&&t.call(a),c<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),c=1);a=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==u)break}catch(t){a=e,c=1,l=t}finally{i=1}}return{value:t,done:d}}}(n,o,a),!0),i}var u={};function c(){}function l(){}function i(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(_regeneratorDefine2(t={},r,function(){return this}),t),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,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(_regeneratorDefine2=function(e,t,n,r){if(t)o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n;else{var a=function(t,n){_regeneratorDefine2(e,t,function(e){return this._invoke(t,n,e)})};a("next",0),a("throw",1),a("return",2)}})(e,t,n,r)}function asyncGeneratorStep(e,t,n,r,o,a,u){try{var c=e[a](u),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);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(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(n){console.log("Errror in data type: ",e),console.log(n)}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,n,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,setGlobal,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:if(setGlobal=function(e,t){var n=Object.getOwnPropertyDescriptor(global,e);if(n)if(n.writable||"function"==typeof n.set)try{global[e]=t}catch(r){}else;else try{Object.defineProperty(global,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}catch(r){}},proxy=new Proxy(nodeWindow,{get:function(e,t){var n=e[t];if("symbol"!==_typeof(n))return n},set:function(e,t,n){return"symbol"!==_typeof(n)&&(e[t]=n,setGlobal(t,n),!0)}}),!Object.prototype.hasOwnProperty.call(global,"window")&&(setGlobal("window",proxy),setGlobal("document",nodeWindow.document),setGlobal("Element",nodeWindow.Element),setGlobal("CharacterData",nodeWindow.CharacterData),setGlobal("this",proxy),setGlobal("self",proxy),setGlobal("Blob",nodeWindow.Blob),setGlobal("Node",nodeWindow.Node),setGlobal("navigator",nodeWindow.navigator),setGlobal("HTMLElement",nodeWindow.HTMLElement),setGlobal("XMLHttpRequest",nodeWindow.XMLHttpRequest),setGlobal("WebSocket",nodeWindow.WebSocket),setGlobal("crypto",nodeWindow.crypto),setGlobal("DOMParser",nodeWindow.DOMParser),setGlobal("angular",angular),global.document))try{global.document.queryCommandSupported=function(){return!1}}catch(_){}return _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,t,n,r,o,a){var u="false"!==n;return importedClass.getTemplate(e,t,u,r,o,a)},getDefaultValue:function(e,t,n,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,t,n,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,t,n){return importedClass.getSettings(e,t,n)},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,n,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,n);case 2:return i=u.v,s=i.find(function(e){return e.id==t})||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,t,n,r){return importedClass.getInterpretation(e,t,n,r)},getInterpretatedValue:function(e,t,n,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,t,n,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,t,n){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,t,n);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(t){}},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)}
|
|
313
|
+
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,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof c?r:c,i=Object.create(l.prototype);return _regeneratorDefine2(i,"_invoke",function(n,r,o){var a,c,l,i=0,s=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return a=t,c=0,l=e,f.n=n,u}};function p(n,r){for(c=n,l=r,t=0;!d&&i&&!o&&t<s.length;t++){var o,a=s[t],p=f.p,_=a[2];n>3?(o=_===r)&&(l=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=e):a[0]<=p&&((o=n<2&&p<a[1])?(c=0,f.v=r,f.n=a[1]):p<_&&(o=n<3||a[0]>r||r>_)&&(a[4]=n,a[5]=r,f.n=_,c=0))}if(o||n>1)return u;throw d=!0,r}return function(o,s,_){if(i>1)throw TypeError("Generator is already running");for(d&&1===s&&p(s,_),c=s,l=_;(t=c<2?e:l)||!d;){a||(c?c<3?(c>1&&(f.n=-1),p(c,l)):f.n=l:f.v=l);try{if(i=2,a){if(c||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,c<2&&(c=0)}else 1===c&&(t=a.return)&&t.call(a),c<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),c=1);a=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==u)break}catch(t){a=e,c=1,l=t}finally{i=1}}return{value:t,done:d}}}(n,o,a),!0),i}var u={};function c(){}function l(){}function i(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(_regeneratorDefine2(t={},r,function(){return this}),t),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,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(_regeneratorDefine2=function(e,t,n,r){function a(t,n){_regeneratorDefine2(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))})(e,t,n,r)}function asyncGeneratorStep(e,t,n,r,o,a,u){try{var c=e[a](u),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(r,o)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);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(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(n){console.log("Errror in data type: ",e),console.log(n)}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,n,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,setGlobal,proxy,response,code,encodedCode,_module2,result,_t2,_t3,_t4;return _regenerator().w(function(_context5){for(;;)switch(_context5.p=_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:if(setGlobal=function(e,t){var n=Object.getOwnPropertyDescriptor(global,e);if(n)if(n.writable||"function"==typeof n.set)try{global[e]=t}catch(r){}else;else try{Object.defineProperty(global,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}catch(r){}},proxy=new Proxy(nodeWindow,{get:function(e,t){var n=e[t];if("symbol"!==_typeof(n))return n},set:function(e,t,n){return"symbol"!==_typeof(n)&&(e[t]=n,setGlobal(t,n),!0)}}),!Object.prototype.hasOwnProperty.call(global,"window")&&(setGlobal("window",proxy),setGlobal("document",nodeWindow.document),setGlobal("Element",nodeWindow.Element),setGlobal("CharacterData",nodeWindow.CharacterData),setGlobal("this",proxy),setGlobal("self",proxy),setGlobal("Blob",nodeWindow.Blob),setGlobal("Node",nodeWindow.Node),setGlobal("navigator",nodeWindow.navigator),setGlobal("HTMLElement",nodeWindow.HTMLElement),setGlobal("XMLHttpRequest",nodeWindow.XMLHttpRequest),setGlobal("WebSocket",nodeWindow.WebSocket),setGlobal("crypto",nodeWindow.crypto),setGlobal("DOMParser",nodeWindow.DOMParser),setGlobal("angular",angular),global.document))try{global.document.queryCommandSupported=function(){return!1}}catch(_){}return _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,t,n,r,o,a){var u="false"!==n;return importedClass.getTemplate(e,t,u,r,o,a)},getDefaultValue:function(e,t,n,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,t,n,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,t,n){return importedClass.getSettings(e,t,n)},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,n,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.p=u.n){case 0:return l=importedClass,u.p=1,u.n=2,l.getInterpretation(gudhub,e,a,o,r,n);case 2:return i=u.v,s=i.find(function(e){return e.id==t})||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,t,n,r){return importedClass.getInterpretation(e,t,n,r)},getInterpretatedValue:function(e,t,n,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,t,n,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,t,n){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,t,n);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(t){}},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)}
|
|
314
314
|
},{"axios":"O4Aa","./../consts.js":"UV2u"}],"DsUm":[function(require,module,exports) {
|
|
315
315
|
var global = arguments[3];
|
|
316
|
-
var t=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=f;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",
|
|
316
|
+
var t=arguments[3];Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=f;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",a=n.toStringTag||"@@toStringTag";function u(n,r,o,a){var u=r&&r.prototype instanceof f?r:f,s=Object.create(u.prototype);return c(s,"_invoke",function(n,r,o){var c,a,u,f=0,s=o||[],l=!1,p={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return c=e,a=0,u=t,p.n=n,i}};function d(n,r){for(a=n,u=r,e=0;!l&&f&&!o&&e<s.length;e++){var o,c=s[e],d=p.p,y=c[2];n>3?(o=y===r)&&(u=c[(a=c[4])?5:(a=3,3)],c[4]=c[5]=t):c[0]<=d&&((o=n<2&&d<c[1])?(a=0,p.v=r,p.n=c[1]):d<y&&(o=n<3||c[0]>r||r>y)&&(c[4]=n,c[5]=r,p.n=y,a=0))}if(o||n>1)return i;throw l=!0,r}return function(o,s,y){if(f>1)throw TypeError("Generator is already running");for(l&&1===s&&d(s,y),a=s,u=y;(e=a<2?t:u)||!l;){c||(a?a<3?(a>1&&(p.n=-1),d(a,u)):p.n=u:p.v=u);try{if(f=2,c){if(a||(o="next"),e=c[o]){if(!(e=e.call(c,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,a<2&&(a=0)}else 1===a&&(e=c.return)&&e.call(c),a<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),a=1);c=t}else if((e=(l=p.n<0)?u:n.call(r,p))!==i)break}catch(e){c=t,a=1,u=e}finally{f=1}}return{value:e,done:l}}}(n,o,a),!0),s}var i={};function f(){}function s(){}function l(){}e=Object.getPrototypeOf;var p=[][r]?e(e([][r]())):(c(e={},r,function(){return this}),e),d=l.prototype=f.prototype=Object.create(p);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,c(t,a,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=l,c(d,"constructor",l),c(l,"constructor",s),s.displayName="GeneratorFunction",c(l,a,"GeneratorFunction"),c(d),c(d,a,"Generator"),c(d,r,function(){return this}),c(d,"toString",function(){return"[object Generator]"}),(o=function(){return{w:u,m:y}})()}function c(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}(c=function(t,e,n,r){function a(e,n){c(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))})(t,e,n,r)}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 u(t,e,n,r,o,c,a){try{var u=t[c](a),i=u.value}catch(t){return void n(t)}u.done?e(i):Promise.resolve(i).then(r,o)}function i(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var c=t.apply(e,n);function a(t){u(c,r,o,a,i,"next",t)}function i(t){u(c,r,o,a,i,"throw",t)}a(void 0)})}}function f(t,e,n,r,o){return s.apply(this,arguments)}function s(){return(s=i(o().m(function r(c,u,f,s,l){var p,d,y,m,v,g,h,b,w,S;return o().w(function(r){for(;;)switch(r.p=r.n){case 0:return r.p=0,p=function(e,n){var r=Object.getOwnPropertyDescriptor(t,e);if(r){if(r.writable||"function"==typeof r.set)try{t[e]=n}catch(o){}}else try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0,enumerable:!0})}catch(o){}},f||console.error("JS link must be provided for this data type - ".concat(u)),d=!n.IS_WEB&&l?new Proxy(l,{get:function(t,e){var n=t[e];if("symbol"!==a(n))return n},set:function(t,e,n){return"symbol"!==a(n)&&(t[e]=n,p(e,n),!0)}}):null,y=function(r){if(!n.IS_WEB&&!Object.prototype.hasOwnProperty.call(t,"window")&&l&&d&&(p("window",d),p("document",l.document),p("Element",l.Element),p("CharacterData",l.CharacterData),p("this",d),p("self",d),p("Blob",l.Blob),p("Node",l.Node),p("navigator",l.navigator),p("HTMLElement",l.HTMLElement),p("XMLHttpRequest",l.XMLHttpRequest),p("WebSocket",l.WebSocket),p("crypto",l.crypto),p("DOMParser",l.DOMParser),p("customElements",l.customElements),t.document))try{t.document.queryCommandSupported=function(){return!1}}catch(c){}return new Promise(function(){var t=i(o().m(function t(n,c){var a,i,f;return o().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,e.default.get(r);case 1:a=t.v,t.n=3;break;case 2:return t.p=2,f=t.v,console.log("Failed to fetch: ".concat(r," in ghconstructor. Module id: ").concat(u)),t.a(2,c(f));case 3:if(a&&"string"==typeof a.data){t.n=4;break}return t.a(2,c(new Error("Empty or invalid JS for ".concat(u," from ").concat(r))));case 4:i=encodeURIComponent(a.data),n("data:text/javascript;charset=utf-8,"+i);case 5:return t.a(2)}},t,null,[[0,2]])}));return function(e,n){return t.apply(this,arguments)}}())},r.n=1,y(f);case 1:return m=r.v,r.p=2,r.n=3,import(m);case 3:v=r.v,r.n=5;break;case 4:r.p=4,w=r.v,console.log("Error while importing module: ".concat(u)),console.log(w);case 5:if(v&&v.default){r.n=6;break}return console.error("Module ".concat(u," didn't export a default class")),r.a(2,null);case 6:return g=new v.default(u),s&&n.IS_WEB&&((h=document.createElement("link")).href=s,h.setAttribute("data-module",u),h.setAttribute("rel","stylesheet"),document.getElementsByTagName("head")[0].appendChild(h)),b={type:u,getTemplate:function(t,e,n,r,o,c){var a="false"!==n;return g.getTemplate(t,e,a,r,o,c)},getDefaultValue:function(t,e,n,r){return new Promise(function(){var c=i(o().m(function c(a){var u,i;return o().w(function(o){for(;;)switch(o.n){case 0:if(!(u=g.getDefaultValue)){o.n=2;break}return o.n=1,u(t,e,n,r);case 1:i=o.v,a(i),o.n=3;break;case 2:a(null);case 3:return o.a(2)}},c)}));return function(t){return c.apply(this,arguments)}}())},getSettings:function(t,e,n){return g.getSettings(t,e,n)},filter:{getSearchOptions:function(t){var e=g;return e.filter&&e.filter.getSearchOptions?g.filter.getSearchOptions(t):[]},getDropdownValues:function(){var t=g;return t.filter&&t.filter.getDropdownValues?t.filter.getDropdownValues():[]}},getInterpretation:function(t,e,n,r,a,f){return new Promise(function(){var s=i(o().m(function i(s){var l,p,d,y,m;return o().w(function(o){for(;;)switch(o.p=o.n){case 0:return l=g,o.p=1,o.n=2,l.getInterpretation(c,t,f,a,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:y=o.v,s({html:y}),o.n=5;break;case 4:o.p=4,m=o.v,console.log("ERROR IN ".concat(u),m),s({html:"<span>no interpretation</span>"});case 5:return o.a(2)}},i,null,[[1,4]])}));return function(t){return s.apply(this,arguments)}}())},getInterpretationsList:function(t,e,n,r){return g.getInterpretation(t,e,n,r)},getInterpretatedValue:function(t,e,n,r){return new Promise(function(){var c=i(o().m(function c(a){var u,i;return o().w(function(o){for(;;)switch(o.n){case 0:if(!(u=g.getInterpretatedValue)){o.n=2;break}return o.n=1,u(t,e,n,r);case 1:i=o.v,a(i),o.n=3;break;case 2:a(t);case 3:return o.a(2)}},c)}));return function(t){return c.apply(this,arguments)}}())},onMessage:function(t,e,n){return new Promise(function(){var r=i(o().m(function r(c){var a,u;return o().w(function(r){for(;;)switch(r.n){case 0:if(!(a=g.onMessage)){r.n=2;break}return r.n=1,a(t,e,n);case 1:u=r.v,c(u);case 2:c(null);case 3:return r.a(2)}},r)}));return function(t){return r.apply(this,arguments)}}())},extendController:function(t){g.getActionScope(t)},runAction:function(t){try{g.runAction(t)}catch(e){}},getWindowScope:function(t){return g.getWindowScope(t)},getWindowHTML:function(t){return g.getWindowHTML(t)}},r.a(2,b);case 7:r.p=7,S=r.v,console.log(S),console.log("Failed in createClassInstance (ghconstructor). Module id: ".concat(u,". JS url: ").concat(f));case 8:return r.a(2)}},r,null,[[2,4],[0,7]])}))).apply(this,arguments)}
|
|
317
317
|
},{"axios":"O4Aa","./../consts.js":"UV2u"}],"Htuh":[function(require,module,exports) {
|
|
318
|
-
"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){
|
|
318
|
+
"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){function i(e,n){u(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(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)}}()}])}();
|
|
319
319
|
},{"./createAngularModuleInstance.js":"osSN","./createClassInstance.js":"DsUm"}],"q0my":[function(require,module,exports) {
|
|
320
|
-
"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 s(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){o(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 o(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,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return p=t.done,t},e:function(t){s=!0,a=t},f:function(){try{p||null==r.return||r.return()}finally{if(s)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 o=i&&i.prototype instanceof s?i:s,u=Object.create(o.prototype);return h(u,"_invoke",function(r,i,n){var a,s,o,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,s=0,o=t,l.n=r,p}};function h(r,i){for(s=r,o=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)&&(o=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=t):a[0]<=h&&((n=r<2&&h<a[1])?(s=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,s=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),s=c,o=v;(e=s<2?t:o)||!f;){a||(s?s<3?(s>1&&(l.n=-1),h(s,o)):l.n=o:l.v=o);try{if(u=2,a){if(s||(n="next"),e=a[n]){if(!(e=e.call(a,o)))throw TypeError("iterator result is not an object");if(!e.done)return e;o=e.value,s<2&&(s=0)}else 1===s&&(e=a.return)&&e.call(a),s<2&&(o=TypeError("The iterator does not provide a '"+n+"' method"),s=1);a=t}else if((e=(f=l.n<0)?o:r.call(i,l))!==p)break}catch(e){a=t,s=1,o=e}finally{u=1}}return{value:e,done:f}}}(r,n,a),!0),u}var p={};function s(){}function o(){}function u(){}e=Object.getPrototypeOf;var c=[][i]?e(e([][i]())):(h(e={},i,function(){return this}),e),f=u.prototype=s.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 o.prototype=u,h(f,"constructor",u),h(u,"constructor",o),o.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 s=t[a](p),o=s.value}catch(t){return void r(t)}s.done?e(o):Promise.resolve(o).then(i,n)}function _(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,s,"next",t)}function s(t){v(a,i,n,p,s,"throw",t)}p(void 0)})}}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 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 g(t,e,r){return e&&m(t.prototype,e),r&&m(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 g(function t(e,r,i,n,a,p,s){d(this,t),this.storage=e,this.pipeService=r,this.req=i,this.ws=n,this.applistReceived=!1,this.activateSW=s,this.chunksManager=a,this.util=p,this.appListeners(),this.appRequestCache=new Map},[{key:"createNewAppApi",value:function(){var t=_(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=_(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=_(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=_(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=_(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=_(l().m(function t(){var e,r,i,n,a,p,s,o,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]={},s=0;s<a.items_list[p].fields.length;s++)a.items_object[a.items_list[p].item_id][a.items_list[p].fields[s].field_id]=a.items_list[p].fields[s];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,o=t.v,console.log(o);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=_(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 s(s({},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=_(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=_(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=_(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=_(l().m(function t(e){var i,n,a,p=this;return l().w(function(t){for(;;)switch(t.n){case 0:if(e){t.n=1;break}return t.a(2,null);case 1:if(!(i=this.getAppFromStorage(e))){t.n=2;break}return t.a(2,i);case 2:if(!this.appRequestCache.has(e)){t.n=3;break}return t.a(2,this.appRequestCache.get(e));case 3:return n=this,a=new Promise(function(){var t=_(l().m(function t(i,a){var o,u,c,f,h,v,_,d;return l().w(function(t){for(;;)switch(t.n){case 0:return t.p=0,t.n=1,p.getAppApi(e);case 1:if((o=t.v)||a(),!o.chunks||!o.chunks.length){t.n=3;break}return t.n=2,n.chunksManager.getChunks(e,o.chunks);case 2:u=t.v,o.items_list=n.util.mergeChunks([].concat(r(u),[o]));case 3:if(c=s({},o),f=[],h=[],Array.isArray(o.items_list))for(v=0;v<o.items_list.length;v++)o.items_list[v].trash?h.push(o.items_list[v]):f.push(o.items_list[v]);if(c.items_list=f,c.trash_items=h,_=[],Array.isArray(o.field_list))for(d=0;d<o.field_list.length;d++)o.field_list[d].trash||_.push(o.field_list[d]);c.field_list=_,i(c),n.saveAppInStorage(c),n.ws.addSubscription(e),t.n=5;break;case 4:t.p=4,t.v,a();case 5:return t.a(2)}},t,null,[[0,4]])}));return function(e,r){return t.apply(this,arguments)}}()),n.appRequestCache.set(e,a),t.a(2,a)}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateApp",value:function(){var t=_(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=_(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=_(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=_(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=_(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=_(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=_(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=_(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=_(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=_(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=_(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=_(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=_(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,s=t.deletedItems;(a.length||p.length||s.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)}}())}}])}();
|
|
320
|
+
"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 s(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){o(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 o(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,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return p=t.done,t},e:function(t){s=!0,a=t},f:function(){try{p||null==r.return||r.return()}finally{if(s)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 o=i&&i.prototype instanceof s?i:s,u=Object.create(o.prototype);return h(u,"_invoke",function(r,i,n){var a,s,o,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,s=0,o=t,l.n=r,p}};function h(r,i){for(s=r,o=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)&&(o=a[(s=a[4])?5:(s=3,3)],a[4]=a[5]=t):a[0]<=h&&((n=r<2&&h<a[1])?(s=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,s=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),s=c,o=v;(e=s<2?t:o)||!f;){a||(s?s<3?(s>1&&(l.n=-1),h(s,o)):l.n=o:l.v=o);try{if(u=2,a){if(s||(n="next"),e=a[n]){if(!(e=e.call(a,o)))throw TypeError("iterator result is not an object");if(!e.done)return e;o=e.value,s<2&&(s=0)}else 1===s&&(e=a.return)&&e.call(a),s<2&&(o=TypeError("The iterator does not provide a '"+n+"' method"),s=1);a=t}else if((e=(f=l.n<0)?o:r.call(i,l))!==p)break}catch(e){a=t,s=1,o=e}finally{u=1}}return{value:e,done:f}}}(r,n,a),!0),u}var p={};function s(){}function o(){}function u(){}e=Object.getPrototypeOf;var c=[][i]?e(e([][i]())):(h(e={},i,function(){return this}),e),f=u.prototype=s.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 o.prototype=u,h(f,"constructor",u),h(u,"constructor",o),o.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){function a(e,r){h(t,e,function(t){return this._invoke(e,r,t)})}e?n?n(t,e,{value:r,enumerable:!i,configurable:!i,writable:!i}):t[e]=r:(a("next",0),a("throw",1),a("return",2))})(t,e,r,i)}function v(t,e,r,i,n,a,p){try{var s=t[a](p),o=s.value}catch(t){return void r(t)}s.done?e(o):Promise.resolve(o).then(i,n)}function _(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,s,"next",t)}function s(t){v(a,i,n,p,s,"throw",t)}p(void 0)})}}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 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 g(t,e,r){return e&&m(t.prototype,e),r&&m(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 g(function t(e,r,i,n,a,p,s){d(this,t),this.storage=e,this.pipeService=r,this.req=i,this.ws=n,this.applistReceived=!1,this.activateSW=s,this.chunksManager=a,this.util=p,this.appListeners(),this.appRequestCache=new Map},[{key:"createNewAppApi",value:function(){var t=_(l().m(function t(e){var r,i;return l().w(function(t){for(;;)switch(t.p=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=_(l().m(function t(e){var r,i;return l().w(function(t){for(;;)switch(t.p=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=_(l().m(function t(e){var r,i;return l().w(function(t){for(;;)switch(t.p=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=_(l().m(function t(){var e,r;return l().w(function(t){for(;;)switch(t.p=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=_(l().m(function t(e){var r,i;return l().w(function(t){for(;;)switch(t.p=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=_(l().m(function t(){var e,r,i,n,a,p,s,o,c,f=arguments;return l().w(function(t){for(;;)switch(t.p=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]={},s=0;s<a.items_list[p].fields.length;s++)a.items_object[a.items_list[p].item_id][a.items_list[p].fields[s].field_id]=a.items_list[p].fields[s];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,o=t.v,console.log(o);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=_(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 s(s({},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=_(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=_(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=_(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=_(l().m(function t(e){var i,n,a,p=this;return l().w(function(t){for(;;)switch(t.n){case 0:if(e){t.n=1;break}return t.a(2,null);case 1:if(!(i=this.getAppFromStorage(e))){t.n=2;break}return t.a(2,i);case 2:if(!this.appRequestCache.has(e)){t.n=3;break}return t.a(2,this.appRequestCache.get(e));case 3:return n=this,a=new Promise(function(){var t=_(l().m(function t(i,a){var o,u,c,f,h,v,_,d;return l().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,p.getAppApi(e);case 1:if((o=t.v)||a(),!o.chunks||!o.chunks.length){t.n=3;break}return t.n=2,n.chunksManager.getChunks(e,o.chunks);case 2:u=t.v,o.items_list=n.util.mergeChunks([].concat(r(u),[o]));case 3:if(c=s({},o),f=[],h=[],Array.isArray(o.items_list))for(v=0;v<o.items_list.length;v++)o.items_list[v].trash?h.push(o.items_list[v]):f.push(o.items_list[v]);if(c.items_list=f,c.trash_items=h,_=[],Array.isArray(o.field_list))for(d=0;d<o.field_list.length;d++)o.field_list[d].trash||_.push(o.field_list[d]);c.field_list=_,i(c),n.saveAppInStorage(c),n.ws.addSubscription(e),t.n=5;break;case 4:t.p=4,t.v,a();case 5:return t.a(2)}},t,null,[[0,4]])}));return function(e,r){return t.apply(this,arguments)}}()),n.appRequestCache.set(e,a),t.a(2,a)}},t,this)}));return function(e){return t.apply(this,arguments)}}()},{key:"updateApp",value:function(){var t=_(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=_(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=_(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=_(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=_(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=_(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=_(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=_(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=_(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=_(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=_(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=_(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=_(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,s=t.deletedItems;(a.length||p.length||s.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)}}())}}])}();
|
|
321
321
|
},{"../consts.js":"UV2u"}],"UUd3":[function(require,module,exports) {
|
|
322
|
-
"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})||i.trash_items.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))}),i.items_list.some(function(e){return e.item_id===o.item_id})||(i.trash_items=i.trash_items.filter(function(e){return e.item_id!==o.item_id}),i.items_list.push(o)))}),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,n,u=arguments;return o().w(function(e){for(;;)switch(e.n){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:[],e.n=1,this.appProcessor.getApp(t);case 1:(n=e.v)&&(n.items_list=n.items_list.filter(function(e){return!r.find(function(t){return e.item_id==t.item_id})||(null!=n&&n.trash_items||(n.trash_items=[]),null==n||n.trash_items.push(i(i({},e),{},{trash:!0,last_update:Date.now()})),delete n.items_object[e.item_id],!1)}),this.pipeService.emit("gh_items_update",{app_id:t},n.items_list),this.storage.updateApp(n));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;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.updateItems(t,i);case 1: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)}}())}}])}();
|
|
322
|
+
"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){function o(t,r){u(e,t,function(e){return this._invoke(t,r,e)})}t?n?n(e,t,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[t]=r:(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.p=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.p=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})||i.trash_items.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))}),i.items_list.some(function(e){return e.item_id===o.item_id})||(i.trash_items=i.trash_items.filter(function(e){return e.item_id!==o.item_id}),i.items_list.push(o)))}),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,n,u=arguments;return o().w(function(e){for(;;)switch(e.n){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:[],e.n=1,this.appProcessor.getApp(t);case 1:(n=e.v)&&(n.items_list=n.items_list.filter(function(e){return!r.find(function(t){return e.item_id==t.item_id})||(null!=n&&n.trash_items||(n.trash_items=[]),null==n||n.trash_items.push(i(i({},e),{},{trash:!0,last_update:Date.now()})),delete n.items_object[e.item_id],!1)}),this.pipeService.emit("gh_items_update",{app_id:t},n.items_list),this.storage.updateApp(n));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;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.updateItems(t,i);case 1: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)}}())}}])}();
|
|
323
323
|
},{"../utils.js":"EgeI"}],"PoPF":[function(require,module,exports) {
|
|
324
|
-
"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)}}())}}])}();
|
|
324
|
+
"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){function u(t,n){r(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[t]=n:(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.p=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)}}())}}])}();
|
|
325
325
|
},{}],"XUT2":[function(require,module,exports) {
|
|
326
|
-
"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})(:\d+)?([\/\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)}}()}])}();
|
|
326
|
+
"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){function o(e,r){c(t,e,function(t){return this._invoke(e,r,t)})}e?i?i(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(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.p=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.p=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.p=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.p=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})(:\d+)?([\/\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)}}()}])}();
|
|
327
327
|
},{}],"KHGc":[function(require,module,exports) {
|
|
328
|
-
"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){
|
|
328
|
+
"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){function u(n,e){r(t,n,function(t){return this._invoke(n,e,t)})}n?i?i(t,n,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[n]=e:(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.p=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.p=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)}}()}])}();
|
|
329
329
|
},{}],"K1Gs":[function(require,module,exports) {
|
|
330
330
|
"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)}})}}])}();
|
|
331
331
|
},{}],"X4Dt":[function(require,module,exports) {
|
|
332
|
-
"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){
|
|
332
|
+
"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){function a(e,r){n(t,e,function(t){return this._invoke(e,r,t)})}e?i?i(t,e,{value:r,enumerable:!o,configurable:!o,writable:!o}):t[e]=r:(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)}}()}])}();
|
|
333
333
|
},{}],"sPce":[function(require,module,exports) {
|
|
334
334
|
"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;
|
|
335
335
|
},{}],"qJXG":[function(require,module,exports) {
|
|
336
|
-
"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){
|
|
336
|
+
"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){function i(t,e){n(r,t,function(r){return this._invoke(t,e,r)})}t?u?u(r,t,{value:e,enumerable:!o,configurable:!o,writable:!o}):r[t]=e:(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.p=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.p=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.p=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.p=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.p=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.p=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.p=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.p=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)}}()}])}();
|
|
337
337
|
},{}],"Z7AV":[function(require,module,exports) {
|
|
338
|
-
"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){
|
|
338
|
+
"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){function i(t,e){n(r,t,function(r){return this._invoke(t,e,r)})}t?u?u(r,t,{value:e,enumerable:!o,configurable:!o,writable:!o}):r[t]=e:(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.p=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.p=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.p=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.p=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.p=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)}}()}])}();
|
|
339
339
|
},{}],"LS0j":[function(require,module,exports) {
|
|
340
|
-
"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,
|
|
340
|
+
"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,g=u[2];t>3?(o=g===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<g&&(o=t<3||u[0]>n||n>g)&&(u[4]=t,u[5]=n,l.n=g,i=0))}if(o||t>1)return a;throw f=!0,n}return function(o,s,g){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&y(s,g),i=s,p=g;(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 g(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:g}})()}function o(r,e,t,n){var u=Object.defineProperty;try{u({},"",{})}catch(r){u=0}(o=function(r,e,t,n){function i(e,t){o(r,e,function(r){return this._invoke(e,t,r)})}e?u?u(r,e,{value:t,enumerable:!n,configurable:!n,writable:!n}):r[e]=t:(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)}}])}();
|
|
341
341
|
},{"../groupManager/GroupManager.js":"qJXG","./AppGroupSharing.js":"Z7AV"}],"XaHW":[function(require,module,exports) {
|
|
342
|
-
"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){
|
|
342
|
+
"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){function i(r,e){n(t,r,function(t){return this._invoke(r,e,t)})}r?u?u(t,r,{value:e,enumerable:!o,configurable:!o,writable:!o}):t[r]=e:(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.p=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.p=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.p=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.p=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.p=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)}}()}])}();
|
|
343
343
|
},{}],"quyV":[function(require,module,exports) {
|
|
344
|
-
"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){
|
|
344
|
+
"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){function u(e,n){r(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n:(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)}}()}])}();
|
|
345
345
|
},{}],"U9gy":[function(require,module,exports) {
|
|
346
|
-
"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)}}])}();
|
|
346
|
+
"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){function o(t,r){w(e,t,function(e){return this._invoke(t,r,e)})}t?n?n(e,t,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[t]=r:(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.p=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)}}])}();
|
|
347
347
|
},{"./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) {
|
|
348
348
|
"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;
|
|
349
349
|
},{"regenerator-runtime/runtime.js":"KA2S","./GUDHUB/gudhub.js":"U9gy"}]},{},["iRRN"], "GudHubLibrary")
|