mftsccs-browser 2.1.12-beta → 2.1.14-beta
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/dist/main.bundle.js
CHANGED
|
@@ -1734,7 +1734,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1734
1734
|
\***************************************************/
|
|
1735
1735
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1736
1736
|
|
|
1737
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DataIdBuildLayer: () => (/* binding */ DataIdBuildLayer),\n/* harmony export */ FormatConceptsAndConnections: () => (/* binding */ FormatConceptsAndConnections),\n/* harmony export */ FormatFromConnections: () => (/* binding */ FormatFromConnections),\n/* harmony export */ FormatFromConnectionsAltered: () => (/* binding */ FormatFromConnectionsAltered),\n/* harmony export */ FormatFromConnectionsAlteredArray: () => (/* binding */ FormatFromConnectionsAlteredArray),\n/* harmony export */ SearchLinkMultipleAll: () => (/* binding */ SearchLinkMultipleAll)\n/* harmony export */ });\n/* harmony import */ var _Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Api/Search/SearchLinkMultipleApi */ \"./src/Api/Search/SearchLinkMultipleApi.ts\");\n/* harmony import */ var _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants/FormatConstants */ \"./src/Constants/FormatConstants.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\n/* harmony import */ var _GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../GetCompositionBulk */ \"./src/Services/GetCompositionBulk.ts\");\n/* harmony import */ var _SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SearchWithTypeAndLinker */ \"./src/Services/Search/SearchWithTypeAndLinker.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\nfunction SearchLinkMultipleAll(searchQuery_1) {\n return __awaiter(this, arguments, void 0, function* (searchQuery, token = \"\", caller = null, format = _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.DATAID) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n try {\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('SearchLinkMultipleAll', { searchQuery, token, caller, format });\n // console.log('data received search from sw', res)\n return res.data;\n }\n }\n catch (error) {\n console.error('SearchLinkMultipleAll error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n let conceptIds = [];\n let linkers = [];\n let connections = [];\n let reverse = [];\n let mainCompositionId = searchQuery[0].composition;\n let conceptsConnections = {};\n let result = {};\n if (caller === null || caller === void 0 ? void 0 : caller.isDataLoaded) {\n conceptsConnections.compositionIds = (_a = caller.conceptIds) === null || _a === void 0 ? void 0 : _a.slice();\n conceptsConnections.internalConnections = (_b = caller.internalConnections) === null || _b === void 0 ? void 0 : _b.slice();\n conceptsConnections.linkers = (_c = caller.linkers) === null || _c === void 0 ? void 0 : _c.slice();\n conceptsConnections.reverse = (_d = caller.reverse) === null || _d === void 0 ? void 0 : _d.slice();\n result = conceptsConnections;\n conceptIds = result.compositionIds;\n connections = result.internalConnections;\n linkers = result.linkers;\n reverse = result.reverse;\n }\n else {\n conceptsConnections = yield (0,_Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_0__.SearchLinkMultipleApi)(searchQuery, token);\n if (caller) {\n caller.conceptIds = (_e = conceptsConnections.compositionIds) === null || _e === void 0 ? void 0 : _e.slice();\n caller.internalConnections = (_f = conceptsConnections.internalConnections) === null || _f === void 0 ? void 0 : _f.slice();\n caller.linkers = (_g = conceptsConnections.linkers) === null || _g === void 0 ? void 0 : _g.slice();\n caller.reverse = (_h = conceptsConnections.reverse) === null || _h === void 0 ? void 0 : _h.slice();\n caller.isDataLoaded = true;\n }\n result = conceptsConnections;\n conceptIds = result.compositionIds;\n connections = result.internalConnections;\n linkers = result.linkers;\n reverse = result.reverse;\n }\n let out = yield DataIdBuildLayer(linkers, conceptIds, connections, reverse, mainCompositionId, searchQuery[0], format);\n return out;\n }\n catch (e) {\n console.log(\"this is the error in the search link multiple\", e);\n throw e;\n }\n });\n}\n/**\n * ######### This layer builds the data. Format is dataid ##########\n * @param linkers list of ids that help us\n * @param conceptIds this is all the concept ids that need to be composited\n * @param connections these are the internal connections of the compositions that help in creating individual compositions\n * @param reverse this is the list of connection ids that need to show reverse connections(to->from)\n * @param mainCompositionId this is the main centre point of this data.\n * @returns\n */\nfunction DataIdBuildLayer(linkers_1, conceptIds_1, connections_1, reverse_1, mainCompositionId_1, searchQuery_1) {\n return __awaiter(this, arguments, void 0, function* (linkers, conceptIds, connections, reverse, mainCompositionId, searchQuery, format = _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.DATAID) {\n try {\n let prefetchConnections = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetConnectionDataPrefetch)(linkers);\n let concepts;\n let out;\n if (format == _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.JUSTDATA) {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsInObject)(conceptIds, connections);\n out = yield FormatFromConnections(linkers, concepts, mainCompositionId, reverse);\n }\n else if (format == _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.NORMAL) {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsInObjectNormal)(conceptIds, connections);\n out = yield FormatFromConnections(linkers, concepts, mainCompositionId, reverse);\n }\n else if (format == 100) {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsWithDataIdInObjectNew)(conceptIds, connections);\n out = yield FormatFromConnectionsAltered(prefetchConnections, concepts, mainCompositionId, reverse);\n }\n else if (format == _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.LISTNORMAL) {\n out = yield (0,_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_4__.formatDataArrayNormal)(linkers, conceptIds, connections, searchQuery.ofCompositions, reverse);\n }\n else {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsWithDataIdInObject)(conceptIds, connections);\n out = yield FormatFromConnectionsAltered(prefetchConnections, concepts, mainCompositionId, reverse);\n }\n return out;\n }\n catch (err) {\n console.log('Error Occured in build layer', err);\n return undefined;\n }\n });\n}\n/**\n * ## Format is DATAID ##\n * This is altered format and is different from others because it passes all the connections prebuilt/prefetched\n * This will not let the connections to be again fetched from the memory.\n * @param connections the type connections that need (external connections) to be passed\n * @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n * @param mainComposition this is the id of the main composition that builds the tree\n * @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n * @returns\n */\nfunction FormatFromConnectionsAltered(connections_1, compositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, mainComposition, reverse = []) {\n let startTime = new Date().getTime();\n let mainData = {};\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n mainData = compositionData[mainComposition];\n return mainData;\n });\n}\n/**\n * ######### Format is normal ######### used for listing.\n * This is helpful in building a format that has multiple mainCompositions i.e. in the context of the list\n * The list format is helpful because you do not have to go over each individual query.\n * @param connections the type connections that need (external connections) to be passed\n * @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n * @param mainComposition this is list of ids of the main composition that builds the tree\n * @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n * @returns\n */\nfunction FormatConceptsAndConnections(connections_1, compositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, mainComposition, reverse = []) {\n let mainData = [];\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let newData = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let newData = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n for (let i = 0; i < mainComposition.length; i++) {\n let mymainData = compositionData[mainComposition[i]];\n if (mymainData) {\n mainData.push(mymainData);\n }\n }\n return mainData;\n });\n}\n/**\n * ############ Format is data-id and is used for list. ############\n * This is helpful in building a format that has multiple mainCompositions i.e. in the context of the list\n * The list format is helpful because you do not have to go over each individual query.\n * @param connections the type connections that need (external connections) to be passed\n * @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n * @param mainComposition this is list of ids of the main composition that builds the tree\n * @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n * @returns\n */\nfunction FormatFromConnectionsAlteredArray(connections_1, compositionData_1, conceptIds_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, conceptIds, mainComposition, reverse = []) {\n let startTime = new Date().getTime();\n let mainData = [];\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n for (let i = 0; i < mainComposition.length; i++) {\n let mymainData = compositionData[mainComposition[i]];\n if (mymainData) {\n mainData.push(mymainData);\n }\n }\n return mainData;\n });\n}\n/**\n * ########## Format works with JUSTDATA / NORMAL ########### used for single origin concept\n * @param linkers this is the list of linkers that\n * @param compositionData\n * @param mainComposition\n * @param reverse list of connection ids that need to show reverse conneciton.\n * @returns\n */\nfunction FormatFromConnections(linkers_1, compositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (linkers, compositionData, mainComposition, reverse = []) {\n let mainData = {};\n let connections = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConnectionBulk)(linkers);\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConceptBulk)(myConcepts);\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata;\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata;\n // console.log(\"this is the new data\", newData);\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n mainData = compositionData[mainComposition];\n return mainData;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Search/SearchLinkMultiple.ts?");
|
|
1737
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DataIdBuildLayer: () => (/* binding */ DataIdBuildLayer),\n/* harmony export */ FormatConceptsAndConnections: () => (/* binding */ FormatConceptsAndConnections),\n/* harmony export */ FormatFromConnections: () => (/* binding */ FormatFromConnections),\n/* harmony export */ FormatFromConnectionsAltered: () => (/* binding */ FormatFromConnectionsAltered),\n/* harmony export */ FormatFromConnectionsAlteredArray: () => (/* binding */ FormatFromConnectionsAlteredArray),\n/* harmony export */ SearchLinkMultipleAll: () => (/* binding */ SearchLinkMultipleAll)\n/* harmony export */ });\n/* harmony import */ var _Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Api/Search/SearchLinkMultipleApi */ \"./src/Api/Search/SearchLinkMultipleApi.ts\");\n/* harmony import */ var _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants/FormatConstants */ \"./src/Constants/FormatConstants.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../app */ \"./src/app.ts\");\n/* harmony import */ var _GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../GetCompositionBulk */ \"./src/Services/GetCompositionBulk.ts\");\n/* harmony import */ var _SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SearchWithTypeAndLinker */ \"./src/Services/Search/SearchWithTypeAndLinker.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\nfunction SearchLinkMultipleAll(searchQuery_1) {\n return __awaiter(this, arguments, void 0, function* (searchQuery, token = \"\", caller = null, format = _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.DATAID) {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n try {\n try {\n if (_app__WEBPACK_IMPORTED_MODULE_2__.serviceWorker) {\n const res = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.sendMessage)('SearchLinkMultipleAll', { searchQuery, token, caller, format });\n // console.log('data received search from sw', res)\n return res.data;\n }\n }\n catch (error) {\n console.error('SearchLinkMultipleAll error sw: ', error);\n (0,_app__WEBPACK_IMPORTED_MODULE_2__.handleServiceWorkerException)(error);\n }\n let conceptIds = [];\n let linkers = [];\n let connections = [];\n let reverse = [];\n let mainCompositionId = searchQuery[0].composition;\n let conceptsConnections = {};\n let result = {};\n if (caller === null || caller === void 0 ? void 0 : caller.isDataLoaded) {\n conceptsConnections.compositionIds = (_a = caller.conceptIds) === null || _a === void 0 ? void 0 : _a.slice();\n conceptsConnections.internalConnections = (_b = caller.internalConnections) === null || _b === void 0 ? void 0 : _b.slice();\n conceptsConnections.linkers = (_c = caller.linkers) === null || _c === void 0 ? void 0 : _c.slice();\n conceptsConnections.reverse = (_d = caller.reverse) === null || _d === void 0 ? void 0 : _d.slice();\n result = conceptsConnections;\n conceptIds = result.compositionIds;\n connections = result.internalConnections;\n linkers = result.linkers;\n reverse = result.reverse;\n }\n else {\n console.log('calling api');\n conceptsConnections = yield (0,_Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_0__.SearchLinkMultipleApi)(searchQuery, token);\n console.log('calling api end');\n if (caller) {\n caller.conceptIds = (_e = conceptsConnections.compositionIds) === null || _e === void 0 ? void 0 : _e.slice();\n caller.internalConnections = (_f = conceptsConnections.internalConnections) === null || _f === void 0 ? void 0 : _f.slice();\n caller.linkers = (_g = conceptsConnections.linkers) === null || _g === void 0 ? void 0 : _g.slice();\n caller.reverse = (_h = conceptsConnections.reverse) === null || _h === void 0 ? void 0 : _h.slice();\n caller.isDataLoaded = true;\n }\n result = conceptsConnections;\n conceptIds = result.compositionIds;\n connections = result.internalConnections;\n linkers = result.linkers;\n reverse = result.reverse;\n }\n let out = yield DataIdBuildLayer(linkers, conceptIds, connections, reverse, mainCompositionId, searchQuery[0], format);\n return out;\n }\n catch (e) {\n console.log(\"this is the error in the search link multiple\", e);\n throw e;\n }\n });\n}\n/**\n * ######### This layer builds the data. Format is dataid ##########\n * @param linkers list of ids that help us\n * @param conceptIds this is all the concept ids that need to be composited\n * @param connections these are the internal connections of the compositions that help in creating individual compositions\n * @param reverse this is the list of connection ids that need to show reverse connections(to->from)\n * @param mainCompositionId this is the main centre point of this data.\n * @returns\n */\nfunction DataIdBuildLayer(linkers_1, conceptIds_1, connections_1, reverse_1, mainCompositionId_1, searchQuery_1) {\n return __awaiter(this, arguments, void 0, function* (linkers, conceptIds, connections, reverse, mainCompositionId, searchQuery, format = _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.DATAID) {\n try {\n let prefetchConnections = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetConnectionDataPrefetch)(linkers);\n let concepts;\n let out;\n if (format == _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.JUSTDATA) {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsInObject)(conceptIds, connections);\n out = yield FormatFromConnections(linkers, concepts, mainCompositionId, reverse);\n }\n else if (format == _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.NORMAL) {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsInObjectNormal)(conceptIds, connections);\n out = yield FormatFromConnections(linkers, concepts, mainCompositionId, reverse);\n }\n else if (format == 100) {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsWithDataIdInObjectNew)(conceptIds, connections);\n out = yield FormatFromConnectionsAltered(prefetchConnections, concepts, mainCompositionId, reverse);\n }\n else if (format == _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_1__.LISTNORMAL) {\n out = yield (0,_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_4__.formatDataArrayNormal)(linkers, conceptIds, connections, searchQuery.ofCompositions, reverse);\n }\n else {\n concepts = yield (0,_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_3__.GetCompositionFromConnectionsWithDataIdInObject)(conceptIds, connections);\n out = yield FormatFromConnectionsAltered(prefetchConnections, concepts, mainCompositionId, reverse);\n }\n return out;\n }\n catch (err) {\n console.log('Error Occured in build layer', err);\n return undefined;\n }\n });\n}\n/**\n * ## Format is DATAID ##\n * This is altered format and is different from others because it passes all the connections prebuilt/prefetched\n * This will not let the connections to be again fetched from the memory.\n * @param connections the type connections that need (external connections) to be passed\n * @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n * @param mainComposition this is the id of the main composition that builds the tree\n * @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n * @returns\n */\nfunction FormatFromConnectionsAltered(connections_1, compositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, mainComposition, reverse = []) {\n let startTime = new Date().getTime();\n let mainData = {};\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n mainData = compositionData[mainComposition];\n return mainData;\n });\n}\n/**\n * ######### Format is normal ######### used for listing.\n * This is helpful in building a format that has multiple mainCompositions i.e. in the context of the list\n * The list format is helpful because you do not have to go over each individual query.\n * @param connections the type connections that need (external connections) to be passed\n * @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n * @param mainComposition this is list of ids of the main composition that builds the tree\n * @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n * @returns\n */\nfunction FormatConceptsAndConnections(connections_1, compositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, mainComposition, reverse = []) {\n let mainData = [];\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let newData = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let newData = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n for (let i = 0; i < mainComposition.length; i++) {\n let mymainData = compositionData[mainComposition[i]];\n if (mymainData) {\n mainData.push(mymainData);\n }\n }\n return mainData;\n });\n}\n/**\n * ############ Format is data-id and is used for list. ############\n * This is helpful in building a format that has multiple mainCompositions i.e. in the context of the list\n * The list format is helpful because you do not have to go over each individual query.\n * @param connections the type connections that need (external connections) to be passed\n * @param compositionData this is a dictionary type of format that has all the build compositions {id: { actual data}}\n * @param mainComposition this is list of ids of the main composition that builds the tree\n * @param reverse this is the list of connections ids that needs to go to the reverse direction (to---->from)\n * @returns\n */\nfunction FormatFromConnectionsAlteredArray(connections_1, compositionData_1, conceptIds_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (connections, compositionData, conceptIds, mainComposition, reverse = []) {\n let startTime = new Date().getTime();\n let mainData = [];\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata === null || mydata === void 0 ? void 0 : mydata.data;\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n for (let i = 0; i < mainComposition.length; i++) {\n let mymainData = compositionData[mainComposition[i]];\n if (mymainData) {\n mainData.push(mymainData);\n }\n }\n return mainData;\n });\n}\n/**\n * ########## Format works with JUSTDATA / NORMAL ########### used for single origin concept\n * @param linkers this is the list of linkers that\n * @param compositionData\n * @param mainComposition\n * @param reverse list of connection ids that need to show reverse conneciton.\n * @returns\n */\nfunction FormatFromConnections(linkers_1, compositionData_1, mainComposition_1) {\n return __awaiter(this, arguments, void 0, function* (linkers, compositionData, mainComposition, reverse = []) {\n let mainData = {};\n let connections = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConnectionBulk)(linkers);\n let myConcepts = [];\n for (let i = 0; i < connections.length; i++) {\n myConcepts.push(connections[i].toTheConceptId);\n myConcepts.push(connections[i].ofTheConceptId);\n myConcepts.push(connections[i].typeId);\n }\n yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetConceptBulk)(myConcepts);\n connections.sort(function (x, y) {\n return y.id - x.id;\n });\n for (let i = 0; i < connections.length; i++) {\n let reverseFlag = false;\n if (reverse.includes(connections[i].id)) {\n reverseFlag = true;\n }\n if (reverseFlag == true) {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].toTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata;\n let key = Object.keys(newData)[0];\n try {\n let reverseCharater = linkerConcept.characterValue + \"_reverse\";\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][reverseCharater])) {\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][reverseCharater] = [];\n newData[key][reverseCharater].push(compositionData[connections[i].ofTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n else {\n if (compositionData[connections[i].ofTheConceptId] && compositionData[connections[i].toTheConceptId]) {\n let mydata = compositionData[connections[i].ofTheConceptId];\n let linkerConcept = yield (0,_app__WEBPACK_IMPORTED_MODULE_2__.GetTheConcept)(connections[i].typeId);\n let newData = mydata;\n // console.log(\"this is the new data\", newData);\n let key = Object.keys(newData)[0];\n try {\n if (typeof newData === \"string\") {\n newData = {};\n }\n if (Array.isArray(newData[key][linkerConcept.characterValue])) {\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n else {\n if (typeof newData[key] === \"string\") {\n newData[key] = {};\n }\n newData[key][linkerConcept.characterValue] = [];\n newData[key][linkerConcept.characterValue].push(compositionData[connections[i].toTheConceptId]);\n }\n }\n catch (ex) {\n console.log(\"this is error\", ex);\n }\n }\n }\n }\n mainData = compositionData[mainComposition];\n return mainData;\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Services/Search/SearchLinkMultiple.ts?");
|
|
1738
1738
|
|
|
1739
1739
|
/***/ }),
|
|
1740
1740
|
|
|
@@ -1904,7 +1904,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1904
1904
|
\********************************************/
|
|
1905
1905
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1906
1906
|
|
|
1907
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ convertWidgetTreeToWidget: () => (/* binding */ convertWidgetTreeToWidget),\n/* harmony export */ convertWidgetTreeToWidgetWithWrapper: () => (/* binding */ convertWidgetTreeToWidgetWithWrapper),\n/* harmony export */ renderLatestWidget: () => (/* binding */ renderLatestWidget),\n/* harmony export */ renderPage: () => (/* binding */ renderPage),\n/* harmony export */ renderWidget: () => (/* binding */ renderWidget),\n/* harmony export */ unwrapContainers: () => (/* binding */ unwrapContainers)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\nfunction renderPage(pageId, attachNode, props) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const widgets = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetRelation)(pageId, \"the_page_body\");\n if ((_a = widgets === null || widgets === void 0 ? void 0 : widgets[0]) === null || _a === void 0 ? void 0 : _a.id)\n yield renderWidget(widgets[0].id, attachNode, props);\n else {\n attachNode.innerHTML = '<h4>Invalid or Page doesn\\'t exist</h4>';\n }\n });\n}\nfunction renderLatestWidget(widgetId, attachNode, props) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const widgets = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetRelation)(widgetId, \"the_widget_latest\");\n if ((widgets === null || widgets === void 0 ? void 0 : widgets.length) == 0)\n yield renderWidget(widgetId, attachNode, props);\n else {\n const latestWidgetId = (_a = widgets === null || widgets === void 0 ? void 0 : widgets[0]) === null || _a === void 0 ? void 0 : _a.id;\n if (latestWidgetId)\n yield renderWidget(latestWidgetId, attachNode, props);\n }\n });\n}\nfunction renderWidget(widgetId, attachNode, props) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const widgetTree = yield getWidgetFromId(widgetId);\n if (!widgetTree.name) {\n attachNode.innerHTML = '<h4>Invalid or Widget doesn\\'t exist</h4>';\n return;\n }\n const appElement = attachNode;\n const newWidget = yield convertWidgetTreeToWidget(\n // await convertWidgetTreeToWidget(\n widgetTree, appElement, undefined, props);\n // add newWidget css to the page\n const style = document.createElement(\"style\");\n style.innerHTML = widgetTree.css + newWidget.css;\n appElement.appendChild(style);\n // add newWidget js to the page\n const script = document.createElement(\"script\");\n script.innerHTML = widgetTree.js;\n appElement.appendChild(script);\n // remove class wb-initial-empty from all elements that have it from fspagePreview\n const wbInitialEmpty = appElement.querySelectorAll(\".wb-initial-empty\");\n wbInitialEmpty.forEach((el) => {\n el.classList.remove(\"wb-initial-empty\");\n }); // add the css for the class fspage-preview\n document\n .querySelectorAll('[onclick=\"widgetSelected(event)\"]')\n .forEach((element) => {\n element.removeAttribute(\"onclick\");\n }); // remove the onclick event from the widget container\n }\n catch (error) {\n console.error(\"Error Caught Rendering Widget\");\n }\n });\n}\n/**\n * This function builds a widget tree. This tree is built fully along with its children\n * This tree can then be used to build the whole dom for the widget.\n * This has recursive property so that the recursion can be used to build this tree.\n * @param widgetId the id of the widget\n * @returns WidgetTree.\n */\nfunction getWidgetFromId(widgetId_1) {\n return __awaiter(this, arguments, void 0, function* (widgetId, visitedWidgets = [], token = \"\") {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36;\n try {\n const widgetNode = new _app__WEBPACK_IMPORTED_MODULE_0__.WidgetTree();\n const output = yield getWidgetCodeFromId(widgetId, token);\n visitedWidgets.push(widgetId);\n const widgetInfo = (_a = output === null || output === void 0 ? void 0 : output.data) === null || _a === void 0 ? void 0 : _a.the_widget;\n widgetNode.name = (_d = (_c = (_b = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_name) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.the_name;\n widgetNode.html = (_g = (_f = (_e = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_html) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.the_html;\n widgetNode.css = (_k = (_j = (_h = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_css) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.data) === null || _k === void 0 ? void 0 : _k.the_css;\n widgetNode.js = (_o = (_m = (_l = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_js) === null || _l === void 0 ? void 0 : _l[0]) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.the_js;\n widgetNode.origin = Number((_r = (_q = (_p = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_origin) === null || _p === void 0 ? void 0 : _p[0]) === null || _q === void 0 ? void 0 : _q.data) === null || _r === void 0 ? void 0 : _r.the_originid);\n widgetNode.version =\n (_u = (_t = (_s = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_version) === null || _s === void 0 ? void 0 : _s[0]) === null || _t === void 0 ? void 0 : _t.data) === null || _u === void 0 ? void 0 : _u.the_version;\n widgetNode.clean = (_x = (_w = (_v = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_clean) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.data) === null || _x === void 0 ? void 0 : _x.the_clean;\n widgetNode.timestamp =\n (_0 = (_z = (_y = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_timestamp) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.data) === null || _0 === void 0 ? void 0 : _0.the_timestamp;\n widgetNode.id = output.id;\n const widgetTypeValue = (_3 = (_2 = (_1 = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_type) === null || _1 === void 0 ? void 0 : _1[0]) === null || _2 === void 0 ? void 0 : _2.data) === null || _3 === void 0 ? void 0 : _3.the_type;\n if (widgetTypeValue == \"null\" || widgetTypeValue == null) {\n widgetNode.type = \"the_element_name\";\n }\n else {\n widgetNode.type = widgetTypeValue;\n }\n widgetNode.after_render =\n (_6 = (_5 = (_4 = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_after_render) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.data) === null || _6 === void 0 ? void 0 : _6.the_after_render;\n widgetNode.before_render =\n (_9 = (_8 = (_7 = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_before_render) === null || _7 === void 0 ? void 0 : _7[0]) === null || _8 === void 0 ? void 0 : _8.data) === null || _9 === void 0 ? void 0 : _9.the_before_render;\n widgetNode.update = (_12 = (_11 = (_10 = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_update) === null || _10 === void 0 ? void 0 : _10[0]) === null || _11 === void 0 ? void 0 : _11.data) === null || _12 === void 0 ? void 0 : _12.the_update;\n widgetNode.widgetId = widgetId;\n widgetNode.mount_child =\n (_15 = (_14 = (_13 = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_mount_child) === null || _13 === void 0 ? void 0 : _13[0]) === null || _14 === void 0 ? void 0 : _14.data) === null || _15 === void 0 ? void 0 : _15.the_mount_child;\n const childWidgets = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_s_child;\n // if there are children present in the widget then convert the children to widget and put it inside of the tree.\n if (childWidgets === null || childWidgets === void 0 ? void 0 : childWidgets.length) {\n for (let i = 0; i < childWidgets.length; i++) {\n const childWidgetId = ((_19 = (_18 = (_17 = (_16 = childWidgets[i]) === null || _16 === void 0 ? void 0 : _16.data.the_child_widget) === null || _17 === void 0 ? void 0 : _17.the_child_widget_info) === null || _18 === void 0 ? void 0 : _18[0]) === null || _19 === void 0 ? void 0 : _19.id) ||\n ((_24 = (_23 = (_22 = (_21 = (_20 = childWidgets[i]) === null || _20 === void 0 ? void 0 : _20.data.the_child_widget) === null || _21 === void 0 ? void 0 : _21.the_child_widget_parent) === null || _22 === void 0 ? void 0 : _22[0]) === null || _23 === void 0 ? void 0 : _23.data) === null || _24 === void 0 ? void 0 : _24.the_parent);\n const childWidget = yield getWidgetFromId(childWidgetId, visitedWidgets, token);\n const childWidgetTypeValue = (_30 = (_29 = (_28 = (_27 = (_26 = (_25 = childWidgets[i]) === null || _25 === void 0 ? void 0 : _25.data) === null || _26 === void 0 ? void 0 : _26.the_child_widget) === null || _27 === void 0 ? void 0 : _27.the_child_widget_type) === null || _28 === void 0 ? void 0 : _28[0]) === null || _29 === void 0 ? void 0 : _29.data) === null || _30 === void 0 ? void 0 : _30.the_type;\n const childWidgetWrapperId = (_36 = (_35 = (_34 = (_33 = (_32 = (_31 = childWidgets[i]) === null || _31 === void 0 ? void 0 : _31.data) === null || _32 === void 0 ? void 0 : _32.the_child_widget) === null || _33 === void 0 ? void 0 : _33.the_child_widget_wrapper) === null || _34 === void 0 ? void 0 : _34[0]) === null || _35 === void 0 ? void 0 : _35.data) === null || _36 === void 0 ? void 0 : _36.the_wrapper;\n if (childWidgetTypeValue == \"null\" || childWidgetTypeValue == null) {\n childWidget.type = \"the_element_name\";\n }\n else {\n childWidget.type = childWidgetTypeValue;\n }\n childWidget.wrapper = childWidgetWrapperId;\n widgetNode.children.push(childWidget);\n }\n }\n return widgetNode;\n }\n catch (ex) {\n console.error(\"error\", ex);\n throw ex;\n }\n });\n}\n/**\n *\n * @param tree Widget tree from getWidgetFromId(widgetId);\n * @param parentElement this is the dom element on which we want to add our widget\n * @returns the widgetree with widgets attached inside of it.\n * Also this will add the tree to the dom.\n */\nfunction convertWidgetTreeToWidget(tree_1, parentElement_1) {\n return __awaiter(this, arguments, void 0, function* (tree, parentElement, isMain = true, props) {\n var _a, _b;\n const newWidget = new _app__WEBPACK_IMPORTED_MODULE_0__.BuilderStatefulWidget();\n newWidget.html = tree.html;\n newWidget.widgetType = tree.type;\n newWidget.componentDidMountFunction = tree.before_render;\n newWidget.addEventFunction = tree.after_render;\n newWidget.mountChildWidgetsFunction = tree.mount_child;\n // newWidget.css = newWidget.css ? newWidget.css : \"\";\n if (props)\n newWidget.data = props;\n parentElement.innerHTML = \"\";\n const newParent = parentElement;\n //let newParent = appendWidgetContainerToParent(parentElement, tree.id, isMain);\n isMain = false;\n if (newParent) {\n yield newWidget.mount(newParent);\n tree.widget = newWidget;\n if (tree.children.length > 0) {\n if (((_a = newWidget.childWidgetElement) === null || _a === void 0 ? void 0 : _a.length) > 0) {\n for (let i = 0; i < ((_b = tree.children) === null || _b === void 0 ? void 0 : _b.length); i++) {\n const child = tree.children[i];\n for (let j = 0; j < newWidget.childWidgetElement.length; j++) {\n const widgetElement = newWidget.childWidgetElement[j];\n if (child.wrapper === widgetElement.id) {\n const clearedChildWidget = clearDraggedWidget(child);\n child.html = `<div id=\"${child.wrapper}\">${child.html}</div>`;\n const childWidget = yield convertWidgetTreeToWidget(clearedChildWidget, widgetElement, isMain);\n newWidget.childWidgets.push(childWidget);\n // newWidget.css =\n // newWidget.css +\n // `div[data-widgetid=\"${child.id}\"] { ${child.css} }`;\n newWidget.css = childWidget.css + `#${child.wrapper} { ${child.css} }`;\n childWidget.dataChange((value) => {\n var _a;\n console.log(\"This is the data change in child\", value);\n const type = (_a = value === null || value === void 0 ? void 0 : value.type) === null || _a === void 0 ? void 0 : _a.characterValue;\n if (type) {\n newWidget.childrenData[type] = value;\n }\n console.log(\"new child data\", newWidget.childrenData);\n });\n }\n }\n }\n }\n }\n }\n console.log(\"newWidget ->\", newWidget);\n // Unwrap specific containers\n yield unwrapContainers(parentElement, \".mftsccs-marking-element\");\n yield unwrapContainers(parentElement, \".widget_container\");\n return newWidget;\n });\n}\n/**\n*\n* @param tree Widget tree from getWidgetFromId(widgetId);\n* @param parentElement this is the dom element on which we want to add our widget\n* @returns the widgetree with widgets attached inside of it.\n* Also this will add the tree to the dom.\n*/\nfunction convertWidgetTreeToWidgetWithWrapper(tree_1, parentElement_1) {\n return __awaiter(this, arguments, void 0, function* (tree, parentElement, isMain = true, state) {\n var _a, _b;\n let newWidget = new _app__WEBPACK_IMPORTED_MODULE_0__.BuilderStatefulWidget();\n newWidget.html = tree.html;\n newWidget.widgetState = Object.assign({}, state);\n newWidget.widgetType = tree.type;\n newWidget.componentDidMountFunction = tree.before_render;\n newWidget.addEventFunction = tree.after_render;\n newWidget.mountChildWidgetsFunction = tree.mount_child;\n // newWidget.css = newWidget.css ? newWidget.css : \"\";\n parentElement.innerHTML = \"\";\n let newParent = parentElement;\n //let newParent = appendWidgetContainerToParent(parentElement, tree.id, isMain);\n isMain = false;\n if (newParent) {\n yield newWidget.mount(newParent);\n tree.widget = newWidget;\n if (tree.children.length > 0) {\n if (((_a = newWidget.childWidgetElement) === null || _a === void 0 ? void 0 : _a.length) > 0) {\n for (let i = 0; i < ((_b = tree.children) === null || _b === void 0 ? void 0 : _b.length); i++) {\n let child = tree.children[i];\n for (let j = 0; j < newWidget.childWidgetElement.length; j++) {\n let widgetElement = newWidget.childWidgetElement[j];\n // if ((child.id === Number(widgetElement.getAttribute(\"data-widgetid\"))) && (child.wrapper === widgetElement.id)) {\n if ((child.wrapper === widgetElement.id)) {\n const clearedChildWidget = clearDraggedWidget(child);\n const childWidget = yield convertWidgetTreeToWidget(clearedChildWidget, widgetElement, isMain, newWidget.widgetState);\n newWidget.childWidgets.push(childWidget);\n newWidget.css = childWidget.css + `#${child.wrapper} { ${child.css} }`;\n childWidget.dataChange((value) => {\n var _a;\n console.log(\"This is the data change in child\", value);\n let type = (_a = value === null || value === void 0 ? void 0 : value.type) === null || _a === void 0 ? void 0 : _a.characterValue;\n if (type) {\n newWidget.childrenData[type] = value;\n }\n console.log(\"new child data\", newWidget.childrenData);\n });\n }\n }\n }\n }\n }\n }\n console.log(\"newWidget ->\", newWidget);\n return newWidget;\n });\n}\nfunction getWidgetCodeFromId(widgetId, token) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const searchFirst = new _app__WEBPACK_IMPORTED_MODULE_0__.SearchQuery();\n searchFirst.composition = widgetId;\n searchFirst.fullLinkers = [\n \"the_widget\",\n \"the_widget_widget\",\n \"the_widget_name\",\n \"the_widget_html\",\n \"the_widget_css\",\n \"the_widget_js\",\n \"the_widget_timestamp\",\n \"the_widget_type\",\n \"the_widget_after_render\",\n \"the_widget_before_render\",\n \"the_widget_update\",\n \"the_widget_mount_child\",\n \"the_widget_clean\",\n \"the_widget_s_child\",\n \"the_widget_version\",\n \"the_widget_origin\",\n ];\n searchFirst.inpage = 100;\n const searchSecond = new _app__WEBPACK_IMPORTED_MODULE_0__.SearchQuery();\n searchSecond.fullLinkers = [\n \"the_child_widget\",\n \"the_child_widget_type\",\n \"the_child_widget_parent\",\n \"the_child_widget_wrapper\",\n \"the_child_widget_info\",\n ];\n searchSecond.inpage = 100;\n const queryParams = [searchFirst, searchSecond];\n const output = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.SearchLinkMultipleAll)(queryParams, token);\n console.log(\"getWidgetCodeFromId output ->\", output);\n return output;\n }\n catch (error) {\n console.error(\"error\", error);\n throw error;\n }\n });\n}\nfunction clearDraggedWidget(widgetTree) {\n widgetTree.html = widgetTree.html.replace(/<[^>]*\\bclass=[\"'][^\"']*\\bwidget_container\\b[^\"']*[\"'][^>]*>/g, (match) => {\n return match.replace(/\\bwidget_container\\b/g, \"\").trim();\n });\n widgetTree.html = widgetTree.html.replace(/<[^>]*\\bdraggable=[\"'][^\"']*\\btrue\\b[^\"']*[\"'][^>]*>/g, (match) => {\n return match.replace(/\\btrue\\b/g, \"false\").trim();\n });\n widgetTree.html = widgetTree.html.replace(/<[^>]*\\bclass=[\"'][^\"']*\\bhover-element\\b[^\"']*[\"'][^>]*>/g, (match) => {\n return match.replace(/\\bhover-element\\b/g, \"\").trim();\n });\n widgetTree.html = widgetTree.html.replace(/<[^>]*\\bclass=[\"'][^\"']*\\bwb-block\\b[^\"']*[\"'][^>]*>/g, (match) => {\n return match.replace(/\\bwb-block\\b/g, \"\").trim();\n });\n widgetTree.html = widgetTree.html.replace(/<[^>]*onclick=\"widgetSelected\\(event\\)\"\\s*,?\\s*ondragover=\"_dragService\\.dragOverWidgetElement\\(event\\)\"\\s*,?\\s*ondrop=\"_dragService\\.dropWidgetElement\\(event\\)\"\\s*,?\\s*ondragstart=\"_dragService\\.dragStartWidgetElement\\(event\\)\"\\s*,?\\s*ondragend=\"_dragService\\.dragEndWidgetElement\\(event\\)\"[^>]*>/g, (match) => {\n return match\n .replace(/onclick=\"widgetSelected\\(event\\)\"/g, 'onclick=\"\"')\n .replace(/ondragover=\"_dragService\\.dragOverWidgetElement\\(event\\)\"/g, 'ondragover=\"\"')\n .replace(/ondrop=\"_dragService\\.dropWidgetElement\\(event\\)\"/g, 'ondrop=\"\"')\n .replace(/ondragstart=\"_dragService\\.dragStartWidgetElement\\(event\\)\"/g, 'ondragstart=\"\"')\n .replace(/ondragend=\"_dragService\\.dragEndWidgetElement\\(event\\)\"/g, 'ondragend=\"\"')\n .trim();\n });\n widgetTree.html = widgetTree.html.replace(/<[^>]*\\bondragstart=[\"'][^\"']*\\b_dragService\\.onWidgetDragStart\\(event\\)\\b[^\"']*[\"'][^>]*>/g, (match) => {\n return match\n .replace(/\\b_dragService\\.onWidgetDragStart\\(event\\)\\b/g, \"\")\n .trim();\n });\n return widgetTree;\n}\nfunction unwrapWidgetContainers(widgetContainerEl, queryParam) {\n return __awaiter(this, void 0, void 0, function* () {\n // Select all div elements with the queryParam\n const widgetContainers = widgetContainerEl.querySelectorAll(queryParam);\n // Loop through each div and replace it with its inner content\n widgetContainers.forEach((element) => {\n // Move all child nodes of the div before the div\n while (element.firstChild) {\n element.parentNode.insertBefore(element.firstChild, element);\n }\n // Remove the empty div\n element.remove();\n });\n return widgetContainerEl;\n });\n}\nfunction unwrapContainers(parentElement, selector) {\n return __awaiter(this, void 0, void 0, function* () {\n const elements = parentElement.querySelectorAll(selector);\n for (const el of elements) {\n const parent = el.parentElement;\n if (parent) {\n while (el.firstChild) {\n const unwrappedChild = yield unwrapWidgetContainers(el.firstChild, selector);\n parent.insertBefore(unwrappedChild, el);\n }\n parent.removeChild(el);\n }\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Widgets/RenderWidgetService.ts?");
|
|
1907
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ convertWidgetTreeToWidget: () => (/* binding */ convertWidgetTreeToWidget),\n/* harmony export */ convertWidgetTreeToWidgetWithWrapper: () => (/* binding */ convertWidgetTreeToWidgetWithWrapper),\n/* harmony export */ renderLatestWidget: () => (/* binding */ renderLatestWidget),\n/* harmony export */ renderPage: () => (/* binding */ renderPage),\n/* harmony export */ renderWidget: () => (/* binding */ renderWidget),\n/* harmony export */ unwrapContainers: () => (/* binding */ unwrapContainers)\n/* harmony export */ });\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../app */ \"./src/app.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\nfunction renderPage(pageId, attachNode, props) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const widgets = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetRelation)(pageId, \"the_page_body\");\n if ((_a = widgets === null || widgets === void 0 ? void 0 : widgets[0]) === null || _a === void 0 ? void 0 : _a.id)\n yield renderWidget(widgets[0].id, attachNode, props);\n else {\n attachNode.innerHTML = '<h4>Invalid or Page doesn\\'t exist</h4>';\n }\n });\n}\nfunction renderLatestWidget(widgetId, attachNode, props) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n const widgets = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.GetRelation)(widgetId, \"the_widget_latest\");\n if ((widgets === null || widgets === void 0 ? void 0 : widgets.length) == 0)\n yield renderWidget(widgetId, attachNode, props);\n else {\n const latestWidgetId = (_a = widgets === null || widgets === void 0 ? void 0 : widgets[0]) === null || _a === void 0 ? void 0 : _a.id;\n if (latestWidgetId)\n yield renderWidget(latestWidgetId, attachNode, props);\n }\n });\n}\nfunction renderWidget(widgetId, attachNode, props) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const widgetTree = yield getWidgetFromId(widgetId);\n if (!widgetTree.name) {\n attachNode.innerHTML = '<h4>Invalid or Widget doesn\\'t exist</h4>';\n return;\n }\n const appElement = attachNode;\n const newWidget = yield convertWidgetTreeToWidget(\n // await convertWidgetTreeToWidget(\n widgetTree, appElement, undefined, props);\n console.log(\"this is the tree newWidget\", widgetTree);\n // add newWidget css to the page\n const style = document.createElement(\"style\");\n style.innerHTML = widgetTree.css + newWidget.css;\n appElement.appendChild(style);\n // add newWidget js to the page\n const script = document.createElement(\"script\");\n script.innerHTML = widgetTree.js;\n appElement.appendChild(script);\n // remove class wb-initial-empty from all elements that have it from fspagePreview\n const wbInitialEmpty = appElement.querySelectorAll(\".wb-initial-empty\");\n wbInitialEmpty.forEach((el) => {\n el.classList.remove(\"wb-initial-empty\");\n }); // add the css for the class fspage-preview\n document\n .querySelectorAll('[onclick=\"widgetSelected(event)\"]')\n .forEach((element) => {\n element.removeAttribute(\"onclick\");\n }); // remove the onclick event from the widget container\n }\n catch (error) {\n console.error(\"Error Caught Rendering Widget\");\n }\n });\n}\n/**\n * This function builds a widget tree. This tree is built fully along with its children\n * This tree can then be used to build the whole dom for the widget.\n * This has recursive property so that the recursion can be used to build this tree.\n * @param widgetId the id of the widget\n * @returns WidgetTree.\n */\nfunction getWidgetFromId(widgetId_1) {\n return __awaiter(this, arguments, void 0, function* (widgetId, visitedWidgets = [], token = \"\") {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36;\n try {\n const widgetNode = new _app__WEBPACK_IMPORTED_MODULE_0__.WidgetTree();\n const output = yield getWidgetCodeFromId(widgetId, token);\n visitedWidgets.push(widgetId);\n const widgetInfo = (_a = output === null || output === void 0 ? void 0 : output.data) === null || _a === void 0 ? void 0 : _a.the_widget;\n widgetNode.name = (_d = (_c = (_b = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_name) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.the_name;\n widgetNode.html = (_g = (_f = (_e = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_html) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.the_html;\n widgetNode.css = (_k = (_j = (_h = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_css) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.data) === null || _k === void 0 ? void 0 : _k.the_css;\n widgetNode.js = (_o = (_m = (_l = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_js) === null || _l === void 0 ? void 0 : _l[0]) === null || _m === void 0 ? void 0 : _m.data) === null || _o === void 0 ? void 0 : _o.the_js;\n widgetNode.origin = Number((_r = (_q = (_p = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_origin) === null || _p === void 0 ? void 0 : _p[0]) === null || _q === void 0 ? void 0 : _q.data) === null || _r === void 0 ? void 0 : _r.the_originid);\n widgetNode.version =\n (_u = (_t = (_s = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_version) === null || _s === void 0 ? void 0 : _s[0]) === null || _t === void 0 ? void 0 : _t.data) === null || _u === void 0 ? void 0 : _u.the_version;\n widgetNode.clean = (_x = (_w = (_v = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_clean) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.data) === null || _x === void 0 ? void 0 : _x.the_clean;\n widgetNode.timestamp =\n (_0 = (_z = (_y = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_timestamp) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.data) === null || _0 === void 0 ? void 0 : _0.the_timestamp;\n widgetNode.id = output.id;\n const widgetTypeValue = (_3 = (_2 = (_1 = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_type) === null || _1 === void 0 ? void 0 : _1[0]) === null || _2 === void 0 ? void 0 : _2.data) === null || _3 === void 0 ? void 0 : _3.the_type;\n if (widgetTypeValue == \"null\" || widgetTypeValue == null) {\n widgetNode.type = \"the_element_name\";\n }\n else {\n widgetNode.type = widgetTypeValue;\n }\n widgetNode.after_render =\n (_6 = (_5 = (_4 = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_after_render) === null || _4 === void 0 ? void 0 : _4[0]) === null || _5 === void 0 ? void 0 : _5.data) === null || _6 === void 0 ? void 0 : _6.the_after_render;\n widgetNode.before_render =\n (_9 = (_8 = (_7 = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_before_render) === null || _7 === void 0 ? void 0 : _7[0]) === null || _8 === void 0 ? void 0 : _8.data) === null || _9 === void 0 ? void 0 : _9.the_before_render;\n widgetNode.update = (_12 = (_11 = (_10 = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_update) === null || _10 === void 0 ? void 0 : _10[0]) === null || _11 === void 0 ? void 0 : _11.data) === null || _12 === void 0 ? void 0 : _12.the_update;\n widgetNode.widgetId = widgetId;\n widgetNode.mount_child =\n (_15 = (_14 = (_13 = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_mount_child) === null || _13 === void 0 ? void 0 : _13[0]) === null || _14 === void 0 ? void 0 : _14.data) === null || _15 === void 0 ? void 0 : _15.the_mount_child;\n const childWidgets = widgetInfo === null || widgetInfo === void 0 ? void 0 : widgetInfo.the_widget_s_child;\n // if there are children present in the widget then convert the children to widget and put it inside of the tree.\n if (childWidgets === null || childWidgets === void 0 ? void 0 : childWidgets.length) {\n for (let i = 0; i < childWidgets.length; i++) {\n const childWidgetId = ((_19 = (_18 = (_17 = (_16 = childWidgets[i]) === null || _16 === void 0 ? void 0 : _16.data.the_child_widget) === null || _17 === void 0 ? void 0 : _17.the_child_widget_info) === null || _18 === void 0 ? void 0 : _18[0]) === null || _19 === void 0 ? void 0 : _19.id) ||\n ((_24 = (_23 = (_22 = (_21 = (_20 = childWidgets[i]) === null || _20 === void 0 ? void 0 : _20.data.the_child_widget) === null || _21 === void 0 ? void 0 : _21.the_child_widget_parent) === null || _22 === void 0 ? void 0 : _22[0]) === null || _23 === void 0 ? void 0 : _23.data) === null || _24 === void 0 ? void 0 : _24.the_parent);\n const childWidget = yield getWidgetFromId(childWidgetId, visitedWidgets, token);\n const childWidgetTypeValue = (_30 = (_29 = (_28 = (_27 = (_26 = (_25 = childWidgets[i]) === null || _25 === void 0 ? void 0 : _25.data) === null || _26 === void 0 ? void 0 : _26.the_child_widget) === null || _27 === void 0 ? void 0 : _27.the_child_widget_type) === null || _28 === void 0 ? void 0 : _28[0]) === null || _29 === void 0 ? void 0 : _29.data) === null || _30 === void 0 ? void 0 : _30.the_type;\n const childWidgetWrapperId = (_36 = (_35 = (_34 = (_33 = (_32 = (_31 = childWidgets[i]) === null || _31 === void 0 ? void 0 : _31.data) === null || _32 === void 0 ? void 0 : _32.the_child_widget) === null || _33 === void 0 ? void 0 : _33.the_child_widget_wrapper) === null || _34 === void 0 ? void 0 : _34[0]) === null || _35 === void 0 ? void 0 : _35.data) === null || _36 === void 0 ? void 0 : _36.the_wrapper;\n if (childWidgetTypeValue == \"null\" || childWidgetTypeValue == null) {\n childWidget.type = \"the_element_name\";\n }\n else {\n childWidget.type = childWidgetTypeValue;\n }\n childWidget.wrapper = childWidgetWrapperId;\n widgetNode.children.push(childWidget);\n }\n }\n return widgetNode;\n }\n catch (ex) {\n console.error(\"error\", ex);\n throw ex;\n }\n });\n}\n/**\n *\n * @param tree Widget tree from getWidgetFromId(widgetId);\n * @param parentElement this is the dom element on which we want to add our widget\n * @returns the widgetree with widgets attached inside of it.\n * Also this will add the tree to the dom.\n */\nfunction convertWidgetTreeToWidget(tree_1, parentElement_1) {\n return __awaiter(this, arguments, void 0, function* (tree, parentElement, isMain = true, props) {\n var _a, _b;\n const newWidget = new _app__WEBPACK_IMPORTED_MODULE_0__.BuilderStatefulWidget();\n newWidget.html = tree.html;\n newWidget.widgetType = tree.type;\n newWidget.componentDidMountFunction = tree.before_render;\n newWidget.addEventFunction = tree.after_render;\n newWidget.mountChildWidgetsFunction = tree.mount_child;\n // newWidget.css = newWidget.css ? newWidget.css : \"\";\n if (props)\n newWidget.data = props;\n parentElement.innerHTML = \"\";\n const newParent = parentElement;\n //let newParent = appendWidgetContainerToParent(parentElement, tree.id, isMain);\n isMain = false;\n if (newParent) {\n yield newWidget.mount(newParent);\n tree.widget = newWidget;\n if (tree.children.length > 0) {\n if (((_a = newWidget.childWidgetElement) === null || _a === void 0 ? void 0 : _a.length) > 0) {\n for (let i = 0; i < ((_b = tree.children) === null || _b === void 0 ? void 0 : _b.length); i++) {\n const child = tree.children[i];\n for (let j = 0; j < newWidget.childWidgetElement.length; j++) {\n const widgetElement = newWidget.childWidgetElement[j];\n if (child.wrapper === widgetElement.id) {\n const clearedChildWidget = clearDraggedWidget(child);\n child.html = `<div id=\"${child.wrapper}\">${child.html}</div>`;\n const childWidget = yield convertWidgetTreeToWidget(clearedChildWidget, widgetElement, isMain);\n newWidget.childWidgets.push(childWidget);\n // newWidget.css =\n // newWidget.css +\n // `div[data-widgetid=\"${child.id}\"] { ${child.css} }`;\n newWidget.css = childWidget.css + `#${child.wrapper} { ${child.css} }`;\n childWidget.dataChange((value) => {\n var _a;\n console.log(\"This is the data change in child\", value);\n const type = (_a = value === null || value === void 0 ? void 0 : value.type) === null || _a === void 0 ? void 0 : _a.characterValue;\n if (type) {\n newWidget.childrenData[type] = value;\n }\n console.log(\"new child data\", newWidget.childrenData);\n });\n }\n }\n }\n }\n }\n }\n console.log(\"newWidget ->\", newWidget);\n // Unwrap specific containers\n yield unwrapContainers(parentElement, \".mftsccs-marking-element\");\n yield unwrapContainers(parentElement, \".widget_container\");\n return newWidget;\n });\n}\n/**\n*\n* @param tree Widget tree from getWidgetFromId(widgetId);\n* @param parentElement this is the dom element on which we want to add our widget\n* @returns the widgetree with widgets attached inside of it.\n* Also this will add the tree to the dom.\n*/\nfunction convertWidgetTreeToWidgetWithWrapper(tree_1, parentElement_1) {\n return __awaiter(this, arguments, void 0, function* (tree, parentElement, isMain = true, state) {\n var _a, _b;\n let newWidget = new _app__WEBPACK_IMPORTED_MODULE_0__.BuilderStatefulWidget();\n newWidget.html = tree.html;\n newWidget.widgetState = Object.assign({}, state);\n newWidget.widgetType = tree.type;\n newWidget.componentDidMountFunction = tree.before_render;\n newWidget.addEventFunction = tree.after_render;\n newWidget.mountChildWidgetsFunction = tree.mount_child;\n // newWidget.css = newWidget.css ? newWidget.css : \"\";\n parentElement.innerHTML = \"\";\n let newParent = parentElement;\n //let newParent = appendWidgetContainerToParent(parentElement, tree.id, isMain);\n isMain = false;\n if (newParent) {\n yield newWidget.mount(newParent);\n tree.widget = newWidget;\n if (tree.children.length > 0) {\n if (((_a = newWidget.childWidgetElement) === null || _a === void 0 ? void 0 : _a.length) > 0) {\n for (let i = 0; i < ((_b = tree.children) === null || _b === void 0 ? void 0 : _b.length); i++) {\n let child = tree.children[i];\n for (let j = 0; j < newWidget.childWidgetElement.length; j++) {\n let widgetElement = newWidget.childWidgetElement[j];\n // if ((child.id === Number(widgetElement.getAttribute(\"data-widgetid\"))) && (child.wrapper === widgetElement.id)) {\n if ((child.wrapper === widgetElement.id)) {\n const clearedChildWidget = clearDraggedWidget(child);\n const childWidget = yield convertWidgetTreeToWidget(clearedChildWidget, widgetElement, isMain, newWidget.widgetState);\n newWidget.childWidgets.push(childWidget);\n newWidget.css = childWidget.css + `#${child.wrapper} { ${child.css} }`;\n childWidget.dataChange((value) => {\n var _a;\n console.log(\"This is the data change in child\", value);\n let type = (_a = value === null || value === void 0 ? void 0 : value.type) === null || _a === void 0 ? void 0 : _a.characterValue;\n if (type) {\n newWidget.childrenData[type] = value;\n }\n console.log(\"new child data\", newWidget.childrenData);\n });\n }\n }\n }\n }\n }\n }\n console.log(\"newWidget ->\", newWidget);\n return newWidget;\n });\n}\nfunction getWidgetCodeFromId(widgetId, token) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n const searchFirst = new _app__WEBPACK_IMPORTED_MODULE_0__.SearchQuery();\n searchFirst.composition = widgetId;\n searchFirst.fullLinkers = [\n \"the_widget\",\n \"the_widget_widget\",\n \"the_widget_name\",\n \"the_widget_html\",\n \"the_widget_css\",\n \"the_widget_js\",\n \"the_widget_timestamp\",\n \"the_widget_type\",\n \"the_widget_after_render\",\n \"the_widget_before_render\",\n \"the_widget_update\",\n \"the_widget_mount_child\",\n \"the_widget_clean\",\n \"the_widget_s_child\",\n \"the_widget_version\",\n \"the_widget_origin\",\n ];\n searchFirst.inpage = 100;\n const searchSecond = new _app__WEBPACK_IMPORTED_MODULE_0__.SearchQuery();\n searchSecond.fullLinkers = [\n \"the_child_widget\",\n \"the_child_widget_type\",\n \"the_child_widget_parent\",\n \"the_child_widget_wrapper\",\n \"the_child_widget_info\",\n ];\n searchSecond.inpage = 100;\n const queryParams = [searchFirst, searchSecond];\n const output = yield (0,_app__WEBPACK_IMPORTED_MODULE_0__.SearchLinkMultipleAll)(queryParams, token);\n console.log(\"getWidgetCodeFromId output ->\", output);\n return output;\n }\n catch (error) {\n console.error(\"error\", error);\n throw error;\n }\n });\n}\nfunction clearDraggedWidget(widgetTree) {\n widgetTree.html = widgetTree.html.replace(/<[^>]*\\bclass=[\"'][^\"']*\\bwidget_container\\b[^\"']*[\"'][^>]*>/g, (match) => {\n return match.replace(/\\bwidget_container\\b/g, \"\").trim();\n });\n widgetTree.html = widgetTree.html.replace(/<[^>]*\\bdraggable=[\"'][^\"']*\\btrue\\b[^\"']*[\"'][^>]*>/g, (match) => {\n return match.replace(/\\btrue\\b/g, \"false\").trim();\n });\n widgetTree.html = widgetTree.html.replace(/<[^>]*\\bclass=[\"'][^\"']*\\bhover-element\\b[^\"']*[\"'][^>]*>/g, (match) => {\n return match.replace(/\\bhover-element\\b/g, \"\").trim();\n });\n widgetTree.html = widgetTree.html.replace(/<[^>]*\\bclass=[\"'][^\"']*\\bwb-block\\b[^\"']*[\"'][^>]*>/g, (match) => {\n return match.replace(/\\bwb-block\\b/g, \"\").trim();\n });\n widgetTree.html = widgetTree.html.replace(/<[^>]*onclick=\"widgetSelected\\(event\\)\"\\s*,?\\s*ondragover=\"_dragService\\.dragOverWidgetElement\\(event\\)\"\\s*,?\\s*ondrop=\"_dragService\\.dropWidgetElement\\(event\\)\"\\s*,?\\s*ondragstart=\"_dragService\\.dragStartWidgetElement\\(event\\)\"\\s*,?\\s*ondragend=\"_dragService\\.dragEndWidgetElement\\(event\\)\"[^>]*>/g, (match) => {\n return match\n .replace(/onclick=\"widgetSelected\\(event\\)\"/g, 'onclick=\"\"')\n .replace(/ondragover=\"_dragService\\.dragOverWidgetElement\\(event\\)\"/g, 'ondragover=\"\"')\n .replace(/ondrop=\"_dragService\\.dropWidgetElement\\(event\\)\"/g, 'ondrop=\"\"')\n .replace(/ondragstart=\"_dragService\\.dragStartWidgetElement\\(event\\)\"/g, 'ondragstart=\"\"')\n .replace(/ondragend=\"_dragService\\.dragEndWidgetElement\\(event\\)\"/g, 'ondragend=\"\"')\n .trim();\n });\n widgetTree.html = widgetTree.html.replace(/<[^>]*\\bondragstart=[\"'][^\"']*\\b_dragService\\.onWidgetDragStart\\(event\\)\\b[^\"']*[\"'][^>]*>/g, (match) => {\n return match\n .replace(/\\b_dragService\\.onWidgetDragStart\\(event\\)\\b/g, \"\")\n .trim();\n });\n return widgetTree;\n}\nfunction unwrapWidgetContainers(widgetContainerEl, queryParam) {\n return __awaiter(this, void 0, void 0, function* () {\n // Select all div elements with the queryParam\n const widgetContainers = widgetContainerEl.querySelectorAll(queryParam);\n // Loop through each div and replace it with its inner content\n widgetContainers.forEach((element) => {\n // Move all child nodes of the div before the div\n while (element.firstChild) {\n element.parentNode.insertBefore(element.firstChild, element);\n }\n // Remove the empty div\n element.remove();\n });\n return widgetContainerEl;\n });\n}\nfunction unwrapContainers(parentElement, selector) {\n return __awaiter(this, void 0, void 0, function* () {\n const elements = parentElement.querySelectorAll(selector);\n for (const el of elements) {\n const parent = el.parentElement;\n if (parent) {\n while (el.firstChild) {\n const unwrappedChild = yield unwrapWidgetContainers(el.firstChild, selector);\n parent.insertBefore(unwrappedChild, el);\n }\n parent.removeChild(el);\n }\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/Widgets/RenderWidgetService.ts?");
|
|
1908
1908
|
|
|
1909
1909
|
/***/ }),
|
|
1910
1910
|
|
|
@@ -2014,7 +2014,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2014
2014
|
\********************/
|
|
2015
2015
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2016
2016
|
|
|
2017
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ADMIN: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__.ADMIN),\n/* harmony export */ ALLID: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.ALLID),\n/* harmony export */ AccessTracker: () => (/* reexport safe */ _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_118__.AccessTracker),\n/* harmony export */ AddGhostConcept: () => (/* reexport safe */ _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_51__.AddGhostConcept),\n/* harmony export */ Anomaly: () => (/* reexport safe */ _Anomaly_anomaly__WEBPACK_IMPORTED_MODULE_109__.Anomaly),\n/* harmony export */ BaseUrl: () => (/* reexport safe */ _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl),\n/* harmony export */ BinaryTree: () => (/* reexport safe */ _DataStructures_BinaryTree__WEBPACK_IMPORTED_MODULE_84__.BinaryTree),\n/* harmony export */ BuilderStatefulWidget: () => (/* reexport safe */ _Widgets_BuilderStatefulWidget__WEBPACK_IMPORTED_MODULE_107__.BuilderStatefulWidget),\n/* harmony export */ Composition: () => (/* reexport safe */ _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_88__.Composition),\n/* harmony export */ CompositionBinaryTree: () => (/* reexport safe */ _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_89__.CompositionBinaryTree),\n/* harmony export */ CompositionNode: () => (/* reexport safe */ _DataStructures_Composition_CompositionNode__WEBPACK_IMPORTED_MODULE_90__.CompositionNode),\n/* harmony export */ Concept: () => (/* reexport safe */ _DataStructures_Concept__WEBPACK_IMPORTED_MODULE_78__.Concept),\n/* harmony export */ ConceptsData: () => (/* reexport safe */ _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_82__.ConceptsData),\n/* harmony export */ Connection: () => (/* reexport safe */ _DataStructures_Connection__WEBPACK_IMPORTED_MODULE_81__.Connection),\n/* harmony export */ ConnectionData: () => (/* reexport safe */ _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_83__.ConnectionData),\n/* harmony export */ CreateComposition: () => (/* reexport safe */ _Services_CreateTheComposition__WEBPACK_IMPORTED_MODULE_9__[\"default\"]),\n/* harmony export */ CreateConnectionBetweenEntityLocal: () => (/* reexport safe */ _Services_CreateConnection_CreateConnectionEntity__WEBPACK_IMPORTED_MODULE_119__.CreateConnectionBetweenEntityLocal),\n/* harmony export */ CreateConnectionBetweenTwoConcepts: () => (/* reexport safe */ _Services_CreateConnectionBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_11__.CreateConnectionBetweenTwoConcepts),\n/* harmony export */ CreateConnectionBetweenTwoConceptsGeneral: () => (/* reexport safe */ _Services_CreateConnectionBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_11__.CreateConnectionBetweenTwoConceptsGeneral),\n/* harmony export */ CreateConnectionBetweenTwoConceptsLocal: () => (/* reexport safe */ _Services_Local_CreateConnectionBetweenTwoConceptsLocal__WEBPACK_IMPORTED_MODULE_61__.CreateConnectionBetweenTwoConceptsLocal),\n/* harmony export */ CreateDefaultConcept: () => (/* reexport safe */ _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_19__.CreateDefaultConcept),\n/* harmony export */ CreateDefaultLConcept: () => (/* reexport safe */ _Services_Local_CreateDefaultLConcept__WEBPACK_IMPORTED_MODULE_48__.CreateDefaultLConcept),\n/* harmony export */ CreateSession: () => (/* reexport safe */ _Api_Session_CreateSession__WEBPACK_IMPORTED_MODULE_43__.CreateSession),\n/* harmony export */ CreateSessionVisit: () => (/* reexport safe */ _Api_Session_CreateSessionVisit__WEBPACK_IMPORTED_MODULE_44__.CreateSessionVisit),\n/* harmony export */ CreateTheCompositionLocal: () => (/* reexport safe */ _Services_Local_CreateTheCompositionLocal__WEBPACK_IMPORTED_MODULE_10__.CreateTheCompositionLocal),\n/* harmony export */ CreateTheCompositionWithCache: () => (/* reexport safe */ _Services_Composition_CreateCompositionCache__WEBPACK_IMPORTED_MODULE_47__.CreateTheCompositionWithCache),\n/* harmony export */ CreateTheConnection: () => (/* reexport safe */ _Services_CreateTheConnection__WEBPACK_IMPORTED_MODULE_16__.createTheConnection),\n/* harmony export */ CreateTheConnectionGeneral: () => (/* reexport safe */ _Services_CreateTheConnectionGeneral__WEBPACK_IMPORTED_MODULE_49__.CreateTheConnectionGeneral),\n/* harmony export */ CreateTheConnectionLocal: () => (/* reexport safe */ _Services_Local_CreateTheConnectionLocal__WEBPACK_IMPORTED_MODULE_50__.CreateTheConnectionLocal),\n/* harmony export */ DATAID: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.DATAID),\n/* harmony export */ DATAIDDATE: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.DATAIDDATE),\n/* harmony export */ DelayFunctionExecution: () => (/* reexport safe */ _Services_Common_DelayFunction__WEBPACK_IMPORTED_MODULE_64__.DelayFunctionExecution),\n/* harmony export */ DeleteConceptById: () => (/* reexport safe */ _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__.DeleteConceptById),\n/* harmony export */ DeleteConceptLocal: () => (/* reexport safe */ _Services_Local_DeleteConceptLocal__WEBPACK_IMPORTED_MODULE_62__.DeleteConceptLocal),\n/* harmony export */ DeleteConnectionById: () => (/* reexport safe */ _Services_DeleteConnection__WEBPACK_IMPORTED_MODULE_25__.DeleteConnectionById),\n/* harmony export */ DeleteConnectionByType: () => (/* reexport safe */ _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_113__.DeleteConnectionByType),\n/* harmony export */ DeleteUser: () => (/* reexport safe */ _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__.DeleteUser),\n/* harmony export */ DependencyObserver: () => (/* reexport safe */ _WrapperFunctions_DepenedencyObserver__WEBPACK_IMPORTED_MODULE_69__.DependencyObserver),\n/* harmony export */ FilterSearch: () => (/* reexport safe */ _DataStructures_FilterSearch__WEBPACK_IMPORTED_MODULE_93__.FilterSearch),\n/* harmony export */ FormatFromConnections: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__.FormatFromConnections),\n/* harmony export */ FormatFromConnectionsAltered: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__.FormatFromConnectionsAltered),\n/* harmony export */ FreeschemaQuery: () => (/* reexport safe */ _DataStructures_Search_FreeschemaQuery__WEBPACK_IMPORTED_MODULE_114__.FreeschemaQuery),\n/* harmony export */ FreeschemaQueryApi: () => (/* reexport safe */ _Api_Search_FreeschemaQueryApi__WEBPACK_IMPORTED_MODULE_115__.FreeschemaQueryApi),\n/* harmony export */ GetAllConnectionsOfComposition: () => (/* reexport safe */ _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_6__.GetAllConnectionsOfComposition),\n/* harmony export */ GetAllConnectionsOfCompositionBulk: () => (/* reexport safe */ _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_34__.GetAllConnectionsOfCompositionBulk),\n/* harmony export */ GetAllTheConnectionsByTypeAndOfTheConcept: () => (/* reexport safe */ _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_113__.GetAllTheConnectionsByTypeAndOfTheConcept),\n/* harmony export */ GetComposition: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetComposition),\n/* harmony export */ GetCompositionBulk: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionBulk),\n/* harmony export */ GetCompositionBulkWithDataId: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionBulkWithDataId),\n/* harmony export */ GetCompositionFromConnectionsWithDataId: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataId),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdFromConnections: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataIdFromConnections),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdInObject: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataIdInObject),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdIndex: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataIdIndex),\n/* harmony export */ GetCompositionFromConnectionsWithIndex: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithIndex),\n/* harmony export */ GetCompositionFromConnectionsWithIndexFromConnections: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithIndexFromConnections),\n/* harmony export */ GetCompositionFromMemoryWithConnections: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionFromMemoryWithConnections),\n/* harmony export */ GetCompositionList: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionList),\n/* harmony export */ GetCompositionListAll: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListAll),\n/* harmony export */ GetCompositionListAllWithId: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListAllWithId),\n/* harmony export */ GetCompositionListListener: () => (/* reexport safe */ _WrapperFunctions_GetCompositionListObservable__WEBPACK_IMPORTED_MODULE_72__.GetCompositionListListener),\n/* harmony export */ GetCompositionListLocal: () => (/* reexport safe */ _Services_Local_GetCompositionListLocal__WEBPACK_IMPORTED_MODULE_5__.GetCompositionListLocal),\n/* harmony export */ GetCompositionListLocalWithId: () => (/* reexport safe */ _Services_Local_GetCompositionListLocal__WEBPACK_IMPORTED_MODULE_5__.GetCompositionListLocalWithId),\n/* harmony export */ GetCompositionListWithId: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListWithId),\n/* harmony export */ GetCompositionListWithIdUpdated: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListWithIdUpdated),\n/* harmony export */ GetCompositionListener: () => (/* reexport safe */ _WrapperFunctions_GetCompositionObservable__WEBPACK_IMPORTED_MODULE_71__.GetCompositionListener),\n/* harmony export */ GetCompositionLocal: () => (/* reexport safe */ _Services_Local_GetCompositionLocal__WEBPACK_IMPORTED_MODULE_8__.GetCompositionLocal),\n/* harmony export */ GetCompositionLocalWithId: () => (/* reexport safe */ _Services_Local_GetCompositionLocal__WEBPACK_IMPORTED_MODULE_8__.GetCompositionLocalWithId),\n/* harmony export */ GetCompositionWithAllIds: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionWithAllIds),\n/* harmony export */ GetCompositionWithCache: () => (/* reexport safe */ _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__.GetCompositionWithCache),\n/* harmony export */ GetCompositionWithDataIdBulk: () => (/* reexport safe */ _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__.GetCompositionWithDataIdBulk),\n/* harmony export */ GetCompositionWithDataIdWithCache: () => (/* reexport safe */ _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__.GetCompositionWithDataIdWithCache),\n/* harmony export */ GetCompositionWithId: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionWithId),\n/* harmony export */ GetCompositionWithIdAndDateFromMemory: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionWithIdAndDateFromMemory),\n/* harmony export */ GetConceptBulk: () => (/* reexport safe */ _Api_GetConceptBulk__WEBPACK_IMPORTED_MODULE_32__.GetConceptBulk),\n/* harmony export */ GetConceptByCharacter: () => (/* reexport safe */ _Services_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_17__[\"default\"]),\n/* harmony export */ GetConceptByCharacterAndCategoryLocal: () => (/* reexport safe */ _Services_Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_56__.GetConceptByCharacterAndCategoryLocal),\n/* harmony export */ GetConceptByCharacterAndType: () => (/* reexport safe */ _Api_GetConceptByCharacterAndType__WEBPACK_IMPORTED_MODULE_65__.GetConceptByCharacterAndType),\n/* harmony export */ GetConnectionBetweenTwoConceptsLinker: () => (/* reexport safe */ _Services_GetConnectionBetweenTwoConceptsLinker__WEBPACK_IMPORTED_MODULE_63__.GetConnectionBetweenTwoConceptsLinker),\n/* harmony export */ GetConnectionBulk: () => (/* reexport safe */ _Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_33__.GetConnectionBulk),\n/* harmony export */ GetConnectionById: () => (/* reexport safe */ _Services_GetConnections__WEBPACK_IMPORTED_MODULE_27__.GetConnectionById),\n/* harmony export */ GetConnectionDataPrefetch: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetConnectionDataPrefetch),\n/* harmony export */ GetConnectionOfTheConcept: () => (/* reexport safe */ _Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_36__.GetConnectionOfTheConcept),\n/* harmony export */ GetLink: () => (/* reexport safe */ _Services_GetLink__WEBPACK_IMPORTED_MODULE_18__.GetLink),\n/* harmony export */ GetLinkListListener: () => (/* reexport safe */ _WrapperFunctions_GetLinkListObservable__WEBPACK_IMPORTED_MODULE_76__.GetLinkListListener),\n/* harmony export */ GetLinkListener: () => (/* reexport safe */ _WrapperFunctions_GetLinkObservable__WEBPACK_IMPORTED_MODULE_74__.GetLinkListener),\n/* harmony export */ GetLinkRaw: () => (/* reexport safe */ _Services_GetLink__WEBPACK_IMPORTED_MODULE_18__.GetLinkRaw),\n/* harmony export */ GetLinkerConnectionFromConcepts: () => (/* reexport safe */ _Services_GetLinkerConnectionFromConcept__WEBPACK_IMPORTED_MODULE_23__.GetLinkerConnectionFromConcepts),\n/* harmony export */ GetLinkerConnectionToConcepts: () => (/* reexport safe */ _Services_GetLinkerConnectionFromConcept__WEBPACK_IMPORTED_MODULE_23__.GetLinkerConnectionToConcepts),\n/* harmony export */ GetRelation: () => (/* reexport safe */ _Services_GetRelation__WEBPACK_IMPORTED_MODULE_45__.GetRelation),\n/* harmony export */ GetRelationLocal: () => (/* reexport safe */ _Services_Local_GetRelationLocal__WEBPACK_IMPORTED_MODULE_55__.GetRelationLocal),\n/* harmony export */ GetRelationRaw: () => (/* reexport safe */ _Services_GetRelation__WEBPACK_IMPORTED_MODULE_45__.GetRelationRaw),\n/* harmony export */ GetTheConcept: () => (/* reexport safe */ _Services_GetTheConcept__WEBPACK_IMPORTED_MODULE_12__[\"default\"]),\n/* harmony export */ GetTheConceptLocal: () => (/* reexport safe */ _Services_Local_GetTheConceptLocal__WEBPACK_IMPORTED_MODULE_53__.GetTheConceptLocal),\n/* harmony export */ GetUserGhostId: () => (/* reexport safe */ _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_51__.GetUserGhostId),\n/* harmony export */ JUSTDATA: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.JUSTDATA),\n/* harmony export */ LConcept: () => (/* reexport safe */ _DataStructures_Local_LConcept__WEBPACK_IMPORTED_MODULE_79__.LConcept),\n/* harmony export */ LConnection: () => (/* reexport safe */ _DataStructures_Local_LConnection__WEBPACK_IMPORTED_MODULE_80__.LConnection),\n/* harmony export */ LISTNORMAL: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.LISTNORMAL),\n/* harmony export */ LocalConceptsData: () => (/* reexport safe */ _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_95__.LocalConceptsData),\n/* harmony export */ LocalSyncData: () => (/* reexport safe */ _DataStructures_Local_LocalSyncData__WEBPACK_IMPORTED_MODULE_91__.LocalSyncData),\n/* harmony export */ LocalTransaction: () => (/* reexport safe */ _Services_Transaction_LocalTransaction__WEBPACK_IMPORTED_MODULE_108__.LocalTransaction),\n/* harmony export */ Logger: () => (/* reexport safe */ _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_102__.Logger),\n/* harmony export */ LoginToBackend: () => (/* reexport safe */ _Api_Login__WEBPACK_IMPORTED_MODULE_35__.LoginToBackend),\n/* harmony export */ MakeTheInstanceConcept: () => (/* reexport safe */ _Services_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_13__[\"default\"]),\n/* harmony export */ MakeTheInstanceConceptLocal: () => (/* reexport safe */ _Services_Local_MakeTheInstanceConceptLocal__WEBPACK_IMPORTED_MODULE_14__.MakeTheInstanceConceptLocal),\n/* harmony export */ MakeTheTimestamp: () => (/* reexport safe */ _Services_MakeTheTimestamp__WEBPACK_IMPORTED_MODULE_28__.MakeTheTimestamp),\n/* harmony export */ MakeTheTypeConcept: () => (/* reexport safe */ _Services_MakeTheTypeConcept__WEBPACK_IMPORTED_MODULE_21__.MakeTheTypeConcept),\n/* harmony export */ MakeTheTypeConceptApi: () => (/* reexport safe */ _Api_MakeTheTypeConceptApi__WEBPACK_IMPORTED_MODULE_22__.MakeTheTypeConceptApi),\n/* harmony export */ MakeTheTypeConceptLocal: () => (/* reexport safe */ _Services_Local_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_20__.MakeTheTypeConceptLocal),\n/* harmony export */ NORMAL: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.NORMAL),\n/* harmony export */ PRIVATE: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__.PRIVATE),\n/* harmony export */ PUBLIC: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__.PUBLIC),\n/* harmony export */ PatcherStructure: () => (/* reexport safe */ _DataStructures_PatcherStructure__WEBPACK_IMPORTED_MODULE_86__.PatcherStructure),\n/* harmony export */ RAW: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.RAW),\n/* harmony export */ RecursiveSearchApi: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApi),\n/* harmony export */ RecursiveSearchApiNewRawFullLinker: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiNewRawFullLinker),\n/* harmony export */ RecursiveSearchApiRaw: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiRaw),\n/* harmony export */ RecursiveSearchApiRawFullLinker: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiRawFullLinker),\n/* harmony export */ RecursiveSearchApiWithInternalConnections: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiWithInternalConnections),\n/* harmony export */ RecursiveSearchListener: () => (/* reexport safe */ _WrapperFunctions_RecursiveSearchObservable__WEBPACK_IMPORTED_MODULE_75__.RecursiveSearchListener),\n/* harmony export */ SchemaQueryListener: () => (/* reexport safe */ _WrapperFunctions_SchemaQueryObservable__WEBPACK_IMPORTED_MODULE_116__.SchemaQueryListener),\n/* harmony export */ SearchAllConcepts: () => (/* reexport safe */ _Api_Search_Search__WEBPACK_IMPORTED_MODULE_40__.SearchAllConcepts),\n/* harmony export */ SearchLinkInternal: () => (/* reexport safe */ _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_60__.SearchLinkInternal),\n/* harmony export */ SearchLinkInternalAll: () => (/* reexport safe */ _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_60__.SearchLinkInternalAll),\n/* harmony export */ SearchLinkMultipleAll: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__.SearchLinkMultipleAll),\n/* harmony export */ SearchLinkMultipleAllObservable: () => (/* reexport safe */ _WrapperFunctions_SearchLinkMultipleAllObservable__WEBPACK_IMPORTED_MODULE_70__.SearchLinkMultipleAllObservable),\n/* harmony export */ SearchLinkMultipleApi: () => (/* reexport safe */ _Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_2__.SearchLinkMultipleApi),\n/* harmony export */ SearchQuery: () => (/* reexport safe */ _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_85__.SearchQuery),\n/* harmony export */ SearchStructure: () => (/* reexport safe */ _DataStructures_Search_SearchStructure__WEBPACK_IMPORTED_MODULE_94__.SearchStructure),\n/* harmony export */ SearchWithLinker: () => (/* reexport safe */ _Api_Search_SearchWithLinker__WEBPACK_IMPORTED_MODULE_41__.SearchWithLinker),\n/* harmony export */ SearchWithTypeAndLinker: () => (/* reexport safe */ _Services_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_73__.SearchWithTypeAndLinker),\n/* harmony export */ SearchWithTypeAndLinkerApi: () => (/* reexport safe */ _Api_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_68__.SearchWithTypeAndLinkerApi),\n/* harmony export */ SessionData: () => (/* reexport safe */ _DataStructures_Session_SessionData__WEBPACK_IMPORTED_MODULE_87__.SessionData),\n/* harmony export */ Signin: () => (/* reexport safe */ _Api_Signin__WEBPACK_IMPORTED_MODULE_38__[\"default\"]),\n/* harmony export */ Signup: () => (/* reexport safe */ _Api_Signup__WEBPACK_IMPORTED_MODULE_37__[\"default\"]),\n/* harmony export */ SignupEntity: () => (/* reexport safe */ _Api_Signup__WEBPACK_IMPORTED_MODULE_37__.SignupEntity),\n/* harmony export */ SplitStrings: () => (/* reexport safe */ _Services_SplitStrings__WEBPACK_IMPORTED_MODULE_3__.SplitStrings),\n/* harmony export */ StatefulWidget: () => (/* reexport safe */ _Widgets_StatefulWidget__WEBPACK_IMPORTED_MODULE_112__.StatefulWidget),\n/* harmony export */ SyncData: () => (/* reexport safe */ _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_77__.SyncData),\n/* harmony export */ TrashTheConcept: () => (/* reexport safe */ _Api_Delete_DeleteConceptInBackend__WEBPACK_IMPORTED_MODULE_26__.TrashTheConcept),\n/* harmony export */ UpdateComposition: () => (/* reexport safe */ _Services_UpdateComposition__WEBPACK_IMPORTED_MODULE_39__[\"default\"]),\n/* harmony export */ UpdateCompositionLocal: () => (/* reexport safe */ _Services_Local_UpdateCompositionLocal__WEBPACK_IMPORTED_MODULE_54__.UpdateCompositionLocal),\n/* harmony export */ UserBinaryTree: () => (/* reexport safe */ _DataStructures_User_UserBinaryTree__WEBPACK_IMPORTED_MODULE_92__.UserBinaryTree),\n/* harmony export */ Validator: () => (/* reexport safe */ _Validator_validator__WEBPACK_IMPORTED_MODULE_110__.Validator),\n/* harmony export */ ViewInternalData: () => (/* reexport safe */ _Services_View_ViewInternalData__WEBPACK_IMPORTED_MODULE_57__.ViewInternalData),\n/* harmony export */ ViewInternalDataApi: () => (/* reexport safe */ _Api_View_ViewInternalDataApi__WEBPACK_IMPORTED_MODULE_58__.ViewInternalDataApi),\n/* harmony export */ WidgetTree: () => (/* reexport safe */ _Widgets_WidgetTree__WEBPACK_IMPORTED_MODULE_117__.WidgetTree),\n/* harmony export */ convertFromConceptToLConcept: () => (/* reexport safe */ _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_59__.convertFromConceptToLConcept),\n/* harmony export */ convertFromLConceptToConcept: () => (/* reexport safe */ _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_59__.convertFromLConceptToConcept),\n/* harmony export */ convertWidgetTreeToWidget: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__.convertWidgetTreeToWidget),\n/* harmony export */ convertWidgetTreeToWidgetWithWrapper: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__.convertWidgetTreeToWidgetWithWrapper),\n/* harmony export */ createFormFieldData: () => (/* reexport safe */ _Validator_utils__WEBPACK_IMPORTED_MODULE_111__.createFormFieldData),\n/* harmony export */ dispatchIdEvent: () => (/* binding */ dispatchIdEvent),\n/* harmony export */ getFromDatabaseWithType: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.getFromDatabaseWithType),\n/* harmony export */ getObjectsFromIndexDb: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.getObjectsFromIndexDb),\n/* harmony export */ handleServiceWorkerException: () => (/* binding */ handleServiceWorkerException),\n/* harmony export */ hasActivatedSW: () => (/* binding */ hasActivatedSW),\n/* harmony export */ init: () => (/* binding */ init),\n/* harmony export */ recursiveFetch: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.recursiveFetch),\n/* harmony export */ recursiveFetchNew: () => (/* reexport safe */ _Services_Composition_BuildComposition__WEBPACK_IMPORTED_MODULE_46__.recursiveFetchNew),\n/* harmony export */ renderLatestWidget: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__.renderLatestWidget),\n/* harmony export */ renderPage: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__.renderPage),\n/* harmony export */ renderWidget: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__.renderWidget),\n/* harmony export */ searchLinkMultipleListener: () => (/* reexport safe */ _WrapperFunctions_SearchLinkMultipleAllObservable__WEBPACK_IMPORTED_MODULE_70__.searchLinkMultipleListener),\n/* harmony export */ sendMessage: () => (/* binding */ sendMessage),\n/* harmony export */ serviceWorker: () => (/* binding */ serviceWorker),\n/* harmony export */ setHasActivatedSW: () => (/* binding */ setHasActivatedSW),\n/* harmony export */ storeToDatabase: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.storeToDatabase),\n/* harmony export */ subscribedListeners: () => (/* binding */ subscribedListeners),\n/* harmony export */ unwrapContainers: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__.unwrapContainers),\n/* harmony export */ updateAccessToken: () => (/* binding */ updateAccessToken),\n/* harmony export */ uploadAttachment: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.uploadAttachment),\n/* harmony export */ uploadFile: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.uploadFile),\n/* harmony export */ uploadImage: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.uploadImage),\n/* harmony export */ validDocumentFormats: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.validDocumentFormats),\n/* harmony export */ validImageFormats: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.validImageFormats)\n/* harmony export */ });\n/* harmony import */ var _Services_CreateBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Services/CreateBinaryTreeFromData */ \"./src/Services/CreateBinaryTreeFromData.ts\");\n/* harmony import */ var _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DataStructures/IdentifierFlags */ \"./src/DataStructures/IdentifierFlags.ts\");\n/* harmony import */ var _Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Api/Search/SearchLinkMultipleApi */ \"./src/Api/Search/SearchLinkMultipleApi.ts\");\n/* harmony import */ var _Services_SplitStrings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Services/SplitStrings */ \"./src/Services/SplitStrings.ts\");\n/* harmony import */ var _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Services/GetCompositionList */ \"./src/Services/GetCompositionList.ts\");\n/* harmony import */ var _Services_Local_GetCompositionListLocal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Services/Local/GetCompositionListLocal */ \"./src/Services/Local/GetCompositionListLocal.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Api/GetAllConnectionsOfComposition */ \"./src/Api/GetAllConnectionsOfComposition.ts\");\n/* harmony import */ var _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Services/GetComposition */ \"./src/Services/GetComposition.ts\");\n/* harmony import */ var _Services_Local_GetCompositionLocal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Services/Local/GetCompositionLocal */ \"./src/Services/Local/GetCompositionLocal.ts\");\n/* harmony import */ var _Services_CreateTheComposition__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Services/CreateTheComposition */ \"./src/Services/CreateTheComposition.ts\");\n/* harmony import */ var _Services_Local_CreateTheCompositionLocal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Services/Local/CreateTheCompositionLocal */ \"./src/Services/Local/CreateTheCompositionLocal.ts\");\n/* harmony import */ var _Services_CreateConnectionBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Services/CreateConnectionBetweenTwoConcepts */ \"./src/Services/CreateConnectionBetweenTwoConcepts.ts\");\n/* harmony import */ var _Services_GetTheConcept__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Services/GetTheConcept */ \"./src/Services/GetTheConcept.ts\");\n/* harmony import */ var _Services_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Services/MakeTheInstanceConcept */ \"./src/Services/MakeTheInstanceConcept.ts\");\n/* harmony import */ var _Services_Local_MakeTheInstanceConceptLocal__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Services/Local/MakeTheInstanceConceptLocal */ \"./src/Services/Local/MakeTheInstanceConceptLocal.ts\");\n/* harmony import */ var _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Database/NoIndexDb */ \"./src/Database/NoIndexDb.ts\");\n/* harmony import */ var _Services_CreateTheConnection__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Services/CreateTheConnection */ \"./src/Services/CreateTheConnection.ts\");\n/* harmony import */ var _Services_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Services/GetConceptByCharacter */ \"./src/Services/GetConceptByCharacter.ts\");\n/* harmony import */ var _Services_GetLink__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Services/GetLink */ \"./src/Services/GetLink.ts\");\n/* harmony import */ var _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Services/CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\n/* harmony import */ var _Services_Local_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Services/Local/MakeTheTypeLocal */ \"./src/Services/Local/MakeTheTypeLocal.ts\");\n/* harmony import */ var _Services_MakeTheTypeConcept__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Services/MakeTheTypeConcept */ \"./src/Services/MakeTheTypeConcept.ts\");\n/* harmony import */ var _Api_MakeTheTypeConceptApi__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Api/MakeTheTypeConceptApi */ \"./src/Api/MakeTheTypeConceptApi.ts\");\n/* harmony import */ var _Services_GetLinkerConnectionFromConcept__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Services/GetLinkerConnectionFromConcept */ \"./src/Services/GetLinkerConnectionFromConcept.ts\");\n/* harmony import */ var _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Services/DeleteConcept */ \"./src/Services/DeleteConcept.ts\");\n/* harmony import */ var _Services_DeleteConnection__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Services/DeleteConnection */ \"./src/Services/DeleteConnection.ts\");\n/* harmony import */ var _Api_Delete_DeleteConceptInBackend__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Api/Delete/DeleteConceptInBackend */ \"./src/Api/Delete/DeleteConceptInBackend.ts\");\n/* harmony import */ var _Services_GetConnections__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Services/GetConnections */ \"./src/Services/GetConnections.ts\");\n/* harmony import */ var _Services_MakeTheTimestamp__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./Services/MakeTheTimestamp */ \"./src/Services/MakeTheTimestamp.ts\");\n/* harmony import */ var _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Api/RecursiveSearch */ \"./src/Api/RecursiveSearch.ts\");\n/* harmony import */ var _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Services/GetCompositionBulk */ \"./src/Services/GetCompositionBulk.ts\");\n/* harmony import */ var _Services_Upload__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Services/Upload */ \"./src/Services/Upload.ts\");\n/* harmony import */ var _Api_GetConceptBulk__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./Api/GetConceptBulk */ \"./src/Api/GetConceptBulk.ts\");\n/* harmony import */ var _Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./Api/GetConnectionBulk */ \"./src/Api/GetConnectionBulk.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./Api/GetAllConnectionsOfCompositionBulk */ \"./src/Api/GetAllConnectionsOfCompositionBulk.ts\");\n/* harmony import */ var _Api_Login__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Api/Login */ \"./src/Api/Login.ts\");\n/* harmony import */ var _Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Api/GetConnectionOfTheConcept */ \"./src/Api/GetConnectionOfTheConcept.ts\");\n/* harmony import */ var _Api_Signup__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Api/Signup */ \"./src/Api/Signup.ts\");\n/* harmony import */ var _Api_Signin__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./Api/Signin */ \"./src/Api/Signin.ts\");\n/* harmony import */ var _Services_UpdateComposition__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./Services/UpdateComposition */ \"./src/Services/UpdateComposition.ts\");\n/* harmony import */ var _Api_Search_Search__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./Api/Search/Search */ \"./src/Api/Search/Search.ts\");\n/* harmony import */ var _Api_Search_SearchWithLinker__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./Api/Search/SearchWithLinker */ \"./src/Api/Search/SearchWithLinker.ts\");\n/* harmony import */ var _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Services/Composition/CompositionCache */ \"./src/Services/Composition/CompositionCache.ts\");\n/* harmony import */ var _Api_Session_CreateSession__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./Api/Session/CreateSession */ \"./src/Api/Session/CreateSession.ts\");\n/* harmony import */ var _Api_Session_CreateSessionVisit__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./Api/Session/CreateSessionVisit */ \"./src/Api/Session/CreateSessionVisit.ts\");\n/* harmony import */ var _Services_GetRelation__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./Services/GetRelation */ \"./src/Services/GetRelation.ts\");\n/* harmony import */ var _Services_Composition_BuildComposition__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./Services/Composition/BuildComposition */ \"./src/Services/Composition/BuildComposition.ts\");\n/* harmony import */ var _Services_Composition_CreateCompositionCache__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./Services/Composition/CreateCompositionCache */ \"./src/Services/Composition/CreateCompositionCache.ts\");\n/* harmony import */ var _Services_Local_CreateDefaultLConcept__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Services/Local/CreateDefaultLConcept */ \"./src/Services/Local/CreateDefaultLConcept.ts\");\n/* harmony import */ var _Services_CreateTheConnectionGeneral__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./Services/CreateTheConnectionGeneral */ \"./src/Services/CreateTheConnectionGeneral.ts\");\n/* harmony import */ var _Services_Local_CreateTheConnectionLocal__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./Services/Local/CreateTheConnectionLocal */ \"./src/Services/Local/CreateTheConnectionLocal.ts\");\n/* harmony import */ var _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./Services/User/UserTranslation */ \"./src/Services/User/UserTranslation.ts\");\n/* harmony import */ var _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./Services/Search/SearchLinkMultiple */ \"./src/Services/Search/SearchLinkMultiple.ts\");\n/* harmony import */ var _Services_Local_GetTheConceptLocal__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./Services/Local/GetTheConceptLocal */ \"./src/Services/Local/GetTheConceptLocal.ts\");\n/* harmony import */ var _Services_Local_UpdateCompositionLocal__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./Services/Local/UpdateCompositionLocal */ \"./src/Services/Local/UpdateCompositionLocal.ts\");\n/* harmony import */ var _Services_Local_GetRelationLocal__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./Services/Local/GetRelationLocal */ \"./src/Services/Local/GetRelationLocal.ts\");\n/* harmony import */ var _Services_Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./Services/Local/GetConceptByCharacterLocal */ \"./src/Services/Local/GetConceptByCharacterLocal.ts\");\n/* harmony import */ var _Services_View_ViewInternalData__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./Services/View/ViewInternalData */ \"./src/Services/View/ViewInternalData.ts\");\n/* harmony import */ var _Api_View_ViewInternalDataApi__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./Api/View/ViewInternalDataApi */ \"./src/Api/View/ViewInternalDataApi.ts\");\n/* harmony import */ var _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./Services/Conversion/ConvertConcepts */ \"./src/Services/Conversion/ConvertConcepts.ts\");\n/* harmony import */ var _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./Services/Search/SearchLinkInternal */ \"./src/Services/Search/SearchLinkInternal.ts\");\n/* harmony import */ var _Services_Local_CreateConnectionBetweenTwoConceptsLocal__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./Services/Local/CreateConnectionBetweenTwoConceptsLocal */ \"./src/Services/Local/CreateConnectionBetweenTwoConceptsLocal.ts\");\n/* harmony import */ var _Services_Local_DeleteConceptLocal__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./Services/Local/DeleteConceptLocal */ \"./src/Services/Local/DeleteConceptLocal.ts\");\n/* harmony import */ var _Services_GetConnectionBetweenTwoConceptsLinker__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./Services/GetConnectionBetweenTwoConceptsLinker */ \"./src/Services/GetConnectionBetweenTwoConceptsLinker.ts\");\n/* harmony import */ var _Services_Common_DelayFunction__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./Services/Common/DelayFunction */ \"./src/Services/Common/DelayFunction.ts\");\n/* harmony import */ var _Api_GetConceptByCharacterAndType__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./Api/GetConceptByCharacterAndType */ \"./src/Api/GetConceptByCharacterAndType.ts\");\n/* harmony import */ var _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./Constants/FormatConstants */ \"./src/Constants/FormatConstants.ts\");\n/* harmony import */ var _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./Constants/AccessConstants */ \"./src/Constants/AccessConstants.ts\");\n/* harmony import */ var _Api_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./Api/Search/SearchWithTypeAndLinker */ \"./src/Api/Search/SearchWithTypeAndLinker.ts\");\n/* harmony import */ var _WrapperFunctions_DepenedencyObserver__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./WrapperFunctions/DepenedencyObserver */ \"./src/WrapperFunctions/DepenedencyObserver.ts\");\n/* harmony import */ var _WrapperFunctions_SearchLinkMultipleAllObservable__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./WrapperFunctions/SearchLinkMultipleAllObservable */ \"./src/WrapperFunctions/SearchLinkMultipleAllObservable.ts\");\n/* harmony import */ var _WrapperFunctions_GetCompositionObservable__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./WrapperFunctions/GetCompositionObservable */ \"./src/WrapperFunctions/GetCompositionObservable.ts\");\n/* harmony import */ var _WrapperFunctions_GetCompositionListObservable__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./WrapperFunctions/GetCompositionListObservable */ \"./src/WrapperFunctions/GetCompositionListObservable.ts\");\n/* harmony import */ var _Services_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./Services/Search/SearchWithTypeAndLinker */ \"./src/Services/Search/SearchWithTypeAndLinker.ts\");\n/* harmony import */ var _WrapperFunctions_GetLinkObservable__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./WrapperFunctions/GetLinkObservable */ \"./src/WrapperFunctions/GetLinkObservable.ts\");\n/* harmony import */ var _WrapperFunctions_RecursiveSearchObservable__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./WrapperFunctions/RecursiveSearchObservable */ \"./src/WrapperFunctions/RecursiveSearchObservable.ts\");\n/* harmony import */ var _WrapperFunctions_GetLinkListObservable__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./WrapperFunctions/GetLinkListObservable */ \"./src/WrapperFunctions/GetLinkListObservable.ts\");\n/* harmony import */ var _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./DataStructures/SyncData */ \"./src/DataStructures/SyncData.ts\");\n/* harmony import */ var _DataStructures_Concept__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./DataStructures/Concept */ \"./src/DataStructures/Concept.ts\");\n/* harmony import */ var _DataStructures_Local_LConcept__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./DataStructures/Local/LConcept */ \"./src/DataStructures/Local/LConcept.ts\");\n/* harmony import */ var _DataStructures_Local_LConnection__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./DataStructures/Local/LConnection */ \"./src/DataStructures/Local/LConnection.ts\");\n/* harmony import */ var _DataStructures_Connection__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./DataStructures/Connection */ \"./src/DataStructures/Connection.ts\");\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./DataStructures/ConnectionData */ \"./src/DataStructures/ConnectionData.ts\");\n/* harmony import */ var _DataStructures_BinaryTree__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./DataStructures/BinaryTree */ \"./src/DataStructures/BinaryTree.ts\");\n/* harmony import */ var _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./DataStructures/SearchQuery */ \"./src/DataStructures/SearchQuery.ts\");\n/* harmony import */ var _DataStructures_PatcherStructure__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./DataStructures/PatcherStructure */ \"./src/DataStructures/PatcherStructure.ts\");\n/* harmony import */ var _DataStructures_Session_SessionData__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./DataStructures/Session/SessionData */ \"./src/DataStructures/Session/SessionData.ts\");\n/* harmony import */ var _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./DataStructures/Composition/Composition */ \"./src/DataStructures/Composition/Composition.ts\");\n/* harmony import */ var _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./DataStructures/Composition/CompositionBinaryTree */ \"./src/DataStructures/Composition/CompositionBinaryTree.ts\");\n/* harmony import */ var _DataStructures_Composition_CompositionNode__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./DataStructures/Composition/CompositionNode */ \"./src/DataStructures/Composition/CompositionNode.ts\");\n/* harmony import */ var _DataStructures_Local_LocalSyncData__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./DataStructures/Local/LocalSyncData */ \"./src/DataStructures/Local/LocalSyncData.ts\");\n/* harmony import */ var _DataStructures_User_UserBinaryTree__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./DataStructures/User/UserBinaryTree */ \"./src/DataStructures/User/UserBinaryTree.ts\");\n/* harmony import */ var _DataStructures_FilterSearch__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./DataStructures/FilterSearch */ \"./src/DataStructures/FilterSearch.ts\");\n/* harmony import */ var _DataStructures_Search_SearchStructure__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./DataStructures/Search/SearchStructure */ \"./src/DataStructures/Search/SearchStructure.ts\");\n/* harmony import */ var _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./DataStructures/Local/LocalConceptData */ \"./src/DataStructures/Local/LocalConceptData.ts\");\n/* harmony import */ var _Services_GetDataFromIndexDb__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./Services/GetDataFromIndexDb */ \"./src/Services/GetDataFromIndexDb.ts\");\n/* harmony import */ var _Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./Services/Local/CreateLocalBinaryTreeFromData */ \"./src/Services/Local/CreateLocalBinaryTreeFromData.ts\");\n/* harmony import */ var _Services_InitializeSystem__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./Services/InitializeSystem */ \"./src/Services/InitializeSystem.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./DataStructures/Security/TokenStorage */ \"./src/DataStructures/Security/TokenStorage.ts\");\n/* harmony import */ var _Constants_general_const__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./Constants/general.const */ \"./src/Constants/general.const.ts\");\n/* harmony import */ var _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./Middleware/logger.service */ \"./src/Middleware/logger.service.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _Middleware_ApplicationMonitor__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./Middleware/ApplicationMonitor */ \"./src/Middleware/ApplicationMonitor.ts\");\n/* harmony import */ var _DataStructures_Responses_ErrorResponse__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./DataStructures/Responses/ErrorResponse */ \"./src/DataStructures/Responses/ErrorResponse.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./app */ \"./src/app.ts\");\n/* harmony import */ var _Widgets_BuilderStatefulWidget__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./Widgets/BuilderStatefulWidget */ \"./src/Widgets/BuilderStatefulWidget.ts\");\n/* harmony import */ var _Services_Transaction_LocalTransaction__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./Services/Transaction/LocalTransaction */ \"./src/Services/Transaction/LocalTransaction.ts\");\n/* harmony import */ var _Anomaly_anomaly__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ./Anomaly/anomaly */ \"./src/Anomaly/anomaly.ts\");\n/* harmony import */ var _Validator_validator__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(/*! ./Validator/validator */ \"./src/Validator/validator.ts\");\n/* harmony import */ var _Validator_utils__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ./Validator/utils */ \"./src/Validator/utils.ts\");\n/* harmony import */ var _Widgets_StatefulWidget__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ./Widgets/StatefulWidget */ \"./src/Widgets/StatefulWidget.ts\");\n/* harmony import */ var _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ./Services/DeleteConnectionByType */ \"./src/Services/DeleteConnectionByType.ts\");\n/* harmony import */ var _DataStructures_Search_FreeschemaQuery__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ./DataStructures/Search/FreeschemaQuery */ \"./src/DataStructures/Search/FreeschemaQuery.ts\");\n/* harmony import */ var _Api_Search_FreeschemaQueryApi__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./Api/Search/FreeschemaQueryApi */ \"./src/Api/Search/FreeschemaQueryApi.ts\");\n/* harmony import */ var _WrapperFunctions_SchemaQueryObservable__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ./WrapperFunctions/SchemaQueryObservable */ \"./src/WrapperFunctions/SchemaQueryObservable.ts\");\n/* harmony import */ var _Widgets_WidgetTree__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ./Widgets/WidgetTree */ \"./src/Widgets/WidgetTree.ts\");\n/* harmony import */ var _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./AccessTracker/accessTracker */ \"./src/AccessTracker/accessTracker.ts\");\n/* harmony import */ var _Services_CreateConnection_CreateConnectionEntity__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./Services/CreateConnection/CreateConnectionEntity */ \"./src/Services/CreateConnection/CreateConnectionEntity.ts\");\n/* harmony import */ var _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ./Widgets/RenderWidgetService */ \"./src/Widgets/RenderWidgetService.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar serviceWorker;\nconst TABID = Date.now().toString(36) + Math.random().toString(36).substring(2);\nlet subscribedListeners = [];\nlet serviceWorkerReady = false;\nlet messageQueue = [];\n// for sw use only START\nlet hasActivatedSW = false;\nfunction setHasActivatedSW(value) { hasActivatedSW = value; }\n// for sw use only END\n/**\n * This function lets you update the access token that the package uses. If this is not passed you cannot create, update, view or delete\n * Your concepts using this package.\n * @param accessToken access token got from the sign in process\n */\nfunction updateAccessToken(accessToken = \"\") {\n _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__.TokenStorage.BearerAccessToken = accessToken;\n if (serviceWorker)\n sendMessage('updateAccessToken', { accessToken });\n}\n/**\n *\n * @param url This is the url for the backend c# system or our main data fabric server\n * @param aiurl This is the AI url that pulls in the data using our AI system . If you do not enter this then also disable the enableAi flag.\n * @param accessToken This is the JWT token that needs to be passed (But since you have just initilized the system). There is no way we can get access token\n * So this access token can be empty string. You can set it afterwards with another function UpdateAccessToken();\n * @param nodeUrl This is the url for the node server. This is another server in the data fabric that is used as server for business logic and security features.\n * @param enableAi This flag is used to enable or disable the AI feature that preloads data in the indexdb.\n * @param applicationName This is an unique name that is given to a program. Use this to discern one indexdb from another.\n * @param enableSW {activate: boolean, scope?: string, pathToSW?: string, manual?: boolean} | undefined - This is for enabling service worker with its scope\n */\nfunction init() {\n return __awaiter(this, arguments, void 0, function* (url = \"\", aiurl = \"\", accessToken = \"\", nodeUrl = \"\", enableAi = true, applicationName = \"\", enableSW = undefined, flags = {}) {\n try {\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_URL = url;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.AI_URL = aiurl;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.NODE_URL = nodeUrl;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_APPLICATION = applicationName;\n _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__.TokenStorage.BearerAccessToken = accessToken;\n let randomizer = Math.floor(Math.random() * 100000000);\n // BaseUrl.BASE_RANDOMIZER = randomizer;\n // BaseUrl.BASE_RANDOMIZER = 999;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.setRandomizer(randomizer);\n // Change Default Flags\n const defaultFlags = {\n logApplication: false,\n logPackage: false,\n accessTracker: false,\n isTest: false\n };\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS = defaultFlags;\n // Merge Provided Flags with Defaults\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS = Object.assign(Object.assign({}, defaultFlags), flags);\n initializeFlags(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS);\n // console.log(\"BaseUrl.FLAGS before sending to service worker : \", BaseUrl.FLAGS)\n if (!(\"serviceWorker\" in navigator)) {\n yield initConceptConnection();\n console.warn(\"Service Worker not supported in this browser.\");\n return;\n }\n listenPostMessagaes();\n listenBroadCastMessages();\n if (enableSW && enableSW.activate && enableSW.manual) {\n yield new Promise((resolve, reject) => {\n navigator.serviceWorker.ready\n .then((registration) => __awaiter(this, void 0, void 0, function* () {\n console.log('registraions ready', registration);\n serviceWorker = registration.active;\n yield initServiceWorker();\n resolve('done');\n }))\n .catch(err => {\n console.error(\"Error: Ready service worker\", err);\n reject(err);\n })\n .finally(() => console.log('Finally service worker ready done'));\n setTimeout(() => reject('Timeout ready'), 30000);\n });\n }\n else if (enableSW &&\n (enableSW === null || enableSW === void 0 ? void 0 : enableSW.activate)) {\n try {\n console.log(\"service worker initialiing\");\n yield handleRegisterServiceWorker(enableSW);\n }\n catch (error) {\n yield initConceptConnection();\n console.error(\"Unable to start service worker\", error);\n }\n }\n else {\n yield initConceptConnection();\n console.warn('Service Worker not activated');\n }\n return true;\n }\n catch (error) {\n yield initConceptConnection();\n console.warn(\"Cannot initialize the system\", error);\n }\n });\n}\n/**\n * Method to send message to the service worker from main thread\n * @param type string\n * @param payload any\n * @returns Promise<any>\n */\nfunction sendMessage(type, payload) {\n return __awaiter(this, void 0, void 0, function* () {\n let messagedProcessed = false;\n const messageId = Math.random().toString(36).substring(2); // Generate a unique message ID\n payload.messageId = messageId;\n payload.TABID = TABID;\n // let actions = payload.actions\n console.log('sent type', type, messageId);\n const newPayload = JSON.parse(JSON.stringify(payload));\n const checkProcessInterval = setInterval(() => __awaiter(this, void 0, void 0, function* () {\n console.log('process took more than one second', messageId, type, messagedProcessed);\n if (!(yield checkIfExecutingProcess(messageId, type)) && !messagedProcessed) {\n console.log(\"Message process missing\");\n throw Error('Failed to handle type ' + type + ' ' + messageId);\n }\n }), 1000);\n return new Promise((resolve, reject) => {\n if (!((navigator.serviceWorker.controller || serviceWorker) && (serviceWorkerReady || type == 'init')))\n console.log('will go to queue', navigator.serviceWorker.controller, serviceWorker, serviceWorkerReady, type == 'init');\n if ((navigator.serviceWorker.controller || serviceWorker) && (serviceWorkerReady || type == 'init')) {\n const responseHandler = (event) => {\n var _a, _b, _c, _d, _e, _f;\n if (((_a = event === null || event === void 0 ? void 0 : event.data) === null || _a === void 0 ? void 0 : _a.messageId) == messageId) { // Check if the message ID matches\n console.log('received from sw', type, messageId);\n clearInterval(checkProcessInterval);\n if (!event.data.success) {\n if (((_b = event === null || event === void 0 ? void 0 : event.data) === null || _b === void 0 ? void 0 : _b.status) == 401) {\n reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_103__.HandleHttpError)(new Response('Unauthorized', { status: 401, statusText: (_c = event === null || event === void 0 ? void 0 : event.data) === null || _c === void 0 ? void 0 : _c.statusText })));\n }\n else if (((_d = event === null || event === void 0 ? void 0 : event.data) === null || _d === void 0 ? void 0 : _d.status) == 500) {\n reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_103__.HandleInternalError)(new Response('Internal Server Error', { status: 500, statusText: (_e = event === null || event === void 0 ? void 0 : event.data) === null || _e === void 0 ? void 0 : _e.statusText })));\n }\n else {\n console.error('Error in the response from worker:', event);\n reject(`Failed to handle action ${type} ${JSON.stringify(payload)}, Response: ${JSON.stringify(event.data)}`);\n }\n }\n if ((_f = event.data) === null || _f === void 0 ? void 0 : _f.actions) {\n payload.actions = JSON.parse(JSON.stringify(event.data.actions));\n }\n resolve(event.data);\n navigator.serviceWorker.removeEventListener(\"message\", responseHandler);\n }\n };\n navigator.serviceWorker.addEventListener(\"message\", responseHandler);\n // Send the message to the service worker\n if (navigator.serviceWorker.controller) {\n console.log('sent to sw', type, messageId);\n navigator.serviceWorker.controller.postMessage({ type, payload: newPayload });\n }\n else if (serviceWorker) {\n console.log('sent to sw', type, messageId);\n console.warn(`controller not found but serviceWorker is available. messageId: ${messageId}, type: ${type}`);\n if (serviceWorkerReady)\n console.warn('service worker was registered already but navigator is empty!!!', serviceWorker);\n try {\n serviceWorker.postMessage({ type, payload: newPayload });\n }\n catch (err) {\n console.log('Retrying again on catch service worker', err);\n serviceWorker.postMessage({ type, payload: newPayload });\n }\n }\n else {\n console.warn(`Service Worker hasn't loaded yet. messageId: ${messageId}, type: ${type}`);\n if (serviceWorkerReady)\n console.warn('service worker was registered already but is not available NOW!!!');\n console.info('ready', navigator.serviceWorker.ready);\n // wait one second before checking again\n setTimeout(() => {\n console.warn(`Re-Trying after certain time. messageId: ${messageId}, type: ${type}`);\n if (serviceWorker) {\n console.info('This is triggered ');\n serviceWorker === null || serviceWorker === void 0 ? void 0 : serviceWorker.postMessage({ type, payload });\n }\n else {\n console.log('not ready', type);\n clearInterval(checkProcessInterval);\n reject(\"Service worker not ready\");\n }\n }, 30000); // 30 seconds\n }\n // Timeout for waiting for the response (e.g., 5 seconds)\n setTimeout(() => {\n clearInterval(checkProcessInterval);\n reject(`No response from service worker after timeout: ${type}`);\n navigator.serviceWorker.removeEventListener(\"message\", responseHandler);\n }, 210000); // 3.5 minutes\n }\n else {\n messageQueue.push({ message: { type, payload: newPayload } });\n console.log('Message Queued', type, payload);\n console.log((navigator.serviceWorker.controller || serviceWorker), (serviceWorkerReady || type == 'init'));\n if (type == 'init') {\n clearInterval(checkProcessInterval);\n resolve(null);\n }\n }\n });\n });\n}\n// export function sendMessage(type: string, payload: any) {\n// return new Promise((resolve) => {\n// const responseHandler = (event: any) => {\n// resolve(event.data);\n// navigator.serviceWorker.removeEventListener(\"message\", responseHandler);\n// };\n// navigator.serviceWorker.addEventListener(\"message\", responseHandler);\n// navigator.serviceWorker.controller?.postMessage({ type, payload });\n// });\n// }\n// actions for message received on broadcast channel (specially from service worker)\nconst broadcastActions = {\n GetLinkListener: (payload) => __awaiter(void 0, void 0, void 0, function* () {\n const listener = subscribedListeners.find(listener => listener.listenerId == payload.listenerId);\n listener === null || listener === void 0 ? void 0 : listener.callback(payload.data);\n return { success: true };\n }),\n dispatchEvent: (payload) => __awaiter(void 0, void 0, void 0, function* () {\n if (serviceWorker) {\n let event = new Event(payload.id || '');\n dispatchEvent(event);\n }\n // self.clients.matchAll({ includeUncontrolled: true }).then(clients => {\n // clients.forEach(client => {\n // client.postMessage({ id, updatedData });\n // });\n // });\n return { success: true };\n }),\n checkInit: (payload) => __awaiter(void 0, void 0, void 0, function* () {\n console.log('service worker init 0');\n if (navigator.serviceWorker.controller) {\n console.log('service worker init 1');\n serviceWorker = navigator.serviceWorker.controller;\n }\n yield initServiceWorker();\n return { success: true };\n })\n};\n/**\n * Method to trigger broadcast message listener\n */\nfunction listenBroadCastMessages() {\n // broadcast event can be listened through both the service worker and other tabs\n _Constants_general_const__WEBPACK_IMPORTED_MODULE_101__.broadcastChannel.addEventListener('message', (event) => __awaiter(this, void 0, void 0, function* () {\n const { type, payload } = event.data;\n if (!type)\n return;\n let responseData = { success: false, data: undefined };\n if (broadcastActions[type]) {\n responseData = yield broadcastActions[type](payload);\n }\n else {\n console.warn(`Unable to handle \"${type}\" case in BC service worker`);\n }\n }));\n}\n/**\n * Method to trigger broadcast message listener\n */\nfunction listenPostMessagaes() {\n // broadcast event can be listened through both the service worker and other tabs\n navigator.serviceWorker.addEventListener('message', (event) => __awaiter(this, void 0, void 0, function* () {\n var _a, _b, _c, _d;\n try {\n if (event.data && event.data.type === 'API_401') {\n const { requestDetails } = event.data;\n // Re-create the POST request with the same headers and body\n const requestOptions = {\n method: requestDetails.method,\n headers: new Headers(requestDetails.headers),\n body: requestDetails.body // Pass the original body\n };\n // Re-hit the API with the same details\n const apiResponse = yield fetch(requestDetails.url, requestOptions);\n const responseBody = yield (apiResponse === null || apiResponse === void 0 ? void 0 : apiResponse.json()); // Get the response text\n // Send the response back to the Service Worker (same client)\n (_b = (_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) === null || _b === void 0 ? void 0 : _b.postMessage({\n type: 'API_RESPONSE',\n messageId: event.data.messageId,\n response: new Response(responseBody, {\n status: apiResponse.status,\n statusText: apiResponse.statusText,\n headers: apiResponse.headers\n })\n });\n }\n }\n catch (error) {\n console.error(\"Error during listenPostMessage\", error);\n (_d = (_c = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _c === void 0 ? void 0 : _c.controller) === null || _d === void 0 ? void 0 : _d.postMessage({\n type: 'API_RESPONSE',\n messageId: event.data.messageId\n });\n }\n }));\n}\n/**\n * Method to initialize the initial data\n * @param url string\n * @param aiurl string\n * @param accessToken string\n * @param nodeUrl string\n * @param enableAi boolean\n * @param applicationName string\n * @param isTest boolean\n * @returns Promise<any>\n */\nfunction initConceptConnection() {\n return __awaiter(this, void 0, void 0, function* () {\n /**\n * We initialize the system so that we get all the concepts from the backend system that are most likely to be used\n * We use some sort of AI algorithm to initilize these concepts with the most used concept.\n * @param enableAi enableAi is a flag that the user can choose to set if they want to use this enable AI feature\n * If the developer does not want to use this feature then they can just set enableAi to false.\n */\n yield (0,_Services_InitializeSystem__WEBPACK_IMPORTED_MODULE_98__[\"default\"])();\n const start = new Date().getTime();\n /**\n * This will create a binary tree in the memory from the indexdb.\n * This process will set Flags to denote that the binary tree is loaded, the character binary tree is loaded\n * and that the type binary tree has been loaded.\n * These trees are helpful in caching concepts and connections for the data fabric.\n */\n yield (0,_Services_CreateBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_0__[\"default\"])()\n .then(() => {\n // IdentifierFlags.isDataLoaded= true;\n // IdentifierFlags.isCharacterLoaded= true;\n // IdentifierFlags.isTypeLoaded= true;\n let elapsed = new Date().getTime() - start;\n console.log(\"The time taken to prepare concept data is \", elapsed);\n })\n .catch((event) => {\n // console.log(\"This is the error in creating binary tree\", IdentifierFlags.isDataLoaded, IdentifierFlags.isCharacterLoaded, IdentifierFlags.isTypeLoaded);\n throw event;\n });\n /**\n * This will create a binary tree of local concepts that is saved from the indexdb.\n * This process after finishing creating a binary tree of local concepts then set flag to denote that\n * LocalBinaryTree has been created from the concepts in indexdb\n * Local Binary Type tree has been loaded to the index db (flag is set to denote that)\n * Character Binary Tree has been loaded from indexdb to memory (flag is set to denote that)\n */\n yield (0,_Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_97__[\"default\"])()\n .then(() => {\n // IdentifierFlags.isLocalDataLoaded = true;\n // IdentifierFlags.isLocalTypeLoaded = true;\n // IdentifierFlags.isLocalCharacterLoaded = true;\n let elapsed = new Date().getTime() - start;\n console.log(\"The time taken to prepare local concept \", elapsed);\n })\n .catch((event) => {\n throw event;\n });\n /**\n * This process gets the local connections from indexdb and loads it to the local connections array which is inside of\n * a static class called LocalConnectionData.\n * This function will also set and IdentifierFlag that tells the whole program that this process has finished.\n */\n yield (0,_Services_GetDataFromIndexDb__WEBPACK_IMPORTED_MODULE_96__.GetConnectionsFromIndexDbLocal)()\n .then(() => {\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalConnectionLoaded = true;\n })\n .catch((event) => {\n //console.log(\"This is the error in creating local connections binary tree\");\n throw event;\n });\n /**\n * We have designed our system to use local concepts and connections with its own local ids(negative ids) that\n * is only valid for the browser that creates this. We have a translator in our node server.\n * This function does this process in initlization.\n */\n yield (0,_Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_97__.PopulateTheLocalConnectionToMemory)().catch((event) => {\n console.log(\"This is the error in populating binary tree\");\n throw event;\n });\n // await PopulateTheLocalConceptsToMemory().catch((event)=>{\n // console.log(\"This is the error in populating binary tree\");\n // });\n /**\n * This process gets the connections from indexdb and loads it to the connections array which is inside of\n * a static class called ConnectionData.\n * This function will also set and IdentifierFlag that tells the whole program that this process has finished.\n */\n yield (0,_Services_GetDataFromIndexDb__WEBPACK_IMPORTED_MODULE_96__.GetConnectionsFromIndexDb)()\n .then(() => {\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionTypeLoaded = true;\n let elapsed = new Date().getTime() - start;\n console.log(\"The time taken to prepare connections \", elapsed);\n })\n .catch((event) => {\n //console.log(\"This is the error in creating connections tree\");\n throw event;\n });\n });\n}\n/**\n * Method to dispatch Event received from SW\n * @param id number|string\n * @param data any\n */\nfunction dispatchIdEvent(id, data = {}) {\n // console.log('id event dispatched', id)\n if (serviceWorker || typeof window != undefined) {\n // let event = new Event(`${id}`);\n let event = new CustomEvent(`${id}`, data);\n dispatchEvent(event);\n }\n else {\n _Constants_general_const__WEBPACK_IMPORTED_MODULE_101__.broadcastChannel.postMessage({ type: 'dispatchEvent', payload: { id } });\n }\n}\nfunction processMessageQueue() {\n return __awaiter(this, void 0, void 0, function* () {\n while (messageQueue.length > 0) {\n const { message, resolve, reject } = messageQueue.shift();\n console.log('Queue poped', message.type);\n yield sendMessage(message.type, message.payload);\n }\n });\n}\n/**\n * Method to handle global exception occured in service worker\n * @param error any\n */\nconst handleServiceWorkerException = (error) => {\n // if (error instanceof FreeSchemaResponse && error.getStatus() != 401) {\n if (error instanceof _DataStructures_Responses_ErrorResponse__WEBPACK_IMPORTED_MODULE_105__.FreeSchemaResponse) {\n console.error('FreeSchemaResponse Error', error);\n throw error;\n }\n // if (error instanceof FreeSchemaResponse && error.getStatus() == 401) console.error('401 triggered in sw defaulting')\n console.error('Service Worker Error', error);\n};\n/**\n * Function to setup initial flag\n */\nfunction initializeFlags(flags) {\n try {\n if (flags.logApplication) {\n _Middleware_ApplicationMonitor__WEBPACK_IMPORTED_MODULE_104__.ApplicationMonitor.initialize();\n _app__WEBPACK_IMPORTED_MODULE_106__.Logger.logApplicationActivationStatus = true;\n console.warn(\"Application log started.\");\n }\n if (flags.logPackage) {\n _app__WEBPACK_IMPORTED_MODULE_106__.Logger.logPackageActivationStatus = true;\n console.warn(\"Package log started.\");\n }\n if (flags.accessTracker) {\n _app__WEBPACK_IMPORTED_MODULE_106__.AccessTracker.activateStatus = true;\n console.warn(\"Access Tracker Activated.\");\n }\n if (flags.isTest) {\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isDataLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isCharacterLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isTypeLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalDataLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalTypeLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalCharacterLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionTypeLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalConnectionLoaded = true;\n // return true;\n }\n return flags;\n }\n catch (error) {\n console.error(\"Failed to initialize flags:\", error);\n throw error;\n }\n}\n/**\n * Method to handle Registering service worker\n * @param enableSW any\n */\nfunction handleRegisterServiceWorker(enableSW) {\n return __awaiter(this, void 0, void 0, function* () {\n yield new Promise((resolve, reject) => {\n var _a, _b;\n let success = false;\n navigator.serviceWorker\n .register((_a = enableSW.pathToSW) !== null && _a !== void 0 ? _a : \"./serviceWorker.bundle.js\", {\n // type: \"module\",\n scope: (_b = enableSW.scope) !== null && _b !== void 0 ? _b : \"/\",\n })\n .then((registration) => __awaiter(this, void 0, void 0, function* () {\n console.log(\"Service Worker registered:\", registration);\n // process queue if exist\n setInterval(() => processMessageQueue(), 5000);\n // Add Listeners before initializing the service worker\n // Listen for updates to the service worker\n console.log(\"update listen start\");\n registration.onupdatefound = () => {\n const newWorker = registration.installing;\n console.log(\"new worker\", newWorker);\n if (newWorker) {\n newWorker.onstatechange = () => __awaiter(this, void 0, void 0, function* () {\n console.warn(\"on state change triggered\", newWorker.state, navigator.serviceWorker.controller);\n if (newWorker.state === \"installing\") {\n console.log(\"Service Worker installing\");\n serviceWorker = undefined;\n serviceWorkerReady = false;\n }\n // if (newWorker.state === 'activated' && navigator.serviceWorker.controller) {\n if ((newWorker.state === \"activated\" || newWorker.state === 'redundant') && navigator.serviceWorker.controller) {\n // && navigator.serviceWorker.controller) {\n console.log(\"New Service Worker is active\", registration);\n serviceWorker = newWorker;\n // serviceWorker = registration.active;\n // Send init message now that it's active\n setTimeout(() => {\n console.log('Message Processed after some time');\n processMessageQueue();\n }, 5000);\n yield initServiceWorker();\n success = true;\n serviceWorkerReady = true;\n processMessageQueue();\n resolve();\n }\n });\n }\n };\n // Listen for the activation of the new service worker\n registration.addEventListener('controllerchange', () => __awaiter(this, void 0, void 0, function* () {\n console.warn('controller change triggered', navigator.serviceWorker.controller);\n if (navigator.serviceWorker.controller) {\n serviceWorker = navigator.serviceWorker.controller;\n console.warn('Service worker has been activated; controller change');\n yield initServiceWorker();\n // The new service worker is now controlling the page\n // You can reload the page if necessary or handle the update process here\n }\n }));\n // state change \n if (registration.installing || registration.waiting || registration.active) {\n registration.addEventListener('statechange', (event) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.state) === 'activating') {\n serviceWorker = navigator.serviceWorker.controller;\n console.warn('Service Worker is activating statechange');\n yield initServiceWorker();\n }\n }));\n }\n // If the service worker is already active, mark it as ready\n if (registration.active) {\n serviceWorkerReady = true;\n console.log(\"active sw\");\n serviceWorker = registration.active;\n yield initServiceWorker();\n processMessageQueue();\n resolve();\n }\n else {\n // Handle if on state change didn't trigger\n setTimeout(() => {\n if (!success)\n reject(\"Not Completed Initialization\");\n }, 10000);\n }\n }))\n .catch((error) => __awaiter(this, void 0, void 0, function* () {\n yield initConceptConnection();\n reject(error);\n console.error(\"Service Worker registration failed:\", error);\n }));\n });\n });\n}\n/**\n * Method to initialize Serivce Worker\n */\nfunction initServiceWorker() {\n return __awaiter(this, void 0, void 0, function* () {\n yield sendMessage(\"init\", {\n url: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_URL,\n aiurl: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.AI_URL,\n accessToken: _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__.TokenStorage.BearerAccessToken,\n nodeUrl: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.NODE_URL,\n enableAi: false,\n applicationName: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_APPLICATION,\n flags: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS\n });\n });\n}\nfunction checkIfExecutingProcess(messageId, type) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n try {\n const res = yield sendMessage(\"checkProcess\", {});\n console.log('check interval data res for type ', type, messageId, res.data);\n if ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.processing)\n return true;\n else\n false;\n }\n catch (error) {\n console.error('error on checing executing process', type, messageId, error);\n return false;\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/app.ts?");
|
|
2017
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ADMIN: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__.ADMIN),\n/* harmony export */ ALLID: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.ALLID),\n/* harmony export */ AccessTracker: () => (/* reexport safe */ _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_118__.AccessTracker),\n/* harmony export */ AddGhostConcept: () => (/* reexport safe */ _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_51__.AddGhostConcept),\n/* harmony export */ Anomaly: () => (/* reexport safe */ _Anomaly_anomaly__WEBPACK_IMPORTED_MODULE_109__.Anomaly),\n/* harmony export */ BaseUrl: () => (/* reexport safe */ _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl),\n/* harmony export */ BinaryTree: () => (/* reexport safe */ _DataStructures_BinaryTree__WEBPACK_IMPORTED_MODULE_84__.BinaryTree),\n/* harmony export */ BuilderStatefulWidget: () => (/* reexport safe */ _Widgets_BuilderStatefulWidget__WEBPACK_IMPORTED_MODULE_107__.BuilderStatefulWidget),\n/* harmony export */ Composition: () => (/* reexport safe */ _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_88__.Composition),\n/* harmony export */ CompositionBinaryTree: () => (/* reexport safe */ _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_89__.CompositionBinaryTree),\n/* harmony export */ CompositionNode: () => (/* reexport safe */ _DataStructures_Composition_CompositionNode__WEBPACK_IMPORTED_MODULE_90__.CompositionNode),\n/* harmony export */ Concept: () => (/* reexport safe */ _DataStructures_Concept__WEBPACK_IMPORTED_MODULE_78__.Concept),\n/* harmony export */ ConceptsData: () => (/* reexport safe */ _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_82__.ConceptsData),\n/* harmony export */ Connection: () => (/* reexport safe */ _DataStructures_Connection__WEBPACK_IMPORTED_MODULE_81__.Connection),\n/* harmony export */ ConnectionData: () => (/* reexport safe */ _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_83__.ConnectionData),\n/* harmony export */ CreateComposition: () => (/* reexport safe */ _Services_CreateTheComposition__WEBPACK_IMPORTED_MODULE_9__[\"default\"]),\n/* harmony export */ CreateConnectionBetweenEntityLocal: () => (/* reexport safe */ _Services_CreateConnection_CreateConnectionEntity__WEBPACK_IMPORTED_MODULE_119__.CreateConnectionBetweenEntityLocal),\n/* harmony export */ CreateConnectionBetweenTwoConcepts: () => (/* reexport safe */ _Services_CreateConnectionBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_11__.CreateConnectionBetweenTwoConcepts),\n/* harmony export */ CreateConnectionBetweenTwoConceptsGeneral: () => (/* reexport safe */ _Services_CreateConnectionBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_11__.CreateConnectionBetweenTwoConceptsGeneral),\n/* harmony export */ CreateConnectionBetweenTwoConceptsLocal: () => (/* reexport safe */ _Services_Local_CreateConnectionBetweenTwoConceptsLocal__WEBPACK_IMPORTED_MODULE_61__.CreateConnectionBetweenTwoConceptsLocal),\n/* harmony export */ CreateDefaultConcept: () => (/* reexport safe */ _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_19__.CreateDefaultConcept),\n/* harmony export */ CreateDefaultLConcept: () => (/* reexport safe */ _Services_Local_CreateDefaultLConcept__WEBPACK_IMPORTED_MODULE_48__.CreateDefaultLConcept),\n/* harmony export */ CreateSession: () => (/* reexport safe */ _Api_Session_CreateSession__WEBPACK_IMPORTED_MODULE_43__.CreateSession),\n/* harmony export */ CreateSessionVisit: () => (/* reexport safe */ _Api_Session_CreateSessionVisit__WEBPACK_IMPORTED_MODULE_44__.CreateSessionVisit),\n/* harmony export */ CreateTheCompositionLocal: () => (/* reexport safe */ _Services_Local_CreateTheCompositionLocal__WEBPACK_IMPORTED_MODULE_10__.CreateTheCompositionLocal),\n/* harmony export */ CreateTheCompositionWithCache: () => (/* reexport safe */ _Services_Composition_CreateCompositionCache__WEBPACK_IMPORTED_MODULE_47__.CreateTheCompositionWithCache),\n/* harmony export */ CreateTheConnection: () => (/* reexport safe */ _Services_CreateTheConnection__WEBPACK_IMPORTED_MODULE_16__.createTheConnection),\n/* harmony export */ CreateTheConnectionGeneral: () => (/* reexport safe */ _Services_CreateTheConnectionGeneral__WEBPACK_IMPORTED_MODULE_49__.CreateTheConnectionGeneral),\n/* harmony export */ CreateTheConnectionLocal: () => (/* reexport safe */ _Services_Local_CreateTheConnectionLocal__WEBPACK_IMPORTED_MODULE_50__.CreateTheConnectionLocal),\n/* harmony export */ DATAID: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.DATAID),\n/* harmony export */ DATAIDDATE: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.DATAIDDATE),\n/* harmony export */ DelayFunctionExecution: () => (/* reexport safe */ _Services_Common_DelayFunction__WEBPACK_IMPORTED_MODULE_64__.DelayFunctionExecution),\n/* harmony export */ DeleteConceptById: () => (/* reexport safe */ _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__.DeleteConceptById),\n/* harmony export */ DeleteConceptLocal: () => (/* reexport safe */ _Services_Local_DeleteConceptLocal__WEBPACK_IMPORTED_MODULE_62__.DeleteConceptLocal),\n/* harmony export */ DeleteConnectionById: () => (/* reexport safe */ _Services_DeleteConnection__WEBPACK_IMPORTED_MODULE_25__.DeleteConnectionById),\n/* harmony export */ DeleteConnectionByType: () => (/* reexport safe */ _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_113__.DeleteConnectionByType),\n/* harmony export */ DeleteUser: () => (/* reexport safe */ _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__.DeleteUser),\n/* harmony export */ DependencyObserver: () => (/* reexport safe */ _WrapperFunctions_DepenedencyObserver__WEBPACK_IMPORTED_MODULE_69__.DependencyObserver),\n/* harmony export */ FilterSearch: () => (/* reexport safe */ _DataStructures_FilterSearch__WEBPACK_IMPORTED_MODULE_93__.FilterSearch),\n/* harmony export */ FormatFromConnections: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__.FormatFromConnections),\n/* harmony export */ FormatFromConnectionsAltered: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__.FormatFromConnectionsAltered),\n/* harmony export */ FreeschemaQuery: () => (/* reexport safe */ _DataStructures_Search_FreeschemaQuery__WEBPACK_IMPORTED_MODULE_114__.FreeschemaQuery),\n/* harmony export */ FreeschemaQueryApi: () => (/* reexport safe */ _Api_Search_FreeschemaQueryApi__WEBPACK_IMPORTED_MODULE_115__.FreeschemaQueryApi),\n/* harmony export */ GetAllConnectionsOfComposition: () => (/* reexport safe */ _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_6__.GetAllConnectionsOfComposition),\n/* harmony export */ GetAllConnectionsOfCompositionBulk: () => (/* reexport safe */ _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_34__.GetAllConnectionsOfCompositionBulk),\n/* harmony export */ GetAllTheConnectionsByTypeAndOfTheConcept: () => (/* reexport safe */ _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_113__.GetAllTheConnectionsByTypeAndOfTheConcept),\n/* harmony export */ GetComposition: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetComposition),\n/* harmony export */ GetCompositionBulk: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionBulk),\n/* harmony export */ GetCompositionBulkWithDataId: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionBulkWithDataId),\n/* harmony export */ GetCompositionFromConnectionsWithDataId: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataId),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdFromConnections: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataIdFromConnections),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdInObject: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataIdInObject),\n/* harmony export */ GetCompositionFromConnectionsWithDataIdIndex: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithDataIdIndex),\n/* harmony export */ GetCompositionFromConnectionsWithIndex: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithIndex),\n/* harmony export */ GetCompositionFromConnectionsWithIndexFromConnections: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetCompositionFromConnectionsWithIndexFromConnections),\n/* harmony export */ GetCompositionFromMemoryWithConnections: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionFromMemoryWithConnections),\n/* harmony export */ GetCompositionList: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionList),\n/* harmony export */ GetCompositionListAll: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListAll),\n/* harmony export */ GetCompositionListAllWithId: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListAllWithId),\n/* harmony export */ GetCompositionListListener: () => (/* reexport safe */ _WrapperFunctions_GetCompositionListObservable__WEBPACK_IMPORTED_MODULE_72__.GetCompositionListListener),\n/* harmony export */ GetCompositionListLocal: () => (/* reexport safe */ _Services_Local_GetCompositionListLocal__WEBPACK_IMPORTED_MODULE_5__.GetCompositionListLocal),\n/* harmony export */ GetCompositionListLocalWithId: () => (/* reexport safe */ _Services_Local_GetCompositionListLocal__WEBPACK_IMPORTED_MODULE_5__.GetCompositionListLocalWithId),\n/* harmony export */ GetCompositionListWithId: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListWithId),\n/* harmony export */ GetCompositionListWithIdUpdated: () => (/* reexport safe */ _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__.GetCompositionListWithIdUpdated),\n/* harmony export */ GetCompositionListener: () => (/* reexport safe */ _WrapperFunctions_GetCompositionObservable__WEBPACK_IMPORTED_MODULE_71__.GetCompositionListener),\n/* harmony export */ GetCompositionLocal: () => (/* reexport safe */ _Services_Local_GetCompositionLocal__WEBPACK_IMPORTED_MODULE_8__.GetCompositionLocal),\n/* harmony export */ GetCompositionLocalWithId: () => (/* reexport safe */ _Services_Local_GetCompositionLocal__WEBPACK_IMPORTED_MODULE_8__.GetCompositionLocalWithId),\n/* harmony export */ GetCompositionWithAllIds: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionWithAllIds),\n/* harmony export */ GetCompositionWithCache: () => (/* reexport safe */ _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__.GetCompositionWithCache),\n/* harmony export */ GetCompositionWithDataIdBulk: () => (/* reexport safe */ _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__.GetCompositionWithDataIdBulk),\n/* harmony export */ GetCompositionWithDataIdWithCache: () => (/* reexport safe */ _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__.GetCompositionWithDataIdWithCache),\n/* harmony export */ GetCompositionWithId: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionWithId),\n/* harmony export */ GetCompositionWithIdAndDateFromMemory: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.GetCompositionWithIdAndDateFromMemory),\n/* harmony export */ GetConceptBulk: () => (/* reexport safe */ _Api_GetConceptBulk__WEBPACK_IMPORTED_MODULE_32__.GetConceptBulk),\n/* harmony export */ GetConceptByCharacter: () => (/* reexport safe */ _Services_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_17__[\"default\"]),\n/* harmony export */ GetConceptByCharacterAndCategoryLocal: () => (/* reexport safe */ _Services_Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_56__.GetConceptByCharacterAndCategoryLocal),\n/* harmony export */ GetConceptByCharacterAndType: () => (/* reexport safe */ _Api_GetConceptByCharacterAndType__WEBPACK_IMPORTED_MODULE_65__.GetConceptByCharacterAndType),\n/* harmony export */ GetConnectionBetweenTwoConceptsLinker: () => (/* reexport safe */ _Services_GetConnectionBetweenTwoConceptsLinker__WEBPACK_IMPORTED_MODULE_63__.GetConnectionBetweenTwoConceptsLinker),\n/* harmony export */ GetConnectionBulk: () => (/* reexport safe */ _Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_33__.GetConnectionBulk),\n/* harmony export */ GetConnectionById: () => (/* reexport safe */ _Services_GetConnections__WEBPACK_IMPORTED_MODULE_27__.GetConnectionById),\n/* harmony export */ GetConnectionDataPrefetch: () => (/* reexport safe */ _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__.GetConnectionDataPrefetch),\n/* harmony export */ GetConnectionOfTheConcept: () => (/* reexport safe */ _Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_36__.GetConnectionOfTheConcept),\n/* harmony export */ GetLink: () => (/* reexport safe */ _Services_GetLink__WEBPACK_IMPORTED_MODULE_18__.GetLink),\n/* harmony export */ GetLinkListListener: () => (/* reexport safe */ _WrapperFunctions_GetLinkListObservable__WEBPACK_IMPORTED_MODULE_76__.GetLinkListListener),\n/* harmony export */ GetLinkListener: () => (/* reexport safe */ _WrapperFunctions_GetLinkObservable__WEBPACK_IMPORTED_MODULE_74__.GetLinkListener),\n/* harmony export */ GetLinkRaw: () => (/* reexport safe */ _Services_GetLink__WEBPACK_IMPORTED_MODULE_18__.GetLinkRaw),\n/* harmony export */ GetLinkerConnectionFromConcepts: () => (/* reexport safe */ _Services_GetLinkerConnectionFromConcept__WEBPACK_IMPORTED_MODULE_23__.GetLinkerConnectionFromConcepts),\n/* harmony export */ GetLinkerConnectionToConcepts: () => (/* reexport safe */ _Services_GetLinkerConnectionFromConcept__WEBPACK_IMPORTED_MODULE_23__.GetLinkerConnectionToConcepts),\n/* harmony export */ GetRelation: () => (/* reexport safe */ _Services_GetRelation__WEBPACK_IMPORTED_MODULE_45__.GetRelation),\n/* harmony export */ GetRelationLocal: () => (/* reexport safe */ _Services_Local_GetRelationLocal__WEBPACK_IMPORTED_MODULE_55__.GetRelationLocal),\n/* harmony export */ GetRelationRaw: () => (/* reexport safe */ _Services_GetRelation__WEBPACK_IMPORTED_MODULE_45__.GetRelationRaw),\n/* harmony export */ GetTheConcept: () => (/* reexport safe */ _Services_GetTheConcept__WEBPACK_IMPORTED_MODULE_12__[\"default\"]),\n/* harmony export */ GetTheConceptLocal: () => (/* reexport safe */ _Services_Local_GetTheConceptLocal__WEBPACK_IMPORTED_MODULE_53__.GetTheConceptLocal),\n/* harmony export */ GetUserGhostId: () => (/* reexport safe */ _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_51__.GetUserGhostId),\n/* harmony export */ JUSTDATA: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.JUSTDATA),\n/* harmony export */ LConcept: () => (/* reexport safe */ _DataStructures_Local_LConcept__WEBPACK_IMPORTED_MODULE_79__.LConcept),\n/* harmony export */ LConnection: () => (/* reexport safe */ _DataStructures_Local_LConnection__WEBPACK_IMPORTED_MODULE_80__.LConnection),\n/* harmony export */ LISTNORMAL: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.LISTNORMAL),\n/* harmony export */ LocalConceptsData: () => (/* reexport safe */ _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_95__.LocalConceptsData),\n/* harmony export */ LocalSyncData: () => (/* reexport safe */ _DataStructures_Local_LocalSyncData__WEBPACK_IMPORTED_MODULE_91__.LocalSyncData),\n/* harmony export */ LocalTransaction: () => (/* reexport safe */ _Services_Transaction_LocalTransaction__WEBPACK_IMPORTED_MODULE_108__.LocalTransaction),\n/* harmony export */ Logger: () => (/* reexport safe */ _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_102__.Logger),\n/* harmony export */ LoginToBackend: () => (/* reexport safe */ _Api_Login__WEBPACK_IMPORTED_MODULE_35__.LoginToBackend),\n/* harmony export */ MakeTheInstanceConcept: () => (/* reexport safe */ _Services_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_13__[\"default\"]),\n/* harmony export */ MakeTheInstanceConceptLocal: () => (/* reexport safe */ _Services_Local_MakeTheInstanceConceptLocal__WEBPACK_IMPORTED_MODULE_14__.MakeTheInstanceConceptLocal),\n/* harmony export */ MakeTheTimestamp: () => (/* reexport safe */ _Services_MakeTheTimestamp__WEBPACK_IMPORTED_MODULE_28__.MakeTheTimestamp),\n/* harmony export */ MakeTheTypeConcept: () => (/* reexport safe */ _Services_MakeTheTypeConcept__WEBPACK_IMPORTED_MODULE_21__.MakeTheTypeConcept),\n/* harmony export */ MakeTheTypeConceptApi: () => (/* reexport safe */ _Api_MakeTheTypeConceptApi__WEBPACK_IMPORTED_MODULE_22__.MakeTheTypeConceptApi),\n/* harmony export */ MakeTheTypeConceptLocal: () => (/* reexport safe */ _Services_Local_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_20__.MakeTheTypeConceptLocal),\n/* harmony export */ NORMAL: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.NORMAL),\n/* harmony export */ PRIVATE: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__.PRIVATE),\n/* harmony export */ PUBLIC: () => (/* reexport safe */ _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__.PUBLIC),\n/* harmony export */ PatcherStructure: () => (/* reexport safe */ _DataStructures_PatcherStructure__WEBPACK_IMPORTED_MODULE_86__.PatcherStructure),\n/* harmony export */ RAW: () => (/* reexport safe */ _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__.RAW),\n/* harmony export */ RecursiveSearchApi: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApi),\n/* harmony export */ RecursiveSearchApiNewRawFullLinker: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiNewRawFullLinker),\n/* harmony export */ RecursiveSearchApiRaw: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiRaw),\n/* harmony export */ RecursiveSearchApiRawFullLinker: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiRawFullLinker),\n/* harmony export */ RecursiveSearchApiWithInternalConnections: () => (/* reexport safe */ _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__.RecursiveSearchApiWithInternalConnections),\n/* harmony export */ RecursiveSearchListener: () => (/* reexport safe */ _WrapperFunctions_RecursiveSearchObservable__WEBPACK_IMPORTED_MODULE_75__.RecursiveSearchListener),\n/* harmony export */ SchemaQueryListener: () => (/* reexport safe */ _WrapperFunctions_SchemaQueryObservable__WEBPACK_IMPORTED_MODULE_116__.SchemaQueryListener),\n/* harmony export */ SearchAllConcepts: () => (/* reexport safe */ _Api_Search_Search__WEBPACK_IMPORTED_MODULE_40__.SearchAllConcepts),\n/* harmony export */ SearchLinkInternal: () => (/* reexport safe */ _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_60__.SearchLinkInternal),\n/* harmony export */ SearchLinkInternalAll: () => (/* reexport safe */ _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_60__.SearchLinkInternalAll),\n/* harmony export */ SearchLinkMultipleAll: () => (/* reexport safe */ _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__.SearchLinkMultipleAll),\n/* harmony export */ SearchLinkMultipleAllObservable: () => (/* reexport safe */ _WrapperFunctions_SearchLinkMultipleAllObservable__WEBPACK_IMPORTED_MODULE_70__.SearchLinkMultipleAllObservable),\n/* harmony export */ SearchLinkMultipleApi: () => (/* reexport safe */ _Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_2__.SearchLinkMultipleApi),\n/* harmony export */ SearchQuery: () => (/* reexport safe */ _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_85__.SearchQuery),\n/* harmony export */ SearchStructure: () => (/* reexport safe */ _DataStructures_Search_SearchStructure__WEBPACK_IMPORTED_MODULE_94__.SearchStructure),\n/* harmony export */ SearchWithLinker: () => (/* reexport safe */ _Api_Search_SearchWithLinker__WEBPACK_IMPORTED_MODULE_41__.SearchWithLinker),\n/* harmony export */ SearchWithTypeAndLinker: () => (/* reexport safe */ _Services_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_73__.SearchWithTypeAndLinker),\n/* harmony export */ SearchWithTypeAndLinkerApi: () => (/* reexport safe */ _Api_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_68__.SearchWithTypeAndLinkerApi),\n/* harmony export */ SessionData: () => (/* reexport safe */ _DataStructures_Session_SessionData__WEBPACK_IMPORTED_MODULE_87__.SessionData),\n/* harmony export */ Signin: () => (/* reexport safe */ _Api_Signin__WEBPACK_IMPORTED_MODULE_38__[\"default\"]),\n/* harmony export */ Signup: () => (/* reexport safe */ _Api_Signup__WEBPACK_IMPORTED_MODULE_37__[\"default\"]),\n/* harmony export */ SignupEntity: () => (/* reexport safe */ _Api_Signup__WEBPACK_IMPORTED_MODULE_37__.SignupEntity),\n/* harmony export */ SplitStrings: () => (/* reexport safe */ _Services_SplitStrings__WEBPACK_IMPORTED_MODULE_3__.SplitStrings),\n/* harmony export */ StatefulWidget: () => (/* reexport safe */ _Widgets_StatefulWidget__WEBPACK_IMPORTED_MODULE_112__.StatefulWidget),\n/* harmony export */ SyncData: () => (/* reexport safe */ _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_77__.SyncData),\n/* harmony export */ TrashTheConcept: () => (/* reexport safe */ _Api_Delete_DeleteConceptInBackend__WEBPACK_IMPORTED_MODULE_26__.TrashTheConcept),\n/* harmony export */ UpdateComposition: () => (/* reexport safe */ _Services_UpdateComposition__WEBPACK_IMPORTED_MODULE_39__[\"default\"]),\n/* harmony export */ UpdateCompositionLocal: () => (/* reexport safe */ _Services_Local_UpdateCompositionLocal__WEBPACK_IMPORTED_MODULE_54__.UpdateCompositionLocal),\n/* harmony export */ UserBinaryTree: () => (/* reexport safe */ _DataStructures_User_UserBinaryTree__WEBPACK_IMPORTED_MODULE_92__.UserBinaryTree),\n/* harmony export */ Validator: () => (/* reexport safe */ _Validator_validator__WEBPACK_IMPORTED_MODULE_110__.Validator),\n/* harmony export */ ViewInternalData: () => (/* reexport safe */ _Services_View_ViewInternalData__WEBPACK_IMPORTED_MODULE_57__.ViewInternalData),\n/* harmony export */ ViewInternalDataApi: () => (/* reexport safe */ _Api_View_ViewInternalDataApi__WEBPACK_IMPORTED_MODULE_58__.ViewInternalDataApi),\n/* harmony export */ WidgetTree: () => (/* reexport safe */ _Widgets_WidgetTree__WEBPACK_IMPORTED_MODULE_117__.WidgetTree),\n/* harmony export */ convertFromConceptToLConcept: () => (/* reexport safe */ _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_59__.convertFromConceptToLConcept),\n/* harmony export */ convertFromLConceptToConcept: () => (/* reexport safe */ _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_59__.convertFromLConceptToConcept),\n/* harmony export */ convertWidgetTreeToWidget: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__.convertWidgetTreeToWidget),\n/* harmony export */ convertWidgetTreeToWidgetWithWrapper: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__.convertWidgetTreeToWidgetWithWrapper),\n/* harmony export */ createFormFieldData: () => (/* reexport safe */ _Validator_utils__WEBPACK_IMPORTED_MODULE_111__.createFormFieldData),\n/* harmony export */ dispatchIdEvent: () => (/* binding */ dispatchIdEvent),\n/* harmony export */ getFromDatabaseWithType: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.getFromDatabaseWithType),\n/* harmony export */ getObjectsFromIndexDb: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.getObjectsFromIndexDb),\n/* harmony export */ handleServiceWorkerException: () => (/* binding */ handleServiceWorkerException),\n/* harmony export */ hasActivatedSW: () => (/* binding */ hasActivatedSW),\n/* harmony export */ init: () => (/* binding */ init),\n/* harmony export */ recursiveFetch: () => (/* reexport safe */ _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__.recursiveFetch),\n/* harmony export */ recursiveFetchNew: () => (/* reexport safe */ _Services_Composition_BuildComposition__WEBPACK_IMPORTED_MODULE_46__.recursiveFetchNew),\n/* harmony export */ renderLatestWidget: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__.renderLatestWidget),\n/* harmony export */ renderPage: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__.renderPage),\n/* harmony export */ renderWidget: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__.renderWidget),\n/* harmony export */ searchLinkMultipleListener: () => (/* reexport safe */ _WrapperFunctions_SearchLinkMultipleAllObservable__WEBPACK_IMPORTED_MODULE_70__.searchLinkMultipleListener),\n/* harmony export */ sendMessage: () => (/* binding */ sendMessage),\n/* harmony export */ serviceWorker: () => (/* binding */ serviceWorker),\n/* harmony export */ setHasActivatedSW: () => (/* binding */ setHasActivatedSW),\n/* harmony export */ storeToDatabase: () => (/* reexport safe */ _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__.storeToDatabase),\n/* harmony export */ subscribedListeners: () => (/* binding */ subscribedListeners),\n/* harmony export */ unwrapContainers: () => (/* reexport safe */ _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__.unwrapContainers),\n/* harmony export */ updateAccessToken: () => (/* binding */ updateAccessToken),\n/* harmony export */ uploadAttachment: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.uploadAttachment),\n/* harmony export */ uploadFile: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.uploadFile),\n/* harmony export */ uploadImage: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.uploadImage),\n/* harmony export */ validDocumentFormats: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.validDocumentFormats),\n/* harmony export */ validImageFormats: () => (/* reexport safe */ _Services_Upload__WEBPACK_IMPORTED_MODULE_31__.validImageFormats)\n/* harmony export */ });\n/* harmony import */ var _Services_CreateBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Services/CreateBinaryTreeFromData */ \"./src/Services/CreateBinaryTreeFromData.ts\");\n/* harmony import */ var _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DataStructures/IdentifierFlags */ \"./src/DataStructures/IdentifierFlags.ts\");\n/* harmony import */ var _Api_Search_SearchLinkMultipleApi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Api/Search/SearchLinkMultipleApi */ \"./src/Api/Search/SearchLinkMultipleApi.ts\");\n/* harmony import */ var _Services_SplitStrings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Services/SplitStrings */ \"./src/Services/SplitStrings.ts\");\n/* harmony import */ var _Services_GetCompositionList__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Services/GetCompositionList */ \"./src/Services/GetCompositionList.ts\");\n/* harmony import */ var _Services_Local_GetCompositionListLocal__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Services/Local/GetCompositionListLocal */ \"./src/Services/Local/GetCompositionListLocal.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfComposition__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Api/GetAllConnectionsOfComposition */ \"./src/Api/GetAllConnectionsOfComposition.ts\");\n/* harmony import */ var _Services_GetComposition__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Services/GetComposition */ \"./src/Services/GetComposition.ts\");\n/* harmony import */ var _Services_Local_GetCompositionLocal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Services/Local/GetCompositionLocal */ \"./src/Services/Local/GetCompositionLocal.ts\");\n/* harmony import */ var _Services_CreateTheComposition__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Services/CreateTheComposition */ \"./src/Services/CreateTheComposition.ts\");\n/* harmony import */ var _Services_Local_CreateTheCompositionLocal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Services/Local/CreateTheCompositionLocal */ \"./src/Services/Local/CreateTheCompositionLocal.ts\");\n/* harmony import */ var _Services_CreateConnectionBetweenTwoConcepts__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Services/CreateConnectionBetweenTwoConcepts */ \"./src/Services/CreateConnectionBetweenTwoConcepts.ts\");\n/* harmony import */ var _Services_GetTheConcept__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Services/GetTheConcept */ \"./src/Services/GetTheConcept.ts\");\n/* harmony import */ var _Services_MakeTheInstanceConcept__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Services/MakeTheInstanceConcept */ \"./src/Services/MakeTheInstanceConcept.ts\");\n/* harmony import */ var _Services_Local_MakeTheInstanceConceptLocal__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Services/Local/MakeTheInstanceConceptLocal */ \"./src/Services/Local/MakeTheInstanceConceptLocal.ts\");\n/* harmony import */ var _Database_NoIndexDb__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Database/NoIndexDb */ \"./src/Database/NoIndexDb.ts\");\n/* harmony import */ var _Services_CreateTheConnection__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Services/CreateTheConnection */ \"./src/Services/CreateTheConnection.ts\");\n/* harmony import */ var _Services_GetConceptByCharacter__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Services/GetConceptByCharacter */ \"./src/Services/GetConceptByCharacter.ts\");\n/* harmony import */ var _Services_GetLink__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Services/GetLink */ \"./src/Services/GetLink.ts\");\n/* harmony import */ var _Services_CreateDefaultConcept__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Services/CreateDefaultConcept */ \"./src/Services/CreateDefaultConcept.ts\");\n/* harmony import */ var _Services_Local_MakeTheTypeLocal__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Services/Local/MakeTheTypeLocal */ \"./src/Services/Local/MakeTheTypeLocal.ts\");\n/* harmony import */ var _Services_MakeTheTypeConcept__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Services/MakeTheTypeConcept */ \"./src/Services/MakeTheTypeConcept.ts\");\n/* harmony import */ var _Api_MakeTheTypeConceptApi__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Api/MakeTheTypeConceptApi */ \"./src/Api/MakeTheTypeConceptApi.ts\");\n/* harmony import */ var _Services_GetLinkerConnectionFromConcept__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Services/GetLinkerConnectionFromConcept */ \"./src/Services/GetLinkerConnectionFromConcept.ts\");\n/* harmony import */ var _Services_DeleteConcept__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Services/DeleteConcept */ \"./src/Services/DeleteConcept.ts\");\n/* harmony import */ var _Services_DeleteConnection__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Services/DeleteConnection */ \"./src/Services/DeleteConnection.ts\");\n/* harmony import */ var _Api_Delete_DeleteConceptInBackend__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Api/Delete/DeleteConceptInBackend */ \"./src/Api/Delete/DeleteConceptInBackend.ts\");\n/* harmony import */ var _Services_GetConnections__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Services/GetConnections */ \"./src/Services/GetConnections.ts\");\n/* harmony import */ var _Services_MakeTheTimestamp__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./Services/MakeTheTimestamp */ \"./src/Services/MakeTheTimestamp.ts\");\n/* harmony import */ var _Api_RecursiveSearch__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Api/RecursiveSearch */ \"./src/Api/RecursiveSearch.ts\");\n/* harmony import */ var _Services_GetCompositionBulk__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Services/GetCompositionBulk */ \"./src/Services/GetCompositionBulk.ts\");\n/* harmony import */ var _Services_Upload__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Services/Upload */ \"./src/Services/Upload.ts\");\n/* harmony import */ var _Api_GetConceptBulk__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./Api/GetConceptBulk */ \"./src/Api/GetConceptBulk.ts\");\n/* harmony import */ var _Api_GetConnectionBulk__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./Api/GetConnectionBulk */ \"./src/Api/GetConnectionBulk.ts\");\n/* harmony import */ var _Api_GetAllConnectionsOfCompositionBulk__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./Api/GetAllConnectionsOfCompositionBulk */ \"./src/Api/GetAllConnectionsOfCompositionBulk.ts\");\n/* harmony import */ var _Api_Login__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Api/Login */ \"./src/Api/Login.ts\");\n/* harmony import */ var _Api_GetConnectionOfTheConcept__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Api/GetConnectionOfTheConcept */ \"./src/Api/GetConnectionOfTheConcept.ts\");\n/* harmony import */ var _Api_Signup__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Api/Signup */ \"./src/Api/Signup.ts\");\n/* harmony import */ var _Api_Signin__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./Api/Signin */ \"./src/Api/Signin.ts\");\n/* harmony import */ var _Services_UpdateComposition__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./Services/UpdateComposition */ \"./src/Services/UpdateComposition.ts\");\n/* harmony import */ var _Api_Search_Search__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./Api/Search/Search */ \"./src/Api/Search/Search.ts\");\n/* harmony import */ var _Api_Search_SearchWithLinker__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./Api/Search/SearchWithLinker */ \"./src/Api/Search/SearchWithLinker.ts\");\n/* harmony import */ var _Services_Composition_CompositionCache__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Services/Composition/CompositionCache */ \"./src/Services/Composition/CompositionCache.ts\");\n/* harmony import */ var _Api_Session_CreateSession__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./Api/Session/CreateSession */ \"./src/Api/Session/CreateSession.ts\");\n/* harmony import */ var _Api_Session_CreateSessionVisit__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./Api/Session/CreateSessionVisit */ \"./src/Api/Session/CreateSessionVisit.ts\");\n/* harmony import */ var _Services_GetRelation__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./Services/GetRelation */ \"./src/Services/GetRelation.ts\");\n/* harmony import */ var _Services_Composition_BuildComposition__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./Services/Composition/BuildComposition */ \"./src/Services/Composition/BuildComposition.ts\");\n/* harmony import */ var _Services_Composition_CreateCompositionCache__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./Services/Composition/CreateCompositionCache */ \"./src/Services/Composition/CreateCompositionCache.ts\");\n/* harmony import */ var _Services_Local_CreateDefaultLConcept__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Services/Local/CreateDefaultLConcept */ \"./src/Services/Local/CreateDefaultLConcept.ts\");\n/* harmony import */ var _Services_CreateTheConnectionGeneral__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./Services/CreateTheConnectionGeneral */ \"./src/Services/CreateTheConnectionGeneral.ts\");\n/* harmony import */ var _Services_Local_CreateTheConnectionLocal__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./Services/Local/CreateTheConnectionLocal */ \"./src/Services/Local/CreateTheConnectionLocal.ts\");\n/* harmony import */ var _Services_User_UserTranslation__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./Services/User/UserTranslation */ \"./src/Services/User/UserTranslation.ts\");\n/* harmony import */ var _Services_Search_SearchLinkMultiple__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./Services/Search/SearchLinkMultiple */ \"./src/Services/Search/SearchLinkMultiple.ts\");\n/* harmony import */ var _Services_Local_GetTheConceptLocal__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./Services/Local/GetTheConceptLocal */ \"./src/Services/Local/GetTheConceptLocal.ts\");\n/* harmony import */ var _Services_Local_UpdateCompositionLocal__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./Services/Local/UpdateCompositionLocal */ \"./src/Services/Local/UpdateCompositionLocal.ts\");\n/* harmony import */ var _Services_Local_GetRelationLocal__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./Services/Local/GetRelationLocal */ \"./src/Services/Local/GetRelationLocal.ts\");\n/* harmony import */ var _Services_Local_GetConceptByCharacterLocal__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./Services/Local/GetConceptByCharacterLocal */ \"./src/Services/Local/GetConceptByCharacterLocal.ts\");\n/* harmony import */ var _Services_View_ViewInternalData__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./Services/View/ViewInternalData */ \"./src/Services/View/ViewInternalData.ts\");\n/* harmony import */ var _Api_View_ViewInternalDataApi__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./Api/View/ViewInternalDataApi */ \"./src/Api/View/ViewInternalDataApi.ts\");\n/* harmony import */ var _Services_Conversion_ConvertConcepts__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./Services/Conversion/ConvertConcepts */ \"./src/Services/Conversion/ConvertConcepts.ts\");\n/* harmony import */ var _Services_Search_SearchLinkInternal__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./Services/Search/SearchLinkInternal */ \"./src/Services/Search/SearchLinkInternal.ts\");\n/* harmony import */ var _Services_Local_CreateConnectionBetweenTwoConceptsLocal__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./Services/Local/CreateConnectionBetweenTwoConceptsLocal */ \"./src/Services/Local/CreateConnectionBetweenTwoConceptsLocal.ts\");\n/* harmony import */ var _Services_Local_DeleteConceptLocal__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./Services/Local/DeleteConceptLocal */ \"./src/Services/Local/DeleteConceptLocal.ts\");\n/* harmony import */ var _Services_GetConnectionBetweenTwoConceptsLinker__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./Services/GetConnectionBetweenTwoConceptsLinker */ \"./src/Services/GetConnectionBetweenTwoConceptsLinker.ts\");\n/* harmony import */ var _Services_Common_DelayFunction__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./Services/Common/DelayFunction */ \"./src/Services/Common/DelayFunction.ts\");\n/* harmony import */ var _Api_GetConceptByCharacterAndType__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./Api/GetConceptByCharacterAndType */ \"./src/Api/GetConceptByCharacterAndType.ts\");\n/* harmony import */ var _Constants_FormatConstants__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./Constants/FormatConstants */ \"./src/Constants/FormatConstants.ts\");\n/* harmony import */ var _Constants_AccessConstants__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./Constants/AccessConstants */ \"./src/Constants/AccessConstants.ts\");\n/* harmony import */ var _Api_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./Api/Search/SearchWithTypeAndLinker */ \"./src/Api/Search/SearchWithTypeAndLinker.ts\");\n/* harmony import */ var _WrapperFunctions_DepenedencyObserver__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./WrapperFunctions/DepenedencyObserver */ \"./src/WrapperFunctions/DepenedencyObserver.ts\");\n/* harmony import */ var _WrapperFunctions_SearchLinkMultipleAllObservable__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./WrapperFunctions/SearchLinkMultipleAllObservable */ \"./src/WrapperFunctions/SearchLinkMultipleAllObservable.ts\");\n/* harmony import */ var _WrapperFunctions_GetCompositionObservable__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./WrapperFunctions/GetCompositionObservable */ \"./src/WrapperFunctions/GetCompositionObservable.ts\");\n/* harmony import */ var _WrapperFunctions_GetCompositionListObservable__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./WrapperFunctions/GetCompositionListObservable */ \"./src/WrapperFunctions/GetCompositionListObservable.ts\");\n/* harmony import */ var _Services_Search_SearchWithTypeAndLinker__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./Services/Search/SearchWithTypeAndLinker */ \"./src/Services/Search/SearchWithTypeAndLinker.ts\");\n/* harmony import */ var _WrapperFunctions_GetLinkObservable__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./WrapperFunctions/GetLinkObservable */ \"./src/WrapperFunctions/GetLinkObservable.ts\");\n/* harmony import */ var _WrapperFunctions_RecursiveSearchObservable__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./WrapperFunctions/RecursiveSearchObservable */ \"./src/WrapperFunctions/RecursiveSearchObservable.ts\");\n/* harmony import */ var _WrapperFunctions_GetLinkListObservable__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./WrapperFunctions/GetLinkListObservable */ \"./src/WrapperFunctions/GetLinkListObservable.ts\");\n/* harmony import */ var _DataStructures_SyncData__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./DataStructures/SyncData */ \"./src/DataStructures/SyncData.ts\");\n/* harmony import */ var _DataStructures_Concept__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./DataStructures/Concept */ \"./src/DataStructures/Concept.ts\");\n/* harmony import */ var _DataStructures_Local_LConcept__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./DataStructures/Local/LConcept */ \"./src/DataStructures/Local/LConcept.ts\");\n/* harmony import */ var _DataStructures_Local_LConnection__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./DataStructures/Local/LConnection */ \"./src/DataStructures/Local/LConnection.ts\");\n/* harmony import */ var _DataStructures_Connection__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./DataStructures/Connection */ \"./src/DataStructures/Connection.ts\");\n/* harmony import */ var _DataStructures_ConceptData__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./DataStructures/ConceptData */ \"./src/DataStructures/ConceptData.ts\");\n/* harmony import */ var _DataStructures_ConnectionData__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./DataStructures/ConnectionData */ \"./src/DataStructures/ConnectionData.ts\");\n/* harmony import */ var _DataStructures_BinaryTree__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./DataStructures/BinaryTree */ \"./src/DataStructures/BinaryTree.ts\");\n/* harmony import */ var _DataStructures_SearchQuery__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./DataStructures/SearchQuery */ \"./src/DataStructures/SearchQuery.ts\");\n/* harmony import */ var _DataStructures_PatcherStructure__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./DataStructures/PatcherStructure */ \"./src/DataStructures/PatcherStructure.ts\");\n/* harmony import */ var _DataStructures_Session_SessionData__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./DataStructures/Session/SessionData */ \"./src/DataStructures/Session/SessionData.ts\");\n/* harmony import */ var _DataStructures_Composition_Composition__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./DataStructures/Composition/Composition */ \"./src/DataStructures/Composition/Composition.ts\");\n/* harmony import */ var _DataStructures_Composition_CompositionBinaryTree__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./DataStructures/Composition/CompositionBinaryTree */ \"./src/DataStructures/Composition/CompositionBinaryTree.ts\");\n/* harmony import */ var _DataStructures_Composition_CompositionNode__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./DataStructures/Composition/CompositionNode */ \"./src/DataStructures/Composition/CompositionNode.ts\");\n/* harmony import */ var _DataStructures_Local_LocalSyncData__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./DataStructures/Local/LocalSyncData */ \"./src/DataStructures/Local/LocalSyncData.ts\");\n/* harmony import */ var _DataStructures_User_UserBinaryTree__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./DataStructures/User/UserBinaryTree */ \"./src/DataStructures/User/UserBinaryTree.ts\");\n/* harmony import */ var _DataStructures_FilterSearch__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./DataStructures/FilterSearch */ \"./src/DataStructures/FilterSearch.ts\");\n/* harmony import */ var _DataStructures_Search_SearchStructure__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./DataStructures/Search/SearchStructure */ \"./src/DataStructures/Search/SearchStructure.ts\");\n/* harmony import */ var _DataStructures_Local_LocalConceptData__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./DataStructures/Local/LocalConceptData */ \"./src/DataStructures/Local/LocalConceptData.ts\");\n/* harmony import */ var _Services_GetDataFromIndexDb__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./Services/GetDataFromIndexDb */ \"./src/Services/GetDataFromIndexDb.ts\");\n/* harmony import */ var _Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./Services/Local/CreateLocalBinaryTreeFromData */ \"./src/Services/Local/CreateLocalBinaryTreeFromData.ts\");\n/* harmony import */ var _Services_InitializeSystem__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./Services/InitializeSystem */ \"./src/Services/InitializeSystem.ts\");\n/* harmony import */ var _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./DataStructures/BaseUrl */ \"./src/DataStructures/BaseUrl.ts\");\n/* harmony import */ var _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./DataStructures/Security/TokenStorage */ \"./src/DataStructures/Security/TokenStorage.ts\");\n/* harmony import */ var _Constants_general_const__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./Constants/general.const */ \"./src/Constants/general.const.ts\");\n/* harmony import */ var _Middleware_logger_service__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./Middleware/logger.service */ \"./src/Middleware/logger.service.ts\");\n/* harmony import */ var _Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./Services/Common/ErrorPosting */ \"./src/Services/Common/ErrorPosting.ts\");\n/* harmony import */ var _Middleware_ApplicationMonitor__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./Middleware/ApplicationMonitor */ \"./src/Middleware/ApplicationMonitor.ts\");\n/* harmony import */ var _DataStructures_Responses_ErrorResponse__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./DataStructures/Responses/ErrorResponse */ \"./src/DataStructures/Responses/ErrorResponse.ts\");\n/* harmony import */ var _app__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./app */ \"./src/app.ts\");\n/* harmony import */ var _Widgets_BuilderStatefulWidget__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./Widgets/BuilderStatefulWidget */ \"./src/Widgets/BuilderStatefulWidget.ts\");\n/* harmony import */ var _Services_Transaction_LocalTransaction__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./Services/Transaction/LocalTransaction */ \"./src/Services/Transaction/LocalTransaction.ts\");\n/* harmony import */ var _Anomaly_anomaly__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ./Anomaly/anomaly */ \"./src/Anomaly/anomaly.ts\");\n/* harmony import */ var _Validator_validator__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(/*! ./Validator/validator */ \"./src/Validator/validator.ts\");\n/* harmony import */ var _Validator_utils__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ./Validator/utils */ \"./src/Validator/utils.ts\");\n/* harmony import */ var _Widgets_StatefulWidget__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ./Widgets/StatefulWidget */ \"./src/Widgets/StatefulWidget.ts\");\n/* harmony import */ var _Services_DeleteConnectionByType__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ./Services/DeleteConnectionByType */ \"./src/Services/DeleteConnectionByType.ts\");\n/* harmony import */ var _DataStructures_Search_FreeschemaQuery__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ./DataStructures/Search/FreeschemaQuery */ \"./src/DataStructures/Search/FreeschemaQuery.ts\");\n/* harmony import */ var _Api_Search_FreeschemaQueryApi__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./Api/Search/FreeschemaQueryApi */ \"./src/Api/Search/FreeschemaQueryApi.ts\");\n/* harmony import */ var _WrapperFunctions_SchemaQueryObservable__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ./WrapperFunctions/SchemaQueryObservable */ \"./src/WrapperFunctions/SchemaQueryObservable.ts\");\n/* harmony import */ var _Widgets_WidgetTree__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ./Widgets/WidgetTree */ \"./src/Widgets/WidgetTree.ts\");\n/* harmony import */ var _AccessTracker_accessTracker__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./AccessTracker/accessTracker */ \"./src/AccessTracker/accessTracker.ts\");\n/* harmony import */ var _Services_CreateConnection_CreateConnectionEntity__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./Services/CreateConnection/CreateConnectionEntity */ \"./src/Services/CreateConnection/CreateConnectionEntity.ts\");\n/* harmony import */ var _Widgets_RenderWidgetService__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ./Widgets/RenderWidgetService */ \"./src/Widgets/RenderWidgetService.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar serviceWorker;\nconst TABID = Date.now().toString(36) + Math.random().toString(36).substring(2);\nlet subscribedListeners = [];\nlet serviceWorkerReady = false;\nlet messageQueue = [];\n// for sw use only START\nlet hasActivatedSW = false;\nfunction setHasActivatedSW(value) { hasActivatedSW = value; }\n// for sw use only END\n/**\n * This function lets you update the access token that the package uses. If this is not passed you cannot create, update, view or delete\n * Your concepts using this package.\n * @param accessToken access token got from the sign in process\n */\nfunction updateAccessToken(accessToken = \"\") {\n _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__.TokenStorage.BearerAccessToken = accessToken;\n if (serviceWorker)\n sendMessage('updateAccessToken', { accessToken });\n}\n/**\n *\n * @param url This is the url for the backend c# system or our main data fabric server\n * @param aiurl This is the AI url that pulls in the data using our AI system . If you do not enter this then also disable the enableAi flag.\n * @param accessToken This is the JWT token that needs to be passed (But since you have just initilized the system). There is no way we can get access token\n * So this access token can be empty string. You can set it afterwards with another function UpdateAccessToken();\n * @param nodeUrl This is the url for the node server. This is another server in the data fabric that is used as server for business logic and security features.\n * @param enableAi This flag is used to enable or disable the AI feature that preloads data in the indexdb.\n * @param applicationName This is an unique name that is given to a program. Use this to discern one indexdb from another.\n * @param enableSW {activate: boolean, scope?: string, pathToSW?: string, manual?: boolean} | undefined - This is for enabling service worker with its scope\n */\nfunction init() {\n return __awaiter(this, arguments, void 0, function* (url = \"\", aiurl = \"\", accessToken = \"\", nodeUrl = \"\", enableAi = true, applicationName = \"\", enableSW = undefined, flags = {}) {\n try {\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_URL = url;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.AI_URL = aiurl;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.NODE_URL = nodeUrl;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_APPLICATION = applicationName;\n _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__.TokenStorage.BearerAccessToken = accessToken;\n let randomizer = Math.floor(Math.random() * 100000000);\n // BaseUrl.BASE_RANDOMIZER = randomizer;\n // BaseUrl.BASE_RANDOMIZER = 999;\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.setRandomizer(randomizer);\n // Change Default Flags\n const defaultFlags = {\n logApplication: false,\n logPackage: false,\n accessTracker: false,\n isTest: false\n };\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS = defaultFlags;\n // Merge Provided Flags with Defaults\n _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS = Object.assign(Object.assign({}, defaultFlags), flags);\n initializeFlags(_DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS);\n // console.log(\"BaseUrl.FLAGS before sending to service worker : \", BaseUrl.FLAGS)\n if (!(\"serviceWorker\" in navigator)) {\n yield initConceptConnection();\n console.warn(\"Service Worker not supported in this browser.\");\n return;\n }\n listenPostMessagaes();\n listenBroadCastMessages();\n if (enableSW && enableSW.activate && enableSW.manual) {\n yield new Promise((resolve, reject) => {\n navigator.serviceWorker.ready\n .then((registration) => __awaiter(this, void 0, void 0, function* () {\n console.log('registraions ready', registration);\n serviceWorker = registration.active;\n yield initServiceWorker();\n resolve('done');\n }))\n .catch(err => {\n console.error(\"Error: Ready service worker\", err);\n reject(err);\n })\n .finally(() => console.log('Finally service worker ready done'));\n setTimeout(() => reject('Timeout ready'), 30000);\n });\n }\n else if (enableSW &&\n (enableSW === null || enableSW === void 0 ? void 0 : enableSW.activate)) {\n try {\n console.log(\"service worker initialiing\");\n yield handleRegisterServiceWorker(enableSW);\n }\n catch (error) {\n yield initConceptConnection();\n console.error(\"Unable to start service worker\", error);\n }\n }\n else {\n yield initConceptConnection();\n console.warn('Service Worker not activated');\n }\n return true;\n }\n catch (error) {\n yield initConceptConnection();\n console.warn(\"Cannot initialize the system\", error);\n }\n });\n}\n/**\n * Method to send message to the service worker from main thread\n * @param type string\n * @param payload any\n * @returns Promise<any>\n */\nfunction sendMessage(type_1, payload_1) {\n return __awaiter(this, arguments, void 0, function* (type, payload, retryCount = 0) {\n let messagedProcessed = false;\n const messageId = Math.random().toString(36).substring(2); // Generate a unique message ID\n payload.messageId = messageId;\n payload.TABID = TABID;\n // let actions = payload.actions\n const newPayload = JSON.parse(JSON.stringify(payload));\n let checkProcessInterval;\n if (type != 'checkProcess') {\n checkProcessInterval = setInterval(() => __awaiter(this, void 0, void 0, function* () {\n console.log('process took more than one second', messageId, type, messagedProcessed);\n // if (!await checkIfExecutingProcess(messageId, type) && !messagedProcessed) {\n // console.log(\"Message process missing\")\n // throw Error('Failed to handle type ' + type + ' ' + messageId)\n // }\n if (!messagedProcessed && !(yield checkIfExecutingProcess(messageId, type))) {\n clearInterval(checkProcessInterval);\n if (!messagedProcessed) {\n console.log('Failed to handle type ' + type + ' message not found ' + messageId);\n if (retryCount == 0 && type != 'checkProcess') {\n console.log('retrying ', type, messageId);\n const res = yield sendMessage(type, payload, retryCount + 1);\n return res;\n }\n else {\n // throw Error('Failed to handle type ' + type + ' ' + messageId)\n console.log('Failed to handle type ' + type + ' ' + messageId);\n }\n }\n console.log(\"Message process missing \", type, messageId, messageQueue);\n // throw Error('Failed to handle type ' + type + ' ' + messageId)\n }\n }), 2000);\n }\n return new Promise((resolve, reject) => {\n if (!((navigator.serviceWorker.controller || serviceWorker) && (serviceWorkerReady || type == 'init')))\n console.log('will go to queue', navigator.serviceWorker.controller, serviceWorker, serviceWorkerReady, type == 'init');\n if ((navigator.serviceWorker.controller || serviceWorker) && (serviceWorkerReady || type == 'init')) {\n const responseHandler = (event) => {\n var _a, _b, _c, _d, _e, _f;\n if (((_a = event === null || event === void 0 ? void 0 : event.data) === null || _a === void 0 ? void 0 : _a.messageId) == messageId) { // Check if the message ID matches\n messagedProcessed = true;\n if (type != 'checkProcess')\n console.log('received from sw', type, messageId);\n clearInterval(checkProcessInterval);\n if (!event.data.success) {\n if (((_b = event === null || event === void 0 ? void 0 : event.data) === null || _b === void 0 ? void 0 : _b.status) == 401) {\n reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_103__.HandleHttpError)(new Response('Unauthorized', { status: 401, statusText: (_c = event === null || event === void 0 ? void 0 : event.data) === null || _c === void 0 ? void 0 : _c.statusText })));\n }\n else if (((_d = event === null || event === void 0 ? void 0 : event.data) === null || _d === void 0 ? void 0 : _d.status) == 500) {\n reject((0,_Services_Common_ErrorPosting__WEBPACK_IMPORTED_MODULE_103__.HandleInternalError)(new Response('Internal Server Error', { status: 500, statusText: (_e = event === null || event === void 0 ? void 0 : event.data) === null || _e === void 0 ? void 0 : _e.statusText })));\n }\n else {\n console.error('Error in the response from worker:', event);\n reject(`Failed to handle action ${type} ${JSON.stringify(payload)}, Response: ${JSON.stringify(event.data)}`);\n }\n }\n if ((_f = event.data) === null || _f === void 0 ? void 0 : _f.actions) {\n payload.actions = JSON.parse(JSON.stringify(event.data.actions));\n }\n resolve(event.data);\n navigator.serviceWorker.removeEventListener(\"message\", responseHandler);\n }\n };\n navigator.serviceWorker.addEventListener(\"message\", responseHandler);\n // Send the message to the service worker\n if (navigator.serviceWorker.controller) {\n if (type != 'checkProcess')\n console.log('sent to sw', type, messageId);\n navigator.serviceWorker.controller.postMessage({ type, payload: newPayload });\n }\n else if (serviceWorker) {\n console.log('sent to sw', type, messageId);\n console.warn(`controller not found but serviceWorker is available. messageId: ${messageId}, type: ${type}`);\n if (serviceWorkerReady)\n console.warn('service worker was registered already but navigator is empty!!!', serviceWorker);\n try {\n serviceWorker.postMessage({ type, payload: newPayload });\n }\n catch (err) {\n console.log('Retrying again on catch service worker', err);\n serviceWorker.postMessage({ type, payload: newPayload });\n }\n }\n else {\n console.warn(`Service Worker hasn't loaded yet. messageId: ${messageId}, type: ${type}`);\n if (serviceWorkerReady)\n console.warn('service worker was registered already but is not available NOW!!!');\n console.info('ready', navigator.serviceWorker.ready);\n // wait one second before checking again\n setTimeout(() => {\n console.warn(`Re-Trying after certain time. messageId: ${messageId}, type: ${type}`);\n if (serviceWorker) {\n console.info('This is triggered ');\n serviceWorker === null || serviceWorker === void 0 ? void 0 : serviceWorker.postMessage({ type, payload });\n }\n else {\n console.log('not ready', type);\n clearInterval(checkProcessInterval);\n reject(\"Service worker not ready\");\n }\n }, 30000); // 30 seconds\n }\n // Timeout for waiting for the response (e.g., 5 seconds)\n setTimeout(() => {\n clearInterval(checkProcessInterval);\n reject(`No response from service worker after timeout: ${type}`);\n navigator.serviceWorker.removeEventListener(\"message\", responseHandler);\n }, 210000); // 3.5 minutes\n }\n else {\n messageQueue.push({ message: { type, payload: newPayload } });\n console.log('Message Queued', type, payload);\n console.log((navigator.serviceWorker.controller || serviceWorker), (serviceWorkerReady || type == 'init'));\n if (type == 'init') {\n clearInterval(checkProcessInterval);\n resolve(null);\n }\n }\n });\n });\n}\n// export function sendMessage(type: string, payload: any) {\n// return new Promise((resolve) => {\n// const responseHandler = (event: any) => {\n// resolve(event.data);\n// navigator.serviceWorker.removeEventListener(\"message\", responseHandler);\n// };\n// navigator.serviceWorker.addEventListener(\"message\", responseHandler);\n// navigator.serviceWorker.controller?.postMessage({ type, payload });\n// });\n// }\n// actions for message received on broadcast channel (specially from service worker)\nconst broadcastActions = {\n GetLinkListener: (payload) => __awaiter(void 0, void 0, void 0, function* () {\n const listener = subscribedListeners.find(listener => listener.listenerId == payload.listenerId);\n listener === null || listener === void 0 ? void 0 : listener.callback(payload.data);\n return { success: true };\n }),\n dispatchEvent: (payload) => __awaiter(void 0, void 0, void 0, function* () {\n if (serviceWorker) {\n let event = new Event(payload.id || '');\n dispatchEvent(event);\n }\n // self.clients.matchAll({ includeUncontrolled: true }).then(clients => {\n // clients.forEach(client => {\n // client.postMessage({ id, updatedData });\n // });\n // });\n return { success: true };\n }),\n checkInit: (payload) => __awaiter(void 0, void 0, void 0, function* () {\n console.log('service worker init 0');\n if (navigator.serviceWorker.controller) {\n console.log('service worker init 1');\n serviceWorker = navigator.serviceWorker.controller;\n }\n yield initServiceWorker();\n return { success: true };\n })\n};\n/**\n * Method to trigger broadcast message listener\n */\nfunction listenBroadCastMessages() {\n // broadcast event can be listened through both the service worker and other tabs\n _Constants_general_const__WEBPACK_IMPORTED_MODULE_101__.broadcastChannel.addEventListener('message', (event) => __awaiter(this, void 0, void 0, function* () {\n const { type, payload } = event.data;\n if (!type)\n return;\n let responseData = { success: false, data: undefined };\n if (broadcastActions[type]) {\n responseData = yield broadcastActions[type](payload);\n }\n else {\n console.warn(`Unable to handle \"${type}\" case in BC service worker`);\n }\n }));\n}\n/**\n * Method to trigger broadcast message listener\n */\nfunction listenPostMessagaes() {\n // broadcast event can be listened through both the service worker and other tabs\n navigator.serviceWorker.addEventListener('message', (event) => __awaiter(this, void 0, void 0, function* () {\n var _a, _b, _c, _d;\n try {\n if (event.data && event.data.type === 'API_401') {\n const { requestDetails } = event.data;\n // Re-create the POST request with the same headers and body\n const requestOptions = {\n method: requestDetails.method,\n headers: new Headers(requestDetails.headers),\n body: requestDetails.body // Pass the original body\n };\n // Re-hit the API with the same details\n const apiResponse = yield fetch(requestDetails.url, requestOptions);\n const responseBody = yield (apiResponse === null || apiResponse === void 0 ? void 0 : apiResponse.json()); // Get the response text\n // Send the response back to the Service Worker (same client)\n (_b = (_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) === null || _b === void 0 ? void 0 : _b.postMessage({\n type: 'API_RESPONSE',\n messageId: event.data.messageId,\n response: new Response(responseBody, {\n status: apiResponse.status,\n statusText: apiResponse.statusText,\n headers: apiResponse.headers\n })\n });\n }\n }\n catch (error) {\n console.error(\"Error during listenPostMessage\", error);\n (_d = (_c = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _c === void 0 ? void 0 : _c.controller) === null || _d === void 0 ? void 0 : _d.postMessage({\n type: 'API_RESPONSE',\n messageId: event.data.messageId\n });\n }\n }));\n}\n/**\n * Method to initialize the initial data\n * @param url string\n * @param aiurl string\n * @param accessToken string\n * @param nodeUrl string\n * @param enableAi boolean\n * @param applicationName string\n * @param isTest boolean\n * @returns Promise<any>\n */\nfunction initConceptConnection() {\n return __awaiter(this, void 0, void 0, function* () {\n /**\n * We initialize the system so that we get all the concepts from the backend system that are most likely to be used\n * We use some sort of AI algorithm to initilize these concepts with the most used concept.\n * @param enableAi enableAi is a flag that the user can choose to set if they want to use this enable AI feature\n * If the developer does not want to use this feature then they can just set enableAi to false.\n */\n yield (0,_Services_InitializeSystem__WEBPACK_IMPORTED_MODULE_98__[\"default\"])();\n const start = new Date().getTime();\n /**\n * This will create a binary tree in the memory from the indexdb.\n * This process will set Flags to denote that the binary tree is loaded, the character binary tree is loaded\n * and that the type binary tree has been loaded.\n * These trees are helpful in caching concepts and connections for the data fabric.\n */\n yield (0,_Services_CreateBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_0__[\"default\"])()\n .then(() => {\n // IdentifierFlags.isDataLoaded= true;\n // IdentifierFlags.isCharacterLoaded= true;\n // IdentifierFlags.isTypeLoaded= true;\n let elapsed = new Date().getTime() - start;\n console.log(\"The time taken to prepare concept data is \", elapsed);\n })\n .catch((event) => {\n // console.log(\"This is the error in creating binary tree\", IdentifierFlags.isDataLoaded, IdentifierFlags.isCharacterLoaded, IdentifierFlags.isTypeLoaded);\n throw event;\n });\n /**\n * This will create a binary tree of local concepts that is saved from the indexdb.\n * This process after finishing creating a binary tree of local concepts then set flag to denote that\n * LocalBinaryTree has been created from the concepts in indexdb\n * Local Binary Type tree has been loaded to the index db (flag is set to denote that)\n * Character Binary Tree has been loaded from indexdb to memory (flag is set to denote that)\n */\n yield (0,_Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_97__[\"default\"])()\n .then(() => {\n // IdentifierFlags.isLocalDataLoaded = true;\n // IdentifierFlags.isLocalTypeLoaded = true;\n // IdentifierFlags.isLocalCharacterLoaded = true;\n let elapsed = new Date().getTime() - start;\n console.log(\"The time taken to prepare local concept \", elapsed);\n })\n .catch((event) => {\n throw event;\n });\n /**\n * This process gets the local connections from indexdb and loads it to the local connections array which is inside of\n * a static class called LocalConnectionData.\n * This function will also set and IdentifierFlag that tells the whole program that this process has finished.\n */\n yield (0,_Services_GetDataFromIndexDb__WEBPACK_IMPORTED_MODULE_96__.GetConnectionsFromIndexDbLocal)()\n .then(() => {\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalConnectionLoaded = true;\n })\n .catch((event) => {\n //console.log(\"This is the error in creating local connections binary tree\");\n throw event;\n });\n /**\n * We have designed our system to use local concepts and connections with its own local ids(negative ids) that\n * is only valid for the browser that creates this. We have a translator in our node server.\n * This function does this process in initlization.\n */\n yield (0,_Services_Local_CreateLocalBinaryTreeFromData__WEBPACK_IMPORTED_MODULE_97__.PopulateTheLocalConnectionToMemory)().catch((event) => {\n console.log(\"This is the error in populating binary tree\");\n throw event;\n });\n // await PopulateTheLocalConceptsToMemory().catch((event)=>{\n // console.log(\"This is the error in populating binary tree\");\n // });\n /**\n * This process gets the connections from indexdb and loads it to the connections array which is inside of\n * a static class called ConnectionData.\n * This function will also set and IdentifierFlag that tells the whole program that this process has finished.\n */\n yield (0,_Services_GetDataFromIndexDb__WEBPACK_IMPORTED_MODULE_96__.GetConnectionsFromIndexDb)()\n .then(() => {\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionTypeLoaded = true;\n let elapsed = new Date().getTime() - start;\n console.log(\"The time taken to prepare connections \", elapsed);\n })\n .catch((event) => {\n //console.log(\"This is the error in creating connections tree\");\n throw event;\n });\n });\n}\n/**\n * Method to dispatch Event received from SW\n * @param id number|string\n * @param data any\n */\nfunction dispatchIdEvent(id, data = {}) {\n // console.log('id event dispatched', id)\n if (serviceWorker || typeof window != undefined) {\n // let event = new Event(`${id}`);\n let event = new CustomEvent(`${id}`, data);\n dispatchEvent(event);\n }\n else {\n _Constants_general_const__WEBPACK_IMPORTED_MODULE_101__.broadcastChannel.postMessage({ type: 'dispatchEvent', payload: { id } });\n }\n}\nfunction processMessageQueue() {\n return __awaiter(this, void 0, void 0, function* () {\n while (messageQueue.length > 0) {\n const { message, resolve, reject } = messageQueue.shift();\n console.log('Queue poped', message.type);\n yield sendMessage(message.type, message.payload);\n }\n });\n}\n/**\n * Method to handle global exception occured in service worker\n * @param error any\n */\nconst handleServiceWorkerException = (error) => {\n // if (error instanceof FreeSchemaResponse && error.getStatus() != 401) {\n if (error instanceof _DataStructures_Responses_ErrorResponse__WEBPACK_IMPORTED_MODULE_105__.FreeSchemaResponse) {\n console.error('FreeSchemaResponse Error', error);\n throw error;\n }\n // if (error instanceof FreeSchemaResponse && error.getStatus() == 401) console.error('401 triggered in sw defaulting')\n console.error('Service Worker Error', error);\n};\n/**\n * Function to setup initial flag\n */\nfunction initializeFlags(flags) {\n try {\n if (flags.logApplication) {\n _Middleware_ApplicationMonitor__WEBPACK_IMPORTED_MODULE_104__.ApplicationMonitor.initialize();\n _app__WEBPACK_IMPORTED_MODULE_106__.Logger.logApplicationActivationStatus = true;\n console.warn(\"Application log started.\");\n }\n if (flags.logPackage) {\n _app__WEBPACK_IMPORTED_MODULE_106__.Logger.logPackageActivationStatus = true;\n console.warn(\"Package log started.\");\n }\n if (flags.accessTracker) {\n _app__WEBPACK_IMPORTED_MODULE_106__.AccessTracker.activateStatus = true;\n console.warn(\"Access Tracker Activated.\");\n }\n if (flags.isTest) {\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isDataLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isCharacterLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isTypeLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalDataLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalTypeLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalCharacterLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isConnectionTypeLoaded = true;\n _DataStructures_IdentifierFlags__WEBPACK_IMPORTED_MODULE_1__.IdentifierFlags.isLocalConnectionLoaded = true;\n // return true;\n }\n return flags;\n }\n catch (error) {\n console.error(\"Failed to initialize flags:\", error);\n throw error;\n }\n}\n/**\n * Method to handle Registering service worker\n * @param enableSW any\n */\nfunction handleRegisterServiceWorker(enableSW) {\n return __awaiter(this, void 0, void 0, function* () {\n yield new Promise((resolve, reject) => {\n var _a, _b;\n let success = false;\n navigator.serviceWorker\n .register((_a = enableSW.pathToSW) !== null && _a !== void 0 ? _a : \"./serviceWorker.bundle.js\", {\n // type: \"module\",\n scope: (_b = enableSW.scope) !== null && _b !== void 0 ? _b : \"/\",\n })\n .then((registration) => __awaiter(this, void 0, void 0, function* () {\n console.log(\"Service Worker registered:\", registration);\n // process queue if exist\n setInterval(() => processMessageQueue(), 5000);\n // Add Listeners before initializing the service worker\n // Listen for updates to the service worker\n console.log(\"update listen start\");\n registration.onupdatefound = () => {\n const newWorker = registration.installing;\n console.log(\"new worker\", newWorker);\n if (newWorker) {\n newWorker.onstatechange = () => __awaiter(this, void 0, void 0, function* () {\n console.warn(\"on state change triggered\", newWorker.state, navigator.serviceWorker.controller);\n if (newWorker.state === \"installing\") {\n console.log(\"Service Worker installing\");\n serviceWorker = undefined;\n serviceWorkerReady = false;\n }\n // if (newWorker.state === 'activated' && navigator.serviceWorker.controller) {\n if ((newWorker.state === \"activated\" || newWorker.state === 'redundant') && navigator.serviceWorker.controller) {\n // && navigator.serviceWorker.controller) {\n console.log(\"New Service Worker is active\", registration);\n serviceWorker = newWorker;\n // serviceWorker = registration.active;\n // Send init message now that it's active\n setTimeout(() => {\n console.log('Message Processed after some time');\n processMessageQueue();\n }, 5000);\n yield initServiceWorker();\n success = true;\n serviceWorkerReady = true;\n processMessageQueue();\n resolve();\n }\n });\n }\n };\n // Listen for the activation of the new service worker\n registration.addEventListener('controllerchange', () => __awaiter(this, void 0, void 0, function* () {\n console.warn('controller change triggered', navigator.serviceWorker.controller);\n if (navigator.serviceWorker.controller) {\n serviceWorker = navigator.serviceWorker.controller;\n console.warn('Service worker has been activated; controller change');\n yield initServiceWorker();\n // The new service worker is now controlling the page\n // You can reload the page if necessary or handle the update process here\n }\n }));\n // state change \n if (registration.installing || registration.waiting || registration.active) {\n registration.addEventListener('statechange', (event) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.state) === 'activating') {\n serviceWorker = navigator.serviceWorker.controller;\n console.warn('Service Worker is activating statechange');\n yield initServiceWorker();\n }\n }));\n }\n // If the service worker is already active, mark it as ready\n if (registration.active) {\n serviceWorkerReady = true;\n console.log(\"active sw\");\n serviceWorker = registration.active;\n yield initServiceWorker();\n processMessageQueue();\n resolve();\n }\n else {\n // Handle if on state change didn't trigger\n setTimeout(() => {\n if (!success)\n reject(\"Not Completed Initialization\");\n }, 10000);\n }\n }))\n .catch((error) => __awaiter(this, void 0, void 0, function* () {\n yield initConceptConnection();\n reject(error);\n console.error(\"Service Worker registration failed:\", error);\n }));\n });\n });\n}\n/**\n * Method to initialize Serivce Worker\n */\nfunction initServiceWorker() {\n return __awaiter(this, void 0, void 0, function* () {\n yield sendMessage(\"init\", {\n url: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_URL,\n aiurl: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.AI_URL,\n accessToken: _DataStructures_Security_TokenStorage__WEBPACK_IMPORTED_MODULE_100__.TokenStorage.BearerAccessToken,\n nodeUrl: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.NODE_URL,\n enableAi: false,\n applicationName: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.BASE_APPLICATION,\n flags: _DataStructures_BaseUrl__WEBPACK_IMPORTED_MODULE_99__.BaseUrl.FLAGS\n });\n });\n}\nfunction checkIfExecutingProcess(messageId, type) {\n return __awaiter(this, void 0, void 0, function* () {\n var _a;\n try {\n const res = yield sendMessage(\"checkProcess\", { checkMessageId: messageId });\n console.log('check interval data res for type ', type, messageId, res.data);\n if ((_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.processing)\n return true;\n else\n false;\n }\n catch (error) {\n console.error('error on checing executing process', type, messageId, error);\n return false;\n }\n });\n}\n\n\n//# sourceURL=webpack://mftsccs-browser/./src/app.ts?");
|
|
2018
2018
|
|
|
2019
2019
|
/***/ })
|
|
2020
2020
|
|