@mchp-mcc/dspic33a-flash 1.0.2 → 1.0.3

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.
@@ -1,4380 +1,2 @@
1
- var autoProcessor =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId]) {
11
- /******/ return installedModules[moduleId].exports;
12
- /******/ }
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ i: moduleId,
16
- /******/ l: false,
17
- /******/ exports: {}
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.l = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // define getter function for harmony exports
38
- /******/ __webpack_require__.d = function(exports, name, getter) {
39
- /******/ if(!__webpack_require__.o(exports, name)) {
40
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
41
- /******/ }
42
- /******/ };
43
- /******/
44
- /******/ // define __esModule on exports
45
- /******/ __webpack_require__.r = function(exports) {
46
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
47
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
48
- /******/ }
49
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
50
- /******/ };
51
- /******/
52
- /******/ // create a fake namespace object
53
- /******/ // mode & 1: value is a module id, require it
54
- /******/ // mode & 2: merge all properties of value into the ns
55
- /******/ // mode & 4: return value when already ns object
56
- /******/ // mode & 8|1: behave like require
57
- /******/ __webpack_require__.t = function(value, mode) {
58
- /******/ if(mode & 1) value = __webpack_require__(value);
59
- /******/ if(mode & 8) return value;
60
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
61
- /******/ var ns = Object.create(null);
62
- /******/ __webpack_require__.r(ns);
63
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
64
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
65
- /******/ return ns;
66
- /******/ };
67
- /******/
68
- /******/ // getDefaultExport function for compatibility with non-harmony modules
69
- /******/ __webpack_require__.n = function(module) {
70
- /******/ var getter = module && module.__esModule ?
71
- /******/ function getDefault() { return module['default']; } :
72
- /******/ function getModuleExports() { return module; };
73
- /******/ __webpack_require__.d(getter, 'a', getter);
74
- /******/ return getter;
75
- /******/ };
76
- /******/
77
- /******/ // Object.prototype.hasOwnProperty.call
78
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
79
- /******/
80
- /******/ // __webpack_public_path__
81
- /******/ __webpack_require__.p = "";
82
- /******/
83
- /******/
84
- /******/ // Load entry module and return exports
85
- /******/ return __webpack_require__(__webpack_require__.s = "./generated_module/src/autoProcessor.ts");
86
- /******/ })
87
- /************************************************************************/
88
- /******/ ({
89
-
90
- /***/ "./generated_module/src/autoProcessor.ts":
91
- /*!***********************************************!*\
92
- !*** ./generated_module/src/autoProcessor.ts ***!
93
- \***********************************************/
94
- /*! exports provided: getDerivedData */
95
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
96
-
97
- "use strict";
98
- __webpack_require__.r(__webpack_exports__);
99
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDerivedData", function() { return getDerivedData; });
100
- /* harmony import */ var _getUserData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getUserData */ "./generated_module/src/getUserData.ts");
101
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
102
-
103
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
104
-
105
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
106
-
107
-
108
-
109
- function createAutoProcessor(getDerivedData) {
110
- var derivedDataGetter = function derivedDataGetter(dataModel) {
111
- return _objectSpread({
112
- getModuleConfig: _getUserData__WEBPACK_IMPORTED_MODULE_0__["getModuleConfigFromFile"]
113
- }, getDerivedData(dataModel));
114
- };
115
-
116
- return derivedDataGetter;
117
- }
118
-
119
- var getDerivedData = createAutoProcessor(_getUserData__WEBPACK_IMPORTED_MODULE_0__["getDerivedData"]);
120
-
121
- /***/ }),
122
-
123
- /***/ "./generated_module/src/getUserData.ts":
124
- /*!*********************************************!*\
125
- !*** ./generated_module/src/getUserData.ts ***!
126
- \*********************************************/
127
- /*! exports provided: getCreatorFunctions, getDerivedData, getPinsDataFromFile, getPinsLogicFromFile, getModuleConfigFromFile */
128
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
129
-
130
- "use strict";
131
- __webpack_require__.r(__webpack_exports__);
132
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsDataFromFile", function() { return getPinsDataFromFile; });
133
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsLogicFromFile", function() { return getPinsLogicFromFile; });
134
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getModuleConfigFromFile", function() { return getModuleConfigFromFile; });
135
- /* harmony import */ var _src_CreatorFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../src/CreatorFunctions */ "./src/CreatorFunctions.ts");
136
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getCreatorFunctions", function() { return _src_CreatorFunctions__WEBPACK_IMPORTED_MODULE_0__["getCreatorFunctions"]; });
137
-
138
- /* harmony import */ var _src_DerivedData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../src/DerivedData */ "./src/DerivedData.ts");
139
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDerivedData", function() { return _src_DerivedData__WEBPACK_IMPORTED_MODULE_1__["getDerivedData"]; });
140
-
141
-
142
-
143
- var getPinsDataFromFile = function getPinsDataFromFile() {
144
- try {
145
- return __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module '../../src/pinsdata.json'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
146
- } catch (_unused) {
147
- return undefined;
148
- }
149
- };
150
- var getPinsLogicFromFile = function getPinsLogicFromFile() {
151
- try {
152
- return __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module '../../src/PinsLogic.ts'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
153
- } catch (_unused2) {
154
- return undefined;
155
- }
156
- };
157
- var getModuleConfigFromFile = function getModuleConfigFromFile() {
158
- try {
159
- return __webpack_require__(/*! ../../src/moduleConfig.json */ "./src/moduleConfig.json");
160
- } catch (_unused3) {
161
- return undefined;
162
- }
163
- };
164
-
165
- /***/ }),
166
-
167
- /***/ "./node_modules/@microchip/flash-interface/lib/package.json":
168
- /*!******************************************************************!*\
169
- !*** ./node_modules/@microchip/flash-interface/lib/package.json ***!
170
- \******************************************************************/
171
- /*! exports provided: name, version, license, main, typings, scripts, husky, lint-staged, bitBucketRepository, repository, publishConfig, jest, dependencies, devDependencies, files, notificationEmail, default */
172
- /***/ (function(module) {
173
-
174
- module.exports = JSON.parse("{\"name\":\"@microchip/flash-interface\",\"version\":\"1.3.1\",\"license\":\"SEE LICENSE IN LICENSE.txt\",\"main\":\"lib/src/index.js\",\"typings\":\"./lib/src/index.d.ts\",\"scripts\":{\"build\":\"tsc\",\"test\":\"jest\",\"lint:nofix\":\"eslint \\\"./src/**/*.{ts,tsx}\\\" --quiet\",\"lint\":\"tsc --noEmit && yarn lint:nofix --fix\"},\"husky\":{\"hooks\":{\"pre-commit\":\"tsc --noEmit && lint-staged\"}},\"lint-staged\":{\"./src/**/*.{ts,tsx}\":[\"eslint --fix\"]},\"bitBucketRepository\":\"https://bitbucket.microchip.com/projects/CC16SCRIP/repos/basic-flash-interface/browse\",\"repository\":{\"type\":\"git\",\"url\":\"git+ssh://git@https://bitbucket.microchip.com/scm/cc16scrip/basic-flash-interface.git\"},\"publishConfig\":{\"registry\":\"https://artifacts.microchip.com/artifactory/api/npm/npm/\"},\"jest\":{\"testPathIgnorePatterns\":[\"/node_modules/\",\"/run/\",\"/lib/\"],\"modulePathIgnorePatterns\":[\"<rootDir>/run\"],\"preset\":\"ts-jest\",\"collectCoverage\":true},\"dependencies\":{\"@microchip/scf-common\":\"^3.5.0\",\"@microchip/scf-interface\":\"^1.4.0\"},\"devDependencies\":{\"@types/jest\":\"^24.0.14\",\"@types/node\":\"^12.0.10\",\"@typescript-eslint/eslint-plugin\":\"^2.27.0\",\"@typescript-eslint/parser\":\"^2.27.0\",\"eslint\":\"^6.8.0\",\"eslint-config-prettier\":\"^6.10.1\",\"eslint-plugin-prettier\":\"^3.1.2\",\"fs-extra\":\"^8.1.0\",\"husky\":\"^4.2.4\",\"jest\":\"^24.8.0\",\"lint-staged\":\"^10.2.0\",\"prettier\":\"^2.0.4\",\"ts-jest\":\"^24.0.2\",\"typescript\":\"^3.8.3\"},\"files\":[\"lib/**/*\"],\"notificationEmail\":\"03234d44.microchip.com@amer.teams.ms\"}");
175
-
176
- /***/ }),
177
-
178
- /***/ "./node_modules/@microchip/flash-interface/lib/src/flash-basic.js":
179
- /*!************************************************************************!*\
180
- !*** ./node_modules/@microchip/flash-interface/lib/src/flash-basic.js ***!
181
- \************************************************************************/
182
- /*! no static exports found */
183
- /***/ (function(module, exports, __webpack_require__) {
184
-
185
- "use strict";
186
-
187
- var __importStar = (this && this.__importStar) || function (mod) {
188
- if (mod && mod.__esModule) return mod;
189
- var result = {};
190
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
191
- result["default"] = mod;
192
- return result;
193
- };
194
- Object.defineProperty(exports, "__esModule", { value: true });
195
- var InterfaceTypes = __importStar(__webpack_require__(/*! @microchip/scf-interface */ "./node_modules/@microchip/scf-interface/lib/index.js"));
196
- var pkgJson = __importStar(__webpack_require__(/*! ../package.json */ "./node_modules/@microchip/flash-interface/lib/package.json"));
197
- exports.getInterfaceId = function () {
198
- return {
199
- name: InterfaceTypes.getInterfaceName(pkgJson),
200
- version: InterfaceTypes.getInterfaceVersion(pkgJson),
201
- };
202
- };
203
- var createMock = function () {
204
- return {
205
- interfaceId: exports.getInterfaceId(),
206
- payload: {
207
- interfaceApi: exports.Interface.createFirmwareApi("flash-interface", [
208
- { name: "BasicFlash.h", path: "flash/" },
209
- ]),
210
- flashWriteInstructionCount: 2,
211
- flashInterface: "FLASH_NON_TRANSPARENT_DOUBLE_WORD_v1.0",
212
- flashWordWriteSizeInInstructions: 2,
213
- flashEraseInstructionCount: 1024,
214
- flashHasAuxiliary: 0,
215
- flashEnduranceMinimum: 10000,
216
- flashBytesPerInstruction: 3,
217
- flashPcUnitsPerInstruction: 2,
218
- flashWordWriteOpCode: 16385,
219
- flashOpCodeMask: 16399,
220
- flashErasePageSizeInInstructions: 1024,
221
- flashErasePageOpCode: 16387,
222
- flashHasEcc: 1,
223
- flashHasRowProgramming: 1,
224
- flashWriteRowSizeInInstructions: 128,
225
- flashWriteRowOpCode: 16386,
226
- flashLatchIsMemoryMapped: 1,
227
- flashLatchIsTransparent: 0,
228
- flashLatchIsBusMastered: 0,
229
- flashEndAddress: 704256,
230
- flashProgramBeginAddress: 256,
231
- flashUnlockKey: "0x00AA0055",
232
- flashHasDualPartition: true,
233
- flashBootMode: "SINGLE",
234
- flashFirstPartitionEndAddress: 44800,
235
- flashSecondPartitionBeginAddress: 4194304,
236
- flashSecondPartitionProgramBeginAddress: 4194816,
237
- flashSecondPartitionEndAddress: 4239104,
238
- },
239
- args: {
240
- requestId: {
241
- flashWriteInstructionCount: 2,
242
- },
243
- },
244
- };
245
- };
246
- exports.createApi = function (prefix) {
247
- return {
248
- PageErase: {
249
- name: prefix + "_PageErase",
250
- returns: prefix + "_RETURN_STATUS",
251
- arguments: [
252
- {
253
- name: "flashAddress",
254
- type: "flash_adr_t",
255
- },
256
- {
257
- name: "unlockKey",
258
- type: "flash_key_t",
259
- },
260
- ],
261
- },
262
- WordWrite: {
263
- name: prefix + "_WordWrite",
264
- returns: prefix + "_RETURN_STATUS",
265
- arguments: [
266
- {
267
- name: "flashAddress",
268
- type: "flash_adr_t",
269
- },
270
- {
271
- name: "flash_data_t *",
272
- type: "data",
273
- },
274
- {
275
- name: "unlockKey",
276
- type: "flash_key_t",
277
- },
278
- ],
279
- },
280
- RowWrite: {
281
- name: prefix + "_RowWrite",
282
- returns: prefix + "_RETURN_STATUS",
283
- arguments: [
284
- {
285
- name: "flashAddress",
286
- type: "flash_adr_t",
287
- },
288
- {
289
- name: "flash_data_t *",
290
- type: "data",
291
- },
292
- {
293
- name: "unlockKey",
294
- type: "flash_key_t",
295
- },
296
- ],
297
- },
298
- Read: {
299
- name: prefix + "_Read",
300
- returns: prefix + "_RETURN_STATUS",
301
- arguments: [
302
- {
303
- name: "flashAddress",
304
- type: "flash_adr_t",
305
- },
306
- {
307
- name: "count",
308
- type: "uint32_t",
309
- },
310
- {
311
- name: "flash_data_t *",
312
- type: "data",
313
- },
314
- ],
315
- },
316
- ErasePageOffsetGet: {
317
- name: prefix + "_ErasePageOffsetGet",
318
- returns: "uint32_t",
319
- arguments: [
320
- {
321
- name: "flashAddress",
322
- type: "flash_adr_t",
323
- },
324
- ],
325
- },
326
- ErasePageAddressGet: {
327
- name: prefix + "_ErasePageAddressGet",
328
- returns: "uint32_t",
329
- arguments: [
330
- {
331
- name: "flashAddress",
332
- type: "flash_adr_t",
333
- },
334
- ],
335
- },
336
- Initialize: {
337
- name: prefix + "_Initialize",
338
- returns: "void",
339
- arguments: [],
340
- },
341
- NonBlockingPageErase: {
342
- name: prefix + "_NonBlockingPageErase",
343
- returns: prefix + "_RETURN_STATUS",
344
- arguments: [
345
- {
346
- name: "flashAddress",
347
- type: "flash_adr_t",
348
- },
349
- {
350
- name: "unlockKey",
351
- type: "flash_key_t",
352
- },
353
- {
354
- name: "callbackHandler",
355
- type: "FLASH_CALLBACK",
356
- },
357
- {
358
- name: "context",
359
- type: "void*",
360
- },
361
- ],
362
- },
363
- NonBlockingBulkErase: {
364
- name: prefix + "_NonBlockingBulkErase",
365
- returns: prefix + "_RETURN_STATUS",
366
- arguments: [
367
- {
368
- name: "panel",
369
- type: "enum FLASH_PANEL",
370
- },
371
- {
372
- name: "unlockKey",
373
- type: "flash_key_t",
374
- },
375
- {
376
- name: "callbackHandler",
377
- type: "FLASH_CALLBACK",
378
- },
379
- {
380
- name: "context",
381
- type: "void*",
382
- },
383
- ],
384
- },
385
- NonBlockingWordWrite: {
386
- name: prefix + "_NonBlockingWordWrite",
387
- returns: prefix + "_RETURN_STATUS",
388
- arguments: [
389
- {
390
- name: "flashAddress",
391
- type: "flash_adr_t",
392
- },
393
- {
394
- name: "flash_data_t *",
395
- type: "data",
396
- },
397
- {
398
- name: "unlockKey",
399
- type: "flash_key_t",
400
- },
401
- {
402
- name: "callbackHandler",
403
- type: "FLASH_CALLBACK",
404
- },
405
- {
406
- name: "context",
407
- type: "void*",
408
- },
409
- ],
410
- },
411
- NonBlockingRowWrite: {
412
- name: prefix + "_NonBlockingRowWrite",
413
- returns: prefix + "_RETURN_STATUS",
414
- arguments: [
415
- {
416
- name: "flashAddress",
417
- type: "flash_adr_t",
418
- },
419
- {
420
- name: "flash_data_t *",
421
- type: "data",
422
- },
423
- {
424
- name: "unlockKey",
425
- type: "flash_key_t",
426
- },
427
- {
428
- name: "callbackHandler",
429
- type: "FLASH_CALLBACK",
430
- },
431
- {
432
- name: "context",
433
- type: "void*",
434
- },
435
- ],
436
- },
437
- NonBlockingRead: {
438
- name: prefix + "_NonBlockingRead",
439
- returns: prefix + "_RETURN_STATUS",
440
- arguments: [
441
- {
442
- name: "flashAddress",
443
- type: "flash_adr_t",
444
- },
445
- {
446
- name: "count",
447
- type: "uint32_t",
448
- },
449
- {
450
- name: "flash_data_t *",
451
- type: "data",
452
- },
453
- ],
454
- },
455
- NonBlockingPolledPageErase: {
456
- name: prefix + "_NonBlockingPolledPageErase",
457
- returns: prefix + "_RETURN_STATUS",
458
- arguments: [
459
- {
460
- name: "flashAddress",
461
- type: "flash_adr_t",
462
- },
463
- {
464
- name: "unlockKey",
465
- type: "flash_key_t",
466
- },
467
- ],
468
- },
469
- NonBlockingPolledBulkErase: {
470
- name: prefix + "_NonBlockingBulkErase",
471
- returns: prefix + "_RETURN_STATUS",
472
- arguments: [
473
- {
474
- name: "panel",
475
- type: "enum FLASH_PANEL",
476
- },
477
- {
478
- name: "unlockKey",
479
- type: "flash_key_t",
480
- },
481
- ],
482
- },
483
- NonBlockingPolledWordWrite: {
484
- name: prefix + "_NonBlockingPolledWordWrite",
485
- returns: prefix + "_RETURN_STATUS",
486
- arguments: [
487
- {
488
- name: "flashAddress",
489
- type: "flash_adr_t",
490
- },
491
- {
492
- name: "flash_data_t *",
493
- type: "data",
494
- },
495
- {
496
- name: "unlockKey",
497
- type: "flash_key_t",
498
- },
499
- ],
500
- },
501
- NonBlockingPolledRowWrite: {
502
- name: prefix + "_NonBlockingPolledRowWrite",
503
- returns: prefix + "_RETURN_STATUS",
504
- arguments: [
505
- {
506
- name: "flashAddress",
507
- type: "flash_adr_t",
508
- },
509
- {
510
- name: "flash_data_t *",
511
- type: "data",
512
- },
513
- {
514
- name: "unlockKey",
515
- type: "flash_key_t",
516
- },
517
- ],
518
- },
519
- NonBlockingPolledRead: {
520
- name: prefix + "_NonBlockingPolledRead",
521
- returns: prefix + "_RETURN_STATUS",
522
- arguments: [
523
- {
524
- name: "flashAddress",
525
- type: "flash_adr_t",
526
- },
527
- {
528
- name: "count",
529
- type: "uint32_t",
530
- },
531
- {
532
- name: "flash_data_t *",
533
- type: "data",
534
- },
535
- ],
536
- },
537
- operationStatusGet: {
538
- name: prefix + "_OperationStatusGet",
539
- returns: prefix + "_RETURN_STATUS",
540
- arguments: [],
541
- },
542
- };
543
- };
544
- var createPrototypeImport = function () {
545
- return {
546
- interfaceId: exports.getInterfaceId(),
547
- };
548
- };
549
- var createPrototypeExport = function () {
550
- return {
551
- interfaces: [{ interfaceId: exports.getInterfaceId() }],
552
- };
553
- };
554
- exports.createFirmwareApi = function (moduleName, headerFiles, createCustomApi) {
555
- var prefix = moduleName ? moduleName.toUpperCase() : "undefined";
556
- var api = createCustomApi ? createCustomApi() : exports.createApi(prefix);
557
- return {
558
- api: api,
559
- simpleApi: InterfaceTypes.buildSimpleApi(api),
560
- headerFiles: headerFiles
561
- ? headerFiles
562
- : [{ name: prefix.toLowerCase() + ".h", path: "flash/" }],
563
- };
564
- };
565
- exports.Interface = {
566
- createPrototypeExport: createPrototypeExport,
567
- createPrototypeImport: createPrototypeImport,
568
- getInterfaceId: exports.getInterfaceId,
569
- createMock: createMock,
570
- createFirmwareApi: exports.createFirmwareApi,
571
- };
572
- //# sourceMappingURL=flash-basic.js.map
573
-
574
- /***/ }),
575
-
576
- /***/ "./node_modules/@microchip/flash-interface/lib/src/index.js":
577
- /*!******************************************************************!*\
578
- !*** ./node_modules/@microchip/flash-interface/lib/src/index.js ***!
579
- \******************************************************************/
580
- /*! no static exports found */
581
- /***/ (function(module, exports, __webpack_require__) {
582
-
583
- "use strict";
584
-
585
- Object.defineProperty(exports, "__esModule", { value: true });
586
- var flash_basic_1 = __webpack_require__(/*! ./flash-basic */ "./node_modules/@microchip/flash-interface/lib/src/flash-basic.js");
587
- exports.Interface = flash_basic_1.Interface;
588
- //# sourceMappingURL=index.js.map
589
-
590
- /***/ }),
591
-
592
- /***/ "./node_modules/@microchip/scf-interface/lib/c-function-types.js":
593
- /*!***********************************************************************!*\
594
- !*** ./node_modules/@microchip/scf-interface/lib/c-function-types.js ***!
595
- \***********************************************************************/
596
- /*! no static exports found */
597
- /***/ (function(module, exports, __webpack_require__) {
598
-
599
- "use strict";
600
-
601
- Object.defineProperty(exports, "__esModule", { value: true });
602
- exports.buildSimpleApi = function (functions) {
603
- var api = {};
604
- for (var key in functions) {
605
- api[key] = buildFunction(functions[key]);
606
- }
607
- return api;
608
- };
609
- var buildFunction = function (cFunction) {
610
- return cFunction.returns + " " + cFunction.name + "(" + buildArguments(cFunction.arguments) + ")";
611
- };
612
- var buildArguments = function (args) {
613
- if (args) {
614
- return args.map(function (arg) { return arg.type + " " + arg.name; }).join(", ");
615
- }
616
- else {
617
- return "void";
618
- }
619
- };
620
-
621
-
622
- /***/ }),
623
-
624
- /***/ "./node_modules/@microchip/scf-interface/lib/helpers.js":
625
- /*!**************************************************************!*\
626
- !*** ./node_modules/@microchip/scf-interface/lib/helpers.js ***!
627
- \**************************************************************/
628
- /*! no static exports found */
629
- /***/ (function(module, exports, __webpack_require__) {
630
-
631
- "use strict";
632
-
633
- Object.defineProperty(exports, "__esModule", { value: true });
634
- exports.getInterfaceName = function (pkgJson) {
635
- var strReplace = "@microchip/";
636
- var interfaceName;
637
- if (pkgJson) {
638
- interfaceName = pkgJson["name"];
639
- if (interfaceName) {
640
- interfaceName = interfaceName.replace(strReplace, "");
641
- }
642
- }
643
- if (!interfaceName) {
644
- throw new Error("Invalid Interface Name...!");
645
- }
646
- return interfaceName;
647
- };
648
- exports.getInterfaceVersion = function (pkgJson) {
649
- var versionRegex = new RegExp("\\d+.\\d+.\\d+");
650
- var version;
651
- if (pkgJson) {
652
- version = pkgJson["version"];
653
- }
654
- if (!version && !versionRegex.test(version)) {
655
- throw new Error("Invalid Interface Version...!");
656
- }
657
- return version;
658
- };
659
-
660
-
661
- /***/ }),
662
-
663
- /***/ "./node_modules/@microchip/scf-interface/lib/index.js":
664
- /*!************************************************************!*\
665
- !*** ./node_modules/@microchip/scf-interface/lib/index.js ***!
666
- \************************************************************/
667
- /*! no static exports found */
668
- /***/ (function(module, exports, __webpack_require__) {
669
-
670
- "use strict";
671
-
672
- Object.defineProperty(exports, "__esModule", { value: true });
673
- var c_function_types_1 = __webpack_require__(/*! ./c-function-types */ "./node_modules/@microchip/scf-interface/lib/c-function-types.js");
674
- exports.buildSimpleApi = c_function_types_1.buildSimpleApi;
675
- var helpers_1 = __webpack_require__(/*! ./helpers */ "./node_modules/@microchip/scf-interface/lib/helpers.js");
676
- exports.getInterfaceName = helpers_1.getInterfaceName;
677
- exports.getInterfaceVersion = helpers_1.getInterfaceVersion;
678
-
679
-
680
- /***/ }),
681
-
682
- /***/ "./node_modules/lodash.find/index.js":
683
- /*!*******************************************!*\
684
- !*** ./node_modules/lodash.find/index.js ***!
685
- \*******************************************/
686
- /*! no static exports found */
687
- /***/ (function(module, exports, __webpack_require__) {
688
-
689
- /* WEBPACK VAR INJECTION */(function(global, module) {/**
690
- * lodash (Custom Build) <https://lodash.com/>
691
- * Build: `lodash modularize exports="npm" -o ./`
692
- * Copyright jQuery Foundation and other contributors <https://jquery.org/>
693
- * Released under MIT license <https://lodash.com/license>
694
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
695
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
696
- */
697
-
698
- /** Used as the size to enable large array optimizations. */
699
- var LARGE_ARRAY_SIZE = 200;
700
-
701
- /** Used as the `TypeError` message for "Functions" methods. */
702
- var FUNC_ERROR_TEXT = 'Expected a function';
703
-
704
- /** Used to stand-in for `undefined` hash values. */
705
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
706
-
707
- /** Used to compose bitmasks for comparison styles. */
708
- var UNORDERED_COMPARE_FLAG = 1,
709
- PARTIAL_COMPARE_FLAG = 2;
710
-
711
- /** Used as references for various `Number` constants. */
712
- var INFINITY = 1 / 0,
713
- MAX_SAFE_INTEGER = 9007199254740991,
714
- MAX_INTEGER = 1.7976931348623157e+308,
715
- NAN = 0 / 0;
716
-
717
- /** `Object#toString` result references. */
718
- var argsTag = '[object Arguments]',
719
- arrayTag = '[object Array]',
720
- boolTag = '[object Boolean]',
721
- dateTag = '[object Date]',
722
- errorTag = '[object Error]',
723
- funcTag = '[object Function]',
724
- genTag = '[object GeneratorFunction]',
725
- mapTag = '[object Map]',
726
- numberTag = '[object Number]',
727
- objectTag = '[object Object]',
728
- promiseTag = '[object Promise]',
729
- regexpTag = '[object RegExp]',
730
- setTag = '[object Set]',
731
- stringTag = '[object String]',
732
- symbolTag = '[object Symbol]',
733
- weakMapTag = '[object WeakMap]';
734
-
735
- var arrayBufferTag = '[object ArrayBuffer]',
736
- dataViewTag = '[object DataView]',
737
- float32Tag = '[object Float32Array]',
738
- float64Tag = '[object Float64Array]',
739
- int8Tag = '[object Int8Array]',
740
- int16Tag = '[object Int16Array]',
741
- int32Tag = '[object Int32Array]',
742
- uint8Tag = '[object Uint8Array]',
743
- uint8ClampedTag = '[object Uint8ClampedArray]',
744
- uint16Tag = '[object Uint16Array]',
745
- uint32Tag = '[object Uint32Array]';
746
-
747
- /** Used to match property names within property paths. */
748
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
749
- reIsPlainProp = /^\w*$/,
750
- reLeadingDot = /^\./,
751
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
752
-
753
- /**
754
- * Used to match `RegExp`
755
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
756
- */
757
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
758
-
759
- /** Used to match leading and trailing whitespace. */
760
- var reTrim = /^\s+|\s+$/g;
761
-
762
- /** Used to match backslashes in property paths. */
763
- var reEscapeChar = /\\(\\)?/g;
764
-
765
- /** Used to detect bad signed hexadecimal string values. */
766
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
767
-
768
- /** Used to detect binary string values. */
769
- var reIsBinary = /^0b[01]+$/i;
770
-
771
- /** Used to detect host constructors (Safari). */
772
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
773
-
774
- /** Used to detect octal string values. */
775
- var reIsOctal = /^0o[0-7]+$/i;
776
-
777
- /** Used to detect unsigned integer values. */
778
- var reIsUint = /^(?:0|[1-9]\d*)$/;
779
-
780
- /** Used to identify `toStringTag` values of typed arrays. */
781
- var typedArrayTags = {};
782
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
783
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
784
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
785
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
786
- typedArrayTags[uint32Tag] = true;
787
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
788
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
789
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
790
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
791
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
792
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
793
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
794
- typedArrayTags[weakMapTag] = false;
795
-
796
- /** Built-in method references without a dependency on `root`. */
797
- var freeParseInt = parseInt;
798
-
799
- /** Detect free variable `global` from Node.js. */
800
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
801
-
802
- /** Detect free variable `self`. */
803
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
804
-
805
- /** Used as a reference to the global object. */
806
- var root = freeGlobal || freeSelf || Function('return this')();
807
-
808
- /** Detect free variable `exports`. */
809
- var freeExports = true && exports && !exports.nodeType && exports;
810
-
811
- /** Detect free variable `module`. */
812
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
813
-
814
- /** Detect the popular CommonJS extension `module.exports`. */
815
- var moduleExports = freeModule && freeModule.exports === freeExports;
816
-
817
- /** Detect free variable `process` from Node.js. */
818
- var freeProcess = moduleExports && freeGlobal.process;
819
-
820
- /** Used to access faster Node.js helpers. */
821
- var nodeUtil = (function() {
822
- try {
823
- return freeProcess && freeProcess.binding('util');
824
- } catch (e) {}
825
- }());
826
-
827
- /* Node.js helper references. */
828
- var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
829
-
830
- /**
831
- * A specialized version of `_.some` for arrays without support for iteratee
832
- * shorthands.
833
- *
834
- * @private
835
- * @param {Array} [array] The array to iterate over.
836
- * @param {Function} predicate The function invoked per iteration.
837
- * @returns {boolean} Returns `true` if any element passes the predicate check,
838
- * else `false`.
839
- */
840
- function arraySome(array, predicate) {
841
- var index = -1,
842
- length = array ? array.length : 0;
843
-
844
- while (++index < length) {
845
- if (predicate(array[index], index, array)) {
846
- return true;
847
- }
848
- }
849
- return false;
850
- }
851
-
852
- /**
853
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
854
- * support for iteratee shorthands.
855
- *
856
- * @private
857
- * @param {Array} array The array to inspect.
858
- * @param {Function} predicate The function invoked per iteration.
859
- * @param {number} fromIndex The index to search from.
860
- * @param {boolean} [fromRight] Specify iterating from right to left.
861
- * @returns {number} Returns the index of the matched value, else `-1`.
862
- */
863
- function baseFindIndex(array, predicate, fromIndex, fromRight) {
864
- var length = array.length,
865
- index = fromIndex + (fromRight ? 1 : -1);
866
-
867
- while ((fromRight ? index-- : ++index < length)) {
868
- if (predicate(array[index], index, array)) {
869
- return index;
870
- }
871
- }
872
- return -1;
873
- }
874
-
875
- /**
876
- * The base implementation of `_.property` without support for deep paths.
877
- *
878
- * @private
879
- * @param {string} key The key of the property to get.
880
- * @returns {Function} Returns the new accessor function.
881
- */
882
- function baseProperty(key) {
883
- return function(object) {
884
- return object == null ? undefined : object[key];
885
- };
886
- }
887
-
888
- /**
889
- * The base implementation of `_.times` without support for iteratee shorthands
890
- * or max array length checks.
891
- *
892
- * @private
893
- * @param {number} n The number of times to invoke `iteratee`.
894
- * @param {Function} iteratee The function invoked per iteration.
895
- * @returns {Array} Returns the array of results.
896
- */
897
- function baseTimes(n, iteratee) {
898
- var index = -1,
899
- result = Array(n);
900
-
901
- while (++index < n) {
902
- result[index] = iteratee(index);
903
- }
904
- return result;
905
- }
906
-
907
- /**
908
- * The base implementation of `_.unary` without support for storing metadata.
909
- *
910
- * @private
911
- * @param {Function} func The function to cap arguments for.
912
- * @returns {Function} Returns the new capped function.
913
- */
914
- function baseUnary(func) {
915
- return function(value) {
916
- return func(value);
917
- };
918
- }
919
-
920
- /**
921
- * Gets the value at `key` of `object`.
922
- *
923
- * @private
924
- * @param {Object} [object] The object to query.
925
- * @param {string} key The key of the property to get.
926
- * @returns {*} Returns the property value.
927
- */
928
- function getValue(object, key) {
929
- return object == null ? undefined : object[key];
930
- }
931
-
932
- /**
933
- * Checks if `value` is a host object in IE < 9.
934
- *
935
- * @private
936
- * @param {*} value The value to check.
937
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
938
- */
939
- function isHostObject(value) {
940
- // Many host objects are `Object` objects that can coerce to strings
941
- // despite having improperly defined `toString` methods.
942
- var result = false;
943
- if (value != null && typeof value.toString != 'function') {
944
- try {
945
- result = !!(value + '');
946
- } catch (e) {}
947
- }
948
- return result;
949
- }
950
-
951
- /**
952
- * Converts `map` to its key-value pairs.
953
- *
954
- * @private
955
- * @param {Object} map The map to convert.
956
- * @returns {Array} Returns the key-value pairs.
957
- */
958
- function mapToArray(map) {
959
- var index = -1,
960
- result = Array(map.size);
961
-
962
- map.forEach(function(value, key) {
963
- result[++index] = [key, value];
964
- });
965
- return result;
966
- }
967
-
968
- /**
969
- * Creates a unary function that invokes `func` with its argument transformed.
970
- *
971
- * @private
972
- * @param {Function} func The function to wrap.
973
- * @param {Function} transform The argument transform.
974
- * @returns {Function} Returns the new function.
975
- */
976
- function overArg(func, transform) {
977
- return function(arg) {
978
- return func(transform(arg));
979
- };
980
- }
981
-
982
- /**
983
- * Converts `set` to an array of its values.
984
- *
985
- * @private
986
- * @param {Object} set The set to convert.
987
- * @returns {Array} Returns the values.
988
- */
989
- function setToArray(set) {
990
- var index = -1,
991
- result = Array(set.size);
992
-
993
- set.forEach(function(value) {
994
- result[++index] = value;
995
- });
996
- return result;
997
- }
998
-
999
- /** Used for built-in method references. */
1000
- var arrayProto = Array.prototype,
1001
- funcProto = Function.prototype,
1002
- objectProto = Object.prototype;
1003
-
1004
- /** Used to detect overreaching core-js shims. */
1005
- var coreJsData = root['__core-js_shared__'];
1006
-
1007
- /** Used to detect methods masquerading as native. */
1008
- var maskSrcKey = (function() {
1009
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
1010
- return uid ? ('Symbol(src)_1.' + uid) : '';
1011
- }());
1012
-
1013
- /** Used to resolve the decompiled source of functions. */
1014
- var funcToString = funcProto.toString;
1015
-
1016
- /** Used to check objects for own properties. */
1017
- var hasOwnProperty = objectProto.hasOwnProperty;
1018
-
1019
- /**
1020
- * Used to resolve the
1021
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1022
- * of values.
1023
- */
1024
- var objectToString = objectProto.toString;
1025
-
1026
- /** Used to detect if a method is native. */
1027
- var reIsNative = RegExp('^' +
1028
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
1029
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
1030
- );
1031
-
1032
- /** Built-in value references. */
1033
- var Symbol = root.Symbol,
1034
- Uint8Array = root.Uint8Array,
1035
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
1036
- splice = arrayProto.splice;
1037
-
1038
- /* Built-in method references for those with the same name as other `lodash` methods. */
1039
- var nativeKeys = overArg(Object.keys, Object),
1040
- nativeMax = Math.max;
1041
-
1042
- /* Built-in method references that are verified to be native. */
1043
- var DataView = getNative(root, 'DataView'),
1044
- Map = getNative(root, 'Map'),
1045
- Promise = getNative(root, 'Promise'),
1046
- Set = getNative(root, 'Set'),
1047
- WeakMap = getNative(root, 'WeakMap'),
1048
- nativeCreate = getNative(Object, 'create');
1049
-
1050
- /** Used to detect maps, sets, and weakmaps. */
1051
- var dataViewCtorString = toSource(DataView),
1052
- mapCtorString = toSource(Map),
1053
- promiseCtorString = toSource(Promise),
1054
- setCtorString = toSource(Set),
1055
- weakMapCtorString = toSource(WeakMap);
1056
-
1057
- /** Used to convert symbols to primitives and strings. */
1058
- var symbolProto = Symbol ? Symbol.prototype : undefined,
1059
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
1060
- symbolToString = symbolProto ? symbolProto.toString : undefined;
1061
-
1062
- /**
1063
- * Creates a hash object.
1064
- *
1065
- * @private
1066
- * @constructor
1067
- * @param {Array} [entries] The key-value pairs to cache.
1068
- */
1069
- function Hash(entries) {
1070
- var index = -1,
1071
- length = entries ? entries.length : 0;
1072
-
1073
- this.clear();
1074
- while (++index < length) {
1075
- var entry = entries[index];
1076
- this.set(entry[0], entry[1]);
1077
- }
1078
- }
1079
-
1080
- /**
1081
- * Removes all key-value entries from the hash.
1082
- *
1083
- * @private
1084
- * @name clear
1085
- * @memberOf Hash
1086
- */
1087
- function hashClear() {
1088
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
1089
- }
1090
-
1091
- /**
1092
- * Removes `key` and its value from the hash.
1093
- *
1094
- * @private
1095
- * @name delete
1096
- * @memberOf Hash
1097
- * @param {Object} hash The hash to modify.
1098
- * @param {string} key The key of the value to remove.
1099
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1100
- */
1101
- function hashDelete(key) {
1102
- return this.has(key) && delete this.__data__[key];
1103
- }
1104
-
1105
- /**
1106
- * Gets the hash value for `key`.
1107
- *
1108
- * @private
1109
- * @name get
1110
- * @memberOf Hash
1111
- * @param {string} key The key of the value to get.
1112
- * @returns {*} Returns the entry value.
1113
- */
1114
- function hashGet(key) {
1115
- var data = this.__data__;
1116
- if (nativeCreate) {
1117
- var result = data[key];
1118
- return result === HASH_UNDEFINED ? undefined : result;
1119
- }
1120
- return hasOwnProperty.call(data, key) ? data[key] : undefined;
1121
- }
1122
-
1123
- /**
1124
- * Checks if a hash value for `key` exists.
1125
- *
1126
- * @private
1127
- * @name has
1128
- * @memberOf Hash
1129
- * @param {string} key The key of the entry to check.
1130
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1131
- */
1132
- function hashHas(key) {
1133
- var data = this.__data__;
1134
- return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
1135
- }
1136
-
1137
- /**
1138
- * Sets the hash `key` to `value`.
1139
- *
1140
- * @private
1141
- * @name set
1142
- * @memberOf Hash
1143
- * @param {string} key The key of the value to set.
1144
- * @param {*} value The value to set.
1145
- * @returns {Object} Returns the hash instance.
1146
- */
1147
- function hashSet(key, value) {
1148
- var data = this.__data__;
1149
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1150
- return this;
1151
- }
1152
-
1153
- // Add methods to `Hash`.
1154
- Hash.prototype.clear = hashClear;
1155
- Hash.prototype['delete'] = hashDelete;
1156
- Hash.prototype.get = hashGet;
1157
- Hash.prototype.has = hashHas;
1158
- Hash.prototype.set = hashSet;
1159
-
1160
- /**
1161
- * Creates an list cache object.
1162
- *
1163
- * @private
1164
- * @constructor
1165
- * @param {Array} [entries] The key-value pairs to cache.
1166
- */
1167
- function ListCache(entries) {
1168
- var index = -1,
1169
- length = entries ? entries.length : 0;
1170
-
1171
- this.clear();
1172
- while (++index < length) {
1173
- var entry = entries[index];
1174
- this.set(entry[0], entry[1]);
1175
- }
1176
- }
1177
-
1178
- /**
1179
- * Removes all key-value entries from the list cache.
1180
- *
1181
- * @private
1182
- * @name clear
1183
- * @memberOf ListCache
1184
- */
1185
- function listCacheClear() {
1186
- this.__data__ = [];
1187
- }
1188
-
1189
- /**
1190
- * Removes `key` and its value from the list cache.
1191
- *
1192
- * @private
1193
- * @name delete
1194
- * @memberOf ListCache
1195
- * @param {string} key The key of the value to remove.
1196
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1197
- */
1198
- function listCacheDelete(key) {
1199
- var data = this.__data__,
1200
- index = assocIndexOf(data, key);
1201
-
1202
- if (index < 0) {
1203
- return false;
1204
- }
1205
- var lastIndex = data.length - 1;
1206
- if (index == lastIndex) {
1207
- data.pop();
1208
- } else {
1209
- splice.call(data, index, 1);
1210
- }
1211
- return true;
1212
- }
1213
-
1214
- /**
1215
- * Gets the list cache value for `key`.
1216
- *
1217
- * @private
1218
- * @name get
1219
- * @memberOf ListCache
1220
- * @param {string} key The key of the value to get.
1221
- * @returns {*} Returns the entry value.
1222
- */
1223
- function listCacheGet(key) {
1224
- var data = this.__data__,
1225
- index = assocIndexOf(data, key);
1226
-
1227
- return index < 0 ? undefined : data[index][1];
1228
- }
1229
-
1230
- /**
1231
- * Checks if a list cache value for `key` exists.
1232
- *
1233
- * @private
1234
- * @name has
1235
- * @memberOf ListCache
1236
- * @param {string} key The key of the entry to check.
1237
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1238
- */
1239
- function listCacheHas(key) {
1240
- return assocIndexOf(this.__data__, key) > -1;
1241
- }
1242
-
1243
- /**
1244
- * Sets the list cache `key` to `value`.
1245
- *
1246
- * @private
1247
- * @name set
1248
- * @memberOf ListCache
1249
- * @param {string} key The key of the value to set.
1250
- * @param {*} value The value to set.
1251
- * @returns {Object} Returns the list cache instance.
1252
- */
1253
- function listCacheSet(key, value) {
1254
- var data = this.__data__,
1255
- index = assocIndexOf(data, key);
1256
-
1257
- if (index < 0) {
1258
- data.push([key, value]);
1259
- } else {
1260
- data[index][1] = value;
1261
- }
1262
- return this;
1263
- }
1264
-
1265
- // Add methods to `ListCache`.
1266
- ListCache.prototype.clear = listCacheClear;
1267
- ListCache.prototype['delete'] = listCacheDelete;
1268
- ListCache.prototype.get = listCacheGet;
1269
- ListCache.prototype.has = listCacheHas;
1270
- ListCache.prototype.set = listCacheSet;
1271
-
1272
- /**
1273
- * Creates a map cache object to store key-value pairs.
1274
- *
1275
- * @private
1276
- * @constructor
1277
- * @param {Array} [entries] The key-value pairs to cache.
1278
- */
1279
- function MapCache(entries) {
1280
- var index = -1,
1281
- length = entries ? entries.length : 0;
1282
-
1283
- this.clear();
1284
- while (++index < length) {
1285
- var entry = entries[index];
1286
- this.set(entry[0], entry[1]);
1287
- }
1288
- }
1289
-
1290
- /**
1291
- * Removes all key-value entries from the map.
1292
- *
1293
- * @private
1294
- * @name clear
1295
- * @memberOf MapCache
1296
- */
1297
- function mapCacheClear() {
1298
- this.__data__ = {
1299
- 'hash': new Hash,
1300
- 'map': new (Map || ListCache),
1301
- 'string': new Hash
1302
- };
1303
- }
1304
-
1305
- /**
1306
- * Removes `key` and its value from the map.
1307
- *
1308
- * @private
1309
- * @name delete
1310
- * @memberOf MapCache
1311
- * @param {string} key The key of the value to remove.
1312
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1313
- */
1314
- function mapCacheDelete(key) {
1315
- return getMapData(this, key)['delete'](key);
1316
- }
1317
-
1318
- /**
1319
- * Gets the map value for `key`.
1320
- *
1321
- * @private
1322
- * @name get
1323
- * @memberOf MapCache
1324
- * @param {string} key The key of the value to get.
1325
- * @returns {*} Returns the entry value.
1326
- */
1327
- function mapCacheGet(key) {
1328
- return getMapData(this, key).get(key);
1329
- }
1330
-
1331
- /**
1332
- * Checks if a map value for `key` exists.
1333
- *
1334
- * @private
1335
- * @name has
1336
- * @memberOf MapCache
1337
- * @param {string} key The key of the entry to check.
1338
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1339
- */
1340
- function mapCacheHas(key) {
1341
- return getMapData(this, key).has(key);
1342
- }
1343
-
1344
- /**
1345
- * Sets the map `key` to `value`.
1346
- *
1347
- * @private
1348
- * @name set
1349
- * @memberOf MapCache
1350
- * @param {string} key The key of the value to set.
1351
- * @param {*} value The value to set.
1352
- * @returns {Object} Returns the map cache instance.
1353
- */
1354
- function mapCacheSet(key, value) {
1355
- getMapData(this, key).set(key, value);
1356
- return this;
1357
- }
1358
-
1359
- // Add methods to `MapCache`.
1360
- MapCache.prototype.clear = mapCacheClear;
1361
- MapCache.prototype['delete'] = mapCacheDelete;
1362
- MapCache.prototype.get = mapCacheGet;
1363
- MapCache.prototype.has = mapCacheHas;
1364
- MapCache.prototype.set = mapCacheSet;
1365
-
1366
- /**
1367
- *
1368
- * Creates an array cache object to store unique values.
1369
- *
1370
- * @private
1371
- * @constructor
1372
- * @param {Array} [values] The values to cache.
1373
- */
1374
- function SetCache(values) {
1375
- var index = -1,
1376
- length = values ? values.length : 0;
1377
-
1378
- this.__data__ = new MapCache;
1379
- while (++index < length) {
1380
- this.add(values[index]);
1381
- }
1382
- }
1383
-
1384
- /**
1385
- * Adds `value` to the array cache.
1386
- *
1387
- * @private
1388
- * @name add
1389
- * @memberOf SetCache
1390
- * @alias push
1391
- * @param {*} value The value to cache.
1392
- * @returns {Object} Returns the cache instance.
1393
- */
1394
- function setCacheAdd(value) {
1395
- this.__data__.set(value, HASH_UNDEFINED);
1396
- return this;
1397
- }
1398
-
1399
- /**
1400
- * Checks if `value` is in the array cache.
1401
- *
1402
- * @private
1403
- * @name has
1404
- * @memberOf SetCache
1405
- * @param {*} value The value to search for.
1406
- * @returns {number} Returns `true` if `value` is found, else `false`.
1407
- */
1408
- function setCacheHas(value) {
1409
- return this.__data__.has(value);
1410
- }
1411
-
1412
- // Add methods to `SetCache`.
1413
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
1414
- SetCache.prototype.has = setCacheHas;
1415
-
1416
- /**
1417
- * Creates a stack cache object to store key-value pairs.
1418
- *
1419
- * @private
1420
- * @constructor
1421
- * @param {Array} [entries] The key-value pairs to cache.
1422
- */
1423
- function Stack(entries) {
1424
- this.__data__ = new ListCache(entries);
1425
- }
1426
-
1427
- /**
1428
- * Removes all key-value entries from the stack.
1429
- *
1430
- * @private
1431
- * @name clear
1432
- * @memberOf Stack
1433
- */
1434
- function stackClear() {
1435
- this.__data__ = new ListCache;
1436
- }
1437
-
1438
- /**
1439
- * Removes `key` and its value from the stack.
1440
- *
1441
- * @private
1442
- * @name delete
1443
- * @memberOf Stack
1444
- * @param {string} key The key of the value to remove.
1445
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1446
- */
1447
- function stackDelete(key) {
1448
- return this.__data__['delete'](key);
1449
- }
1450
-
1451
- /**
1452
- * Gets the stack value for `key`.
1453
- *
1454
- * @private
1455
- * @name get
1456
- * @memberOf Stack
1457
- * @param {string} key The key of the value to get.
1458
- * @returns {*} Returns the entry value.
1459
- */
1460
- function stackGet(key) {
1461
- return this.__data__.get(key);
1462
- }
1463
-
1464
- /**
1465
- * Checks if a stack value for `key` exists.
1466
- *
1467
- * @private
1468
- * @name has
1469
- * @memberOf Stack
1470
- * @param {string} key The key of the entry to check.
1471
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1472
- */
1473
- function stackHas(key) {
1474
- return this.__data__.has(key);
1475
- }
1476
-
1477
- /**
1478
- * Sets the stack `key` to `value`.
1479
- *
1480
- * @private
1481
- * @name set
1482
- * @memberOf Stack
1483
- * @param {string} key The key of the value to set.
1484
- * @param {*} value The value to set.
1485
- * @returns {Object} Returns the stack cache instance.
1486
- */
1487
- function stackSet(key, value) {
1488
- var cache = this.__data__;
1489
- if (cache instanceof ListCache) {
1490
- var pairs = cache.__data__;
1491
- if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1492
- pairs.push([key, value]);
1493
- return this;
1494
- }
1495
- cache = this.__data__ = new MapCache(pairs);
1496
- }
1497
- cache.set(key, value);
1498
- return this;
1499
- }
1500
-
1501
- // Add methods to `Stack`.
1502
- Stack.prototype.clear = stackClear;
1503
- Stack.prototype['delete'] = stackDelete;
1504
- Stack.prototype.get = stackGet;
1505
- Stack.prototype.has = stackHas;
1506
- Stack.prototype.set = stackSet;
1507
-
1508
- /**
1509
- * Creates an array of the enumerable property names of the array-like `value`.
1510
- *
1511
- * @private
1512
- * @param {*} value The value to query.
1513
- * @param {boolean} inherited Specify returning inherited property names.
1514
- * @returns {Array} Returns the array of property names.
1515
- */
1516
- function arrayLikeKeys(value, inherited) {
1517
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
1518
- // Safari 9 makes `arguments.length` enumerable in strict mode.
1519
- var result = (isArray(value) || isArguments(value))
1520
- ? baseTimes(value.length, String)
1521
- : [];
1522
-
1523
- var length = result.length,
1524
- skipIndexes = !!length;
1525
-
1526
- for (var key in value) {
1527
- if ((inherited || hasOwnProperty.call(value, key)) &&
1528
- !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
1529
- result.push(key);
1530
- }
1531
- }
1532
- return result;
1533
- }
1534
-
1535
- /**
1536
- * Gets the index at which the `key` is found in `array` of key-value pairs.
1537
- *
1538
- * @private
1539
- * @param {Array} array The array to inspect.
1540
- * @param {*} key The key to search for.
1541
- * @returns {number} Returns the index of the matched value, else `-1`.
1542
- */
1543
- function assocIndexOf(array, key) {
1544
- var length = array.length;
1545
- while (length--) {
1546
- if (eq(array[length][0], key)) {
1547
- return length;
1548
- }
1549
- }
1550
- return -1;
1551
- }
1552
-
1553
- /**
1554
- * The base implementation of `_.get` without support for default values.
1555
- *
1556
- * @private
1557
- * @param {Object} object The object to query.
1558
- * @param {Array|string} path The path of the property to get.
1559
- * @returns {*} Returns the resolved value.
1560
- */
1561
- function baseGet(object, path) {
1562
- path = isKey(path, object) ? [path] : castPath(path);
1563
-
1564
- var index = 0,
1565
- length = path.length;
1566
-
1567
- while (object != null && index < length) {
1568
- object = object[toKey(path[index++])];
1569
- }
1570
- return (index && index == length) ? object : undefined;
1571
- }
1572
-
1573
- /**
1574
- * The base implementation of `getTag`.
1575
- *
1576
- * @private
1577
- * @param {*} value The value to query.
1578
- * @returns {string} Returns the `toStringTag`.
1579
- */
1580
- function baseGetTag(value) {
1581
- return objectToString.call(value);
1582
- }
1583
-
1584
- /**
1585
- * The base implementation of `_.hasIn` without support for deep paths.
1586
- *
1587
- * @private
1588
- * @param {Object} [object] The object to query.
1589
- * @param {Array|string} key The key to check.
1590
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
1591
- */
1592
- function baseHasIn(object, key) {
1593
- return object != null && key in Object(object);
1594
- }
1595
-
1596
- /**
1597
- * The base implementation of `_.isEqual` which supports partial comparisons
1598
- * and tracks traversed objects.
1599
- *
1600
- * @private
1601
- * @param {*} value The value to compare.
1602
- * @param {*} other The other value to compare.
1603
- * @param {Function} [customizer] The function to customize comparisons.
1604
- * @param {boolean} [bitmask] The bitmask of comparison flags.
1605
- * The bitmask may be composed of the following flags:
1606
- * 1 - Unordered comparison
1607
- * 2 - Partial comparison
1608
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
1609
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1610
- */
1611
- function baseIsEqual(value, other, customizer, bitmask, stack) {
1612
- if (value === other) {
1613
- return true;
1614
- }
1615
- if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
1616
- return value !== value && other !== other;
1617
- }
1618
- return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
1619
- }
1620
-
1621
- /**
1622
- * A specialized version of `baseIsEqual` for arrays and objects which performs
1623
- * deep comparisons and tracks traversed objects enabling objects with circular
1624
- * references to be compared.
1625
- *
1626
- * @private
1627
- * @param {Object} object The object to compare.
1628
- * @param {Object} other The other object to compare.
1629
- * @param {Function} equalFunc The function to determine equivalents of values.
1630
- * @param {Function} [customizer] The function to customize comparisons.
1631
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
1632
- * for more details.
1633
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
1634
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1635
- */
1636
- function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
1637
- var objIsArr = isArray(object),
1638
- othIsArr = isArray(other),
1639
- objTag = arrayTag,
1640
- othTag = arrayTag;
1641
-
1642
- if (!objIsArr) {
1643
- objTag = getTag(object);
1644
- objTag = objTag == argsTag ? objectTag : objTag;
1645
- }
1646
- if (!othIsArr) {
1647
- othTag = getTag(other);
1648
- othTag = othTag == argsTag ? objectTag : othTag;
1649
- }
1650
- var objIsObj = objTag == objectTag && !isHostObject(object),
1651
- othIsObj = othTag == objectTag && !isHostObject(other),
1652
- isSameTag = objTag == othTag;
1653
-
1654
- if (isSameTag && !objIsObj) {
1655
- stack || (stack = new Stack);
1656
- return (objIsArr || isTypedArray(object))
1657
- ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
1658
- : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
1659
- }
1660
- if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
1661
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
1662
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
1663
-
1664
- if (objIsWrapped || othIsWrapped) {
1665
- var objUnwrapped = objIsWrapped ? object.value() : object,
1666
- othUnwrapped = othIsWrapped ? other.value() : other;
1667
-
1668
- stack || (stack = new Stack);
1669
- return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
1670
- }
1671
- }
1672
- if (!isSameTag) {
1673
- return false;
1674
- }
1675
- stack || (stack = new Stack);
1676
- return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
1677
- }
1678
-
1679
- /**
1680
- * The base implementation of `_.isMatch` without support for iteratee shorthands.
1681
- *
1682
- * @private
1683
- * @param {Object} object The object to inspect.
1684
- * @param {Object} source The object of property values to match.
1685
- * @param {Array} matchData The property names, values, and compare flags to match.
1686
- * @param {Function} [customizer] The function to customize comparisons.
1687
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
1688
- */
1689
- function baseIsMatch(object, source, matchData, customizer) {
1690
- var index = matchData.length,
1691
- length = index,
1692
- noCustomizer = !customizer;
1693
-
1694
- if (object == null) {
1695
- return !length;
1696
- }
1697
- object = Object(object);
1698
- while (index--) {
1699
- var data = matchData[index];
1700
- if ((noCustomizer && data[2])
1701
- ? data[1] !== object[data[0]]
1702
- : !(data[0] in object)
1703
- ) {
1704
- return false;
1705
- }
1706
- }
1707
- while (++index < length) {
1708
- data = matchData[index];
1709
- var key = data[0],
1710
- objValue = object[key],
1711
- srcValue = data[1];
1712
-
1713
- if (noCustomizer && data[2]) {
1714
- if (objValue === undefined && !(key in object)) {
1715
- return false;
1716
- }
1717
- } else {
1718
- var stack = new Stack;
1719
- if (customizer) {
1720
- var result = customizer(objValue, srcValue, key, object, source, stack);
1721
- }
1722
- if (!(result === undefined
1723
- ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
1724
- : result
1725
- )) {
1726
- return false;
1727
- }
1728
- }
1729
- }
1730
- return true;
1731
- }
1732
-
1733
- /**
1734
- * The base implementation of `_.isNative` without bad shim checks.
1735
- *
1736
- * @private
1737
- * @param {*} value The value to check.
1738
- * @returns {boolean} Returns `true` if `value` is a native function,
1739
- * else `false`.
1740
- */
1741
- function baseIsNative(value) {
1742
- if (!isObject(value) || isMasked(value)) {
1743
- return false;
1744
- }
1745
- var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
1746
- return pattern.test(toSource(value));
1747
- }
1748
-
1749
- /**
1750
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
1751
- *
1752
- * @private
1753
- * @param {*} value The value to check.
1754
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1755
- */
1756
- function baseIsTypedArray(value) {
1757
- return isObjectLike(value) &&
1758
- isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
1759
- }
1760
-
1761
- /**
1762
- * The base implementation of `_.iteratee`.
1763
- *
1764
- * @private
1765
- * @param {*} [value=_.identity] The value to convert to an iteratee.
1766
- * @returns {Function} Returns the iteratee.
1767
- */
1768
- function baseIteratee(value) {
1769
- // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
1770
- // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
1771
- if (typeof value == 'function') {
1772
- return value;
1773
- }
1774
- if (value == null) {
1775
- return identity;
1776
- }
1777
- if (typeof value == 'object') {
1778
- return isArray(value)
1779
- ? baseMatchesProperty(value[0], value[1])
1780
- : baseMatches(value);
1781
- }
1782
- return property(value);
1783
- }
1784
-
1785
- /**
1786
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1787
- *
1788
- * @private
1789
- * @param {Object} object The object to query.
1790
- * @returns {Array} Returns the array of property names.
1791
- */
1792
- function baseKeys(object) {
1793
- if (!isPrototype(object)) {
1794
- return nativeKeys(object);
1795
- }
1796
- var result = [];
1797
- for (var key in Object(object)) {
1798
- if (hasOwnProperty.call(object, key) && key != 'constructor') {
1799
- result.push(key);
1800
- }
1801
- }
1802
- return result;
1803
- }
1804
-
1805
- /**
1806
- * The base implementation of `_.matches` which doesn't clone `source`.
1807
- *
1808
- * @private
1809
- * @param {Object} source The object of property values to match.
1810
- * @returns {Function} Returns the new spec function.
1811
- */
1812
- function baseMatches(source) {
1813
- var matchData = getMatchData(source);
1814
- if (matchData.length == 1 && matchData[0][2]) {
1815
- return matchesStrictComparable(matchData[0][0], matchData[0][1]);
1816
- }
1817
- return function(object) {
1818
- return object === source || baseIsMatch(object, source, matchData);
1819
- };
1820
- }
1821
-
1822
- /**
1823
- * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
1824
- *
1825
- * @private
1826
- * @param {string} path The path of the property to get.
1827
- * @param {*} srcValue The value to match.
1828
- * @returns {Function} Returns the new spec function.
1829
- */
1830
- function baseMatchesProperty(path, srcValue) {
1831
- if (isKey(path) && isStrictComparable(srcValue)) {
1832
- return matchesStrictComparable(toKey(path), srcValue);
1833
- }
1834
- return function(object) {
1835
- var objValue = get(object, path);
1836
- return (objValue === undefined && objValue === srcValue)
1837
- ? hasIn(object, path)
1838
- : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
1839
- };
1840
- }
1841
-
1842
- /**
1843
- * A specialized version of `baseProperty` which supports deep paths.
1844
- *
1845
- * @private
1846
- * @param {Array|string} path The path of the property to get.
1847
- * @returns {Function} Returns the new accessor function.
1848
- */
1849
- function basePropertyDeep(path) {
1850
- return function(object) {
1851
- return baseGet(object, path);
1852
- };
1853
- }
1854
-
1855
- /**
1856
- * The base implementation of `_.toString` which doesn't convert nullish
1857
- * values to empty strings.
1858
- *
1859
- * @private
1860
- * @param {*} value The value to process.
1861
- * @returns {string} Returns the string.
1862
- */
1863
- function baseToString(value) {
1864
- // Exit early for strings to avoid a performance hit in some environments.
1865
- if (typeof value == 'string') {
1866
- return value;
1867
- }
1868
- if (isSymbol(value)) {
1869
- return symbolToString ? symbolToString.call(value) : '';
1870
- }
1871
- var result = (value + '');
1872
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1873
- }
1874
-
1875
- /**
1876
- * Casts `value` to a path array if it's not one.
1877
- *
1878
- * @private
1879
- * @param {*} value The value to inspect.
1880
- * @returns {Array} Returns the cast property path array.
1881
- */
1882
- function castPath(value) {
1883
- return isArray(value) ? value : stringToPath(value);
1884
- }
1885
-
1886
- /**
1887
- * Creates a `_.find` or `_.findLast` function.
1888
- *
1889
- * @private
1890
- * @param {Function} findIndexFunc The function to find the collection index.
1891
- * @returns {Function} Returns the new find function.
1892
- */
1893
- function createFind(findIndexFunc) {
1894
- return function(collection, predicate, fromIndex) {
1895
- var iterable = Object(collection);
1896
- if (!isArrayLike(collection)) {
1897
- var iteratee = baseIteratee(predicate, 3);
1898
- collection = keys(collection);
1899
- predicate = function(key) { return iteratee(iterable[key], key, iterable); };
1900
- }
1901
- var index = findIndexFunc(collection, predicate, fromIndex);
1902
- return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
1903
- };
1904
- }
1905
-
1906
- /**
1907
- * A specialized version of `baseIsEqualDeep` for arrays with support for
1908
- * partial deep comparisons.
1909
- *
1910
- * @private
1911
- * @param {Array} array The array to compare.
1912
- * @param {Array} other The other array to compare.
1913
- * @param {Function} equalFunc The function to determine equivalents of values.
1914
- * @param {Function} customizer The function to customize comparisons.
1915
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
1916
- * for more details.
1917
- * @param {Object} stack Tracks traversed `array` and `other` objects.
1918
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
1919
- */
1920
- function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
1921
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
1922
- arrLength = array.length,
1923
- othLength = other.length;
1924
-
1925
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
1926
- return false;
1927
- }
1928
- // Assume cyclic values are equal.
1929
- var stacked = stack.get(array);
1930
- if (stacked && stack.get(other)) {
1931
- return stacked == other;
1932
- }
1933
- var index = -1,
1934
- result = true,
1935
- seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
1936
-
1937
- stack.set(array, other);
1938
- stack.set(other, array);
1939
-
1940
- // Ignore non-index properties.
1941
- while (++index < arrLength) {
1942
- var arrValue = array[index],
1943
- othValue = other[index];
1944
-
1945
- if (customizer) {
1946
- var compared = isPartial
1947
- ? customizer(othValue, arrValue, index, other, array, stack)
1948
- : customizer(arrValue, othValue, index, array, other, stack);
1949
- }
1950
- if (compared !== undefined) {
1951
- if (compared) {
1952
- continue;
1953
- }
1954
- result = false;
1955
- break;
1956
- }
1957
- // Recursively compare arrays (susceptible to call stack limits).
1958
- if (seen) {
1959
- if (!arraySome(other, function(othValue, othIndex) {
1960
- if (!seen.has(othIndex) &&
1961
- (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
1962
- return seen.add(othIndex);
1963
- }
1964
- })) {
1965
- result = false;
1966
- break;
1967
- }
1968
- } else if (!(
1969
- arrValue === othValue ||
1970
- equalFunc(arrValue, othValue, customizer, bitmask, stack)
1971
- )) {
1972
- result = false;
1973
- break;
1974
- }
1975
- }
1976
- stack['delete'](array);
1977
- stack['delete'](other);
1978
- return result;
1979
- }
1980
-
1981
- /**
1982
- * A specialized version of `baseIsEqualDeep` for comparing objects of
1983
- * the same `toStringTag`.
1984
- *
1985
- * **Note:** This function only supports comparing values with tags of
1986
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
1987
- *
1988
- * @private
1989
- * @param {Object} object The object to compare.
1990
- * @param {Object} other The other object to compare.
1991
- * @param {string} tag The `toStringTag` of the objects to compare.
1992
- * @param {Function} equalFunc The function to determine equivalents of values.
1993
- * @param {Function} customizer The function to customize comparisons.
1994
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
1995
- * for more details.
1996
- * @param {Object} stack Tracks traversed `object` and `other` objects.
1997
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1998
- */
1999
- function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
2000
- switch (tag) {
2001
- case dataViewTag:
2002
- if ((object.byteLength != other.byteLength) ||
2003
- (object.byteOffset != other.byteOffset)) {
2004
- return false;
2005
- }
2006
- object = object.buffer;
2007
- other = other.buffer;
2008
-
2009
- case arrayBufferTag:
2010
- if ((object.byteLength != other.byteLength) ||
2011
- !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
2012
- return false;
2013
- }
2014
- return true;
2015
-
2016
- case boolTag:
2017
- case dateTag:
2018
- case numberTag:
2019
- // Coerce booleans to `1` or `0` and dates to milliseconds.
2020
- // Invalid dates are coerced to `NaN`.
2021
- return eq(+object, +other);
2022
-
2023
- case errorTag:
2024
- return object.name == other.name && object.message == other.message;
2025
-
2026
- case regexpTag:
2027
- case stringTag:
2028
- // Coerce regexes to strings and treat strings, primitives and objects,
2029
- // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
2030
- // for more details.
2031
- return object == (other + '');
2032
-
2033
- case mapTag:
2034
- var convert = mapToArray;
2035
-
2036
- case setTag:
2037
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
2038
- convert || (convert = setToArray);
2039
-
2040
- if (object.size != other.size && !isPartial) {
2041
- return false;
2042
- }
2043
- // Assume cyclic values are equal.
2044
- var stacked = stack.get(object);
2045
- if (stacked) {
2046
- return stacked == other;
2047
- }
2048
- bitmask |= UNORDERED_COMPARE_FLAG;
2049
-
2050
- // Recursively compare objects (susceptible to call stack limits).
2051
- stack.set(object, other);
2052
- var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
2053
- stack['delete'](object);
2054
- return result;
2055
-
2056
- case symbolTag:
2057
- if (symbolValueOf) {
2058
- return symbolValueOf.call(object) == symbolValueOf.call(other);
2059
- }
2060
- }
2061
- return false;
2062
- }
2063
-
2064
- /**
2065
- * A specialized version of `baseIsEqualDeep` for objects with support for
2066
- * partial deep comparisons.
2067
- *
2068
- * @private
2069
- * @param {Object} object The object to compare.
2070
- * @param {Object} other The other object to compare.
2071
- * @param {Function} equalFunc The function to determine equivalents of values.
2072
- * @param {Function} customizer The function to customize comparisons.
2073
- * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
2074
- * for more details.
2075
- * @param {Object} stack Tracks traversed `object` and `other` objects.
2076
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2077
- */
2078
- function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
2079
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
2080
- objProps = keys(object),
2081
- objLength = objProps.length,
2082
- othProps = keys(other),
2083
- othLength = othProps.length;
2084
-
2085
- if (objLength != othLength && !isPartial) {
2086
- return false;
2087
- }
2088
- var index = objLength;
2089
- while (index--) {
2090
- var key = objProps[index];
2091
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
2092
- return false;
2093
- }
2094
- }
2095
- // Assume cyclic values are equal.
2096
- var stacked = stack.get(object);
2097
- if (stacked && stack.get(other)) {
2098
- return stacked == other;
2099
- }
2100
- var result = true;
2101
- stack.set(object, other);
2102
- stack.set(other, object);
2103
-
2104
- var skipCtor = isPartial;
2105
- while (++index < objLength) {
2106
- key = objProps[index];
2107
- var objValue = object[key],
2108
- othValue = other[key];
2109
-
2110
- if (customizer) {
2111
- var compared = isPartial
2112
- ? customizer(othValue, objValue, key, other, object, stack)
2113
- : customizer(objValue, othValue, key, object, other, stack);
2114
- }
2115
- // Recursively compare objects (susceptible to call stack limits).
2116
- if (!(compared === undefined
2117
- ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
2118
- : compared
2119
- )) {
2120
- result = false;
2121
- break;
2122
- }
2123
- skipCtor || (skipCtor = key == 'constructor');
2124
- }
2125
- if (result && !skipCtor) {
2126
- var objCtor = object.constructor,
2127
- othCtor = other.constructor;
2128
-
2129
- // Non `Object` object instances with different constructors are not equal.
2130
- if (objCtor != othCtor &&
2131
- ('constructor' in object && 'constructor' in other) &&
2132
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
2133
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
2134
- result = false;
2135
- }
2136
- }
2137
- stack['delete'](object);
2138
- stack['delete'](other);
2139
- return result;
2140
- }
2141
-
2142
- /**
2143
- * Gets the data for `map`.
2144
- *
2145
- * @private
2146
- * @param {Object} map The map to query.
2147
- * @param {string} key The reference key.
2148
- * @returns {*} Returns the map data.
2149
- */
2150
- function getMapData(map, key) {
2151
- var data = map.__data__;
2152
- return isKeyable(key)
2153
- ? data[typeof key == 'string' ? 'string' : 'hash']
2154
- : data.map;
2155
- }
2156
-
2157
- /**
2158
- * Gets the property names, values, and compare flags of `object`.
2159
- *
2160
- * @private
2161
- * @param {Object} object The object to query.
2162
- * @returns {Array} Returns the match data of `object`.
2163
- */
2164
- function getMatchData(object) {
2165
- var result = keys(object),
2166
- length = result.length;
2167
-
2168
- while (length--) {
2169
- var key = result[length],
2170
- value = object[key];
2171
-
2172
- result[length] = [key, value, isStrictComparable(value)];
2173
- }
2174
- return result;
2175
- }
2176
-
2177
- /**
2178
- * Gets the native function at `key` of `object`.
2179
- *
2180
- * @private
2181
- * @param {Object} object The object to query.
2182
- * @param {string} key The key of the method to get.
2183
- * @returns {*} Returns the function if it's native, else `undefined`.
2184
- */
2185
- function getNative(object, key) {
2186
- var value = getValue(object, key);
2187
- return baseIsNative(value) ? value : undefined;
2188
- }
2189
-
2190
- /**
2191
- * Gets the `toStringTag` of `value`.
2192
- *
2193
- * @private
2194
- * @param {*} value The value to query.
2195
- * @returns {string} Returns the `toStringTag`.
2196
- */
2197
- var getTag = baseGetTag;
2198
-
2199
- // Fallback for data views, maps, sets, and weak maps in IE 11,
2200
- // for data views in Edge < 14, and promises in Node.js.
2201
- if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
2202
- (Map && getTag(new Map) != mapTag) ||
2203
- (Promise && getTag(Promise.resolve()) != promiseTag) ||
2204
- (Set && getTag(new Set) != setTag) ||
2205
- (WeakMap && getTag(new WeakMap) != weakMapTag)) {
2206
- getTag = function(value) {
2207
- var result = objectToString.call(value),
2208
- Ctor = result == objectTag ? value.constructor : undefined,
2209
- ctorString = Ctor ? toSource(Ctor) : undefined;
2210
-
2211
- if (ctorString) {
2212
- switch (ctorString) {
2213
- case dataViewCtorString: return dataViewTag;
2214
- case mapCtorString: return mapTag;
2215
- case promiseCtorString: return promiseTag;
2216
- case setCtorString: return setTag;
2217
- case weakMapCtorString: return weakMapTag;
2218
- }
2219
- }
2220
- return result;
2221
- };
2222
- }
2223
-
2224
- /**
2225
- * Checks if `path` exists on `object`.
2226
- *
2227
- * @private
2228
- * @param {Object} object The object to query.
2229
- * @param {Array|string} path The path to check.
2230
- * @param {Function} hasFunc The function to check properties.
2231
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
2232
- */
2233
- function hasPath(object, path, hasFunc) {
2234
- path = isKey(path, object) ? [path] : castPath(path);
2235
-
2236
- var result,
2237
- index = -1,
2238
- length = path.length;
2239
-
2240
- while (++index < length) {
2241
- var key = toKey(path[index]);
2242
- if (!(result = object != null && hasFunc(object, key))) {
2243
- break;
2244
- }
2245
- object = object[key];
2246
- }
2247
- if (result) {
2248
- return result;
2249
- }
2250
- var length = object ? object.length : 0;
2251
- return !!length && isLength(length) && isIndex(key, length) &&
2252
- (isArray(object) || isArguments(object));
2253
- }
2254
-
2255
- /**
2256
- * Checks if `value` is a valid array-like index.
2257
- *
2258
- * @private
2259
- * @param {*} value The value to check.
2260
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
2261
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
2262
- */
2263
- function isIndex(value, length) {
2264
- length = length == null ? MAX_SAFE_INTEGER : length;
2265
- return !!length &&
2266
- (typeof value == 'number' || reIsUint.test(value)) &&
2267
- (value > -1 && value % 1 == 0 && value < length);
2268
- }
2269
-
2270
- /**
2271
- * Checks if `value` is a property name and not a property path.
2272
- *
2273
- * @private
2274
- * @param {*} value The value to check.
2275
- * @param {Object} [object] The object to query keys on.
2276
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2277
- */
2278
- function isKey(value, object) {
2279
- if (isArray(value)) {
2280
- return false;
2281
- }
2282
- var type = typeof value;
2283
- if (type == 'number' || type == 'symbol' || type == 'boolean' ||
2284
- value == null || isSymbol(value)) {
2285
- return true;
2286
- }
2287
- return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
2288
- (object != null && value in Object(object));
2289
- }
2290
-
2291
- /**
2292
- * Checks if `value` is suitable for use as unique object key.
2293
- *
2294
- * @private
2295
- * @param {*} value The value to check.
2296
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
2297
- */
2298
- function isKeyable(value) {
2299
- var type = typeof value;
2300
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
2301
- ? (value !== '__proto__')
2302
- : (value === null);
2303
- }
2304
-
2305
- /**
2306
- * Checks if `func` has its source masked.
2307
- *
2308
- * @private
2309
- * @param {Function} func The function to check.
2310
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
2311
- */
2312
- function isMasked(func) {
2313
- return !!maskSrcKey && (maskSrcKey in func);
2314
- }
2315
-
2316
- /**
2317
- * Checks if `value` is likely a prototype object.
2318
- *
2319
- * @private
2320
- * @param {*} value The value to check.
2321
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
2322
- */
2323
- function isPrototype(value) {
2324
- var Ctor = value && value.constructor,
2325
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
2326
-
2327
- return value === proto;
2328
- }
2329
-
2330
- /**
2331
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
2332
- *
2333
- * @private
2334
- * @param {*} value The value to check.
2335
- * @returns {boolean} Returns `true` if `value` if suitable for strict
2336
- * equality comparisons, else `false`.
2337
- */
2338
- function isStrictComparable(value) {
2339
- return value === value && !isObject(value);
2340
- }
2341
-
2342
- /**
2343
- * A specialized version of `matchesProperty` for source values suitable
2344
- * for strict equality comparisons, i.e. `===`.
2345
- *
2346
- * @private
2347
- * @param {string} key The key of the property to get.
2348
- * @param {*} srcValue The value to match.
2349
- * @returns {Function} Returns the new spec function.
2350
- */
2351
- function matchesStrictComparable(key, srcValue) {
2352
- return function(object) {
2353
- if (object == null) {
2354
- return false;
2355
- }
2356
- return object[key] === srcValue &&
2357
- (srcValue !== undefined || (key in Object(object)));
2358
- };
2359
- }
2360
-
2361
- /**
2362
- * Converts `string` to a property path array.
2363
- *
2364
- * @private
2365
- * @param {string} string The string to convert.
2366
- * @returns {Array} Returns the property path array.
2367
- */
2368
- var stringToPath = memoize(function(string) {
2369
- string = toString(string);
2370
-
2371
- var result = [];
2372
- if (reLeadingDot.test(string)) {
2373
- result.push('');
2374
- }
2375
- string.replace(rePropName, function(match, number, quote, string) {
2376
- result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
2377
- });
2378
- return result;
2379
- });
2380
-
2381
- /**
2382
- * Converts `value` to a string key if it's not a string or symbol.
2383
- *
2384
- * @private
2385
- * @param {*} value The value to inspect.
2386
- * @returns {string|symbol} Returns the key.
2387
- */
2388
- function toKey(value) {
2389
- if (typeof value == 'string' || isSymbol(value)) {
2390
- return value;
2391
- }
2392
- var result = (value + '');
2393
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
2394
- }
2395
-
2396
- /**
2397
- * Converts `func` to its source code.
2398
- *
2399
- * @private
2400
- * @param {Function} func The function to process.
2401
- * @returns {string} Returns the source code.
2402
- */
2403
- function toSource(func) {
2404
- if (func != null) {
2405
- try {
2406
- return funcToString.call(func);
2407
- } catch (e) {}
2408
- try {
2409
- return (func + '');
2410
- } catch (e) {}
2411
- }
2412
- return '';
2413
- }
2414
-
2415
- /**
2416
- * This method is like `_.find` except that it returns the index of the first
2417
- * element `predicate` returns truthy for instead of the element itself.
2418
- *
2419
- * @static
2420
- * @memberOf _
2421
- * @since 1.1.0
2422
- * @category Array
2423
- * @param {Array} array The array to inspect.
2424
- * @param {Function} [predicate=_.identity]
2425
- * The function invoked per iteration.
2426
- * @param {number} [fromIndex=0] The index to search from.
2427
- * @returns {number} Returns the index of the found element, else `-1`.
2428
- * @example
2429
- *
2430
- * var users = [
2431
- * { 'user': 'barney', 'active': false },
2432
- * { 'user': 'fred', 'active': false },
2433
- * { 'user': 'pebbles', 'active': true }
2434
- * ];
2435
- *
2436
- * _.findIndex(users, function(o) { return o.user == 'barney'; });
2437
- * // => 0
2438
- *
2439
- * // The `_.matches` iteratee shorthand.
2440
- * _.findIndex(users, { 'user': 'fred', 'active': false });
2441
- * // => 1
2442
- *
2443
- * // The `_.matchesProperty` iteratee shorthand.
2444
- * _.findIndex(users, ['active', false]);
2445
- * // => 0
2446
- *
2447
- * // The `_.property` iteratee shorthand.
2448
- * _.findIndex(users, 'active');
2449
- * // => 2
2450
- */
2451
- function findIndex(array, predicate, fromIndex) {
2452
- var length = array ? array.length : 0;
2453
- if (!length) {
2454
- return -1;
2455
- }
2456
- var index = fromIndex == null ? 0 : toInteger(fromIndex);
2457
- if (index < 0) {
2458
- index = nativeMax(length + index, 0);
2459
- }
2460
- return baseFindIndex(array, baseIteratee(predicate, 3), index);
2461
- }
2462
-
2463
- /**
2464
- * Iterates over elements of `collection`, returning the first element
2465
- * `predicate` returns truthy for. The predicate is invoked with three
2466
- * arguments: (value, index|key, collection).
2467
- *
2468
- * @static
2469
- * @memberOf _
2470
- * @since 0.1.0
2471
- * @category Collection
2472
- * @param {Array|Object} collection The collection to inspect.
2473
- * @param {Function} [predicate=_.identity]
2474
- * The function invoked per iteration.
2475
- * @param {number} [fromIndex=0] The index to search from.
2476
- * @returns {*} Returns the matched element, else `undefined`.
2477
- * @example
2478
- *
2479
- * var users = [
2480
- * { 'user': 'barney', 'age': 36, 'active': true },
2481
- * { 'user': 'fred', 'age': 40, 'active': false },
2482
- * { 'user': 'pebbles', 'age': 1, 'active': true }
2483
- * ];
2484
- *
2485
- * _.find(users, function(o) { return o.age < 40; });
2486
- * // => object for 'barney'
2487
- *
2488
- * // The `_.matches` iteratee shorthand.
2489
- * _.find(users, { 'age': 1, 'active': true });
2490
- * // => object for 'pebbles'
2491
- *
2492
- * // The `_.matchesProperty` iteratee shorthand.
2493
- * _.find(users, ['active', false]);
2494
- * // => object for 'fred'
2495
- *
2496
- * // The `_.property` iteratee shorthand.
2497
- * _.find(users, 'active');
2498
- * // => object for 'barney'
2499
- */
2500
- var find = createFind(findIndex);
2501
-
2502
- /**
2503
- * Creates a function that memoizes the result of `func`. If `resolver` is
2504
- * provided, it determines the cache key for storing the result based on the
2505
- * arguments provided to the memoized function. By default, the first argument
2506
- * provided to the memoized function is used as the map cache key. The `func`
2507
- * is invoked with the `this` binding of the memoized function.
2508
- *
2509
- * **Note:** The cache is exposed as the `cache` property on the memoized
2510
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
2511
- * constructor with one whose instances implement the
2512
- * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
2513
- * method interface of `delete`, `get`, `has`, and `set`.
2514
- *
2515
- * @static
2516
- * @memberOf _
2517
- * @since 0.1.0
2518
- * @category Function
2519
- * @param {Function} func The function to have its output memoized.
2520
- * @param {Function} [resolver] The function to resolve the cache key.
2521
- * @returns {Function} Returns the new memoized function.
2522
- * @example
2523
- *
2524
- * var object = { 'a': 1, 'b': 2 };
2525
- * var other = { 'c': 3, 'd': 4 };
2526
- *
2527
- * var values = _.memoize(_.values);
2528
- * values(object);
2529
- * // => [1, 2]
2530
- *
2531
- * values(other);
2532
- * // => [3, 4]
2533
- *
2534
- * object.a = 2;
2535
- * values(object);
2536
- * // => [1, 2]
2537
- *
2538
- * // Modify the result cache.
2539
- * values.cache.set(object, ['a', 'b']);
2540
- * values(object);
2541
- * // => ['a', 'b']
2542
- *
2543
- * // Replace `_.memoize.Cache`.
2544
- * _.memoize.Cache = WeakMap;
2545
- */
2546
- function memoize(func, resolver) {
2547
- if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
2548
- throw new TypeError(FUNC_ERROR_TEXT);
2549
- }
2550
- var memoized = function() {
2551
- var args = arguments,
2552
- key = resolver ? resolver.apply(this, args) : args[0],
2553
- cache = memoized.cache;
2554
-
2555
- if (cache.has(key)) {
2556
- return cache.get(key);
2557
- }
2558
- var result = func.apply(this, args);
2559
- memoized.cache = cache.set(key, result);
2560
- return result;
2561
- };
2562
- memoized.cache = new (memoize.Cache || MapCache);
2563
- return memoized;
2564
- }
2565
-
2566
- // Assign cache to `_.memoize`.
2567
- memoize.Cache = MapCache;
2568
-
2569
- /**
2570
- * Performs a
2571
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
2572
- * comparison between two values to determine if they are equivalent.
2573
- *
2574
- * @static
2575
- * @memberOf _
2576
- * @since 4.0.0
2577
- * @category Lang
2578
- * @param {*} value The value to compare.
2579
- * @param {*} other The other value to compare.
2580
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2581
- * @example
2582
- *
2583
- * var object = { 'a': 1 };
2584
- * var other = { 'a': 1 };
2585
- *
2586
- * _.eq(object, object);
2587
- * // => true
2588
- *
2589
- * _.eq(object, other);
2590
- * // => false
2591
- *
2592
- * _.eq('a', 'a');
2593
- * // => true
2594
- *
2595
- * _.eq('a', Object('a'));
2596
- * // => false
2597
- *
2598
- * _.eq(NaN, NaN);
2599
- * // => true
2600
- */
2601
- function eq(value, other) {
2602
- return value === other || (value !== value && other !== other);
2603
- }
2604
-
2605
- /**
2606
- * Checks if `value` is likely an `arguments` object.
2607
- *
2608
- * @static
2609
- * @memberOf _
2610
- * @since 0.1.0
2611
- * @category Lang
2612
- * @param {*} value The value to check.
2613
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
2614
- * else `false`.
2615
- * @example
2616
- *
2617
- * _.isArguments(function() { return arguments; }());
2618
- * // => true
2619
- *
2620
- * _.isArguments([1, 2, 3]);
2621
- * // => false
2622
- */
2623
- function isArguments(value) {
2624
- // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
2625
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
2626
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
2627
- }
2628
-
2629
- /**
2630
- * Checks if `value` is classified as an `Array` object.
2631
- *
2632
- * @static
2633
- * @memberOf _
2634
- * @since 0.1.0
2635
- * @category Lang
2636
- * @param {*} value The value to check.
2637
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
2638
- * @example
2639
- *
2640
- * _.isArray([1, 2, 3]);
2641
- * // => true
2642
- *
2643
- * _.isArray(document.body.children);
2644
- * // => false
2645
- *
2646
- * _.isArray('abc');
2647
- * // => false
2648
- *
2649
- * _.isArray(_.noop);
2650
- * // => false
2651
- */
2652
- var isArray = Array.isArray;
2653
-
2654
- /**
2655
- * Checks if `value` is array-like. A value is considered array-like if it's
2656
- * not a function and has a `value.length` that's an integer greater than or
2657
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
2658
- *
2659
- * @static
2660
- * @memberOf _
2661
- * @since 4.0.0
2662
- * @category Lang
2663
- * @param {*} value The value to check.
2664
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
2665
- * @example
2666
- *
2667
- * _.isArrayLike([1, 2, 3]);
2668
- * // => true
2669
- *
2670
- * _.isArrayLike(document.body.children);
2671
- * // => true
2672
- *
2673
- * _.isArrayLike('abc');
2674
- * // => true
2675
- *
2676
- * _.isArrayLike(_.noop);
2677
- * // => false
2678
- */
2679
- function isArrayLike(value) {
2680
- return value != null && isLength(value.length) && !isFunction(value);
2681
- }
2682
-
2683
- /**
2684
- * This method is like `_.isArrayLike` except that it also checks if `value`
2685
- * is an object.
2686
- *
2687
- * @static
2688
- * @memberOf _
2689
- * @since 4.0.0
2690
- * @category Lang
2691
- * @param {*} value The value to check.
2692
- * @returns {boolean} Returns `true` if `value` is an array-like object,
2693
- * else `false`.
2694
- * @example
2695
- *
2696
- * _.isArrayLikeObject([1, 2, 3]);
2697
- * // => true
2698
- *
2699
- * _.isArrayLikeObject(document.body.children);
2700
- * // => true
2701
- *
2702
- * _.isArrayLikeObject('abc');
2703
- * // => false
2704
- *
2705
- * _.isArrayLikeObject(_.noop);
2706
- * // => false
2707
- */
2708
- function isArrayLikeObject(value) {
2709
- return isObjectLike(value) && isArrayLike(value);
2710
- }
2711
-
2712
- /**
2713
- * Checks if `value` is classified as a `Function` object.
2714
- *
2715
- * @static
2716
- * @memberOf _
2717
- * @since 0.1.0
2718
- * @category Lang
2719
- * @param {*} value The value to check.
2720
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
2721
- * @example
2722
- *
2723
- * _.isFunction(_);
2724
- * // => true
2725
- *
2726
- * _.isFunction(/abc/);
2727
- * // => false
2728
- */
2729
- function isFunction(value) {
2730
- // The use of `Object#toString` avoids issues with the `typeof` operator
2731
- // in Safari 8-9 which returns 'object' for typed array and other constructors.
2732
- var tag = isObject(value) ? objectToString.call(value) : '';
2733
- return tag == funcTag || tag == genTag;
2734
- }
2735
-
2736
- /**
2737
- * Checks if `value` is a valid array-like length.
2738
- *
2739
- * **Note:** This method is loosely based on
2740
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
2741
- *
2742
- * @static
2743
- * @memberOf _
2744
- * @since 4.0.0
2745
- * @category Lang
2746
- * @param {*} value The value to check.
2747
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
2748
- * @example
2749
- *
2750
- * _.isLength(3);
2751
- * // => true
2752
- *
2753
- * _.isLength(Number.MIN_VALUE);
2754
- * // => false
2755
- *
2756
- * _.isLength(Infinity);
2757
- * // => false
2758
- *
2759
- * _.isLength('3');
2760
- * // => false
2761
- */
2762
- function isLength(value) {
2763
- return typeof value == 'number' &&
2764
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
2765
- }
2766
-
2767
- /**
2768
- * Checks if `value` is the
2769
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
2770
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
2771
- *
2772
- * @static
2773
- * @memberOf _
2774
- * @since 0.1.0
2775
- * @category Lang
2776
- * @param {*} value The value to check.
2777
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
2778
- * @example
2779
- *
2780
- * _.isObject({});
2781
- * // => true
2782
- *
2783
- * _.isObject([1, 2, 3]);
2784
- * // => true
2785
- *
2786
- * _.isObject(_.noop);
2787
- * // => true
2788
- *
2789
- * _.isObject(null);
2790
- * // => false
2791
- */
2792
- function isObject(value) {
2793
- var type = typeof value;
2794
- return !!value && (type == 'object' || type == 'function');
2795
- }
2796
-
2797
- /**
2798
- * Checks if `value` is object-like. A value is object-like if it's not `null`
2799
- * and has a `typeof` result of "object".
2800
- *
2801
- * @static
2802
- * @memberOf _
2803
- * @since 4.0.0
2804
- * @category Lang
2805
- * @param {*} value The value to check.
2806
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
2807
- * @example
2808
- *
2809
- * _.isObjectLike({});
2810
- * // => true
2811
- *
2812
- * _.isObjectLike([1, 2, 3]);
2813
- * // => true
2814
- *
2815
- * _.isObjectLike(_.noop);
2816
- * // => false
2817
- *
2818
- * _.isObjectLike(null);
2819
- * // => false
2820
- */
2821
- function isObjectLike(value) {
2822
- return !!value && typeof value == 'object';
2823
- }
2824
-
2825
- /**
2826
- * Checks if `value` is classified as a `Symbol` primitive or object.
2827
- *
2828
- * @static
2829
- * @memberOf _
2830
- * @since 4.0.0
2831
- * @category Lang
2832
- * @param {*} value The value to check.
2833
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
2834
- * @example
2835
- *
2836
- * _.isSymbol(Symbol.iterator);
2837
- * // => true
2838
- *
2839
- * _.isSymbol('abc');
2840
- * // => false
2841
- */
2842
- function isSymbol(value) {
2843
- return typeof value == 'symbol' ||
2844
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
2845
- }
2846
-
2847
- /**
2848
- * Checks if `value` is classified as a typed array.
2849
- *
2850
- * @static
2851
- * @memberOf _
2852
- * @since 3.0.0
2853
- * @category Lang
2854
- * @param {*} value The value to check.
2855
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
2856
- * @example
2857
- *
2858
- * _.isTypedArray(new Uint8Array);
2859
- * // => true
2860
- *
2861
- * _.isTypedArray([]);
2862
- * // => false
2863
- */
2864
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
2865
-
2866
- /**
2867
- * Converts `value` to a finite number.
2868
- *
2869
- * @static
2870
- * @memberOf _
2871
- * @since 4.12.0
2872
- * @category Lang
2873
- * @param {*} value The value to convert.
2874
- * @returns {number} Returns the converted number.
2875
- * @example
2876
- *
2877
- * _.toFinite(3.2);
2878
- * // => 3.2
2879
- *
2880
- * _.toFinite(Number.MIN_VALUE);
2881
- * // => 5e-324
2882
- *
2883
- * _.toFinite(Infinity);
2884
- * // => 1.7976931348623157e+308
2885
- *
2886
- * _.toFinite('3.2');
2887
- * // => 3.2
2888
- */
2889
- function toFinite(value) {
2890
- if (!value) {
2891
- return value === 0 ? value : 0;
2892
- }
2893
- value = toNumber(value);
2894
- if (value === INFINITY || value === -INFINITY) {
2895
- var sign = (value < 0 ? -1 : 1);
2896
- return sign * MAX_INTEGER;
2897
- }
2898
- return value === value ? value : 0;
2899
- }
2900
-
2901
- /**
2902
- * Converts `value` to an integer.
2903
- *
2904
- * **Note:** This method is loosely based on
2905
- * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
2906
- *
2907
- * @static
2908
- * @memberOf _
2909
- * @since 4.0.0
2910
- * @category Lang
2911
- * @param {*} value The value to convert.
2912
- * @returns {number} Returns the converted integer.
2913
- * @example
2914
- *
2915
- * _.toInteger(3.2);
2916
- * // => 3
2917
- *
2918
- * _.toInteger(Number.MIN_VALUE);
2919
- * // => 0
2920
- *
2921
- * _.toInteger(Infinity);
2922
- * // => 1.7976931348623157e+308
2923
- *
2924
- * _.toInteger('3.2');
2925
- * // => 3
2926
- */
2927
- function toInteger(value) {
2928
- var result = toFinite(value),
2929
- remainder = result % 1;
2930
-
2931
- return result === result ? (remainder ? result - remainder : result) : 0;
2932
- }
2933
-
2934
- /**
2935
- * Converts `value` to a number.
2936
- *
2937
- * @static
2938
- * @memberOf _
2939
- * @since 4.0.0
2940
- * @category Lang
2941
- * @param {*} value The value to process.
2942
- * @returns {number} Returns the number.
2943
- * @example
2944
- *
2945
- * _.toNumber(3.2);
2946
- * // => 3.2
2947
- *
2948
- * _.toNumber(Number.MIN_VALUE);
2949
- * // => 5e-324
2950
- *
2951
- * _.toNumber(Infinity);
2952
- * // => Infinity
2953
- *
2954
- * _.toNumber('3.2');
2955
- * // => 3.2
2956
- */
2957
- function toNumber(value) {
2958
- if (typeof value == 'number') {
2959
- return value;
2960
- }
2961
- if (isSymbol(value)) {
2962
- return NAN;
2963
- }
2964
- if (isObject(value)) {
2965
- var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
2966
- value = isObject(other) ? (other + '') : other;
2967
- }
2968
- if (typeof value != 'string') {
2969
- return value === 0 ? value : +value;
2970
- }
2971
- value = value.replace(reTrim, '');
2972
- var isBinary = reIsBinary.test(value);
2973
- return (isBinary || reIsOctal.test(value))
2974
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
2975
- : (reIsBadHex.test(value) ? NAN : +value);
2976
- }
2977
-
2978
- /**
2979
- * Converts `value` to a string. An empty string is returned for `null`
2980
- * and `undefined` values. The sign of `-0` is preserved.
2981
- *
2982
- * @static
2983
- * @memberOf _
2984
- * @since 4.0.0
2985
- * @category Lang
2986
- * @param {*} value The value to process.
2987
- * @returns {string} Returns the string.
2988
- * @example
2989
- *
2990
- * _.toString(null);
2991
- * // => ''
2992
- *
2993
- * _.toString(-0);
2994
- * // => '-0'
2995
- *
2996
- * _.toString([1, 2, 3]);
2997
- * // => '1,2,3'
2998
- */
2999
- function toString(value) {
3000
- return value == null ? '' : baseToString(value);
3001
- }
3002
-
3003
- /**
3004
- * Gets the value at `path` of `object`. If the resolved value is
3005
- * `undefined`, the `defaultValue` is returned in its place.
3006
- *
3007
- * @static
3008
- * @memberOf _
3009
- * @since 3.7.0
3010
- * @category Object
3011
- * @param {Object} object The object to query.
3012
- * @param {Array|string} path The path of the property to get.
3013
- * @param {*} [defaultValue] The value returned for `undefined` resolved values.
3014
- * @returns {*} Returns the resolved value.
3015
- * @example
3016
- *
3017
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
3018
- *
3019
- * _.get(object, 'a[0].b.c');
3020
- * // => 3
3021
- *
3022
- * _.get(object, ['a', '0', 'b', 'c']);
3023
- * // => 3
3024
- *
3025
- * _.get(object, 'a.b.c', 'default');
3026
- * // => 'default'
3027
- */
3028
- function get(object, path, defaultValue) {
3029
- var result = object == null ? undefined : baseGet(object, path);
3030
- return result === undefined ? defaultValue : result;
3031
- }
3032
-
3033
- /**
3034
- * Checks if `path` is a direct or inherited property of `object`.
3035
- *
3036
- * @static
3037
- * @memberOf _
3038
- * @since 4.0.0
3039
- * @category Object
3040
- * @param {Object} object The object to query.
3041
- * @param {Array|string} path The path to check.
3042
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
3043
- * @example
3044
- *
3045
- * var object = _.create({ 'a': _.create({ 'b': 2 }) });
3046
- *
3047
- * _.hasIn(object, 'a');
3048
- * // => true
3049
- *
3050
- * _.hasIn(object, 'a.b');
3051
- * // => true
3052
- *
3053
- * _.hasIn(object, ['a', 'b']);
3054
- * // => true
3055
- *
3056
- * _.hasIn(object, 'b');
3057
- * // => false
3058
- */
3059
- function hasIn(object, path) {
3060
- return object != null && hasPath(object, path, baseHasIn);
3061
- }
3062
-
3063
- /**
3064
- * Creates an array of the own enumerable property names of `object`.
3065
- *
3066
- * **Note:** Non-object values are coerced to objects. See the
3067
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
3068
- * for more details.
3069
- *
3070
- * @static
3071
- * @since 0.1.0
3072
- * @memberOf _
3073
- * @category Object
3074
- * @param {Object} object The object to query.
3075
- * @returns {Array} Returns the array of property names.
3076
- * @example
3077
- *
3078
- * function Foo() {
3079
- * this.a = 1;
3080
- * this.b = 2;
3081
- * }
3082
- *
3083
- * Foo.prototype.c = 3;
3084
- *
3085
- * _.keys(new Foo);
3086
- * // => ['a', 'b'] (iteration order is not guaranteed)
3087
- *
3088
- * _.keys('hi');
3089
- * // => ['0', '1']
3090
- */
3091
- function keys(object) {
3092
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
3093
- }
3094
-
3095
- /**
3096
- * This method returns the first argument it receives.
3097
- *
3098
- * @static
3099
- * @since 0.1.0
3100
- * @memberOf _
3101
- * @category Util
3102
- * @param {*} value Any value.
3103
- * @returns {*} Returns `value`.
3104
- * @example
3105
- *
3106
- * var object = { 'a': 1 };
3107
- *
3108
- * console.log(_.identity(object) === object);
3109
- * // => true
3110
- */
3111
- function identity(value) {
3112
- return value;
3113
- }
3114
-
3115
- /**
3116
- * Creates a function that returns the value at `path` of a given object.
3117
- *
3118
- * @static
3119
- * @memberOf _
3120
- * @since 2.4.0
3121
- * @category Util
3122
- * @param {Array|string} path The path of the property to get.
3123
- * @returns {Function} Returns the new accessor function.
3124
- * @example
3125
- *
3126
- * var objects = [
3127
- * { 'a': { 'b': 2 } },
3128
- * { 'a': { 'b': 1 } }
3129
- * ];
3130
- *
3131
- * _.map(objects, _.property('a.b'));
3132
- * // => [2, 1]
3133
- *
3134
- * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
3135
- * // => [1, 2]
3136
- */
3137
- function property(path) {
3138
- return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
3139
- }
3140
-
3141
- module.exports = find;
3142
-
3143
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
3144
-
3145
- /***/ }),
3146
-
3147
- /***/ "./node_modules/webpack/buildin/global.js":
3148
- /*!***********************************!*\
3149
- !*** (webpack)/buildin/global.js ***!
3150
- \***********************************/
3151
- /*! no static exports found */
3152
- /***/ (function(module, exports) {
3153
-
3154
- var g;
3155
-
3156
- // This works in non-strict mode
3157
- g = (function() {
3158
- return this;
3159
- })();
3160
-
3161
- try {
3162
- // This works if eval is allowed (see CSP)
3163
- g = g || new Function("return this")();
3164
- } catch (e) {
3165
- // This works if the window reference is available
3166
- if (typeof window === "object") g = window;
3167
- }
3168
-
3169
- // g can still be undefined, but nothing to do about it...
3170
- // We return undefined, instead of nothing here, so it's
3171
- // easier to handle this case. if(!global) { ...}
3172
-
3173
- module.exports = g;
3174
-
3175
-
3176
- /***/ }),
3177
-
3178
- /***/ "./node_modules/webpack/buildin/module.js":
3179
- /*!***********************************!*\
3180
- !*** (webpack)/buildin/module.js ***!
3181
- \***********************************/
3182
- /*! no static exports found */
3183
- /***/ (function(module, exports) {
3184
-
3185
- module.exports = function(module) {
3186
- if (!module.webpackPolyfill) {
3187
- module.deprecate = function() {};
3188
- module.paths = [];
3189
- // module.parent = undefined by default
3190
- if (!module.children) module.children = [];
3191
- Object.defineProperty(module, "loaded", {
3192
- enumerable: true,
3193
- get: function() {
3194
- return module.l;
3195
- }
3196
- });
3197
- Object.defineProperty(module, "id", {
3198
- enumerable: true,
3199
- get: function() {
3200
- return module.i;
3201
- }
3202
- });
3203
- module.webpackPolyfill = 1;
3204
- }
3205
- return module;
3206
- };
3207
-
3208
-
3209
- /***/ }),
3210
-
3211
- /***/ "./src/CreatorFunctions.ts":
3212
- /*!*********************************!*\
3213
- !*** ./src/CreatorFunctions.ts ***!
3214
- \*********************************/
3215
- /*! exports provided: getCreatorFunctions */
3216
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3217
-
3218
- "use strict";
3219
- __webpack_require__.r(__webpack_exports__);
3220
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCreatorFunctions", function() { return getCreatorFunctions; });
3221
- var getCreatorFunctions = function getCreatorFunctions() {
3222
- return {
3223
- shouldImport: shouldImport,
3224
- getCreatorImportArgs: getCreatorImportArgs
3225
- };
3226
- };
3227
-
3228
- var shouldImport = function shouldImport(importKey, state) {
3229
- return true;
3230
- };
3231
-
3232
- var getCreatorImportArgs = function getCreatorImportArgs(importKey, state) {
3233
- return undefined;
3234
- };
3235
-
3236
- /***/ }),
3237
-
3238
- /***/ "./src/DerivedData.ts":
3239
- /*!****************************!*\
3240
- !*** ./src/DerivedData.ts ***!
3241
- \****************************/
3242
- /*! exports provided: FLASH_INSTRUCTION_TYPE, MODULE_NAME, ARGUMENT_GENERATE_API, ARGUMENT_INTERRUPT_DRIVEN, getDerivedData, getMyDerivedData, MyDerivedData */
3243
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
3244
-
3245
- "use strict";
3246
- __webpack_require__.r(__webpack_exports__);
3247
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FLASH_INSTRUCTION_TYPE", function() { return FLASH_INSTRUCTION_TYPE; });
3248
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MODULE_NAME", function() { return MODULE_NAME; });
3249
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARGUMENT_GENERATE_API", function() { return ARGUMENT_GENERATE_API; });
3250
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ARGUMENT_INTERRUPT_DRIVEN", function() { return ARGUMENT_INTERRUPT_DRIVEN; });
3251
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getDerivedData", function() { return getDerivedData; });
3252
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getMyDerivedData", function() { return getMyDerivedData; });
3253
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MyDerivedData", function() { return MyDerivedData; });
3254
- /* harmony import */ var _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @microchip/flash-interface */ "./node_modules/@microchip/flash-interface/lib/src/index.js");
3255
- /* harmony import */ var _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__);
3256
- /* harmony import */ var _GeneratorModel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneratorModel */ "./src/GeneratorModel.ts");
3257
- /* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash.find */ "./node_modules/lodash.find/index.js");
3258
- /* harmony import */ var lodash_find__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_find__WEBPACK_IMPORTED_MODULE_2__);
3259
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3260
-
3261
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3262
-
3263
-
3264
-
3265
-
3266
- var FLASH_UNLOCK_KEY = "0x00AA0055";
3267
- var FLASH_INSTRUCTION_TYPE = "uint32_t";
3268
- var MODULE_NAME = "FLASH";
3269
- var FLASH_WRITE_INSTRUCTION_COUNT = "flashWriteInstructionCount";
3270
- var DEFAULT_WRITE_SIZE = 4;
3271
- var OPTION_BLOCKING = "Blocking";
3272
- var OPTION_NON_BLOCKING = "Non-Blocking";
3273
- var CONFIG_16BIT_INTERFACE = "config_16bit_interface";
3274
- var ARGUMENT_GENERATE_API = "generateAPI";
3275
- var ARGUMENT_INTERRUPT_DRIVEN = "interruptDriven";
3276
- var getDerivedData = function getDerivedData(dataModel) {
3277
- if (dataModel) {
3278
- return new MyDerivedData(dataModel);
3279
- }
3280
-
3281
- return new EmptyDerivedData();
3282
- };
3283
- var getMyDerivedData = function getMyDerivedData(dataModel) {
3284
- if (dataModel) {
3285
- return new MyDerivedData(dataModel);
3286
- }
3287
-
3288
- return new EmptyDerivedData();
3289
- }; //This data will be used at the creator stage and relies on only the state
3290
-
3291
- var EmptyDerivedData = function EmptyDerivedData() {
3292
- _classCallCheck(this, EmptyDerivedData);
3293
-
3294
- _defineProperty(this, "getMyFunctions", function () {
3295
- return {};
3296
- });
3297
-
3298
- _defineProperty(this, "getModel", function () {
3299
- return undefined;
3300
- });
3301
- }; //This data will be used at the processor stage
3302
-
3303
-
3304
- var MyDerivedData = function MyDerivedData(dataModel) {
3305
- var _this = this;
3306
-
3307
- _classCallCheck(this, MyDerivedData);
3308
-
3309
- _defineProperty(this, "dataModel", void 0);
3310
-
3311
- _defineProperty(this, "getMyFunctions", function () {
3312
- return {
3313
- exportApi: _this.getMyExportApi,
3314
- templateData: _this.getMyTemplateData,
3315
- alerts: _this.getMyAlerts,
3316
- blockingAPIGenerate: _this.getBlockingAPIGenerationStatus,
3317
- nonBlockingAPIGenerate: _this.getNonBlockingAPIGenerationStatus,
3318
- overrideOptions: _this.overrideOptions,
3319
- overrideDefaultValues: _this.overrideDefaultValue,
3320
- "flash-interface_payload": _this.basic_flash_payload,
3321
- importName: _this.friendlyImportName,
3322
- exportName: _this.friendlyExportName,
3323
- isInterfaceUsed: _this.isFlashInterfaceUsed,
3324
- enableInterfaceDefinitionGeneration: _this.enableInterfaceDefinitionGeneration,
3325
- interrupt_service_results: _this.getFlashInterruptData,
3326
- system_16bit_initializer_results: _this.system_16bit_initializer_results,
3327
- config_16bit_interface_args: _this.getConfigBitArgs,
3328
- config_16bit_interface_results: _this.getConfigBitArgs,
3329
- calculatedFunction: _this.calculatedFunction
3330
- };
3331
- });
3332
-
3333
- _defineProperty(this, "getMyExportApi", function (interfaceId) {
3334
- if (interfaceId.name === _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId().name && interfaceId.version === _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId().version) {
3335
- var firmwareApi = _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].createFirmwareApi(MODULE_NAME);
3336
- return {
3337
- api: firmwareApi.api,
3338
- headerFiles: firmwareApi.headerFiles
3339
- };
3340
- }
3341
- });
3342
-
3343
- _defineProperty(this, "getMyTemplateData", function () {
3344
- return Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_1__["generatableItems"])(_this.dataModel).getGeneratableItems();
3345
- });
3346
-
3347
- _defineProperty(this, "getMyProcessedArgValue", function (componentName, exportArg) {
3348
- var processedArg;
3349
- exportArg.some(function (arg) {
3350
- if (arg["interface"] === _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId().name) {
3351
- processedArg = _this.basic_flash_args(componentName, arg);
3352
-
3353
- if (processedArg != undefined) {
3354
- return true;
3355
- }
3356
- }
3357
- });
3358
- return processedArg;
3359
- });
3360
-
3361
- _defineProperty(this, "overrideOptions", function (componentName) {
3362
- var defaultValue = [];
3363
-
3364
- switch (componentName) {
3365
- case FLASH_WRITE_INSTRUCTION_COUNT:
3366
- {
3367
- var flashWriteSize = String(_this.getFlashWordWriteSizeInInstructions());
3368
- var flashRowWriteSize = String(_this.getFlashWriteRowSizeInInstructions());
3369
- return [flashWriteSize, flashRowWriteSize];
3370
- }
3371
-
3372
- default:
3373
- return defaultValue;
3374
- }
3375
- });
3376
-
3377
- _defineProperty(this, "overrideDefaultValue", function (componentName) {
3378
- var retValue;
3379
-
3380
- switch (componentName) {
3381
- case FLASH_WRITE_INSTRUCTION_COUNT:
3382
- {
3383
- retValue = String(_this.getFlashWordWriteSizeInInstructions());
3384
- break;
3385
- }
3386
-
3387
- default:
3388
- {
3389
- break;
3390
- }
3391
- }
3392
-
3393
- return retValue;
3394
- });
3395
-
3396
- _defineProperty(this, "friendlyImportName", function (importKey) {
3397
- var importName;
3398
-
3399
- switch (importKey) {
3400
- case "nvm_ctrl_32bit_v1":
3401
- importName = "Flash Hardware";
3402
- break;
3403
-
3404
- case "system_16bit_initializer":
3405
- importName = "System Initializer";
3406
- break;
3407
-
3408
- case "config_16bit_interface":
3409
- importName = "Configuration Bits";
3410
- break;
3411
-
3412
- default:
3413
- importName = importKey;
3414
- }
3415
-
3416
- return importName;
3417
- });
3418
-
3419
- _defineProperty(this, "friendlyExportName", function (exportKey) {
3420
- var exportName = exportKey;
3421
-
3422
- if (exportKey === "flash") {
3423
- exportName = "Flash";
3424
- }
3425
-
3426
- return exportName;
3427
- });
3428
-
3429
- _defineProperty(this, "getActiveName", function () {
3430
- return "Flash PLIB";
3431
- });
3432
-
3433
- _defineProperty(this, "isFlashInterfaceUsed", function () {
3434
- var _this$dataModel, _this$dataModel$getEx;
3435
-
3436
- var exportData = _this.dataModel.getExportInterfaces().getInterfaceData();
3437
-
3438
- var interfaceData = lodash_find__WEBPACK_IMPORTED_MODULE_2___default()(exportData, function (i) {
3439
- return i["interface"] === _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId().name;
3440
- });
3441
-
3442
- var result = (_this$dataModel = _this.dataModel) === null || _this$dataModel === void 0 ? void 0 : (_this$dataModel$getEx = _this$dataModel.getExportInterfaces().getInterface("flash_interface", _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId())) === null || _this$dataModel$getEx === void 0 ? void 0 : _this$dataModel$getEx.results;
3443
-
3444
- if (interfaceData || result) {
3445
- return true;
3446
- }
3447
-
3448
- return false;
3449
- });
3450
-
3451
- _defineProperty(this, "getModuleNameForInterrupt", function () {
3452
- var _this$getFlashHardwar, _this$getFlashHardwar2;
3453
-
3454
- return (_this$getFlashHardwar = (_this$getFlashHardwar2 = _this.getFlashHardwareData()) === null || _this$getFlashHardwar2 === void 0 ? void 0 : _this$getFlashHardwar2.name.toLocaleUpperCase()) !== null && _this$getFlashHardwar !== void 0 ? _this$getFlashHardwar : "FLASH";
3455
- });
3456
-
3457
- _defineProperty(this, "getInterruptData", function (interruptAliasList) {
3458
- var interruptData = [];
3459
-
3460
- var isInterruptDriven = _this.isInterruptMode();
3461
-
3462
- interruptAliasList.forEach(function (interruptAlias) {
3463
- var _this$dataModel$getHa, _this$dataModel2, _this$dataModel2$getH, _this$dataModel2$getH2, _this$dataModel2$getH3, _this$dataModel2$getH4;
3464
-
3465
- interruptData.push({
3466
- interruptName: (_this$dataModel$getHa = (_this$dataModel2 = _this.dataModel) === null || _this$dataModel2 === void 0 ? void 0 : (_this$dataModel2$getH = _this$dataModel2.getHardware()) === null || _this$dataModel2$getH === void 0 ? void 0 : (_this$dataModel2$getH2 = _this$dataModel2$getH.getPeripheral()) === null || _this$dataModel2$getH2 === void 0 ? void 0 : (_this$dataModel2$getH3 = _this$dataModel2$getH2.interrupts) === null || _this$dataModel2$getH3 === void 0 ? void 0 : (_this$dataModel2$getH4 = _this$dataModel2$getH3[interruptAlias]) === null || _this$dataModel2$getH4 === void 0 ? void 0 : _this$dataModel2$getH4.name) !== null && _this$dataModel$getHa !== void 0 ? _this$dataModel$getHa : "",
3467
- isEnabled: isInterruptDriven
3468
- });
3469
- });
3470
- return interruptData;
3471
- });
3472
-
3473
- _defineProperty(this, "getFlashHardwareData", function () {
3474
- return _this.getModel().getImportValue("nvm_ctrl_32bit_upb_v1");
3475
- });
3476
-
3477
- _defineProperty(this, "basic_flash_args", function (componentName, arg) {
3478
- var processedArg;
3479
-
3480
- switch (componentName) {
3481
- case FLASH_WRITE_INSTRUCTION_COUNT:
3482
- if (arg != undefined && arg.name === FLASH_WRITE_INSTRUCTION_COUNT) {
3483
- processedArg = {
3484
- "interface": arg["interface"],
3485
- name: arg.name,
3486
- value: _this.getFlashWriteInstructionCountToImpl(arg.value),
3487
- module: arg.module
3488
- };
3489
- }
3490
-
3491
- break;
3492
-
3493
- default:
3494
- break;
3495
- }
3496
-
3497
- return processedArg;
3498
- });
3499
-
3500
- _defineProperty(this, "getFlashWriteInstructionCountToImpl", function (flashWriteInstCount) {
3501
- if (flashWriteInstCount != undefined) {
3502
- var flashWriteCount = flashWriteInstCount;
3503
-
3504
- var minFlashWordSize = _this.getFlashWordWriteSizeInInstructions();
3505
-
3506
- var flashRowWriteSize = _this.getFlashWriteRowSizeInInstructions();
3507
-
3508
- if (flashWriteInstCount != minFlashWordSize && flashWriteInstCount != flashRowWriteSize) {
3509
- flashWriteCount = minFlashWordSize;
3510
- }
3511
-
3512
- return flashWriteCount;
3513
- } else {
3514
- return DEFAULT_WRITE_SIZE;
3515
- }
3516
- });
3517
-
3518
- _defineProperty(this, "isGenerateNonBlockingAPI", function () {
3519
- var generateNonBlockingAPI = false;
3520
-
3521
- var flashInterfaceResult = _this.getFlashResults(ARGUMENT_GENERATE_API);
3522
-
3523
- if (flashInterfaceResult != undefined) {
3524
- if (flashInterfaceResult != OPTION_BLOCKING) {
3525
- generateNonBlockingAPI = true;
3526
- } else {
3527
- generateNonBlockingAPI = false;
3528
- }
3529
- }
3530
-
3531
- return generateNonBlockingAPI;
3532
- });
3533
-
3534
- _defineProperty(this, "system_16bit_initializer_results", function () {
3535
- if (_this.isFlashInterfaceUsed()) {
3536
- if (_this.getNonBlockingAPIGenerationStatus() && _this.getInterruptDrivenStatus()) {
3537
- return {
3538
- initializer: [{
3539
- funcName: "FLASH_Initialize",
3540
- header: {
3541
- name: "flash_nonblocking.h",
3542
- path: "../flash/"
3543
- }
3544
- }]
3545
- };
3546
- }
3547
- }
3548
-
3549
- return {};
3550
- });
3551
-
3552
- _defineProperty(this, "getExportArg", function (componentName) {
3553
- var exportData = _this.dataModel.getExportInterfaces().getInterfaceData();
3554
-
3555
- var expArg = lodash_find__WEBPACK_IMPORTED_MODULE_2___default()(exportData, function (i) {
3556
- return i["interface"] === _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId().name && i.name === componentName;
3557
- });
3558
-
3559
- return expArg;
3560
- });
3561
-
3562
- _defineProperty(this, "getConfigBitArgs", function () {
3563
- return {
3564
- configBitByAliasFilter: ["BTMODE"],
3565
- configBitSet: {}
3566
- };
3567
- });
3568
-
3569
- _defineProperty(this, "getDualPartitionDetails", function () {
3570
- var hasDualPartition = _this.getFlashHasDualPartition();
3571
-
3572
- if (hasDualPartition) {
3573
- return {
3574
- flashFirstPartitionEndAddress: _this.getFlashFirstPartitionEndAddress(),
3575
- flashSecondPartitionBeginAddress: _this.getFlashSecondPartitionStartAddress(),
3576
- flashSecondPartitionProgramBeginAddress: _this.getFlashSecondPartitionProgramStartAddress(),
3577
- flashSecondPartitionEndAddress: _this.getFlashSecondPartitionEndAddress()
3578
- };
3579
- }
3580
- });
3581
-
3582
- _defineProperty(this, "getMyAlerts", function () {
3583
- return [];
3584
- });
3585
-
3586
- _defineProperty(this, "calculatedFunction", function () {
3587
- return;
3588
- });
3589
-
3590
- _defineProperty(this, "basic_flash_payload", function () {
3591
- var headerFiles = [];
3592
-
3593
- if (_this.getFlashHasDualPartition() && _this.getFlashDualPartitionEnabled()) {
3594
- headerFiles = [{
3595
- name: "flash_nonblocking.h",
3596
- path: "flash/"
3597
- }];
3598
- } else {
3599
- headerFiles = _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].createFirmwareApi(_this.dataModel.getName()).headerFiles;
3600
- }
3601
-
3602
- return {
3603
- interfaceApi: _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].createFirmwareApi(_this.dataModel.getName(), headerFiles),
3604
- flashWriteInstructionCount: _this.getFlashWriteInstructionCount(),
3605
- flashInterface: _this.getFlashInterface(),
3606
- flashWordWriteSizeInInstructions: _this.getFlashWordWriteSizeInInstructions(),
3607
- flashEraseInstructionCount: _this.getFlashEraseInstructionCount(),
3608
- flashHasAuxiliary: _this.getFlashHasAuxiliary(),
3609
- flashEnduranceMinimum: _this.getFlashEnduranceMinimum(),
3610
- flashBytesPerInstruction: _this.getFlashBytesPerInstruction(),
3611
- flashPcUnitsPerInstruction: _this.getFlashPcUnitsPerInstruction(),
3612
- flashWordWriteOpCode: _this.getFlashWordWriteOpCode(),
3613
- flashOpCodeMask: _this.getFlashOpCodeMask(),
3614
- flashErasePageSizeInInstructions: _this.getFlashErasePageSizeInInstructions(),
3615
- flashErasePageOpCode: _this.getFlashErasePageOpCode(),
3616
- flashHasEcc: _this.getFlashHasEcc(),
3617
- flashHasRowProgramming: _this.getFlashHasRowProgramming(),
3618
- flashWriteRowSizeInInstructions: _this.getFlashWriteRowSizeInInstructions(),
3619
- flashWriteRowOpCode: _this.getFlashWriteRowOpCode(),
3620
- flashEndAddress: _this.getFlashEndAddress(),
3621
- flashProgramBeginAddress: _this.getFlashProgramBeginAddress(),
3622
- flashUnlockKey: _this.getFlashUnlockKey(),
3623
- flashHasDualPartition: _this.getFlashHasDualPartition(),
3624
- flashBootMode: _this.getFlashBootModeValue(),
3625
- flashDualPartitionDetails: _this.getDualPartitionDetails()
3626
- };
3627
- });
3628
-
3629
- _defineProperty(this, "getFlashInterface", function () {
3630
- return "FLASH_UNIFIED_MEMORY_MAP_QUAD_WORD_v1.0";
3631
- });
3632
-
3633
- _defineProperty(this, "enableInterfaceDefinitionGeneration", function () {
3634
- var _this$dataModel3, _this$dataModel3$getI;
3635
-
3636
- var enableInterfaceGeneration = false;
3637
-
3638
- if (_this.isFlashInterfaceUsed() && ((_this$dataModel3 = _this.dataModel) === null || _this$dataModel3 === void 0 ? void 0 : (_this$dataModel3$getI = _this$dataModel3.getImportValue("system_16bit_initializer")) === null || _this$dataModel3$getI === void 0 ? void 0 : _this$dataModel3$getI.enableInterfaceDefinitionGeneration)) {
3639
- enableInterfaceGeneration = true;
3640
- }
3641
-
3642
- return enableInterfaceGeneration;
3643
- });
3644
-
3645
- _defineProperty(this, "getFlashInterruptData", function () {
3646
- var _this$getFlashHardwar3;
3647
-
3648
- var interruptList = [];
3649
- var interrupts = (_this$getFlashHardwar3 = _this.getFlashHardwareData()) === null || _this$getFlashHardwar3 === void 0 ? void 0 : _this$getFlashHardwar3.interrupts;
3650
-
3651
- for (var key in interrupts) {
3652
- interruptList.push(key);
3653
- }
3654
-
3655
- return {
3656
- moduleName: _this.getModuleNameForInterrupt(),
3657
- interruptData: _this.getInterruptData(interruptList)
3658
- };
3659
- });
3660
-
3661
- _defineProperty(this, "isInterruptMode", function () {
3662
- if (_this.isFlashInterfaceUsed()) {
3663
- return _this.getInterruptDrivenStatus();
3664
- } else {
3665
- return false;
3666
- }
3667
- });
3668
-
3669
- _defineProperty(this, "getInterruptDrivenStatus", function () {
3670
- var interruptDriven = false;
3671
-
3672
- var flashInterfaceResult = _this.getFlashResults(ARGUMENT_INTERRUPT_DRIVEN);
3673
-
3674
- if (flashInterfaceResult != undefined) {
3675
- interruptDriven = flashInterfaceResult;
3676
- }
3677
-
3678
- return interruptDriven;
3679
- });
3680
-
3681
- _defineProperty(this, "getFlashWordWriteSizeInInstructions", function () {
3682
- return _this.getFlashWordWriteSizeInInstructionsValue(_this.dataModel);
3683
- });
3684
-
3685
- _defineProperty(this, "getFlashWordWriteSizeInInstructionsValue", function (model) {
3686
- var _model$getHardware, _model$getHardware$ge, _model$getHardware$ge2, _model$getHardware$ge3;
3687
-
3688
- var flashWordWriteSizeInInstructions;
3689
-
3690
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware = model.getHardware()) === null || _model$getHardware === void 0 ? void 0 : (_model$getHardware$ge = _model$getHardware.getPeripheral()) === null || _model$getHardware$ge === void 0 ? void 0 : (_model$getHardware$ge2 = _model$getHardware$ge.properties) === null || _model$getHardware$ge2 === void 0 ? void 0 : (_model$getHardware$ge3 = _model$getHardware$ge2.FLASH_WORD_WRITE_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware$ge3 === void 0 ? void 0 : _model$getHardware$ge3.value) != undefined) {
3691
- var _model$getHardware2, _model$getHardware2$g, _model$getHardware2$g2, _model$getHardware2$g3;
3692
-
3693
- flashWordWriteSizeInInstructions = Number((_model$getHardware2 = model.getHardware()) === null || _model$getHardware2 === void 0 ? void 0 : (_model$getHardware2$g = _model$getHardware2.getPeripheral()) === null || _model$getHardware2$g === void 0 ? void 0 : (_model$getHardware2$g2 = _model$getHardware2$g.properties) === null || _model$getHardware2$g2 === void 0 ? void 0 : (_model$getHardware2$g3 = _model$getHardware2$g2.FLASH_WORD_WRITE_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware2$g3 === void 0 ? void 0 : _model$getHardware2$g3.value);
3694
- }
3695
-
3696
- return flashWordWriteSizeInInstructions;
3697
- });
3698
-
3699
- _defineProperty(this, "getFlashEraseInstructionCount", function () {
3700
- return _this.getFlashEraseInstructionCountValue(_this.dataModel);
3701
- });
3702
-
3703
- _defineProperty(this, "getFlashEraseInstructionCountValue", function (model) {
3704
- var _model$getHardware3, _model$getHardware3$g, _model$getHardware3$g2, _model$getHardware3$g3;
3705
-
3706
- var flashEraseInstructionCount;
3707
-
3708
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware3 = model.getHardware()) === null || _model$getHardware3 === void 0 ? void 0 : (_model$getHardware3$g = _model$getHardware3.getPeripheral()) === null || _model$getHardware3$g === void 0 ? void 0 : (_model$getHardware3$g2 = _model$getHardware3$g.properties) === null || _model$getHardware3$g2 === void 0 ? void 0 : (_model$getHardware3$g3 = _model$getHardware3$g2.FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware3$g3 === void 0 ? void 0 : _model$getHardware3$g3.value) != undefined) {
3709
- var _model$getHardware4, _model$getHardware4$g, _model$getHardware4$g2, _model$getHardware4$g3;
3710
-
3711
- flashEraseInstructionCount = Number(model === null || model === void 0 ? void 0 : (_model$getHardware4 = model.getHardware()) === null || _model$getHardware4 === void 0 ? void 0 : (_model$getHardware4$g = _model$getHardware4.getPeripheral()) === null || _model$getHardware4$g === void 0 ? void 0 : (_model$getHardware4$g2 = _model$getHardware4$g.properties) === null || _model$getHardware4$g2 === void 0 ? void 0 : (_model$getHardware4$g3 = _model$getHardware4$g2.FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware4$g3 === void 0 ? void 0 : _model$getHardware4$g3.value);
3712
- }
3713
-
3714
- return flashEraseInstructionCount;
3715
- });
3716
-
3717
- _defineProperty(this, "getFlashHasAuxiliary", function () {
3718
- return _this.getFlashHasAuxiliaryValue(_this.dataModel);
3719
- });
3720
-
3721
- _defineProperty(this, "getFlashHasAuxiliaryValue", function (model) {
3722
- var _model$getHardware5, _model$getHardware5$g, _model$getHardware5$g2, _model$getHardware5$g3;
3723
-
3724
- var flashHasAuxiliary;
3725
-
3726
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware5 = model.getHardware()) === null || _model$getHardware5 === void 0 ? void 0 : (_model$getHardware5$g = _model$getHardware5.getPeripheral()) === null || _model$getHardware5$g === void 0 ? void 0 : (_model$getHardware5$g2 = _model$getHardware5$g.properties) === null || _model$getHardware5$g2 === void 0 ? void 0 : (_model$getHardware5$g3 = _model$getHardware5$g2.FLASH_HAS_AUXILIARY) === null || _model$getHardware5$g3 === void 0 ? void 0 : _model$getHardware5$g3.value) != undefined) {
3727
- var _model$getHardware6, _model$getHardware6$g, _model$getHardware6$g2, _model$getHardware6$g3;
3728
-
3729
- flashHasAuxiliary = (model === null || model === void 0 ? void 0 : (_model$getHardware6 = model.getHardware()) === null || _model$getHardware6 === void 0 ? void 0 : (_model$getHardware6$g = _model$getHardware6.getPeripheral()) === null || _model$getHardware6$g === void 0 ? void 0 : (_model$getHardware6$g2 = _model$getHardware6$g.properties) === null || _model$getHardware6$g2 === void 0 ? void 0 : (_model$getHardware6$g3 = _model$getHardware6$g2.FLASH_HAS_AUXILIARY) === null || _model$getHardware6$g3 === void 0 ? void 0 : _model$getHardware6$g3.value) == "TRUE" ? 1 : 0;
3730
- }
3731
-
3732
- return flashHasAuxiliary;
3733
- });
3734
-
3735
- _defineProperty(this, "getFlashEnduranceMinimum", function () {
3736
- return _this.getFlashEnduranceMinimumValue(_this.dataModel);
3737
- });
3738
-
3739
- _defineProperty(this, "getFlashEnduranceMinimumValue", function (model) {
3740
- var _model$getHardware7, _model$getHardware7$g, _model$getHardware7$g2, _model$getHardware7$g3;
3741
-
3742
- var flashMinEndurance;
3743
-
3744
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware7 = model.getHardware()) === null || _model$getHardware7 === void 0 ? void 0 : (_model$getHardware7$g = _model$getHardware7.getPeripheral()) === null || _model$getHardware7$g === void 0 ? void 0 : (_model$getHardware7$g2 = _model$getHardware7$g.properties) === null || _model$getHardware7$g2 === void 0 ? void 0 : (_model$getHardware7$g3 = _model$getHardware7$g2.FLASH_ENDURANCE_MINIMUM) === null || _model$getHardware7$g3 === void 0 ? void 0 : _model$getHardware7$g3.value) != undefined) {
3745
- var _model$getHardware8, _model$getHardware8$g, _model$getHardware8$g2, _model$getHardware8$g3;
3746
-
3747
- flashMinEndurance = Number((_model$getHardware8 = model.getHardware()) === null || _model$getHardware8 === void 0 ? void 0 : (_model$getHardware8$g = _model$getHardware8.getPeripheral()) === null || _model$getHardware8$g === void 0 ? void 0 : (_model$getHardware8$g2 = _model$getHardware8$g.properties) === null || _model$getHardware8$g2 === void 0 ? void 0 : (_model$getHardware8$g3 = _model$getHardware8$g2.FLASH_ENDURANCE_MINIMUM) === null || _model$getHardware8$g3 === void 0 ? void 0 : _model$getHardware8$g3.value);
3748
- }
3749
-
3750
- return flashMinEndurance;
3751
- });
3752
-
3753
- _defineProperty(this, "getFlashBytesPerInstruction", function () {
3754
- return _this.getFlashBytesPerInstructionValue(_this.dataModel);
3755
- });
3756
-
3757
- _defineProperty(this, "getFlashBytesPerInstructionValue", function (model) {
3758
- var _model$getHardware9, _model$getHardware9$g, _model$getHardware9$g2, _model$getHardware9$g3;
3759
-
3760
- var flashBytesPerInstruction = 4;
3761
-
3762
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware9 = model.getHardware()) === null || _model$getHardware9 === void 0 ? void 0 : (_model$getHardware9$g = _model$getHardware9.getPeripheral()) === null || _model$getHardware9$g === void 0 ? void 0 : (_model$getHardware9$g2 = _model$getHardware9$g.properties) === null || _model$getHardware9$g2 === void 0 ? void 0 : (_model$getHardware9$g3 = _model$getHardware9$g2.FLASH_BYTES_PER_INSTRUCTION) === null || _model$getHardware9$g3 === void 0 ? void 0 : _model$getHardware9$g3.value) != undefined) {
3763
- var _model$getHardware10, _model$getHardware10$, _model$getHardware10$2, _model$getHardware10$3;
3764
-
3765
- flashBytesPerInstruction = Number((_model$getHardware10 = model.getHardware()) === null || _model$getHardware10 === void 0 ? void 0 : (_model$getHardware10$ = _model$getHardware10.getPeripheral()) === null || _model$getHardware10$ === void 0 ? void 0 : (_model$getHardware10$2 = _model$getHardware10$.properties) === null || _model$getHardware10$2 === void 0 ? void 0 : (_model$getHardware10$3 = _model$getHardware10$2.FLASH_BYTES_PER_INSTRUCTION) === null || _model$getHardware10$3 === void 0 ? void 0 : _model$getHardware10$3.value);
3766
- }
3767
-
3768
- return flashBytesPerInstruction;
3769
- });
3770
-
3771
- _defineProperty(this, "getFlashPcUnitsPerInstruction", function () {
3772
- return _this.getFlashPcUnitsPerInstructionValue(_this.dataModel);
3773
- });
3774
-
3775
- _defineProperty(this, "getFlashPcUnitsPerInstructionValue", function (model) {
3776
- var _model$getHardware11, _model$getHardware11$, _model$getHardware11$2, _model$getHardware11$3;
3777
-
3778
- var flashPcUnitsPerInstruction = 1;
3779
-
3780
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware11 = model.getHardware()) === null || _model$getHardware11 === void 0 ? void 0 : (_model$getHardware11$ = _model$getHardware11.getPeripheral()) === null || _model$getHardware11$ === void 0 ? void 0 : (_model$getHardware11$2 = _model$getHardware11$.properties) === null || _model$getHardware11$2 === void 0 ? void 0 : (_model$getHardware11$3 = _model$getHardware11$2.FLASH_PC_UNITS_PER_INSTRUCTION) === null || _model$getHardware11$3 === void 0 ? void 0 : _model$getHardware11$3.value) != undefined) {
3781
- var _model$getHardware12, _model$getHardware12$, _model$getHardware12$2, _model$getHardware12$3;
3782
-
3783
- flashPcUnitsPerInstruction = Number((_model$getHardware12 = model.getHardware()) === null || _model$getHardware12 === void 0 ? void 0 : (_model$getHardware12$ = _model$getHardware12.getPeripheral()) === null || _model$getHardware12$ === void 0 ? void 0 : (_model$getHardware12$2 = _model$getHardware12$.properties) === null || _model$getHardware12$2 === void 0 ? void 0 : (_model$getHardware12$3 = _model$getHardware12$2.FLASH_PC_UNITS_PER_INSTRUCTION) === null || _model$getHardware12$3 === void 0 ? void 0 : _model$getHardware12$3.value);
3784
- }
3785
-
3786
- return flashPcUnitsPerInstruction;
3787
- });
3788
-
3789
- _defineProperty(this, "getFlashWordWriteOpCode", function () {
3790
- return _this.getFlashWordWriteOpCodeValue(_this.dataModel);
3791
- });
3792
-
3793
- _defineProperty(this, "getFlashWordWriteOpCodeValue", function (model) {
3794
- var _model$getHardware13, _model$getHardware13$, _model$getHardware13$2, _model$getHardware13$3;
3795
-
3796
- var flashWordWriteOpcode;
3797
-
3798
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware13 = model.getHardware()) === null || _model$getHardware13 === void 0 ? void 0 : (_model$getHardware13$ = _model$getHardware13.getPeripheral()) === null || _model$getHardware13$ === void 0 ? void 0 : (_model$getHardware13$2 = _model$getHardware13$.properties) === null || _model$getHardware13$2 === void 0 ? void 0 : (_model$getHardware13$3 = _model$getHardware13$2.FLASH_WORD_WRITE_OP_CODE) === null || _model$getHardware13$3 === void 0 ? void 0 : _model$getHardware13$3.value) != undefined) {
3799
- var _model$getHardware14, _model$getHardware14$, _model$getHardware14$2, _model$getHardware14$3;
3800
-
3801
- flashWordWriteOpcode = Number((_model$getHardware14 = model.getHardware()) === null || _model$getHardware14 === void 0 ? void 0 : (_model$getHardware14$ = _model$getHardware14.getPeripheral()) === null || _model$getHardware14$ === void 0 ? void 0 : (_model$getHardware14$2 = _model$getHardware14$.properties) === null || _model$getHardware14$2 === void 0 ? void 0 : (_model$getHardware14$3 = _model$getHardware14$2.FLASH_WORD_WRITE_OP_CODE) === null || _model$getHardware14$3 === void 0 ? void 0 : _model$getHardware14$3.value);
3802
- }
3803
-
3804
- return flashWordWriteOpcode;
3805
- });
3806
-
3807
- _defineProperty(this, "getFlashOpCodeMask", function () {
3808
- return _this.getFlashOpCodeMaskValue(_this.dataModel);
3809
- });
3810
-
3811
- _defineProperty(this, "getFlashOpCodeMaskValue", function (model) {
3812
- var _model$getHardware15, _model$getHardware15$, _model$getHardware15$2, _model$getHardware15$3;
3813
-
3814
- var flashOpcodeMaks;
3815
-
3816
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware15 = model.getHardware()) === null || _model$getHardware15 === void 0 ? void 0 : (_model$getHardware15$ = _model$getHardware15.getPeripheral()) === null || _model$getHardware15$ === void 0 ? void 0 : (_model$getHardware15$2 = _model$getHardware15$.properties) === null || _model$getHardware15$2 === void 0 ? void 0 : (_model$getHardware15$3 = _model$getHardware15$2.FLASH_OP_CODE_MASK) === null || _model$getHardware15$3 === void 0 ? void 0 : _model$getHardware15$3.value) != undefined) {
3817
- var _model$getHardware16, _model$getHardware16$, _model$getHardware16$2, _model$getHardware16$3;
3818
-
3819
- flashOpcodeMaks = Number((_model$getHardware16 = model.getHardware()) === null || _model$getHardware16 === void 0 ? void 0 : (_model$getHardware16$ = _model$getHardware16.getPeripheral()) === null || _model$getHardware16$ === void 0 ? void 0 : (_model$getHardware16$2 = _model$getHardware16$.properties) === null || _model$getHardware16$2 === void 0 ? void 0 : (_model$getHardware16$3 = _model$getHardware16$2.FLASH_OP_CODE_MASK) === null || _model$getHardware16$3 === void 0 ? void 0 : _model$getHardware16$3.value);
3820
- }
3821
-
3822
- return flashOpcodeMaks;
3823
- });
3824
-
3825
- _defineProperty(this, "getFlashErasePageSizeInInstructions", function () {
3826
- return _this.getFlashErasePageSizeInInstructionsValue(_this.dataModel);
3827
- });
3828
-
3829
- _defineProperty(this, "getFlashErasePageSizeInInstructionsValue", function (model) {
3830
- var _model$getHardware17, _model$getHardware17$, _model$getHardware17$2, _model$getHardware17$3;
3831
-
3832
- var flashErasePageSizeInInstructions;
3833
-
3834
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware17 = model.getHardware()) === null || _model$getHardware17 === void 0 ? void 0 : (_model$getHardware17$ = _model$getHardware17.getPeripheral()) === null || _model$getHardware17$ === void 0 ? void 0 : (_model$getHardware17$2 = _model$getHardware17$.properties) === null || _model$getHardware17$2 === void 0 ? void 0 : (_model$getHardware17$3 = _model$getHardware17$2.FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware17$3 === void 0 ? void 0 : _model$getHardware17$3.value) != undefined) {
3835
- var _model$getHardware18, _model$getHardware18$, _model$getHardware18$2, _model$getHardware18$3;
3836
-
3837
- flashErasePageSizeInInstructions = Number((_model$getHardware18 = model.getHardware()) === null || _model$getHardware18 === void 0 ? void 0 : (_model$getHardware18$ = _model$getHardware18.getPeripheral()) === null || _model$getHardware18$ === void 0 ? void 0 : (_model$getHardware18$2 = _model$getHardware18$.properties) === null || _model$getHardware18$2 === void 0 ? void 0 : (_model$getHardware18$3 = _model$getHardware18$2.FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware18$3 === void 0 ? void 0 : _model$getHardware18$3.value);
3838
- }
3839
-
3840
- return flashErasePageSizeInInstructions;
3841
- });
3842
-
3843
- _defineProperty(this, "getFlashErasePageOpCode", function () {
3844
- return _this.getFlashErasePageOpCodeValue(_this.dataModel);
3845
- });
3846
-
3847
- _defineProperty(this, "getFlashErasePageOpCodeValue", function (model) {
3848
- var _model$getHardware19, _model$getHardware19$, _model$getHardware19$2, _model$getHardware19$3;
3849
-
3850
- var flashErasePageOpCode;
3851
-
3852
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware19 = model.getHardware()) === null || _model$getHardware19 === void 0 ? void 0 : (_model$getHardware19$ = _model$getHardware19.getPeripheral()) === null || _model$getHardware19$ === void 0 ? void 0 : (_model$getHardware19$2 = _model$getHardware19$.properties) === null || _model$getHardware19$2 === void 0 ? void 0 : (_model$getHardware19$3 = _model$getHardware19$2.FLASH_ERASE_PAGE_OP_CODE) === null || _model$getHardware19$3 === void 0 ? void 0 : _model$getHardware19$3.value) != undefined) {
3853
- var _model$getHardware20, _model$getHardware20$, _model$getHardware20$2, _model$getHardware20$3;
3854
-
3855
- flashErasePageOpCode = Number((_model$getHardware20 = model.getHardware()) === null || _model$getHardware20 === void 0 ? void 0 : (_model$getHardware20$ = _model$getHardware20.getPeripheral()) === null || _model$getHardware20$ === void 0 ? void 0 : (_model$getHardware20$2 = _model$getHardware20$.properties) === null || _model$getHardware20$2 === void 0 ? void 0 : (_model$getHardware20$3 = _model$getHardware20$2.FLASH_ERASE_PAGE_OP_CODE) === null || _model$getHardware20$3 === void 0 ? void 0 : _model$getHardware20$3.value);
3856
- }
3857
-
3858
- return flashErasePageOpCode;
3859
- });
3860
-
3861
- _defineProperty(this, "getFlashHasEcc", function () {
3862
- return _this.getFlashHasEccValue(_this.dataModel);
3863
- });
3864
-
3865
- _defineProperty(this, "getFlashHasEccValue", function (model) {
3866
- var _model$getHardware21, _model$getHardware21$, _model$getHardware21$2, _model$getHardware21$3;
3867
-
3868
- var flashHasEcc;
3869
-
3870
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware21 = model.getHardware()) === null || _model$getHardware21 === void 0 ? void 0 : (_model$getHardware21$ = _model$getHardware21.getPeripheral()) === null || _model$getHardware21$ === void 0 ? void 0 : (_model$getHardware21$2 = _model$getHardware21$.properties) === null || _model$getHardware21$2 === void 0 ? void 0 : (_model$getHardware21$3 = _model$getHardware21$2.FLASH_HAS_ECC) === null || _model$getHardware21$3 === void 0 ? void 0 : _model$getHardware21$3.value) != undefined) {
3871
- var _model$getHardware22, _model$getHardware22$, _model$getHardware22$2, _model$getHardware22$3;
3872
-
3873
- flashHasEcc = ((_model$getHardware22 = model.getHardware()) === null || _model$getHardware22 === void 0 ? void 0 : (_model$getHardware22$ = _model$getHardware22.getPeripheral()) === null || _model$getHardware22$ === void 0 ? void 0 : (_model$getHardware22$2 = _model$getHardware22$.properties) === null || _model$getHardware22$2 === void 0 ? void 0 : (_model$getHardware22$3 = _model$getHardware22$2.FLASH_HAS_ECC) === null || _model$getHardware22$3 === void 0 ? void 0 : _model$getHardware22$3.value) == "TRUE" ? 1 : 0;
3874
- }
3875
-
3876
- return flashHasEcc;
3877
- });
3878
-
3879
- _defineProperty(this, "getFlashHasRowProgramming", function () {
3880
- return _this.getFlashHasRowProgrammingValue(_this.dataModel);
3881
- });
3882
-
3883
- _defineProperty(this, "getFlashHasRowProgrammingValue", function (model) {
3884
- var _model$getHardware23, _model$getHardware23$, _model$getHardware23$2, _model$getHardware23$3;
3885
-
3886
- var flashHasRowProgramming;
3887
-
3888
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware23 = model.getHardware()) === null || _model$getHardware23 === void 0 ? void 0 : (_model$getHardware23$ = _model$getHardware23.getPeripheral()) === null || _model$getHardware23$ === void 0 ? void 0 : (_model$getHardware23$2 = _model$getHardware23$.properties) === null || _model$getHardware23$2 === void 0 ? void 0 : (_model$getHardware23$3 = _model$getHardware23$2.FLASH_HAS_ROW_PROGRAMMING) === null || _model$getHardware23$3 === void 0 ? void 0 : _model$getHardware23$3.value) != undefined) {
3889
- var _model$getHardware24, _model$getHardware24$, _model$getHardware24$2, _model$getHardware24$3;
3890
-
3891
- flashHasRowProgramming = ((_model$getHardware24 = model.getHardware()) === null || _model$getHardware24 === void 0 ? void 0 : (_model$getHardware24$ = _model$getHardware24.getPeripheral()) === null || _model$getHardware24$ === void 0 ? void 0 : (_model$getHardware24$2 = _model$getHardware24$.properties) === null || _model$getHardware24$2 === void 0 ? void 0 : (_model$getHardware24$3 = _model$getHardware24$2.FLASH_HAS_ROW_PROGRAMMING) === null || _model$getHardware24$3 === void 0 ? void 0 : _model$getHardware24$3.value) == "TRUE" ? 1 : 0;
3892
- }
3893
-
3894
- return flashHasRowProgramming;
3895
- });
3896
-
3897
- _defineProperty(this, "getFlashWriteRowSizeInInstructions", function () {
3898
- return _this.getFlashWriteRowSizeInInstructionsValue(_this.dataModel);
3899
- });
3900
-
3901
- _defineProperty(this, "getFlashWriteRowSizeInInstructionsValue", function (model) {
3902
- var _model$getHardware25, _model$getHardware25$, _model$getHardware25$2, _model$getHardware25$3;
3903
-
3904
- var flashWriteRowSizeInInstructions;
3905
-
3906
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware25 = model.getHardware()) === null || _model$getHardware25 === void 0 ? void 0 : (_model$getHardware25$ = _model$getHardware25.getPeripheral()) === null || _model$getHardware25$ === void 0 ? void 0 : (_model$getHardware25$2 = _model$getHardware25$.properties) === null || _model$getHardware25$2 === void 0 ? void 0 : (_model$getHardware25$3 = _model$getHardware25$2.FLASH_WRITE_ROW_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware25$3 === void 0 ? void 0 : _model$getHardware25$3.value) != undefined) {
3907
- var _model$getHardware26, _model$getHardware26$, _model$getHardware26$2, _model$getHardware26$3;
3908
-
3909
- flashWriteRowSizeInInstructions = Number(model === null || model === void 0 ? void 0 : (_model$getHardware26 = model.getHardware()) === null || _model$getHardware26 === void 0 ? void 0 : (_model$getHardware26$ = _model$getHardware26.getPeripheral()) === null || _model$getHardware26$ === void 0 ? void 0 : (_model$getHardware26$2 = _model$getHardware26$.properties) === null || _model$getHardware26$2 === void 0 ? void 0 : (_model$getHardware26$3 = _model$getHardware26$2.FLASH_WRITE_ROW_SIZE_IN_INSTRUCTIONS) === null || _model$getHardware26$3 === void 0 ? void 0 : _model$getHardware26$3.value);
3910
- }
3911
-
3912
- return flashWriteRowSizeInInstructions;
3913
- });
3914
-
3915
- _defineProperty(this, "getFlashWriteRowOpCode", function () {
3916
- return _this.getFlashWriteRowOpCodeValue(_this.dataModel);
3917
- });
3918
-
3919
- _defineProperty(this, "getFlashWriteRowOpCodeValue", function (model) {
3920
- var _model$getHardware27, _model$getHardware27$, _model$getHardware27$2, _model$getHardware27$3;
3921
-
3922
- var flashWriteRowOpCode;
3923
-
3924
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware27 = model.getHardware()) === null || _model$getHardware27 === void 0 ? void 0 : (_model$getHardware27$ = _model$getHardware27.getPeripheral()) === null || _model$getHardware27$ === void 0 ? void 0 : (_model$getHardware27$2 = _model$getHardware27$.properties) === null || _model$getHardware27$2 === void 0 ? void 0 : (_model$getHardware27$3 = _model$getHardware27$2.FLASH_WRITE_ROW_OP_CODE) === null || _model$getHardware27$3 === void 0 ? void 0 : _model$getHardware27$3.value) != undefined) {
3925
- var _model$getHardware28, _model$getHardware28$, _model$getHardware28$2, _model$getHardware28$3;
3926
-
3927
- flashWriteRowOpCode = Number(model === null || model === void 0 ? void 0 : (_model$getHardware28 = model.getHardware()) === null || _model$getHardware28 === void 0 ? void 0 : (_model$getHardware28$ = _model$getHardware28.getPeripheral()) === null || _model$getHardware28$ === void 0 ? void 0 : (_model$getHardware28$2 = _model$getHardware28$.properties) === null || _model$getHardware28$2 === void 0 ? void 0 : (_model$getHardware28$3 = _model$getHardware28$2.FLASH_WRITE_ROW_OP_CODE) === null || _model$getHardware28$3 === void 0 ? void 0 : _model$getHardware28$3.value);
3928
- }
3929
-
3930
- return flashWriteRowOpCode;
3931
- });
3932
-
3933
- _defineProperty(this, "getFlashEndAddress", function () {
3934
- return _this.getFlashEndAddressValue(_this.dataModel);
3935
- });
3936
-
3937
- _defineProperty(this, "getFlashEndAddressValue", function (model) {
3938
- var _model$getHardware29, _model$getHardware29$, _model$getHardware29$2, _model$getHardware29$3;
3939
-
3940
- var flashEndAddress;
3941
-
3942
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware29 = model.getHardware()) === null || _model$getHardware29 === void 0 ? void 0 : (_model$getHardware29$ = _model$getHardware29.getPeripheral()) === null || _model$getHardware29$ === void 0 ? void 0 : (_model$getHardware29$2 = _model$getHardware29$.properties) === null || _model$getHardware29$2 === void 0 ? void 0 : (_model$getHardware29$3 = _model$getHardware29$2.FLASH_END_ADDRESS) === null || _model$getHardware29$3 === void 0 ? void 0 : _model$getHardware29$3.value) != undefined) {
3943
- var _model$getHardware30, _model$getHardware30$, _model$getHardware30$2, _model$getHardware30$3;
3944
-
3945
- flashEndAddress = Number((_model$getHardware30 = model.getHardware()) === null || _model$getHardware30 === void 0 ? void 0 : (_model$getHardware30$ = _model$getHardware30.getPeripheral()) === null || _model$getHardware30$ === void 0 ? void 0 : (_model$getHardware30$2 = _model$getHardware30$.properties) === null || _model$getHardware30$2 === void 0 ? void 0 : (_model$getHardware30$3 = _model$getHardware30$2.FLASH_END_ADDRESS) === null || _model$getHardware30$3 === void 0 ? void 0 : _model$getHardware30$3.value);
3946
- }
3947
-
3948
- return flashEndAddress;
3949
- });
3950
-
3951
- _defineProperty(this, "getFlashProgramBeginAddress", function () {
3952
- return _this.getFlashProgramBeginAddressValue(_this.dataModel);
3953
- });
3954
-
3955
- _defineProperty(this, "getFlashProgramBeginAddressValue", function (model) {
3956
- var _model$getHardware31, _model$getHardware31$, _model$getHardware31$2, _model$getHardware31$3;
3957
-
3958
- var flashProgramBeginAddress;
3959
-
3960
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware31 = model.getHardware()) === null || _model$getHardware31 === void 0 ? void 0 : (_model$getHardware31$ = _model$getHardware31.getPeripheral()) === null || _model$getHardware31$ === void 0 ? void 0 : (_model$getHardware31$2 = _model$getHardware31$.properties) === null || _model$getHardware31$2 === void 0 ? void 0 : (_model$getHardware31$3 = _model$getHardware31$2.PROGRAM_BEGIN_ADDRESS) === null || _model$getHardware31$3 === void 0 ? void 0 : _model$getHardware31$3.value) != undefined) {
3961
- var _model$getHardware32, _model$getHardware32$, _model$getHardware32$2, _model$getHardware32$3;
3962
-
3963
- flashProgramBeginAddress = Number((_model$getHardware32 = model.getHardware()) === null || _model$getHardware32 === void 0 ? void 0 : (_model$getHardware32$ = _model$getHardware32.getPeripheral()) === null || _model$getHardware32$ === void 0 ? void 0 : (_model$getHardware32$2 = _model$getHardware32$.properties) === null || _model$getHardware32$2 === void 0 ? void 0 : (_model$getHardware32$3 = _model$getHardware32$2.PROGRAM_BEGIN_ADDRESS) === null || _model$getHardware32$3 === void 0 ? void 0 : _model$getHardware32$3.value);
3964
- }
3965
-
3966
- return flashProgramBeginAddress;
3967
- });
3968
-
3969
- _defineProperty(this, "getFlashUnlockKey", function () {
3970
- return FLASH_UNLOCK_KEY;
3971
- });
3972
-
3973
- _defineProperty(this, "getFlashHasDualPartition", function () {
3974
- return _this.getHasDualPartitionValue(_this.dataModel);
3975
- });
3976
-
3977
- _defineProperty(this, "getHasDualPartitionValue", function (model) {
3978
- var _model$getHardware33, _model$getHardware33$, _model$getHardware33$2, _model$getHardware33$3;
3979
-
3980
- var flashHasDualPartition;
3981
- var hasDualPartition = model === null || model === void 0 ? void 0 : (_model$getHardware33 = model.getHardware()) === null || _model$getHardware33 === void 0 ? void 0 : (_model$getHardware33$ = _model$getHardware33.getPeripheral()) === null || _model$getHardware33$ === void 0 ? void 0 : (_model$getHardware33$2 = _model$getHardware33$.properties) === null || _model$getHardware33$2 === void 0 ? void 0 : (_model$getHardware33$3 = _model$getHardware33$2.FLASH_HAS_DUAL_PARTITION) === null || _model$getHardware33$3 === void 0 ? void 0 : _model$getHardware33$3.value;
3982
-
3983
- if (hasDualPartition != undefined) {
3984
- if (hasDualPartition == "TRUE") {
3985
- flashHasDualPartition = true;
3986
- } else {
3987
- flashHasDualPartition = false;
3988
- }
3989
- }
3990
-
3991
- return flashHasDualPartition;
3992
- });
3993
-
3994
- _defineProperty(this, "getFlashBootModeValue", function () {
3995
- var btMode;
3996
-
3997
- var interfaceData = _this.dataModel.getImportValue(CONFIG_16BIT_INTERFACE);
3998
-
3999
- if (interfaceData != undefined) {
4000
- btMode = interfaceData.configBitSettingValueAliasMap["BTMODE"];
4001
- }
4002
-
4003
- return btMode;
4004
- });
4005
-
4006
- _defineProperty(this, "getFlashFirstPartitionEndAddress", function () {
4007
- return _this.getFlashFirstPartitionEndAddressValue(_this.dataModel);
4008
- });
4009
-
4010
- _defineProperty(this, "getFlashFirstPartitionEndAddressValue", function (model) {
4011
- var _model$getHardware34, _model$getHardware34$, _model$getHardware34$2, _model$getHardware34$3;
4012
-
4013
- var flashFirstPartitionEndAddress;
4014
-
4015
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware34 = model.getHardware()) === null || _model$getHardware34 === void 0 ? void 0 : (_model$getHardware34$ = _model$getHardware34.getPeripheral()) === null || _model$getHardware34$ === void 0 ? void 0 : (_model$getHardware34$2 = _model$getHardware34$.properties) === null || _model$getHardware34$2 === void 0 ? void 0 : (_model$getHardware34$3 = _model$getHardware34$2.FLASH_FIRST_PARTITION_END_ADDRESS) === null || _model$getHardware34$3 === void 0 ? void 0 : _model$getHardware34$3.value) != undefined) {
4016
- var _model$getHardware35, _model$getHardware35$, _model$getHardware35$2, _model$getHardware35$3;
4017
-
4018
- flashFirstPartitionEndAddress = Number((_model$getHardware35 = model.getHardware()) === null || _model$getHardware35 === void 0 ? void 0 : (_model$getHardware35$ = _model$getHardware35.getPeripheral()) === null || _model$getHardware35$ === void 0 ? void 0 : (_model$getHardware35$2 = _model$getHardware35$.properties) === null || _model$getHardware35$2 === void 0 ? void 0 : (_model$getHardware35$3 = _model$getHardware35$2.FLASH_FIRST_PARTITION_END_ADDRESS) === null || _model$getHardware35$3 === void 0 ? void 0 : _model$getHardware35$3.value);
4019
- }
4020
-
4021
- return flashFirstPartitionEndAddress;
4022
- });
4023
-
4024
- _defineProperty(this, "getFlashSecondPartitionStartAddress", function () {
4025
- return _this.getFlashSecondPartitionStartAddressValue(_this.getModel());
4026
- });
4027
-
4028
- _defineProperty(this, "getFlashSecondPartitionStartAddressValue", function (model) {
4029
- var _model$getHardware36, _model$getHardware36$, _model$getHardware36$2, _model$getHardware36$3;
4030
-
4031
- var flashSecondPartitionStartAddress;
4032
-
4033
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware36 = model.getHardware()) === null || _model$getHardware36 === void 0 ? void 0 : (_model$getHardware36$ = _model$getHardware36.getPeripheral()) === null || _model$getHardware36$ === void 0 ? void 0 : (_model$getHardware36$2 = _model$getHardware36$.properties) === null || _model$getHardware36$2 === void 0 ? void 0 : (_model$getHardware36$3 = _model$getHardware36$2.FLASH_SECOND_PARTITION_START_ADDRESS) === null || _model$getHardware36$3 === void 0 ? void 0 : _model$getHardware36$3.value) != undefined) {
4034
- var _model$getHardware37, _model$getHardware37$, _model$getHardware37$2, _model$getHardware37$3;
4035
-
4036
- flashSecondPartitionStartAddress = Number((_model$getHardware37 = model.getHardware()) === null || _model$getHardware37 === void 0 ? void 0 : (_model$getHardware37$ = _model$getHardware37.getPeripheral()) === null || _model$getHardware37$ === void 0 ? void 0 : (_model$getHardware37$2 = _model$getHardware37$.properties) === null || _model$getHardware37$2 === void 0 ? void 0 : (_model$getHardware37$3 = _model$getHardware37$2.FLASH_SECOND_PARTITION_START_ADDRESS) === null || _model$getHardware37$3 === void 0 ? void 0 : _model$getHardware37$3.value);
4037
- }
4038
-
4039
- return flashSecondPartitionStartAddress;
4040
- });
4041
-
4042
- _defineProperty(this, "getFlashSecondPartitionProgramStartAddress", function () {
4043
- return _this.getFlashSecondPartitionProgramStartAddressValue(_this.getModel());
4044
- });
4045
-
4046
- _defineProperty(this, "getFlashSecondPartitionProgramStartAddressValue", function (model) {
4047
- var _model$getHardware38, _model$getHardware38$, _model$getHardware38$2, _model$getHardware38$3;
4048
-
4049
- var flashSecondPartitionProgramStartAddress;
4050
-
4051
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware38 = model.getHardware()) === null || _model$getHardware38 === void 0 ? void 0 : (_model$getHardware38$ = _model$getHardware38.getPeripheral()) === null || _model$getHardware38$ === void 0 ? void 0 : (_model$getHardware38$2 = _model$getHardware38$.properties) === null || _model$getHardware38$2 === void 0 ? void 0 : (_model$getHardware38$3 = _model$getHardware38$2.FLASH_SECOND_PARTITION_PROGRAM_START_ADDRESS) === null || _model$getHardware38$3 === void 0 ? void 0 : _model$getHardware38$3.value) != undefined) {
4052
- var _model$getHardware39, _model$getHardware39$, _model$getHardware39$2, _model$getHardware39$3;
4053
-
4054
- flashSecondPartitionProgramStartAddress = Number((_model$getHardware39 = model.getHardware()) === null || _model$getHardware39 === void 0 ? void 0 : (_model$getHardware39$ = _model$getHardware39.getPeripheral()) === null || _model$getHardware39$ === void 0 ? void 0 : (_model$getHardware39$2 = _model$getHardware39$.properties) === null || _model$getHardware39$2 === void 0 ? void 0 : (_model$getHardware39$3 = _model$getHardware39$2.FLASH_SECOND_PARTITION_PROGRAM_START_ADDRESS) === null || _model$getHardware39$3 === void 0 ? void 0 : _model$getHardware39$3.value);
4055
- }
4056
-
4057
- return flashSecondPartitionProgramStartAddress;
4058
- });
4059
-
4060
- _defineProperty(this, "getFlashSecondPartitionEndAddress", function () {
4061
- return _this.getFlashSecondPartitionEndAddressValue(_this.getModel());
4062
- });
4063
-
4064
- _defineProperty(this, "getFlashSecondPartitionEndAddressValue", function (model) {
4065
- var _model$getHardware40, _model$getHardware40$, _model$getHardware40$2, _model$getHardware40$3;
4066
-
4067
- var flashSecondPartitionEndAddress;
4068
-
4069
- if ((model === null || model === void 0 ? void 0 : (_model$getHardware40 = model.getHardware()) === null || _model$getHardware40 === void 0 ? void 0 : (_model$getHardware40$ = _model$getHardware40.getPeripheral()) === null || _model$getHardware40$ === void 0 ? void 0 : (_model$getHardware40$2 = _model$getHardware40$.properties) === null || _model$getHardware40$2 === void 0 ? void 0 : (_model$getHardware40$3 = _model$getHardware40$2.FLASH_SECOND_PARTITION_END_ADDRESS) === null || _model$getHardware40$3 === void 0 ? void 0 : _model$getHardware40$3.value) != undefined) {
4070
- var _model$getHardware41, _model$getHardware41$, _model$getHardware41$2, _model$getHardware41$3;
4071
-
4072
- flashSecondPartitionEndAddress = Number((_model$getHardware41 = model.getHardware()) === null || _model$getHardware41 === void 0 ? void 0 : (_model$getHardware41$ = _model$getHardware41.getPeripheral()) === null || _model$getHardware41$ === void 0 ? void 0 : (_model$getHardware41$2 = _model$getHardware41$.properties) === null || _model$getHardware41$2 === void 0 ? void 0 : (_model$getHardware41$3 = _model$getHardware41$2.FLASH_SECOND_PARTITION_END_ADDRESS) === null || _model$getHardware41$3 === void 0 ? void 0 : _model$getHardware41$3.value);
4073
- }
4074
-
4075
- return flashSecondPartitionEndAddress;
4076
- });
4077
-
4078
- _defineProperty(this, "getFlashDualPartitionEnabled", function () {
4079
- return _this.getDualPartitionEnabledValue(_this.dataModel);
4080
- });
4081
-
4082
- _defineProperty(this, "getDualPartitionEnabledValue", function (model) {
4083
- var flashIsDualPartitionEnabled = false;
4084
-
4085
- var btMode = _this.getFlashBootModeValue();
4086
-
4087
- if (btMode != undefined) {
4088
- if (btMode != "SINGLE") {
4089
- flashIsDualPartitionEnabled = true;
4090
- }
4091
- }
4092
-
4093
- return flashIsDualPartitionEnabled;
4094
- });
4095
-
4096
- _defineProperty(this, "getFlashWriteInstructionCount", function () {
4097
- var flashWriteInstCount = _this.basic_flash_args(FLASH_WRITE_INSTRUCTION_COUNT, _this.getExportArg(FLASH_WRITE_INSTRUCTION_COUNT));
4098
-
4099
- if (flashWriteInstCount != undefined) {
4100
- return Number(flashWriteInstCount.value);
4101
- } else {
4102
- return Number(_this.getFlashWordWriteSizeInInstructions());
4103
- }
4104
- });
4105
-
4106
- _defineProperty(this, "getBlockingAPIGenerationStatus", function () {
4107
- var generateBlockingAPI = true;
4108
-
4109
- var flashInterfaceResult = _this.getFlashResults(ARGUMENT_GENERATE_API);
4110
-
4111
- if (flashInterfaceResult != undefined) {
4112
- if (flashInterfaceResult != OPTION_NON_BLOCKING) {
4113
- generateBlockingAPI = true;
4114
- } else {
4115
- generateBlockingAPI = false;
4116
- }
4117
- }
4118
-
4119
- return generateBlockingAPI;
4120
- });
4121
-
4122
- _defineProperty(this, "getNonBlockingAPIGenerationStatus", function () {
4123
- var nonBlockingAPIGenerate = _this.isGenerateNonBlockingAPI();
4124
-
4125
- if (nonBlockingAPIGenerate) {
4126
- if (_this.getFlashHasDualPartition() == undefined) {
4127
- nonBlockingAPIGenerate = false;
4128
- }
4129
- }
4130
-
4131
- return nonBlockingAPIGenerate;
4132
- });
4133
-
4134
- _defineProperty(this, "getFlashResults", function (resultsArg) {
4135
- var _this$dataModel4, _this$dataModel4$getE;
4136
-
4137
- var result;
4138
- var flashResults = (_this$dataModel4 = _this.dataModel) === null || _this$dataModel4 === void 0 ? void 0 : (_this$dataModel4$getE = _this$dataModel4.getExportInterfaces().getInterface("flash_interface", _microchip_flash_interface__WEBPACK_IMPORTED_MODULE_0__["Interface"].getInterfaceId())) === null || _this$dataModel4$getE === void 0 ? void 0 : _this$dataModel4$getE.results;
4139
-
4140
- if (flashResults != undefined) {
4141
- for (var moduleId in flashResults) {
4142
- var _flashResults$moduleI;
4143
-
4144
- result = (_flashResults$moduleI = flashResults[moduleId]) === null || _flashResults$moduleI === void 0 ? void 0 : _flashResults$moduleI[resultsArg];
4145
- }
4146
- }
4147
-
4148
- return result;
4149
- });
4150
-
4151
- _defineProperty(this, "getProperties", function () {
4152
- return _this.getPropertiesValue(_this.dataModel);
4153
- });
4154
-
4155
- _defineProperty(this, "getPropertiesValue", function (model) {
4156
- if ((model === null || model === void 0 ? void 0 : model.getHardware()) != undefined) {
4157
- var _model$getHardware42, _model$getHardware42$;
4158
-
4159
- return (_model$getHardware42 = model.getHardware()) === null || _model$getHardware42 === void 0 ? void 0 : (_model$getHardware42$ = _model$getHardware42.getPeripheral()) === null || _model$getHardware42$ === void 0 ? void 0 : _model$getHardware42$.properties;
4160
- }
4161
- });
4162
-
4163
- _defineProperty(this, "getFlashWordWriteOpCodeHexString", function () {
4164
- var opcode = _this.getFlashWordWriteOpCode();
4165
-
4166
- return _this.getHexaDecimalString(opcode);
4167
- });
4168
-
4169
- _defineProperty(this, "getFlashOpCodeMaskHexString", function () {
4170
- var opcode = _this.getFlashOpCodeMask();
4171
-
4172
- return _this.getHexaDecimalString(opcode);
4173
- });
4174
-
4175
- _defineProperty(this, "getFlashErasePageOpCodeHexString", function () {
4176
- var opcode = _this.getFlashErasePageOpCode();
4177
-
4178
- return _this.getHexaDecimalString(opcode);
4179
- });
4180
-
4181
- _defineProperty(this, "getFlashWriteRowOpCodeHexString", function () {
4182
- var opcode = _this.getFlashWriteRowOpCode();
4183
-
4184
- return _this.getHexaDecimalString(opcode);
4185
- });
4186
-
4187
- _defineProperty(this, "getFlashEndAddressHexString", function () {
4188
- var opcode = _this.getFlashEndAddress();
4189
-
4190
- return _this.getHexaDecimalString(opcode);
4191
- });
4192
-
4193
- _defineProperty(this, "getFlashProgramBeginAddressHexString", function () {
4194
- var opcode = _this.getFlashProgramBeginAddress();
4195
-
4196
- return _this.getHexaDecimalString(opcode);
4197
- });
4198
-
4199
- _defineProperty(this, "getHexaDecimalString", function (opcode) {
4200
- if (opcode != undefined) {
4201
- return "0x" + opcode.toString(16);
4202
- } else {
4203
- opcode = 0;
4204
- return "0x" + opcode.toString(16);
4205
- }
4206
- });
4207
-
4208
- _defineProperty(this, "getModel", function () {
4209
- return _this.dataModel;
4210
- });
4211
-
4212
- this.dataModel = dataModel;
4213
- };
4214
-
4215
- /***/ }),
4216
-
4217
- /***/ "./src/GeneratorModel.ts":
4218
- /*!*******************************!*\
4219
- !*** ./src/GeneratorModel.ts ***!
4220
- \*******************************/
4221
- /*! exports provided: generatableItems, getInterruptContextList, isContextSupported */
4222
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
4223
-
4224
- "use strict";
4225
- __webpack_require__.r(__webpack_exports__);
4226
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generatableItems", function() { return generatableItems; });
4227
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getInterruptContextList", function() { return getInterruptContextList; });
4228
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isContextSupported", function() { return isContextSupported; });
4229
- /* harmony import */ var _src_DerivedData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../src/DerivedData */ "./src/DerivedData.ts");
4230
- function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
4231
-
4232
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4233
-
4234
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
4235
-
4236
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4237
-
4238
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4239
-
4240
-
4241
- var generatableItems = function generatableItems(model) {
4242
- if (model) {
4243
- return new GeneratorModel(model);
4244
- }
4245
-
4246
- return undefined;
4247
- };
4248
-
4249
- var GeneratorModel = function GeneratorModel(dataModel) {
4250
- var _this = this;
4251
-
4252
- _classCallCheck(this, GeneratorModel);
4253
-
4254
- _defineProperty(this, "dataModel", void 0);
4255
-
4256
- _defineProperty(this, "getGeneratableItems", function () {
4257
- return _this.getFlashGeneratableItems();
4258
- });
4259
-
4260
- _defineProperty(this, "getFlashGeneratableItems", function () {
4261
- var _this$dataModel$getHa, _this$dataModel, _this$dataModel$getRe, _this$dataModel$getRe2, _this$dataModel2, _this$dataModel2$getR, _this$dataModel2$getR2, _this$dataModel3, _this$dataModel3$getR, _this$dataModel3$getR2, _this$dataModel4, _this$dataModel4$getR, _this$dataModel4$getR2, _this$dataModel5, _this$dataModel5$getR, _this$dataModel5$getR2, _this$dataModel6, _this$dataModel6$getR, _this$dataModel6$getR2, _this$dataModel7, _this$dataModel7$getR, _this$dataModel7$getR2;
4262
-
4263
- var derivedData = Object(_src_DerivedData__WEBPACK_IMPORTED_MODULE_0__["getMyDerivedData"])(_this.dataModel);
4264
- if (!derivedData) return;
4265
- var interruptDriven = derivedData.getInterruptDrivenStatus(); //The template data is now responsible for getting all the information for the ftl's
4266
-
4267
- var generatableItems = {
4268
- generatePLIBVersion: true,
4269
- PLIBVersion: "1.0.2",
4270
- disclaimer: "/*disclaimer*/",
4271
- generateInterfaceContent: derivedData.enableInterfaceDefinitionGeneration(),
4272
- moduleNameUpperCase: _this.dataModel.getName().toLocaleUpperCase(),
4273
- moduleNameLowerCase: _this.dataModel.getName().toLocaleLowerCase(),
4274
- generateBlockingAPI: derivedData.getBlockingAPIGenerationStatus(),
4275
- generateNonBlockingAPI: derivedData.getNonBlockingAPIGenerationStatus(),
4276
- interruptDriven: interruptDriven,
4277
- interfaceApi: derivedData.basic_flash_payload(),
4278
- properties: derivedData.getProperties(),
4279
- flashWordWriteSizeInInstructions: derivedData.getFlashWordWriteSizeInInstructions(),
4280
- flashInstructionType: _src_DerivedData__WEBPACK_IMPORTED_MODULE_0__["FLASH_INSTRUCTION_TYPE"],
4281
- flashWriteInstructionCount: String(derivedData.getFlashWriteInstructionCount()).replace(/,/g, ""),
4282
- flashInterface: derivedData.getFlashInterface(),
4283
- flashEraseInstructionCount: String(derivedData.getFlashEraseInstructionCount()).replace(/,/g, ""),
4284
- flashHasAuxiliary: derivedData.getFlashHasAuxiliary(),
4285
- flashEnduranceMinimum: derivedData.getFlashEnduranceMinimum(),
4286
- flashBytesPerInstruction: derivedData.getFlashBytesPerInstruction(),
4287
- flashPcUnitsPerInstruction: derivedData.getFlashPcUnitsPerInstruction(),
4288
- flashWordWriteOpCode: derivedData.getFlashWordWriteOpCodeHexString(),
4289
- flashRowWriteOpcode: derivedData.getFlashWriteRowOpCodeHexString(),
4290
- flashOpCodeMask: derivedData.getFlashOpCodeMaskHexString(),
4291
- flashErasePageSizeInInstructions: String(derivedData.getFlashErasePageSizeInInstructions()).replace(/,/g, ""),
4292
- flashPageEraseOpcode: derivedData.getFlashErasePageOpCodeHexString(),
4293
- flashHasEcc: derivedData.getFlashHasEcc(),
4294
- flashHasRowProgramming: derivedData.getFlashHasRowProgramming(),
4295
- flashWriteRowSizeInInstructions: String(derivedData.getFlashWriteRowSizeInInstructions()).replace(/,/g, ""),
4296
- flashEndAddress: derivedData.getFlashEndAddressHexString(),
4297
- flashProgramBeginAddress: derivedData.getFlashProgramBeginAddressHexString(),
4298
- flashUnlockKey: derivedData.getFlashUnlockKey(),
4299
- doxyDriverGroupName: "Flash Driver"
4300
- };
4301
- var interrupts = (_this$dataModel$getHa = _this.dataModel.getHardware()) === null || _this$dataModel$getHa === void 0 ? void 0 : _this$dataModel$getHa.getPeripheral().interrupts;
4302
-
4303
- if (interrupts != undefined) {
4304
- var flashInterrupt = interrupts["NVMI"];
4305
-
4306
- if (interruptDriven) {
4307
- var _flashInterrupt$enabl, _flashInterrupt$flag, _flashInterrupt$handl, _flashInterrupt$name;
4308
-
4309
- var contextList = getInterruptContextList(_this.dataModel);
4310
- generatableItems["flashInterruptEnable"] = (_flashInterrupt$enabl = flashInterrupt === null || flashInterrupt === void 0 ? void 0 : flashInterrupt.enable) !== null && _flashInterrupt$enabl !== void 0 ? _flashInterrupt$enabl : "";
4311
- generatableItems["flashInterruptFlag"] = (_flashInterrupt$flag = flashInterrupt === null || flashInterrupt === void 0 ? void 0 : flashInterrupt.flag) !== null && _flashInterrupt$flag !== void 0 ? _flashInterrupt$flag : "";
4312
- generatableItems["flashIsrHandlerName"] = (_flashInterrupt$handl = flashInterrupt === null || flashInterrupt === void 0 ? void 0 : flashInterrupt.handlerName) !== null && _flashInterrupt$handl !== void 0 ? _flashInterrupt$handl : "";
4313
- generatableItems["isFlashContextSupported"] = isContextSupported(contextList, (_flashInterrupt$name = flashInterrupt === null || flashInterrupt === void 0 ? void 0 : flashInterrupt.name) !== null && _flashInterrupt$name !== void 0 ? _flashInterrupt$name : "");
4314
- }
4315
- }
4316
-
4317
- generatableItems["nvmControlRegister"] = (_this$dataModel = _this.dataModel) === null || _this$dataModel === void 0 ? void 0 : (_this$dataModel$getRe = _this$dataModel.getRegisters()) === null || _this$dataModel$getRe === void 0 ? void 0 : (_this$dataModel$getRe2 = _this$dataModel$getRe.NVMCON) === null || _this$dataModel$getRe2 === void 0 ? void 0 : _this$dataModel$getRe2.name;
4318
- generatableItems["nvmAddressRegister"] = (_this$dataModel2 = _this.dataModel) === null || _this$dataModel2 === void 0 ? void 0 : (_this$dataModel2$getR = _this$dataModel2.getRegisters()) === null || _this$dataModel2$getR === void 0 ? void 0 : (_this$dataModel2$getR2 = _this$dataModel2$getR.NVMADR) === null || _this$dataModel2$getR2 === void 0 ? void 0 : _this$dataModel2$getR2.name;
4319
- generatableItems["nvmDataRegister0"] = (_this$dataModel3 = _this.dataModel) === null || _this$dataModel3 === void 0 ? void 0 : (_this$dataModel3$getR = _this$dataModel3.getRegisters()) === null || _this$dataModel3$getR === void 0 ? void 0 : (_this$dataModel3$getR2 = _this$dataModel3$getR.NVMDATA0) === null || _this$dataModel3$getR2 === void 0 ? void 0 : _this$dataModel3$getR2.name;
4320
- generatableItems["nvmDataRegister1"] = (_this$dataModel4 = _this.dataModel) === null || _this$dataModel4 === void 0 ? void 0 : (_this$dataModel4$getR = _this$dataModel4.getRegisters()) === null || _this$dataModel4$getR === void 0 ? void 0 : (_this$dataModel4$getR2 = _this$dataModel4$getR.NVMDATA1) === null || _this$dataModel4$getR2 === void 0 ? void 0 : _this$dataModel4$getR2.name;
4321
- generatableItems["nvmDataRegister2"] = (_this$dataModel5 = _this.dataModel) === null || _this$dataModel5 === void 0 ? void 0 : (_this$dataModel5$getR = _this$dataModel5.getRegisters()) === null || _this$dataModel5$getR === void 0 ? void 0 : (_this$dataModel5$getR2 = _this$dataModel5$getR.NVMDATA2) === null || _this$dataModel5$getR2 === void 0 ? void 0 : _this$dataModel5$getR2.name;
4322
- generatableItems["nvmDataRegister3"] = (_this$dataModel6 = _this.dataModel) === null || _this$dataModel6 === void 0 ? void 0 : (_this$dataModel6$getR = _this$dataModel6.getRegisters()) === null || _this$dataModel6$getR === void 0 ? void 0 : (_this$dataModel6$getR2 = _this$dataModel6$getR.NVMDATA3) === null || _this$dataModel6$getR2 === void 0 ? void 0 : _this$dataModel6$getR2.name;
4323
- generatableItems["nvmSrcAddressRegister"] = (_this$dataModel7 = _this.dataModel) === null || _this$dataModel7 === void 0 ? void 0 : (_this$dataModel7$getR = _this$dataModel7.getRegisters()) === null || _this$dataModel7$getR === void 0 ? void 0 : (_this$dataModel7$getR2 = _this$dataModel7$getR.NVMSRCADR) === null || _this$dataModel7$getR2 === void 0 ? void 0 : _this$dataModel7$getR2.name;
4324
- return generatableItems;
4325
- });
4326
-
4327
- this.dataModel = dataModel;
4328
- };
4329
-
4330
- var getInterruptContextList = function getInterruptContextList(dataModel) {
4331
- var interruptPayload = dataModel.getImportValue("interrupt_service");
4332
- var contextList = [];
4333
-
4334
- if (interruptPayload) {
4335
- if (interruptPayload === null || interruptPayload === void 0 ? void 0 : interruptPayload.contextEnabledInterruptList) {
4336
- contextList = interruptPayload["contextEnabledInterruptList"];
4337
- }
4338
- }
4339
-
4340
- return contextList;
4341
- };
4342
- var isContextSupported = function isContextSupported(contextList, interruptName) {
4343
- var isContextSupported = false;
4344
-
4345
- var _iterator = _createForOfIteratorHelper(contextList),
4346
- _step;
4347
-
4348
- try {
4349
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
4350
- var ctxName = _step.value;
4351
-
4352
- if (ctxName === interruptName) {
4353
- isContextSupported = true;
4354
- break;
4355
- }
4356
- }
4357
- } catch (err) {
4358
- _iterator.e(err);
4359
- } finally {
4360
- _iterator.f();
4361
- }
4362
-
4363
- return isContextSupported;
4364
- };
4365
-
4366
- /***/ }),
4367
-
4368
- /***/ "./src/moduleConfig.json":
4369
- /*!*******************************!*\
4370
- !*** ./src/moduleConfig.json ***!
4371
- \*******************************/
4372
- /*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, tabs, isEntryPoint, templates, imports, exports, peripherals, default */
4373
- /***/ (function(module) {
4374
-
4375
- module.exports = JSON.parse("{\"moduleName\":\"Flash\",\"deviceType\":\"PIC\",\"booleanValues\":{\"true\":\"enabled\",\"false\":\"disabled\"},\"UIGroups\":{},\"UIOrder\":{},\"tabs\":{\"register\":\"Register Initialization\"},\"isEntryPoint\":false,\"templates\":[{\"src\":\"output/flash-a-core-ftl/flash.c.ftl\",\"dest\":\"flash/src/flash.c\",\"isGeneratableProperty\":\"blockingAPIGenerate\"},{\"src\":\"output/flash-a-core-ftl/flash.h.ftl\",\"dest\":\"flash/flash.h\",\"isGeneratableProperty\":\"blockingAPIGenerate\"},{\"src\":\"output/flash-a-core-ftl/flash_interface.h.ftl\",\"dest\":\"flash/flash_interface.h\",\"isGeneratableProperty\":\"enableInterfaceDefinitionGeneration\"},{\"src\":\"output/flash-a-core-ftl/flash_types.h.ftl\",\"dest\":\"flash/flash_types.h\"},{\"src\":\"output/flash-a-core-ftl/flash_nonblocking.c.ftl\",\"dest\":\"flash/src/flash_nonblocking.c\",\"isGeneratableProperty\":\"nonBlockingAPIGenerate\"},{\"src\":\"output/flash-a-core-ftl/flash_nonblocking.h.ftl\",\"dest\":\"flash/flash_nonblocking.h\",\"isGeneratableProperty\":\"nonBlockingAPIGenerate\"}],\"imports\":{\"nvm_ctrl_32bit_upb_v1\":{\"import\":{\"interfaceId\":{\"name\":\"nvm_ctrl_32bit_upb_v1\",\"version\":\"1.0.0\"},\"isRequired\":true}},\"system_16bit_initializer\":{\"nodeModule\":{\"importName\":\"system_16bit_initializer\",\"node\":\"@microchip/system-16bit-initializer\"},\"import\":{\"interfaceId\":{\"name\":\"system-16bit-initializer\",\"version\":\"^1.0.0\"}}},\"config_16bit_interface\":{\"import\":{\"interfaceId\":{\"name\":\"config-16bit-interface\",\"version\":\"^1.0.0\"}}},\"interrupt_service\":{\"import\":{\"interfaceId\":{\"name\":\"interrupt-16bit-interface\",\"version\":\"^1.0.0\"}}}},\"exports\":{\"flash_interface\":{\"interfaces\":[{\"interfaceId\":{\"name\":\"flash-interface\",\"version\":\"1.3.1\"}}]}},\"peripherals\":[{\"interfaceId\":{\"name\":\"nvm_ctrl_32bit_upb_v1\",\"version\":\"1.0.0\"},\"registers\":{\"NVMCON\":[{\"setting\":\"NVMOP\",\"name\":\"nvmopNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"DRBV\",\"name\":\"drbvNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"LOCK\",\"name\":\"lockNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"P2ACTIV\",\"name\":\"p2activNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"register\"]},{\"setting\":\"SFTSWP\",\"name\":\"sftswpNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"NVMPIDL\",\"name\":\"nvmpidlNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"WRERR\",\"name\":\"wrerrNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"WREN\",\"name\":\"wrenNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"WR\",\"name\":\"wrNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"WREC\",\"name\":\"wrecNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"register\"]},{\"setting\":\"WRRE\",\"name\":\"wrreNvmcon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMADR\":[{\"setting\":\"NVMADR\",\"name\":\"nvmadrNvmadr\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMDATA0\":[{\"setting\":\"DATA0\",\"name\":\"data0Nvmdata0\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMDATA1\":[{\"setting\":\"DATA1\",\"name\":\"data1Nvmdata1\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMDATA2\":[{\"setting\":\"DATA2\",\"name\":\"data2Nvmdata2\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMDATA3\":[{\"setting\":\"DATA3\",\"name\":\"data3Nvmdata3\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMSRCADR\":[{\"setting\":\"SRCADR\",\"name\":\"srcadrNvmsrcadr\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCCON\":[{\"setting\":\"FLTINJ\",\"name\":\"fltinjNvmecccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"SECIE\",\"name\":\"secieNvmecccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"ECCLOCK\",\"name\":\"ecclockNvmecccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCSTAT\":[{\"setting\":\"DED\",\"name\":\"dedNvmeccstat\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"DEDO\",\"name\":\"dedoNvmeccstat\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"SEC\",\"name\":\"secNvmeccstat\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"SECO\",\"name\":\"secoNvmeccstat\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"FLEC\",\"name\":\"flecNvmeccstat\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"register\"]},{\"setting\":\"ESEL\",\"name\":\"eselNvmeccstat\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCFPTR\":[{\"setting\":\"FLT1LPTR\",\"name\":\"flt1lptrNvmeccfptr\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"FLT2LPTR\",\"name\":\"flt2lptrNvmeccfptr\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCFADR\":[{\"setting\":\"ECCFADR\",\"name\":\"eccfadrNvmeccfadr\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCEADR\":[{\"setting\":\"ECCEADR\",\"name\":\"ecceadrNvmecceadr\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCEDATA0\":[{\"setting\":\"ECCEDATA0\",\"name\":\"eccedata0Nvmeccedata0\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCEDATA1\":[{\"setting\":\"ECCEDATA1\",\"name\":\"eccedata1Nvmeccedata1\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCEDATA2\":[{\"setting\":\"ECCEDATA2\",\"name\":\"eccedata2Nvmeccedata2\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCEDATA3\":[{\"setting\":\"ECCEDATA3\",\"name\":\"eccedata3Nvmeccedata3\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMECCVAL\":[{\"setting\":\"ECCVAL\",\"name\":\"eccvalNvmeccval\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"register\"]}],\"NVMECCSYND\":[{\"setting\":\"ECCSYND\",\"name\":\"eccsyndNvmeccsynd\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"register\"]}],\"NVMCRCCON\":[{\"setting\":\"CRCEC\",\"name\":\"crcecNvmcrccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"register\"]},{\"setting\":\"OM\",\"name\":\"omNvmcrccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"CRCIDL\",\"name\":\"crcidlNvmcrccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"START\",\"name\":\"startNvmcrccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"ON\",\"name\":\"onNvmcrccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"]},{\"setting\":\"DELAY\",\"name\":\"delayNvmcrccon\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMCRCST\":[{\"setting\":\"CRCSTART\",\"name\":\"crcstartNvmcrcst\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMCRCEND\":[{\"setting\":\"CRCEND\",\"name\":\"crcendNvmcrcend\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMCRCSEED\":[{\"setting\":\"CRCSEED\",\"name\":\"crcseedNvmcrcseed\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"main\"]}],\"NVMCRCDATA\":[{\"setting\":\"CRCDATA\",\"name\":\"crcdataNvmcrcdata\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"register\"]}]},\"properties\":[\"PROGRAM_BEGIN_ADDRESS\",\"FLASH_HAS_ROW_PROGRAMMING\",\"FLASH_ENDURANCE_MINIMUM\",\"FLASH_WORD_WRITE_SIZE_IN_INSTRUCTIONS\",\"FLASH_END_ADDRESS\",\"FLASH_WORD_WRITE_OP_CODE\",\"FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS\",\"FLASH_WRITE_ROW_SIZE_IN_INSTRUCTIONS\",\"FLASH_HAS_DUAL_PARTITION\",\"FLASH_WRITE_ROW_OP_CODE\",\"FLASH_BYTES_PER_INSTRUCTION\",\"FLASH_HAS_ECC\",\"FLASH_ERASE_PAGE_OP_CODE\",\"FLASH_SECOND_PARTITION_END_ADDRESS\",\"FLASH_FIRST_PARTITION_END_ADDRESS\",\"FLASH_SECOND_PARTITION_PROGRAM_START_ADDRESS\",\"FLASH_SECOND_PARTITION_START_ADDRESS\"]}]}");
4376
-
4377
- /***/ })
4378
-
4379
- /******/ });
1
+ var autoProcessor;!function(){var e={6:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(408);t.buildSimpleApi=n.buildSimpleApi;var a=r(695);t.getInterfaceName=a.getInterfaceName,t.getInterfaceVersion=a.getInterfaceVersion},139:function(e){"use strict";e.exports=JSON.parse('{"moduleName":"Flash","deviceType":"PIC","booleanValues":{"true":"enabled","false":"disabled"},"UIGroups":{},"UIOrder":{},"tabs":{"register":"Register Initialization"},"isEntryPoint":false,"templates":[{"src":"output/flash-a-core-ftl/flash.c.ftl","dest":"flash/src/flash.c","isGeneratableProperty":"blockingAPIGenerate"},{"src":"output/flash-a-core-ftl/flash.h.ftl","dest":"flash/flash.h","isGeneratableProperty":"blockingAPIGenerate"},{"src":"output/flash-a-core-ftl/flash_interface.h.ftl","dest":"flash/flash_interface.h","isGeneratableProperty":"enableInterfaceDefinitionGeneration"},{"src":"output/flash-a-core-ftl/flash_types.h.ftl","dest":"flash/flash_types.h"},{"src":"output/flash-a-core-ftl/flash_nonblocking.c.ftl","dest":"flash/src/flash_nonblocking.c","isGeneratableProperty":"nonBlockingAPIGenerate"},{"src":"output/flash-a-core-ftl/flash_nonblocking.h.ftl","dest":"flash/flash_nonblocking.h","isGeneratableProperty":"nonBlockingAPIGenerate"}],"imports":{"nvm_ctrl_32bit_upb_v1":{"import":{"interfaceId":{"name":"nvm_ctrl_32bit_upb_v1","version":"1.0.0"},"isRequired":true}},"system_16bit_initializer":{"nodeModule":{"importName":"system_16bit_initializer","node":"@microchip/system-16bit-initializer"},"import":{"interfaceId":{"name":"system-16bit-initializer","version":"^1.0.0"}}},"config_16bit_interface":{"import":{"interfaceId":{"name":"config-16bit-interface","version":"^1.0.0"}}},"interrupt_service":{"import":{"interfaceId":{"name":"interrupt-16bit-interface","version":"^1.0.0"}}}},"exports":{"flash_interface":{"interfaces":[{"interfaceId":{"name":"flash-interface","version":"1.3.1"}}]}},"peripherals":[{"interfaceId":{"name":"nvm_ctrl_32bit_upb_v1","version":"1.0.0"},"registers":{"NVMCON":[{"setting":"NVMOP","name":"nvmopNvmcon","category":"hardware","description":"Insert Description Here","type":"ComboBox","group":"hardware","tabs":["main"]},{"setting":"DRBV","name":"drbvNvmcon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"LOCK","name":"lockNvmcon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"P2ACTIV","name":"p2activNvmcon","category":"hardware","description":"Insert Description Here","type":"ComboBox","group":"hardware","tabs":["register"]},{"setting":"SFTSWP","name":"sftswpNvmcon","category":"hardware","description":"Insert Description Here","type":"ComboBox","group":"hardware","tabs":["main"]},{"setting":"NVMPIDL","name":"nvmpidlNvmcon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"WRERR","name":"wrerrNvmcon","category":"hardware","description":"Insert Description Here","type":"ComboBox","group":"hardware","tabs":["main"]},{"setting":"WREN","name":"wrenNvmcon","category":"hardware","description":"Insert Description Here","type":"ComboBox","group":"hardware","tabs":["main"]},{"setting":"WR","name":"wrNvmcon","category":"hardware","description":"Insert Description Here","type":"ComboBox","group":"hardware","tabs":["main"]},{"setting":"WREC","name":"wrecNvmcon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["register"]},{"setting":"WRRE","name":"wrreNvmcon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]}],"NVMADR":[{"setting":"NVMADR","name":"nvmadrNvmadr","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMDATA0":[{"setting":"DATA0","name":"data0Nvmdata0","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMDATA1":[{"setting":"DATA1","name":"data1Nvmdata1","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMDATA2":[{"setting":"DATA2","name":"data2Nvmdata2","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMDATA3":[{"setting":"DATA3","name":"data3Nvmdata3","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMSRCADR":[{"setting":"SRCADR","name":"srcadrNvmsrcadr","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCCON":[{"setting":"FLTINJ","name":"fltinjNvmecccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"SECIE","name":"secieNvmecccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"ECCLOCK","name":"ecclockNvmecccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]}],"NVMECCSTAT":[{"setting":"DED","name":"dedNvmeccstat","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"DEDO","name":"dedoNvmeccstat","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"SEC","name":"secNvmeccstat","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"SECO","name":"secoNvmeccstat","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"FLEC","name":"flecNvmeccstat","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["register"]},{"setting":"ESEL","name":"eselNvmeccstat","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]}],"NVMECCFPTR":[{"setting":"FLT1LPTR","name":"flt1lptrNvmeccfptr","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]},{"setting":"FLT2LPTR","name":"flt2lptrNvmeccfptr","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCFADR":[{"setting":"ECCFADR","name":"eccfadrNvmeccfadr","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCEADR":[{"setting":"ECCEADR","name":"ecceadrNvmecceadr","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCEDATA0":[{"setting":"ECCEDATA0","name":"eccedata0Nvmeccedata0","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCEDATA1":[{"setting":"ECCEDATA1","name":"eccedata1Nvmeccedata1","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCEDATA2":[{"setting":"ECCEDATA2","name":"eccedata2Nvmeccedata2","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCEDATA3":[{"setting":"ECCEDATA3","name":"eccedata3Nvmeccedata3","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMECCVAL":[{"setting":"ECCVAL","name":"eccvalNvmeccval","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["register"]}],"NVMECCSYND":[{"setting":"ECCSYND","name":"eccsyndNvmeccsynd","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["register"]}],"NVMCRCCON":[{"setting":"CRCEC","name":"crcecNvmcrccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["register"]},{"setting":"OM","name":"omNvmcrccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"CRCIDL","name":"crcidlNvmcrccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"START","name":"startNvmcrccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"ON","name":"onNvmcrccon","category":"hardware","description":"Insert Description Here","type":"boolean","group":"hardware","tabs":["main"]},{"setting":"DELAY","name":"delayNvmcrccon","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMCRCST":[{"setting":"CRCSTART","name":"crcstartNvmcrcst","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMCRCEND":[{"setting":"CRCEND","name":"crcendNvmcrcend","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMCRCSEED":[{"setting":"CRCSEED","name":"crcseedNvmcrcseed","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["main"]}],"NVMCRCDATA":[{"setting":"CRCDATA","name":"crcdataNvmcrcdata","category":"hardware","description":"Insert Description Here","type":"string","group":"hardware","tabs":["register"]}]},"properties":["PROGRAM_BEGIN_ADDRESS","FLASH_HAS_ROW_PROGRAMMING","FLASH_ENDURANCE_MINIMUM","FLASH_WORD_WRITE_SIZE_IN_INSTRUCTIONS","FLASH_END_ADDRESS","FLASH_WORD_WRITE_OP_CODE","FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS","FLASH_WRITE_ROW_SIZE_IN_INSTRUCTIONS","FLASH_HAS_DUAL_PARTITION","FLASH_WRITE_ROW_OP_CODE","FLASH_BYTES_PER_INSTRUCTION","FLASH_HAS_ECC","FLASH_ERASE_PAGE_OP_CODE","FLASH_SECOND_PARTITION_END_ADDRESS","FLASH_FIRST_PARTITION_END_ADDRESS","FLASH_SECOND_PARTITION_PROGRAM_START_ADDRESS","FLASH_SECOND_PARTITION_START_ADDRESS"]}]}')},408:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildSimpleApi=function(e){var t={};for(var n in e)t[n]=r(e[n]);return t};var r=function(e){return e.returns+" "+e.name+"("+n(e.arguments)+")"},n=function(e){return e?e.map(function(e){return e.type+" "+e.name}).join(", "):"void"}},557:function(e,t,r){e=r.nmd(e);var n="__lodash_hash_undefined__",a=1/0,i=9007199254740991,o=17976931348623157e292,s=NaN,l="[object Arguments]",u="[object Array]",d="[object Boolean]",c="[object Date]",g="[object Error]",f="[object Function]",p="[object Map]",h="[object Number]",v="[object Object]",_="[object Promise]",m="[object RegExp]",I="[object Set]",y="[object String]",A="[object Symbol]",S="[object WeakMap]",E="[object ArrayBuffer]",b="[object DataView]",P=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,N=/^\w*$/,F=/^\./,R=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w=/^\s+|\s+$/g,D=/\\(\\)?/g,H=/^[-+]0x[0-9a-f]+$/i,C=/^0b[01]+$/i,O=/^\[object .+?Constructor\]$/,T=/^0o[0-7]+$/i,M=/^(?:0|[1-9]\d*)$/,W={};W["[object Float32Array]"]=W["[object Float64Array]"]=W["[object Int8Array]"]=W["[object Int16Array]"]=W["[object Int32Array]"]=W["[object Uint8Array]"]=W["[object Uint8ClampedArray]"]=W["[object Uint16Array]"]=W["[object Uint32Array]"]=!0,W[l]=W[u]=W[E]=W[d]=W[b]=W[c]=W[g]=W[f]=W[p]=W[h]=W[v]=W[m]=W[I]=W[y]=W[S]=!1;var L=parseInt,k="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,V="object"==typeof self&&self&&self.Object===Object&&self,B=k||V||Function("return this")(),U=t&&!t.nodeType&&t,j=U&&e&&!e.nodeType&&e,x=j&&j.exports===U&&k.process,G=function(){try{return x&&x.binding("util")}catch(e){}}(),z=G&&G.isTypedArray;function K(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}function $(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(r){}return t}function Z(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Y(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var q,J,X=Array.prototype,Q=Function.prototype,ee=Object.prototype,te=B["__core-js_shared__"],re=function(){var e=/[^.]+$/.exec(te&&te.keys&&te.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ne=Q.toString,ae=ee.hasOwnProperty,ie=ee.toString,oe=RegExp("^"+ne.call(ae).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),se=B.Symbol,le=B.Uint8Array,ue=ee.propertyIsEnumerable,de=X.splice,ce=(q=Object.keys,J=Object,function(e){return q(J(e))}),ge=Math.max,fe=xe(B,"DataView"),pe=xe(B,"Map"),he=xe(B,"Promise"),ve=xe(B,"Set"),_e=xe(B,"WeakMap"),me=xe(Object,"create"),Ie=Je(fe),ye=Je(pe),Ae=Je(he),Se=Je(ve),Ee=Je(_e),be=se?se.prototype:void 0,Pe=be?be.valueOf:void 0,Ne=be?be.toString:void 0;function Fe(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Re(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function we(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function De(e){var t=-1,r=e?e.length:0;for(this.__data__=new we;++t<r;)this.add(e[t])}function He(e){this.__data__=new Re(e)}function Ce(e,t){var r=nt(e)||rt(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,a=!!n;for(var i in e)!t&&!ae.call(e,i)||a&&("length"==i||ze(i,n))||r.push(i);return r}function Oe(e,t){for(var r=e.length;r--;)if(tt(e[r][0],t))return r;return-1}function Te(e,t){for(var r=0,n=(t=Ke(t,e)?[t]:Be(t)).length;null!=e&&r<n;)e=e[qe(t[r++])];return r&&r==n?e:void 0}function Me(e,t){return null!=e&&t in Object(e)}function We(e,t,r,n,a){return e===t||(null==e||null==t||!st(e)&&!lt(t)?e!==e&&t!==t:function(e,t,r,n,a,i){var o=nt(e),s=nt(t),f=u,_=u;o||(f=(f=Ge(e))==l?v:f);s||(_=(_=Ge(t))==l?v:_);var S=f==v&&!$(e),P=_==v&&!$(t),N=f==_;if(N&&!S)return i||(i=new He),o||dt(e)?Ue(e,t,r,n,a,i):function(e,t,r,n,a,i,o){switch(r){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case E:return!(e.byteLength!=t.byteLength||!n(new le(e),new le(t)));case d:case c:case h:return tt(+e,+t);case g:return e.name==t.name&&e.message==t.message;case m:case y:return e==t+"";case p:var s=Z;case I:var l=2&i;if(s||(s=Y),e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;i|=1,o.set(e,t);var f=Ue(s(e),s(t),n,a,i,o);return o.delete(e),f;case A:if(Pe)return Pe.call(e)==Pe.call(t)}return!1}(e,t,f,r,n,a,i);if(!(2&a)){var F=S&&ae.call(e,"__wrapped__"),R=P&&ae.call(t,"__wrapped__");if(F||R){var w=F?e.value():e,D=R?t.value():t;return i||(i=new He),r(w,D,n,a,i)}}if(!N)return!1;return i||(i=new He),function(e,t,r,n,a,i){var o=2&a,s=ct(e),l=s.length,u=ct(t),d=u.length;if(l!=d&&!o)return!1;var c=l;for(;c--;){var g=s[c];if(!(o?g in t:ae.call(t,g)))return!1}var f=i.get(e);if(f&&i.get(t))return f==t;var p=!0;i.set(e,t),i.set(t,e);var h=o;for(;++c<l;){var v=e[g=s[c]],_=t[g];if(n)var m=o?n(_,v,g,t,e,i):n(v,_,g,e,t,i);if(!(void 0===m?v===_||r(v,_,n,a,i):m)){p=!1;break}h||(h="constructor"==g)}if(p&&!h){var I=e.constructor,y=t.constructor;I==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof I&&I instanceof I&&"function"==typeof y&&y instanceof y||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,r,n,a,i)}(e,t,We,r,n,a))}function Le(e){return!(!st(e)||function(e){return!!re&&re in e}(e))&&(it(e)||$(e)?oe:O).test(Je(e))}function ke(e){return"function"==typeof e?e:null==e?gt:"object"==typeof e?nt(e)?function(e,t){if(Ke(e)&&$e(t))return Ze(qe(e),t);return function(r){var n=function(e,t,r){var n=null==e?void 0:Te(e,t);return void 0===n?r:n}(r,e);return void 0===n&&n===t?function(e,t){return null!=e&&function(e,t,r){t=Ke(t,e)?[t]:Be(t);var n,a=-1,i=t.length;for(;++a<i;){var o=qe(t[a]);if(!(n=null!=e&&r(e,o)))break;e=e[o]}if(n)return n;i=e?e.length:0;return!!i&&ot(i)&&ze(o,i)&&(nt(e)||rt(e))}(e,t,Me)}(r,e):We(t,n,void 0,3)}}(e[0],e[1]):function(e){var t=function(e){var t=ct(e),r=t.length;for(;r--;){var n=t[r],a=e[n];t[r]=[n,a,$e(a)]}return t}(e);if(1==t.length&&t[0][2])return Ze(t[0][0],t[0][1]);return function(r){return r===e||function(e,t,r,n){var a=r.length,i=a,o=!n;if(null==e)return!i;for(e=Object(e);a--;){var s=r[a];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<i;){var l=(s=r[a])[0],u=e[l],d=s[1];if(o&&s[2]){if(void 0===u&&!(l in e))return!1}else{var c=new He;if(n)var g=n(u,d,l,e,t,c);if(!(void 0===g?We(d,u,n,3,c):g))return!1}}return!0}(r,e,t)}}(e):function(e){return Ke(e)?(t=qe(e),function(e){return null==e?void 0:e[t]}):function(e){return function(t){return Te(t,e)}}(e);var t}(e)}function Ve(e){if(!function(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||ee;return e===r}(e))return ce(e);var t=[];for(var r in Object(e))ae.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Be(e){return nt(e)?e:Ye(e)}function Ue(e,t,r,n,a,i){var o=2&a,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=i.get(e);if(u&&i.get(t))return u==t;var d=-1,c=!0,g=1&a?new De:void 0;for(i.set(e,t),i.set(t,e);++d<s;){var f=e[d],p=t[d];if(n)var h=o?n(p,f,d,t,e,i):n(f,p,d,e,t,i);if(void 0!==h){if(h)continue;c=!1;break}if(g){if(!K(t,function(e,t){if(!g.has(t)&&(f===e||r(f,e,n,a,i)))return g.add(t)})){c=!1;break}}else if(f!==p&&!r(f,p,n,a,i)){c=!1;break}}return i.delete(e),i.delete(t),c}function je(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function xe(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Le(r)?r:void 0}Fe.prototype.clear=function(){this.__data__=me?me(null):{}},Fe.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Fe.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return ae.call(t,e)?t[e]:void 0},Fe.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ae.call(t,e)},Fe.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},Re.prototype.clear=function(){this.__data__=[]},Re.prototype.delete=function(e){var t=this.__data__,r=Oe(t,e);return!(r<0)&&(r==t.length-1?t.pop():de.call(t,r,1),!0)},Re.prototype.get=function(e){var t=this.__data__,r=Oe(t,e);return r<0?void 0:t[r][1]},Re.prototype.has=function(e){return Oe(this.__data__,e)>-1},Re.prototype.set=function(e,t){var r=this.__data__,n=Oe(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},we.prototype.clear=function(){this.__data__={hash:new Fe,map:new(pe||Re),string:new Fe}},we.prototype.delete=function(e){return je(this,e).delete(e)},we.prototype.get=function(e){return je(this,e).get(e)},we.prototype.has=function(e){return je(this,e).has(e)},we.prototype.set=function(e,t){return je(this,e).set(e,t),this},De.prototype.add=De.prototype.push=function(e){return this.__data__.set(e,n),this},De.prototype.has=function(e){return this.__data__.has(e)},He.prototype.clear=function(){this.__data__=new Re},He.prototype.delete=function(e){return this.__data__.delete(e)},He.prototype.get=function(e){return this.__data__.get(e)},He.prototype.has=function(e){return this.__data__.has(e)},He.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Re){var n=r.__data__;if(!pe||n.length<199)return n.push([e,t]),this;r=this.__data__=new we(n)}return r.set(e,t),this};var Ge=function(e){return ie.call(e)};function ze(e,t){return!!(t=null==t?i:t)&&("number"==typeof e||M.test(e))&&e>-1&&e%1==0&&e<t}function Ke(e,t){if(nt(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ut(e))||(N.test(e)||!P.test(e)||null!=t&&e in Object(t))}function $e(e){return e===e&&!st(e)}function Ze(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}(fe&&Ge(new fe(new ArrayBuffer(1)))!=b||pe&&Ge(new pe)!=p||he&&Ge(he.resolve())!=_||ve&&Ge(new ve)!=I||_e&&Ge(new _e)!=S)&&(Ge=function(e){var t=ie.call(e),r=t==v?e.constructor:void 0,n=r?Je(r):void 0;if(n)switch(n){case Ie:return b;case ye:return p;case Ae:return _;case Se:return I;case Ee:return S}return t});var Ye=et(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ut(e))return Ne?Ne.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return F.test(e)&&r.push(""),e.replace(R,function(e,t,n,a){r.push(n?a.replace(D,"$1"):t||e)}),r});function qe(e){if("string"==typeof e||ut(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Je(e){if(null!=e){try{return ne.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var Xe,Qe=(Xe=function(e,t,r){var n=e?e.length:0;if(!n)return-1;var i=null==r?0:function(e){var t=function(e){return e?(e=function(e){if("number"==typeof e)return e;if(ut(e))return s;if(st(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=st(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(w,"");var r=C.test(e);return r||T.test(e)?L(e.slice(2),r?2:8):H.test(e)?s:+e}(e))===a||e===-1/0?(e<0?-1:1)*o:e===e?e:0:0===e?e:0}(e),r=t%1;return t===t?r?t-r:t:0}(r);return i<0&&(i=ge(n+i,0)),function(e,t,r,n){for(var a=e.length,i=r+(n?1:-1);n?i--:++i<a;)if(t(e[i],i,e))return i;return-1}(e,ke(t),i)},function(e,t,r){var n=Object(e);if(!at(e)){var a=ke(t);e=ct(e),t=function(e){return a(n[e],e,n)}}var i=Xe(e,t,r);return i>-1?n[a?e[i]:i]:void 0});function et(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var o=e.apply(this,n);return r.cache=i.set(a,o),o};return r.cache=new(et.Cache||we),r}function tt(e,t){return e===t||e!==e&&t!==t}function rt(e){return function(e){return lt(e)&&at(e)}(e)&&ae.call(e,"callee")&&(!ue.call(e,"callee")||ie.call(e)==l)}et.Cache=we;var nt=Array.isArray;function at(e){return null!=e&&ot(e.length)&&!it(e)}function it(e){var t=st(e)?ie.call(e):"";return t==f||"[object GeneratorFunction]"==t}function ot(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=i}function st(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function lt(e){return!!e&&"object"==typeof e}function ut(e){return"symbol"==typeof e||lt(e)&&ie.call(e)==A}var dt=z?function(e){return function(t){return e(t)}}(z):function(e){return lt(e)&&ot(e.length)&&!!W[ie.call(e)]};function ct(e){return at(e)?Ce(e):Ve(e)}function gt(e){return e}e.exports=Qe},623:function(e){"use strict";e.exports=JSON.parse('{"name":"@microchip/flash-interface","version":"1.3.1","license":"SEE LICENSE IN LICENSE.txt","main":"lib/src/index.js","typings":"./lib/src/index.d.ts","scripts":{"build":"tsc","test":"jest","lint:nofix":"eslint \\"./src/**/*.{ts,tsx}\\" --quiet","lint":"tsc --noEmit && yarn lint:nofix --fix"},"husky":{"hooks":{"pre-commit":"tsc --noEmit && lint-staged"}},"lint-staged":{"./src/**/*.{ts,tsx}":["eslint --fix"]},"bitBucketRepository":"https://bitbucket.microchip.com/projects/CC16SCRIP/repos/basic-flash-interface/browse","repository":{"type":"git","url":"git+ssh://git@https://bitbucket.microchip.com/scm/cc16scrip/basic-flash-interface.git"},"publishConfig":{"registry":"https://artifacts.microchip.com/artifactory/api/npm/npm/"},"jest":{"testPathIgnorePatterns":["/node_modules/","/run/","/lib/"],"modulePathIgnorePatterns":["<rootDir>/run"],"preset":"ts-jest","collectCoverage":true},"dependencies":{"@microchip/scf-common":"^3.5.0","@microchip/scf-interface":"^1.4.0"},"devDependencies":{"@types/jest":"^24.0.14","@types/node":"^12.0.10","@typescript-eslint/eslint-plugin":"^2.27.0","@typescript-eslint/parser":"^2.27.0","eslint":"^6.8.0","eslint-config-prettier":"^6.10.1","eslint-plugin-prettier":"^3.1.2","fs-extra":"^8.1.0","husky":"^4.2.4","jest":"^24.8.0","lint-staged":"^10.2.0","prettier":"^2.0.4","ts-jest":"^24.0.2","typescript":"^3.8.3"},"files":["lib/**/*"],"notificationEmail":"03234d44.microchip.com@amer.teams.ms"}')},645:function(e,t,r){"use strict";var n=r(888);t.K=n.Interface},695:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInterfaceName=function(e){var t;if(e&&(t=e.name)&&(t=t.replace("@microchip/","")),!t)throw new Error("Invalid Interface Name...!");return t},t.getInterfaceVersion=function(e){var t,r=new RegExp("\\d+.\\d+.\\d+");if(e&&(t=e.version),!t&&!r.test(t))throw new Error("Invalid Interface Version...!");return t}},888:function(e,t,r){"use strict";var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t};Object.defineProperty(t,"__esModule",{value:!0});var a=n(r(6)),i=n(r(623));t.getInterfaceId=function(){return{name:a.getInterfaceName(i),version:a.getInterfaceVersion(i)}};t.createApi=function(e){return{PageErase:{name:e+"_PageErase",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"unlockKey",type:"flash_key_t"}]},WordWrite:{name:e+"_WordWrite",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"flash_data_t *",type:"data"},{name:"unlockKey",type:"flash_key_t"}]},RowWrite:{name:e+"_RowWrite",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"flash_data_t *",type:"data"},{name:"unlockKey",type:"flash_key_t"}]},Read:{name:e+"_Read",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"count",type:"uint32_t"},{name:"flash_data_t *",type:"data"}]},ErasePageOffsetGet:{name:e+"_ErasePageOffsetGet",returns:"uint32_t",arguments:[{name:"flashAddress",type:"flash_adr_t"}]},ErasePageAddressGet:{name:e+"_ErasePageAddressGet",returns:"uint32_t",arguments:[{name:"flashAddress",type:"flash_adr_t"}]},Initialize:{name:e+"_Initialize",returns:"void",arguments:[]},NonBlockingPageErase:{name:e+"_NonBlockingPageErase",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"unlockKey",type:"flash_key_t"},{name:"callbackHandler",type:"FLASH_CALLBACK"},{name:"context",type:"void*"}]},NonBlockingBulkErase:{name:e+"_NonBlockingBulkErase",returns:e+"_RETURN_STATUS",arguments:[{name:"panel",type:"enum FLASH_PANEL"},{name:"unlockKey",type:"flash_key_t"},{name:"callbackHandler",type:"FLASH_CALLBACK"},{name:"context",type:"void*"}]},NonBlockingWordWrite:{name:e+"_NonBlockingWordWrite",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"flash_data_t *",type:"data"},{name:"unlockKey",type:"flash_key_t"},{name:"callbackHandler",type:"FLASH_CALLBACK"},{name:"context",type:"void*"}]},NonBlockingRowWrite:{name:e+"_NonBlockingRowWrite",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"flash_data_t *",type:"data"},{name:"unlockKey",type:"flash_key_t"},{name:"callbackHandler",type:"FLASH_CALLBACK"},{name:"context",type:"void*"}]},NonBlockingRead:{name:e+"_NonBlockingRead",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"count",type:"uint32_t"},{name:"flash_data_t *",type:"data"}]},NonBlockingPolledPageErase:{name:e+"_NonBlockingPolledPageErase",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"unlockKey",type:"flash_key_t"}]},NonBlockingPolledBulkErase:{name:e+"_NonBlockingBulkErase",returns:e+"_RETURN_STATUS",arguments:[{name:"panel",type:"enum FLASH_PANEL"},{name:"unlockKey",type:"flash_key_t"}]},NonBlockingPolledWordWrite:{name:e+"_NonBlockingPolledWordWrite",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"flash_data_t *",type:"data"},{name:"unlockKey",type:"flash_key_t"}]},NonBlockingPolledRowWrite:{name:e+"_NonBlockingPolledRowWrite",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"flash_data_t *",type:"data"},{name:"unlockKey",type:"flash_key_t"}]},NonBlockingPolledRead:{name:e+"_NonBlockingPolledRead",returns:e+"_RETURN_STATUS",arguments:[{name:"flashAddress",type:"flash_adr_t"},{name:"count",type:"uint32_t"},{name:"flash_data_t *",type:"data"}]},operationStatusGet:{name:e+"_OperationStatusGet",returns:e+"_RETURN_STATUS",arguments:[]}}};t.createFirmwareApi=function(e,r,n){var i=e?e.toUpperCase():"undefined",o=n?n():t.createApi(i);return{api:o,simpleApi:a.buildSimpleApi(o),headerFiles:r||[{name:i.toLowerCase()+".h",path:"flash/"}]}},t.Interface={createPrototypeExport:function(){return{interfaces:[{interfaceId:t.getInterfaceId()}]}},createPrototypeImport:function(){return{interfaceId:t.getInterfaceId()}},getInterfaceId:t.getInterfaceId,createMock:function(){return{interfaceId:t.getInterfaceId(),payload:{interfaceApi:t.Interface.createFirmwareApi("flash-interface",[{name:"BasicFlash.h",path:"flash/"}]),flashWriteInstructionCount:2,flashInterface:"FLASH_NON_TRANSPARENT_DOUBLE_WORD_v1.0",flashWordWriteSizeInInstructions:2,flashEraseInstructionCount:1024,flashHasAuxiliary:0,flashEnduranceMinimum:1e4,flashBytesPerInstruction:3,flashPcUnitsPerInstruction:2,flashWordWriteOpCode:16385,flashOpCodeMask:16399,flashErasePageSizeInInstructions:1024,flashErasePageOpCode:16387,flashHasEcc:1,flashHasRowProgramming:1,flashWriteRowSizeInInstructions:128,flashWriteRowOpCode:16386,flashLatchIsMemoryMapped:1,flashLatchIsTransparent:0,flashLatchIsBusMastered:0,flashEndAddress:704256,flashProgramBeginAddress:256,flashUnlockKey:"0x00AA0055",flashHasDualPartition:!0,flashBootMode:"SINGLE",flashFirstPartitionEndAddress:44800,flashSecondPartitionBeginAddress:4194304,flashSecondPartitionProgramBeginAddress:4194816,flashSecondPartitionEndAddress:4239104},args:{requestId:{flashWriteInstructionCount:2}}}},createFirmwareApi:t.createFirmwareApi}}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e};var n={};!function(){"use strict";r.r(n),r.d(n,{getDerivedData:function(){return S}});var e=r(645);function t(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"===typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}(e))){var t=0,r=function(){};return{s:r,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"dataModel",void 0),i(this,"getGeneratableItems",function(){return r.getFlashGeneratableItems()}),i(this,"getFlashGeneratableItems",function(){var e,t,n,a,i,o,u,d,c,g,p,h,_,m,I,y,A,S,E,b,P,N,F=v(r.dataModel);if(F){var R=F.getInterruptDrivenStatus(),w={generatePLIBVersion:!0,PLIBVersion:"1.0.3",disclaimer:"/*disclaimer*/",generateInterfaceContent:F.enableInterfaceDefinitionGeneration(),moduleNameUpperCase:r.dataModel.getName().toLocaleUpperCase(),moduleNameLowerCase:r.dataModel.getName().toLocaleLowerCase(),generateBlockingAPI:F.getBlockingAPIGenerationStatus(),generateNonBlockingAPI:F.getNonBlockingAPIGenerationStatus(),interruptDriven:R,interfaceApi:F.basic_flash_payload(),properties:F.getProperties(),flashWordWriteSizeInInstructions:F.getFlashWordWriteSizeInInstructions(),flashInstructionType:f,flashWriteInstructionCount:String(F.getFlashWriteInstructionCount()).replace(/,/g,""),flashInterface:F.getFlashInterface(),flashEraseInstructionCount:String(F.getFlashEraseInstructionCount()).replace(/,/g,""),flashHasAuxiliary:F.getFlashHasAuxiliary(),flashEnduranceMinimum:F.getFlashEnduranceMinimum(),flashBytesPerInstruction:F.getFlashBytesPerInstruction(),flashPcUnitsPerInstruction:F.getFlashPcUnitsPerInstruction(),flashWordWriteOpCode:F.getFlashWordWriteOpCodeHexString(),flashRowWriteOpcode:F.getFlashWriteRowOpCodeHexString(),flashOpCodeMask:F.getFlashOpCodeMaskHexString(),flashErasePageSizeInInstructions:String(F.getFlashErasePageSizeInInstructions()).replace(/,/g,""),flashPageEraseOpcode:F.getFlashErasePageOpCodeHexString(),flashHasEcc:F.getFlashHasEcc(),flashHasRowProgramming:F.getFlashHasRowProgramming(),flashWriteRowSizeInInstructions:String(F.getFlashWriteRowSizeInInstructions()).replace(/,/g,""),flashEndAddress:F.getFlashEndAddressHexString(),flashProgramBeginAddress:F.getFlashProgramBeginAddressHexString(),flashUnlockKey:F.getFlashUnlockKey(),doxyDriverGroupName:"Flash Driver"},D=null===(e=r.dataModel.getHardware())||void 0===e?void 0:e.getPeripheral().interrupts;if(void 0!=D){var H=D.NVMI;if(R){var C,O,T,M,W=s(r.dataModel);w.flashInterruptEnable=null!==(C=null===H||void 0===H?void 0:H.enable)&&void 0!==C?C:"",w.flashInterruptFlag=null!==(O=null===H||void 0===H?void 0:H.flag)&&void 0!==O?O:"",w.flashIsrHandlerName=null!==(T=null===H||void 0===H?void 0:H.handlerName)&&void 0!==T?T:"",w.isFlashContextSupported=l(W,null!==(M=null===H||void 0===H?void 0:H.name)&&void 0!==M?M:"")}}return w.nvmControlRegister=null===(t=r.dataModel)||void 0===t||null===(n=t.getRegisters())||void 0===n||null===(a=n.NVMCON)||void 0===a?void 0:a.name,w.nvmAddressRegister=null===(i=r.dataModel)||void 0===i||null===(o=i.getRegisters())||void 0===o||null===(u=o.NVMADR)||void 0===u?void 0:u.name,w.nvmDataRegister0=null===(d=r.dataModel)||void 0===d||null===(c=d.getRegisters())||void 0===c||null===(g=c.NVMDATA0)||void 0===g?void 0:g.name,w.nvmDataRegister1=null===(p=r.dataModel)||void 0===p||null===(h=p.getRegisters())||void 0===h||null===(_=h.NVMDATA1)||void 0===_?void 0:_.name,w.nvmDataRegister2=null===(m=r.dataModel)||void 0===m||null===(I=m.getRegisters())||void 0===I||null===(y=I.NVMDATA2)||void 0===y?void 0:y.name,w.nvmDataRegister3=null===(A=r.dataModel)||void 0===A||null===(S=A.getRegisters())||void 0===S||null===(E=S.NVMDATA3)||void 0===E?void 0:E.name,w.nvmSrcAddressRegister=null===(b=r.dataModel)||void 0===b||null===(P=b.getRegisters())||void 0===P||null===(N=P.NVMSRCADR)||void 0===N?void 0:N.name,w}}),this.dataModel=t},s=function(e){var t=e.getImportValue("interrupt_service"),r=[];return t&&(null===t||void 0===t?void 0:t.contextEnabledInterruptList)&&(r=t.contextEnabledInterruptList),r},l=function(e,r){var n,a=!1,i=t(e);try{for(i.s();!(n=i.n()).done;){if(n.value===r){a=!0;break}}}catch(o){i.e(o)}finally{i.f()}return a},u=r(557),d=r.n(u);function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var f="uint32_t",p="flashWriteInstructionCount",h="generateAPI",v=function(e){return e?new m(e):new _},_=function e(){c(this,e),g(this,"getMyFunctions",function(){return{}}),g(this,"getModel",function(){})},m=function t(r){var n=this;c(this,t),g(this,"dataModel",void 0),g(this,"getMyFunctions",function(){return{exportApi:n.getMyExportApi,templateData:n.getMyTemplateData,alerts:n.getMyAlerts,blockingAPIGenerate:n.getBlockingAPIGenerationStatus,nonBlockingAPIGenerate:n.getNonBlockingAPIGenerationStatus,overrideOptions:n.overrideOptions,overrideDefaultValues:n.overrideDefaultValue,"flash-interface_payload":n.basic_flash_payload,importName:n.friendlyImportName,exportName:n.friendlyExportName,isInterfaceUsed:n.isFlashInterfaceUsed,enableInterfaceDefinitionGeneration:n.enableInterfaceDefinitionGeneration,interrupt_service_results:n.getFlashInterruptData,system_16bit_initializer_results:n.system_16bit_initializer_results,config_16bit_interface_args:n.getConfigBitArgs,config_16bit_interface_results:n.getConfigBitArgs,calculatedFunction:n.calculatedFunction}}),g(this,"getMyExportApi",function(t){if(t.name===e.K.getInterfaceId().name&&t.version===e.K.getInterfaceId().version){var r=e.K.createFirmwareApi("FLASH");return{api:r.api,headerFiles:r.headerFiles}}}),g(this,"getMyTemplateData",function(){return function(e){if(e)return new o(e)}(n.dataModel).getGeneratableItems()}),g(this,"getMyProcessedArgValue",function(t,r){var a;return r.some(function(r){if(r.interface===e.K.getInterfaceId().name&&void 0!=(a=n.basic_flash_args(t,r)))return!0}),a}),g(this,"overrideOptions",function(e){return e===p?[String(n.getFlashWordWriteSizeInInstructions()),String(n.getFlashWriteRowSizeInInstructions())]:[]}),g(this,"overrideDefaultValue",function(e){var t;if(e===p)t=String(n.getFlashWordWriteSizeInInstructions());return t}),g(this,"friendlyImportName",function(e){var t;switch(e){case"nvm_ctrl_32bit_v1":t="Flash Hardware";break;case"system_16bit_initializer":t="System Initializer";break;case"config_16bit_interface":t="Configuration Bits";break;default:t=e}return t}),g(this,"friendlyExportName",function(e){var t=e;return"flash"===e&&(t="Flash"),t}),g(this,"getActiveName",function(){return"Flash PLIB"}),g(this,"isFlashInterfaceUsed",function(){var t,r,a=n.dataModel.getExportInterfaces().getInterfaceData(),i=d()(a,function(t){return t.interface===e.K.getInterfaceId().name}),o=null===(t=n.dataModel)||void 0===t||null===(r=t.getExportInterfaces().getInterface("flash_interface",e.K.getInterfaceId()))||void 0===r?void 0:r.results;return!(!i&&!o)}),g(this,"getModuleNameForInterrupt",function(){var e,t;return null!==(e=null===(t=n.getFlashHardwareData())||void 0===t?void 0:t.name.toLocaleUpperCase())&&void 0!==e?e:"FLASH"}),g(this,"getInterruptData",function(e){var t=[],r=n.isInterruptMode();return e.forEach(function(e){var a,i,o,s,l,u;t.push({interruptName:null!==(a=null===(i=n.dataModel)||void 0===i||null===(o=i.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.interrupts)||void 0===l||null===(u=l[e])||void 0===u?void 0:u.name)&&void 0!==a?a:"",isEnabled:r})}),t}),g(this,"getFlashHardwareData",function(){return n.getModel().getImportValue("nvm_ctrl_32bit_upb_v1")}),g(this,"basic_flash_args",function(e,t){var r;if(e===p)void 0!=t&&t.name===p&&(r={interface:t.interface,name:t.name,value:n.getFlashWriteInstructionCountToImpl(t.value),module:t.module});return r}),g(this,"getFlashWriteInstructionCountToImpl",function(e){if(void 0!=e){var t=e,r=n.getFlashWordWriteSizeInInstructions(),a=n.getFlashWriteRowSizeInInstructions();return e!=r&&e!=a&&(t=r),t}return 4}),g(this,"isGenerateNonBlockingAPI",function(){var e=!1,t=n.getFlashResults(h);return void 0!=t&&(e="Blocking"!=t),e}),g(this,"system_16bit_initializer_results",function(){return n.isFlashInterfaceUsed()&&n.getNonBlockingAPIGenerationStatus()&&n.getInterruptDrivenStatus()?{initializer:[{funcName:"FLASH_Initialize",header:{name:"flash_nonblocking.h",path:"../flash/"}}]}:{}}),g(this,"getExportArg",function(t){var r=n.dataModel.getExportInterfaces().getInterfaceData();return d()(r,function(r){return r.interface===e.K.getInterfaceId().name&&r.name===t})}),g(this,"getConfigBitArgs",function(){return{configBitByAliasFilter:["BTMODE"],configBitSet:{}}}),g(this,"getDualPartitionDetails",function(){if(n.getFlashHasDualPartition())return{flashFirstPartitionEndAddress:n.getFlashFirstPartitionEndAddress(),flashSecondPartitionBeginAddress:n.getFlashSecondPartitionStartAddress(),flashSecondPartitionProgramBeginAddress:n.getFlashSecondPartitionProgramStartAddress(),flashSecondPartitionEndAddress:n.getFlashSecondPartitionEndAddress()}}),g(this,"getMyAlerts",function(){return[]}),g(this,"calculatedFunction",function(){}),g(this,"basic_flash_payload",function(){var t=[];return t=n.getFlashHasDualPartition()&&n.getFlashDualPartitionEnabled()?[{name:"flash_nonblocking.h",path:"flash/"}]:e.K.createFirmwareApi(n.dataModel.getName()).headerFiles,{interfaceApi:e.K.createFirmwareApi(n.dataModel.getName(),t),flashWriteInstructionCount:n.getFlashWriteInstructionCount(),flashInterface:n.getFlashInterface(),flashWordWriteSizeInInstructions:n.getFlashWordWriteSizeInInstructions(),flashEraseInstructionCount:n.getFlashEraseInstructionCount(),flashHasAuxiliary:n.getFlashHasAuxiliary(),flashEnduranceMinimum:n.getFlashEnduranceMinimum(),flashBytesPerInstruction:n.getFlashBytesPerInstruction(),flashPcUnitsPerInstruction:n.getFlashPcUnitsPerInstruction(),flashWordWriteOpCode:n.getFlashWordWriteOpCode(),flashOpCodeMask:n.getFlashOpCodeMask(),flashErasePageSizeInInstructions:n.getFlashErasePageSizeInInstructions(),flashErasePageOpCode:n.getFlashErasePageOpCode(),flashHasEcc:n.getFlashHasEcc(),flashHasRowProgramming:n.getFlashHasRowProgramming(),flashWriteRowSizeInInstructions:n.getFlashWriteRowSizeInInstructions(),flashWriteRowOpCode:n.getFlashWriteRowOpCode(),flashEndAddress:n.getFlashEndAddress(),flashProgramBeginAddress:n.getFlashProgramBeginAddress(),flashUnlockKey:n.getFlashUnlockKey(),flashHasDualPartition:n.getFlashHasDualPartition(),flashBootMode:n.getFlashBootModeValue(),flashDualPartitionDetails:n.getDualPartitionDetails()}}),g(this,"getFlashInterface",function(){return"FLASH_UNIFIED_MEMORY_MAP_QUAD_WORD_v1.0"}),g(this,"enableInterfaceDefinitionGeneration",function(){var e,t,r=!1;return n.isFlashInterfaceUsed()&&(null===(e=n.dataModel)||void 0===e||null===(t=e.getImportValue("system_16bit_initializer"))||void 0===t?void 0:t.enableInterfaceDefinitionGeneration)&&(r=!0),r}),g(this,"getFlashInterruptData",function(){var e,t=[],r=null===(e=n.getFlashHardwareData())||void 0===e?void 0:e.interrupts;for(var a in r)t.push(a);return{moduleName:n.getModuleNameForInterrupt(),interruptData:n.getInterruptData(t)}}),g(this,"isInterruptMode",function(){return!!n.isFlashInterfaceUsed()&&n.getInterruptDrivenStatus()}),g(this,"getInterruptDrivenStatus",function(){var e=!1,t=n.getFlashResults("interruptDriven");return void 0!=t&&(e=t),e}),g(this,"getFlashWordWriteSizeInInstructions",function(){return n.getFlashWordWriteSizeInInstructionsValue(n.dataModel)}),g(this,"getFlashWordWriteSizeInInstructionsValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_WORD_WRITE_SIZE_IN_INSTRUCTIONS)||void 0===a?void 0:a.value)&&(i=Number(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_WORD_WRITE_SIZE_IN_INSTRUCTIONS)||void 0===u?void 0:u.value));return i}),g(this,"getFlashEraseInstructionCount",function(){return n.getFlashEraseInstructionCountValue(n.dataModel)}),g(this,"getFlashEraseInstructionCountValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS)||void 0===a?void 0:a.value)&&(i=Number(null===e||void 0===e||null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS)||void 0===u?void 0:u.value));return i}),g(this,"getFlashHasAuxiliary",function(){return n.getFlashHasAuxiliaryValue(n.dataModel)}),g(this,"getFlashHasAuxiliaryValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_HAS_AUXILIARY)||void 0===a?void 0:a.value)&&(i="TRUE"==(null===e||void 0===e||null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_HAS_AUXILIARY)||void 0===u?void 0:u.value)?1:0);return i}),g(this,"getFlashEnduranceMinimum",function(){return n.getFlashEnduranceMinimumValue(n.dataModel)}),g(this,"getFlashEnduranceMinimumValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_ENDURANCE_MINIMUM)||void 0===a?void 0:a.value)&&(i=Number(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_ENDURANCE_MINIMUM)||void 0===u?void 0:u.value));return i}),g(this,"getFlashBytesPerInstruction",function(){return n.getFlashBytesPerInstructionValue(n.dataModel)}),g(this,"getFlashBytesPerInstructionValue",function(e){var t,r,n,a,i,o,s,l,u=4;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_BYTES_PER_INSTRUCTION)||void 0===a?void 0:a.value)&&(u=Number(null===(i=e.getHardware())||void 0===i||null===(o=i.getPeripheral())||void 0===o||null===(s=o.properties)||void 0===s||null===(l=s.FLASH_BYTES_PER_INSTRUCTION)||void 0===l?void 0:l.value));return u}),g(this,"getFlashPcUnitsPerInstruction",function(){return n.getFlashPcUnitsPerInstructionValue(n.dataModel)}),g(this,"getFlashPcUnitsPerInstructionValue",function(e){var t,r,n,a,i,o,s,l,u=1;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_PC_UNITS_PER_INSTRUCTION)||void 0===a?void 0:a.value)&&(u=Number(null===(i=e.getHardware())||void 0===i||null===(o=i.getPeripheral())||void 0===o||null===(s=o.properties)||void 0===s||null===(l=s.FLASH_PC_UNITS_PER_INSTRUCTION)||void 0===l?void 0:l.value));return u}),g(this,"getFlashWordWriteOpCode",function(){return n.getFlashWordWriteOpCodeValue(n.dataModel)}),g(this,"getFlashWordWriteOpCodeValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_WORD_WRITE_OP_CODE)||void 0===a?void 0:a.value)&&(i=Number(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_WORD_WRITE_OP_CODE)||void 0===u?void 0:u.value));return i}),g(this,"getFlashOpCodeMask",function(){return n.getFlashOpCodeMaskValue(n.dataModel)}),g(this,"getFlashOpCodeMaskValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_OP_CODE_MASK)||void 0===a?void 0:a.value)&&(i=Number(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_OP_CODE_MASK)||void 0===u?void 0:u.value));return i}),g(this,"getFlashErasePageSizeInInstructions",function(){return n.getFlashErasePageSizeInInstructionsValue(n.dataModel)}),g(this,"getFlashErasePageSizeInInstructionsValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS)||void 0===a?void 0:a.value)&&(i=Number(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS)||void 0===u?void 0:u.value));return i}),g(this,"getFlashErasePageOpCode",function(){return n.getFlashErasePageOpCodeValue(n.dataModel)}),g(this,"getFlashErasePageOpCodeValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_ERASE_PAGE_OP_CODE)||void 0===a?void 0:a.value)&&(i=Number(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_ERASE_PAGE_OP_CODE)||void 0===u?void 0:u.value));return i}),g(this,"getFlashHasEcc",function(){return n.getFlashHasEccValue(n.dataModel)}),g(this,"getFlashHasEccValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_HAS_ECC)||void 0===a?void 0:a.value)&&(i="TRUE"==(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_HAS_ECC)||void 0===u?void 0:u.value)?1:0);return i}),g(this,"getFlashHasRowProgramming",function(){return n.getFlashHasRowProgrammingValue(n.dataModel)}),g(this,"getFlashHasRowProgrammingValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_HAS_ROW_PROGRAMMING)||void 0===a?void 0:a.value)&&(i="TRUE"==(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_HAS_ROW_PROGRAMMING)||void 0===u?void 0:u.value)?1:0);return i}),g(this,"getFlashWriteRowSizeInInstructions",function(){return n.getFlashWriteRowSizeInInstructionsValue(n.dataModel)}),g(this,"getFlashWriteRowSizeInInstructionsValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_WRITE_ROW_SIZE_IN_INSTRUCTIONS)||void 0===a?void 0:a.value)&&(i=Number(null===e||void 0===e||null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_WRITE_ROW_SIZE_IN_INSTRUCTIONS)||void 0===u?void 0:u.value));return i}),g(this,"getFlashWriteRowOpCode",function(){return n.getFlashWriteRowOpCodeValue(n.dataModel)}),g(this,"getFlashWriteRowOpCodeValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_WRITE_ROW_OP_CODE)||void 0===a?void 0:a.value)&&(i=Number(null===e||void 0===e||null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_WRITE_ROW_OP_CODE)||void 0===u?void 0:u.value));return i}),g(this,"getFlashEndAddress",function(){return n.getFlashEndAddressValue(n.dataModel)}),g(this,"getFlashEndAddressValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_END_ADDRESS)||void 0===a?void 0:a.value)&&(i=Number(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_END_ADDRESS)||void 0===u?void 0:u.value));return i}),g(this,"getFlashProgramBeginAddress",function(){return n.getFlashProgramBeginAddressValue(n.dataModel)}),g(this,"getFlashProgramBeginAddressValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.PROGRAM_BEGIN_ADDRESS)||void 0===a?void 0:a.value)&&(i=Number(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.PROGRAM_BEGIN_ADDRESS)||void 0===u?void 0:u.value));return i}),g(this,"getFlashUnlockKey",function(){return"0x00AA0055"}),g(this,"getFlashHasDualPartition",function(){return n.getHasDualPartitionValue(n.dataModel)}),g(this,"getHasDualPartitionValue",function(e){var t,r,n,a,i,o=null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_HAS_DUAL_PARTITION)||void 0===a?void 0:a.value;return void 0!=o&&(i="TRUE"==o),i}),g(this,"getFlashBootModeValue",function(){var e,t=n.dataModel.getImportValue("config_16bit_interface");return void 0!=t&&(e=t.configBitSettingValueAliasMap.BTMODE),e}),g(this,"getFlashFirstPartitionEndAddress",function(){return n.getFlashFirstPartitionEndAddressValue(n.dataModel)}),g(this,"getFlashFirstPartitionEndAddressValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_FIRST_PARTITION_END_ADDRESS)||void 0===a?void 0:a.value)&&(i=Number(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_FIRST_PARTITION_END_ADDRESS)||void 0===u?void 0:u.value));return i}),g(this,"getFlashSecondPartitionStartAddress",function(){return n.getFlashSecondPartitionStartAddressValue(n.getModel())}),g(this,"getFlashSecondPartitionStartAddressValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_SECOND_PARTITION_START_ADDRESS)||void 0===a?void 0:a.value)&&(i=Number(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_SECOND_PARTITION_START_ADDRESS)||void 0===u?void 0:u.value));return i}),g(this,"getFlashSecondPartitionProgramStartAddress",function(){return n.getFlashSecondPartitionProgramStartAddressValue(n.getModel())}),g(this,"getFlashSecondPartitionProgramStartAddressValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_SECOND_PARTITION_PROGRAM_START_ADDRESS)||void 0===a?void 0:a.value)&&(i=Number(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_SECOND_PARTITION_PROGRAM_START_ADDRESS)||void 0===u?void 0:u.value));return i}),g(this,"getFlashSecondPartitionEndAddress",function(){return n.getFlashSecondPartitionEndAddressValue(n.getModel())}),g(this,"getFlashSecondPartitionEndAddressValue",function(e){var t,r,n,a,i,o,s,l,u;void 0!=(null===e||void 0===e||null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r||null===(n=r.properties)||void 0===n||null===(a=n.FLASH_SECOND_PARTITION_END_ADDRESS)||void 0===a?void 0:a.value)&&(i=Number(null===(o=e.getHardware())||void 0===o||null===(s=o.getPeripheral())||void 0===s||null===(l=s.properties)||void 0===l||null===(u=l.FLASH_SECOND_PARTITION_END_ADDRESS)||void 0===u?void 0:u.value));return i}),g(this,"getFlashDualPartitionEnabled",function(){return n.getDualPartitionEnabledValue(n.dataModel)}),g(this,"getDualPartitionEnabledValue",function(e){var t=!1,r=n.getFlashBootModeValue();return void 0!=r&&"SINGLE"!=r&&(t=!0),t}),g(this,"getFlashWriteInstructionCount",function(){var e=n.basic_flash_args(p,n.getExportArg(p));return Number(void 0!=e?e.value:n.getFlashWordWriteSizeInInstructions())}),g(this,"getBlockingAPIGenerationStatus",function(){var e=!0,t=n.getFlashResults(h);return void 0!=t&&(e="Non-Blocking"!=t),e}),g(this,"getNonBlockingAPIGenerationStatus",function(){var e=n.isGenerateNonBlockingAPI();return e&&void 0==n.getFlashHasDualPartition()&&(e=!1),e}),g(this,"getFlashResults",function(t){var r,a,i,o=null===(r=n.dataModel)||void 0===r||null===(a=r.getExportInterfaces().getInterface("flash_interface",e.K.getInterfaceId()))||void 0===a?void 0:a.results;if(void 0!=o)for(var s in o){var l;i=null===(l=o[s])||void 0===l?void 0:l[t]}return i}),g(this,"getProperties",function(){return n.getPropertiesValue(n.dataModel)}),g(this,"getPropertiesValue",function(e){var t,r;if(void 0!=(null===e||void 0===e?void 0:e.getHardware()))return null===(t=e.getHardware())||void 0===t||null===(r=t.getPeripheral())||void 0===r?void 0:r.properties}),g(this,"getFlashWordWriteOpCodeHexString",function(){var e=n.getFlashWordWriteOpCode();return n.getHexaDecimalString(e)}),g(this,"getFlashOpCodeMaskHexString",function(){var e=n.getFlashOpCodeMask();return n.getHexaDecimalString(e)}),g(this,"getFlashErasePageOpCodeHexString",function(){var e=n.getFlashErasePageOpCode();return n.getHexaDecimalString(e)}),g(this,"getFlashWriteRowOpCodeHexString",function(){var e=n.getFlashWriteRowOpCode();return n.getHexaDecimalString(e)}),g(this,"getFlashEndAddressHexString",function(){var e=n.getFlashEndAddress();return n.getHexaDecimalString(e)}),g(this,"getFlashProgramBeginAddressHexString",function(){var e=n.getFlashProgramBeginAddress();return n.getHexaDecimalString(e)}),g(this,"getHexaDecimalString",function(e){return void 0!=e?"0x"+e.toString(16):"0x"+(e=0).toString(16)}),g(this,"getModel",function(){return n.dataModel}),this.dataModel=r},I=function(){try{return r(139)}catch(e){return}};function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function A(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var S=function(e){return function(t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(t){A(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({getModuleConfig:I},e(t))}}(function(e){return e?new m(e):new _})}(),autoProcessor=n}();
4380
2
  //# sourceMappingURL=autoProcessor.js.map