@epam/uui-db 4.9.2 → 4.10.0-rc.1
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/index.d.ts +1 -1
- package/index.js +1025 -1775
- package/index.js.map +1 -1
- package/package.json +6 -8
- package/readme.md +17 -17
- package/src/Db.d.ts +12 -12
- package/src/Db.d.ts.map +1 -1
- package/src/DbRef.d.ts +46 -46
- package/src/DbTable.d.ts +34 -34
- package/src/IxSet.d.ts +27 -27
- package/src/IxSet.d.ts.map +1 -1
- package/src/ListLoadingTracker.d.ts +18 -18
- package/src/Loader.d.ts +23 -23
- package/src/Scheduler.d.ts +18 -18
- package/src/SimpleLoadingTracker.d.ts +8 -8
- package/src/__benchmarks__/filter.d.ts +1 -1
- package/src/__benchmarks__/index.d.ts +2 -2
- package/src/__benchmarks__/pkLookup.d.ts +1 -1
- package/src/__benchmarks__/pkUpdate.d.ts +1 -1
- package/src/__benchmarks__/query.d.ts +1 -1
- package/src/__benchmarks__/sorting.d.ts +1 -1
- package/src/__benchmarks__/testData.d.ts +14 -14
- package/src/index.d.ts +8 -8
- package/src/patchHelpers.d.ts +17 -17
- package/src/reactHooks.d.ts +6 -6
- package/src/tempIds.d.ts +27 -27
- package/src/types.d.ts +117 -117
- package/src/types.d.ts.map +1 -1
- package/src/utils.d.ts +9 -9
- package/stats.html +4044 -0
- package/bundle-stats.json +0 -1
package/bundle-stats.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"errors":[],"warnings":[],"version":"4.44.2","hash":"ecc0504ca3c09c6a30f3","time":23972,"builtAt":1670973928166,"publicPath":"/","outputPath":"D:\\dev\\UUI-main\\uui-db\\build","assetsByChunkName":{"main":["index.js","index.js.map"]},"assets":[{"name":"index.d.ts","size":59,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"index.d.ts.map","size":120,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"index.js","size":75308,"chunks":["main"],"chunkNames":["main"],"info":{},"emitted":true},{"name":"index.js.map","size":119866,"chunks":["main"],"chunkNames":["main"],"info":{"development":true},"emitted":true},{"name":"src\\Db.d.ts","size":616,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\Db.d.ts.map","size":697,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\DbRef.d.ts","size":2329,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\DbRef.d.ts.map","size":2180,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\DbTable.d.ts","size":1583,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\DbTable.d.ts.map","size":1792,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\IxSet.d.ts","size":1080,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\IxSet.d.ts.map","size":1178,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\ListLoadingTracker.d.ts","size":873,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\ListLoadingTracker.d.ts.map","size":808,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\Loader.d.ts","size":1121,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\Loader.d.ts.map","size":1171,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\Scheduler.d.ts","size":563,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\Scheduler.d.ts.map","size":640,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\SimpleLoadingTracker.d.ts","size":361,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\SimpleLoadingTracker.d.ts.map","size":391,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\filter.d.ts","size":48,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\filter.d.ts.map","size":127,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\index.d.ts","size":76,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\index.d.ts.map","size":165,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\pkLookup.d.ts","size":50,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\pkLookup.d.ts.map","size":131,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\pkUpdate.d.ts","size":50,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\pkUpdate.d.ts.map","size":131,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\query.d.ts","size":47,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\query.d.ts.map","size":125,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\sorting.d.ts","size":49,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\sorting.d.ts.map","size":129,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\testData.d.ts","size":421,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\__benchmarks__\\testData.d.ts.map","size":405,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\index.d.ts","size":256,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\index.d.ts.map","size":275,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\patchHelpers.d.ts","size":2086,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\patchHelpers.d.ts.map","size":2047,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\reactHooks.d.ts","size":533,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\reactHooks.d.ts.map","size":577,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\tempIds.d.ts","size":1587,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\tempIds.d.ts.map","size":1502,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\types.d.ts","size":5212,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\types.d.ts.map","size":5384,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\utils.d.ts","size":471,"chunks":[],"chunkNames":[],"info":{},"emitted":true},{"name":"src\\utils.d.ts.map","size":360,"chunks":[],"chunkNames":[],"info":{},"emitted":true}],"filteredAssets":0,"entrypoints":{"main":{"chunks":["main"],"assets":["index.js","index.js.map"],"children":{},"childAssets":{}}},"namedChunkGroups":{"main":{"chunks":["main"],"assets":["index.js","index.js.map"],"children":{},"childAssets":{}}},"chunks":[{"id":"main","rendered":true,"initial":true,"entry":true,"size":59871,"names":["main"],"files":["index.js","index.js.map"],"hash":"9640bbb934ca0e360252","siblings":[],"parents":[],"children":[],"childrenByOrder":{},"modules":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx","index":0,"index2":29,"size":28,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":null,"issuerId":null,"issuerName":null,"issuerPath":null,"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":null,"module":null,"moduleName":null,"type":"multi entry"}],"providedExports":null,"optimizationBailout":[],"depth":0},{"id":"../node_modules/tslib/tslib.es6.js","identifier":"D:\\dev\\UUI-main\\node_modules\\tslib\\tslib.es6.js","name":"../node_modules/tslib/tslib.es6.js","index":2,"index2":0,"size":12280,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","issuerId":"./index.tsx","issuerName":"./index.tsx","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./index.tsx","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","module":"./index.tsx","moduleName":"./index.tsx","type":"cjs require","userRequest":"tslib","loc":"3:16-32"},{"moduleId":"./src/Db.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"tslib","loc":"4:16-32"},{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"tslib","loc":"4:16-32"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"tslib","loc":"4:16-32"},{"moduleId":"./src/ListLoadingTracker.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\ListLoadingTracker.ts","module":"./src/ListLoadingTracker.ts","moduleName":"./src/ListLoadingTracker.ts","type":"cjs require","userRequest":"tslib","loc":"4:16-32"},{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"tslib","loc":"3:16-32"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"tslib","loc":"4:16-32"},{"moduleId":"./src/utils.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"tslib","loc":"4:16-32"}],"providedExports":["__extends","__assign","__rest","__decorate","__param","__metadata","__awaiter","__generator","__createBinding","__exportStar","__values","__read","__spread","__spreadArrays","__spreadArray","__await","__asyncGenerator","__asyncDelegator","__asyncValues","__makeTemplateObject","__importStar","__importDefault","__classPrivateFieldGet","__classPrivateFieldSet","__classPrivateFieldIn"],"optimizationBailout":[],"depth":2,"source":"/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx","index":1,"index2":28,"size":169,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","issuerId":0,"issuerName":"multi ./index.tsx","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":0,"moduleIdentifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","module":"multi ./index.tsx","moduleName":"multi ./index.tsx","type":"single entry","userRequest":"D:\\dev\\UUI-main\\uui-db\\index.tsx","loc":"main[0]"}],"providedExports":null,"optimizationBailout":[],"depth":1,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst tslib_1 = require(\"tslib\");\r\n(0, tslib_1.__exportStar)(require(\"./src\"), exports);\r\n"},{"id":"./src/Db.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Db.ts","name":"./src/Db.ts","index":5,"index2":7,"size":2813,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./Db","loc":"5:26-41"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Db = void 0;\r\nconst tslib_1 = require(\"tslib\");\r\nconst utils_1 = require(\"./utils\");\r\nconst lodash_isequal_1 = (0, tslib_1.__importDefault)(require(\"lodash.isequal\"));\r\nclass Db {\r\n constructor(tables, reusedCache) {\r\n this.tables = tables;\r\n this.viewCache = new Map();\r\n /* Views (cached db projections) */\r\n this.valueAbsent = Symbol(\"ValueAbsent\");\r\n if (reusedCache) {\r\n this.viewCache = new Map(reusedCache);\r\n }\r\n else {\r\n this.viewCache = new Map();\r\n }\r\n }\r\n update(mutate) {\r\n const clone = new this.constructor(this.tables, this.viewCache);\r\n clone.tables = Object.assign({}, this.tables);\r\n mutate(clone);\r\n return clone;\r\n }\r\n with(patch) {\r\n return this.update(db => {\r\n (0, utils_1.objectKeys)(db.tables).forEach(entityName => {\r\n if (patch[entityName]) {\r\n db.tables[entityName] = db.tables[entityName].with(patch[entityName]);\r\n }\r\n });\r\n });\r\n }\r\n runView(view, params) {\r\n let cache = this.viewCache.get(view);\r\n if (!cache) {\r\n cache = new Map();\r\n this.viewCache.set(view, cache);\r\n }\r\n const key = view.getKey ? view.getKey(params) : JSON.stringify(params);\r\n let cacheItem = cache.get(key);\r\n if (!cacheItem) {\r\n cacheItem = {\r\n dependencies: this.valueAbsent,\r\n currentValue: this.valueAbsent,\r\n computedOnDb: this.valueAbsent,\r\n };\r\n cache.set(key, cacheItem);\r\n }\r\n let shouldUpdate = this !== cacheItem.computedOnDb;\r\n let dependencies = this.valueAbsent;\r\n if (view.getDependencies) {\r\n const compare = view.compareDependencies || utils_1.defaultCompareViewDependencies;\r\n dependencies = view.getDependencies(this, params);\r\n shouldUpdate = !compare(cacheItem.dependencies, dependencies);\r\n }\r\n let previousValue = cacheItem.currentValue;\r\n if (shouldUpdate) {\r\n cacheItem.dependencies = dependencies;\r\n let newValue = view.compute(this, params, dependencies);\r\n cacheItem.computedOnDb = this;\r\n let compareResults = view.compareResults || lodash_isequal_1.default;\r\n if (!compareResults(previousValue, newValue)) {\r\n if (view.traceDiff) {\r\n console.debug((0, utils_1.difference)(previousValue, newValue));\r\n }\r\n cacheItem.currentValue = newValue;\r\n }\r\n }\r\n return cacheItem.currentValue;\r\n }\r\n}\r\nexports.Db = Db;\r\n"},{"id":"./src/DbRef.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","name":"./src/DbRef.ts","index":14,"index2":24,"size":7881,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./DbRef","loc":"7:26-44"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.DbRef = void 0;\r\nconst tslib_1 = require(\"tslib\");\r\nconst patchHelpers_1 = require(\"./patchHelpers\");\r\nconst tempIds_1 = require(\"./tempIds\");\r\nconst utils_1 = require(\"./utils\");\r\nconst lodash_isempty_1 = (0, tslib_1.__importDefault)(require(\"lodash.isempty\"));\r\nconst Loader_1 = require(\"./Loader\");\r\nconst uui_core_1 = require(\"@epam/uui-core\");\r\nconst SimpleLoadingTracker_1 = require(\"./SimpleLoadingTracker\");\r\nconst ListLoadingTracker_1 = require(\"./ListLoadingTracker\");\r\nclass DbRef {\r\n constructor(blank) {\r\n this.blank = blank;\r\n this.log = [];\r\n this.autoSave = true;\r\n this.savedPoint = 0;\r\n this.throttleSaveMs = 1000;\r\n /* Update subscriptions (aka live views) */\r\n this.lastSubscriptionId = 1;\r\n this.subscriptions = new Map();\r\n this.updateHandlers = [];\r\n /* Error Subscriptions */\r\n this.saveErrorHandlers = [];\r\n /* Save scheduling */\r\n this.enqueueSave = (0, uui_core_1.batch)(() => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {\r\n const cumulativePatch = this.makeCumulativePatch();\r\n const lastLogEntry = this.log.length;\r\n if ((0, lodash_isempty_1.default)(cumulativePatch)) {\r\n return;\r\n }\r\n try {\r\n const response = yield this.savePatch(cumulativePatch);\r\n this.applyResponse(response, lastLogEntry);\r\n this.update();\r\n }\r\n catch (error) {\r\n this.saveError(cumulativePatch, error);\r\n this.update();\r\n throw error;\r\n }\r\n }));\r\n this.handleBeforeUnload = (e) => {\r\n if (this.enqueueSave.isBusy) {\r\n e.returnValue = false;\r\n return false;\r\n }\r\n };\r\n this.loaders = [];\r\n this.db = blank;\r\n this.base = blank;\r\n this.tempIdMap = new tempIds_1.TempIdMap(blank);\r\n this.idMap = this.tempIdMap;\r\n window.addEventListener('beforeunload', this.handleBeforeUnload);\r\n }\r\n /** Saves all committed patches. Useful only if autoSave is off. */\r\n save() {\r\n return this.enqueueSave();\r\n }\r\n getAutoSave() {\r\n return this.autoSave;\r\n }\r\n setAutoSave(val) {\r\n if (this.autoSave != val) {\r\n this.autoSave = val;\r\n this.autoSave && this.enqueueSave();\r\n this.update();\r\n }\r\n }\r\n revert() {\r\n this.db = this.base;\r\n this.log = this.log.slice(0, this.savedPoint);\r\n this.update();\r\n }\r\n /** Concrete DbRef instances should override and implement their save logic in this method */\r\n savePatch(patch) {\r\n return Promise.resolve({ submit: {} });\r\n }\r\n /* Db Update logic */\r\n commit(patch) {\r\n const dbBeforeUpdate = this.db.with(patch);\r\n patch = this.beforeUpdate(patch, dbBeforeUpdate.tables, this.db.tables);\r\n patch = (0, patchHelpers_1.mergeEntityPatches)(this.db.tables, patch);\r\n this.log.push({ patch });\r\n this.db = this.db.with(patch);\r\n this.autoSave && this.enqueueSave(null, { throttleMs: this.throttleSaveMs });\r\n this.update();\r\n }\r\n beforeUpdate(patch, tables, prevTables) {\r\n let patchAndDependencies = {};\r\n (0, utils_1.objectKeys)(tables).filter(entityName => patch[entityName] && !tables[entityName].schema.beforeUpdate).forEach(entityName => {\r\n patchAndDependencies[entityName] = patch[entityName];\r\n });\r\n (0, utils_1.objectKeys)(tables).filter(entityName => patch[entityName] && tables[entityName].schema.beforeUpdate).forEach(entityName => {\r\n const schema = tables[entityName].schema;\r\n const { beforeUpdate } = schema;\r\n let context = {\r\n clientIdsMap: this.tempIdMap,\r\n schema,\r\n tables,\r\n prevTables,\r\n };\r\n const results = patch[entityName].map(e => beforeUpdate(e, context));\r\n const updatedPatch = { [entityName]: results.map(result => result.entity) };\r\n const dependentEntityPatchesForUpdate = (0, patchHelpers_1.unionPatches)(results.filter(result => result.dependentEntities).map(result => result.dependentEntities));\r\n const dependentEntityPatches = this.beforeUpdate(dependentEntityPatchesForUpdate, tables, prevTables);\r\n patchAndDependencies = (0, patchHelpers_1.mergeEntityPatches)(tables, (0, patchHelpers_1.unionPatches)([patchAndDependencies, updatedPatch, dependentEntityPatches]));\r\n });\r\n return patchAndDependencies;\r\n }\r\n commitFetch(patch) {\r\n patch = this.tempIdMap.serverToClientPatch(patch);\r\n this.rebase(this.base.with(patch));\r\n this.update();\r\n }\r\n rebase(newBase) {\r\n this.base = newBase;\r\n this.db = newBase;\r\n for (let n = this.savedPoint; n < this.log.length; n++) {\r\n this.db = this.db.with(this.log[n].patch);\r\n }\r\n }\r\n makeCumulativePatch() {\r\n const lastLogEntry = this.log.length;\r\n const logEntriesToSave = this.log.slice(this.savedPoint, lastLogEntry);\r\n let cumulativePatch = (0, patchHelpers_1.makeCumulativePatch)(this.db, logEntriesToSave.map(t => t.patch), this.tempIdMap);\r\n cumulativePatch = this.tempIdMap.clientToServerPatch(cumulativePatch);\r\n return cumulativePatch;\r\n }\r\n applyResponse(response, newSavedPoint) {\r\n this.tempIdMap.appendServerMapping(response);\r\n let serverPatch = (0, patchHelpers_1.flattenResponse)(response.submit, this.db.tables);\r\n serverPatch = (0, patchHelpers_1.mergeEntityPatches)(this.db.tables, serverPatch);\r\n this.savedPoint = newSavedPoint;\r\n this.base = this.db;\r\n this.commitFetch(serverPatch);\r\n }\r\n subscribe(view, params, onUpdate) {\r\n const id = this.lastSubscriptionId++;\r\n const subscription = {\r\n update: (params) => {\r\n subscription.currentParams = params;\r\n subscription.currentValue = this.db.runView(view, params);\r\n return subscription.currentValue;\r\n },\r\n currentParams: null,\r\n currentValue: null,\r\n onUpdate,\r\n unsubscribe: () => { this.subscriptions.delete(id); },\r\n };\r\n subscription.update(params);\r\n this.subscriptions.set(id, subscription);\r\n return subscription;\r\n }\r\n onUpdate(handler) {\r\n this.subscribe({\r\n compute: db => db,\r\n compareResults: (a, b) => a === b,\r\n }, null, handler);\r\n }\r\n update() {\r\n this.subscriptions.forEach(subscription => {\r\n const previousValue = subscription.currentValue;\r\n subscription.update(subscription.currentParams);\r\n if (subscription.currentValue !== previousValue && subscription.onUpdate) {\r\n subscription.onUpdate(subscription.currentValue);\r\n }\r\n });\r\n }\r\n onSaveError(handler) {\r\n this.saveErrorHandlers.push(handler);\r\n }\r\n saveError(request, error) {\r\n this.saveErrorHandlers.forEach(handler => handler(request, error));\r\n }\r\n makeLoader(options) {\r\n const loader = new Loader_1.Loader(this, () => new SimpleLoadingTracker_1.SimpleLoadingTracker(), options);\r\n this.loaders.push(loader);\r\n return loader;\r\n }\r\n makeListLoader(options) {\r\n const loader = new Loader_1.Loader(this, () => new ListLoadingTracker_1.ListLoadingTracker(), options);\r\n this.loaders.push(loader);\r\n return loader;\r\n }\r\n reload() {\r\n this.loaders = [];\r\n }\r\n}\r\nexports.DbRef = DbRef;\r\n"},{"id":"./src/DbTable.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbTable.ts","name":"./src/DbTable.ts","index":11,"index2":10,"size":8897,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./DbTable","loc":"6:26-46"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.DbTable = void 0;\r\nconst tslib_1 = require(\"tslib\");\r\nconst I = (0, tslib_1.__importStar)(require(\"immutable\"));\r\nconst uui_core_1 = require(\"@epam/uui-core\");\r\nconst immutable_1 = require(\"immutable\");\r\nclass DbTable {\r\n constructor(schema, state, q) {\r\n this.schema = schema;\r\n this.state = state;\r\n this.q = q;\r\n if (!state) {\r\n const indexes = (schema.indexes || []).map(indexDef => {\r\n return {\r\n field: indexDef,\r\n map: I.Map(),\r\n };\r\n });\r\n this.state = { pk: I.Map(), indexes };\r\n }\r\n if (!q) {\r\n this.q = {};\r\n }\r\n }\r\n keyToImmutable(id) {\r\n if (Array.isArray(id)) {\r\n return I.List(id);\r\n }\r\n else {\r\n return id;\r\n }\r\n }\r\n byId(id) {\r\n return this.state.pk.get(this.keyToImmutable(id));\r\n }\r\n getId(entity) {\r\n if (Array.isArray(this.schema.primaryKey)) {\r\n return this.schema.primaryKey.map((key) => entity[key]);\r\n }\r\n return entity[this.schema.primaryKey];\r\n }\r\n update(mutate) {\r\n const clone = new this.constructor(this.schema, this.state, this.q);\r\n mutate(clone);\r\n return clone;\r\n }\r\n /* Mutation */\r\n with(patch) {\r\n const updates = patch.map(entityPatch => {\r\n const id = this.getId(entityPatch);\r\n const immId = this.keyToImmutable(id);\r\n const existing = this.state.pk.get(immId);\r\n let isDeleted = false;\r\n let updated = entityPatch;\r\n if (existing) {\r\n updated = Object.assign(Object.assign({}, existing), entityPatch);\r\n if (this.schema.deleteFlag) {\r\n isDeleted = updated[this.schema.deleteFlag] === true;\r\n }\r\n }\r\n return { id, immId, patch: entityPatch, existing, updated, isNew: !existing, isDeleted };\r\n });\r\n const idVal = immutable_1.Seq.Keyed(updates.map(entity => [entity.immId, entity.updated]));\r\n let newPk = this.state.pk.merge(idVal);\r\n // TBD: replace with deleteAll after migrating to immutable 4\r\n updates.filter(u => u.isDeleted).forEach(u => {\r\n newPk = newPk.delete(u.immId);\r\n });\r\n const newIndexes = this.state.indexes.map(index => {\r\n let newMap = index.map;\r\n for (let n = 0; n < updates.length; n++) {\r\n let update = updates[n];\r\n const newKey = update.updated[index.field];\r\n if (update.existing) {\r\n const oldKey = update.existing[index.field];\r\n if (oldKey !== newKey || update.isDeleted) {\r\n newMap = newMap.update(oldKey, set => set.remove(update.immId));\r\n }\r\n }\r\n if (!update.isDeleted) {\r\n newMap = newMap.update(newKey, I.Set(), set => set.add(update.immId));\r\n }\r\n }\r\n return Object.assign(Object.assign({}, index), { map: newMap });\r\n });\r\n const newState = { pk: newPk, indexes: newIndexes };\r\n return this.update(t => t.state = newState);\r\n }\r\n /* Query */\r\n find(filter) {\r\n return this.update(t => t.q = Object.assign(Object.assign({}, t.q), { filter: Object.assign(Object.assign({}, this.q.filter), filter) }));\r\n }\r\n order(order) {\r\n return this.update(t => t.q = Object.assign(Object.assign({}, t.q), { sorting: order }));\r\n }\r\n orderBy(field, direction = 'asc') {\r\n return this.update(t => t.q = Object.assign(Object.assign({}, t.q), { sorting: [{ field, direction }] }));\r\n }\r\n thenBy(field, direction) {\r\n return this.update(t => t.q = Object.assign(Object.assign({}, t.q), { sorting: [...t.q.sorting, { field, direction }] }));\r\n }\r\n search(text) {\r\n if (!this.schema.searchBy) {\r\n throw new Error(`Can't search in the ${this.schema.typeName} table - searchBy is not defined in the schema.`);\r\n }\r\n return this.update(t => t.q = Object.assign(Object.assign({}, t.q), { search: text }));\r\n }\r\n /* Materializing */\r\n range(from, count) {\r\n return this.runQuery(Object.assign(Object.assign({}, this.q), { range: { from, count } }));\r\n }\r\n count() {\r\n return this.runQuery(this.q).length;\r\n }\r\n one() {\r\n return this.runQuery(this.q)[0] || null;\r\n }\r\n toArray() {\r\n return this.runQuery(this.q);\r\n }\r\n map(fn) {\r\n return this.toArray().map(fn);\r\n }\r\n /* Query implementation */\r\n runQuery(q) {\r\n let result = null;\r\n let filter = q.filter;\r\n if (filter) {\r\n let indexes = this.state.indexes;\r\n // Try to use indexes to fulfill filter conditions\r\n for (let n = 0; n < indexes.length; n++) {\r\n const index = indexes[n];\r\n if (index.field in filter) {\r\n const _a = filter, _b = index.field, condition = _a[_b], rest = (0, tslib_1.__rest)(_a, [typeof _b === \"symbol\" ? _b : _b + \"\"]);\r\n let conditionValues = null;\r\n if (condition != null && typeof condition === \"object\") {\r\n // Attempt to use index for 'in' and 'isNull' criteria.\r\n // We need to be very conservative here, indexed field should work the same way as getPatternPredicate. So\r\n // - it's better to leave corner cases to getPatternPredicate\r\n const _c = condition, { in: inCriteria, isNull: nullCriteria } = _c, restCriteria = (0, tslib_1.__rest)(_c, [\"in\", \"isNull\"]);\r\n if (inCriteria && Array.isArray(inCriteria)) {\r\n conditionValues = inCriteria;\r\n }\r\n else {\r\n restCriteria.in = inCriteria;\r\n }\r\n // Conditions in getPatternPredicate are composed with 'and' logic,\r\n // For now, let's not attempt to handle tricky cases like { in: [1,2] isNull: true }, or { in: [1, null] isNull: false }\r\n // - just leave this to getPatternPredicate.\r\n // Let's just handle the a most common case { isNull: true } - find all null and undefined\r\n if (nullCriteria === true && !conditionValues) {\r\n conditionValues = [null, undefined];\r\n }\r\n else {\r\n restCriteria.in = inCriteria;\r\n }\r\n // Keep other conditions, e.g. { in: [1,2,3], isNull: true } - in works via index, isNull - via filter\r\n if (Object.keys(restCriteria).length > 0) {\r\n rest[index.field] = restCriteria;\r\n }\r\n }\r\n else {\r\n conditionValues = [condition];\r\n }\r\n if (conditionValues) {\r\n result = [];\r\n for (let i = 0; i < conditionValues.length; i++) {\r\n const idsSet = index.map.get(conditionValues[i]);\r\n if (idsSet) {\r\n const idsArray = idsSet.toArray();\r\n for (let j = 0; j < idsArray.length; j++) {\r\n const item = this.state.pk.get(idsArray[j]);\r\n result.push(item);\r\n }\r\n }\r\n }\r\n filter = Object.keys(rest).length > 0 ? rest : null;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n if (!result) {\r\n result = this.state.pk.toArray();\r\n }\r\n if (filter) {\r\n let predicate = (0, uui_core_1.getFilterPredicate)(q.filter);\r\n result = result.filter(predicate);\r\n }\r\n if (q.search) {\r\n let searchFilter = (0, uui_core_1.getSearchFilter)(q.search);\r\n result = result.filter(item => searchFilter(this.schema.searchBy.map(field => item[field])));\r\n }\r\n if (q.sorting) {\r\n let comparer = (0, uui_core_1.getOrderComparer)(q.sorting);\r\n result = result.sort(comparer);\r\n }\r\n if (q.range) {\r\n result = result.slice(q.range.from, q.range.from + q.range.count);\r\n }\r\n return result;\r\n }\r\n}\r\nexports.DbTable = DbTable;\r\n"},{"id":"./src/ListLoadingTracker.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\ListLoadingTracker.ts","name":"./src/ListLoadingTracker.ts","index":27,"index2":23,"size":3485,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./ListLoadingTracker","loc":"12:29-60"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ListLoadingTracker = void 0;\r\nconst tslib_1 = require(\"tslib\");\r\nclass ListLoadingTracker {\r\n constructor(options) {\r\n this.options = options;\r\n this.cache = new Map();\r\n this.extractList = (options === null || options === void 0 ? void 0 : options.extractList) || ((r) => r);\r\n }\r\n prepare(request) {\r\n const { filter, sorting, search, range } = request, unknownFields = (0, tslib_1.__rest)(request, [\"filter\", \"sorting\", \"search\", \"range\"]);\r\n const options = {};\r\n if (filter) {\r\n options.filter = filter;\r\n }\r\n if (sorting) {\r\n options.sorting = sorting;\r\n }\r\n if (search) {\r\n options.search = search;\r\n }\r\n let keyObject = Object.assign(Object.assign({}, options), unknownFields);\r\n const key = JSON.stringify(keyObject);\r\n let entry = this.cache.get(key);\r\n if (!entry) {\r\n entry = { options, count: 0, maxCount: null, isComplete: false };\r\n this.cache.set(key, entry);\r\n }\r\n return { options, range, unknownFields, entry };\r\n }\r\n diff(request) {\r\n const { options, range, unknownFields, entry } = this.prepare(request);\r\n if (entry.isComplete) {\r\n return null;\r\n }\r\n if (!request.range) {\r\n return request;\r\n }\r\n else {\r\n const requestedMax = request.range.from + request.range.count;\r\n let missingCount = requestedMax - entry.count;\r\n if (entry.maxCount) {\r\n missingCount = Math.min(missingCount, entry.maxCount);\r\n }\r\n if (missingCount > 0) {\r\n return Object.assign(Object.assign(Object.assign({}, options), unknownFields), { range: { from: entry.count, count: requestedMax - entry.count } });\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n }\r\n count(request) {\r\n const { entry } = this.prepare(request);\r\n return { knownCount: Math.max(entry.count, entry.maxCount), exactCount: entry.maxCount };\r\n }\r\n append(request, response) {\r\n const { options, range, unknownFields, entry } = this.prepare(request);\r\n if (response) {\r\n const list = this.extractList(response);\r\n if (list.count) {\r\n entry.maxCount = list.count;\r\n }\r\n if (!range) {\r\n entry.count = list.items.length;\r\n entry.maxCount = list.items.length;\r\n entry.isComplete = true;\r\n }\r\n else {\r\n const from = (list.from == null) ? range.from : list.from;\r\n if (list.items.length > 0) {\r\n entry.count = Math.max(entry.count, from + list.items.length);\r\n }\r\n if (list.items.length < range.count) {\r\n entry.maxCount = from + list.items.length;\r\n entry.count = entry.maxCount;\r\n entry.isComplete = true;\r\n }\r\n }\r\n }\r\n else {\r\n if (range) {\r\n entry.count = Math.max(entry.count, request.range.from + request.range.count);\r\n }\r\n else {\r\n entry.isComplete = true;\r\n }\r\n }\r\n }\r\n}\r\nexports.ListLoadingTracker = ListLoadingTracker;\r\n"},{"id":"./src/Loader.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Loader.ts","name":"./src/Loader.ts","index":25,"index2":21,"size":3161,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./Loader","loc":"9:17-36"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Loader = void 0;\r\nclass Loader {\r\n constructor(dbRef, getTracker, options) {\r\n this.dbRef = dbRef;\r\n this.getTracker = getTracker;\r\n this.options = options;\r\n this.currentRequests = new Set();\r\n this.load = (inputRequest) => {\r\n const result = {\r\n isComplete: this.loaded.diff(inputRequest) == null,\r\n isLoading: false,\r\n request: inputRequest,\r\n missing: this.loadedAndLoading.diff(inputRequest),\r\n promise: null,\r\n reload: null,\r\n };\r\n result.reload = () => {\r\n result.missing = inputRequest;\r\n this.loadImpl(result);\r\n };\r\n if (result.isComplete) {\r\n // Everything requested is already loaded\r\n result.isComplete = true;\r\n result.isLoading = false;\r\n result.promise = Promise.resolve();\r\n return result;\r\n }\r\n else {\r\n if (result.missing == null) {\r\n // Everything requested is either loaded already, or being loaded\r\n result.isComplete = false;\r\n result.isLoading = true;\r\n // There's no good way to tell which of current requests is querying requested data - there actually can be 2 of them.\r\n // So we track all running requests, and await all of them in such case.\r\n result.promise = Promise.all(this.currentRequests.entries()).then(() => { });\r\n return result;\r\n }\r\n else {\r\n // Something requested is not loaded, nor being loaded. Need to perform a new request.\r\n this.loadImpl(result);\r\n return result;\r\n }\r\n }\r\n };\r\n this.loaded = getTracker();\r\n this.loadedAndLoading = getTracker();\r\n }\r\n loadImpl(state) {\r\n this.loadedAndLoading.append(state.missing);\r\n state.isLoading = true;\r\n let serverRequest = state.missing;\r\n if (this.options.clientToServerRequest) {\r\n serverRequest = this.options.clientToServerRequest(serverRequest);\r\n }\r\n state.promise = this.options.api(serverRequest).then(result => {\r\n this.loaded.append(state.missing, result);\r\n this.loadedAndLoading.append(state.missing, result);\r\n state.missing = null;\r\n state.isLoading = false;\r\n state.isComplete = true;\r\n state.promise = Promise.resolve();\r\n const flatten = this.options.convertToPatch(result);\r\n this.options.postProcess && this.options.postProcess(flatten);\r\n this.dbRef.commitFetch(flatten);\r\n });\r\n this.currentRequests.add(state.promise);\r\n state.promise.finally(() => {\r\n this.currentRequests.delete(state.promise);\r\n });\r\n return state.promise;\r\n }\r\n}\r\nexports.Loader = Loader;\r\n"},{"id":"./src/SimpleLoadingTracker.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\SimpleLoadingTracker.ts","name":"./src/SimpleLoadingTracker.ts","index":26,"index2":22,"size":516,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./SimpleLoadingTracker","loc":"11:31-64"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SimpleLoadingTracker = void 0;\r\nclass SimpleLoadingTracker {\r\n constructor() {\r\n this.set = new Set();\r\n }\r\n getKey(request) {\r\n return JSON.stringify(request);\r\n }\r\n diff(request) {\r\n return this.set.has(this.getKey(request)) ? null : request;\r\n }\r\n append(request, result) {\r\n this.set.add(this.getKey(request));\r\n }\r\n}\r\nexports.SimpleLoadingTracker = SimpleLoadingTracker;\r\n"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts","index":3,"index2":27,"size":583,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","issuerId":"./index.tsx","issuerName":"./index.tsx","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./index.tsx","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","module":"./index.tsx","moduleName":"./index.tsx","type":"cjs require","userRequest":"./src","loc":"4:26-42"}],"providedExports":null,"optimizationBailout":[],"depth":2,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst tslib_1 = require(\"tslib\");\r\n(0, tslib_1.__exportStar)(require(\"./types\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./Db\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./DbTable\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./DbRef\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./tempIds\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./utils\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./patchHelpers\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./reactHooks\"), exports);\r\n"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts","index":15,"index2":18,"size":8556,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./patchHelpers","loc":"5:23-48"},{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./patchHelpers","loc":"10:26-51"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.getEntityParentDependencies = exports.getParentEntities = exports.hasServerFields = exports.isNew = exports.getId = exports.isClientOnly = exports.makeCumulativePatch = exports.isPatchBlank = exports.flattenResponse = exports.mergeEntityPatches = exports.unionPatches = void 0;\r\nconst tslib_1 = require(\"tslib\");\r\nconst types_1 = require(\"./types\");\r\nconst I = (0, tslib_1.__importStar)(require(\"immutable\"));\r\nconst utils_1 = require(\"./utils\");\r\nconst lodash_groupby_1 = (0, tslib_1.__importDefault)(require(\"lodash.groupby\"));\r\nconst lodash_map_1 = (0, tslib_1.__importDefault)(require(\"lodash.map\"));\r\nconst lodash_merge_1 = (0, tslib_1.__importDefault)(require(\"lodash.merge\"));\r\nconst lodash_countby_1 = (0, tslib_1.__importDefault)(require(\"lodash.countby\"));\r\nconst lodash_filter_1 = (0, tslib_1.__importDefault)(require(\"lodash.filter\"));\r\nconst lodash_foreach_1 = (0, tslib_1.__importDefault)(require(\"lodash.foreach\"));\r\nconst lodash_pick_1 = (0, tslib_1.__importDefault)(require(\"lodash.pick\"));\r\nfunction unionPatches(patches) {\r\n const result = {};\r\n patches.forEach(patch => {\r\n (0, utils_1.objectKeys)(patch).forEach(tableName => {\r\n result[tableName] = result[tableName] ? [...result[tableName], ...patch[tableName]] : patch[tableName];\r\n });\r\n });\r\n return result;\r\n}\r\nexports.unionPatches = unionPatches;\r\nfunction mergeEntityPatches(tables, patch) {\r\n const result = {};\r\n (0, utils_1.objectKeys)(patch).forEach(key => {\r\n const table = tables[key];\r\n const groupedEntities = (0, lodash_groupby_1.default)(patch[key], item => table.getId(item));\r\n const tablePatch = (0, lodash_map_1.default)(groupedEntities, entities => {\r\n const result = (0, lodash_merge_1.default)({}, ...entities);\r\n if (process.env.NODE_ENV !== 'production') {\r\n const props = (0, utils_1.objectKeys)(result).filter(prop => Object.keys((0, lodash_countby_1.default)(entities.filter(entity => entity[prop] !== undefined), entity => entity[prop])).length > 1);\r\n if (props.length) {\r\n console.warn('mergeEntityPatches: Different property values found for the same entity.\\nProperty names:\\n', props, '\\nEntities:\\n', ...entities);\r\n }\r\n }\r\n return result;\r\n });\r\n result[key] = tablePatch;\r\n });\r\n return result;\r\n}\r\nexports.mergeEntityPatches = mergeEntityPatches;\r\nfunction flattenResponseHelper(result, object, tablesByTypeName) {\r\n if (Array.isArray(object)) {\r\n object.forEach(item => flattenResponseHelper(result, item, tablesByTypeName));\r\n }\r\n else if (typeof object === 'object') {\r\n const clone = {};\r\n let tableKey;\r\n let fields = {};\r\n if ('__typename' in object) {\r\n const table = tablesByTypeName[object.__typename];\r\n if (table) {\r\n tableKey = table.schema.tableName;\r\n fields = table.schema.fields;\r\n }\r\n }\r\n for (let key in object) {\r\n const value = object[key];\r\n const field = fields[key];\r\n if ((field && !!field.disableFlatten)\r\n || typeof value !== 'object'\r\n || value === null\r\n || (Array.isArray(value) && value.every(item => typeof item !== 'object'))) {\r\n clone[key] = value;\r\n }\r\n else {\r\n flattenResponseHelper(result, value, tablesByTypeName);\r\n }\r\n }\r\n if (tableKey) {\r\n result[tableKey].push(clone);\r\n }\r\n }\r\n}\r\nfunction flattenResponse(response, tables) {\r\n const result = {};\r\n let tablesByTypeName = {};\r\n Object.values(tables).forEach(table => tablesByTypeName[table.schema.typeName] = table);\r\n (0, utils_1.objectKeys)(tables).forEach(tableName => tablesByTypeName);\r\n (0, utils_1.objectKeys)(tables).forEach(key => result[key] = []);\r\n flattenResponseHelper(result, response, tablesByTypeName);\r\n return result;\r\n}\r\nexports.flattenResponse = flattenResponse;\r\nfunction isPatchBlank(patch) {\r\n return !(0, utils_1.objectKeys)(patch).some(key => patch[key].length > 0);\r\n}\r\nexports.isPatchBlank = isPatchBlank;\r\n/**\r\n * Given several patches, creates a new single patch with all fields from all entities in all patches.\r\n */\r\nfunction makeCumulativePatch(updatedDb, patches, clientIdsMap) {\r\n const result = {};\r\n (0, utils_1.objectKeys)(updatedDb.tables).forEach(entityName => {\r\n const table = updatedDb.tables[entityName];\r\n const schema = table.schema;\r\n let ids = I.Set();\r\n patches.forEach(patch => {\r\n let filteredPatch = (patch[entityName] || []).filter(entity => hasServerFields(entity, schema, clientIdsMap, updatedDb.tables));\r\n ids = ids.union(filteredPatch.map(e => table.getId(e)));\r\n });\r\n const entities = ids\r\n .map(id => table.byId(id))\r\n .filter(e => !isClientOnly(e, schema))\r\n .toArray();\r\n if (entities.length > 0) {\r\n result[entityName] = entities;\r\n }\r\n });\r\n return result;\r\n}\r\nexports.makeCumulativePatch = makeCumulativePatch;\r\nfunction isClientOnly(entity, schema) {\r\n if (typeof schema.isClientOnly === 'function') {\r\n return schema.isClientOnly(entity);\r\n }\r\n return !!schema.isClientOnly;\r\n}\r\nexports.isClientOnly = isClientOnly;\r\nfunction getId(entity, schema) {\r\n if (typeof schema.primaryKey == 'string') {\r\n return entity[schema.primaryKey];\r\n }\r\n const result = [];\r\n (0, lodash_foreach_1.default)((0, lodash_pick_1.default)(entity, schema.primaryKey), (value) => {\r\n result.push(value);\r\n });\r\n return result;\r\n}\r\nexports.getId = getId;\r\nfunction isNew(entity, schema, clientIdsMap) {\r\n const id = getId(entity, schema);\r\n return !clientIdsMap.clientToServer(id);\r\n}\r\nexports.isNew = isNew;\r\nfunction hasServerFields(entity, schema, clientIdsMap, tables) {\r\n const fullEntity = Object.assign(Object.assign({}, tables[schema.tableName].byId(entity.id) || {}), entity);\r\n if (isClientOnly(fullEntity, schema)) {\r\n return false;\r\n }\r\n return (0, utils_1.objectKeys)(entity).some(fieldName => {\r\n const fieldSchema = schema.fields[fieldName];\r\n return !fieldSchema || !(fieldSchema.isClientOnly || fieldSchema.isReadOnly || (fieldSchema.isGenerated && !isNew(entity, schema, clientIdsMap)));\r\n });\r\n}\r\nexports.hasServerFields = hasServerFields;\r\nfunction getParentEntities(patch, tables) {\r\n const dependenciesPatch = {};\r\n (0, utils_1.objectKeys)(patch).forEach(key => {\r\n const table = tables[key];\r\n const tableSchema = table.schema;\r\n const fields = (0, lodash_filter_1.default)((0, lodash_map_1.default)(tableSchema.fields, (field, name) => (Object.assign(Object.assign({}, field), { name }))), field => field.fk && field.fk.relationType == types_1.DbRelationType.Aggregation);\r\n const tablePatch = patch[key];\r\n fields.forEach(field => {\r\n const { fk: { tableName }, name } = field;\r\n tablePatch.forEach(entity => {\r\n const actualTableName = (typeof tableName == 'function' ? tableName(entity) : tableName);\r\n const dbEntity = table.byId(table.getId(entity));\r\n const parentEntity = tables[actualTableName].byId(dbEntity[name]);\r\n const idFields = (0, lodash_pick_1.default)(parentEntity, tables[actualTableName].schema.primaryKey);\r\n if (parentEntity) {\r\n dependenciesPatch[actualTableName] = dependenciesPatch[actualTableName] || [];\r\n dependenciesPatch[actualTableName].push(idFields);\r\n }\r\n });\r\n });\r\n });\r\n return dependenciesPatch;\r\n}\r\nexports.getParentEntities = getParentEntities;\r\nfunction getEntityParentDependencies(entity, entityName, tables) {\r\n let patch = { [entityName]: [entity] };\r\n const resultPatches = [];\r\n while (true) {\r\n let parents = getParentEntities(patch, tables);\r\n if (isPatchBlank(parents)) {\r\n break;\r\n }\r\n resultPatches.push(parents);\r\n patch = parents;\r\n }\r\n let result = unionPatches([patch, ...resultPatches]);\r\n result = mergeEntityPatches(tables, result);\r\n return result;\r\n}\r\nexports.getEntityParentDependencies = getEntityParentDependencies;\r\n"},{"id":"./src/reactHooks.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\reactHooks.ts","name":"./src/reactHooks.ts","index":28,"index2":26,"size":820,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./reactHooks","loc":"11:26-49"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.useDbView = exports.useDbRef = exports.DbContext = void 0;\r\nconst react_1 = require(\"react\");\r\nexports.DbContext = (0, react_1.createContext)(null);\r\nfunction useDbRef() {\r\n return (0, react_1.useContext)(exports.DbContext);\r\n}\r\nexports.useDbRef = useDbRef;\r\nfunction useDbView(fn, params, options) {\r\n const dbRef = useDbRef();\r\n const [state, setState] = (0, react_1.useState)();\r\n const subscription = (0, react_1.useMemo)(() => dbRef.subscribe(Object.assign({ compute: fn }, options), params, setState), []);\r\n subscription.update(params);\r\n (0, react_1.useEffect)(() => {\r\n return () => subscription.unsubscribe();\r\n }, []);\r\n return subscription.currentValue;\r\n}\r\nexports.useDbView = useDbView;\r\n"},{"id":"./src/tempIds.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\tempIds.tsx","name":"./src/tempIds.tsx","index":23,"index2":19,"size":7879,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./tempIds","loc":"6:18-38"},{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./tempIds","loc":"8:26-46"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TempIdMap = exports.isTempId = exports.getTempId = void 0;\r\nconst utils_1 = require(\"./utils\");\r\nlet lastTempId = -1;\r\nfunction getTempId() {\r\n return --lastTempId;\r\n}\r\nexports.getTempId = getTempId;\r\nfunction isTempId(val) {\r\n return typeof val === 'number' && val < 0;\r\n}\r\nexports.isTempId = isTempId;\r\nclass TempIdMap {\r\n constructor(db) {\r\n this.db = db;\r\n this.serverToClientIds = new Map();\r\n this.clientToServerIds = new Map();\r\n this.clientToServer = (id) => this.clientToServerIds.get(id);\r\n this.serverToClient = (tableName, id) => this.getServerToClientMap(tableName).get(id);\r\n this.clientToServerRequest = (request) => {\r\n request = Object.assign({}, request);\r\n if (request.filter) {\r\n request.filter = this.clientToServerDataFilter(request.filter);\r\n }\r\n return request;\r\n };\r\n this.clientToServerDataFilter = (filter) => {\r\n filter = Object.assign({}, filter);\r\n const keys = Object.keys(filter);\r\n // I hope that we can rely that there won't be any negative numbers, which are not IDs, in queries.\r\n // We need to invent better heuristics or a schema otherwise.\r\n const clientToServer = (id) => {\r\n const found = this.clientToServer(id);\r\n if (found) {\r\n return found;\r\n }\r\n else {\r\n return id;\r\n }\r\n };\r\n for (let n = 0; n < keys.length; n++) {\r\n const key = keys[n];\r\n let condition = filter[key];\r\n if (condition != null && typeof condition === \"object\") {\r\n condition = Object.assign({}, condition);\r\n if ('in' in condition && Array.isArray(condition.in) && condition.in.length) {\r\n condition.in = condition.in.map(clientToServer);\r\n }\r\n }\r\n else {\r\n condition = clientToServer(condition);\r\n }\r\n filter[key] = condition;\r\n }\r\n return filter;\r\n };\r\n }\r\n copyPatch(patch) {\r\n const newPatch = Object.assign({}, patch);\r\n (0, utils_1.objectKeys)(patch).forEach(tableName => {\r\n let tablePatch = patch[tableName].map(entityPatch => (Object.assign({}, entityPatch)));\r\n newPatch[tableName] = tablePatch;\r\n });\r\n return newPatch;\r\n }\r\n // Iterate thru every field in every patch for every table, matching certain field criteria. The patch is mutated!\r\n mapFields(patch, filter, callback) {\r\n (0, utils_1.objectKeys)(patch).forEach(tableName => {\r\n const schema = this.db.tables[tableName].schema;\r\n const fields = (0, utils_1.objectKeys)(schema.fields || [])\r\n .map(fieldName => {\r\n const fieldSchema = schema.fields[fieldName];\r\n if (filter(fieldSchema, fieldName)) {\r\n return { name: fieldName, schema: fieldSchema };\r\n }\r\n })\r\n .filter(f => !!f);\r\n if (!fields.length) {\r\n return;\r\n }\r\n patch[tableName].forEach(entityPatch => {\r\n for (let n = 0; n < fields.length; n++) {\r\n const field = fields[n];\r\n const fieldValue = entityPatch[field.name];\r\n callback(field.name, field.schema, fieldValue, entityPatch, tableName);\r\n }\r\n });\r\n });\r\n }\r\n getServerToClientMap(tableName) {\r\n const existing = this.serverToClientIds.get(tableName);\r\n if (existing) {\r\n return existing;\r\n }\r\n else {\r\n const newMap = new Map();\r\n this.serverToClientIds.set(tableName, newMap);\r\n return newMap;\r\n }\r\n }\r\n serverToClientPatch(patch) {\r\n patch = this.copyPatch(patch);\r\n // We map PK in a separate pass, as we need to remap all PKs before re-mapping FKs\r\n this.mapFields(patch, f => f.isGenerated, (fieldName, fieldSchema, fieldValue, entityPatch, tableName) => {\r\n let clientId = this.getServerToClientMap(tableName).get(fieldValue);\r\n if (!clientId) {\r\n clientId = getTempId();\r\n this.clientToServerIds.set(clientId, fieldValue);\r\n this.getServerToClientMap(tableName).set(fieldValue, clientId);\r\n }\r\n entityPatch[fieldName] = clientId;\r\n });\r\n this.mapFields(patch, f => !!(f.fk || (f.default != null) || f.toClient), (fieldName, fieldSchema, fieldValue, entityPatch, tableName) => {\r\n let isUndefined = typeof (fieldValue) === 'undefined';\r\n if (fieldSchema.default != null && fieldValue == null) {\r\n fieldValue = fieldSchema.default;\r\n isUndefined = false;\r\n }\r\n if (fieldSchema.fk && fieldValue != null) {\r\n const fkTableName = typeof fieldSchema.fk.tableName === 'function' ? fieldSchema.fk.tableName(entityPatch) : fieldSchema.fk.tableName;\r\n let clientId = this.getServerToClientMap(fkTableName).get(fieldValue);\r\n if (!clientId) {\r\n clientId = getTempId();\r\n this.clientToServerIds.set(clientId, fieldValue);\r\n this.getServerToClientMap(fkTableName).set(fieldValue, clientId);\r\n }\r\n fieldValue = clientId;\r\n }\r\n if (!isUndefined && fieldSchema.toClient) {\r\n fieldValue = fieldSchema.toClient(fieldValue);\r\n }\r\n if (!isUndefined) {\r\n entityPatch[fieldName] = fieldValue;\r\n }\r\n });\r\n return patch;\r\n }\r\n clientToServerPatch(patch) {\r\n patch = this.copyPatch(patch);\r\n this.mapFields(patch, f => f.isGenerated || !!f.fk, (fieldName, fieldSchema, fieldValue, entityPatch, tableName) => {\r\n if (fieldValue != null) {\r\n const existingId = this.clientToServerIds.get(fieldValue);\r\n if (existingId) {\r\n entityPatch[fieldName] = existingId;\r\n }\r\n }\r\n });\r\n this.mapFields(patch, f => !(f.isClientOnly || f.isReadOnly) && !!f.toServer, (fieldName, fieldSchema, fieldValue, entityPatch, tableName) => {\r\n entityPatch[fieldName] = fieldSchema.toServer(entityPatch[fieldName]);\r\n });\r\n this.mapFields(patch, meta => meta.isClientOnly || meta.isReadOnly, (fieldName, fieldSchema, fieldValue, entityPatch, tableName) => {\r\n delete entityPatch[fieldName];\r\n });\r\n return patch;\r\n }\r\n appendServerMapping(response) {\r\n (0, utils_1.objectKeys)(response.submit).forEach(tableName => {\r\n if (this.db.tables[tableName]) {\r\n const tablePatch = response.submit[tableName];\r\n if (tablePatch) {\r\n const serverToClientIds = this.getServerToClientMap(tableName);\r\n const table = this.db.tables[tableName];\r\n tablePatch.forEach(patch => {\r\n if (isTempId(patch.id)) {\r\n const clientId = patch.id;\r\n const serverId = table.getId(patch.payload);\r\n serverToClientIds.set(serverId, clientId);\r\n this.clientToServerIds.set(clientId, serverId);\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n}\r\nexports.TempIdMap = TempIdMap;\r\n"},{"id":"./src/types.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\types.ts","name":"./src/types.ts","index":4,"index2":1,"size":387,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./types","loc":"4:26-44"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"./types","loc":"5:16-34"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.DbRelationType = void 0;\r\nvar DbRelationType;\r\n(function (DbRelationType) {\r\n DbRelationType[DbRelationType[\"Aggregation\"] = 0] = \"Aggregation\";\r\n DbRelationType[DbRelationType[\"Association\"] = 1] = \"Association\";\r\n})(DbRelationType = exports.DbRelationType || (exports.DbRelationType = {}));\r\n"},{"id":"./src/utils.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","name":"./src/utils.ts","index":6,"index2":6,"size":1786,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/Db.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"./utils","loc":"5:16-34"},{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./utils","loc":"7:16-34"},{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./utils","loc":"9:26-44"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"./utils","loc":"7:16-34"},{"moduleId":"./src/tempIds.tsx","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\tempIds.tsx","module":"./src/tempIds.tsx","moduleName":"./src/tempIds.tsx","type":"cjs require","userRequest":"./utils","loc":"4:16-34"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.difference = exports.defaultCompareViewDependencies = exports.objectKeys = void 0;\r\nconst tslib_1 = require(\"tslib\");\r\nconst shallowequal_1 = (0, tslib_1.__importDefault)(require(\"shallowequal\"));\r\nconst lodash_zip_1 = (0, tslib_1.__importDefault)(require(\"lodash.zip\"));\r\nconst lodash_transform_1 = (0, tslib_1.__importDefault)(require(\"lodash.transform\"));\r\nconst lodash_isequal_1 = (0, tslib_1.__importDefault)(require(\"lodash.isequal\"));\r\n// TBD: New typescript would contain better typing for this. Remove this hack after update.\r\nexports.objectKeys = Object.keys;\r\nfunction defaultCompareViewDependencies(prev, next) {\r\n if (Array.isArray(prev) && Array.isArray(next)) {\r\n if (prev.length === next.length) {\r\n return (0, lodash_zip_1.default)(prev, next).every(([p, n]) => (0, shallowequal_1.default)(p, n));\r\n }\r\n return false;\r\n }\r\n return (0, shallowequal_1.default)(prev, next);\r\n}\r\nexports.defaultCompareViewDependencies = defaultCompareViewDependencies;\r\n/**\r\n * Deep diff between two object, using lodash\r\n * @param {Object} object Object compared\r\n * @param {Object} base Object to compare with\r\n * @return {Object} Return a new object who represent the diff\r\n */\r\nfunction difference(object, base) {\r\n function changes(object, base) {\r\n return (0, lodash_transform_1.default)(object, function (result, value, key) {\r\n if (!(0, lodash_isequal_1.default)(value, base[key])) {\r\n result[key] = (typeof value === \"object\" && typeof base[key] === \"object\") ? changes(value, base[key]) : value;\r\n }\r\n });\r\n }\r\n return changes(object, base);\r\n}\r\nexports.difference = difference;\r\n"},{"id":"@epam/uui-core","identifier":"external \"@epam/uui-core\"","name":"external \"@epam/uui-core\"","index":13,"index2":9,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"@epam/uui-core","loc":"10:19-44"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"@epam/uui-core","loc":"6:19-44"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"immutable","identifier":"external \"immutable\"","name":"external \"immutable\"","index":12,"index2":8,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbTable.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"immutable","loc":"5:36-56"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"immutable","loc":"7:20-40"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"immutable","loc":"6:36-56"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.countby","identifier":"external \"lodash.countby\"","name":"external \"lodash.countby\"","index":19,"index2":14,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.countby","loc":"11:54-79"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.filter","identifier":"external \"lodash.filter\"","name":"external \"lodash.filter\"","index":20,"index2":15,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.filter","loc":"12:53-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.foreach","identifier":"external \"lodash.foreach\"","name":"external \"lodash.foreach\"","index":21,"index2":16,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.foreach","loc":"13:54-79"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.groupby","identifier":"external \"lodash.groupby\"","name":"external \"lodash.groupby\"","index":16,"index2":11,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.groupby","loc":"8:54-79"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.isempty","identifier":"external \"lodash.isempty\"","name":"external \"lodash.isempty\"","index":24,"index2":20,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"lodash.isempty","loc":"8:54-79"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.isequal","identifier":"external \"lodash.isequal\"","name":"external \"lodash.isequal\"","index":10,"index2":5,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Db.ts","issuerId":"./src/Db.ts","issuerName":"./src/Db.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/Db.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Db.ts","name":"./src/Db.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/Db.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"lodash.isequal","loc":"6:54-79"},{"moduleId":"./src/utils.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.isequal","loc":"8:54-79"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.map","identifier":"external \"lodash.map\"","name":"external \"lodash.map\"","index":17,"index2":12,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.map","loc":"9:50-71"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.merge","identifier":"external \"lodash.merge\"","name":"external \"lodash.merge\"","index":18,"index2":13,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.merge","loc":"10:52-75"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.pick","identifier":"external \"lodash.pick\"","name":"external \"lodash.pick\"","index":22,"index2":17,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.pick","loc":"14:51-73"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.transform","identifier":"external \"lodash.transform\"","name":"external \"lodash.transform\"","index":9,"index2":4,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.transform","loc":"7:56-83"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.zip","identifier":"external \"lodash.zip\"","name":"external \"lodash.zip\"","index":8,"index2":3,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.zip","loc":"6:50-71"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"react","identifier":"external \"react\"","name":"external \"react\"","index":29,"index2":25,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\reactHooks.ts","issuerId":"./src/reactHooks.ts","issuerName":"./src/reactHooks.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/reactHooks.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\reactHooks.ts","name":"./src/reactHooks.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/reactHooks.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\reactHooks.ts","module":"./src/reactHooks.ts","moduleName":"./src/reactHooks.ts","type":"cjs require","userRequest":"react","loc":"4:16-32"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"shallowequal","identifier":"external \"shallowequal\"","name":"external \"shallowequal\"","index":7,"index2":2,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"shallowequal","loc":"5:52-75"}],"providedExports":null,"optimizationBailout":[],"depth":4}],"filteredModules":0,"origins":[{"module":"","moduleIdentifier":"","moduleName":"","loc":"main","request":null,"reasons":[]}]}],"modules":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx","index":0,"index2":29,"size":28,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":null,"issuerId":null,"issuerName":null,"issuerPath":null,"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":null,"moduleIdentifier":null,"module":null,"moduleName":null,"type":"multi entry"}],"providedExports":null,"optimizationBailout":[],"depth":0},{"id":"../node_modules/tslib/tslib.es6.js","identifier":"D:\\dev\\UUI-main\\node_modules\\tslib\\tslib.es6.js","name":"../node_modules/tslib/tslib.es6.js","index":2,"index2":0,"size":12280,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","issuerId":"./index.tsx","issuerName":"./index.tsx","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./index.tsx","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","module":"./index.tsx","moduleName":"./index.tsx","type":"cjs require","userRequest":"tslib","loc":"3:16-32"},{"moduleId":"./src/Db.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"tslib","loc":"4:16-32"},{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"tslib","loc":"4:16-32"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"tslib","loc":"4:16-32"},{"moduleId":"./src/ListLoadingTracker.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\ListLoadingTracker.ts","module":"./src/ListLoadingTracker.ts","moduleName":"./src/ListLoadingTracker.ts","type":"cjs require","userRequest":"tslib","loc":"4:16-32"},{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"tslib","loc":"3:16-32"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"tslib","loc":"4:16-32"},{"moduleId":"./src/utils.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"tslib","loc":"4:16-32"}],"providedExports":["__extends","__assign","__rest","__decorate","__param","__metadata","__awaiter","__generator","__createBinding","__exportStar","__values","__read","__spread","__spreadArrays","__spreadArray","__await","__asyncGenerator","__asyncDelegator","__asyncValues","__makeTemplateObject","__importStar","__importDefault","__classPrivateFieldGet","__classPrivateFieldSet","__classPrivateFieldIn"],"optimizationBailout":[],"depth":2,"source":"/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx","index":1,"index2":28,"size":169,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","issuerId":0,"issuerName":"multi ./index.tsx","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":0,"moduleIdentifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","module":"multi ./index.tsx","moduleName":"multi ./index.tsx","type":"single entry","userRequest":"D:\\dev\\UUI-main\\uui-db\\index.tsx","loc":"main[0]"}],"providedExports":null,"optimizationBailout":[],"depth":1,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst tslib_1 = require(\"tslib\");\r\n(0, tslib_1.__exportStar)(require(\"./src\"), exports);\r\n"},{"id":"./src/Db.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Db.ts","name":"./src/Db.ts","index":5,"index2":7,"size":2813,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./Db","loc":"5:26-41"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Db = void 0;\r\nconst tslib_1 = require(\"tslib\");\r\nconst utils_1 = require(\"./utils\");\r\nconst lodash_isequal_1 = (0, tslib_1.__importDefault)(require(\"lodash.isequal\"));\r\nclass Db {\r\n constructor(tables, reusedCache) {\r\n this.tables = tables;\r\n this.viewCache = new Map();\r\n /* Views (cached db projections) */\r\n this.valueAbsent = Symbol(\"ValueAbsent\");\r\n if (reusedCache) {\r\n this.viewCache = new Map(reusedCache);\r\n }\r\n else {\r\n this.viewCache = new Map();\r\n }\r\n }\r\n update(mutate) {\r\n const clone = new this.constructor(this.tables, this.viewCache);\r\n clone.tables = Object.assign({}, this.tables);\r\n mutate(clone);\r\n return clone;\r\n }\r\n with(patch) {\r\n return this.update(db => {\r\n (0, utils_1.objectKeys)(db.tables).forEach(entityName => {\r\n if (patch[entityName]) {\r\n db.tables[entityName] = db.tables[entityName].with(patch[entityName]);\r\n }\r\n });\r\n });\r\n }\r\n runView(view, params) {\r\n let cache = this.viewCache.get(view);\r\n if (!cache) {\r\n cache = new Map();\r\n this.viewCache.set(view, cache);\r\n }\r\n const key = view.getKey ? view.getKey(params) : JSON.stringify(params);\r\n let cacheItem = cache.get(key);\r\n if (!cacheItem) {\r\n cacheItem = {\r\n dependencies: this.valueAbsent,\r\n currentValue: this.valueAbsent,\r\n computedOnDb: this.valueAbsent,\r\n };\r\n cache.set(key, cacheItem);\r\n }\r\n let shouldUpdate = this !== cacheItem.computedOnDb;\r\n let dependencies = this.valueAbsent;\r\n if (view.getDependencies) {\r\n const compare = view.compareDependencies || utils_1.defaultCompareViewDependencies;\r\n dependencies = view.getDependencies(this, params);\r\n shouldUpdate = !compare(cacheItem.dependencies, dependencies);\r\n }\r\n let previousValue = cacheItem.currentValue;\r\n if (shouldUpdate) {\r\n cacheItem.dependencies = dependencies;\r\n let newValue = view.compute(this, params, dependencies);\r\n cacheItem.computedOnDb = this;\r\n let compareResults = view.compareResults || lodash_isequal_1.default;\r\n if (!compareResults(previousValue, newValue)) {\r\n if (view.traceDiff) {\r\n console.debug((0, utils_1.difference)(previousValue, newValue));\r\n }\r\n cacheItem.currentValue = newValue;\r\n }\r\n }\r\n return cacheItem.currentValue;\r\n }\r\n}\r\nexports.Db = Db;\r\n"},{"id":"./src/DbRef.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","name":"./src/DbRef.ts","index":14,"index2":24,"size":7881,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./DbRef","loc":"7:26-44"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.DbRef = void 0;\r\nconst tslib_1 = require(\"tslib\");\r\nconst patchHelpers_1 = require(\"./patchHelpers\");\r\nconst tempIds_1 = require(\"./tempIds\");\r\nconst utils_1 = require(\"./utils\");\r\nconst lodash_isempty_1 = (0, tslib_1.__importDefault)(require(\"lodash.isempty\"));\r\nconst Loader_1 = require(\"./Loader\");\r\nconst uui_core_1 = require(\"@epam/uui-core\");\r\nconst SimpleLoadingTracker_1 = require(\"./SimpleLoadingTracker\");\r\nconst ListLoadingTracker_1 = require(\"./ListLoadingTracker\");\r\nclass DbRef {\r\n constructor(blank) {\r\n this.blank = blank;\r\n this.log = [];\r\n this.autoSave = true;\r\n this.savedPoint = 0;\r\n this.throttleSaveMs = 1000;\r\n /* Update subscriptions (aka live views) */\r\n this.lastSubscriptionId = 1;\r\n this.subscriptions = new Map();\r\n this.updateHandlers = [];\r\n /* Error Subscriptions */\r\n this.saveErrorHandlers = [];\r\n /* Save scheduling */\r\n this.enqueueSave = (0, uui_core_1.batch)(() => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {\r\n const cumulativePatch = this.makeCumulativePatch();\r\n const lastLogEntry = this.log.length;\r\n if ((0, lodash_isempty_1.default)(cumulativePatch)) {\r\n return;\r\n }\r\n try {\r\n const response = yield this.savePatch(cumulativePatch);\r\n this.applyResponse(response, lastLogEntry);\r\n this.update();\r\n }\r\n catch (error) {\r\n this.saveError(cumulativePatch, error);\r\n this.update();\r\n throw error;\r\n }\r\n }));\r\n this.handleBeforeUnload = (e) => {\r\n if (this.enqueueSave.isBusy) {\r\n e.returnValue = false;\r\n return false;\r\n }\r\n };\r\n this.loaders = [];\r\n this.db = blank;\r\n this.base = blank;\r\n this.tempIdMap = new tempIds_1.TempIdMap(blank);\r\n this.idMap = this.tempIdMap;\r\n window.addEventListener('beforeunload', this.handleBeforeUnload);\r\n }\r\n /** Saves all committed patches. Useful only if autoSave is off. */\r\n save() {\r\n return this.enqueueSave();\r\n }\r\n getAutoSave() {\r\n return this.autoSave;\r\n }\r\n setAutoSave(val) {\r\n if (this.autoSave != val) {\r\n this.autoSave = val;\r\n this.autoSave && this.enqueueSave();\r\n this.update();\r\n }\r\n }\r\n revert() {\r\n this.db = this.base;\r\n this.log = this.log.slice(0, this.savedPoint);\r\n this.update();\r\n }\r\n /** Concrete DbRef instances should override and implement their save logic in this method */\r\n savePatch(patch) {\r\n return Promise.resolve({ submit: {} });\r\n }\r\n /* Db Update logic */\r\n commit(patch) {\r\n const dbBeforeUpdate = this.db.with(patch);\r\n patch = this.beforeUpdate(patch, dbBeforeUpdate.tables, this.db.tables);\r\n patch = (0, patchHelpers_1.mergeEntityPatches)(this.db.tables, patch);\r\n this.log.push({ patch });\r\n this.db = this.db.with(patch);\r\n this.autoSave && this.enqueueSave(null, { throttleMs: this.throttleSaveMs });\r\n this.update();\r\n }\r\n beforeUpdate(patch, tables, prevTables) {\r\n let patchAndDependencies = {};\r\n (0, utils_1.objectKeys)(tables).filter(entityName => patch[entityName] && !tables[entityName].schema.beforeUpdate).forEach(entityName => {\r\n patchAndDependencies[entityName] = patch[entityName];\r\n });\r\n (0, utils_1.objectKeys)(tables).filter(entityName => patch[entityName] && tables[entityName].schema.beforeUpdate).forEach(entityName => {\r\n const schema = tables[entityName].schema;\r\n const { beforeUpdate } = schema;\r\n let context = {\r\n clientIdsMap: this.tempIdMap,\r\n schema,\r\n tables,\r\n prevTables,\r\n };\r\n const results = patch[entityName].map(e => beforeUpdate(e, context));\r\n const updatedPatch = { [entityName]: results.map(result => result.entity) };\r\n const dependentEntityPatchesForUpdate = (0, patchHelpers_1.unionPatches)(results.filter(result => result.dependentEntities).map(result => result.dependentEntities));\r\n const dependentEntityPatches = this.beforeUpdate(dependentEntityPatchesForUpdate, tables, prevTables);\r\n patchAndDependencies = (0, patchHelpers_1.mergeEntityPatches)(tables, (0, patchHelpers_1.unionPatches)([patchAndDependencies, updatedPatch, dependentEntityPatches]));\r\n });\r\n return patchAndDependencies;\r\n }\r\n commitFetch(patch) {\r\n patch = this.tempIdMap.serverToClientPatch(patch);\r\n this.rebase(this.base.with(patch));\r\n this.update();\r\n }\r\n rebase(newBase) {\r\n this.base = newBase;\r\n this.db = newBase;\r\n for (let n = this.savedPoint; n < this.log.length; n++) {\r\n this.db = this.db.with(this.log[n].patch);\r\n }\r\n }\r\n makeCumulativePatch() {\r\n const lastLogEntry = this.log.length;\r\n const logEntriesToSave = this.log.slice(this.savedPoint, lastLogEntry);\r\n let cumulativePatch = (0, patchHelpers_1.makeCumulativePatch)(this.db, logEntriesToSave.map(t => t.patch), this.tempIdMap);\r\n cumulativePatch = this.tempIdMap.clientToServerPatch(cumulativePatch);\r\n return cumulativePatch;\r\n }\r\n applyResponse(response, newSavedPoint) {\r\n this.tempIdMap.appendServerMapping(response);\r\n let serverPatch = (0, patchHelpers_1.flattenResponse)(response.submit, this.db.tables);\r\n serverPatch = (0, patchHelpers_1.mergeEntityPatches)(this.db.tables, serverPatch);\r\n this.savedPoint = newSavedPoint;\r\n this.base = this.db;\r\n this.commitFetch(serverPatch);\r\n }\r\n subscribe(view, params, onUpdate) {\r\n const id = this.lastSubscriptionId++;\r\n const subscription = {\r\n update: (params) => {\r\n subscription.currentParams = params;\r\n subscription.currentValue = this.db.runView(view, params);\r\n return subscription.currentValue;\r\n },\r\n currentParams: null,\r\n currentValue: null,\r\n onUpdate,\r\n unsubscribe: () => { this.subscriptions.delete(id); },\r\n };\r\n subscription.update(params);\r\n this.subscriptions.set(id, subscription);\r\n return subscription;\r\n }\r\n onUpdate(handler) {\r\n this.subscribe({\r\n compute: db => db,\r\n compareResults: (a, b) => a === b,\r\n }, null, handler);\r\n }\r\n update() {\r\n this.subscriptions.forEach(subscription => {\r\n const previousValue = subscription.currentValue;\r\n subscription.update(subscription.currentParams);\r\n if (subscription.currentValue !== previousValue && subscription.onUpdate) {\r\n subscription.onUpdate(subscription.currentValue);\r\n }\r\n });\r\n }\r\n onSaveError(handler) {\r\n this.saveErrorHandlers.push(handler);\r\n }\r\n saveError(request, error) {\r\n this.saveErrorHandlers.forEach(handler => handler(request, error));\r\n }\r\n makeLoader(options) {\r\n const loader = new Loader_1.Loader(this, () => new SimpleLoadingTracker_1.SimpleLoadingTracker(), options);\r\n this.loaders.push(loader);\r\n return loader;\r\n }\r\n makeListLoader(options) {\r\n const loader = new Loader_1.Loader(this, () => new ListLoadingTracker_1.ListLoadingTracker(), options);\r\n this.loaders.push(loader);\r\n return loader;\r\n }\r\n reload() {\r\n this.loaders = [];\r\n }\r\n}\r\nexports.DbRef = DbRef;\r\n"},{"id":"./src/DbTable.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbTable.ts","name":"./src/DbTable.ts","index":11,"index2":10,"size":8897,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./DbTable","loc":"6:26-46"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.DbTable = void 0;\r\nconst tslib_1 = require(\"tslib\");\r\nconst I = (0, tslib_1.__importStar)(require(\"immutable\"));\r\nconst uui_core_1 = require(\"@epam/uui-core\");\r\nconst immutable_1 = require(\"immutable\");\r\nclass DbTable {\r\n constructor(schema, state, q) {\r\n this.schema = schema;\r\n this.state = state;\r\n this.q = q;\r\n if (!state) {\r\n const indexes = (schema.indexes || []).map(indexDef => {\r\n return {\r\n field: indexDef,\r\n map: I.Map(),\r\n };\r\n });\r\n this.state = { pk: I.Map(), indexes };\r\n }\r\n if (!q) {\r\n this.q = {};\r\n }\r\n }\r\n keyToImmutable(id) {\r\n if (Array.isArray(id)) {\r\n return I.List(id);\r\n }\r\n else {\r\n return id;\r\n }\r\n }\r\n byId(id) {\r\n return this.state.pk.get(this.keyToImmutable(id));\r\n }\r\n getId(entity) {\r\n if (Array.isArray(this.schema.primaryKey)) {\r\n return this.schema.primaryKey.map((key) => entity[key]);\r\n }\r\n return entity[this.schema.primaryKey];\r\n }\r\n update(mutate) {\r\n const clone = new this.constructor(this.schema, this.state, this.q);\r\n mutate(clone);\r\n return clone;\r\n }\r\n /* Mutation */\r\n with(patch) {\r\n const updates = patch.map(entityPatch => {\r\n const id = this.getId(entityPatch);\r\n const immId = this.keyToImmutable(id);\r\n const existing = this.state.pk.get(immId);\r\n let isDeleted = false;\r\n let updated = entityPatch;\r\n if (existing) {\r\n updated = Object.assign(Object.assign({}, existing), entityPatch);\r\n if (this.schema.deleteFlag) {\r\n isDeleted = updated[this.schema.deleteFlag] === true;\r\n }\r\n }\r\n return { id, immId, patch: entityPatch, existing, updated, isNew: !existing, isDeleted };\r\n });\r\n const idVal = immutable_1.Seq.Keyed(updates.map(entity => [entity.immId, entity.updated]));\r\n let newPk = this.state.pk.merge(idVal);\r\n // TBD: replace with deleteAll after migrating to immutable 4\r\n updates.filter(u => u.isDeleted).forEach(u => {\r\n newPk = newPk.delete(u.immId);\r\n });\r\n const newIndexes = this.state.indexes.map(index => {\r\n let newMap = index.map;\r\n for (let n = 0; n < updates.length; n++) {\r\n let update = updates[n];\r\n const newKey = update.updated[index.field];\r\n if (update.existing) {\r\n const oldKey = update.existing[index.field];\r\n if (oldKey !== newKey || update.isDeleted) {\r\n newMap = newMap.update(oldKey, set => set.remove(update.immId));\r\n }\r\n }\r\n if (!update.isDeleted) {\r\n newMap = newMap.update(newKey, I.Set(), set => set.add(update.immId));\r\n }\r\n }\r\n return Object.assign(Object.assign({}, index), { map: newMap });\r\n });\r\n const newState = { pk: newPk, indexes: newIndexes };\r\n return this.update(t => t.state = newState);\r\n }\r\n /* Query */\r\n find(filter) {\r\n return this.update(t => t.q = Object.assign(Object.assign({}, t.q), { filter: Object.assign(Object.assign({}, this.q.filter), filter) }));\r\n }\r\n order(order) {\r\n return this.update(t => t.q = Object.assign(Object.assign({}, t.q), { sorting: order }));\r\n }\r\n orderBy(field, direction = 'asc') {\r\n return this.update(t => t.q = Object.assign(Object.assign({}, t.q), { sorting: [{ field, direction }] }));\r\n }\r\n thenBy(field, direction) {\r\n return this.update(t => t.q = Object.assign(Object.assign({}, t.q), { sorting: [...t.q.sorting, { field, direction }] }));\r\n }\r\n search(text) {\r\n if (!this.schema.searchBy) {\r\n throw new Error(`Can't search in the ${this.schema.typeName} table - searchBy is not defined in the schema.`);\r\n }\r\n return this.update(t => t.q = Object.assign(Object.assign({}, t.q), { search: text }));\r\n }\r\n /* Materializing */\r\n range(from, count) {\r\n return this.runQuery(Object.assign(Object.assign({}, this.q), { range: { from, count } }));\r\n }\r\n count() {\r\n return this.runQuery(this.q).length;\r\n }\r\n one() {\r\n return this.runQuery(this.q)[0] || null;\r\n }\r\n toArray() {\r\n return this.runQuery(this.q);\r\n }\r\n map(fn) {\r\n return this.toArray().map(fn);\r\n }\r\n /* Query implementation */\r\n runQuery(q) {\r\n let result = null;\r\n let filter = q.filter;\r\n if (filter) {\r\n let indexes = this.state.indexes;\r\n // Try to use indexes to fulfill filter conditions\r\n for (let n = 0; n < indexes.length; n++) {\r\n const index = indexes[n];\r\n if (index.field in filter) {\r\n const _a = filter, _b = index.field, condition = _a[_b], rest = (0, tslib_1.__rest)(_a, [typeof _b === \"symbol\" ? _b : _b + \"\"]);\r\n let conditionValues = null;\r\n if (condition != null && typeof condition === \"object\") {\r\n // Attempt to use index for 'in' and 'isNull' criteria.\r\n // We need to be very conservative here, indexed field should work the same way as getPatternPredicate. So\r\n // - it's better to leave corner cases to getPatternPredicate\r\n const _c = condition, { in: inCriteria, isNull: nullCriteria } = _c, restCriteria = (0, tslib_1.__rest)(_c, [\"in\", \"isNull\"]);\r\n if (inCriteria && Array.isArray(inCriteria)) {\r\n conditionValues = inCriteria;\r\n }\r\n else {\r\n restCriteria.in = inCriteria;\r\n }\r\n // Conditions in getPatternPredicate are composed with 'and' logic,\r\n // For now, let's not attempt to handle tricky cases like { in: [1,2] isNull: true }, or { in: [1, null] isNull: false }\r\n // - just leave this to getPatternPredicate.\r\n // Let's just handle the a most common case { isNull: true } - find all null and undefined\r\n if (nullCriteria === true && !conditionValues) {\r\n conditionValues = [null, undefined];\r\n }\r\n else {\r\n restCriteria.in = inCriteria;\r\n }\r\n // Keep other conditions, e.g. { in: [1,2,3], isNull: true } - in works via index, isNull - via filter\r\n if (Object.keys(restCriteria).length > 0) {\r\n rest[index.field] = restCriteria;\r\n }\r\n }\r\n else {\r\n conditionValues = [condition];\r\n }\r\n if (conditionValues) {\r\n result = [];\r\n for (let i = 0; i < conditionValues.length; i++) {\r\n const idsSet = index.map.get(conditionValues[i]);\r\n if (idsSet) {\r\n const idsArray = idsSet.toArray();\r\n for (let j = 0; j < idsArray.length; j++) {\r\n const item = this.state.pk.get(idsArray[j]);\r\n result.push(item);\r\n }\r\n }\r\n }\r\n filter = Object.keys(rest).length > 0 ? rest : null;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n if (!result) {\r\n result = this.state.pk.toArray();\r\n }\r\n if (filter) {\r\n let predicate = (0, uui_core_1.getFilterPredicate)(q.filter);\r\n result = result.filter(predicate);\r\n }\r\n if (q.search) {\r\n let searchFilter = (0, uui_core_1.getSearchFilter)(q.search);\r\n result = result.filter(item => searchFilter(this.schema.searchBy.map(field => item[field])));\r\n }\r\n if (q.sorting) {\r\n let comparer = (0, uui_core_1.getOrderComparer)(q.sorting);\r\n result = result.sort(comparer);\r\n }\r\n if (q.range) {\r\n result = result.slice(q.range.from, q.range.from + q.range.count);\r\n }\r\n return result;\r\n }\r\n}\r\nexports.DbTable = DbTable;\r\n"},{"id":"./src/ListLoadingTracker.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\ListLoadingTracker.ts","name":"./src/ListLoadingTracker.ts","index":27,"index2":23,"size":3485,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./ListLoadingTracker","loc":"12:29-60"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ListLoadingTracker = void 0;\r\nconst tslib_1 = require(\"tslib\");\r\nclass ListLoadingTracker {\r\n constructor(options) {\r\n this.options = options;\r\n this.cache = new Map();\r\n this.extractList = (options === null || options === void 0 ? void 0 : options.extractList) || ((r) => r);\r\n }\r\n prepare(request) {\r\n const { filter, sorting, search, range } = request, unknownFields = (0, tslib_1.__rest)(request, [\"filter\", \"sorting\", \"search\", \"range\"]);\r\n const options = {};\r\n if (filter) {\r\n options.filter = filter;\r\n }\r\n if (sorting) {\r\n options.sorting = sorting;\r\n }\r\n if (search) {\r\n options.search = search;\r\n }\r\n let keyObject = Object.assign(Object.assign({}, options), unknownFields);\r\n const key = JSON.stringify(keyObject);\r\n let entry = this.cache.get(key);\r\n if (!entry) {\r\n entry = { options, count: 0, maxCount: null, isComplete: false };\r\n this.cache.set(key, entry);\r\n }\r\n return { options, range, unknownFields, entry };\r\n }\r\n diff(request) {\r\n const { options, range, unknownFields, entry } = this.prepare(request);\r\n if (entry.isComplete) {\r\n return null;\r\n }\r\n if (!request.range) {\r\n return request;\r\n }\r\n else {\r\n const requestedMax = request.range.from + request.range.count;\r\n let missingCount = requestedMax - entry.count;\r\n if (entry.maxCount) {\r\n missingCount = Math.min(missingCount, entry.maxCount);\r\n }\r\n if (missingCount > 0) {\r\n return Object.assign(Object.assign(Object.assign({}, options), unknownFields), { range: { from: entry.count, count: requestedMax - entry.count } });\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n }\r\n count(request) {\r\n const { entry } = this.prepare(request);\r\n return { knownCount: Math.max(entry.count, entry.maxCount), exactCount: entry.maxCount };\r\n }\r\n append(request, response) {\r\n const { options, range, unknownFields, entry } = this.prepare(request);\r\n if (response) {\r\n const list = this.extractList(response);\r\n if (list.count) {\r\n entry.maxCount = list.count;\r\n }\r\n if (!range) {\r\n entry.count = list.items.length;\r\n entry.maxCount = list.items.length;\r\n entry.isComplete = true;\r\n }\r\n else {\r\n const from = (list.from == null) ? range.from : list.from;\r\n if (list.items.length > 0) {\r\n entry.count = Math.max(entry.count, from + list.items.length);\r\n }\r\n if (list.items.length < range.count) {\r\n entry.maxCount = from + list.items.length;\r\n entry.count = entry.maxCount;\r\n entry.isComplete = true;\r\n }\r\n }\r\n }\r\n else {\r\n if (range) {\r\n entry.count = Math.max(entry.count, request.range.from + request.range.count);\r\n }\r\n else {\r\n entry.isComplete = true;\r\n }\r\n }\r\n }\r\n}\r\nexports.ListLoadingTracker = ListLoadingTracker;\r\n"},{"id":"./src/Loader.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Loader.ts","name":"./src/Loader.ts","index":25,"index2":21,"size":3161,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./Loader","loc":"9:17-36"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Loader = void 0;\r\nclass Loader {\r\n constructor(dbRef, getTracker, options) {\r\n this.dbRef = dbRef;\r\n this.getTracker = getTracker;\r\n this.options = options;\r\n this.currentRequests = new Set();\r\n this.load = (inputRequest) => {\r\n const result = {\r\n isComplete: this.loaded.diff(inputRequest) == null,\r\n isLoading: false,\r\n request: inputRequest,\r\n missing: this.loadedAndLoading.diff(inputRequest),\r\n promise: null,\r\n reload: null,\r\n };\r\n result.reload = () => {\r\n result.missing = inputRequest;\r\n this.loadImpl(result);\r\n };\r\n if (result.isComplete) {\r\n // Everything requested is already loaded\r\n result.isComplete = true;\r\n result.isLoading = false;\r\n result.promise = Promise.resolve();\r\n return result;\r\n }\r\n else {\r\n if (result.missing == null) {\r\n // Everything requested is either loaded already, or being loaded\r\n result.isComplete = false;\r\n result.isLoading = true;\r\n // There's no good way to tell which of current requests is querying requested data - there actually can be 2 of them.\r\n // So we track all running requests, and await all of them in such case.\r\n result.promise = Promise.all(this.currentRequests.entries()).then(() => { });\r\n return result;\r\n }\r\n else {\r\n // Something requested is not loaded, nor being loaded. Need to perform a new request.\r\n this.loadImpl(result);\r\n return result;\r\n }\r\n }\r\n };\r\n this.loaded = getTracker();\r\n this.loadedAndLoading = getTracker();\r\n }\r\n loadImpl(state) {\r\n this.loadedAndLoading.append(state.missing);\r\n state.isLoading = true;\r\n let serverRequest = state.missing;\r\n if (this.options.clientToServerRequest) {\r\n serverRequest = this.options.clientToServerRequest(serverRequest);\r\n }\r\n state.promise = this.options.api(serverRequest).then(result => {\r\n this.loaded.append(state.missing, result);\r\n this.loadedAndLoading.append(state.missing, result);\r\n state.missing = null;\r\n state.isLoading = false;\r\n state.isComplete = true;\r\n state.promise = Promise.resolve();\r\n const flatten = this.options.convertToPatch(result);\r\n this.options.postProcess && this.options.postProcess(flatten);\r\n this.dbRef.commitFetch(flatten);\r\n });\r\n this.currentRequests.add(state.promise);\r\n state.promise.finally(() => {\r\n this.currentRequests.delete(state.promise);\r\n });\r\n return state.promise;\r\n }\r\n}\r\nexports.Loader = Loader;\r\n"},{"id":"./src/SimpleLoadingTracker.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\SimpleLoadingTracker.ts","name":"./src/SimpleLoadingTracker.ts","index":26,"index2":22,"size":516,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./SimpleLoadingTracker","loc":"11:31-64"}],"providedExports":null,"optimizationBailout":[],"depth":4,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SimpleLoadingTracker = void 0;\r\nclass SimpleLoadingTracker {\r\n constructor() {\r\n this.set = new Set();\r\n }\r\n getKey(request) {\r\n return JSON.stringify(request);\r\n }\r\n diff(request) {\r\n return this.set.has(this.getKey(request)) ? null : request;\r\n }\r\n append(request, result) {\r\n this.set.add(this.getKey(request));\r\n }\r\n}\r\nexports.SimpleLoadingTracker = SimpleLoadingTracker;\r\n"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts","index":3,"index2":27,"size":583,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","issuerId":"./index.tsx","issuerName":"./index.tsx","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./index.tsx","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","module":"./index.tsx","moduleName":"./index.tsx","type":"cjs require","userRequest":"./src","loc":"4:26-42"}],"providedExports":null,"optimizationBailout":[],"depth":2,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nconst tslib_1 = require(\"tslib\");\r\n(0, tslib_1.__exportStar)(require(\"./types\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./Db\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./DbTable\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./DbRef\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./tempIds\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./utils\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./patchHelpers\"), exports);\r\n(0, tslib_1.__exportStar)(require(\"./reactHooks\"), exports);\r\n"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts","index":15,"index2":18,"size":8556,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./patchHelpers","loc":"5:23-48"},{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./patchHelpers","loc":"10:26-51"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.getEntityParentDependencies = exports.getParentEntities = exports.hasServerFields = exports.isNew = exports.getId = exports.isClientOnly = exports.makeCumulativePatch = exports.isPatchBlank = exports.flattenResponse = exports.mergeEntityPatches = exports.unionPatches = void 0;\r\nconst tslib_1 = require(\"tslib\");\r\nconst types_1 = require(\"./types\");\r\nconst I = (0, tslib_1.__importStar)(require(\"immutable\"));\r\nconst utils_1 = require(\"./utils\");\r\nconst lodash_groupby_1 = (0, tslib_1.__importDefault)(require(\"lodash.groupby\"));\r\nconst lodash_map_1 = (0, tslib_1.__importDefault)(require(\"lodash.map\"));\r\nconst lodash_merge_1 = (0, tslib_1.__importDefault)(require(\"lodash.merge\"));\r\nconst lodash_countby_1 = (0, tslib_1.__importDefault)(require(\"lodash.countby\"));\r\nconst lodash_filter_1 = (0, tslib_1.__importDefault)(require(\"lodash.filter\"));\r\nconst lodash_foreach_1 = (0, tslib_1.__importDefault)(require(\"lodash.foreach\"));\r\nconst lodash_pick_1 = (0, tslib_1.__importDefault)(require(\"lodash.pick\"));\r\nfunction unionPatches(patches) {\r\n const result = {};\r\n patches.forEach(patch => {\r\n (0, utils_1.objectKeys)(patch).forEach(tableName => {\r\n result[tableName] = result[tableName] ? [...result[tableName], ...patch[tableName]] : patch[tableName];\r\n });\r\n });\r\n return result;\r\n}\r\nexports.unionPatches = unionPatches;\r\nfunction mergeEntityPatches(tables, patch) {\r\n const result = {};\r\n (0, utils_1.objectKeys)(patch).forEach(key => {\r\n const table = tables[key];\r\n const groupedEntities = (0, lodash_groupby_1.default)(patch[key], item => table.getId(item));\r\n const tablePatch = (0, lodash_map_1.default)(groupedEntities, entities => {\r\n const result = (0, lodash_merge_1.default)({}, ...entities);\r\n if (process.env.NODE_ENV !== 'production') {\r\n const props = (0, utils_1.objectKeys)(result).filter(prop => Object.keys((0, lodash_countby_1.default)(entities.filter(entity => entity[prop] !== undefined), entity => entity[prop])).length > 1);\r\n if (props.length) {\r\n console.warn('mergeEntityPatches: Different property values found for the same entity.\\nProperty names:\\n', props, '\\nEntities:\\n', ...entities);\r\n }\r\n }\r\n return result;\r\n });\r\n result[key] = tablePatch;\r\n });\r\n return result;\r\n}\r\nexports.mergeEntityPatches = mergeEntityPatches;\r\nfunction flattenResponseHelper(result, object, tablesByTypeName) {\r\n if (Array.isArray(object)) {\r\n object.forEach(item => flattenResponseHelper(result, item, tablesByTypeName));\r\n }\r\n else if (typeof object === 'object') {\r\n const clone = {};\r\n let tableKey;\r\n let fields = {};\r\n if ('__typename' in object) {\r\n const table = tablesByTypeName[object.__typename];\r\n if (table) {\r\n tableKey = table.schema.tableName;\r\n fields = table.schema.fields;\r\n }\r\n }\r\n for (let key in object) {\r\n const value = object[key];\r\n const field = fields[key];\r\n if ((field && !!field.disableFlatten)\r\n || typeof value !== 'object'\r\n || value === null\r\n || (Array.isArray(value) && value.every(item => typeof item !== 'object'))) {\r\n clone[key] = value;\r\n }\r\n else {\r\n flattenResponseHelper(result, value, tablesByTypeName);\r\n }\r\n }\r\n if (tableKey) {\r\n result[tableKey].push(clone);\r\n }\r\n }\r\n}\r\nfunction flattenResponse(response, tables) {\r\n const result = {};\r\n let tablesByTypeName = {};\r\n Object.values(tables).forEach(table => tablesByTypeName[table.schema.typeName] = table);\r\n (0, utils_1.objectKeys)(tables).forEach(tableName => tablesByTypeName);\r\n (0, utils_1.objectKeys)(tables).forEach(key => result[key] = []);\r\n flattenResponseHelper(result, response, tablesByTypeName);\r\n return result;\r\n}\r\nexports.flattenResponse = flattenResponse;\r\nfunction isPatchBlank(patch) {\r\n return !(0, utils_1.objectKeys)(patch).some(key => patch[key].length > 0);\r\n}\r\nexports.isPatchBlank = isPatchBlank;\r\n/**\r\n * Given several patches, creates a new single patch with all fields from all entities in all patches.\r\n */\r\nfunction makeCumulativePatch(updatedDb, patches, clientIdsMap) {\r\n const result = {};\r\n (0, utils_1.objectKeys)(updatedDb.tables).forEach(entityName => {\r\n const table = updatedDb.tables[entityName];\r\n const schema = table.schema;\r\n let ids = I.Set();\r\n patches.forEach(patch => {\r\n let filteredPatch = (patch[entityName] || []).filter(entity => hasServerFields(entity, schema, clientIdsMap, updatedDb.tables));\r\n ids = ids.union(filteredPatch.map(e => table.getId(e)));\r\n });\r\n const entities = ids\r\n .map(id => table.byId(id))\r\n .filter(e => !isClientOnly(e, schema))\r\n .toArray();\r\n if (entities.length > 0) {\r\n result[entityName] = entities;\r\n }\r\n });\r\n return result;\r\n}\r\nexports.makeCumulativePatch = makeCumulativePatch;\r\nfunction isClientOnly(entity, schema) {\r\n if (typeof schema.isClientOnly === 'function') {\r\n return schema.isClientOnly(entity);\r\n }\r\n return !!schema.isClientOnly;\r\n}\r\nexports.isClientOnly = isClientOnly;\r\nfunction getId(entity, schema) {\r\n if (typeof schema.primaryKey == 'string') {\r\n return entity[schema.primaryKey];\r\n }\r\n const result = [];\r\n (0, lodash_foreach_1.default)((0, lodash_pick_1.default)(entity, schema.primaryKey), (value) => {\r\n result.push(value);\r\n });\r\n return result;\r\n}\r\nexports.getId = getId;\r\nfunction isNew(entity, schema, clientIdsMap) {\r\n const id = getId(entity, schema);\r\n return !clientIdsMap.clientToServer(id);\r\n}\r\nexports.isNew = isNew;\r\nfunction hasServerFields(entity, schema, clientIdsMap, tables) {\r\n const fullEntity = Object.assign(Object.assign({}, tables[schema.tableName].byId(entity.id) || {}), entity);\r\n if (isClientOnly(fullEntity, schema)) {\r\n return false;\r\n }\r\n return (0, utils_1.objectKeys)(entity).some(fieldName => {\r\n const fieldSchema = schema.fields[fieldName];\r\n return !fieldSchema || !(fieldSchema.isClientOnly || fieldSchema.isReadOnly || (fieldSchema.isGenerated && !isNew(entity, schema, clientIdsMap)));\r\n });\r\n}\r\nexports.hasServerFields = hasServerFields;\r\nfunction getParentEntities(patch, tables) {\r\n const dependenciesPatch = {};\r\n (0, utils_1.objectKeys)(patch).forEach(key => {\r\n const table = tables[key];\r\n const tableSchema = table.schema;\r\n const fields = (0, lodash_filter_1.default)((0, lodash_map_1.default)(tableSchema.fields, (field, name) => (Object.assign(Object.assign({}, field), { name }))), field => field.fk && field.fk.relationType == types_1.DbRelationType.Aggregation);\r\n const tablePatch = patch[key];\r\n fields.forEach(field => {\r\n const { fk: { tableName }, name } = field;\r\n tablePatch.forEach(entity => {\r\n const actualTableName = (typeof tableName == 'function' ? tableName(entity) : tableName);\r\n const dbEntity = table.byId(table.getId(entity));\r\n const parentEntity = tables[actualTableName].byId(dbEntity[name]);\r\n const idFields = (0, lodash_pick_1.default)(parentEntity, tables[actualTableName].schema.primaryKey);\r\n if (parentEntity) {\r\n dependenciesPatch[actualTableName] = dependenciesPatch[actualTableName] || [];\r\n dependenciesPatch[actualTableName].push(idFields);\r\n }\r\n });\r\n });\r\n });\r\n return dependenciesPatch;\r\n}\r\nexports.getParentEntities = getParentEntities;\r\nfunction getEntityParentDependencies(entity, entityName, tables) {\r\n let patch = { [entityName]: [entity] };\r\n const resultPatches = [];\r\n while (true) {\r\n let parents = getParentEntities(patch, tables);\r\n if (isPatchBlank(parents)) {\r\n break;\r\n }\r\n resultPatches.push(parents);\r\n patch = parents;\r\n }\r\n let result = unionPatches([patch, ...resultPatches]);\r\n result = mergeEntityPatches(tables, result);\r\n return result;\r\n}\r\nexports.getEntityParentDependencies = getEntityParentDependencies;\r\n"},{"id":"./src/reactHooks.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\reactHooks.ts","name":"./src/reactHooks.ts","index":28,"index2":26,"size":820,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./reactHooks","loc":"11:26-49"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.useDbView = exports.useDbRef = exports.DbContext = void 0;\r\nconst react_1 = require(\"react\");\r\nexports.DbContext = (0, react_1.createContext)(null);\r\nfunction useDbRef() {\r\n return (0, react_1.useContext)(exports.DbContext);\r\n}\r\nexports.useDbRef = useDbRef;\r\nfunction useDbView(fn, params, options) {\r\n const dbRef = useDbRef();\r\n const [state, setState] = (0, react_1.useState)();\r\n const subscription = (0, react_1.useMemo)(() => dbRef.subscribe(Object.assign({ compute: fn }, options), params, setState), []);\r\n subscription.update(params);\r\n (0, react_1.useEffect)(() => {\r\n return () => subscription.unsubscribe();\r\n }, []);\r\n return subscription.currentValue;\r\n}\r\nexports.useDbView = useDbView;\r\n"},{"id":"./src/tempIds.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\tempIds.tsx","name":"./src/tempIds.tsx","index":23,"index2":19,"size":7879,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./tempIds","loc":"6:18-38"},{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./tempIds","loc":"8:26-46"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.TempIdMap = exports.isTempId = exports.getTempId = void 0;\r\nconst utils_1 = require(\"./utils\");\r\nlet lastTempId = -1;\r\nfunction getTempId() {\r\n return --lastTempId;\r\n}\r\nexports.getTempId = getTempId;\r\nfunction isTempId(val) {\r\n return typeof val === 'number' && val < 0;\r\n}\r\nexports.isTempId = isTempId;\r\nclass TempIdMap {\r\n constructor(db) {\r\n this.db = db;\r\n this.serverToClientIds = new Map();\r\n this.clientToServerIds = new Map();\r\n this.clientToServer = (id) => this.clientToServerIds.get(id);\r\n this.serverToClient = (tableName, id) => this.getServerToClientMap(tableName).get(id);\r\n this.clientToServerRequest = (request) => {\r\n request = Object.assign({}, request);\r\n if (request.filter) {\r\n request.filter = this.clientToServerDataFilter(request.filter);\r\n }\r\n return request;\r\n };\r\n this.clientToServerDataFilter = (filter) => {\r\n filter = Object.assign({}, filter);\r\n const keys = Object.keys(filter);\r\n // I hope that we can rely that there won't be any negative numbers, which are not IDs, in queries.\r\n // We need to invent better heuristics or a schema otherwise.\r\n const clientToServer = (id) => {\r\n const found = this.clientToServer(id);\r\n if (found) {\r\n return found;\r\n }\r\n else {\r\n return id;\r\n }\r\n };\r\n for (let n = 0; n < keys.length; n++) {\r\n const key = keys[n];\r\n let condition = filter[key];\r\n if (condition != null && typeof condition === \"object\") {\r\n condition = Object.assign({}, condition);\r\n if ('in' in condition && Array.isArray(condition.in) && condition.in.length) {\r\n condition.in = condition.in.map(clientToServer);\r\n }\r\n }\r\n else {\r\n condition = clientToServer(condition);\r\n }\r\n filter[key] = condition;\r\n }\r\n return filter;\r\n };\r\n }\r\n copyPatch(patch) {\r\n const newPatch = Object.assign({}, patch);\r\n (0, utils_1.objectKeys)(patch).forEach(tableName => {\r\n let tablePatch = patch[tableName].map(entityPatch => (Object.assign({}, entityPatch)));\r\n newPatch[tableName] = tablePatch;\r\n });\r\n return newPatch;\r\n }\r\n // Iterate thru every field in every patch for every table, matching certain field criteria. The patch is mutated!\r\n mapFields(patch, filter, callback) {\r\n (0, utils_1.objectKeys)(patch).forEach(tableName => {\r\n const schema = this.db.tables[tableName].schema;\r\n const fields = (0, utils_1.objectKeys)(schema.fields || [])\r\n .map(fieldName => {\r\n const fieldSchema = schema.fields[fieldName];\r\n if (filter(fieldSchema, fieldName)) {\r\n return { name: fieldName, schema: fieldSchema };\r\n }\r\n })\r\n .filter(f => !!f);\r\n if (!fields.length) {\r\n return;\r\n }\r\n patch[tableName].forEach(entityPatch => {\r\n for (let n = 0; n < fields.length; n++) {\r\n const field = fields[n];\r\n const fieldValue = entityPatch[field.name];\r\n callback(field.name, field.schema, fieldValue, entityPatch, tableName);\r\n }\r\n });\r\n });\r\n }\r\n getServerToClientMap(tableName) {\r\n const existing = this.serverToClientIds.get(tableName);\r\n if (existing) {\r\n return existing;\r\n }\r\n else {\r\n const newMap = new Map();\r\n this.serverToClientIds.set(tableName, newMap);\r\n return newMap;\r\n }\r\n }\r\n serverToClientPatch(patch) {\r\n patch = this.copyPatch(patch);\r\n // We map PK in a separate pass, as we need to remap all PKs before re-mapping FKs\r\n this.mapFields(patch, f => f.isGenerated, (fieldName, fieldSchema, fieldValue, entityPatch, tableName) => {\r\n let clientId = this.getServerToClientMap(tableName).get(fieldValue);\r\n if (!clientId) {\r\n clientId = getTempId();\r\n this.clientToServerIds.set(clientId, fieldValue);\r\n this.getServerToClientMap(tableName).set(fieldValue, clientId);\r\n }\r\n entityPatch[fieldName] = clientId;\r\n });\r\n this.mapFields(patch, f => !!(f.fk || (f.default != null) || f.toClient), (fieldName, fieldSchema, fieldValue, entityPatch, tableName) => {\r\n let isUndefined = typeof (fieldValue) === 'undefined';\r\n if (fieldSchema.default != null && fieldValue == null) {\r\n fieldValue = fieldSchema.default;\r\n isUndefined = false;\r\n }\r\n if (fieldSchema.fk && fieldValue != null) {\r\n const fkTableName = typeof fieldSchema.fk.tableName === 'function' ? fieldSchema.fk.tableName(entityPatch) : fieldSchema.fk.tableName;\r\n let clientId = this.getServerToClientMap(fkTableName).get(fieldValue);\r\n if (!clientId) {\r\n clientId = getTempId();\r\n this.clientToServerIds.set(clientId, fieldValue);\r\n this.getServerToClientMap(fkTableName).set(fieldValue, clientId);\r\n }\r\n fieldValue = clientId;\r\n }\r\n if (!isUndefined && fieldSchema.toClient) {\r\n fieldValue = fieldSchema.toClient(fieldValue);\r\n }\r\n if (!isUndefined) {\r\n entityPatch[fieldName] = fieldValue;\r\n }\r\n });\r\n return patch;\r\n }\r\n clientToServerPatch(patch) {\r\n patch = this.copyPatch(patch);\r\n this.mapFields(patch, f => f.isGenerated || !!f.fk, (fieldName, fieldSchema, fieldValue, entityPatch, tableName) => {\r\n if (fieldValue != null) {\r\n const existingId = this.clientToServerIds.get(fieldValue);\r\n if (existingId) {\r\n entityPatch[fieldName] = existingId;\r\n }\r\n }\r\n });\r\n this.mapFields(patch, f => !(f.isClientOnly || f.isReadOnly) && !!f.toServer, (fieldName, fieldSchema, fieldValue, entityPatch, tableName) => {\r\n entityPatch[fieldName] = fieldSchema.toServer(entityPatch[fieldName]);\r\n });\r\n this.mapFields(patch, meta => meta.isClientOnly || meta.isReadOnly, (fieldName, fieldSchema, fieldValue, entityPatch, tableName) => {\r\n delete entityPatch[fieldName];\r\n });\r\n return patch;\r\n }\r\n appendServerMapping(response) {\r\n (0, utils_1.objectKeys)(response.submit).forEach(tableName => {\r\n if (this.db.tables[tableName]) {\r\n const tablePatch = response.submit[tableName];\r\n if (tablePatch) {\r\n const serverToClientIds = this.getServerToClientMap(tableName);\r\n const table = this.db.tables[tableName];\r\n tablePatch.forEach(patch => {\r\n if (isTempId(patch.id)) {\r\n const clientId = patch.id;\r\n const serverId = table.getId(patch.payload);\r\n serverToClientIds.set(serverId, clientId);\r\n this.clientToServerIds.set(clientId, serverId);\r\n }\r\n });\r\n }\r\n }\r\n });\r\n }\r\n}\r\nexports.TempIdMap = TempIdMap;\r\n"},{"id":"./src/types.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\types.ts","name":"./src/types.ts","index":4,"index2":1,"size":387,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./types","loc":"4:26-44"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"./types","loc":"5:16-34"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.DbRelationType = void 0;\r\nvar DbRelationType;\r\n(function (DbRelationType) {\r\n DbRelationType[DbRelationType[\"Aggregation\"] = 0] = \"Aggregation\";\r\n DbRelationType[DbRelationType[\"Association\"] = 1] = \"Association\";\r\n})(DbRelationType = exports.DbRelationType || (exports.DbRelationType = {}));\r\n"},{"id":"./src/utils.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","name":"./src/utils.ts","index":6,"index2":6,"size":1786,"cacheable":true,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","issuerId":"./src/index.ts","issuerName":"./src/index.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/Db.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"./utils","loc":"5:16-34"},{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"./utils","loc":"7:16-34"},{"moduleId":"./src/index.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","module":"./src/index.ts","moduleName":"./src/index.ts","type":"cjs require","userRequest":"./utils","loc":"9:26-44"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"./utils","loc":"7:16-34"},{"moduleId":"./src/tempIds.tsx","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\tempIds.tsx","module":"./src/tempIds.tsx","moduleName":"./src/tempIds.tsx","type":"cjs require","userRequest":"./utils","loc":"4:16-34"}],"providedExports":null,"optimizationBailout":[],"depth":3,"source":"\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.difference = exports.defaultCompareViewDependencies = exports.objectKeys = void 0;\r\nconst tslib_1 = require(\"tslib\");\r\nconst shallowequal_1 = (0, tslib_1.__importDefault)(require(\"shallowequal\"));\r\nconst lodash_zip_1 = (0, tslib_1.__importDefault)(require(\"lodash.zip\"));\r\nconst lodash_transform_1 = (0, tslib_1.__importDefault)(require(\"lodash.transform\"));\r\nconst lodash_isequal_1 = (0, tslib_1.__importDefault)(require(\"lodash.isequal\"));\r\n// TBD: New typescript would contain better typing for this. Remove this hack after update.\r\nexports.objectKeys = Object.keys;\r\nfunction defaultCompareViewDependencies(prev, next) {\r\n if (Array.isArray(prev) && Array.isArray(next)) {\r\n if (prev.length === next.length) {\r\n return (0, lodash_zip_1.default)(prev, next).every(([p, n]) => (0, shallowequal_1.default)(p, n));\r\n }\r\n return false;\r\n }\r\n return (0, shallowequal_1.default)(prev, next);\r\n}\r\nexports.defaultCompareViewDependencies = defaultCompareViewDependencies;\r\n/**\r\n * Deep diff between two object, using lodash\r\n * @param {Object} object Object compared\r\n * @param {Object} base Object to compare with\r\n * @return {Object} Return a new object who represent the diff\r\n */\r\nfunction difference(object, base) {\r\n function changes(object, base) {\r\n return (0, lodash_transform_1.default)(object, function (result, value, key) {\r\n if (!(0, lodash_isequal_1.default)(value, base[key])) {\r\n result[key] = (typeof value === \"object\" && typeof base[key] === \"object\") ? changes(value, base[key]) : value;\r\n }\r\n });\r\n }\r\n return changes(object, base);\r\n}\r\nexports.difference = difference;\r\n"},{"id":"@epam/uui-core","identifier":"external \"@epam/uui-core\"","name":"external \"@epam/uui-core\"","index":13,"index2":9,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"@epam/uui-core","loc":"10:19-44"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"@epam/uui-core","loc":"6:19-44"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"immutable","identifier":"external \"immutable\"","name":"external \"immutable\"","index":12,"index2":8,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbTable.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"immutable","loc":"5:36-56"},{"moduleId":"./src/DbTable.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbTable.ts","module":"./src/DbTable.ts","moduleName":"./src/DbTable.ts","type":"cjs require","userRequest":"immutable","loc":"7:20-40"},{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"immutable","loc":"6:36-56"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.countby","identifier":"external \"lodash.countby\"","name":"external \"lodash.countby\"","index":19,"index2":14,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.countby","loc":"11:54-79"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.filter","identifier":"external \"lodash.filter\"","name":"external \"lodash.filter\"","index":20,"index2":15,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.filter","loc":"12:53-77"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.foreach","identifier":"external \"lodash.foreach\"","name":"external \"lodash.foreach\"","index":21,"index2":16,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.foreach","loc":"13:54-79"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.groupby","identifier":"external \"lodash.groupby\"","name":"external \"lodash.groupby\"","index":16,"index2":11,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.groupby","loc":"8:54-79"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.isempty","identifier":"external \"lodash.isempty\"","name":"external \"lodash.isempty\"","index":24,"index2":20,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","issuerId":"./src/DbRef.ts","issuerName":"./src/DbRef.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/DbRef.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","name":"./src/DbRef.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/DbRef.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\DbRef.ts","module":"./src/DbRef.ts","moduleName":"./src/DbRef.ts","type":"cjs require","userRequest":"lodash.isempty","loc":"8:54-79"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.isequal","identifier":"external \"lodash.isequal\"","name":"external \"lodash.isequal\"","index":10,"index2":5,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Db.ts","issuerId":"./src/Db.ts","issuerName":"./src/Db.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/Db.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Db.ts","name":"./src/Db.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/Db.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\Db.ts","module":"./src/Db.ts","moduleName":"./src/Db.ts","type":"cjs require","userRequest":"lodash.isequal","loc":"6:54-79"},{"moduleId":"./src/utils.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.isequal","loc":"8:54-79"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.map","identifier":"external \"lodash.map\"","name":"external \"lodash.map\"","index":17,"index2":12,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.map","loc":"9:50-71"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.merge","identifier":"external \"lodash.merge\"","name":"external \"lodash.merge\"","index":18,"index2":13,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.merge","loc":"10:52-75"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.pick","identifier":"external \"lodash.pick\"","name":"external \"lodash.pick\"","index":22,"index2":17,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","issuerId":"./src/patchHelpers.ts","issuerName":"./src/patchHelpers.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/patchHelpers.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","name":"./src/patchHelpers.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/patchHelpers.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\patchHelpers.ts","module":"./src/patchHelpers.ts","moduleName":"./src/patchHelpers.ts","type":"cjs require","userRequest":"lodash.pick","loc":"14:51-73"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.transform","identifier":"external \"lodash.transform\"","name":"external \"lodash.transform\"","index":9,"index2":4,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.transform","loc":"7:56-83"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"lodash.zip","identifier":"external \"lodash.zip\"","name":"external \"lodash.zip\"","index":8,"index2":3,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"lodash.zip","loc":"6:50-71"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"react","identifier":"external \"react\"","name":"external \"react\"","index":29,"index2":25,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\reactHooks.ts","issuerId":"./src/reactHooks.ts","issuerName":"./src/reactHooks.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/reactHooks.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\reactHooks.ts","name":"./src/reactHooks.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/reactHooks.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\reactHooks.ts","module":"./src/reactHooks.ts","moduleName":"./src/reactHooks.ts","type":"cjs require","userRequest":"react","loc":"4:16-32"}],"providedExports":null,"optimizationBailout":[],"depth":4},{"id":"shallowequal","identifier":"external \"shallowequal\"","name":"external \"shallowequal\"","index":7,"index2":2,"size":42,"built":true,"optional":false,"prefetched":false,"chunks":["main"],"issuer":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","issuerId":"./src/utils.ts","issuerName":"./src/utils.ts","issuerPath":[{"id":0,"identifier":"multi D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"multi ./index.tsx"},{"id":"./index.tsx","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\index.tsx","name":"./index.tsx"},{"id":"./src/index.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\index.ts","name":"./src/index.ts"},{"id":"./src/utils.ts","identifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","name":"./src/utils.ts"}],"failed":false,"errors":0,"warnings":0,"assets":[],"reasons":[{"moduleId":"./src/utils.ts","moduleIdentifier":"D:\\dev\\UUI-main\\node_modules\\ts-loader\\index.js??ref--5-oneOf-0-0!D:\\dev\\UUI-main\\uui-db\\src\\utils.ts","module":"./src/utils.ts","moduleName":"./src/utils.ts","type":"cjs require","userRequest":"shallowequal","loc":"5:52-75"}],"providedExports":null,"optimizationBailout":[],"depth":4}],"filteredModules":0,"logging":{"webpack.buildChunkGraph.visitModules":{"entries":[],"filteredEntries":2,"debug":false}},"children":[]}
|