calmlens 0.37.1 → 0.38.0
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/bin/calmlens.js +9 -3
- package/cjs/{BrowserUpload-84KQWr1Q.js → BrowserUpload-BO_ZukUM.js} +1 -1
- package/{esm/BrowserUpload-CuG3tWSo.d.ts → cjs/BrowserUpload-BuTS7yTy.d.ts} +2 -2
- package/cjs/{CalmLensAppClient-D4tRb_P2.js → CalmLensAppClient-DoNMg8Dh.js} +3 -3
- package/{esm/CalmLensAppClient-QqtovWE-.d.ts → cjs/CalmLensAppClient-L5x_sMOI.d.ts} +1 -1
- package/cjs/{CalmLensCdn-CdYY_XtK.js → CalmLensCdn-B_Tbwq10.js} +2 -2
- package/cjs/{CalmLensConnection-GkR2cKn5.js → CalmLensConnection-Dhg1amnb.js} +2 -2
- package/cjs/{CalmLensError-ifj5rLmk.js → CalmLensError-C9g7GXfU.js} +7 -2
- package/{esm/CalmLensServerClient-csSQqHBt.d.ts → cjs/CalmLensServerClient-2H0ZpJlr.d.ts} +5 -5
- package/cjs/{CalmLensServerClient-cgPOG4Sv.js → CalmLensServerClient-D0wCcQNn.js} +15 -6
- package/cjs/{CalmLensTypes-_f7QVRtO.d.ts → CalmLensTypes-CCsoVr39.d.ts} +4 -4
- package/{esm/Core-4iFxKJnY.d.ts → cjs/Core-B110Ug8_.d.ts} +2 -2
- package/cjs/{Core-BlnBBJKb.js → Core-iNgZ8Cij.js} +3 -3
- package/cjs/{ReactUpload-D3AYIZBh.js → ReactUpload-BS8bYIhv.js} +1 -1
- package/cjs/{ReactUpload-4qd2xACg.d.ts → ReactUpload-CbtQtN6v.d.ts} +1 -1
- package/cjs/{UploadController-BYuHuZ7K.js → UploadController-CVKtUCK0.js} +2 -2
- package/{esm/WebhookPayload-BJtggTLd.d.ts → cjs/WebhookPayload-_fvY2eu8.d.ts} +5 -3
- package/cjs/app.d.ts +4 -4
- package/cjs/app.js +3 -3
- package/cjs/elements.d.ts +4 -4
- package/cjs/elements.js +4 -4
- package/cjs/{index-IEA75nev.d.ts → index-Dk3I5YXf.d.ts} +2 -2
- package/cjs/index.d.ts +3 -3
- package/cjs/index.js +2 -2
- package/cjs/react-native.d.ts +2 -2
- package/cjs/react-native.js +4 -4
- package/cjs/react.d.ts +4 -4
- package/cjs/react.js +5 -5
- package/cjs/server.d.ts +4 -4
- package/cjs/server.js +3 -3
- package/cjs/{CalmLensTestInputArguments-C6S09FVQ.js → test-inputs-BVJZjtFd.js} +156 -16
- package/{esm/TestTriggers-CjDhhz78.d.ts → cjs/test-inputs-JaZaV9Up.d.ts} +20 -1
- package/cjs/test-inputs.d.ts +2 -18
- package/cjs/test-inputs.js +15 -126
- package/cjs/testing.d.ts +11 -14
- package/cjs/testing.js +35 -66
- package/cjs/{ui-BMQW3Hse.d.ts → ui--E_s-cDd.d.ts} +2 -2
- package/cjs/{ui-Cy8MWXOw.js → ui-CuO37F4u.js} +2 -2
- package/cjs/ui.d.ts +2 -2
- package/cjs/ui.js +3 -3
- package/cjs/vue.d.ts +5 -5
- package/cjs/vue.js +4 -4
- package/{cjs/BrowserUpload-CuG3tWSo.d.ts → esm/BrowserUpload-BuTS7yTy.d.ts} +2 -2
- package/esm/{BrowserUpload-C429CcUi.js → BrowserUpload-DxgiUXC2.js} +1 -1
- package/esm/{CalmLensAppClient-Brvc-GXt.js → CalmLensAppClient-C7ScAfRx.js} +3 -3
- package/{cjs/CalmLensAppClient-QqtovWE-.d.ts → esm/CalmLensAppClient-L5x_sMOI.d.ts} +1 -1
- package/esm/{CalmLensCdn-cmxtF_dw.js → CalmLensCdn-CW5Fn3ph.js} +2 -2
- package/esm/{CalmLensConnection-DEfpIugc.js → CalmLensConnection-Blv8JyLF.js} +2 -2
- package/esm/{CalmLensError-C15tWu8W.js → CalmLensError-DjkibkdI.js} +7 -2
- package/{cjs/CalmLensServerClient-csSQqHBt.d.ts → esm/CalmLensServerClient-2H0ZpJlr.d.ts} +5 -5
- package/esm/{CalmLensServerClient-BpsCXVeO.js → CalmLensServerClient-C7n6EzVd.js} +15 -6
- package/esm/{CalmLensTypes-_f7QVRtO.d.ts → CalmLensTypes-CCsoVr39.d.ts} +4 -4
- package/{cjs/Core-4iFxKJnY.d.ts → esm/Core-B110Ug8_.d.ts} +2 -2
- package/esm/{Core-C_f1o9RQ.js → Core-BRrPxS4i.js} +3 -3
- package/esm/{ReactUpload-Ch5qY7PS.js → ReactUpload-BGPktblV.js} +1 -1
- package/esm/{ReactUpload-4qd2xACg.d.ts → ReactUpload-CbtQtN6v.d.ts} +1 -1
- package/esm/{UploadController-9fkYFVZM.js → UploadController-CQ4NouIU.js} +2 -2
- package/{cjs/WebhookPayload-BJtggTLd.d.ts → esm/WebhookPayload-_fvY2eu8.d.ts} +5 -3
- package/esm/app.d.ts +4 -4
- package/esm/app.js +3 -3
- package/esm/elements.d.ts +4 -4
- package/esm/elements.js +4 -4
- package/esm/{index-IEA75nev.d.ts → index-Dk3I5YXf.d.ts} +2 -2
- package/esm/index.d.ts +3 -3
- package/esm/index.js +2 -2
- package/esm/react-native.d.ts +2 -2
- package/esm/react-native.js +4 -4
- package/esm/react.d.ts +4 -4
- package/esm/react.js +5 -5
- package/esm/server.d.ts +4 -4
- package/esm/server.js +3 -3
- package/esm/{CalmLensTestInputArguments-DS_3mt1C.js → test-inputs-DizPp8_w.js} +145 -5
- package/{cjs/TestTriggers-CjDhhz78.d.ts → esm/test-inputs-JaZaV9Up.d.ts} +20 -1
- package/esm/test-inputs.d.ts +2 -18
- package/esm/test-inputs.js +1 -115
- package/esm/testing.d.ts +11 -14
- package/esm/testing.js +24 -55
- package/esm/{ui-BMQW3Hse.d.ts → ui--E_s-cDd.d.ts} +2 -2
- package/esm/{ui-HK74e42L.js → ui-B-QOHuVI.js} +2 -2
- package/esm/ui.d.ts +2 -2
- package/esm/ui.js +3 -3
- package/esm/vue.d.ts +5 -5
- package/esm/vue.js +4 -4
- package/package.json +1 -1
package/cjs/testing.js
CHANGED
|
@@ -1,40 +1,15 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const require_CalmLensError = require("./CalmLensError-
|
|
4
|
-
const require_CalmLensCdn = require("./CalmLensCdn-
|
|
5
|
-
const require_CalmLensServerClient = require("./CalmLensServerClient-
|
|
6
|
-
const require_CalmLensConnection = require("./CalmLensConnection-
|
|
2
|
+
const require_test_inputs = require("./test-inputs-BVJZjtFd.js");
|
|
3
|
+
const require_CalmLensError = require("./CalmLensError-C9g7GXfU.js");
|
|
4
|
+
const require_CalmLensCdn = require("./CalmLensCdn-B_Tbwq10.js");
|
|
5
|
+
const require_CalmLensServerClient = require("./CalmLensServerClient-D0wCcQNn.js");
|
|
6
|
+
const require_CalmLensConnection = require("./CalmLensConnection-Dhg1amnb.js");
|
|
7
7
|
const require_CryptoUtils_BLCa_oZe = require("./CryptoUtils-BLCa-oZe-leCkr1ko.js");
|
|
8
|
-
const require_CalmLensAppClient = require("./CalmLensAppClient-
|
|
9
|
-
const require_UploadController = require("./UploadController-
|
|
8
|
+
const require_CalmLensAppClient = require("./CalmLensAppClient-DoNMg8Dh.js");
|
|
9
|
+
const require_UploadController = require("./UploadController-CVKtUCK0.js");
|
|
10
10
|
let zod = require("zod");
|
|
11
|
-
let zod$1 =
|
|
12
|
-
zod =
|
|
13
|
-
// src/contract/MediaTestTriggers.js
|
|
14
|
-
const MEDIA_TEST_SIGNALS = [...require_CalmLensTestInputArguments.CLASSIFICATION_CATEGORIES, "violence.graphic"];
|
|
15
|
-
const HEX_WORDS = [
|
|
16
|
-
"zero",
|
|
17
|
-
"one",
|
|
18
|
-
"two",
|
|
19
|
-
"three",
|
|
20
|
-
"four",
|
|
21
|
-
"five",
|
|
22
|
-
"six",
|
|
23
|
-
"seven",
|
|
24
|
-
"eight",
|
|
25
|
-
"nine",
|
|
26
|
-
"alpha",
|
|
27
|
-
"bravo",
|
|
28
|
-
"charlie",
|
|
29
|
-
"delta",
|
|
30
|
-
"echo",
|
|
31
|
-
"foxtrot"
|
|
32
|
-
];
|
|
33
|
-
/** Read this aloud, or render it as large, high-contrast text in a video frame. */
|
|
34
|
-
async function generateMediaTestCode$1(signal, testInputKey) {
|
|
35
|
-
if (!MEDIA_TEST_SIGNALS.includes(signal)) throw new RangeError("Unsupported media test signal");
|
|
36
|
-
return `Calm Lens test ${[...await require_CalmLensTestInputArguments.getTestInputTag("media", signal, testInputKey)].map((character) => HEX_WORDS[Number.parseInt(character, 16)]).join(" ")} ${signal.replace(/[.-]/g, " ")} end test`;
|
|
37
|
-
}
|
|
11
|
+
let zod$1 = require_test_inputs.__toESM(zod, 1);
|
|
12
|
+
zod = require_test_inputs.__toESM(zod);
|
|
38
13
|
/**
|
|
39
14
|
* The character an asset ID starts with (after `asset_`) to say the region it lives in: the asset
|
|
40
15
|
* table computes each row's region from it (`AssetTable`), so an ID is only ever in one region and
|
|
@@ -8088,7 +8063,7 @@ const PERMISSION_ACTIONS = [
|
|
|
8088
8063
|
"reviews:write",
|
|
8089
8064
|
"project:manage"
|
|
8090
8065
|
];
|
|
8091
|
-
const ACTION_SCHEMA = /* @__PURE__ */
|
|
8066
|
+
const ACTION_SCHEMA = /* @__PURE__ */ require_test_inputs.lazySchema(() => zod$1.enum(PERMISSION_ACTIONS));
|
|
8092
8067
|
const PROJECT_ACTIONS = [...[
|
|
8093
8068
|
"settings",
|
|
8094
8069
|
"members",
|
|
@@ -8104,12 +8079,12 @@ const PROJECT_ACTIONS = [...[
|
|
|
8104
8079
|
const isProjectAction = (action) => PROJECT_ACTIONS.includes(action);
|
|
8105
8080
|
/** The actions that include `action`: its feature's write action and project:manage. */
|
|
8106
8081
|
const actionsImplying = (action) => !isProjectAction(action) || action === "project:manage" ? [] : action.endsWith(":read") ? [action.replace(/:read$/, ":write"), "project:manage"] : ["project:manage"];
|
|
8107
|
-
const GRANT_SCHEMA = /* @__PURE__ */
|
|
8082
|
+
const GRANT_SCHEMA = /* @__PURE__ */ require_test_inputs.lazySchema(() => zod$1.object({
|
|
8108
8083
|
actions: zod$1.array(ACTION_SCHEMA),
|
|
8109
8084
|
folderId: idField("fldr").nullable(),
|
|
8110
8085
|
includeSubfolders: zod$1.boolean()
|
|
8111
8086
|
}).strict().refine((g) => g.folderId === null || !g.actions.some(isProjectAction), "Project configuration permissions require project scope"));
|
|
8112
|
-
const GRANTS_SCHEMA = /* @__PURE__ */
|
|
8087
|
+
const GRANTS_SCHEMA = /* @__PURE__ */ require_test_inputs.lazySchema(() => zod$1.array(GRANT_SCHEMA).max(100));
|
|
8113
8088
|
[...PERMISSION_ACTIONS.filter((a) => !isProjectAction(a))];
|
|
8114
8089
|
[...PERMISSION_ACTIONS.filter((a) => !isProjectAction(a))];
|
|
8115
8090
|
const permits = (grants, action, folderId, folders) => grants.some((grant) => {
|
|
@@ -9769,7 +9744,7 @@ const MOCK_PRESET_NAMES = {
|
|
|
9769
9744
|
* personal information and profanity, `block` otherwise) and no rules. The mock holds no built-in
|
|
9770
9745
|
* preset settings, and uploads are never decided by a policy.
|
|
9771
9746
|
*/
|
|
9772
|
-
const mockPresetSettings = () => ({ categorySettings: Object.fromEntries(
|
|
9747
|
+
const mockPresetSettings = () => ({ categorySettings: Object.fromEntries(require_test_inputs.CLASSIFICATION_CATEGORIES.map((category) => [category, {
|
|
9773
9748
|
action: category === "personal-information" || category === "profanity" ? "allow" : "block",
|
|
9774
9749
|
allowances: [],
|
|
9775
9750
|
restrictions: []
|
|
@@ -9781,13 +9756,13 @@ const mockPresetSettings = () => ({ categorySettings: Object.fromEntries(require
|
|
|
9781
9756
|
const checkPolicySettings = (settings) => {
|
|
9782
9757
|
const categories = settings?.categorySettings;
|
|
9783
9758
|
if (!categories || typeof categories !== "object") throw invalidField("validation/invalid-type", "settings.categorySettings");
|
|
9784
|
-
for (const category of
|
|
9759
|
+
for (const category of require_test_inputs.CLASSIFICATION_CATEGORIES) {
|
|
9785
9760
|
const value = categories[category];
|
|
9786
9761
|
if (!value || typeof value !== "object") throw invalidField("validation/invalid-type", `settings.categorySettings.${category}`);
|
|
9787
9762
|
for (const key of ["allowances", "restrictions"]) if (!Array.isArray(value[key])) throw invalidField("validation/invalid-type", `settings.categorySettings.${category}.${key}`);
|
|
9788
9763
|
if (typeof value.action !== "string") throw invalidField("validation/invalid-value", `settings.categorySettings.${category}.action`);
|
|
9789
9764
|
}
|
|
9790
|
-
for (const key of Object.keys(categories)) if (!
|
|
9765
|
+
for (const key of Object.keys(categories)) if (!require_test_inputs.CLASSIFICATION_CATEGORIES.includes(key)) throw invalidField("validation/unknown-field", `settings.categorySettings.${key}`);
|
|
9791
9766
|
};
|
|
9792
9767
|
/** The client methods that send a request, the one it is recorded under first. */
|
|
9793
9768
|
const operationsOf = (request) => {
|
|
@@ -9860,17 +9835,14 @@ const operationsOf = (request) => {
|
|
|
9860
9835
|
return [];
|
|
9861
9836
|
};
|
|
9862
9837
|
/**
|
|
9863
|
-
*
|
|
9864
|
-
*
|
|
9838
|
+
* Like the API, every write (POST, PUT, PATCH and DELETE) runs under its `Idempotency-Key`: a retry
|
|
9839
|
+
* with the same key replays the first response. Reads ignore the header.
|
|
9865
9840
|
*/
|
|
9866
|
-
const
|
|
9867
|
-
"
|
|
9868
|
-
"
|
|
9869
|
-
"
|
|
9870
|
-
"
|
|
9871
|
-
"assets.decide",
|
|
9872
|
-
"assets.requestReview",
|
|
9873
|
-
"hashLists.addEntry"
|
|
9841
|
+
const IDEMPOTENT_METHODS = [
|
|
9842
|
+
"POST",
|
|
9843
|
+
"PUT",
|
|
9844
|
+
"PATCH",
|
|
9845
|
+
"DELETE"
|
|
9874
9846
|
];
|
|
9875
9847
|
/** A plain-text upload: the SDKs send text as a JSON body with `content.plainText`. */
|
|
9876
9848
|
const isTextUpload = (request) => {
|
|
@@ -10292,7 +10264,7 @@ var MockCalmLensApi = class {
|
|
|
10292
10264
|
async answer(request, operation, session) {
|
|
10293
10265
|
const { url, headers } = request;
|
|
10294
10266
|
if (!(request.segments[0] === "upload-presets") && headers.get("x-api-key") !== this.apiKey) return this.failureResponse(fail(require_CalmLensError.API_ERROR_CODES.INVALID_API_KEY), url);
|
|
10295
|
-
const key =
|
|
10267
|
+
const key = IDEMPOTENT_METHODS.includes(request.method) ? headers.get("idempotency-key")?.replace(/^[\t\n\r ]+|[\t\n\r ]+$/g, "") : void 0;
|
|
10296
10268
|
const upload = headers.get("x-calmlens-upload");
|
|
10297
10269
|
const contentType = headers.get("content-type");
|
|
10298
10270
|
const isForm = !!upload && /^multipart\/form-data\b/i.test(contentType ?? "");
|
|
@@ -11855,7 +11827,7 @@ var MockCalmLensApi = class {
|
|
|
11855
11827
|
* `search`, by name unless `ordering` says otherwise, with the folders above them.
|
|
11856
11828
|
*/
|
|
11857
11829
|
async listFolders(query) {
|
|
11858
|
-
const all = await this.databaseStorage.listFolders
|
|
11830
|
+
const all = await this.databaseStorage.listFolders(this.projectId);
|
|
11859
11831
|
const parentId = query.get("parentId");
|
|
11860
11832
|
const search = query.get("search")?.trim() || null;
|
|
11861
11833
|
const sort = this.sort(query, ["name", "createdAt"], 1);
|
|
@@ -11905,7 +11877,7 @@ var MockCalmLensApi = class {
|
|
|
11905
11877
|
createdAt: now,
|
|
11906
11878
|
updatedAt: now
|
|
11907
11879
|
};
|
|
11908
|
-
return this.databaseStorage.createFolder
|
|
11880
|
+
return this.databaseStorage.createFolder(folder);
|
|
11909
11881
|
}
|
|
11910
11882
|
async updateFolder(folderId, body) {
|
|
11911
11883
|
const folder = await this.findOwnFolder(folderId);
|
|
@@ -11916,17 +11888,17 @@ var MockCalmLensApi = class {
|
|
|
11916
11888
|
...name !== void 0 ? { name } : {},
|
|
11917
11889
|
updatedAt: this.now()
|
|
11918
11890
|
};
|
|
11919
|
-
return this.databaseStorage.updateFolder
|
|
11891
|
+
return this.databaseStorage.updateFolder(updated);
|
|
11920
11892
|
}
|
|
11921
11893
|
async deleteFolder(folderId) {
|
|
11922
11894
|
await this.findOwnFolder(folderId);
|
|
11923
11895
|
const hasAssets = (await this.databaseStorage.listAssets(this.projectId)).some((asset) => asset.folderId === folderId);
|
|
11924
|
-
const hasChildren = (await this.databaseStorage.listFolders
|
|
11896
|
+
const hasChildren = (await this.databaseStorage.listFolders(this.projectId)).some((folder) => folder.parentId === folderId);
|
|
11925
11897
|
if (hasAssets || hasChildren) throw fail(require_CalmLensError.API_ERROR_CODES.FOLDER_NOT_EMPTY, { details: {
|
|
11926
11898
|
hasAssets,
|
|
11927
11899
|
hasChildren
|
|
11928
11900
|
} });
|
|
11929
|
-
await this.databaseStorage.deleteFolder
|
|
11901
|
+
await this.databaseStorage.deleteFolder(folderId);
|
|
11930
11902
|
}
|
|
11931
11903
|
async moveFolder(folderId, body) {
|
|
11932
11904
|
const folder = await this.findOwnFolder(folderId);
|
|
@@ -11946,10 +11918,10 @@ var MockCalmLensApi = class {
|
|
|
11946
11918
|
parentId: targetParentId,
|
|
11947
11919
|
updatedAt: this.now()
|
|
11948
11920
|
};
|
|
11949
|
-
return this.databaseStorage.updateFolder
|
|
11921
|
+
return this.databaseStorage.updateFolder(updated);
|
|
11950
11922
|
}
|
|
11951
11923
|
async resolveFolder(folderId) {
|
|
11952
|
-
const folder = await this.databaseStorage.getFolder
|
|
11924
|
+
const folder = await this.databaseStorage.getFolder(folderId);
|
|
11953
11925
|
return folder && folder.projectId === this.projectId ? folder : void 0;
|
|
11954
11926
|
}
|
|
11955
11927
|
async findOwnFolder(folderId) {
|
|
@@ -11958,7 +11930,7 @@ var MockCalmLensApi = class {
|
|
|
11958
11930
|
return folder;
|
|
11959
11931
|
}
|
|
11960
11932
|
async assertUniqueFolderName(name, parentId, excludeFolderId) {
|
|
11961
|
-
if ((await this.databaseStorage.listFolders
|
|
11933
|
+
if ((await this.databaseStorage.listFolders(this.projectId)).find((folder) => folder.id !== excludeFolderId && (folder.parentId ?? null) === parentId && folder.name === name)) throw fail(require_CalmLensError.API_ERROR_CODES.DUPLICATE_FOLDER_NAME, { message: `A folder named "${name}" already exists in this location.` });
|
|
11962
11934
|
}
|
|
11963
11935
|
/** A page of the project's upload presets, oldest first unless `sort` says otherwise. */
|
|
11964
11936
|
listUploadPresets(query) {
|
|
@@ -12227,7 +12199,7 @@ var MockCalmLensApi = class {
|
|
|
12227
12199
|
}, url);
|
|
12228
12200
|
const hasApiKey = request.headers.get("x-api-key") === this.apiKey;
|
|
12229
12201
|
const grants = hasApiKey ? this.grants : [];
|
|
12230
|
-
const folders = await this.databaseStorage.listFolders
|
|
12202
|
+
const folders = await this.databaseStorage.listFolders(this.projectId);
|
|
12231
12203
|
const canDownload = () => permits(grants, "assets:download", asset.folderId ?? null, folders);
|
|
12232
12204
|
const status = asset.classification.moderation.decision;
|
|
12233
12205
|
const isHead = request.method === "HEAD";
|
|
@@ -12338,7 +12310,7 @@ var MockCalmLensApi = class {
|
|
|
12338
12310
|
availability: "unavailable",
|
|
12339
12311
|
code: "viewer/region-required"
|
|
12340
12312
|
};
|
|
12341
|
-
const applied = stricter.filter((entry) => entry.region === region || entry.region === "EU" &&
|
|
12313
|
+
const applied = stricter.filter((entry) => entry.region === region || entry.region === "EU" && require_test_inputs.EU_COUNTRIES.has(region)).sort((a, b) => REGIONAL_STATUS_RANK[b.status] - REGIONAL_STATUS_RANK[a.status])[0];
|
|
12342
12314
|
if (applied?.status === "blocked" || applied?.status === "purged") return {
|
|
12343
12315
|
availability: "unavailable",
|
|
12344
12316
|
code: "asset/not-available"
|
|
@@ -12775,12 +12747,9 @@ const createWebhookHeaders = async (options) => {
|
|
|
12775
12747
|
[require_CalmLensServerClient.WEBHOOK_SIGNATURE_HEADER]: await createWebhookSignatureHeader(options.secret, timestamp, options.body)
|
|
12776
12748
|
};
|
|
12777
12749
|
};
|
|
12778
|
-
// src/testing.ts
|
|
12779
|
-
/** A spoken media test phrase for `signal`, signed with the project's test input key. */
|
|
12780
|
-
const generateMediaTestCode = (signal, key) => require_CalmLensTestInputArguments.withValidTestInputArguments(key, () => generateMediaTestCode$1(signal, key));
|
|
12781
12750
|
exports.InMemoryMockDatabaseStorage = InMemoryMockDatabaseStorage;
|
|
12782
12751
|
exports.InMemoryMockImageStorage = InMemoryMockImageStorage;
|
|
12783
|
-
exports.MEDIA_TEST_SIGNALS = MEDIA_TEST_SIGNALS;
|
|
12752
|
+
exports.MEDIA_TEST_SIGNALS = require_test_inputs.MEDIA_TEST_SIGNALS;
|
|
12784
12753
|
exports.MOCK_API_KEY_ID = MOCK_API_KEY_ID;
|
|
12785
12754
|
exports.MOCK_API_KEY_PREFIX = MOCK_API_KEY_PREFIX;
|
|
12786
12755
|
exports.MockCalmLensAppClient = MockCalmLensAppClient;
|
|
@@ -12789,7 +12758,7 @@ exports.MockDecision = MockDecision;
|
|
|
12789
12758
|
exports.createMockApiKey = createMockApiKey;
|
|
12790
12759
|
exports.createWebhookHeaders = createWebhookHeaders;
|
|
12791
12760
|
exports.createWebhookSignatureHeader = createWebhookSignatureHeader;
|
|
12792
|
-
exports.generateMediaTestCode = generateMediaTestCode;
|
|
12761
|
+
exports.generateMediaTestCode = require_test_inputs.generateMediaTestCode;
|
|
12793
12762
|
exports.mockDecision = mockDecision;
|
|
12794
12763
|
exports.signUploadToken = require_CalmLensServerClient.signUploadTokenWithApiKey;
|
|
12795
12764
|
exports.toWebhookEventPayload = toWebhookEventPayload;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./CalmLensTypes-
|
|
2
|
-
import { K as AssetOptions, Z as AssetView, ct as DocumentViewerOptions, dt as TextViewerOptions, lt as PdfAssetOptions, pt as ViewerOptions, q as AssetSession, ut as SpreadsheetViewerOptions } from "./Core-
|
|
1
|
+
import "./CalmLensTypes-CCsoVr39.js";
|
|
2
|
+
import { K as AssetOptions, Z as AssetView, ct as DocumentViewerOptions, dt as TextViewerOptions, lt as PdfAssetOptions, pt as ViewerOptions, q as AssetSession, ut as SpreadsheetViewerOptions } from "./Core-B110Ug8_.js";
|
|
3
3
|
import "pdfjs-dist";
|
|
4
4
|
/** A viewer mounted into an element, which it owns the children of. */
|
|
5
5
|
interface AssetViewer<O extends ViewerOptions = ViewerOptions> {
|
package/cjs/ui.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, h as UploaderProps, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage, z as createUploadController } from "./Core-
|
|
2
|
-
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-
|
|
1
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, I as UploadItem, J as AssetSessionState, K as AssetOptions, L as UploadSnapshot, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, h as UploaderProps, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, k as CalmLensUpload, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage, z as createUploadController } from "./Core-B110Ug8_.js";
|
|
2
|
+
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui--E_s-cDd.js";
|
|
3
3
|
export { ASSET_FILE_ICON_SIZE, ASSET_VIEWERS, type AssetDisplay, type AssetDisplayOptions, type AssetDocumentOptions, type AssetEventHandlers, type AssetImageOptions, type AssetImageSource, type AssetOptions, type AssetProps, AssetSession, type AssetSessionState, type AssetSpreadsheetOptions, type AssetVideoOptions, type AssetView, type AssetViewer, type AssetViewerKind, AssetViewerMount, AssetViewerName, AssetViewerOptionsByKind, CALMLENS_STYLES, CALMLENS_THEME, type CalmLensMessages, type CalmLensProvidedOptions, type CalmLensTheme, type CalmLensUpload, type CustomUploadContext, type CustomUploadResult, DEFAULT_MESSAGES, DEFAULT_VIEWER_MESSAGES, type DocumentViewerOptions, ICONS, ICON_ATTRIBUTES, INSTANT_LOAD_MS, type IconName, type MediaPlayback, MediaStreamPlayer, type MountedViewerKind, type PdfAssetOptions, type ProgressFetchOptions, type SpreadsheetCell, type SpreadsheetRow, type SpreadsheetSheet, type SpreadsheetViewerOptions, type TextViewerOptions, type UploadClient, UploadController, type UploadControllerOptions, type UploadFile, type UploadItem, type UploadItemView, type UploadSnapshot, type UploadStage, type UploaderDisplayOptions, type UploaderProps, type UploaderView, VIEWER_STYLES, type ViewerAsset, type ViewerMessages, type ViewerOptions, type ViewerState, type ViewerTextOptions, createDocumentViewer, createProgressFetch, createSpreadsheetViewer, createTextViewer, createUploadController, describeUploadItem, describeUploader, formatBytes, formatMessage, formatViewerMessage, getAssetAspectRatio, getAssetView, getAssetViewKey, getAssetViewerKind, getDropzoneHint, getMountedViewerOptions, getPeakHeights, getPlayedPercent, getSpreadsheetPage, getUploadItemMessage, getUploadItemOutcome, isFileAccepted, isImageReady, isMountedViewerKind, isSpreadsheetFormat, loadPdfJs, parseSpreadsheetText, pickAssetSource, resolveMessages, resolveTheme, resolveViewerMessages, spreadsheetColumnIndex, withProvidedOptions };
|
package/cjs/ui.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ui = require("./ui-
|
|
3
|
-
const require_Core = require("./Core-
|
|
4
|
-
const require_UploadController = require("./UploadController-
|
|
2
|
+
const require_ui = require("./ui-CuO37F4u.js");
|
|
3
|
+
const require_Core = require("./Core-iNgZ8Cij.js");
|
|
4
|
+
const require_UploadController = require("./UploadController-CVKtUCK0.js");
|
|
5
5
|
exports.ASSET_FILE_ICON_SIZE = require_Core.ASSET_FILE_ICON_SIZE;
|
|
6
6
|
exports.ASSET_VIEWERS = require_ui.ASSET_VIEWERS;
|
|
7
7
|
exports.AssetSession = require_Core.AssetSession;
|
package/cjs/vue.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-
|
|
2
|
-
import "./index-
|
|
3
|
-
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-
|
|
4
|
-
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-
|
|
5
|
-
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui-
|
|
1
|
+
import { O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-CCsoVr39.js";
|
|
2
|
+
import "./index-Dk3I5YXf.js";
|
|
3
|
+
import { $ as MediaPlayback, A as CustomUploadContext, B as isFileAccepted, C as formatMessage, D as resolveMessages, E as getUploadItemOutcome, F as UploadFile, G as AssetImageSource, H as AssetDisplay, J as AssetSessionState, K as AssetOptions, M as UploadClient, N as UploadController, O as CalmLensProvidedOptions, Q as INSTANT_LOAD_MS, R as UploadStage, S as formatBytes, T as getUploadItemMessage, U as AssetDocumentOptions, V as withProvidedOptions, W as AssetImageOptions, X as AssetVideoOptions, Y as AssetSpreadsheetOptions, Z as AssetView, _ as DEFAULT_MESSAGES, _t as DEFAULT_VIEWER_MESSAGES, a as ProgressFetchOptions, at as isImageReady, b as describeUploadItem, bt as resolveViewerMessages, c as ICON_ATTRIBUTES, ct as DocumentViewerOptions, d as AssetDisplayOptions, dt as TextViewerOptions, et as getAssetAspectRatio, f as AssetEventHandlers, ft as ViewerAsset, g as CalmLensMessages, gt as isSpreadsheetFormat, ht as getAssetViewerKind, i as CALMLENS_STYLES, it as getPlayedPercent, j as CustomUploadResult, l as IconName, lt as PdfAssetOptions, m as UploaderDisplayOptions, mt as ViewerTextOptions, n as CalmLensTheme, nt as getAssetViewKey, o as createProgressFetch, ot as pickAssetSource, p as AssetProps, pt as ViewerOptions, q as AssetSession, r as resolveTheme, rt as getPeakHeights, s as ICONS, st as AssetViewerKind, t as CALMLENS_THEME, tt as getAssetView, u as ASSET_FILE_ICON_SIZE, ut as SpreadsheetViewerOptions, v as UploadItemView, vt as ViewerMessages, w as getDropzoneHint, x as describeUploader, y as UploaderView, yt as formatViewerMessage } from "./Core-B110Ug8_.js";
|
|
4
|
+
import { a as UploaderProps, i as UploadSnapshot, n as UploadControllerOptions, r as UploadItem, s as createUploadController, t as CalmLensUpload } from "./BrowserUpload-BuTS7yTy.js";
|
|
5
|
+
import { _ as spreadsheetColumnIndex, a as isMountedViewerKind, b as AssetViewer, c as AssetViewerOptionsByKind, d as createTextViewer, f as SpreadsheetCell, g as parseSpreadsheetText, h as getSpreadsheetPage, i as getMountedViewerOptions, l as VIEWER_STYLES, m as SpreadsheetSheet, n as AssetViewerMount, o as ASSET_VIEWERS, p as SpreadsheetRow, r as MountedViewerKind, s as AssetViewerName, t as MediaStreamPlayer, u as createSpreadsheetViewer, v as loadPdfJs, x as ViewerState, y as createDocumentViewer } from "./ui--E_s-cDd.js";
|
|
6
6
|
import { App, MaybeRefOrGetter, PropType, ShallowRef } from "vue";
|
|
7
7
|
/** Shows a text asset's text, escaped, in a scrolling region. */
|
|
8
8
|
export declare const CalmLensTextViewer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
package/cjs/vue.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_ui = require("./ui-
|
|
3
|
-
const require_Core = require("./Core-
|
|
4
|
-
const require_UploadController = require("./UploadController-
|
|
2
|
+
const require_ui = require("./ui-CuO37F4u.js");
|
|
3
|
+
const require_Core = require("./Core-iNgZ8Cij.js");
|
|
4
|
+
const require_UploadController = require("./UploadController-CVKtUCK0.js");
|
|
5
5
|
const require_FileIcons = require("./FileIcons-Ob003MdS.js");
|
|
6
|
-
const require_BrowserUpload = require("./BrowserUpload-
|
|
6
|
+
const require_BrowserUpload = require("./BrowserUpload-BO_ZukUM.js");
|
|
7
7
|
let vue = require("vue");
|
|
8
8
|
// src/viewers/Vue.ts
|
|
9
9
|
const optional$1 = (type) => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as UploadFile, I as UploadItem$1, L as UploadSnapshot$1, N as UploadController, P as UploadControllerOptions$1, h as UploaderProps$1, k as CalmLensUpload$1 } from "./Core-
|
|
2
|
-
import { r as UseCalmLensUploadResult$1 } from "./ReactUpload-
|
|
1
|
+
import { F as UploadFile, I as UploadItem$1, L as UploadSnapshot$1, N as UploadController, P as UploadControllerOptions$1, h as UploaderProps$1, k as CalmLensUpload$1 } from "./Core-B110Ug8_.js";
|
|
2
|
+
import { r as UseCalmLensUploadResult$1 } from "./ReactUpload-CbtQtN6v.js";
|
|
3
3
|
type UploadItem<F extends UploadFile = File> = UploadItem$1<F>;
|
|
4
4
|
type CalmLensUpload<F extends UploadFile = File> = CalmLensUpload$1<F>;
|
|
5
5
|
type UploadSnapshot<F extends UploadFile = File> = UploadSnapshot$1<F>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createUploadController$1 } from "./UploadController-
|
|
1
|
+
import { n as createUploadController$1 } from "./UploadController-CQ4NouIU.js";
|
|
2
2
|
// src/ui/BrowserUpload.ts
|
|
3
3
|
/** Creates an upload queue for the browser components, such as one a form starts on submit. */
|
|
4
4
|
const createUploadController = (options) => createUploadController$1(options);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as invalidConfig, S as invalidArgument } from "./CalmLensError-
|
|
2
|
-
import { S as validateAppClientOptions, d as checkOptionKeys, o as buildAssetUrl, p as encodePathSegment, u as DEFAULT_CDN_BASE_URL } from "./CalmLensCdn-
|
|
3
|
-
import { c as prepareSubmitAssetOptions, f as APP_OPTION_KEYS, i as expectUploadedAsset, l as resolveConnectionOptions, t as CalmLensConnection, u as splitsIntoParts } from "./CalmLensConnection-
|
|
1
|
+
import { C as invalidConfig, S as invalidArgument } from "./CalmLensError-DjkibkdI.js";
|
|
2
|
+
import { S as validateAppClientOptions, d as checkOptionKeys, o as buildAssetUrl, p as encodePathSegment, u as DEFAULT_CDN_BASE_URL } from "./CalmLensCdn-CW5Fn3ph.js";
|
|
3
|
+
import { c as prepareSubmitAssetOptions, f as APP_OPTION_KEYS, i as expectUploadedAsset, l as resolveConnectionOptions, t as CalmLensConnection, u as splitsIntoParts } from "./CalmLensConnection-Blv8JyLF.js";
|
|
4
4
|
// src/client/CalmLensAppClient.ts
|
|
5
5
|
const inspectSymbol = Symbol.for("nodejs.util.inspect.custom");
|
|
6
6
|
/** `options`, once `checkOptionKeys` finds only keys `operation` takes. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as CdnAssetUrlOptions, O as CalmLensAppClientOptions, Rt as RequestOptions, Vt as RetrieveAssetOptions, an as UploadAssetPartOptions, ln as UploadPresetSubmitAssetOptions, un as UploadedAsset } from "./CalmLensTypes-
|
|
1
|
+
import { M as CdnAssetUrlOptions, O as CalmLensAppClientOptions, Rt as RequestOptions, Vt as RetrieveAssetOptions, an as UploadAssetPartOptions, ln as UploadPresetSubmitAssetOptions, un as UploadedAsset } from "./CalmLensTypes-CCsoVr39.js";
|
|
2
2
|
declare const inspectSymbol: unique symbol;
|
|
3
3
|
/**
|
|
4
4
|
* The CalmLens client for browsers and React Native apps. It uploads through an upload preset,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as invalidConfig, S as invalidArgument, b as MAX_ERROR_BODY_LENGTH, l as CalmLensError, x as SDK_ERROR_CODES } from "./CalmLensError-
|
|
1
|
+
import { C as invalidConfig, S as invalidArgument, b as MAX_ERROR_BODY_LENGTH, l as CalmLensError, x as SDK_ERROR_CODES } from "./CalmLensError-DjkibkdI.js";
|
|
2
2
|
// src/client/CalmLensLogging.ts
|
|
3
3
|
const LOG_LEVELS = [
|
|
4
4
|
"off",
|
|
@@ -152,7 +152,7 @@ const listPages = (fetchPage, { cursor, feed = false } = {}) => {
|
|
|
152
152
|
};
|
|
153
153
|
// src/client/CalmLensVersion.ts
|
|
154
154
|
/** This SDK's version, from its package.json. */
|
|
155
|
-
const SDK_VERSION = "0.
|
|
155
|
+
const SDK_VERSION = "0.38.0";
|
|
156
156
|
const runtimeName = () => {
|
|
157
157
|
const runtime = globalThis;
|
|
158
158
|
if (isReactNativeRuntime()) return "react-native";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as invalidArgument, l as CalmLensError, w as API_ERROR_CODES, x as SDK_ERROR_CODES } from "./CalmLensError-
|
|
2
|
-
import { A as MAX_OTHER_DOCUMENT_UPLOAD_BYTES, D as MAX_DIRECT_IMAGE_UPLOAD_BYTES, F as sleep, M as getRejectedUploadMimeTypeError, N as normalizeUploadMimeType, O as MAX_IMAGE_UPLOAD_BYTES, P as CalmLensTransport, T as UPLOAD_MIME_DOCUMENTS, U as resolveLogLevel, _ as randomUuid, j as MAX_PDF_UPLOAD_BYTES, k as MAX_NON_IMAGE_UPLOAD_BYTES, m as isAcceptedUploadMimeType, y as stringifyQuery } from "./CalmLensCdn-
|
|
1
|
+
import { S as invalidArgument, l as CalmLensError, w as API_ERROR_CODES, x as SDK_ERROR_CODES } from "./CalmLensError-DjkibkdI.js";
|
|
2
|
+
import { A as MAX_OTHER_DOCUMENT_UPLOAD_BYTES, D as MAX_DIRECT_IMAGE_UPLOAD_BYTES, F as sleep, M as getRejectedUploadMimeTypeError, N as normalizeUploadMimeType, O as MAX_IMAGE_UPLOAD_BYTES, P as CalmLensTransport, T as UPLOAD_MIME_DOCUMENTS, U as resolveLogLevel, _ as randomUuid, j as MAX_PDF_UPLOAD_BYTES, k as MAX_NON_IMAGE_UPLOAD_BYTES, m as isAcceptedUploadMimeType, y as stringifyQuery } from "./CalmLensCdn-CW5Fn3ph.js";
|
|
3
3
|
// src/contract/AssetPayload.js
|
|
4
4
|
const bufferInputToBytes = (value) => {
|
|
5
5
|
if (value instanceof ArrayBuffer) return new Uint8Array(value);
|
|
@@ -55,6 +55,7 @@ const API_ERROR_CODES = {
|
|
|
55
55
|
IDEMPOTENT_REQUEST_IN_PROGRESS: "idempotency/request-in-progress",
|
|
56
56
|
NO_RENDERED_VERSION: "asset/no-rendered-version",
|
|
57
57
|
ASSET_NOT_FOUND: "asset/not-found",
|
|
58
|
+
ASSET_NOT_AVAILABLE: "asset/not-available",
|
|
58
59
|
PROJECT_NOT_FOUND: "project/not-found",
|
|
59
60
|
ASSET_CHILD_NOT_DELETABLE: "asset/child-not-deletable",
|
|
60
61
|
ASSET_REVIEW_CHANGED: "asset/review-changed",
|
|
@@ -341,6 +342,10 @@ const API_ERROR_DEFINITIONS = {
|
|
|
341
342
|
status: 404,
|
|
342
343
|
message: "Asset not found"
|
|
343
344
|
},
|
|
345
|
+
"asset/not-available": {
|
|
346
|
+
status: 403,
|
|
347
|
+
message: "This asset isn't available to this viewer: it may still be uploading or awaiting moderation, or its delivery is blocked or restricted."
|
|
348
|
+
},
|
|
344
349
|
"project/not-found": {
|
|
345
350
|
status: 404,
|
|
346
351
|
message: "Project not found"
|
|
@@ -784,8 +789,8 @@ var CalmLensError = class CalmLensError extends Error {
|
|
|
784
789
|
/**
|
|
785
790
|
* Whether repeating the same request may succeed: transport failures, timeouts (a request's
|
|
786
791
|
* `timeoutMs` or `waitForDecision`'s deadline), throttling (429), internal and gateway errors (500, 502, 503, 504)
|
|
787
|
-
* and idempotent requests still in progress. Only repeat a create
|
|
788
|
-
* `idempotencyKey`.
|
|
792
|
+
* and idempotent requests still in progress. Only repeat a write (a create, upload, change or
|
|
793
|
+
* delete) with the same `idempotencyKey`.
|
|
789
794
|
*/
|
|
790
795
|
isRetryable() {
|
|
791
796
|
return RETRYABLE_CODES.has(this.code) || this.status !== void 0 && RETRYABLE_STATUSES.has(this.status);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as HashList, l as HashListEntry } from "./Classification-C3pkrGYS-B7EygpJn.js";
|
|
2
|
-
import { $t as UpdateFolderOptions, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, Ct as ListPoliciesOptions, D as BatchAssetsResponse, E as BatchAssetsOptions, Et as MoveFolderOptions, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gt as SignAssetUrlOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Nt as ProjectSettingsResource, P as CdnServeOptions, Qt as UpdateAssetOptions, Rn as Folder, Rt as RequestOptions, St as ListLensesOptions, T as AssignPolicyOptions, Tt as MoveAssetOptions, U as CreatePolicyOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Z as EnsureUploadPresetsResponse, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bt as ListHashListEntriesOptions, cn as UploadPresetPage, ct as HashListIdOptions, dn as VerifyWebhookSignatureOptions, en as UpdateHashListOptions, ft as Lens, gt as ListAssetTimelineOptions, ht as ListAssetChildrenOptions, in as UpgradePolicyOptions, it as FolderPage, jt as PolicyPage, k as CalmLensServerClientOptions, kt as Policy, lt as HashListPage, mt as LensPage, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, ot as HashListEntryIdOptions, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, v as AssetSearchResponse, vt as ListEventsOptions, wt as ListUploadPresetsOptions, xt as ListHashListsOptions, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zt as ResetPolicyOptions } from "./CalmLensTypes-
|
|
3
|
-
import { d as ListPromise, l as CalmLensResponse, r as CdnResponse } from "./WebhookPayload-
|
|
2
|
+
import { $t as UpdateFolderOptions, At as PolicyIdOptions, B as CreateHashListOptions, Bn as AssetSearchQuery, Bt as RetrieveAssetByExternalIdOptions, Ct as ListPoliciesOptions, D as BatchAssetsResponse, E as BatchAssetsOptions, Et as MoveFolderOptions, Ft as RemoveAssetContentOptions, G as DeleteAssetOptions, Gt as SignAssetUrlOptions, Hn as AssetInfo, Ht as RetryAssetOptions, I as ClassifyTextOptions, It as RequestAssetReviewOptions, J as EnsureLensesOptions, Jt as SignedUploadToken, K as DeleteMetadataFieldOptions, Kt as SignUploadTokenOptions, M as CdnAssetUrlOptions, Nt as ProjectSettingsResource, P as CdnServeOptions, Qt as UpdateAssetOptions, Rn as Folder, Rt as RequestOptions, St as ListLensesOptions, T as AssignPolicyOptions, Tt as MoveAssetOptions, U as CreatePolicyOptions, V as CreateLensOptions, Vt as RetrieveAssetOptions, W as DecideAssetOptions, Wt as SetPolicyAutomaticUpdatesOptions, X as EnsureUploadPresetsOptions, Xt as SubmitAssetOptions, Y as EnsureMetadataFieldsOptions, Z as EnsureUploadPresetsResponse, _ as AssetPage, _n as AssetReviewRequest, _t as ListAssetsOptions, an as UploadAssetPartOptions, at as GetAssetInfoOptions, b as AssetTimelinePage, bt as ListHashListEntriesOptions, cn as UploadPresetPage, ct as HashListIdOptions, dn as VerifyWebhookSignatureOptions, en as UpdateHashListOptions, ft as Lens, gt as ListAssetTimelineOptions, ht as ListAssetChildrenOptions, in as UpgradePolicyOptions, it as FolderPage, jt as PolicyPage, k as CalmLensServerClientOptions, kt as Policy, lt as HashListPage, mt as LensPage, nn as UpdatePolicyOptions, nt as EventsPage, o as AssetChildrenPage, ot as HashListEntryIdOptions, pn as WaitForAssetDecisionOptions, pt as LensIdOptions, q as EnsureLensOptions, qt as SignedAssetUrl, r as Asset, rn as UpdateProjectSettingsOptions, rt as FolderIdOptions, sn as UploadPresetIdOptions, st as HashListEntryPage, t as AddHashListEntryOptions, tn as UpdateLensOptions, v as AssetSearchResponse, vt as ListEventsOptions, wt as ListUploadPresetsOptions, xt as ListHashListsOptions, yn as MetadataFieldsResource, yt as ListFoldersOptions, z as CreateFolderOptions, zt as ResetPolicyOptions } from "./CalmLensTypes-CCsoVr39.js";
|
|
3
|
+
import { d as ListPromise, l as CalmLensResponse, r as CdnResponse } from "./WebhookPayload-_fvY2eu8.js";
|
|
4
4
|
interface TransportRequest {
|
|
5
5
|
/** The client method sending the request, such as `assets.retrieve`, for hooks and logs. */
|
|
6
6
|
operation?: string;
|
|
@@ -8,7 +8,7 @@ interface TransportRequest {
|
|
|
8
8
|
url: string;
|
|
9
9
|
headers?: Record<string, string>;
|
|
10
10
|
body?: BodyInit | null;
|
|
11
|
-
/** Sent as `Idempotency-Key`; it also makes a
|
|
11
|
+
/** Sent as `Idempotency-Key`; it also makes a write safe to retry. */
|
|
12
12
|
idempotencyKey?: string;
|
|
13
13
|
/** Deadline per attempt in milliseconds, or undefined for none. */
|
|
14
14
|
timeoutMs?: number;
|
|
@@ -214,8 +214,8 @@ declare class CalmLensServerClient {
|
|
|
214
214
|
* another (`asset/child-not-deletable`), or nothing is queued. Resolves with
|
|
215
215
|
* `{ batchId, status: "queued", assetCount }` once queued; the work runs in the background
|
|
216
216
|
* and records `asset.deleted` or `asset.content-removed` for each asset, with a `batch-id`
|
|
217
|
-
* fact naming `batchId`. Assets under a safety hold are skipped.
|
|
218
|
-
* `
|
|
217
|
+
* fact naming `batchId`. Assets under a safety hold are skipped. Retried only with an
|
|
218
|
+
* `idempotencyKey` request option.
|
|
219
219
|
*/
|
|
220
220
|
batch: (options: BatchAssetsOptions, requestOptions?: RequestOptions) => Promise<CalmLensResponse<BatchAssetsResponse>>;
|
|
221
221
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as invalidConfig, S as invalidArgument, l as CalmLensError, x as SDK_ERROR_CODES } from "./CalmLensError-
|
|
2
|
-
import { B as copyLastResponse, C as validateBatchAssetsOptions, H as readEnv, L as isBrowserRuntime, R as isReactNativeRuntime, V as listPages, b as toTextAssetOptions, d as checkOptionKeys, g as pollForDecision, i as appendSignedLocation, l as validateSignAssetUrlOptions, o as buildAssetUrl, p as encodePathSegment, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, w as validateServerClientOptions, y as stringifyQuery } from "./CalmLensCdn-
|
|
3
|
-
import { a as getMockHooks, c as prepareSubmitAssetOptions, d as validateCallOptions, l as resolveConnectionOptions, m as SERVER_OPTION_KEYS, o as invalidPayload, p as NULLABLE_OPTION_KEYS, r as expectAsset, s as newIdempotencyKey, t as CalmLensConnection, u as splitsIntoParts } from "./CalmLensConnection-
|
|
1
|
+
import { C as invalidConfig, S as invalidArgument, l as CalmLensError, x as SDK_ERROR_CODES } from "./CalmLensError-DjkibkdI.js";
|
|
2
|
+
import { B as copyLastResponse, C as validateBatchAssetsOptions, H as readEnv, L as isBrowserRuntime, R as isReactNativeRuntime, V as listPages, b as toTextAssetOptions, d as checkOptionKeys, g as pollForDecision, i as appendSignedLocation, l as validateSignAssetUrlOptions, o as buildAssetUrl, p as encodePathSegment, s as getAssetInfo, u as DEFAULT_CDN_BASE_URL, w as validateServerClientOptions, y as stringifyQuery } from "./CalmLensCdn-CW5Fn3ph.js";
|
|
3
|
+
import { a as getMockHooks, c as prepareSubmitAssetOptions, d as validateCallOptions, l as resolveConnectionOptions, m as SERVER_OPTION_KEYS, o as invalidPayload, p as NULLABLE_OPTION_KEYS, r as expectAsset, s as newIdempotencyKey, t as CalmLensConnection, u as splitsIntoParts } from "./CalmLensConnection-Blv8JyLF.js";
|
|
4
4
|
import { n as sha256Hex, r as timingSafeEqual, t as hmacSha256Hex } from "./CryptoUtils-BLCa-oZe-DKr3LmN6.js";
|
|
5
5
|
// src/contract/JsonUtils.js
|
|
6
6
|
const stringifyJsonCanonical = (value) => JSON.stringify(value, (_key, nestedValue) => {
|
|
@@ -654,8 +654,8 @@ sign: async (options) => {
|
|
|
654
654
|
* another (`asset/child-not-deletable`), or nothing is queued. Resolves with
|
|
655
655
|
* `{ batchId, status: "queued", assetCount }` once queued; the work runs in the background
|
|
656
656
|
* and records `asset.deleted` or `asset.content-removed` for each asset, with a `batch-id`
|
|
657
|
-
* fact naming `batchId`. Assets under a safety hold are skipped.
|
|
658
|
-
* `
|
|
657
|
+
* fact naming `batchId`. Assets under a safety hold are skipped. Retried only with an
|
|
658
|
+
* `idempotencyKey` request option.
|
|
659
659
|
*/
|
|
660
660
|
batch: async (options, requestOptions) => {
|
|
661
661
|
const { assetIds, operation } = checked("assets.batch", options);
|
|
@@ -936,7 +936,16 @@ sign: async (options) => {
|
|
|
936
936
|
});
|
|
937
937
|
}
|
|
938
938
|
async #submitEnsureLenses(options, requestOptions) {
|
|
939
|
-
|
|
939
|
+
const key = requestOptions?.idempotencyKey;
|
|
940
|
+
const chunked = options.length > 100;
|
|
941
|
+
if (chunked && (key?.length ?? 0) > 240) throw invalidArgument(`idempotencyKey can be at most 240 characters for lenses sent in several requests`);
|
|
942
|
+
for (let start = 0; start < options.length; start += 100) {
|
|
943
|
+
const chunk = start / 100 + 1;
|
|
944
|
+
await this.#submitEnsureLensesChunk(options.slice(start, start + 100), key && chunked ? {
|
|
945
|
+
...requestOptions,
|
|
946
|
+
idempotencyKey: `${key}:chunk-${chunk}`
|
|
947
|
+
} : requestOptions);
|
|
948
|
+
}
|
|
940
949
|
}
|
|
941
950
|
async #submitEnsureLensesChunk(options, requestOptions) {
|
|
942
951
|
const result = await this.#send("ensureLenses", requestOptions, "PUT", `${this.#projectPath}/lenses`, { body: { lenses: options } });
|
|
@@ -42876,8 +42876,8 @@ interface ClientRequestDefaults {
|
|
|
42876
42876
|
uploadTimeoutMs?: number;
|
|
42877
42877
|
/**
|
|
42878
42878
|
* How many times to retry a request that failed before a response arrived or returned 429,
|
|
42879
|
-
* 500, 502, 503, 504 or `idempotency/request-in-progress`. Only reads and
|
|
42880
|
-
* `Idempotency-Key` (
|
|
42879
|
+
* 500, 502, 503, 504 or `idempotency/request-in-progress`. Only reads and writes carrying an
|
|
42880
|
+
* `Idempotency-Key` (uploads always do) are retried, with jittered backoff that honours
|
|
42881
42881
|
* `Retry-After`. Streamed bodies are never retried. Defaults to 2; 0 disables retries.
|
|
42882
42882
|
*/
|
|
42883
42883
|
maxRetries?: number;
|
|
@@ -42902,8 +42902,8 @@ interface RequestOptions {
|
|
|
42902
42902
|
/** How many times to retry this call's requests; 0 turns retries off. */
|
|
42903
42903
|
maxRetries?: number;
|
|
42904
42904
|
/**
|
|
42905
|
-
* Sent as `Idempotency-Key`, which
|
|
42906
|
-
* Uploads generate one when you pass none.
|
|
42905
|
+
* Sent as `Idempotency-Key`, which makes any write (POST, PUT, PATCH or DELETE) safe to retry:
|
|
42906
|
+
* CalmLens runs it once and replays its response. Uploads generate one when you pass none.
|
|
42907
42907
|
*/
|
|
42908
42908
|
idempotencyKey?: string;
|
|
42909
42909
|
/** Extra headers. The SDK's own (`X-Api-Key`, `User-Agent`, `Idempotency-Key`) win. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as CdnTransform, O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-
|
|
2
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
1
|
+
import { F as CdnTransform, O as CalmLensAppClientOptions, fn as ViewerClaims, g as AssetModerationStatus, i as AssetAvailability } from "./CalmLensTypes-CCsoVr39.js";
|
|
2
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-L5x_sMOI.js";
|
|
3
3
|
import { o as UploadFileIconFamily } from "./FileIcons-4qSX7DW2.js";
|
|
4
4
|
/**
|
|
5
5
|
* The text the asset viewers show, keyed by name. `{name}` placeholders are filled in when shown.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as CalmLensError } from "./CalmLensError-
|
|
2
|
-
import { a as assetUrlOf, c as toUrlViewerClaims, r as appendAssetLocation, s as getAssetInfo, v as serializeTransform, x as transformSelector } from "./CalmLensCdn-
|
|
3
|
-
import { o as placeholderHashToDataURL } from "./UploadController-
|
|
1
|
+
import { l as CalmLensError } from "./CalmLensError-DjkibkdI.js";
|
|
2
|
+
import { a as assetUrlOf, c as toUrlViewerClaims, r as appendAssetLocation, s as getAssetInfo, v as serializeTransform, x as transformSelector } from "./CalmLensCdn-CW5Fn3ph.js";
|
|
3
|
+
import { o as placeholderHashToDataURL } from "./UploadController-CQ4NouIU.js";
|
|
4
4
|
import { a as getFileIcon, c as renderFileIconSvg } from "./FileIcons-M6dzjFxd.js";
|
|
5
5
|
// src/ui/viewers/ViewerAsset.ts
|
|
6
6
|
/** Spreadsheet MIME types, as `content.format` reports them (compared lower-cased). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as withProvidedOptions, n as createUploadController } from "./UploadController-
|
|
1
|
+
import { i as withProvidedOptions, n as createUploadController } from "./UploadController-CQ4NouIU.js";
|
|
2
2
|
import { createContext, createElement, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
3
3
|
// src/ui/ReactUpload.ts
|
|
4
4
|
const CalmLensContext = createContext(void 0);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as UploadFile, L as UploadSnapshot, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions } from "./Core-
|
|
1
|
+
import { F as UploadFile, L as UploadSnapshot, N as UploadController, O as CalmLensProvidedOptions, P as UploadControllerOptions } from "./Core-B110Ug8_.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
type CalmLensProviderProps<F extends UploadFile = File> = CalmLensProvidedOptions<F> & {
|
|
4
4
|
children?: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as CalmLensError, x as SDK_ERROR_CODES } from "./CalmLensError-
|
|
2
|
-
import { t as CalmLensAppClient } from "./CalmLensAppClient-
|
|
1
|
+
import { l as CalmLensError, x as SDK_ERROR_CODES } from "./CalmLensError-DjkibkdI.js";
|
|
2
|
+
import { t as CalmLensAppClient } from "./CalmLensAppClient-C7ScAfRx.js";
|
|
3
3
|
// src/contract/PlaceholderHashDecode.js
|
|
4
4
|
/**
|
|
5
5
|
* Decodes a ThumbHash to an RGBA image. RGB is not be premultiplied by A.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fn as EventResourceKind, Nn as TypedEvent, jn as Actor } from "./CalmLensTypes-
|
|
1
|
+
import { Fn as EventResourceKind, Nn as TypedEvent, jn as Actor } from "./CalmLensTypes-CCsoVr39.js";
|
|
2
2
|
import * as zod from "zod";
|
|
3
3
|
/** Error codes the CalmLens API documents, by name. */
|
|
4
4
|
declare const API_ERROR_CODES: {
|
|
@@ -56,6 +56,7 @@ declare const API_ERROR_CODES: {
|
|
|
56
56
|
readonly IDEMPOTENT_REQUEST_IN_PROGRESS: "idempotency/request-in-progress";
|
|
57
57
|
readonly NO_RENDERED_VERSION: "asset/no-rendered-version";
|
|
58
58
|
readonly ASSET_NOT_FOUND: "asset/not-found";
|
|
59
|
+
readonly ASSET_NOT_AVAILABLE: "asset/not-available";
|
|
59
60
|
readonly PROJECT_NOT_FOUND: "project/not-found";
|
|
60
61
|
readonly ASSET_CHILD_NOT_DELETABLE: "asset/child-not-deletable";
|
|
61
62
|
readonly ASSET_REVIEW_CHANGED: "asset/review-changed";
|
|
@@ -208,6 +209,7 @@ declare const CALMLENS_ERROR_CODES: {
|
|
|
208
209
|
readonly IDEMPOTENT_REQUEST_IN_PROGRESS: "idempotency/request-in-progress";
|
|
209
210
|
readonly NO_RENDERED_VERSION: "asset/no-rendered-version";
|
|
210
211
|
readonly ASSET_NOT_FOUND: "asset/not-found";
|
|
212
|
+
readonly ASSET_NOT_AVAILABLE: "asset/not-available";
|
|
211
213
|
readonly PROJECT_NOT_FOUND: "project/not-found";
|
|
212
214
|
readonly ASSET_CHILD_NOT_DELETABLE: "asset/child-not-deletable";
|
|
213
215
|
readonly ASSET_REVIEW_CHANGED: "asset/review-changed";
|
|
@@ -376,8 +378,8 @@ declare class CalmLensError extends Error {
|
|
|
376
378
|
/**
|
|
377
379
|
* Whether repeating the same request may succeed: transport failures, timeouts (a request's
|
|
378
380
|
* `timeoutMs` or `waitForDecision`'s deadline), throttling (429), internal and gateway errors (500, 502, 503, 504)
|
|
379
|
-
* and idempotent requests still in progress. Only repeat a create
|
|
380
|
-
* `idempotencyKey`.
|
|
381
|
+
* and idempotent requests still in progress. Only repeat a write (a create, upload, change or
|
|
382
|
+
* delete) with the same `idempotencyKey`.
|
|
381
383
|
*/
|
|
382
384
|
isRetryable(): boolean;
|
|
383
385
|
}
|