Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/d7/2715951480ad7d878274eca21a3a66cf73494ca1b142db0a3ab9d3be50ecf15c921cbb
T
2025-10-24 02:46:57 +00:00

1 line
6.3 KiB
Plaintext

{"dependencies":[{"name":"./Enum.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":33,"index":33}}],"key":"MsX7lmxjG+p8xwqSu4VH8sjWjY0=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n Object.defineProperty(exports, \"Result\", {\n enumerable: true,\n get: function () {\n return Result;\n }\n });\n var _EnumJs = require(_dependencyMap[0], \"./Enum.js\");\n /**\n * @name Result\n * @description\n * A Result maps to the Rust Result type, that can either wrap a success or error value\n */\n class Result extends _EnumJs.Enum {\n constructor(registry, Ok, Err, value) {\n // NOTE This is order-dependent, Ok (with index 0) needs to be first\n // eslint-disable-next-line sort-keys\n super(registry, {\n Ok,\n Err\n }, value);\n }\n static with(Types) {\n return class extends Result {\n constructor(registry, value) {\n super(registry, Types.Ok, Types.Err, value);\n }\n };\n }\n /**\n * @description Returns the wrapper Err value (if isErr)\n */\n get asErr() {\n if (!this.isErr) {\n throw new Error('Cannot extract Err value from Ok result, check isErr first');\n }\n return this.value;\n }\n /**\n * @description Returns the wrapper Ok value (if isOk)\n */\n get asOk() {\n if (!this.isOk) {\n throw new Error('Cannot extract Ok value from Err result, check isOk first');\n }\n return this.value;\n }\n /**\n * @description Checks if the Result has no value\n */\n get isEmpty() {\n return this.isOk && this.value.isEmpty;\n }\n /**\n * @description Checks if the Result wraps an Err value\n */\n get isErr() {\n return !this.isOk;\n }\n /**\n * @description Checks if the Result wraps an Ok value\n */\n get isOk() {\n return this.index === 0;\n }\n /**\n * @description Returns the base runtime type name for this instance\n */\n toRawType() {\n const Types = this._toRawStruct();\n return `Result<${Types.Ok},${Types.Err}>`;\n }\n }\n});","lineCount":79,"map":[[7,2,7,0,"Object"],[7,8,7,0],[7,9,7,0,"defineProperty"],[7,23,7,0],[7,24,7,0,"exports"],[7,31,7,0],[8,4,7,0,"enumerable"],[8,14,7,0],[9,4,7,0,"get"],[9,7,7,0],[9,18,7,0,"get"],[9,19,7,0],[10,6,7,0],[10,13,7,0,"Result"],[10,19,7,0],[11,4,7,0],[12,2,7,0],[13,2,1,0],[13,6,1,0,"_EnumJs"],[13,13,1,0],[13,16,1,0,"require"],[13,23,1,0],[13,24,1,0,"_dependencyMap"],[13,38,1,0],[14,2,2,0],[15,0,3,0],[16,0,4,0],[17,0,5,0],[18,0,6,0],[19,2,7,7],[19,8,7,13,"Result"],[19,14,7,19],[19,23,7,28,"Enum"],[19,30,7,32],[19,31,7,32,"Enum"],[19,35,7,32],[19,36,7,33],[20,4,8,4,"constructor"],[20,15,8,15,"constructor"],[20,16,8,16,"registry"],[20,24,8,24],[20,26,8,26,"Ok"],[20,28,8,28],[20,30,8,30,"Err"],[20,33,8,33],[20,35,8,35,"value"],[20,40,8,40],[20,42,8,42],[21,6,9,8],[22,6,10,8],[23,6,11,8],[23,11,11,13],[23,12,11,14,"registry"],[23,20,11,22],[23,22,11,24],[24,8,11,26,"Ok"],[24,10,11,28],[25,8,11,30,"Err"],[26,6,11,34],[26,7,11,35],[26,9,11,37,"value"],[26,14,11,42],[26,15,11,43],[27,4,12,4],[28,4,13,4],[28,11,13,11,"with"],[28,15,13,15,"with"],[28,16,13,16,"Types"],[28,21,13,21],[28,23,13,23],[29,6,14,8],[29,13,14,15],[29,27,14,29,"Result"],[29,33,14,35],[29,34,14,36],[30,8,15,12,"constructor"],[30,19,15,23,"constructor"],[30,20,15,24,"registry"],[30,28,15,32],[30,30,15,34,"value"],[30,35,15,39],[30,37,15,41],[31,10,16,16],[31,15,16,21],[31,16,16,22,"registry"],[31,24,16,30],[31,26,16,32,"Types"],[31,31,16,37],[31,32,16,38,"Ok"],[31,34,16,40],[31,36,16,42,"Types"],[31,41,16,47],[31,42,16,48,"Err"],[31,45,16,51],[31,47,16,53,"value"],[31,52,16,58],[31,53,16,59],[32,8,17,12],[33,6,18,8],[33,7,18,9],[34,4,19,4],[35,4,20,4],[36,0,21,0],[37,0,22,0],[38,4,23,4],[38,8,23,8,"asErr"],[38,13,23,13,"asErr"],[38,14,23,13],[38,16,23,16],[39,6,24,8],[39,10,24,12],[39,11,24,13],[39,15,24,17],[39,16,24,18,"isErr"],[39,21,24,23],[39,23,24,25],[40,8,25,12],[40,14,25,18],[40,18,25,22,"Error"],[40,23,25,27],[40,24,25,28],[40,84,25,88],[40,85,25,89],[41,6,26,8],[42,6,27,8],[42,13,27,15],[42,17,27,19],[42,18,27,20,"value"],[42,23,27,25],[43,4,28,4],[44,4,29,4],[45,0,30,0],[46,0,31,0],[47,4,32,4],[47,8,32,8,"asOk"],[47,12,32,12,"asOk"],[47,13,32,12],[47,15,32,15],[48,6,33,8],[48,10,33,12],[48,11,33,13],[48,15,33,17],[48,16,33,18,"isOk"],[48,20,33,22],[48,22,33,24],[49,8,34,12],[49,14,34,18],[49,18,34,22,"Error"],[49,23,34,27],[49,24,34,28],[49,83,34,87],[49,84,34,88],[50,6,35,8],[51,6,36,8],[51,13,36,15],[51,17,36,19],[51,18,36,20,"value"],[51,23,36,25],[52,4,37,4],[53,4,38,4],[54,0,39,0],[55,0,40,0],[56,4,41,4],[56,8,41,8,"isEmpty"],[56,15,41,15,"isEmpty"],[56,16,41,15],[56,18,41,18],[57,6,42,8],[57,13,42,15],[57,17,42,19],[57,18,42,20,"isOk"],[57,22,42,24],[57,26,42,28],[57,30,42,32],[57,31,42,33,"value"],[57,36,42,38],[57,37,42,39,"isEmpty"],[57,44,42,46],[58,4,43,4],[59,4,44,4],[60,0,45,0],[61,0,46,0],[62,4,47,4],[62,8,47,8,"isErr"],[62,13,47,13,"isErr"],[62,14,47,13],[62,16,47,16],[63,6,48,8],[63,13,48,15],[63,14,48,16],[63,18,48,20],[63,19,48,21,"isOk"],[63,23,48,25],[64,4,49,4],[65,4,50,4],[66,0,51,0],[67,0,52,0],[68,4,53,4],[68,8,53,8,"isOk"],[68,12,53,12,"isOk"],[68,13,53,12],[68,15,53,15],[69,6,54,8],[69,13,54,15],[69,17,54,19],[69,18,54,20,"index"],[69,23,54,25],[69,28,54,30],[69,29,54,31],[70,4,55,4],[71,4,56,4],[72,0,57,0],[73,0,58,0],[74,4,59,4,"toRawType"],[74,13,59,13,"toRawType"],[74,14,59,13],[74,16,59,16],[75,6,60,8],[75,12,60,14,"Types"],[75,17,60,19],[75,20,60,22],[75,24,60,26],[75,25,60,27,"_toRawStruct"],[75,37,60,39],[75,38,60,40],[75,39,60,41],[76,6,61,8],[76,13,61,15],[76,23,61,25,"Types"],[76,28,61,30],[76,29,61,31,"Ok"],[76,31,61,33],[76,35,61,37,"Types"],[76,40,61,42],[76,41,61,43,"Err"],[76,44,61,46],[76,47,61,49],[77,4,62,4],[78,2,63,0],[79,0,63,1],[79,3]],"functionMap":{"names":["<global>","Result","constructor","_with","<anonymous>","get__asErr","get__asOk","get__isEmpty","get__isErr","get__isOk","toRawType"],"mappings":"AAA;OCM;ICC;KDI;IEC;eCC;YFC;aEE;SDC;KFC;III;KJK;IKI;KLK;IMI;KNE;IOI;KPE;IQI;KRE;ISI;KTG;CDC"},"hasCjsExports":false},"type":"js/module"}]}