@muhgholy/next-drive 4.23.0 → 4.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -0
- package/dist/{chunk-CR3QW3QN.js → chunk-R43JCXQB.js} +130 -10
- package/dist/chunk-R43JCXQB.js.map +1 -0
- package/dist/{chunk-EUAHSB2J.cjs → chunk-RBLDH7CP.cjs} +133 -10
- package/dist/chunk-RBLDH7CP.cjs.map +1 -0
- package/dist/server/controllers/drive.d.ts +57 -0
- package/dist/server/controllers/drive.d.ts.map +1 -1
- package/dist/server/express.cjs +11 -11
- package/dist/server/express.js +2 -2
- package/dist/server/hono.cjs +11 -11
- package/dist/server/hono.js +2 -2
- package/dist/server/index.cjs +25 -13
- package/dist/server/index.d.ts +3 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-CR3QW3QN.js.map +0 -1
- package/dist/chunk-EUAHSB2J.cjs.map +0 -1
|
@@ -99,6 +99,47 @@ export declare const driveList: (options: {
|
|
|
99
99
|
limit?: number;
|
|
100
100
|
afterId?: string;
|
|
101
101
|
}) => Promise<TDatabaseDrive[]>;
|
|
102
|
+
/**
|
|
103
|
+
* List files (not folders) with offset-based pagination.
|
|
104
|
+
* @param options - List options including optional owner key, folderId, page, and limit
|
|
105
|
+
* @returns Promise with paginated file items and pagination metadata
|
|
106
|
+
* @example
|
|
107
|
+
* ```typescript
|
|
108
|
+
* // List all files (page 1, default limit 50)
|
|
109
|
+
* const result = await driveListFiles({});
|
|
110
|
+
*
|
|
111
|
+
* // List files for a specific owner
|
|
112
|
+
* const result = await driveListFiles({ key: { userId: '123' } });
|
|
113
|
+
*
|
|
114
|
+
* // List files in a folder with pagination
|
|
115
|
+
* const result = await driveListFiles({
|
|
116
|
+
* key: { userId: '123' },
|
|
117
|
+
* folderId: 'folderIdHere',
|
|
118
|
+
* page: 2,
|
|
119
|
+
* limit: 20,
|
|
120
|
+
* });
|
|
121
|
+
*
|
|
122
|
+
* // Access pagination info
|
|
123
|
+
* console.log(result.pagination);
|
|
124
|
+
* // { page: 2, limit: 20, totalCount: 87, totalPages: 5, hasMore: true }
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
export declare const driveListFiles: (options: {
|
|
128
|
+
key?: Record<string, unknown> | null;
|
|
129
|
+
folderId?: string | null;
|
|
130
|
+
accountId?: string;
|
|
131
|
+
page?: number;
|
|
132
|
+
limit?: number;
|
|
133
|
+
}) => Promise<{
|
|
134
|
+
items: TDatabaseDrive[];
|
|
135
|
+
pagination: {
|
|
136
|
+
page: number;
|
|
137
|
+
limit: number;
|
|
138
|
+
totalCount: number;
|
|
139
|
+
totalPages: number;
|
|
140
|
+
hasMore: boolean;
|
|
141
|
+
};
|
|
142
|
+
}>;
|
|
102
143
|
/**
|
|
103
144
|
* Delete a file or folder permanently from the drive system.
|
|
104
145
|
* @param source - File ID (string) or a TDatabaseDrive/IDatabaseDriveDocument object
|
|
@@ -186,4 +227,20 @@ export declare const driveUpload: (source: string | Readable | Buffer, key: Reco
|
|
|
186
227
|
enforce?: boolean;
|
|
187
228
|
meta?: Record<string, unknown>;
|
|
188
229
|
}) => Promise<TDriveFile>;
|
|
230
|
+
/**
|
|
231
|
+
* Clean up orphaned file folders from storage that are no longer registered in the database.
|
|
232
|
+
* Scans the `{storage.path}/file/` directory, checks each folder ID against the Drive collection,
|
|
233
|
+
* and removes folders that have no matching database record.
|
|
234
|
+
* @returns Promise with list of removed folder IDs and total freed bytes
|
|
235
|
+
* @example
|
|
236
|
+
* ```typescript
|
|
237
|
+
* const result = await driveCleanup();
|
|
238
|
+
* console.log(`Removed ${result.removed.length} orphaned folders`);
|
|
239
|
+
* console.log(`Freed ${result.totalFreedInBytes} bytes`);
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
export declare const driveCleanup: () => Promise<{
|
|
243
|
+
removed: string[];
|
|
244
|
+
totalFreedInBytes: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,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,KACF,OAAO,CAAC,UAAU,CA6KpB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,QAAa,OAAO,CAAC;IAC1C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;CAC7B,CA2FA,CAAC"}
|
package/dist/server/express.cjs
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRBLDH7CP_cjs = require('../chunk-RBLDH7CP.cjs');
|
|
4
4
|
require('../chunk-TA6L5FYG.cjs');
|
|
5
5
|
|
|
6
6
|
// src/server/express.ts
|
|
7
|
-
var driveAPIHandlerExpress =
|
|
8
|
-
var driveConfigurationExpress =
|
|
7
|
+
var driveAPIHandlerExpress = chunkRBLDH7CP_cjs.driveAPIHandler;
|
|
8
|
+
var driveConfigurationExpress = chunkRBLDH7CP_cjs.driveConfiguration;
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "driveDelete", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkRBLDH7CP_cjs.driveDelete; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "driveFilePath", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkRBLDH7CP_cjs.driveFilePath; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "driveFileSchemaZod", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkRBLDH7CP_cjs.driveFileSchemaZod; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "driveGetUrl", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkRBLDH7CP_cjs.driveGetUrl; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "driveList", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkRBLDH7CP_cjs.driveList; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "driveReadFile", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkRBLDH7CP_cjs.driveReadFile; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "driveUpload", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkRBLDH7CP_cjs.driveUpload; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "getDriveConfig", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkRBLDH7CP_cjs.getDriveConfig; }
|
|
41
41
|
});
|
|
42
42
|
exports.driveAPIHandlerExpress = driveAPIHandlerExpress;
|
|
43
43
|
exports.driveConfigurationExpress = driveConfigurationExpress;
|
package/dist/server/express.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { driveAPIHandler, driveConfiguration } from '../chunk-
|
|
2
|
-
export { driveDelete, driveFilePath, driveFileSchemaZod, driveGetUrl, driveList, driveReadFile, driveUpload, getDriveConfig } from '../chunk-
|
|
1
|
+
import { driveAPIHandler, driveConfiguration } from '../chunk-R43JCXQB.js';
|
|
2
|
+
export { driveDelete, driveFilePath, driveFileSchemaZod, driveGetUrl, driveList, driveReadFile, driveUpload, getDriveConfig } from '../chunk-R43JCXQB.js';
|
|
3
3
|
import '../chunk-TMSG5WJZ.js';
|
|
4
4
|
|
|
5
5
|
// src/server/express.ts
|
package/dist/server/hono.cjs
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRBLDH7CP_cjs = require('../chunk-RBLDH7CP.cjs');
|
|
4
4
|
require('../chunk-TA6L5FYG.cjs');
|
|
5
5
|
|
|
6
6
|
// src/server/hono.ts
|
|
7
|
-
var driveAPIHandlerHono =
|
|
8
|
-
var driveConfigurationHono =
|
|
7
|
+
var driveAPIHandlerHono = chunkRBLDH7CP_cjs.driveAPIHandler;
|
|
8
|
+
var driveConfigurationHono = chunkRBLDH7CP_cjs.driveConfiguration;
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "driveDelete", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkRBLDH7CP_cjs.driveDelete; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "driveFilePath", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkRBLDH7CP_cjs.driveFilePath; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "driveFileSchemaZod", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkRBLDH7CP_cjs.driveFileSchemaZod; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "driveGetUrl", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkRBLDH7CP_cjs.driveGetUrl; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "driveList", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkRBLDH7CP_cjs.driveList; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "driveReadFile", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkRBLDH7CP_cjs.driveReadFile; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "driveUpload", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkRBLDH7CP_cjs.driveUpload; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "getDriveConfig", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkRBLDH7CP_cjs.getDriveConfig; }
|
|
41
41
|
});
|
|
42
42
|
exports.driveAPIHandlerHono = driveAPIHandlerHono;
|
|
43
43
|
exports.driveConfigurationHono = driveConfigurationHono;
|
package/dist/server/hono.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { driveAPIHandler, driveConfiguration } from '../chunk-
|
|
2
|
-
export { driveDelete, driveFilePath, driveFileSchemaZod, driveGetUrl, driveList, driveReadFile, driveUpload, getDriveConfig } from '../chunk-
|
|
1
|
+
import { driveAPIHandler, driveConfiguration } from '../chunk-R43JCXQB.js';
|
|
2
|
+
export { driveDelete, driveFilePath, driveFileSchemaZod, driveGetUrl, driveList, driveReadFile, driveUpload, getDriveConfig } from '../chunk-R43JCXQB.js';
|
|
3
3
|
import '../chunk-TMSG5WJZ.js';
|
|
4
4
|
|
|
5
5
|
// src/server/hono.ts
|
package/dist/server/index.cjs
CHANGED
|
@@ -1,57 +1,69 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRBLDH7CP_cjs = require('../chunk-RBLDH7CP.cjs');
|
|
4
4
|
var chunkTA6L5FYG_cjs = require('../chunk-TA6L5FYG.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
+
Object.defineProperty(exports, "DatabaseMongoDrive", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkRBLDH7CP_cjs.drive_default; }
|
|
11
|
+
});
|
|
8
12
|
Object.defineProperty(exports, "driveAPIHandler", {
|
|
9
13
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkRBLDH7CP_cjs.driveAPIHandler; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "driveCleanup", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkRBLDH7CP_cjs.driveCleanup; }
|
|
11
19
|
});
|
|
12
20
|
Object.defineProperty(exports, "driveConfiguration", {
|
|
13
21
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkRBLDH7CP_cjs.driveConfiguration; }
|
|
15
23
|
});
|
|
16
24
|
Object.defineProperty(exports, "driveDelete", {
|
|
17
25
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkRBLDH7CP_cjs.driveDelete; }
|
|
19
27
|
});
|
|
20
28
|
Object.defineProperty(exports, "driveFilePath", {
|
|
21
29
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkRBLDH7CP_cjs.driveFilePath; }
|
|
23
31
|
});
|
|
24
32
|
Object.defineProperty(exports, "driveFileSchemaZod", {
|
|
25
33
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkRBLDH7CP_cjs.driveFileSchemaZod; }
|
|
27
35
|
});
|
|
28
36
|
Object.defineProperty(exports, "driveGetUrl", {
|
|
29
37
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkRBLDH7CP_cjs.driveGetUrl; }
|
|
31
39
|
});
|
|
32
40
|
Object.defineProperty(exports, "driveInfo", {
|
|
33
41
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkRBLDH7CP_cjs.driveInfo; }
|
|
35
43
|
});
|
|
36
44
|
Object.defineProperty(exports, "driveList", {
|
|
37
45
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkRBLDH7CP_cjs.driveList; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "driveListFiles", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return chunkRBLDH7CP_cjs.driveListFiles; }
|
|
39
51
|
});
|
|
40
52
|
Object.defineProperty(exports, "driveReadFile", {
|
|
41
53
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkRBLDH7CP_cjs.driveReadFile; }
|
|
43
55
|
});
|
|
44
56
|
Object.defineProperty(exports, "driveUpload", {
|
|
45
57
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkRBLDH7CP_cjs.driveUpload; }
|
|
47
59
|
});
|
|
48
60
|
Object.defineProperty(exports, "getDriveConfig", {
|
|
49
61
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkRBLDH7CP_cjs.getDriveConfig; }
|
|
51
63
|
});
|
|
52
64
|
Object.defineProperty(exports, "getDriveInformation", {
|
|
53
65
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
66
|
+
get: function () { return chunkRBLDH7CP_cjs.getDriveInformation; }
|
|
55
67
|
});
|
|
56
68
|
Object.defineProperty(exports, "driveCreateUrl", {
|
|
57
69
|
enumerable: true,
|
package/dist/server/index.d.ts
CHANGED
|
@@ -2,7 +2,9 @@ import type { NextApiRequest, NextApiResponse } from 'next';
|
|
|
2
2
|
import { getDriveConfig, getDriveInformation, driveConfiguration } from '../server/config';
|
|
3
3
|
export declare const driveAPIHandler: (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
|
|
4
4
|
export { driveConfiguration, getDriveConfig, getDriveInformation };
|
|
5
|
-
export { driveGetUrl, driveReadFile, driveFilePath, driveUpload, driveDelete, driveList, driveInfo } from '../server/controllers/drive';
|
|
5
|
+
export { driveGetUrl, driveReadFile, driveFilePath, driveUpload, driveDelete, driveList, driveInfo, driveListFiles, driveCleanup } from '../server/controllers/drive';
|
|
6
|
+
export { default as DatabaseMongoDrive } from '../server/database/mongoose/schema/drive';
|
|
7
|
+
export type { IDatabaseDriveDocument } from '../server/database/mongoose/schema/drive';
|
|
6
8
|
export { driveFileSchemaZod } from '../server/zod/schemas';
|
|
7
9
|
export { driveCreateUrl } from '../client/utils';
|
|
8
10
|
export type { TDriveFile, TDriveInformation } from '../types/client';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAQ5D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAkH1F,eAAO,MAAM,eAAe,GAAU,KAAK,cAAc,EAAE,KAAK,eAAe,KAAG,OAAO,CAAC,IAAI,CA+3B7F,CAAC;AAGF,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAQ5D,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAkH1F,eAAO,MAAM,eAAe,GAAU,KAAK,cAAc,EAAE,KAAK,eAAe,KAAG,OAAO,CAAC,IAAI,CA+3B7F,CAAC;AAGF,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACrK,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AACxF,YAAY,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACpE,mBAAmB,gBAAgB,CAAC"}
|
package/dist/server/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { driveAPIHandler, driveConfiguration, driveDelete, driveFilePath, driveFileSchemaZod, driveGetUrl, driveInfo, driveList, driveReadFile, driveUpload, getDriveConfig, getDriveInformation } from '../chunk-
|
|
1
|
+
export { drive_default as DatabaseMongoDrive, driveAPIHandler, driveCleanup, driveConfiguration, driveDelete, driveFilePath, driveFileSchemaZod, driveGetUrl, driveInfo, driveList, driveListFiles, driveReadFile, driveUpload, getDriveConfig, getDriveInformation } from '../chunk-R43JCXQB.js';
|
|
2
2
|
export { driveCreateUrl } from '../chunk-TMSG5WJZ.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@muhgholy/next-drive",
|
|
3
|
-
"version": "4.23.
|
|
3
|
+
"version": "4.23.2",
|
|
4
4
|
"description": "File storage and management for Next.js applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -122,4 +122,4 @@
|
|
|
122
122
|
"type": "git",
|
|
123
123
|
"url": "https://github.com/muhgholy/next-drive"
|
|
124
124
|
}
|
|
125
|
-
}
|
|
125
|
+
}
|