@mapletip/data 0.1.0 → 0.2.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/README.md +52 -3
- package/client/core.d.ts +1 -0
- package/client/core.js +5 -2
- package/client/items.d.ts +37 -1
- package/client/items.js +91 -13
- package/client/static-client.d.ts +2 -2
- package/client/static-client.js +1 -1
- package/generated/item-browse-pack-2.d.ts +238 -0
- package/generated/item-browse-pack-2.validator.js +17 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ bundles the domains it imports:
|
|
|
13
13
|
```ts
|
|
14
14
|
import { getMonsterBrowse, openMonsterProduct } from '@mapletip/data/monsters';
|
|
15
15
|
import { openRelease, resolveTargetAvailability } from '@mapletip/data/release';
|
|
16
|
-
import { openItemProduct } from '@mapletip/data/items';
|
|
16
|
+
import { getItemBrowse, openItemProduct } from '@mapletip/data/items';
|
|
17
17
|
import { openEquipmentProduct } from '@mapletip/data/equipment';
|
|
18
18
|
import { openQuestProduct } from '@mapletip/data/quests';
|
|
19
19
|
import { openMediaProduct, resolveMediaUrl } from '@mapletip/data/media';
|
|
@@ -65,6 +65,54 @@ The same import runs in Node (SSR, prerendering, scripts) and in browsers using
|
|
|
65
65
|
(HTTPS or localhost) because SHA-256 verification has no fallback. Rendering mode,
|
|
66
66
|
routing, caching and UI adaptation stay with the consumer.
|
|
67
67
|
|
|
68
|
+
## Items browse
|
|
69
|
+
|
|
70
|
+
`getItemBrowse` reads one build's verified Item browse roster in a single call:
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
import { getItemBrowse, itemIconUrl } from '@mapletip/data/items';
|
|
74
|
+
|
|
75
|
+
const browse = await getItemBrowse({
|
|
76
|
+
baseUrl: releaseRootUrl,
|
|
77
|
+
pin: releasePin,
|
|
78
|
+
buildId: 'gms-v83',
|
|
79
|
+
signal: abortController.signal,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
for (const row of browse.records) {
|
|
83
|
+
console.log(row.key, row.name.state === 'known' ? row.name.value : row.key);
|
|
84
|
+
if (row.icon.state === 'known') image.src = itemIconUrl(releaseRootUrl, row.icon.value);
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
It is exactly `openRelease(options)` → `openItemBuild(options.buildId)` → `loadBrowse()`:
|
|
89
|
+
it adds no cache, no fallback build selection and no latest lookup. The read is
|
|
90
|
+
build-scoped: it fetches only the browse packs named by that build's Item product
|
|
91
|
+
manifest, and a build ID that the pinned release does not carry rejects with
|
|
92
|
+
`UNKNOWN_BUILD` instead of falling back to another build. Each row is the compact
|
|
93
|
+
Rust-owned browse record plus its stable public `key`; `scope` and `coverage` come from
|
|
94
|
+
the verified packs, every pack must agree on `coverage`, and the roster must match the
|
|
95
|
+
manifest's `totalEntityCount`, so a short roster never resolves. `fetch`, `signal`,
|
|
96
|
+
`onRequest` and the validated `preloaded` release metadata behave exactly as they do on
|
|
97
|
+
`openRelease`.
|
|
98
|
+
|
|
99
|
+
Omitted row fields are coverage claims, not zeroes:
|
|
100
|
+
|
|
101
|
+
- An omitted relationship count means zero recorded entities when
|
|
102
|
+
`coverage.relationships[key]` is `complete`. `unsupported` is not zero: it means the
|
|
103
|
+
producer cannot supply that relationship for this build. `partial` means the recorded
|
|
104
|
+
count is a lower bound, so `monster-drop` on `gms-v83` is `partial`.
|
|
105
|
+
- An omitted `scroll.tier` is unresolved, not absent, when `coverage.scrollTier` is
|
|
106
|
+
`complete`; an omitted `scroll.cursed` means the Scroll has no cursed property.
|
|
107
|
+
- `scroll.targets` are verified identities. `scroll.targetLabel` is a label derived from
|
|
108
|
+
the Scroll's name and is never an identity.
|
|
109
|
+
|
|
110
|
+
`itemIconUrl(baseUrl, contentId)` resolves a Media blob through the same core path
|
|
111
|
+
resolver as `resolveMediaUrl` and returns `<baseUrl>/media/images/<ab>/<contentId>.png`.
|
|
112
|
+
It rejects any content ID that is not a 64-character lowercase SHA-256 digest with
|
|
113
|
+
`SCHEMA_VALIDATION_ERROR`, so a row's `icon.value` can be used without building a
|
|
114
|
+
make-believe descriptor.
|
|
115
|
+
|
|
68
116
|
## What each entry loads
|
|
69
117
|
|
|
70
118
|
Monster catalog validation and the release/manifest/index validators are imported
|
|
@@ -74,11 +122,12 @@ operation that needs it, as a separate on-demand chunk:
|
|
|
74
122
|
| Entry | Eager generated validators | Loaded on demand |
|
|
75
123
|
| --- | --- | --- |
|
|
76
124
|
| `/monsters` | release pin, release manifest, build index, product manifest, Monster catalog 1.x and 2.0 | Monster detail, location/relationship, core-relationship and evidence packs |
|
|
77
|
-
| `/items
|
|
125
|
+
| `/items` | product manifest only (every Item validator is on demand) | browse, catalog, detail, relationship and evidence packs, plus the release client behind `getItemBrowse` |
|
|
126
|
+
| `/equipment` | that domain's catalog, detail, relationship and evidence packs | — |
|
|
78
127
|
| `/quests` | none (Quest validators are always on demand) | catalog, browse, detail, relationship, auxiliary and evidence packs |
|
|
79
128
|
| `/media` | that domain's catalog, detail packs | — |
|
|
80
129
|
| `/release` | release pin, release manifest, build index, product manifest, Monster catalog (Monster is the release client's build selector) | Item, Equipment, Media, Quest and static-domain clients |
|
|
81
|
-
| `.` and `/client` | every domain's eager validators (compatibility view) | Quest and Monster detail/relationship/evidence validators |
|
|
130
|
+
| `.` and `/client` | every domain's eager validators (compatibility view) | every Item validator, plus Quest and Monster detail/relationship/evidence validators |
|
|
82
131
|
|
|
83
132
|
A Monster-browse-only browser consumer therefore ships the release and Monster catalog
|
|
84
133
|
code and nothing else; the repository's `tools/benchmark-bundle.mjs` measures it against
|
package/client/core.d.ts
CHANGED
|
@@ -118,6 +118,7 @@ export declare class MissingPageError extends StaticClientError {
|
|
|
118
118
|
}
|
|
119
119
|
export declare function normalizedBaseUrl(value: string | URL): URL;
|
|
120
120
|
export declare function verifyBlob(bytes: Uint8Array, descriptor: IntegrityDescriptor): Promise<void>;
|
|
121
|
+
export declare function resolveReleasePath(baseUrl: URL | string, path: string): string;
|
|
121
122
|
export declare function resolveMediaUrl(baseUrl: URL | string, descriptor: IntegrityDescriptor): string;
|
|
122
123
|
export declare function assertCompatibleManifest(manifest: ConnectedProductManifest | ReleaseManifest): number;
|
|
123
124
|
export declare function createJsonFetcher(options: {
|
package/client/core.js
CHANGED
|
@@ -120,9 +120,12 @@ export async function verifyBlob(bytes, descriptor) {
|
|
|
120
120
|
throw new IntegrityError(`Byte length mismatch for ${descriptor.path}: expected ${descriptor.byteLength}, got ${bytes.byteLength}`);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
export function
|
|
123
|
+
export function resolveReleasePath(baseUrl, path) {
|
|
124
124
|
const base = baseUrl instanceof URL ? baseUrl : normalizedBaseUrl(baseUrl);
|
|
125
|
-
return resolveDescriptorUrl(base,
|
|
125
|
+
return resolveDescriptorUrl(base, path).toString();
|
|
126
|
+
}
|
|
127
|
+
export function resolveMediaUrl(baseUrl, descriptor) {
|
|
128
|
+
return resolveReleasePath(baseUrl, descriptor.path);
|
|
126
129
|
}
|
|
127
130
|
function parseJson(bytes, path) {
|
|
128
131
|
try {
|
package/client/items.d.ts
CHANGED
|
@@ -1,14 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@mapletip/data/items` — Item browse and Item product operations.
|
|
3
|
+
*
|
|
4
|
+
* Every Item validator is loaded on the first operation that needs it and the release
|
|
5
|
+
* client is imported on demand, so a browse-only consumer never downloads catalog,
|
|
6
|
+
* detail, relationship, evidence validators or the Monster client.
|
|
7
|
+
*/
|
|
8
|
+
import type { ItemBrowsePack, ItemBrowseCoverage, ItemBrowseRecord } from '../generated/item-browse-pack-2.d.ts';
|
|
1
9
|
import type { ItemCatalog } from '../generated/item-catalog-2.d.ts';
|
|
2
10
|
import type { ItemDetailRecord } from '../generated/item-detail-2.d.ts';
|
|
3
11
|
import type { ItemRelationshipPage } from '../generated/item-relationship-pack-2.d.ts';
|
|
4
12
|
import type { ItemEvidencePage } from '../generated/item-evidence-pack-2.d.ts';
|
|
5
|
-
import
|
|
13
|
+
import type { OpenReleaseOptions } from './release.js';
|
|
14
|
+
import { type GetRelationshipOptions, type OpenProductOptions, type OperationOptions, type ProductScope, type StaticProductManifest, type VerifiedProductContext } from './core.js';
|
|
6
15
|
export type StaticItemCatalog = ItemCatalog;
|
|
7
16
|
export type StaticItemDetail = ItemDetailRecord;
|
|
8
17
|
export type { GetRelationshipOptions };
|
|
18
|
+
export type { ItemBrowsePack, ItemBrowseCoverage, ItemBrowseRecord };
|
|
19
|
+
export type { OpenReleaseOptions };
|
|
20
|
+
/** One browse row: the compact record plus its stable public key. */
|
|
21
|
+
export type ItemBrowseRow = ItemBrowseRecord & {
|
|
22
|
+
readonly key: string;
|
|
23
|
+
};
|
|
24
|
+
/** The whole verified browse roster of one Item build. */
|
|
25
|
+
export interface StaticItemBrowse {
|
|
26
|
+
readonly scope: ProductScope;
|
|
27
|
+
readonly coverage: ItemBrowseCoverage;
|
|
28
|
+
readonly records: readonly ItemBrowseRow[];
|
|
29
|
+
}
|
|
9
30
|
export interface StaticItemProductClient {
|
|
10
31
|
readonly manifest: StaticProductManifest;
|
|
11
32
|
loadCatalog(options?: OperationOptions): Promise<StaticItemCatalog>;
|
|
33
|
+
loadBrowse(options?: OperationOptions): Promise<StaticItemBrowse>;
|
|
12
34
|
getDetail(key: string, options?: OperationOptions): Promise<StaticItemDetail>;
|
|
13
35
|
getRelationshipPage(pageKey: string, options?: GetRelationshipOptions): Promise<ItemRelationshipPage>;
|
|
14
36
|
getEvidencePage(pageKey: string, options?: OperationOptions): Promise<ItemEvidencePage>;
|
|
@@ -20,3 +42,17 @@ export declare function openItemProduct(options: OpenProductOptions): Promise<St
|
|
|
20
42
|
export declare function isItemProductClient(client: {
|
|
21
43
|
readonly manifest: StaticProductManifest;
|
|
22
44
|
}): client is StaticItemProductClient;
|
|
45
|
+
/** Options for the one-shot Item browse read: an opened release plus the build to read. */
|
|
46
|
+
export type GetItemBrowseOptions = OpenReleaseOptions & {
|
|
47
|
+
readonly buildId: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Read one build's verified Item browse roster in a single call.
|
|
51
|
+
*
|
|
52
|
+
* Equivalent to `openRelease(options)` → `openItemBuild(options.buildId)` →
|
|
53
|
+
* `loadBrowse()`; it adds no caching, fallback or alternate data path. The release
|
|
54
|
+
* client is imported on demand so the Item browse entry stays narrow.
|
|
55
|
+
*/
|
|
56
|
+
export declare function getItemBrowse(options: GetItemBrowseOptions): Promise<StaticItemBrowse>;
|
|
57
|
+
/** Resolve one Item icon blob URL from its content-addressed media digest. */
|
|
58
|
+
export declare function itemIconUrl(baseUrl: URL | string, contentId: string): string;
|
package/client/items.js
CHANGED
|
@@ -1,41 +1,98 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { MissingPageError, MissingRecordError, SchemaValidationError, ScopeError, UnsupportedCapabilityError, UnsupportedProductError, lazyValidator, memoized, openProductContext, rangeDescriptor, recordRangeDescriptor, resolveReleasePath, } from './core.js';
|
|
2
|
+
const loadBrowsePackValidator = lazyValidator(() => import('../generated/item-browse-pack-2.validator.js'));
|
|
3
|
+
const loadCatalogValidator = lazyValidator(() => import('../generated/item-catalog-2.validator.js'));
|
|
4
|
+
const loadDetailValidator = lazyValidator(() => import('../generated/item-detail-2.validator.js'));
|
|
5
|
+
const loadDetailPackValidator = lazyValidator(() => import('../generated/item-pack-2.validator.js'));
|
|
6
|
+
const loadRelationshipPackValidator = lazyValidator(() => import('../generated/item-relationship-pack-2.validator.js'));
|
|
7
|
+
const loadEvidencePackValidator = lazyValidator(() => import('../generated/item-evidence-pack-2.validator.js'));
|
|
7
8
|
/** Build an Item client over an already verified product manifest. */
|
|
8
9
|
export function itemProductClient(context) {
|
|
9
10
|
const { manifest, fetchEnvelope } = context;
|
|
10
11
|
if (manifest.productId !== 'items')
|
|
11
12
|
throw new UnsupportedProductError(manifest.productId);
|
|
12
13
|
let catalogPromise;
|
|
14
|
+
let browsePromise;
|
|
13
15
|
const detailPackCache = new Map();
|
|
14
16
|
const relationshipPackCache = new Map();
|
|
15
17
|
const evidencePackCache = new Map();
|
|
16
18
|
async function loadCatalog(operation) {
|
|
17
19
|
if (!catalogPromise) {
|
|
18
|
-
catalogPromise =
|
|
20
|
+
catalogPromise = (async () => {
|
|
21
|
+
const validator = await loadCatalogValidator();
|
|
22
|
+
return fetchEnvelope(manifest.catalog, 'catalog', validator, operation);
|
|
23
|
+
})();
|
|
19
24
|
void catalogPromise.catch(() => { catalogPromise = undefined; });
|
|
20
25
|
}
|
|
21
26
|
return catalogPromise;
|
|
22
27
|
}
|
|
28
|
+
async function loadBrowse(operation) {
|
|
29
|
+
const descriptors = manifest.browsePacks;
|
|
30
|
+
if (!descriptors || descriptors.length === 0) {
|
|
31
|
+
throw new UnsupportedCapabilityError('Item product manifest does not provide browse packs');
|
|
32
|
+
}
|
|
33
|
+
if (!browsePromise) {
|
|
34
|
+
browsePromise = (async () => {
|
|
35
|
+
const validator = await loadBrowsePackValidator();
|
|
36
|
+
const packs = await Promise.all(descriptors.map((descriptor) => (fetchEnvelope(descriptor, 'browse', validator, operation))));
|
|
37
|
+
const rows = [];
|
|
38
|
+
let previousKey;
|
|
39
|
+
const coverage = packs[0].coverage;
|
|
40
|
+
const coverageJson = JSON.stringify(coverage);
|
|
41
|
+
for (const [index, pack] of packs.entries()) {
|
|
42
|
+
const descriptor = descriptors[index];
|
|
43
|
+
const keys = Object.keys(pack.records);
|
|
44
|
+
if (keys.length !== descriptor.count) {
|
|
45
|
+
throw new SchemaValidationError(descriptor.path, `browse pack has ${keys.length} records but its descriptor declares ${descriptor.count}`);
|
|
46
|
+
}
|
|
47
|
+
const packCoverageJson = JSON.stringify(pack.coverage);
|
|
48
|
+
if (packCoverageJson !== coverageJson) {
|
|
49
|
+
throw new SchemaValidationError(descriptor.path, 'browse pack coverage does not match the first browse pack');
|
|
50
|
+
}
|
|
51
|
+
if (keys[0] !== descriptor.firstKey || keys.at(-1) !== descriptor.lastKey) {
|
|
52
|
+
throw new SchemaValidationError(descriptor.path, `browse pack keys do not match the descriptor range ${descriptor.firstKey}..${descriptor.lastKey}`);
|
|
53
|
+
}
|
|
54
|
+
// One strictly increasing walk across packs rejects duplicate keys and
|
|
55
|
+
// overlapping or out-of-order ranges.
|
|
56
|
+
for (const key of keys) {
|
|
57
|
+
const record = pack.records[key];
|
|
58
|
+
if (!record) {
|
|
59
|
+
throw new SchemaValidationError(descriptor.path, `browse pack is missing record ${key}`);
|
|
60
|
+
}
|
|
61
|
+
if (previousKey !== undefined && key <= previousKey) {
|
|
62
|
+
throw new SchemaValidationError(descriptor.path, `browse record key ${key} is out of order`);
|
|
63
|
+
}
|
|
64
|
+
previousKey = key;
|
|
65
|
+
rows.push({ ...record, key });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (rows.length !== manifest.totalEntityCount) {
|
|
69
|
+
throw new SchemaValidationError(manifest.catalog.path, `browse roster has ${rows.length} rows but the manifest declares ${manifest.totalEntityCount}`);
|
|
70
|
+
}
|
|
71
|
+
return { scope: manifest.scope, coverage, records: rows };
|
|
72
|
+
})();
|
|
73
|
+
void browsePromise.catch(() => { browsePromise = undefined; });
|
|
74
|
+
}
|
|
75
|
+
return browsePromise;
|
|
76
|
+
}
|
|
23
77
|
async function getDetail(key, operation) {
|
|
24
78
|
const descriptor = recordRangeDescriptor(manifest.detailPacks, key, 'detail', 'Item');
|
|
25
|
-
const
|
|
79
|
+
const packValidator = await loadDetailPackValidator();
|
|
80
|
+
const pack = await memoized(detailPackCache, descriptor.path, () => (fetchEnvelope(descriptor, 'detail', packValidator, operation)));
|
|
26
81
|
if (!Object.hasOwn(pack.records, key))
|
|
27
82
|
throw new MissingRecordError(key, 'Item');
|
|
28
83
|
const detail = pack.records[key];
|
|
29
84
|
if (!detail)
|
|
30
85
|
throw new MissingRecordError(key, 'Item');
|
|
31
|
-
|
|
32
|
-
|
|
86
|
+
const validator = await loadDetailValidator();
|
|
87
|
+
if (!validator(detail)) {
|
|
88
|
+
throw new SchemaValidationError(descriptor.path, JSON.stringify(validator.errors ?? []));
|
|
33
89
|
}
|
|
34
90
|
return detail;
|
|
35
91
|
}
|
|
36
92
|
async function getRelationshipPage(pageKey, operation) {
|
|
37
93
|
const descriptor = rangeDescriptor(manifest.relationshipPacks, pageKey, 'relationship');
|
|
38
|
-
const
|
|
94
|
+
const validator = await loadRelationshipPackValidator();
|
|
95
|
+
const pack = await memoized(relationshipPackCache, descriptor.path, () => (fetchEnvelope(descriptor, 'relationship', validator, operation)));
|
|
39
96
|
const page = pack.records[pageKey];
|
|
40
97
|
if (!page)
|
|
41
98
|
throw new MissingPageError(pageKey, 'relationship');
|
|
@@ -46,13 +103,14 @@ export function itemProductClient(context) {
|
|
|
46
103
|
}
|
|
47
104
|
async function getEvidencePage(pageKey, operation) {
|
|
48
105
|
const descriptor = rangeDescriptor(manifest.evidencePacks ?? [], pageKey, 'evidence');
|
|
49
|
-
const
|
|
106
|
+
const validator = await loadEvidencePackValidator();
|
|
107
|
+
const pack = await memoized(evidencePackCache, descriptor.path, () => (fetchEnvelope(descriptor, 'evidence', validator, operation)));
|
|
50
108
|
const page = pack.records[pageKey];
|
|
51
109
|
if (!page)
|
|
52
110
|
throw new MissingPageError(pageKey, 'evidence');
|
|
53
111
|
return page;
|
|
54
112
|
}
|
|
55
|
-
return { manifest, loadCatalog, getDetail, getRelationshipPage, getEvidencePage };
|
|
113
|
+
return { manifest, loadCatalog, loadBrowse, getDetail, getRelationshipPage, getEvidencePage };
|
|
56
114
|
}
|
|
57
115
|
/** Open one pinned Item product. */
|
|
58
116
|
export async function openItemProduct(options) {
|
|
@@ -61,3 +119,23 @@ export async function openItemProduct(options) {
|
|
|
61
119
|
export function isItemProductClient(client) {
|
|
62
120
|
return client.manifest.productId === 'items';
|
|
63
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Read one build's verified Item browse roster in a single call.
|
|
124
|
+
*
|
|
125
|
+
* Equivalent to `openRelease(options)` → `openItemBuild(options.buildId)` →
|
|
126
|
+
* `loadBrowse()`; it adds no caching, fallback or alternate data path. The release
|
|
127
|
+
* client is imported on demand so the Item browse entry stays narrow.
|
|
128
|
+
*/
|
|
129
|
+
export async function getItemBrowse(options) {
|
|
130
|
+
const { openRelease } = await import('./release.js');
|
|
131
|
+
const release = await openRelease(options);
|
|
132
|
+
const items = await release.openItemBuild(options.buildId);
|
|
133
|
+
return items.loadBrowse({ signal: options.signal });
|
|
134
|
+
}
|
|
135
|
+
/** Resolve one Item icon blob URL from its content-addressed media digest. */
|
|
136
|
+
export function itemIconUrl(baseUrl, contentId) {
|
|
137
|
+
if (!/^[0-9a-f]{64}$/.test(contentId)) {
|
|
138
|
+
throw new SchemaValidationError(contentId, 'Item icon content ID must be a SHA-256 hex digest');
|
|
139
|
+
}
|
|
140
|
+
return resolveReleasePath(baseUrl, `media/images/${contentId.slice(0, 2)}/${contentId}.png`);
|
|
141
|
+
}
|
|
@@ -17,8 +17,8 @@ export { ContractVersionError, IntegrityError, InvalidJsonError, InvalidPathErro
|
|
|
17
17
|
export type { GetRelationshipOptions, IntegrityDescriptor, OpenProductOptions, OperationOptions, ProductIdentity, ProductManifestDescriptor, ProductScope, RequestKind, RequestLogEntry, RequestLogHook, StaticProductManifest, } from './core.js';
|
|
18
18
|
export { isMonsterProductClient, openMonsterProduct } from './monster-client.js';
|
|
19
19
|
export type { StaticMonsterCatalog, StaticMonsterDetail, StaticMonsterEvidencePage, StaticProductClient, } from './monster-client.js';
|
|
20
|
-
export { isItemProductClient, openItemProduct } from './items.js';
|
|
21
|
-
export type { StaticItemCatalog, StaticItemDetail, StaticItemProductClient } from './items.js';
|
|
20
|
+
export { getItemBrowse, isItemProductClient, itemIconUrl, openItemProduct } from './items.js';
|
|
21
|
+
export type { GetItemBrowseOptions, ItemBrowseCoverage, ItemBrowsePack, ItemBrowseRecord, ItemBrowseRow, StaticItemBrowse, StaticItemCatalog, StaticItemDetail, StaticItemProductClient, } from './items.js';
|
|
22
22
|
export { isEquipmentProductClient, openEquipmentProduct } from './equipment.js';
|
|
23
23
|
export type { StaticEquipmentCatalog, StaticEquipmentDetail, StaticEquipmentProductClient, } from './equipment.js';
|
|
24
24
|
export { isMediaProductClient, openMediaProduct } from './media.js';
|
package/client/static-client.js
CHANGED
|
@@ -15,7 +15,7 @@ import { questProductClient } from './quests.js';
|
|
|
15
15
|
import { staticDomainProductClient } from './static-domains.js';
|
|
16
16
|
export { ContractVersionError, IntegrityError, InvalidJsonError, InvalidPathError, MissingPageError, MissingRecordError, RequestError, SchemaValidationError, ScopeError, SecureContextRequiredError, StaticClientError, UnknownBuildError, UnsupportedCapabilityError, UnsupportedProductError, resolveMediaUrl, verifyBlob, } from './core.js';
|
|
17
17
|
export { isMonsterProductClient, openMonsterProduct } from './monster-client.js';
|
|
18
|
-
export { isItemProductClient, openItemProduct } from './items.js';
|
|
18
|
+
export { getItemBrowse, isItemProductClient, itemIconUrl, openItemProduct } from './items.js';
|
|
19
19
|
export { isEquipmentProductClient, openEquipmentProduct } from './equipment.js';
|
|
20
20
|
export { isMediaProductClient, openMediaProduct } from './media.js';
|
|
21
21
|
export { isQuestProductClient, openQuestProduct } from './quests.js';
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
/* Generated automatically from Rust-owned wire definitions. Do not edit. */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Coverage state for one browse relationship or the Scroll tier facet.
|
|
5
|
+
*/
|
|
6
|
+
export type ItemBrowseCoverageState = "complete" | "partial" | "unsupported";
|
|
7
|
+
/**
|
|
8
|
+
* Positive source-backed Item behavior.
|
|
9
|
+
*/
|
|
10
|
+
export type ItemBrowseFunction =
|
|
11
|
+
"upgrade" | "skill" | "summon" | "reward-container" | "monster-card" | "readable" | "pet" | "recovery";
|
|
12
|
+
/**
|
|
13
|
+
* Compact catalog projection of [`FactState`]. It keeps the state and a
|
|
14
|
+
* positively observed value, retains the coverage witness for `absent`, and
|
|
15
|
+
* omits source attribution and explanatory metadata.
|
|
16
|
+
*/
|
|
17
|
+
export type CatalogFact =
|
|
18
|
+
| {
|
|
19
|
+
state: "known";
|
|
20
|
+
value: string;
|
|
21
|
+
}
|
|
22
|
+
| {
|
|
23
|
+
state: "unknown";
|
|
24
|
+
}
|
|
25
|
+
| {
|
|
26
|
+
coverageKey: CoverageKey;
|
|
27
|
+
state: "absent";
|
|
28
|
+
}
|
|
29
|
+
| {
|
|
30
|
+
state: "unsupported";
|
|
31
|
+
};
|
|
32
|
+
export type CoverageKey = string;
|
|
33
|
+
/**
|
|
34
|
+
* Canonical non-equipment Item class.
|
|
35
|
+
*/
|
|
36
|
+
export type ItemBrowseClass = "consume" | "etc" | "setup" | "cash" | "pet";
|
|
37
|
+
/**
|
|
38
|
+
* Named or typed Scroll mechanic.
|
|
39
|
+
*/
|
|
40
|
+
export type ItemBrowseUpgradeSpecial = "clean-slate" | "chaos" | "anti-slip" | "warm-support" | "randomized-stats";
|
|
41
|
+
/**
|
|
42
|
+
* Equipment target named by a Scroll title. This is a label, never an identity.
|
|
43
|
+
*/
|
|
44
|
+
export type ItemBrowseUpgradeTarget =
|
|
45
|
+
| "accessory"
|
|
46
|
+
| "belt"
|
|
47
|
+
| "bottomwear"
|
|
48
|
+
| "bow"
|
|
49
|
+
| "cape"
|
|
50
|
+
| "claw"
|
|
51
|
+
| "crossbow"
|
|
52
|
+
| "dagger"
|
|
53
|
+
| "earrings"
|
|
54
|
+
| "eye-accessory"
|
|
55
|
+
| "face-accessory"
|
|
56
|
+
| "gloves"
|
|
57
|
+
| "gun"
|
|
58
|
+
| "hat"
|
|
59
|
+
| "knuckle"
|
|
60
|
+
| "one-handed-axe"
|
|
61
|
+
| "one-handed-blunt-weapon"
|
|
62
|
+
| "one-handed-sword"
|
|
63
|
+
| "overall-armor"
|
|
64
|
+
| "pet-equipment"
|
|
65
|
+
| "polearm"
|
|
66
|
+
| "ring"
|
|
67
|
+
| "shield"
|
|
68
|
+
| "shoes"
|
|
69
|
+
| "spear"
|
|
70
|
+
| "staff"
|
|
71
|
+
| "topwear"
|
|
72
|
+
| "two-handed-axe"
|
|
73
|
+
| "two-handed-blunt-weapon"
|
|
74
|
+
| "two-handed-sword"
|
|
75
|
+
| "wand";
|
|
76
|
+
/**
|
|
77
|
+
* Classic World-only named Scroll tier.
|
|
78
|
+
*/
|
|
79
|
+
export type ItemBrowseUpgradeTier = "lesser" | "intermediate" | "greater" | "chaos";
|
|
80
|
+
/**
|
|
81
|
+
* Partial, positive source-backed Item subtype.
|
|
82
|
+
*/
|
|
83
|
+
export type ItemBrowseType =
|
|
84
|
+
| "upgrade-scroll"
|
|
85
|
+
| "arrow"
|
|
86
|
+
| "throwing-star"
|
|
87
|
+
| "bullet"
|
|
88
|
+
| "chair"
|
|
89
|
+
| "ore"
|
|
90
|
+
| "gem"
|
|
91
|
+
| "pet-food"
|
|
92
|
+
| "refined-material"
|
|
93
|
+
| "potion"
|
|
94
|
+
| "food-buff"
|
|
95
|
+
| "monster-material"
|
|
96
|
+
| "holiday-ornament"
|
|
97
|
+
| "furniture"
|
|
98
|
+
| "crafting-station"
|
|
99
|
+
| "meso-pouch";
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Bounded pack of compact browse rows keyed by Item public key.
|
|
103
|
+
*/
|
|
104
|
+
export interface ItemBrowsePack {
|
|
105
|
+
contractVersion: "2.0";
|
|
106
|
+
coverage: ItemBrowseCoverage;
|
|
107
|
+
format: "item-browse-pack/1";
|
|
108
|
+
records: {
|
|
109
|
+
[k: string]: ItemBrowseRecord | undefined;
|
|
110
|
+
};
|
|
111
|
+
scope: BuildScope;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Build-level coverage for the browse product.
|
|
115
|
+
*/
|
|
116
|
+
export interface ItemBrowseCoverage {
|
|
117
|
+
relationships: ItemBrowseRelationshipCoverage;
|
|
118
|
+
scrollTier: ItemBrowseCoverageState;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Per-relationship coverage for one build.
|
|
122
|
+
*/
|
|
123
|
+
export interface ItemBrowseRelationshipCoverage {
|
|
124
|
+
"cash-shop-listing": ItemBrowseCoverageState;
|
|
125
|
+
"found-in-container": ItemBrowseCoverageState;
|
|
126
|
+
"made-by-recipe": ItemBrowseCoverageState;
|
|
127
|
+
"monster-drop": ItemBrowseCoverageState;
|
|
128
|
+
"needed-for-quest": ItemBrowseCoverageState;
|
|
129
|
+
"quest-reward": ItemBrowseCoverageState;
|
|
130
|
+
"used-in-recipe": ItemBrowseCoverageState;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* One compact Item Browse row.
|
|
134
|
+
*/
|
|
135
|
+
export interface ItemBrowseRecord {
|
|
136
|
+
family?: string | null;
|
|
137
|
+
functions?: ItemBrowseFunction[];
|
|
138
|
+
icon: CatalogFact;
|
|
139
|
+
itemClass: ItemBrowseClass;
|
|
140
|
+
name: CatalogFact;
|
|
141
|
+
petFood?: ItemBrowsePetFood | null;
|
|
142
|
+
projectileAttack?: number | null;
|
|
143
|
+
questFlag?: boolean;
|
|
144
|
+
recovery?: ItemBrowseRecovery | null;
|
|
145
|
+
relationships?: ItemBrowseRelationshipCounts;
|
|
146
|
+
scroll?: ItemBrowseScroll | null;
|
|
147
|
+
seatingRecovery?: ItemBrowseSeatingRecovery | null;
|
|
148
|
+
sourceId: string;
|
|
149
|
+
types?: ItemBrowseType[];
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Pet-food effect values and the Pet items they target.
|
|
153
|
+
*/
|
|
154
|
+
export interface ItemBrowsePetFood {
|
|
155
|
+
closeness?: number | null;
|
|
156
|
+
fullness?: number | null;
|
|
157
|
+
tameness?: number | null;
|
|
158
|
+
targets?: string[];
|
|
159
|
+
unresolvedTargets?: string[];
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Positive recovery values carried by a consumable's spec block.
|
|
163
|
+
*/
|
|
164
|
+
export interface ItemBrowseRecovery {
|
|
165
|
+
hp?: number | null;
|
|
166
|
+
hpPercent?: number | null;
|
|
167
|
+
mp?: number | null;
|
|
168
|
+
mpPercent?: number | null;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Distinct related-entity counts for one Item. Zero counts are omitted.
|
|
172
|
+
*/
|
|
173
|
+
export interface ItemBrowseRelationshipCounts {
|
|
174
|
+
"cash-shop-listing"?: number | null;
|
|
175
|
+
"found-in-container"?: number | null;
|
|
176
|
+
"made-by-recipe"?: number | null;
|
|
177
|
+
"monster-drop"?: number | null;
|
|
178
|
+
"needed-for-quest"?: number | null;
|
|
179
|
+
"quest-reward"?: number | null;
|
|
180
|
+
"used-in-recipe"?: number | null;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Scroll facts derived from a typed upgrade row and its source title.
|
|
184
|
+
*/
|
|
185
|
+
export interface ItemBrowseScroll {
|
|
186
|
+
cursed?: number | null;
|
|
187
|
+
deltas?: ItemBrowseScrollDeltas;
|
|
188
|
+
specials?: ItemBrowseUpgradeSpecial[];
|
|
189
|
+
success?: number | null;
|
|
190
|
+
targetLabel?: ItemBrowseUpgradeTarget | null;
|
|
191
|
+
targets?: string[];
|
|
192
|
+
tier?: ItemBrowseUpgradeTier | null;
|
|
193
|
+
unresolvedTargets?: string[];
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Non-zero Scroll stat deltas.
|
|
197
|
+
*/
|
|
198
|
+
export interface ItemBrowseScrollDeltas {
|
|
199
|
+
accuracy?: number | null;
|
|
200
|
+
avoidability?: number | null;
|
|
201
|
+
craft?: number | null;
|
|
202
|
+
criticalDamage?: number | null;
|
|
203
|
+
criticalRate?: number | null;
|
|
204
|
+
dexterity?: number | null;
|
|
205
|
+
intelligence?: number | null;
|
|
206
|
+
jump?: number | null;
|
|
207
|
+
luck?: number | null;
|
|
208
|
+
magicAttack?: number | null;
|
|
209
|
+
magicDefense?: number | null;
|
|
210
|
+
maxHp?: number | null;
|
|
211
|
+
maxMp?: number | null;
|
|
212
|
+
speed?: number | null;
|
|
213
|
+
strength?: number | null;
|
|
214
|
+
swim?: number | null;
|
|
215
|
+
weaponAttack?: number | null;
|
|
216
|
+
weaponDefense?: number | null;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Seating recovery, deliberately separate from consumable recovery.
|
|
220
|
+
*/
|
|
221
|
+
export interface ItemBrowseSeatingRecovery {
|
|
222
|
+
hp?: number | null;
|
|
223
|
+
mp?: number | null;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Build scope specifying the game family and concrete build identity.
|
|
227
|
+
*/
|
|
228
|
+
export interface BuildScope {
|
|
229
|
+
/**
|
|
230
|
+
* Exact build identity (e.g., 'gms-v83', 'cw-cot2').
|
|
231
|
+
*/
|
|
232
|
+
build_id: string;
|
|
233
|
+
/**
|
|
234
|
+
* Family identity (e.g., 'gms', 'classic-world').
|
|
235
|
+
*/
|
|
236
|
+
family_id: string;
|
|
237
|
+
[k: string]: unknown | undefined;
|
|
238
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";export const validate = validate20;export default validate20;const schema31 = {"$schema":"https://json-schema.org/draft/2020-12/schema","title":"ItemBrowsePack","description":"Bounded pack of compact browse rows keyed by Item public key.","type":"object","properties":{"contractVersion":{"type":"string","const":"2.0"},"coverage":{"$ref":"#/$defs/ItemBrowseCoverage"},"format":{"type":"string","const":"item-browse-pack/1"},"records":{"type":"object","additionalProperties":{"$ref":"#/$defs/ItemBrowseRecord"}},"scope":{"$ref":"#/$defs/BuildScope"}},"additionalProperties":false,"required":["format","contractVersion","scope","coverage","records"],"$defs":{"BuildScope":{"description":"Build scope specifying the game family and concrete build identity.","type":"object","properties":{"build_id":{"description":"Exact build identity (e.g., 'gms-v83', 'cw-cot2').","type":"string"},"family_id":{"description":"Family identity (e.g., 'gms', 'classic-world').","type":"string"}},"required":["family_id","build_id"]},"CatalogFact":{"description":"Compact catalog projection of [`FactState`]. It keeps the state and a\npositively observed value, retains the coverage witness for `absent`, and\nomits source attribution and explanatory metadata.","oneOf":[{"description":"A positively observed catalog value.","type":"object","properties":{"state":{"type":"string","const":"known"},"value":{"type":"string"}},"additionalProperties":false,"required":["state","value"]},{"description":"The value could not be established.","type":"object","properties":{"state":{"type":"string","const":"unknown"}},"additionalProperties":false,"required":["state"]},{"description":"No value was present under a source scope with complete coverage.","type":"object","properties":{"coverageKey":{"$ref":"#/$defs/CoverageKey"},"state":{"type":"string","const":"absent"}},"additionalProperties":false,"required":["state","coverageKey"]},{"description":"The producer cannot supply the fact.","type":"object","properties":{"state":{"type":"string","const":"unsupported"}},"additionalProperties":false,"required":["state"]}]},"CoverageKey":{"type":"string","minLength":1,"pattern":"\\S"},"ItemBrowseClass":{"description":"Canonical non-equipment Item class.","type":"string","enum":["consume","etc","setup","cash","pet"]},"ItemBrowseCoverage":{"description":"Build-level coverage for the browse product.","type":"object","properties":{"relationships":{"$ref":"#/$defs/ItemBrowseRelationshipCoverage"},"scrollTier":{"$ref":"#/$defs/ItemBrowseCoverageState"}},"additionalProperties":false,"required":["relationships","scrollTier"]},"ItemBrowseCoverageState":{"description":"Coverage state for one browse relationship or the Scroll tier facet.","type":"string","enum":["complete","partial","unsupported"]},"ItemBrowseFunction":{"description":"Positive source-backed Item behavior.","type":"string","enum":["upgrade","skill","summon","reward-container","monster-card","readable","pet","recovery"]},"ItemBrowsePetFood":{"description":"Pet-food effect values and the Pet items they target.","type":"object","properties":{"closeness":{"type":["integer","null"],"format":"int64"},"fullness":{"type":["integer","null"],"format":"int64"},"tameness":{"type":["integer","null"],"format":"int64"},"targets":{"type":"array","items":{"type":"string"}},"unresolvedTargets":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"ItemBrowseRecord":{"description":"One compact Item Browse row.","type":"object","properties":{"family":{"type":["string","null"]},"functions":{"type":"array","items":{"$ref":"#/$defs/ItemBrowseFunction"}},"icon":{"$ref":"#/$defs/CatalogFact"},"itemClass":{"$ref":"#/$defs/ItemBrowseClass"},"name":{"$ref":"#/$defs/CatalogFact"},"petFood":{"anyOf":[{"$ref":"#/$defs/ItemBrowsePetFood"},{"type":"null"}]},"projectileAttack":{"type":["integer","null"],"format":"int64"},"questFlag":{"type":"boolean"},"recovery":{"anyOf":[{"$ref":"#/$defs/ItemBrowseRecovery"},{"type":"null"}]},"relationships":{"$ref":"#/$defs/ItemBrowseRelationshipCounts"},"scroll":{"anyOf":[{"$ref":"#/$defs/ItemBrowseScroll"},{"type":"null"}]},"seatingRecovery":{"anyOf":[{"$ref":"#/$defs/ItemBrowseSeatingRecovery"},{"type":"null"}]},"sourceId":{"type":"string"},"types":{"type":"array","items":{"$ref":"#/$defs/ItemBrowseType"}}},"additionalProperties":false,"required":["sourceId","itemClass","name","icon"]},"ItemBrowseRecovery":{"description":"Positive recovery values carried by a consumable's spec block.","type":"object","properties":{"hp":{"type":["integer","null"],"format":"int64"},"hpPercent":{"type":["integer","null"],"format":"int64"},"mp":{"type":["integer","null"],"format":"int64"},"mpPercent":{"type":["integer","null"],"format":"int64"}},"additionalProperties":false},"ItemBrowseRelationshipCounts":{"description":"Distinct related-entity counts for one Item. Zero counts are omitted.","type":"object","properties":{"cash-shop-listing":{"type":["integer","null"],"format":"uint32","minimum":0},"found-in-container":{"type":["integer","null"],"format":"uint32","minimum":0},"made-by-recipe":{"type":["integer","null"],"format":"uint32","minimum":0},"monster-drop":{"type":["integer","null"],"format":"uint32","minimum":0},"needed-for-quest":{"type":["integer","null"],"format":"uint32","minimum":0},"quest-reward":{"type":["integer","null"],"format":"uint32","minimum":0},"used-in-recipe":{"type":["integer","null"],"format":"uint32","minimum":0}},"additionalProperties":false},"ItemBrowseRelationshipCoverage":{"description":"Per-relationship coverage for one build.","type":"object","properties":{"cash-shop-listing":{"$ref":"#/$defs/ItemBrowseCoverageState"},"found-in-container":{"$ref":"#/$defs/ItemBrowseCoverageState"},"made-by-recipe":{"$ref":"#/$defs/ItemBrowseCoverageState"},"monster-drop":{"$ref":"#/$defs/ItemBrowseCoverageState"},"needed-for-quest":{"$ref":"#/$defs/ItemBrowseCoverageState"},"quest-reward":{"$ref":"#/$defs/ItemBrowseCoverageState"},"used-in-recipe":{"$ref":"#/$defs/ItemBrowseCoverageState"}},"additionalProperties":false,"required":["monster-drop","quest-reward","needed-for-quest","used-in-recipe","made-by-recipe","found-in-container","cash-shop-listing"]},"ItemBrowseScroll":{"description":"Scroll facts derived from a typed upgrade row and its source title.","type":"object","properties":{"cursed":{"type":["integer","null"],"format":"int64"},"deltas":{"$ref":"#/$defs/ItemBrowseScrollDeltas"},"specials":{"type":"array","items":{"$ref":"#/$defs/ItemBrowseUpgradeSpecial"}},"success":{"type":["integer","null"],"format":"int64"},"targetLabel":{"anyOf":[{"$ref":"#/$defs/ItemBrowseUpgradeTarget"},{"type":"null"}]},"targets":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"$ref":"#/$defs/ItemBrowseUpgradeTier"},{"type":"null"}]},"unresolvedTargets":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"ItemBrowseScrollDeltas":{"description":"Non-zero Scroll stat deltas.","type":"object","properties":{"accuracy":{"type":["integer","null"],"format":"int64"},"avoidability":{"type":["integer","null"],"format":"int64"},"craft":{"type":["integer","null"],"format":"int64"},"criticalDamage":{"type":["integer","null"],"format":"int64"},"criticalRate":{"type":["integer","null"],"format":"int64"},"dexterity":{"type":["integer","null"],"format":"int64"},"intelligence":{"type":["integer","null"],"format":"int64"},"jump":{"type":["integer","null"],"format":"int64"},"luck":{"type":["integer","null"],"format":"int64"},"magicAttack":{"type":["integer","null"],"format":"int64"},"magicDefense":{"type":["integer","null"],"format":"int64"},"maxHp":{"type":["integer","null"],"format":"int64"},"maxMp":{"type":["integer","null"],"format":"int64"},"speed":{"type":["integer","null"],"format":"int64"},"strength":{"type":["integer","null"],"format":"int64"},"swim":{"type":["integer","null"],"format":"int64"},"weaponAttack":{"type":["integer","null"],"format":"int64"},"weaponDefense":{"type":["integer","null"],"format":"int64"}},"additionalProperties":false},"ItemBrowseSeatingRecovery":{"description":"Seating recovery, deliberately separate from consumable recovery.","type":"object","properties":{"hp":{"type":["integer","null"],"format":"int64"},"mp":{"type":["integer","null"],"format":"int64"}},"additionalProperties":false},"ItemBrowseType":{"description":"Partial, positive source-backed Item subtype.","type":"string","enum":["upgrade-scroll","arrow","throwing-star","bullet","chair","ore","gem","pet-food","refined-material","potion","food-buff","monster-material","holiday-ornament","furniture","crafting-station","meso-pouch"]},"ItemBrowseUpgradeSpecial":{"description":"Named or typed Scroll mechanic.","type":"string","enum":["clean-slate","chaos","anti-slip","warm-support","randomized-stats"]},"ItemBrowseUpgradeTarget":{"description":"Equipment target named by a Scroll title. This is a label, never an identity.","type":"string","enum":["accessory","belt","bottomwear","bow","cape","claw","crossbow","dagger","earrings","eye-accessory","face-accessory","gloves","gun","hat","knuckle","one-handed-axe","one-handed-blunt-weapon","one-handed-sword","overall-armor","pet-equipment","polearm","ring","shield","shoes","spear","staff","topwear","two-handed-axe","two-handed-blunt-weapon","two-handed-sword","wand"]},"ItemBrowseUpgradeTier":{"description":"Classic World-only named Scroll tier.","type":"string","enum":["lesser","intermediate","greater","chaos"]}}};const schema57 = {"description":"Build scope specifying the game family and concrete build identity.","type":"object","properties":{"build_id":{"description":"Exact build identity (e.g., 'gms-v83', 'cw-cot2').","type":"string"},"family_id":{"description":"Family identity (e.g., 'gms', 'classic-world').","type":"string"}},"required":["family_id","build_id"]};const schema32 = {"description":"Build-level coverage for the browse product.","type":"object","properties":{"relationships":{"$ref":"#/$defs/ItemBrowseRelationshipCoverage"},"scrollTier":{"$ref":"#/$defs/ItemBrowseCoverageState"}},"additionalProperties":false,"required":["relationships","scrollTier"]};const schema34 = {"description":"Coverage state for one browse relationship or the Scroll tier facet.","type":"string","enum":["complete","partial","unsupported"]};const schema33 = {"description":"Per-relationship coverage for one build.","type":"object","properties":{"cash-shop-listing":{"$ref":"#/$defs/ItemBrowseCoverageState"},"found-in-container":{"$ref":"#/$defs/ItemBrowseCoverageState"},"made-by-recipe":{"$ref":"#/$defs/ItemBrowseCoverageState"},"monster-drop":{"$ref":"#/$defs/ItemBrowseCoverageState"},"needed-for-quest":{"$ref":"#/$defs/ItemBrowseCoverageState"},"quest-reward":{"$ref":"#/$defs/ItemBrowseCoverageState"},"used-in-recipe":{"$ref":"#/$defs/ItemBrowseCoverageState"}},"additionalProperties":false,"required":["monster-drop","quest-reward","needed-for-quest","used-in-recipe","made-by-recipe","found-in-container","cash-shop-listing"]};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data["monster-drop"] === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "monster-drop"},message:"must have required property '"+"monster-drop"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data["quest-reward"] === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "quest-reward"},message:"must have required property '"+"quest-reward"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data["needed-for-quest"] === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "needed-for-quest"},message:"must have required property '"+"needed-for-quest"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data["used-in-recipe"] === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "used-in-recipe"},message:"must have required property '"+"used-in-recipe"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data["made-by-recipe"] === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "made-by-recipe"},message:"must have required property '"+"made-by-recipe"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data["found-in-container"] === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "found-in-container"},message:"must have required property '"+"found-in-container"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data["cash-shop-listing"] === undefined){const err6 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "cash-shop-listing"},message:"must have required property '"+"cash-shop-listing"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}for(const key0 in data){if(!(((((((key0 === "cash-shop-listing") || (key0 === "found-in-container")) || (key0 === "made-by-recipe")) || (key0 === "monster-drop")) || (key0 === "needed-for-quest")) || (key0 === "quest-reward")) || (key0 === "used-in-recipe"))){const err7 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data["cash-shop-listing"] !== undefined){let data0 = data["cash-shop-listing"];if(typeof data0 !== "string"){const err8 = {instancePath:instancePath+"/cash-shop-listing",schemaPath:"#/$defs/ItemBrowseCoverageState/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(!(((data0 === "complete") || (data0 === "partial")) || (data0 === "unsupported"))){const err9 = {instancePath:instancePath+"/cash-shop-listing",schemaPath:"#/$defs/ItemBrowseCoverageState/enum",keyword:"enum",params:{allowedValues: schema34.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data["found-in-container"] !== undefined){let data1 = data["found-in-container"];if(typeof data1 !== "string"){const err10 = {instancePath:instancePath+"/found-in-container",schemaPath:"#/$defs/ItemBrowseCoverageState/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(!(((data1 === "complete") || (data1 === "partial")) || (data1 === "unsupported"))){const err11 = {instancePath:instancePath+"/found-in-container",schemaPath:"#/$defs/ItemBrowseCoverageState/enum",keyword:"enum",params:{allowedValues: schema34.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data["made-by-recipe"] !== undefined){let data2 = data["made-by-recipe"];if(typeof data2 !== "string"){const err12 = {instancePath:instancePath+"/made-by-recipe",schemaPath:"#/$defs/ItemBrowseCoverageState/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(!(((data2 === "complete") || (data2 === "partial")) || (data2 === "unsupported"))){const err13 = {instancePath:instancePath+"/made-by-recipe",schemaPath:"#/$defs/ItemBrowseCoverageState/enum",keyword:"enum",params:{allowedValues: schema34.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data["monster-drop"] !== undefined){let data3 = data["monster-drop"];if(typeof data3 !== "string"){const err14 = {instancePath:instancePath+"/monster-drop",schemaPath:"#/$defs/ItemBrowseCoverageState/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(!(((data3 === "complete") || (data3 === "partial")) || (data3 === "unsupported"))){const err15 = {instancePath:instancePath+"/monster-drop",schemaPath:"#/$defs/ItemBrowseCoverageState/enum",keyword:"enum",params:{allowedValues: schema34.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data["needed-for-quest"] !== undefined){let data4 = data["needed-for-quest"];if(typeof data4 !== "string"){const err16 = {instancePath:instancePath+"/needed-for-quest",schemaPath:"#/$defs/ItemBrowseCoverageState/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if(!(((data4 === "complete") || (data4 === "partial")) || (data4 === "unsupported"))){const err17 = {instancePath:instancePath+"/needed-for-quest",schemaPath:"#/$defs/ItemBrowseCoverageState/enum",keyword:"enum",params:{allowedValues: schema34.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data["quest-reward"] !== undefined){let data5 = data["quest-reward"];if(typeof data5 !== "string"){const err18 = {instancePath:instancePath+"/quest-reward",schemaPath:"#/$defs/ItemBrowseCoverageState/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(!(((data5 === "complete") || (data5 === "partial")) || (data5 === "unsupported"))){const err19 = {instancePath:instancePath+"/quest-reward",schemaPath:"#/$defs/ItemBrowseCoverageState/enum",keyword:"enum",params:{allowedValues: schema34.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data["used-in-recipe"] !== undefined){let data6 = data["used-in-recipe"];if(typeof data6 !== "string"){const err20 = {instancePath:instancePath+"/used-in-recipe",schemaPath:"#/$defs/ItemBrowseCoverageState/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}if(!(((data6 === "complete") || (data6 === "partial")) || (data6 === "unsupported"))){const err21 = {instancePath:instancePath+"/used-in-recipe",schemaPath:"#/$defs/ItemBrowseCoverageState/enum",keyword:"enum",params:{allowedValues: schema34.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}}else {const err22 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}validate22.errors = vErrors;return errors === 0;}validate22.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate21.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.relationships === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "relationships"},message:"must have required property '"+"relationships"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.scrollTier === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "scrollTier"},message:"must have required property '"+"scrollTier"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "relationships") || (key0 === "scrollTier"))){const err2 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.relationships !== undefined){if(!(validate22(data.relationships, {instancePath:instancePath+"/relationships",parentData:data,parentDataProperty:"relationships",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}}if(data.scrollTier !== undefined){let data1 = data.scrollTier;if(typeof data1 !== "string"){const err3 = {instancePath:instancePath+"/scrollTier",schemaPath:"#/$defs/ItemBrowseCoverageState/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(!(((data1 === "complete") || (data1 === "partial")) || (data1 === "unsupported"))){const err4 = {instancePath:instancePath+"/scrollTier",schemaPath:"#/$defs/ItemBrowseCoverageState/enum",keyword:"enum",params:{allowedValues: schema34.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate21.errors = vErrors;return errors === 0;}validate21.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema42 = {"description":"One compact Item Browse row.","type":"object","properties":{"family":{"type":["string","null"]},"functions":{"type":"array","items":{"$ref":"#/$defs/ItemBrowseFunction"}},"icon":{"$ref":"#/$defs/CatalogFact"},"itemClass":{"$ref":"#/$defs/ItemBrowseClass"},"name":{"$ref":"#/$defs/CatalogFact"},"petFood":{"anyOf":[{"$ref":"#/$defs/ItemBrowsePetFood"},{"type":"null"}]},"projectileAttack":{"type":["integer","null"],"format":"int64"},"questFlag":{"type":"boolean"},"recovery":{"anyOf":[{"$ref":"#/$defs/ItemBrowseRecovery"},{"type":"null"}]},"relationships":{"$ref":"#/$defs/ItemBrowseRelationshipCounts"},"scroll":{"anyOf":[{"$ref":"#/$defs/ItemBrowseScroll"},{"type":"null"}]},"seatingRecovery":{"anyOf":[{"$ref":"#/$defs/ItemBrowseSeatingRecovery"},{"type":"null"}]},"sourceId":{"type":"string"},"types":{"type":"array","items":{"$ref":"#/$defs/ItemBrowseType"}}},"additionalProperties":false,"required":["sourceId","itemClass","name","icon"]};const schema43 = {"description":"Positive source-backed Item behavior.","type":"string","enum":["upgrade","skill","summon","reward-container","monster-card","readable","pet","recovery"]};const schema46 = {"description":"Canonical non-equipment Item class.","type":"string","enum":["consume","etc","setup","cash","pet"]};const schema47 = {"description":"Pet-food effect values and the Pet items they target.","type":"object","properties":{"closeness":{"type":["integer","null"],"format":"int64"},"fullness":{"type":["integer","null"],"format":"int64"},"tameness":{"type":["integer","null"],"format":"int64"},"targets":{"type":"array","items":{"type":"string"}},"unresolvedTargets":{"type":"array","items":{"type":"string"}}},"additionalProperties":false};const schema48 = {"description":"Positive recovery values carried by a consumable's spec block.","type":"object","properties":{"hp":{"type":["integer","null"],"format":"int64"},"hpPercent":{"type":["integer","null"],"format":"int64"},"mp":{"type":["integer","null"],"format":"int64"},"mpPercent":{"type":["integer","null"],"format":"int64"}},"additionalProperties":false};const schema49 = {"description":"Distinct related-entity counts for one Item. Zero counts are omitted.","type":"object","properties":{"cash-shop-listing":{"type":["integer","null"],"format":"uint32","minimum":0},"found-in-container":{"type":["integer","null"],"format":"uint32","minimum":0},"made-by-recipe":{"type":["integer","null"],"format":"uint32","minimum":0},"monster-drop":{"type":["integer","null"],"format":"uint32","minimum":0},"needed-for-quest":{"type":["integer","null"],"format":"uint32","minimum":0},"quest-reward":{"type":["integer","null"],"format":"uint32","minimum":0},"used-in-recipe":{"type":["integer","null"],"format":"uint32","minimum":0}},"additionalProperties":false};const schema55 = {"description":"Seating recovery, deliberately separate from consumable recovery.","type":"object","properties":{"hp":{"type":["integer","null"],"format":"int64"},"mp":{"type":["integer","null"],"format":"int64"}},"additionalProperties":false};const schema56 = {"description":"Partial, positive source-backed Item subtype.","type":"string","enum":["upgrade-scroll","arrow","throwing-star","bullet","chair","ore","gem","pet-food","refined-material","potion","food-buff","monster-material","holiday-ornament","furniture","crafting-station","meso-pouch"]};const func1 = Object.prototype.hasOwnProperty;const schema44 = {"description":"Compact catalog projection of [`FactState`]. It keeps the state and a\npositively observed value, retains the coverage witness for `absent`, and\nomits source attribution and explanatory metadata.","oneOf":[{"description":"A positively observed catalog value.","type":"object","properties":{"state":{"type":"string","const":"known"},"value":{"type":"string"}},"additionalProperties":false,"required":["state","value"]},{"description":"The value could not be established.","type":"object","properties":{"state":{"type":"string","const":"unknown"}},"additionalProperties":false,"required":["state"]},{"description":"No value was present under a source scope with complete coverage.","type":"object","properties":{"coverageKey":{"$ref":"#/$defs/CoverageKey"},"state":{"type":"string","const":"absent"}},"additionalProperties":false,"required":["state","coverageKey"]},{"description":"The producer cannot supply the fact.","type":"object","properties":{"state":{"type":"string","const":"unsupported"}},"additionalProperties":false,"required":["state"]}]};const schema45 = {"type":"string","minLength":1,"pattern":"\\S"};const func2 = function ucs2length(str) {
|
|
2
|
+
const len = str.length;
|
|
3
|
+
let length = 0;
|
|
4
|
+
let pos = 0;
|
|
5
|
+
let value;
|
|
6
|
+
while (pos < len) {
|
|
7
|
+
length++;
|
|
8
|
+
value = str.charCodeAt(pos++);
|
|
9
|
+
if (value >= 0xd800 && value <= 0xdbff && pos < len) {
|
|
10
|
+
// high surrogate, and there is a next character
|
|
11
|
+
value = str.charCodeAt(pos);
|
|
12
|
+
if ((value & 0xfc00) === 0xdc00)
|
|
13
|
+
pos++; // low surrogate
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return length;
|
|
17
|
+
};const pattern4 = new RegExp("\\S", "u");function validate26(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate26.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err0 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.value === undefined){const err1 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "value"},message:"must have required property '"+"value"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "state") || (key0 === "value"))){const err2 = {instancePath,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.state !== undefined){let data0 = data.state;if(typeof data0 !== "string"){const err3 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/0/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if("known" !== data0){const err4 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/0/properties/state/const",keyword:"const",params:{allowedValue: "known"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.value !== undefined){if(typeof data.value !== "string"){const err5 = {instancePath:instancePath+"/value",schemaPath:"#/oneOf/0/properties/value/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;var props0 = true;}const _errs8 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err7 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key1 in data){if(!(key1 === "state")){const err8 = {instancePath,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.state !== undefined){let data2 = data.state;if(typeof data2 !== "string"){const err9 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/1/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if("unknown" !== data2){const err10 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/1/properties/state/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid0 = _errs8 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;if(props0 !== true){props0 = true;}}const _errs13 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err12 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data.coverageKey === undefined){const err13 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "coverageKey"},message:"must have required property '"+"coverageKey"+"'"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}for(const key2 in data){if(!((key2 === "coverageKey") || (key2 === "state"))){const err14 = {instancePath,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.coverageKey !== undefined){let data3 = data.coverageKey;if(typeof data3 === "string"){if(func2(data3) < 1){const err15 = {instancePath:instancePath+"/coverageKey",schemaPath:"#/$defs/CoverageKey/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(!pattern4.test(data3)){const err16 = {instancePath:instancePath+"/coverageKey",schemaPath:"#/$defs/CoverageKey/pattern",keyword:"pattern",params:{pattern: "\\S"},message:"must match pattern \""+"\\S"+"\""};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/coverageKey",schemaPath:"#/$defs/CoverageKey/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.state !== undefined){let data4 = data.state;if(typeof data4 !== "string"){const err18 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/2/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if("absent" !== data4){const err19 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/2/properties/state/const",keyword:"const",params:{allowedValue: "absent"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid0 = _errs13 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 2];}else {if(_valid0){valid0 = true;passing0 = 2;if(props0 !== true){props0 = true;}}const _errs21 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err21 = {instancePath,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}for(const key3 in data){if(!(key3 === "state")){const err22 = {instancePath,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.state !== undefined){let data5 = data.state;if(typeof data5 !== "string"){const err23 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/3/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}if("unsupported" !== data5){const err24 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/3/properties/state/const",keyword:"const",params:{allowedValue: "unsupported"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}}else {const err25 = {instancePath,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}var _valid0 = _errs21 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 3];}else {if(_valid0){valid0 = true;passing0 = 3;if(props0 !== true){props0 = true;}}}}}if(!valid0){const err26 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate26.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate26.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema50 = {"description":"Scroll facts derived from a typed upgrade row and its source title.","type":"object","properties":{"cursed":{"type":["integer","null"],"format":"int64"},"deltas":{"$ref":"#/$defs/ItemBrowseScrollDeltas"},"specials":{"type":"array","items":{"$ref":"#/$defs/ItemBrowseUpgradeSpecial"}},"success":{"type":["integer","null"],"format":"int64"},"targetLabel":{"anyOf":[{"$ref":"#/$defs/ItemBrowseUpgradeTarget"},{"type":"null"}]},"targets":{"type":"array","items":{"type":"string"}},"tier":{"anyOf":[{"$ref":"#/$defs/ItemBrowseUpgradeTier"},{"type":"null"}]},"unresolvedTargets":{"type":"array","items":{"type":"string"}}},"additionalProperties":false};const schema51 = {"description":"Non-zero Scroll stat deltas.","type":"object","properties":{"accuracy":{"type":["integer","null"],"format":"int64"},"avoidability":{"type":["integer","null"],"format":"int64"},"craft":{"type":["integer","null"],"format":"int64"},"criticalDamage":{"type":["integer","null"],"format":"int64"},"criticalRate":{"type":["integer","null"],"format":"int64"},"dexterity":{"type":["integer","null"],"format":"int64"},"intelligence":{"type":["integer","null"],"format":"int64"},"jump":{"type":["integer","null"],"format":"int64"},"luck":{"type":["integer","null"],"format":"int64"},"magicAttack":{"type":["integer","null"],"format":"int64"},"magicDefense":{"type":["integer","null"],"format":"int64"},"maxHp":{"type":["integer","null"],"format":"int64"},"maxMp":{"type":["integer","null"],"format":"int64"},"speed":{"type":["integer","null"],"format":"int64"},"strength":{"type":["integer","null"],"format":"int64"},"swim":{"type":["integer","null"],"format":"int64"},"weaponAttack":{"type":["integer","null"],"format":"int64"},"weaponDefense":{"type":["integer","null"],"format":"int64"}},"additionalProperties":false};const schema52 = {"description":"Named or typed Scroll mechanic.","type":"string","enum":["clean-slate","chaos","anti-slip","warm-support","randomized-stats"]};const schema53 = {"description":"Equipment target named by a Scroll title. This is a label, never an identity.","type":"string","enum":["accessory","belt","bottomwear","bow","cape","claw","crossbow","dagger","earrings","eye-accessory","face-accessory","gloves","gun","hat","knuckle","one-handed-axe","one-handed-blunt-weapon","one-handed-sword","overall-armor","pet-equipment","polearm","ring","shield","shoes","spear","staff","topwear","two-handed-axe","two-handed-blunt-weapon","two-handed-sword","wand"]};const schema54 = {"description":"Classic World-only named Scroll tier.","type":"string","enum":["lesser","intermediate","greater","chaos"]};function validate29(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate29.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!((((((((key0 === "cursed") || (key0 === "deltas")) || (key0 === "specials")) || (key0 === "success")) || (key0 === "targetLabel")) || (key0 === "targets")) || (key0 === "tier")) || (key0 === "unresolvedTargets"))){const err0 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}if(data.cursed !== undefined){let data0 = data.cursed;if((!(((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0))) && (isFinite(data0)))) && (data0 !== null)){const err1 = {instancePath:instancePath+"/cursed",schemaPath:"#/properties/cursed/type",keyword:"type",params:{type: schema50.properties.cursed.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.deltas !== undefined){let data1 = data.deltas;if(data1 && typeof data1 == "object" && !Array.isArray(data1)){for(const key1 in data1){if(!(func1.call(schema51.properties, key1))){const err2 = {instancePath:instancePath+"/deltas",schemaPath:"#/$defs/ItemBrowseScrollDeltas/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data1.accuracy !== undefined){let data2 = data1.accuracy;if((!(((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2))) && (isFinite(data2)))) && (data2 !== null)){const err3 = {instancePath:instancePath+"/deltas/accuracy",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/accuracy/type",keyword:"type",params:{type: schema51.properties.accuracy.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data1.avoidability !== undefined){let data3 = data1.avoidability;if((!(((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3))) && (isFinite(data3)))) && (data3 !== null)){const err4 = {instancePath:instancePath+"/deltas/avoidability",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/avoidability/type",keyword:"type",params:{type: schema51.properties.avoidability.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data1.craft !== undefined){let data4 = data1.craft;if((!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))) && (data4 !== null)){const err5 = {instancePath:instancePath+"/deltas/craft",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/craft/type",keyword:"type",params:{type: schema51.properties.craft.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data1.criticalDamage !== undefined){let data5 = data1.criticalDamage;if((!(((typeof data5 == "number") && (!(data5 % 1) && !isNaN(data5))) && (isFinite(data5)))) && (data5 !== null)){const err6 = {instancePath:instancePath+"/deltas/criticalDamage",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/criticalDamage/type",keyword:"type",params:{type: schema51.properties.criticalDamage.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data1.criticalRate !== undefined){let data6 = data1.criticalRate;if((!(((typeof data6 == "number") && (!(data6 % 1) && !isNaN(data6))) && (isFinite(data6)))) && (data6 !== null)){const err7 = {instancePath:instancePath+"/deltas/criticalRate",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/criticalRate/type",keyword:"type",params:{type: schema51.properties.criticalRate.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data1.dexterity !== undefined){let data7 = data1.dexterity;if((!(((typeof data7 == "number") && (!(data7 % 1) && !isNaN(data7))) && (isFinite(data7)))) && (data7 !== null)){const err8 = {instancePath:instancePath+"/deltas/dexterity",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/dexterity/type",keyword:"type",params:{type: schema51.properties.dexterity.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data1.intelligence !== undefined){let data8 = data1.intelligence;if((!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))) && (data8 !== null)){const err9 = {instancePath:instancePath+"/deltas/intelligence",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/intelligence/type",keyword:"type",params:{type: schema51.properties.intelligence.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data1.jump !== undefined){let data9 = data1.jump;if((!(((typeof data9 == "number") && (!(data9 % 1) && !isNaN(data9))) && (isFinite(data9)))) && (data9 !== null)){const err10 = {instancePath:instancePath+"/deltas/jump",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/jump/type",keyword:"type",params:{type: schema51.properties.jump.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data1.luck !== undefined){let data10 = data1.luck;if((!(((typeof data10 == "number") && (!(data10 % 1) && !isNaN(data10))) && (isFinite(data10)))) && (data10 !== null)){const err11 = {instancePath:instancePath+"/deltas/luck",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/luck/type",keyword:"type",params:{type: schema51.properties.luck.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data1.magicAttack !== undefined){let data11 = data1.magicAttack;if((!(((typeof data11 == "number") && (!(data11 % 1) && !isNaN(data11))) && (isFinite(data11)))) && (data11 !== null)){const err12 = {instancePath:instancePath+"/deltas/magicAttack",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/magicAttack/type",keyword:"type",params:{type: schema51.properties.magicAttack.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data1.magicDefense !== undefined){let data12 = data1.magicDefense;if((!(((typeof data12 == "number") && (!(data12 % 1) && !isNaN(data12))) && (isFinite(data12)))) && (data12 !== null)){const err13 = {instancePath:instancePath+"/deltas/magicDefense",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/magicDefense/type",keyword:"type",params:{type: schema51.properties.magicDefense.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data1.maxHp !== undefined){let data13 = data1.maxHp;if((!(((typeof data13 == "number") && (!(data13 % 1) && !isNaN(data13))) && (isFinite(data13)))) && (data13 !== null)){const err14 = {instancePath:instancePath+"/deltas/maxHp",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/maxHp/type",keyword:"type",params:{type: schema51.properties.maxHp.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data1.maxMp !== undefined){let data14 = data1.maxMp;if((!(((typeof data14 == "number") && (!(data14 % 1) && !isNaN(data14))) && (isFinite(data14)))) && (data14 !== null)){const err15 = {instancePath:instancePath+"/deltas/maxMp",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/maxMp/type",keyword:"type",params:{type: schema51.properties.maxMp.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data1.speed !== undefined){let data15 = data1.speed;if((!(((typeof data15 == "number") && (!(data15 % 1) && !isNaN(data15))) && (isFinite(data15)))) && (data15 !== null)){const err16 = {instancePath:instancePath+"/deltas/speed",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/speed/type",keyword:"type",params:{type: schema51.properties.speed.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data1.strength !== undefined){let data16 = data1.strength;if((!(((typeof data16 == "number") && (!(data16 % 1) && !isNaN(data16))) && (isFinite(data16)))) && (data16 !== null)){const err17 = {instancePath:instancePath+"/deltas/strength",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/strength/type",keyword:"type",params:{type: schema51.properties.strength.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data1.swim !== undefined){let data17 = data1.swim;if((!(((typeof data17 == "number") && (!(data17 % 1) && !isNaN(data17))) && (isFinite(data17)))) && (data17 !== null)){const err18 = {instancePath:instancePath+"/deltas/swim",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/swim/type",keyword:"type",params:{type: schema51.properties.swim.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data1.weaponAttack !== undefined){let data18 = data1.weaponAttack;if((!(((typeof data18 == "number") && (!(data18 % 1) && !isNaN(data18))) && (isFinite(data18)))) && (data18 !== null)){const err19 = {instancePath:instancePath+"/deltas/weaponAttack",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/weaponAttack/type",keyword:"type",params:{type: schema51.properties.weaponAttack.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data1.weaponDefense !== undefined){let data19 = data1.weaponDefense;if((!(((typeof data19 == "number") && (!(data19 % 1) && !isNaN(data19))) && (isFinite(data19)))) && (data19 !== null)){const err20 = {instancePath:instancePath+"/deltas/weaponDefense",schemaPath:"#/$defs/ItemBrowseScrollDeltas/properties/weaponDefense/type",keyword:"type",params:{type: schema51.properties.weaponDefense.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}}else {const err21 = {instancePath:instancePath+"/deltas",schemaPath:"#/$defs/ItemBrowseScrollDeltas/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.specials !== undefined){let data20 = data.specials;if(Array.isArray(data20)){const len0 = data20.length;for(let i0=0; i0<len0; i0++){let data21 = data20[i0];if(typeof data21 !== "string"){const err22 = {instancePath:instancePath+"/specials/" + i0,schemaPath:"#/$defs/ItemBrowseUpgradeSpecial/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}if(!(((((data21 === "clean-slate") || (data21 === "chaos")) || (data21 === "anti-slip")) || (data21 === "warm-support")) || (data21 === "randomized-stats"))){const err23 = {instancePath:instancePath+"/specials/" + i0,schemaPath:"#/$defs/ItemBrowseUpgradeSpecial/enum",keyword:"enum",params:{allowedValues: schema52.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}else {const err24 = {instancePath:instancePath+"/specials",schemaPath:"#/properties/specials/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data.success !== undefined){let data22 = data.success;if((!(((typeof data22 == "number") && (!(data22 % 1) && !isNaN(data22))) && (isFinite(data22)))) && (data22 !== null)){const err25 = {instancePath:instancePath+"/success",schemaPath:"#/properties/success/type",keyword:"type",params:{type: schema50.properties.success.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.targetLabel !== undefined){let data23 = data.targetLabel;const _errs52 = errors;let valid6 = false;const _errs53 = errors;if(typeof data23 !== "string"){const err26 = {instancePath:instancePath+"/targetLabel",schemaPath:"#/$defs/ItemBrowseUpgradeTarget/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}if(!(((((((((((((((((((((((((((((((data23 === "accessory") || (data23 === "belt")) || (data23 === "bottomwear")) || (data23 === "bow")) || (data23 === "cape")) || (data23 === "claw")) || (data23 === "crossbow")) || (data23 === "dagger")) || (data23 === "earrings")) || (data23 === "eye-accessory")) || (data23 === "face-accessory")) || (data23 === "gloves")) || (data23 === "gun")) || (data23 === "hat")) || (data23 === "knuckle")) || (data23 === "one-handed-axe")) || (data23 === "one-handed-blunt-weapon")) || (data23 === "one-handed-sword")) || (data23 === "overall-armor")) || (data23 === "pet-equipment")) || (data23 === "polearm")) || (data23 === "ring")) || (data23 === "shield")) || (data23 === "shoes")) || (data23 === "spear")) || (data23 === "staff")) || (data23 === "topwear")) || (data23 === "two-handed-axe")) || (data23 === "two-handed-blunt-weapon")) || (data23 === "two-handed-sword")) || (data23 === "wand"))){const err27 = {instancePath:instancePath+"/targetLabel",schemaPath:"#/$defs/ItemBrowseUpgradeTarget/enum",keyword:"enum",params:{allowedValues: schema53.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}var _valid0 = _errs53 === errors;valid6 = valid6 || _valid0;const _errs56 = errors;if(data23 !== null){const err28 = {instancePath:instancePath+"/targetLabel",schemaPath:"#/properties/targetLabel/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}var _valid0 = _errs56 === errors;valid6 = valid6 || _valid0;if(!valid6){const err29 = {instancePath:instancePath+"/targetLabel",schemaPath:"#/properties/targetLabel/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}else {errors = _errs52;if(vErrors !== null){if(_errs52){vErrors.length = _errs52;}else {vErrors = null;}}}}if(data.targets !== undefined){let data24 = data.targets;if(Array.isArray(data24)){const len1 = data24.length;for(let i1=0; i1<len1; i1++){if(typeof data24[i1] !== "string"){const err30 = {instancePath:instancePath+"/targets/" + i1,schemaPath:"#/properties/targets/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}}else {const err31 = {instancePath:instancePath+"/targets",schemaPath:"#/properties/targets/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}if(data.tier !== undefined){let data26 = data.tier;const _errs63 = errors;let valid10 = false;const _errs64 = errors;if(typeof data26 !== "string"){const err32 = {instancePath:instancePath+"/tier",schemaPath:"#/$defs/ItemBrowseUpgradeTier/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}if(!((((data26 === "lesser") || (data26 === "intermediate")) || (data26 === "greater")) || (data26 === "chaos"))){const err33 = {instancePath:instancePath+"/tier",schemaPath:"#/$defs/ItemBrowseUpgradeTier/enum",keyword:"enum",params:{allowedValues: schema54.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}var _valid1 = _errs64 === errors;valid10 = valid10 || _valid1;const _errs67 = errors;if(data26 !== null){const err34 = {instancePath:instancePath+"/tier",schemaPath:"#/properties/tier/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}var _valid1 = _errs67 === errors;valid10 = valid10 || _valid1;if(!valid10){const err35 = {instancePath:instancePath+"/tier",schemaPath:"#/properties/tier/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}else {errors = _errs63;if(vErrors !== null){if(_errs63){vErrors.length = _errs63;}else {vErrors = null;}}}}if(data.unresolvedTargets !== undefined){let data27 = data.unresolvedTargets;if(Array.isArray(data27)){const len2 = data27.length;for(let i2=0; i2<len2; i2++){if(typeof data27[i2] !== "string"){const err36 = {instancePath:instancePath+"/unresolvedTargets/" + i2,schemaPath:"#/properties/unresolvedTargets/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath:instancePath+"/unresolvedTargets",schemaPath:"#/properties/unresolvedTargets/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}}else {const err38 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}validate29.errors = vErrors;return errors === 0;}validate29.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate25.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.sourceId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "sourceId"},message:"must have required property '"+"sourceId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.itemClass === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "itemClass"},message:"must have required property '"+"itemClass"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.name === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.icon === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "icon"},message:"must have required property '"+"icon"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!(func1.call(schema42.properties, key0))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.family !== undefined){let data0 = data.family;if((typeof data0 !== "string") && (data0 !== null)){const err5 = {instancePath:instancePath+"/family",schemaPath:"#/properties/family/type",keyword:"type",params:{type: schema42.properties.family.type},message:"must be string,null"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.functions !== undefined){let data1 = data.functions;if(Array.isArray(data1)){const len0 = data1.length;for(let i0=0; i0<len0; i0++){let data2 = data1[i0];if(typeof data2 !== "string"){const err6 = {instancePath:instancePath+"/functions/" + i0,schemaPath:"#/$defs/ItemBrowseFunction/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(!((((((((data2 === "upgrade") || (data2 === "skill")) || (data2 === "summon")) || (data2 === "reward-container")) || (data2 === "monster-card")) || (data2 === "readable")) || (data2 === "pet")) || (data2 === "recovery"))){const err7 = {instancePath:instancePath+"/functions/" + i0,schemaPath:"#/$defs/ItemBrowseFunction/enum",keyword:"enum",params:{allowedValues: schema43.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath:instancePath+"/functions",schemaPath:"#/properties/functions/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.icon !== undefined){if(!(validate26(data.icon, {instancePath:instancePath+"/icon",parentData:data,parentDataProperty:"icon",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.itemClass !== undefined){let data4 = data.itemClass;if(typeof data4 !== "string"){const err9 = {instancePath:instancePath+"/itemClass",schemaPath:"#/$defs/ItemBrowseClass/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(!(((((data4 === "consume") || (data4 === "etc")) || (data4 === "setup")) || (data4 === "cash")) || (data4 === "pet"))){const err10 = {instancePath:instancePath+"/itemClass",schemaPath:"#/$defs/ItemBrowseClass/enum",keyword:"enum",params:{allowedValues: schema46.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.name !== undefined){if(!(validate26(data.name, {instancePath:instancePath+"/name",parentData:data,parentDataProperty:"name",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.petFood !== undefined){let data6 = data.petFood;const _errs15 = errors;let valid5 = false;const _errs16 = errors;if(data6 && typeof data6 == "object" && !Array.isArray(data6)){for(const key1 in data6){if(!(((((key1 === "closeness") || (key1 === "fullness")) || (key1 === "tameness")) || (key1 === "targets")) || (key1 === "unresolvedTargets"))){const err11 = {instancePath:instancePath+"/petFood",schemaPath:"#/$defs/ItemBrowsePetFood/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data6.closeness !== undefined){let data7 = data6.closeness;if((!(((typeof data7 == "number") && (!(data7 % 1) && !isNaN(data7))) && (isFinite(data7)))) && (data7 !== null)){const err12 = {instancePath:instancePath+"/petFood/closeness",schemaPath:"#/$defs/ItemBrowsePetFood/properties/closeness/type",keyword:"type",params:{type: schema47.properties.closeness.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data6.fullness !== undefined){let data8 = data6.fullness;if((!(((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8))) && (isFinite(data8)))) && (data8 !== null)){const err13 = {instancePath:instancePath+"/petFood/fullness",schemaPath:"#/$defs/ItemBrowsePetFood/properties/fullness/type",keyword:"type",params:{type: schema47.properties.fullness.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data6.tameness !== undefined){let data9 = data6.tameness;if((!(((typeof data9 == "number") && (!(data9 % 1) && !isNaN(data9))) && (isFinite(data9)))) && (data9 !== null)){const err14 = {instancePath:instancePath+"/petFood/tameness",schemaPath:"#/$defs/ItemBrowsePetFood/properties/tameness/type",keyword:"type",params:{type: schema47.properties.tameness.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data6.targets !== undefined){let data10 = data6.targets;if(Array.isArray(data10)){const len1 = data10.length;for(let i1=0; i1<len1; i1++){if(typeof data10[i1] !== "string"){const err15 = {instancePath:instancePath+"/petFood/targets/" + i1,schemaPath:"#/$defs/ItemBrowsePetFood/properties/targets/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/petFood/targets",schemaPath:"#/$defs/ItemBrowsePetFood/properties/targets/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data6.unresolvedTargets !== undefined){let data12 = data6.unresolvedTargets;if(Array.isArray(data12)){const len2 = data12.length;for(let i2=0; i2<len2; i2++){if(typeof data12[i2] !== "string"){const err17 = {instancePath:instancePath+"/petFood/unresolvedTargets/" + i2,schemaPath:"#/$defs/ItemBrowsePetFood/properties/unresolvedTargets/items/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}}else {const err18 = {instancePath:instancePath+"/petFood/unresolvedTargets",schemaPath:"#/$defs/ItemBrowsePetFood/properties/unresolvedTargets/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}}else {const err19 = {instancePath:instancePath+"/petFood",schemaPath:"#/$defs/ItemBrowsePetFood/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid0 = _errs16 === errors;valid5 = valid5 || _valid0;const _errs34 = errors;if(data6 !== null){const err20 = {instancePath:instancePath+"/petFood",schemaPath:"#/properties/petFood/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid0 = _errs34 === errors;valid5 = valid5 || _valid0;if(!valid5){const err21 = {instancePath:instancePath+"/petFood",schemaPath:"#/properties/petFood/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}else {errors = _errs15;if(vErrors !== null){if(_errs15){vErrors.length = _errs15;}else {vErrors = null;}}}}if(data.projectileAttack !== undefined){let data14 = data.projectileAttack;if((!(((typeof data14 == "number") && (!(data14 % 1) && !isNaN(data14))) && (isFinite(data14)))) && (data14 !== null)){const err22 = {instancePath:instancePath+"/projectileAttack",schemaPath:"#/properties/projectileAttack/type",keyword:"type",params:{type: schema42.properties.projectileAttack.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.questFlag !== undefined){if(typeof data.questFlag !== "boolean"){const err23 = {instancePath:instancePath+"/questFlag",schemaPath:"#/properties/questFlag/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.recovery !== undefined){let data16 = data.recovery;const _errs41 = errors;let valid12 = false;const _errs42 = errors;if(data16 && typeof data16 == "object" && !Array.isArray(data16)){for(const key2 in data16){if(!((((key2 === "hp") || (key2 === "hpPercent")) || (key2 === "mp")) || (key2 === "mpPercent"))){const err24 = {instancePath:instancePath+"/recovery",schemaPath:"#/$defs/ItemBrowseRecovery/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data16.hp !== undefined){let data17 = data16.hp;if((!(((typeof data17 == "number") && (!(data17 % 1) && !isNaN(data17))) && (isFinite(data17)))) && (data17 !== null)){const err25 = {instancePath:instancePath+"/recovery/hp",schemaPath:"#/$defs/ItemBrowseRecovery/properties/hp/type",keyword:"type",params:{type: schema48.properties.hp.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data16.hpPercent !== undefined){let data18 = data16.hpPercent;if((!(((typeof data18 == "number") && (!(data18 % 1) && !isNaN(data18))) && (isFinite(data18)))) && (data18 !== null)){const err26 = {instancePath:instancePath+"/recovery/hpPercent",schemaPath:"#/$defs/ItemBrowseRecovery/properties/hpPercent/type",keyword:"type",params:{type: schema48.properties.hpPercent.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data16.mp !== undefined){let data19 = data16.mp;if((!(((typeof data19 == "number") && (!(data19 % 1) && !isNaN(data19))) && (isFinite(data19)))) && (data19 !== null)){const err27 = {instancePath:instancePath+"/recovery/mp",schemaPath:"#/$defs/ItemBrowseRecovery/properties/mp/type",keyword:"type",params:{type: schema48.properties.mp.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data16.mpPercent !== undefined){let data20 = data16.mpPercent;if((!(((typeof data20 == "number") && (!(data20 % 1) && !isNaN(data20))) && (isFinite(data20)))) && (data20 !== null)){const err28 = {instancePath:instancePath+"/recovery/mpPercent",schemaPath:"#/$defs/ItemBrowseRecovery/properties/mpPercent/type",keyword:"type",params:{type: schema48.properties.mpPercent.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}}else {const err29 = {instancePath:instancePath+"/recovery",schemaPath:"#/$defs/ItemBrowseRecovery/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}var _valid1 = _errs42 === errors;valid12 = valid12 || _valid1;const _errs54 = errors;if(data16 !== null){const err30 = {instancePath:instancePath+"/recovery",schemaPath:"#/properties/recovery/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var _valid1 = _errs54 === errors;valid12 = valid12 || _valid1;if(!valid12){const err31 = {instancePath:instancePath+"/recovery",schemaPath:"#/properties/recovery/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}else {errors = _errs41;if(vErrors !== null){if(_errs41){vErrors.length = _errs41;}else {vErrors = null;}}}}if(data.relationships !== undefined){let data21 = data.relationships;if(data21 && typeof data21 == "object" && !Array.isArray(data21)){for(const key3 in data21){if(!(((((((key3 === "cash-shop-listing") || (key3 === "found-in-container")) || (key3 === "made-by-recipe")) || (key3 === "monster-drop")) || (key3 === "needed-for-quest")) || (key3 === "quest-reward")) || (key3 === "used-in-recipe"))){const err32 = {instancePath:instancePath+"/relationships",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data21["cash-shop-listing"] !== undefined){let data22 = data21["cash-shop-listing"];if((!(((typeof data22 == "number") && (!(data22 % 1) && !isNaN(data22))) && (isFinite(data22)))) && (data22 !== null)){const err33 = {instancePath:instancePath+"/relationships/cash-shop-listing",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/cash-shop-listing/type",keyword:"type",params:{type: schema49.properties["cash-shop-listing"].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}if((typeof data22 == "number") && (isFinite(data22))){if(data22 < 0 || isNaN(data22)){const err34 = {instancePath:instancePath+"/relationships/cash-shop-listing",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/cash-shop-listing/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}}if(data21["found-in-container"] !== undefined){let data23 = data21["found-in-container"];if((!(((typeof data23 == "number") && (!(data23 % 1) && !isNaN(data23))) && (isFinite(data23)))) && (data23 !== null)){const err35 = {instancePath:instancePath+"/relationships/found-in-container",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/found-in-container/type",keyword:"type",params:{type: schema49.properties["found-in-container"].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}if((typeof data23 == "number") && (isFinite(data23))){if(data23 < 0 || isNaN(data23)){const err36 = {instancePath:instancePath+"/relationships/found-in-container",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/found-in-container/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}if(data21["made-by-recipe"] !== undefined){let data24 = data21["made-by-recipe"];if((!(((typeof data24 == "number") && (!(data24 % 1) && !isNaN(data24))) && (isFinite(data24)))) && (data24 !== null)){const err37 = {instancePath:instancePath+"/relationships/made-by-recipe",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/made-by-recipe/type",keyword:"type",params:{type: schema49.properties["made-by-recipe"].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}if((typeof data24 == "number") && (isFinite(data24))){if(data24 < 0 || isNaN(data24)){const err38 = {instancePath:instancePath+"/relationships/made-by-recipe",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/made-by-recipe/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}}if(data21["monster-drop"] !== undefined){let data25 = data21["monster-drop"];if((!(((typeof data25 == "number") && (!(data25 % 1) && !isNaN(data25))) && (isFinite(data25)))) && (data25 !== null)){const err39 = {instancePath:instancePath+"/relationships/monster-drop",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/monster-drop/type",keyword:"type",params:{type: schema49.properties["monster-drop"].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}if((typeof data25 == "number") && (isFinite(data25))){if(data25 < 0 || isNaN(data25)){const err40 = {instancePath:instancePath+"/relationships/monster-drop",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/monster-drop/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}}if(data21["needed-for-quest"] !== undefined){let data26 = data21["needed-for-quest"];if((!(((typeof data26 == "number") && (!(data26 % 1) && !isNaN(data26))) && (isFinite(data26)))) && (data26 !== null)){const err41 = {instancePath:instancePath+"/relationships/needed-for-quest",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/needed-for-quest/type",keyword:"type",params:{type: schema49.properties["needed-for-quest"].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}if((typeof data26 == "number") && (isFinite(data26))){if(data26 < 0 || isNaN(data26)){const err42 = {instancePath:instancePath+"/relationships/needed-for-quest",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/needed-for-quest/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err42];}else {vErrors.push(err42);}errors++;}}}if(data21["quest-reward"] !== undefined){let data27 = data21["quest-reward"];if((!(((typeof data27 == "number") && (!(data27 % 1) && !isNaN(data27))) && (isFinite(data27)))) && (data27 !== null)){const err43 = {instancePath:instancePath+"/relationships/quest-reward",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/quest-reward/type",keyword:"type",params:{type: schema49.properties["quest-reward"].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err43];}else {vErrors.push(err43);}errors++;}if((typeof data27 == "number") && (isFinite(data27))){if(data27 < 0 || isNaN(data27)){const err44 = {instancePath:instancePath+"/relationships/quest-reward",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/quest-reward/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}}if(data21["used-in-recipe"] !== undefined){let data28 = data21["used-in-recipe"];if((!(((typeof data28 == "number") && (!(data28 % 1) && !isNaN(data28))) && (isFinite(data28)))) && (data28 !== null)){const err45 = {instancePath:instancePath+"/relationships/used-in-recipe",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/used-in-recipe/type",keyword:"type",params:{type: schema49.properties["used-in-recipe"].type},message:"must be integer,null"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}if((typeof data28 == "number") && (isFinite(data28))){if(data28 < 0 || isNaN(data28)){const err46 = {instancePath:instancePath+"/relationships/used-in-recipe",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/properties/used-in-recipe/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err46];}else {vErrors.push(err46);}errors++;}}}}else {const err47 = {instancePath:instancePath+"/relationships",schemaPath:"#/$defs/ItemBrowseRelationshipCounts/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}if(data.scroll !== undefined){let data29 = data.scroll;const _errs75 = errors;let valid17 = false;const _errs76 = errors;if(!(validate29(data29, {instancePath:instancePath+"/scroll",parentData:data,parentDataProperty:"scroll",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate29.errors : vErrors.concat(validate29.errors);errors = vErrors.length;}var _valid2 = _errs76 === errors;valid17 = valid17 || _valid2;const _errs77 = errors;if(data29 !== null){const err48 = {instancePath:instancePath+"/scroll",schemaPath:"#/properties/scroll/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}var _valid2 = _errs77 === errors;valid17 = valid17 || _valid2;if(!valid17){const err49 = {instancePath:instancePath+"/scroll",schemaPath:"#/properties/scroll/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}else {errors = _errs75;if(vErrors !== null){if(_errs75){vErrors.length = _errs75;}else {vErrors = null;}}}}if(data.seatingRecovery !== undefined){let data30 = data.seatingRecovery;const _errs80 = errors;let valid18 = false;const _errs81 = errors;if(data30 && typeof data30 == "object" && !Array.isArray(data30)){for(const key4 in data30){if(!((key4 === "hp") || (key4 === "mp"))){const err50 = {instancePath:instancePath+"/seatingRecovery",schemaPath:"#/$defs/ItemBrowseSeatingRecovery/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key4},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}}if(data30.hp !== undefined){let data31 = data30.hp;if((!(((typeof data31 == "number") && (!(data31 % 1) && !isNaN(data31))) && (isFinite(data31)))) && (data31 !== null)){const err51 = {instancePath:instancePath+"/seatingRecovery/hp",schemaPath:"#/$defs/ItemBrowseSeatingRecovery/properties/hp/type",keyword:"type",params:{type: schema55.properties.hp.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err51];}else {vErrors.push(err51);}errors++;}}if(data30.mp !== undefined){let data32 = data30.mp;if((!(((typeof data32 == "number") && (!(data32 % 1) && !isNaN(data32))) && (isFinite(data32)))) && (data32 !== null)){const err52 = {instancePath:instancePath+"/seatingRecovery/mp",schemaPath:"#/$defs/ItemBrowseSeatingRecovery/properties/mp/type",keyword:"type",params:{type: schema55.properties.mp.type},message:"must be integer,null"};if(vErrors === null){vErrors = [err52];}else {vErrors.push(err52);}errors++;}}}else {const err53 = {instancePath:instancePath+"/seatingRecovery",schemaPath:"#/$defs/ItemBrowseSeatingRecovery/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err53];}else {vErrors.push(err53);}errors++;}var _valid3 = _errs81 === errors;valid18 = valid18 || _valid3;const _errs89 = errors;if(data30 !== null){const err54 = {instancePath:instancePath+"/seatingRecovery",schemaPath:"#/properties/seatingRecovery/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err54];}else {vErrors.push(err54);}errors++;}var _valid3 = _errs89 === errors;valid18 = valid18 || _valid3;if(!valid18){const err55 = {instancePath:instancePath+"/seatingRecovery",schemaPath:"#/properties/seatingRecovery/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err55];}else {vErrors.push(err55);}errors++;}else {errors = _errs80;if(vErrors !== null){if(_errs80){vErrors.length = _errs80;}else {vErrors = null;}}}}if(data.sourceId !== undefined){if(typeof data.sourceId !== "string"){const err56 = {instancePath:instancePath+"/sourceId",schemaPath:"#/properties/sourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err56];}else {vErrors.push(err56);}errors++;}}if(data.types !== undefined){let data34 = data.types;if(Array.isArray(data34)){const len3 = data34.length;for(let i3=0; i3<len3; i3++){let data35 = data34[i3];if(typeof data35 !== "string"){const err57 = {instancePath:instancePath+"/types/" + i3,schemaPath:"#/$defs/ItemBrowseType/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err57];}else {vErrors.push(err57);}errors++;}if(!((((((((((((((((data35 === "upgrade-scroll") || (data35 === "arrow")) || (data35 === "throwing-star")) || (data35 === "bullet")) || (data35 === "chair")) || (data35 === "ore")) || (data35 === "gem")) || (data35 === "pet-food")) || (data35 === "refined-material")) || (data35 === "potion")) || (data35 === "food-buff")) || (data35 === "monster-material")) || (data35 === "holiday-ornament")) || (data35 === "furniture")) || (data35 === "crafting-station")) || (data35 === "meso-pouch"))){const err58 = {instancePath:instancePath+"/types/" + i3,schemaPath:"#/$defs/ItemBrowseType/enum",keyword:"enum",params:{allowedValues: schema56.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err58];}else {vErrors.push(err58);}errors++;}}}else {const err59 = {instancePath:instancePath+"/types",schemaPath:"#/properties/types/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err59];}else {vErrors.push(err59);}errors++;}}}else {const err60 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err60];}else {vErrors.push(err60);}errors++;}validate25.errors = vErrors;return errors === 0;}validate25.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.format === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "format"},message:"must have required property '"+"format"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.contractVersion === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contractVersion"},message:"must have required property '"+"contractVersion"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.scope === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "scope"},message:"must have required property '"+"scope"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.coverage === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "coverage"},message:"must have required property '"+"coverage"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.records === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "records"},message:"must have required property '"+"records"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!(((((key0 === "contractVersion") || (key0 === "coverage")) || (key0 === "format")) || (key0 === "records")) || (key0 === "scope"))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.contractVersion !== undefined){let data0 = data.contractVersion;if(typeof data0 !== "string"){const err6 = {instancePath:instancePath+"/contractVersion",schemaPath:"#/properties/contractVersion/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if("2.0" !== data0){const err7 = {instancePath:instancePath+"/contractVersion",schemaPath:"#/properties/contractVersion/const",keyword:"const",params:{allowedValue: "2.0"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.coverage !== undefined){if(!(validate21(data.coverage, {instancePath:instancePath+"/coverage",parentData:data,parentDataProperty:"coverage",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);errors = vErrors.length;}}if(data.format !== undefined){let data2 = data.format;if(typeof data2 !== "string"){const err8 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if("item-browse-pack/1" !== data2){const err9 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/const",keyword:"const",params:{allowedValue: "item-browse-pack/1"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.records !== undefined){let data3 = data.records;if(data3 && typeof data3 == "object" && !Array.isArray(data3)){for(const key1 in data3){if(!(validate25(data3[key1], {instancePath:instancePath+"/records/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data3,parentDataProperty:key1,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}else {const err10 = {instancePath:instancePath+"/records",schemaPath:"#/properties/records/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.scope !== undefined){let data5 = data.scope;if(data5 && typeof data5 == "object" && !Array.isArray(data5)){if(data5.family_id === undefined){const err11 = {instancePath:instancePath+"/scope",schemaPath:"#/$defs/BuildScope/required",keyword:"required",params:{missingProperty: "family_id"},message:"must have required property '"+"family_id"+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data5.build_id === undefined){const err12 = {instancePath:instancePath+"/scope",schemaPath:"#/$defs/BuildScope/required",keyword:"required",params:{missingProperty: "build_id"},message:"must have required property '"+"build_id"+"'"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data5.build_id !== undefined){if(typeof data5.build_id !== "string"){const err13 = {instancePath:instancePath+"/scope/build_id",schemaPath:"#/$defs/BuildScope/properties/build_id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data5.family_id !== undefined){if(typeof data5.family_id !== "string"){const err14 = {instancePath:instancePath+"/scope/family_id",schemaPath:"#/$defs/BuildScope/properties/family_id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}else {const err15 = {instancePath:instancePath+"/scope",schemaPath:"#/$defs/BuildScope/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapletip/data",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Verified, immutable MapleTip public-data client for Node and browsers",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"packageManager": "pnpm@11.18.0",
|
|
@@ -78,6 +78,8 @@
|
|
|
78
78
|
"generated/equipment-pack-2.validator.js",
|
|
79
79
|
"generated/equipment-relationship-pack-2.d.ts",
|
|
80
80
|
"generated/equipment-relationship-pack-2.validator.js",
|
|
81
|
+
"generated/item-browse-pack-2.d.ts",
|
|
82
|
+
"generated/item-browse-pack-2.validator.js",
|
|
81
83
|
"generated/item-catalog-2.d.ts",
|
|
82
84
|
"generated/item-catalog-2.validator.js",
|
|
83
85
|
"generated/item-detail-2.d.ts",
|