diff --git a/package.json b/package.json index 1d925b4f..1d5f582f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "route-engine-js", - "version": "1.43.0", + "version": "1.45.0", "description": "A lightweight Visual Novel engine built in JavaScript for creating interactive narrative games with branching storylines", "repository": { "type": "git", diff --git a/spec/RouteEngine.audioEffects.test.js b/spec/RouteEngine.audioEffects.test.js index 22bccbae..d6d337bb 100644 --- a/spec/RouteEngine.audioEffects.test.js +++ b/spec/RouteEngine.audioEffects.test.js @@ -593,4 +593,53 @@ describe("RouteEngine audioEffects occurrences", () => { 'story.scenes["actual-scene"].sections["section"].lines["old"].actions.bgm.audioEffects.resourceId', ); }); + + it("compiles beginEffect and endEffect onto the rendered sound", () => { + const projectData = createProjectData(); + projectData.story.scenes.scene.sections.section.lines = [ + { + id: "sound-effects", + actions: { + bgm: { + loop: true, + sounds: [ + { + id: "lead:%main", + resourceId: "old", + volume: 80, + beginEffect: { + resourceId: "smooth", + playback: { speed: 2 }, + }, + endEffect: { resourceId: "smooth" }, + }, + ], + }, + }, + }, + ]; + const engine = createEngine({ projectData }); + + expect(engine.selectRenderState().audioEffects).toBeUndefined(); + expect(engine.selectRenderState().audio[0].children[0]).toMatchObject({ + id: "bgm:lead%3A%25main", + loop: false, + beginEffect: { + volume: { + keyframes: [ + expect.objectContaining({ value: 50, duration: 200 }), + expect.objectContaining({ value: 30, duration: 300 }), + ], + }, + }, + endEffect: { + volume: { + keyframes: [ + expect.objectContaining({ value: 50, duration: 400 }), + expect.objectContaining({ value: 30, duration: 600 }), + ], + }, + }, + }); + }); }); diff --git a/spec/projectDataSchema.test.js b/spec/projectDataSchema.test.js index 19755bf9..cc4f2abb 100644 --- a/spec/projectDataSchema.test.js +++ b/spec/projectDataSchema.test.js @@ -1945,6 +1945,29 @@ describe("projectData schema", () => { expect(validatePresentationActions.errors).toBeNull(); }); + it("accepts begin and end update-effect selections on channel sounds", () => { + const effectSound = { + id: "theme", + resourceId: "music_1", + beginEffect: { resourceId: "fade-in", playback: { speed: 1.5 } }, + endEffect: { resourceId: "fade-out" }, + }; + + for (const actions of [ + { bgm: { sounds: [effectSound] } }, + { sfx: { items: [effectSound] } }, + { + sfx: { + channels: [{ id: "music", sounds: [effectSound] }], + }, + }, + { voice: { sounds: [effectSound] } }, + ]) { + expect(validatePresentationActions(actions)).toBe(true); + expect(validatePresentationActions.errors).toBeNull(); + } + }); + it("rejects an invalid SFX channel apply mode", () => { expect( validatePresentationActions({ diff --git a/spec/resolveAudioEffects.test.js b/spec/resolveAudioEffects.test.js index ad956284..6053e9dd 100644 --- a/spec/resolveAudioEffects.test.js +++ b/spec/resolveAudioEffects.test.js @@ -2,6 +2,8 @@ import { describe, expect, it } from "vitest"; import { applyAudioEffectUpdateEndpoints, resolveAudioEffect, + resolveAudioEffects, + resolveSoundBoundaryEffect, } from "../src/resolveAudioEffects.js"; const oldChannel = { @@ -673,4 +675,127 @@ describe("resolveAudioEffect", () => { nextChannel, }).toEqual(snapshots); }); + + it("keeps per-sound boundary presets out of top-level audioEffects", () => { + expect( + resolveAudioEffects({ + occurrence: { ...occurrence, selection: null }, + resources: { audioEffects: { smooth: updateResource } }, + previousChannel: null, + nextChannel: newChannel, + }), + ).toEqual([]); + }); +}); + +describe("resolveSoundBoundaryEffect", () => { + it("compiles update properties and playback speed", () => { + expect( + resolveSoundBoundaryEffect({ + selection: { resourceId: "smooth", playback: { speed: 2 } }, + selectionPath: 'bgm.sounds["main"].beginEffect', + resources: { + audioEffects: { + smooth: { + type: "update", + tween: { + volume: { + keyframes: [ + { startValue: 0, value: 50, duration: 200 }, + { value: 100, delay: 40, duration: 400 }, + ], + }, + pan: { + keyframes: [{ value: 0.5, duration: 100 }], + }, + playbackRate: { + keyframes: [{ value: 1.25, duration: 300 }], + }, + }, + }, + }, + }, + }), + ).toEqual({ + volume: { + keyframes: [ + { + startValue: 0, + value: 50, + delay: 0, + duration: 100, + easing: "linear", + }, + { + value: 100, + delay: 20, + duration: 200, + easing: "linear", + }, + ], + }, + pan: { + keyframes: [{ value: 0.5, delay: 0, duration: 50, easing: "linear" }], + }, + playbackRate: { + keyframes: [{ value: 1.25, delay: 0, duration: 150, easing: "linear" }], + }, + }); + }); + + it("returns undefined without a selection", () => { + expect( + resolveSoundBoundaryEffect({ + selection: undefined, + selectionPath: 'bgm.sounds["main"].endEffect', + resources: {}, + }), + ).toBeUndefined(); + }); + + it("rejects missing, transition, invalid endpoint, and invalid speed inputs", () => { + const selectionPath = 'bgm.sounds["main"].beginEffect'; + expect(() => + resolveSoundBoundaryEffect({ + selection: { resourceId: "missing" }, + selectionPath, + resources: {}, + }), + ).toThrow('Unknown audio effect resource "missing"'); + + expect(() => + resolveSoundBoundaryEffect({ + selection: { resourceId: "crossfade" }, + selectionPath, + resources: { audioEffects: { crossfade: transitionResource } }, + }), + ).toThrow('require an audio effect resource with type "update"'); + + expect(() => + resolveSoundBoundaryEffect({ + selection: { resourceId: "bad" }, + selectionPath, + resources: { + audioEffects: { + bad: { + type: "update", + tween: { + volume: { + keyframes: [{ value: 10, duration: 100, relative: true }], + }, + }, + }, + }, + }, + }), + ).toThrow("final keyframe must use an absolute finite numeric value"); + + expect(() => + resolveSoundBoundaryEffect({ + selection: { resourceId: "smooth", playback: { speed: 0 } }, + selectionPath, + resources: { audioEffects: { smooth: updateResource } }, + }), + ).toThrow("must be a finite number greater than 0"); + }); }); diff --git a/src/RouteEngine.js b/src/RouteEngine.js index bd3cf2fc..1f8a009e 100644 --- a/src/RouteEngine.js +++ b/src/RouteEngine.js @@ -16,7 +16,7 @@ import { getAnimationInstanceDurationMs, getPersistentAnimationContinuationKey, } from "./stores/constructRenderState.js"; -import { resolveAudioEffect } from "./resolveAudioEffects.js"; +import { resolveAudioEffects } from "./resolveAudioEffects.js"; import { getLocalizationPackageOptions, resolveL10nProjectData, @@ -151,10 +151,12 @@ export default function createRouteEngine(options) { let _restoredPersistentAnimationSessions = new Map(); let _renderPersistentAnimationMetadata = new Map(); let _audioEffectOccurrenceSequence = 0; - let _activeAudioEffect = null; + let _activeAudioEffects = []; let _pendingAudioEffectOccurrences = []; let _hasCommittedRenderState = false; let _committedBgmChannel = null; + let _committedBgmPresentation = null; + let _committedBgmResources = null; let _pendingEnteredLineBgmHandoff = null; let _acceptedLineBgmActionOccurrences = new Map(); let _canonicalProjectData; @@ -416,6 +418,7 @@ export default function createRouteEngine(options) { const captureCurrentBgmChannel = () => { const systemState = _systemStore.selectSystemState(); + if (!systemState.projectData) return null; return createBgmChannelNode({ presentationState: _systemStore.selectPresentationState(), resources: systemState.projectData?.resources, @@ -424,6 +427,20 @@ export default function createRouteEngine(options) { }); }; + const captureCurrentBgmPresentation = () => { + if (!_systemStore.selectSystemState().projectData) return null; + return structuredClone(_systemStore.selectPresentationState()?.bgm ?? null); + }; + + const captureCurrentBgmResources = () => ({ + audioEffects: structuredClone( + _systemStore.selectSystemState().projectData?.resources?.audioEffects ?? + {}, + ), + }); + + const hasBgmAudioEffectSelections = (bgm) => !!bgm?.audioEffects; + const captureOutgoingBgmChannel = () => structuredClone( _hasCommittedRenderState @@ -431,6 +448,16 @@ export default function createRouteEngine(options) { : captureCurrentBgmChannel(), ); + const captureOutgoingBgmPresentation = () => + _hasCommittedRenderState + ? structuredClone(_committedBgmPresentation) + : captureCurrentBgmPresentation(); + + const captureOutgoingBgmResources = () => + _hasCommittedRenderState + ? structuredClone(_committedBgmResources) + : captureCurrentBgmResources(); + const getSceneIdForSection = (sectionId) => { const scenes = _systemStore.selectSystemState().projectData?.story?.scenes ?? {}; @@ -444,13 +471,18 @@ export default function createRouteEngine(options) { const skipsAudioEffects = _systemStore.selectRuntime()?.skipTransitionsAndAnimations === true; - const activeEffectId = skipsAudioEffects ? null : _activeAudioEffect?.id; + const activeEffectIds = new Set( + skipsAudioEffects ? [] : _activeAudioEffects.map((effect) => effect.id), + ); _pendingAudioEffectOccurrences.forEach((occurrence) => { - occurrence.status = - occurrence.effect?.id === activeEffectId ? "active" : "settled"; + occurrence.status = occurrence.effects?.some((effect) => + activeEffectIds.has(effect.id), + ) + ? "active" + : "settled"; }); if (skipsAudioEffects) { - _activeAudioEffect = null; + _activeAudioEffects = []; } _pendingAudioEffectOccurrences = []; }; @@ -460,10 +492,10 @@ export default function createRouteEngine(options) { options, previousChannel, nextChannel, + previousBgm, + nextBgm, + previousResources, ) => { - if (!payload?.audioEffects) { - _activeAudioEffect = null; - } const lineEntryId = _systemStore.selectPlaybackLineEntryId?.() ?? 0; const relativeActionPath = (options.actionPath ?? ["bgm"]).join("."); const pointer = _systemStore.selectCurrentPointer()?.pointer; @@ -491,16 +523,20 @@ export default function createRouteEngine(options) { : null, }; - const resources = _systemStore.selectSystemState().projectData?.resources; - const effect = resolveAudioEffect({ + const nextResources = captureCurrentBgmResources(); + const effects = resolveAudioEffects({ occurrence, - resources, + resources: nextResources, + previousResources: previousResources ?? nextResources, + nextResources, previousChannel, nextChannel, + previousBgm, + nextBgm, }); - occurrence.effect = effect ? structuredClone(effect) : null; - occurrence.status = effect ? "pending" : "settled"; - _activeAudioEffect = effect ? structuredClone(effect) : null; + occurrence.effects = structuredClone(effects); + occurrence.status = effects.length > 0 ? "pending" : "settled"; + _activeAudioEffects = structuredClone(effects); _pendingAudioEffectOccurrences.push(occurrence); if (lineOccurrenceKey) { @@ -589,13 +625,17 @@ export default function createRouteEngine(options) { _restoredPersistentAnimationSessions = new Map(); _renderPersistentAnimationMetadata = new Map(); _audioEffectOccurrenceSequence = 0; - _activeAudioEffect = null; + _activeAudioEffects = []; _pendingAudioEffectOccurrences = []; _hasCommittedRenderState = false; _committedBgmChannel = null; + _committedBgmPresentation = null; + _committedBgmResources = null; _pendingEnteredLineBgmHandoff = { lineEntryId: _systemStore.selectPlaybackLineEntryId?.() ?? 0, channel: null, + presentation: null, + resources: captureCurrentBgmResources(), }; _acceptedLineBgmActionOccurrences = new Map(); _canonicalProjectData = canonicalProjectData; @@ -626,10 +666,12 @@ export default function createRouteEngine(options) { _persistentAnimationSessions = new Map(); _restoredPersistentAnimationSessions = new Map(); _renderPersistentAnimationMetadata = new Map(); - _activeAudioEffect = null; + _activeAudioEffects = []; _pendingAudioEffectOccurrences = []; _hasCommittedRenderState = false; _committedBgmChannel = null; + _committedBgmPresentation = null; + _committedBgmResources = null; _pendingEnteredLineBgmHandoff = null; _acceptedLineBgmActionOccurrences = new Map(); _playbackScheduleDirty = false; @@ -680,9 +722,7 @@ export default function createRouteEngine(options) { restoredPersistentAnimations: collectSessionAnimations( restoredPersistentAnimationSessions, ), - activeAudioEffect: _activeAudioEffect - ? structuredClone(_activeAudioEffect) - : null, + activeAudioEffects: structuredClone(_activeAudioEffects), }); const nextRenderState = { ...renderState, @@ -697,11 +737,15 @@ export default function createRouteEngine(options) { ]), usedRestoredPersistentAnimationSessions: shouldUseRestoredPersistentAnimationSessions, - activeAudioEffectId: _activeAudioEffect?.id ?? null, - retainsActiveAudioEffect: - !!_activeAudioEffect && - (renderState.audioEffects ?? []).some( - (effect) => effect.id === _activeAudioEffect.id, + activeAudioEffectIds: _activeAudioEffects.map((effect) => effect.id), + bgmPresentation: captureCurrentBgmPresentation(), + bgmResources: captureCurrentBgmResources(), + retainsActiveAudioEffects: + _activeAudioEffects.length > 0 && + _activeAudioEffects.every((activeEffect) => + (renderState.audioEffects ?? []).some( + (effect) => effect.id === activeEffect.id, + ), ), }); @@ -721,14 +765,6 @@ export default function createRouteEngine(options) { return; } - const committedBgmChannel = renderState?.audio?.find( - (node) => node?.id === BGM_RENDER_CHANNEL_ID, - ); - _hasCommittedRenderState = true; - _committedBgmChannel = committedBgmChannel - ? structuredClone(committedBgmChannel) - : null; - const renderId = typeof renderState?.id === "string" && renderState.id.length > 0 ? renderState.id @@ -740,6 +776,20 @@ export default function createRouteEngine(options) { _renderPersistentAnimationMetadata.delete(renderId); } + const committedBgmChannel = renderState?.audio?.find( + (node) => node?.id === BGM_RENDER_CHANNEL_ID, + ); + _hasCommittedRenderState = true; + _committedBgmChannel = committedBgmChannel + ? structuredClone(committedBgmChannel) + : null; + _committedBgmPresentation = structuredClone( + renderMetadata?.bgmPresentation ?? null, + ); + _committedBgmResources = structuredClone( + renderMetadata?.bgmResources ?? null, + ); + const nextSessions = new Map(); collectPersistentAnimationContinuations(renderState?.animations).forEach( (animationInstance) => { @@ -772,11 +822,15 @@ export default function createRouteEngine(options) { _restoredPersistentAnimationSessions = new Map(); } if ( - renderMetadata?.activeAudioEffectId && - !renderMetadata.retainsActiveAudioEffect && - _activeAudioEffect?.id === renderMetadata.activeAudioEffectId + renderMetadata?.activeAudioEffectIds?.length > 0 && + !renderMetadata.retainsActiveAudioEffects && + _activeAudioEffects.length === + renderMetadata.activeAudioEffectIds.length && + renderMetadata.activeAudioEffectIds.every((effectId) => + _activeAudioEffects.some((effect) => effect.id === effectId), + ) ) { - _activeAudioEffect = null; + _activeAudioEffects = []; } }; @@ -1156,6 +1210,12 @@ export default function createRouteEngine(options) { const outgoingBgmChannel = capturesEnteredLineBgmHandoff ? captureOutgoingBgmChannel() : null; + const outgoingBgmPresentation = capturesEnteredLineBgmHandoff + ? captureOutgoingBgmPresentation() + : null; + const outgoingBgmResources = capturesEnteredLineBgmHandoff + ? captureOutgoingBgmResources() + : null; let storeCommitted = false; let result; try { @@ -1175,13 +1235,13 @@ export default function createRouteEngine(options) { _restoredPersistentAnimationSessions = persistentAnimationSessionsBeforeAction ?? new Map(); _persistentAnimationSessions = new Map(); - _activeAudioEffect = null; + _activeAudioEffects = []; } if ( actionType === "setSkipTransitionsAndAnimations" && storePayload?.value === true ) { - _activeAudioEffect = null; + _activeAudioEffects = []; } const isSceneReplayActive = _systemStore.selectIsSceneReplayActive?.() === true; @@ -1202,6 +1262,8 @@ export default function createRouteEngine(options) { _pendingEnteredLineBgmHandoff = { lineEntryId: lineEntryIdAfterAction, channel: outgoingBgmChannel, + presentation: outgoingBgmPresentation, + resources: outgoingBgmResources, }; } if (actionType === "saveSlot") { @@ -1312,7 +1374,7 @@ export default function createRouteEngine(options) { _renderPersistentAnimationMetadata, ), audioEffectOccurrenceSequence: _audioEffectOccurrenceSequence, - activeAudioEffect: _activeAudioEffect, + activeAudioEffects: _activeAudioEffects, pendingAudioEffectOccurrences: _pendingAudioEffectOccurrences.slice(), pendingEnteredLineBgmHandoff: _pendingEnteredLineBgmHandoff ? structuredClone(_pendingEnteredLineBgmHandoff) @@ -1342,7 +1404,7 @@ export default function createRouteEngine(options) { snapshot.renderPersistentAnimationMetadata, ); _audioEffectOccurrenceSequence = snapshot.audioEffectOccurrenceSequence; - _activeAudioEffect = snapshot.activeAudioEffect; + _activeAudioEffects = snapshot.activeAudioEffects; _pendingAudioEffectOccurrences = snapshot.pendingAudioEffectOccurrences.slice(); _pendingEnteredLineBgmHandoff = snapshot.pendingEnteredLineBgmHandoff @@ -1476,10 +1538,16 @@ export default function createRouteEngine(options) { if (actionType === "bgm") { return runActionBatch(() => { - const previousChannel = payload?.audioEffects + const previousBgm = captureOutgoingBgmPresentation(); + const resolvesAudioEffects = hasBgmAudioEffectSelections(payload); + const previousChannel = resolvesAudioEffects ? captureOutgoingBgmChannel() : null; + const previousResources = resolvesAudioEffects + ? captureOutgoingBgmResources() + : null; dispatchStoreAction(actionType, payload); + const nextBgm = captureCurrentBgmPresentation(); acceptBgmActionOccurrence( payload, { @@ -1487,7 +1555,10 @@ export default function createRouteEngine(options) { actionPath: options.actionPath ?? [actionType], }, previousChannel, - payload?.audioEffects ? captureCurrentBgmChannel() : null, + resolvesAudioEffects ? captureCurrentBgmChannel() : null, + previousBgm, + nextBgm, + previousResources, ); }, options); } @@ -1881,27 +1952,39 @@ export default function createRouteEngine(options) { } let previousBgmChannel = null; - if ( - actionType === "bgm" && - processedPayloadWithActionOptions?.audioEffects - ) { + let previousBgmPresentation = null; + let previousBgmResources = null; + let resolvesBgmAudioEffects = false; + if (actionType === "bgm") { const handoff = options.audioEffectHandoff; - if (handoff?.available) { + const candidatePreviousBgm = handoff?.available + ? handoff.presentation + : captureOutgoingBgmPresentation(); + resolvesBgmAudioEffects = hasBgmAudioEffectSelections( + processedPayloadWithActionOptions, + ); + if (resolvesBgmAudioEffects && handoff?.available) { handoff.available = false; previousBgmChannel = structuredClone(handoff.channel); - } else { + previousBgmPresentation = structuredClone(handoff.presentation); + previousBgmResources = structuredClone(handoff.resources); + } else if (resolvesBgmAudioEffects) { previousBgmChannel = captureOutgoingBgmChannel(); + previousBgmPresentation = candidatePreviousBgm; + previousBgmResources = captureOutgoingBgmResources(); } } dispatchStoreAction(actionType, processedPayloadWithActionOptions); if (actionType === "bgm") { + const nextBgmPresentation = captureCurrentBgmPresentation(); acceptBgmActionOccurrence( processedPayloadWithActionOptions, options, previousBgmChannel, - processedPayloadWithActionOptions?.audioEffects - ? captureCurrentBgmChannel() - : null, + resolvesBgmAudioEffects ? captureCurrentBgmChannel() : null, + previousBgmPresentation, + nextBgmPresentation, + previousBgmResources, ); } }; @@ -1973,7 +2056,10 @@ export default function createRouteEngine(options) { const handleActions = (actions, eventContext, options = {}) => { const batchOptions = { ...options, - executionContext: { depth: 0, pendingNavigation: null }, + executionContext: { + depth: 0, + pendingNavigation: null, + }, randomOutcomeOrdinals: new Map(), }; return runActionBatch( @@ -2030,6 +2116,14 @@ export default function createRouteEngine(options) { _pendingEnteredLineBgmHandoff?.lineEntryId === enteredLineEntryId ? _pendingEnteredLineBgmHandoff : null; + const audioEffectHandoff = enteredLineBgmHandoff + ? { + available: true, + channel: structuredClone(enteredLineBgmHandoff.channel), + presentation: structuredClone(enteredLineBgmHandoff.presentation), + resources: structuredClone(enteredLineBgmHandoff.resources), + } + : null; const rollbackCursor = _systemStore.selectRollbackCursor?.() ?? null; const pendingRollbackLineEntrySaveHandoff = _pendingRollbackLineEntrySaveHandoff; @@ -2053,12 +2147,7 @@ export default function createRouteEngine(options) { dialogueHistoryLineEntry?.reuseExistingOccurrence === true, dialogueHistoryForceNewOccurrence: dialogueHistoryLineEntry?.forceNewOccurrence === true, - audioEffectHandoff: enteredLineBgmHandoff - ? { - available: true, - channel: structuredClone(enteredLineBgmHandoff.channel), - } - : null, + audioEffectHandoff, }); } catch (error) { _pendingRollbackLineEntrySaveHandoff = diff --git a/src/audioIds.js b/src/audioIds.js new file mode 100644 index 00000000..9b39aa91 --- /dev/null +++ b/src/audioIds.js @@ -0,0 +1,5 @@ +export const escapeAudioIdComponent = (component) => + String(component).replaceAll("%", "%25").replaceAll(":", "%3A"); + +export const createAudioRenderId = (...components) => + components.map(escapeAudioIdComponent).join(":"); diff --git a/src/generated/l10nPayloadValidators.js b/src/generated/l10nPayloadValidators.js index 55ed90ab..1155e788 100644 --- a/src/generated/l10nPayloadValidators.js +++ b/src/generated/l10nPayloadValidators.js @@ -1,2 +1,2 @@ // Generated by scripts/generate-l10n-payload-validators.js. Do not edit. -"use strict";export const validateActionBackground = validate21;const schema6 = {"$id":"https://route-engine.runtime/schemas/runtime/action-background.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/background"};const schema20 = {"type":"object","properties":{"resourceId":{"type":"string"},"animationName":{"type":"string"},"animationSpeed":{"type":"number"},"loop":{"type":"boolean"},"colorId":{"type":"string"},"transformId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"anchorX":{"type":"number"},"anchorY":{"type":"number"},"scaleX":{"type":"number"},"scaleY":{"type":"number"},"flipX":{"type":"boolean"},"flipY":{"type":"boolean"},"rotation":{"type":"number"},"originX":{"type":"number"},"originY":{"type":"number"},"alpha":{"type":"number","minimum":0,"maximum":1},"opacity":{"type":"number","minimum":0,"maximum":1},"blur":{"$ref":"#/definitions/backgroundBlur"},"filters":{"$ref":"#/definitions/shaderFilters"},"animations":{"$ref":"#/definitions/animationSelection"}},"additionalProperties":false};const func2 = Object.prototype.hasOwnProperty;const schema8 = {"anyOf":[{"type":"null"},{"type":"object","properties":{"x":{"type":"number","minimum":0},"y":{"type":"number","minimum":0},"quality":{"type":"number","minimum":1},"kernelSize":{"type":"integer","enum":[5,7,9,11,13,15]},"repeatEdgePixels":{"type":"boolean"}},"required":["x","y"],"additionalProperties":false}]};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(data !== null){const err0 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.x === undefined){const err1 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: "x"},message:"must have required property '"+"x"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.y === undefined){const err2 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: "y"},message:"must have required property '"+"y"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((((key0 === "x") || (key0 === "y")) || (key0 === "quality")) || (key0 === "kernelSize")) || (key0 === "repeatEdgePixels"))){const err3 = {instancePath,schemaPath:"#/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.x !== undefined){let data0 = data.x;if(typeof data0 == "number"){if(data0 < 0 || isNaN(data0)){const err4 = {instancePath:instancePath+"/x",schemaPath:"#/anyOf/1/properties/x/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+"/x",schemaPath:"#/anyOf/1/properties/x/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.y !== undefined){let data1 = data.y;if(typeof data1 == "number"){if(data1 < 0 || isNaN(data1)){const err6 = {instancePath:instancePath+"/y",schemaPath:"#/anyOf/1/properties/y/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+"/y",schemaPath:"#/anyOf/1/properties/y/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.quality !== undefined){let data2 = data.quality;if(typeof data2 == "number"){if(data2 < 1 || isNaN(data2)){const err8 = {instancePath:instancePath+"/quality",schemaPath:"#/anyOf/1/properties/quality/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/quality",schemaPath:"#/anyOf/1/properties/quality/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.kernelSize !== undefined){let data3 = data.kernelSize;if(!((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3)))){const err10 = {instancePath:instancePath+"/kernelSize",schemaPath:"#/anyOf/1/properties/kernelSize/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(!((((((data3 === 5) || (data3 === 7)) || (data3 === 9)) || (data3 === 11)) || (data3 === 13)) || (data3 === 15))){const err11 = {instancePath:instancePath+"/kernelSize",schemaPath:"#/anyOf/1/properties/kernelSize/enum",keyword:"enum",params:{allowedValues: schema8.anyOf[1].properties.kernelSize.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.repeatEdgePixels !== undefined){if(typeof data.repeatEdgePixels !== "boolean"){const err12 = {instancePath:instancePath+"/repeatEdgePixels",schemaPath:"#/anyOf/1/properties/repeatEdgePixels/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs3 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate23.errors = vErrors;return errors === 0;}const schema11 = {"type":"array","items":{"$ref":"#/definitions/shaderFilter"}};const schema12 = {"type":"object","required":["id","type"],"properties":{"id":{"type":"string","minLength":1},"type":{"const":"shader"}},"additionalProperties":true};const func4 = require("ajv/dist/runtime/ucs2length").default;function validate31(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(func4(data0) < 1){const err2 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.type !== undefined){if("shader" !== data.type){const err4 = {instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "shader"},message:"must be equal to constant"};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++;}validate31.errors = vErrors;return errors === 0;}function validate30(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+"/speed",schemaPath:"#/properties/speed/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.loop !== undefined){if(typeof data.loop !== "boolean"){const err5 = {instancePath:instancePath+"/loop",schemaPath:"#/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}validate26.errors = vErrors;return errors === 0;}function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.resourceId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "resourceId"},message:"must have required property '"+"resourceId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === "resourceId") || (key0 === "playback"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.resourceId !== undefined){if(typeof data.resourceId !== "string"){const err2 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.playback !== undefined){if(!(validate26(data.playback, {instancePath:instancePath+"/playback",parentData:data,parentDataProperty:"playback",rootData}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}}else {const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}validate25.errors = vErrors;return errors === 0;}function validate63(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(func2.call(schema20.properties, key0))){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.resourceId !== undefined){if(typeof data.resourceId !== "string"){const err1 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.animationName !== undefined){if(typeof data.animationName !== "string"){const err2 = {instancePath:instancePath+"/animationName",schemaPath:"#/properties/animationName/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.animationSpeed !== undefined){if(!(typeof data.animationSpeed == "number")){const err3 = {instancePath:instancePath+"/animationSpeed",schemaPath:"#/properties/animationSpeed/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.loop !== undefined){if(typeof data.loop !== "boolean"){const err4 = {instancePath:instancePath+"/loop",schemaPath:"#/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.colorId !== undefined){if(typeof data.colorId !== "string"){const err5 = {instancePath:instancePath+"/colorId",schemaPath:"#/properties/colorId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.transformId !== undefined){if(typeof data.transformId !== "string"){const err6 = {instancePath:instancePath+"/transformId",schemaPath:"#/properties/transformId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.x !== undefined){if(!(typeof data.x == "number")){const err7 = {instancePath:instancePath+"/x",schemaPath:"#/properties/x/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.y !== undefined){if(!(typeof data.y == "number")){const err8 = {instancePath:instancePath+"/y",schemaPath:"#/properties/y/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.anchorX !== undefined){if(!(typeof data.anchorX == "number")){const err9 = {instancePath:instancePath+"/anchorX",schemaPath:"#/properties/anchorX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.anchorY !== undefined){if(!(typeof data.anchorY == "number")){const err10 = {instancePath:instancePath+"/anchorY",schemaPath:"#/properties/anchorY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.scaleX !== undefined){if(!(typeof data.scaleX == "number")){const err11 = {instancePath:instancePath+"/scaleX",schemaPath:"#/properties/scaleX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.scaleY !== undefined){if(!(typeof data.scaleY == "number")){const err12 = {instancePath:instancePath+"/scaleY",schemaPath:"#/properties/scaleY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.flipX !== undefined){if(typeof data.flipX !== "boolean"){const err13 = {instancePath:instancePath+"/flipX",schemaPath:"#/properties/flipX/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.flipY !== undefined){if(typeof data.flipY !== "boolean"){const err14 = {instancePath:instancePath+"/flipY",schemaPath:"#/properties/flipY/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.rotation !== undefined){if(!(typeof data.rotation == "number")){const err15 = {instancePath:instancePath+"/rotation",schemaPath:"#/properties/rotation/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.originX !== undefined){if(!(typeof data.originX == "number")){const err16 = {instancePath:instancePath+"/originX",schemaPath:"#/properties/originX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.originY !== undefined){if(!(typeof data.originY == "number")){const err17 = {instancePath:instancePath+"/originY",schemaPath:"#/properties/originY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.alpha !== undefined){let data17 = data.alpha;if(typeof data17 == "number"){if(data17 > 1 || isNaN(data17)){const err18 = {instancePath:instancePath+"/alpha",schemaPath:"#/properties/alpha/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data17 < 0 || isNaN(data17)){const err19 = {instancePath:instancePath+"/alpha",schemaPath:"#/properties/alpha/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/alpha",schemaPath:"#/properties/alpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.opacity !== undefined){let data18 = data.opacity;if(typeof data18 == "number"){if(data18 > 1 || isNaN(data18)){const err21 = {instancePath:instancePath+"/opacity",schemaPath:"#/properties/opacity/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(data18 < 0 || isNaN(data18)){const err22 = {instancePath:instancePath+"/opacity",schemaPath:"#/properties/opacity/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/opacity",schemaPath:"#/properties/opacity/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.blur !== undefined){if(!(validate23(data.blur, {instancePath:instancePath+"/blur",parentData:data,parentDataProperty:"blur",rootData}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}}if(data.filters !== undefined){if(!(validate30(data.filters, {instancePath:instancePath+"/filters",parentData:data,parentDataProperty:"filters",rootData}))){vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);errors = vErrors.length;}}if(data.animations !== undefined){if(!(validate25(data.animations, {instancePath:instancePath+"/animations",parentData:data,parentDataProperty:"animations",rootData}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}else {const err24 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}validate63.errors = vErrors;return errors === 0;}function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-background.json" */;let vErrors = null;let errors = 0;if(!(validate63(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate63.errors : vErrors.concat(validate63.errors);errors = vErrors.length;}validate21.errors = vErrors;return errors === 0;}export const validateActionBgm = validate68;const schema21 = {"$id":"https://route-engine.runtime/schemas/runtime/action-bgm.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/bgm"};const schema22 = {"type":"object","properties":{"sounds":{"type":"array","items":{"$ref":"#/definitions/audioSound"}},"resourceId":{"type":"string"},"loop":{"type":"boolean"},"interruption":{"type":"string","enum":["immediate","loopEnd"]},"volume":{"type":"number","minimum":0,"maximum":100},"muted":{"type":"boolean"},"pan":{"type":"number","minimum":-1,"maximum":1},"startDelayMs":{"type":"number","minimum":0},"audioEffects":{"$ref":"#/definitions/audioEffectSelection"}},"allOf":[{"not":{"required":["resourceId","sounds"]}},{"not":{"required":["startDelayMs","sounds"]}},{"if":{"required":["audioEffects"]},"then":{"required":["sounds"]}}],"additionalProperties":false};const schema17 = {"type":"object","properties":{"id":{"type":"string","minLength":1},"resourceId":{"type":"string","minLength":1},"loop":{"type":"boolean"},"volume":{"type":"number","minimum":0,"maximum":100},"muted":{"type":"boolean"},"pan":{"type":"number","minimum":-1,"maximum":1},"startDelayMs":{"type":"number","minimum":0},"playbackRate":{"type":"number","minimum":0},"startAt":{"type":"number","minimum":0},"endAt":{"type":["number","null"],"minimum":0}},"required":["id","resourceId"],"additionalProperties":false};function validate53(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.resourceId === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "resourceId"},message:"must have required property '"+"resourceId"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(func2.call(schema17.properties, key0))){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.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(func4(data0) < 1){const err3 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.resourceId !== undefined){let data1 = data.resourceId;if(typeof data1 === "string"){if(func4(data1) < 1){const err5 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.loop !== undefined){if(typeof data.loop !== "boolean"){const err7 = {instancePath:instancePath+"/loop",schemaPath:"#/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.volume !== undefined){let data3 = data.volume;if(typeof data3 == "number"){if(data3 > 100 || isNaN(data3)){const err8 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data3 < 0 || isNaN(data3)){const err9 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.muted !== undefined){if(typeof data.muted !== "boolean"){const err11 = {instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.pan !== undefined){let data5 = data.pan;if(typeof data5 == "number"){if(data5 > 1 || isNaN(data5)){const err12 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data5 < -1 || isNaN(data5)){const err13 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}else {const err14 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.startDelayMs !== undefined){let data6 = data.startDelayMs;if(typeof data6 == "number"){if(data6 < 0 || isNaN(data6)){const err15 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}else {const err16 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.playbackRate !== undefined){let data7 = data.playbackRate;if(typeof data7 == "number"){if(data7 < 0 || isNaN(data7)){const err17 = {instancePath:instancePath+"/playbackRate",schemaPath:"#/properties/playbackRate/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}else {const err18 = {instancePath:instancePath+"/playbackRate",schemaPath:"#/properties/playbackRate/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.startAt !== undefined){let data8 = data.startAt;if(typeof data8 == "number"){if(data8 < 0 || isNaN(data8)){const err19 = {instancePath:instancePath+"/startAt",schemaPath:"#/properties/startAt/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/startAt",schemaPath:"#/properties/startAt/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.endAt !== undefined){let data9 = data.endAt;if((!(typeof data9 == "number")) && (data9 !== null)){const err21 = {instancePath:instancePath+"/endAt",schemaPath:"#/properties/endAt/type",keyword:"type",params:{type: schema17.properties.endAt.type},message:"must be number,null"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(typeof data9 == "number"){if(data9 < 0 || isNaN(data9)){const err22 = {instancePath:instancePath+"/endAt",schemaPath:"#/properties/endAt/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}}else {const err23 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}validate53.errors = vErrors;return errors === 0;}const schema18 = {"type":"object","properties":{"resourceId":{"type":"string","minLength":1},"playback":{"$ref":"#/definitions/audioEffectPlayback"}},"required":["resourceId"],"additionalProperties":false};const schema19 = {"type":"object","properties":{"speed":{"type":"number","exclusiveMinimum":0}},"additionalProperties":false};function validate58(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(key0 === "speed")){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.speed !== undefined){let data0 = data.speed;if(typeof data0 == "number"){if(data0 <= 0 || isNaN(data0)){const err1 = {instancePath:instancePath+"/speed",schemaPath:"#/properties/speed/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}else {const err2 = {instancePath:instancePath+"/speed",schemaPath:"#/properties/speed/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}else {const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}validate58.errors = vErrors;return errors === 0;}function validate57(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.resourceId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "resourceId"},message:"must have required property '"+"resourceId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === "resourceId") || (key0 === "playback"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.resourceId !== undefined){let data0 = data.resourceId;if(typeof data0 === "string"){if(func4(data0) < 1){const err2 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.playback !== undefined){if(!(validate58(data.playback, {instancePath:instancePath+"/playback",parentData:data,parentDataProperty:"playback",rootData}))){vErrors = vErrors === null ? validate58.errors : vErrors.concat(validate58.errors);errors = vErrors.length;}}}else {const err4 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}validate57.errors = vErrors;return errors === 0;}function validate69(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs2 = errors;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.resourceId === undefined) && (missing0 = "resourceId")) || ((data.sounds === undefined) && (missing0 = "sounds"))){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var valid1 = _errs3 === errors;if(valid1){const err1 = {instancePath,schemaPath:"#/allOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}}const _errs5 = errors;const _errs6 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if(((data.startDelayMs === undefined) && (missing1 = "startDelayMs")) || ((data.sounds === undefined) && (missing1 = "sounds"))){const err2 = {};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var valid2 = _errs6 === errors;if(valid2){const err3 = {instancePath,schemaPath:"#/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {errors = _errs5;if(vErrors !== null){if(_errs5){vErrors.length = _errs5;}else {vErrors = null;}}}const _errs8 = errors;let valid3 = true;const _errs9 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((data.audioEffects === undefined) && (missing2 = "audioEffects")){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var _valid0 = _errs9 === errors;errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}if(_valid0){const _errs10 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.sounds === undefined){const err5 = {instancePath,schemaPath:"#/allOf/2/then/required",keyword:"required",params:{missingProperty: "sounds"},message:"must have required property '"+"sounds"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs10 === errors;valid3 = _valid0;}if(!valid3){const err6 = {instancePath,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(func2.call(schema22.properties, key0))){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.sounds !== undefined){let data0 = data.sounds;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0 100 || isNaN(data5)){const err13 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data5 < 0 || isNaN(data5)){const err14 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.muted !== undefined){if(typeof data.muted !== "boolean"){const err16 = {instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.pan !== undefined){let data7 = data.pan;if(typeof data7 == "number"){if(data7 > 1 || isNaN(data7)){const err17 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data7 < -1 || isNaN(data7)){const err18 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}else {const err19 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.startDelayMs !== undefined){let data8 = data.startDelayMs;if(typeof data8 == "number"){if(data8 < 0 || isNaN(data8)){const err20 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.audioEffects !== undefined){if(!(validate57(data.audioEffects, {instancePath:instancePath+"/audioEffects",parentData:data,parentDataProperty:"audioEffects",rootData}))){vErrors = vErrors === null ? validate57.errors : vErrors.concat(validate57.errors);errors = vErrors.length;}}}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++;}validate69.errors = vErrors;return errors === 0;}function validate68(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-bgm.json" */;let vErrors = null;let errors = 0;if(!(validate69(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate69.errors : vErrors.concat(validate69.errors);errors = vErrors.length;}validate68.errors = vErrors;return errors === 0;}export const validateActionCharacter = validate73;const schema23 = {"$id":"https://route-engine.runtime/schemas/runtime/action-character.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/character"};const schema24 = {"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"transformId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"anchorX":{"type":"number"},"anchorY":{"type":"number"},"scaleX":{"type":"number"},"scaleY":{"type":"number"},"flipX":{"type":"boolean"},"flipY":{"type":"boolean"},"rotation":{"type":"number"},"originX":{"type":"number"},"originY":{"type":"number"},"alpha":{"type":"number","minimum":0,"maximum":1},"opacity":{"type":"number","minimum":0,"maximum":1},"blur":{"$ref":"#/definitions/backgroundBlur"},"filters":{"$ref":"#/definitions/shaderFilters"},"sprites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string"},"animationName":{"type":"string"},"animationSpeed":{"type":"number"},"loop":{"type":"boolean"}},"additionalProperties":false}},"animations":{"$ref":"#/definitions/animationSelection"}},"required":["id"],"allOf":[{"if":{"required":["sprites"]},"then":{"required":["transformId"]}}],"additionalProperties":false}}},"additionalProperties":false};function validate74(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(key0 === "items")){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.items !== undefined){let data0 = data.items;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0 1 || isNaN(data15)){const err19 = {instancePath:instancePath+"/items/" + i0+"/alpha",schemaPath:"#/properties/items/items/properties/alpha/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(data15 < 0 || isNaN(data15)){const err20 = {instancePath:instancePath+"/items/" + i0+"/alpha",schemaPath:"#/properties/items/items/properties/alpha/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/items/" + i0+"/alpha",schemaPath:"#/properties/items/items/properties/alpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data1.opacity !== undefined){let data16 = data1.opacity;if(typeof data16 == "number"){if(data16 > 1 || isNaN(data16)){const err22 = {instancePath:instancePath+"/items/" + i0+"/opacity",schemaPath:"#/properties/items/items/properties/opacity/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}if(data16 < 0 || isNaN(data16)){const err23 = {instancePath:instancePath+"/items/" + i0+"/opacity",schemaPath:"#/properties/items/items/properties/opacity/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}else {const err24 = {instancePath:instancePath+"/items/" + i0+"/opacity",schemaPath:"#/properties/items/items/properties/opacity/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data1.blur !== undefined){if(!(validate23(data1.blur, {instancePath:instancePath+"/items/" + i0+"/blur",parentData:data1,parentDataProperty:"blur",rootData}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}}if(data1.filters !== undefined){if(!(validate30(data1.filters, {instancePath:instancePath+"/items/" + i0+"/filters",parentData:data1,parentDataProperty:"filters",rootData}))){vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);errors = vErrors.length;}}if(data1.sprites !== undefined){let data19 = data1.sprites;if(Array.isArray(data19)){const len1 = data19.length;for(let i1=0; i1=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}}else {const err12 = {instancePath:instancePath+"/fields/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/fields/additionalProperties/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/fields",schemaPath:"#/properties/fields/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.submitActions !== undefined){let data10 = data.submitActions;if(!(data10 && typeof data10 == "object" && !Array.isArray(data10))){const err14 = {instancePath:instancePath+"/submitActions",schemaPath:"#/properties/submitActions/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.cancelActions !== undefined){let data11 = data.cancelActions;if(!(data11 && typeof data11 == "object" && !Array.isArray(data11))){const err15 = {instancePath:instancePath+"/cancelActions",schemaPath:"#/properties/cancelActions/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.animations !== undefined){if(!(validate25(data.animations, {instancePath:instancePath+"/animations",parentData:data,parentDataProperty:"animations",rootData}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}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++;}validate95.errors = vErrors;return errors === 0;}function validate94(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-form.json" */;let vErrors = null;let errors = 0;if(!(validate95(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate95.errors : vErrors.concat(validate95.errors);errors = vErrors.length;}validate94.errors = vErrors;return errors === 0;}export const validateActionLayout = validate98;const schema35 = {"$id":"https://route-engine.runtime/schemas/runtime/action-layout.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/layout"};const schema36 = {"type":"object","properties":{"resourceId":{"type":"string"},"animations":{"$ref":"#/definitions/animationSelection"}},"additionalProperties":false};function validate99(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!((key0 === "resourceId") || (key0 === "animations"))){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.resourceId !== undefined){if(typeof data.resourceId !== "string"){const err1 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.animations !== undefined){if(!(validate25(data.animations, {instancePath:instancePath+"/animations",parentData:data,parentDataProperty:"animations",rootData}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}else {const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}validate99.errors = vErrors;return errors === 0;}function validate98(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-layout.json" */;let vErrors = null;let errors = 0;if(!(validate99(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate99.errors : vErrors.concat(validate99.errors);errors = vErrors.length;}validate98.errors = vErrors;return errors === 0;}export const validateActionScreen = validate102;const schema37 = {"$id":"https://route-engine.runtime/schemas/runtime/action-screen.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/screen"};const schema38 = {"type":"object","properties":{"alpha":{"type":"number","minimum":0,"maximum":1},"opacity":{"type":"number","minimum":0,"maximum":1},"blur":{"$ref":"#/definitions/backgroundBlur"},"animations":{"$ref":"#/definitions/animationSelection"}},"additionalProperties":false};function validate103(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!((((key0 === "alpha") || (key0 === "opacity")) || (key0 === "blur")) || (key0 === "animations"))){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.alpha !== undefined){let data0 = data.alpha;if(typeof data0 == "number"){if(data0 > 1 || isNaN(data0)){const err1 = {instancePath:instancePath+"/alpha",schemaPath:"#/properties/alpha/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0 < 0 || isNaN(data0)){const err2 = {instancePath:instancePath+"/alpha",schemaPath:"#/properties/alpha/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+"/alpha",schemaPath:"#/properties/alpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.opacity !== undefined){let data1 = data.opacity;if(typeof data1 == "number"){if(data1 > 1 || isNaN(data1)){const err4 = {instancePath:instancePath+"/opacity",schemaPath:"#/properties/opacity/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data1 < 0 || isNaN(data1)){const err5 = {instancePath:instancePath+"/opacity",schemaPath:"#/properties/opacity/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/opacity",schemaPath:"#/properties/opacity/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.blur !== undefined){if(!(validate23(data.blur, {instancePath:instancePath+"/blur",parentData:data,parentDataProperty:"blur",rootData}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}}if(data.animations !== undefined){if(!(validate25(data.animations, {instancePath:instancePath+"/animations",parentData:data,parentDataProperty:"animations",rootData}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}else {const err7 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate103.errors = vErrors;return errors === 0;}function validate102(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-screen.json" */;let vErrors = null;let errors = 0;if(!(validate103(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate103.errors : vErrors.concat(validate103.errors);errors = vErrors.length;}validate102.errors = vErrors;return errors === 0;}export const validateActionSfx = validate107;const schema39 = {"$id":"https://route-engine.runtime/schemas/runtime/action-sfx.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/sfx"};const schema40 = {"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/definitions/audioSound"}},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"volume":{"type":"number","minimum":0,"maximum":100},"muted":{"type":"boolean"},"pan":{"type":"number","minimum":-1,"maximum":1},"loop":{"type":"boolean"},"interruption":{"type":"string","enum":["immediate","loopEnd"]},"applyMode":{"type":"string","enum":["singleLine","persistent"]},"sounds":{"type":"array","items":{"$ref":"#/definitions/audioSound"}}},"required":["id","sounds"],"additionalProperties":false}}},"allOf":[{"not":{"required":["items","channels"]}}],"additionalProperties":false};function validate108(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs2 = errors;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.items === undefined) && (missing0 = "items")) || ((data.channels === undefined) && (missing0 = "channels"))){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var valid1 = _errs3 === errors;if(valid1){const err1 = {instancePath,schemaPath:"#/allOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}}if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!((key0 === "items") || (key0 === "channels"))){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.items !== undefined){let data0 = data.items;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0 100 || isNaN(data5)){const err9 = {instancePath:instancePath+"/channels/" + i1+"/volume",schemaPath:"#/properties/channels/items/properties/volume/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data5 < 0 || isNaN(data5)){const err10 = {instancePath:instancePath+"/channels/" + i1+"/volume",schemaPath:"#/properties/channels/items/properties/volume/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/channels/" + i1+"/volume",schemaPath:"#/properties/channels/items/properties/volume/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data3.muted !== undefined){if(typeof data3.muted !== "boolean"){const err12 = {instancePath:instancePath+"/channels/" + i1+"/muted",schemaPath:"#/properties/channels/items/properties/muted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data3.pan !== undefined){let data7 = data3.pan;if(typeof data7 == "number"){if(data7 > 1 || isNaN(data7)){const err13 = {instancePath:instancePath+"/channels/" + i1+"/pan",schemaPath:"#/properties/channels/items/properties/pan/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data7 < -1 || isNaN(data7)){const err14 = {instancePath:instancePath+"/channels/" + i1+"/pan",schemaPath:"#/properties/channels/items/properties/pan/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/channels/" + i1+"/pan",schemaPath:"#/properties/channels/items/properties/pan/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data3.loop !== undefined){if(typeof data3.loop !== "boolean"){const err16 = {instancePath:instancePath+"/channels/" + i1+"/loop",schemaPath:"#/properties/channels/items/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data3.interruption !== undefined){let data9 = data3.interruption;if(typeof data9 !== "string"){const err17 = {instancePath:instancePath+"/channels/" + i1+"/interruption",schemaPath:"#/properties/channels/items/properties/interruption/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(!((data9 === "immediate") || (data9 === "loopEnd"))){const err18 = {instancePath:instancePath+"/channels/" + i1+"/interruption",schemaPath:"#/properties/channels/items/properties/interruption/enum",keyword:"enum",params:{allowedValues: schema40.properties.channels.items.properties.interruption.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data3.applyMode !== undefined){let data10 = data3.applyMode;if(typeof data10 !== "string"){const err19 = {instancePath:instancePath+"/channels/" + i1+"/applyMode",schemaPath:"#/properties/channels/items/properties/applyMode/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(!((data10 === "singleLine") || (data10 === "persistent"))){const err20 = {instancePath:instancePath+"/channels/" + i1+"/applyMode",schemaPath:"#/properties/channels/items/properties/applyMode/enum",keyword:"enum",params:{allowedValues: schema40.properties.channels.items.properties.applyMode.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data3.sounds !== undefined){let data11 = data3.sounds;if(Array.isArray(data11)){const len2 = data11.length;for(let i2=0; i2 1 || isNaN(data22)){const err29 = {instancePath:instancePath+"/items/" + i0+"/alpha",schemaPath:"#/properties/items/items/properties/alpha/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if(data22 < 0 || isNaN(data22)){const err30 = {instancePath:instancePath+"/items/" + i0+"/alpha",schemaPath:"#/properties/items/items/properties/alpha/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}else {const err31 = {instancePath:instancePath+"/items/" + i0+"/alpha",schemaPath:"#/properties/items/items/properties/alpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}if(data1.opacity !== undefined){let data23 = data1.opacity;if(typeof data23 == "number"){if(data23 > 1 || isNaN(data23)){const err32 = {instancePath:instancePath+"/items/" + i0+"/opacity",schemaPath:"#/properties/items/items/properties/opacity/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}if(data23 < 0 || isNaN(data23)){const err33 = {instancePath:instancePath+"/items/" + i0+"/opacity",schemaPath:"#/properties/items/items/properties/opacity/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}else {const err34 = {instancePath:instancePath+"/items/" + i0+"/opacity",schemaPath:"#/properties/items/items/properties/opacity/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data1.blur !== undefined){if(!(validate23(data1.blur, {instancePath:instancePath+"/items/" + i0+"/blur",parentData:data1,parentDataProperty:"blur",rootData}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}}if(data1.filters !== undefined){if(!(validate30(data1.filters, {instancePath:instancePath+"/items/" + i0+"/filters",parentData:data1,parentDataProperty:"filters",rootData}))){vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);errors = vErrors.length;}}if(data1.animations !== undefined){if(!(validate25(data1.animations, {instancePath:instancePath+"/items/" + i0+"/animations",parentData:data1,parentDataProperty:"animations",rootData}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}else {const err35 = {instancePath:instancePath+"/items/" + i0,schemaPath:"#/properties/items/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}else {const err36 = {instancePath:instancePath+"/items",schemaPath:"#/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}validate113.errors = vErrors;return errors === 0;}function validate112(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-visual.json" */;let vErrors = null;let errors = 0;if(!(validate113(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate113.errors : vErrors.concat(validate113.errors);errors = vErrors.length;}validate112.errors = vErrors;return errors === 0;}export const validateActionVoice = validate121;const schema43 = {"$id":"https://route-engine.runtime/schemas/runtime/action-voice.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/voice"};const schema44 = {"type":"object","properties":{"sounds":{"type":"array","items":{"$ref":"#/definitions/audioSound"}},"resourceId":{"type":"string"},"volume":{"type":"number","minimum":0,"maximum":100},"muted":{"type":"boolean"},"pan":{"type":"number","minimum":-1,"maximum":1},"loop":{"type":"boolean"},"interruption":{"type":"string","enum":["immediate","loopEnd"]},"startDelayMs":{"type":"number","minimum":0}},"anyOf":[{"required":["resourceId"]},{"required":["sounds"]}],"allOf":[{"not":{"required":["resourceId","sounds"]}},{"not":{"required":["startDelayMs","sounds"]}}],"additionalProperties":false};function validate122(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs1 = errors;let valid0 = false;const _errs2 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.resourceId === undefined){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: "resourceId"},message:"must have required property '"+"resourceId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var _valid0 = _errs2 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.sounds === undefined){const err1 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: "sounds"},message:"must have required property '"+"sounds"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}var _valid0 = _errs3 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err2 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}const _errs5 = errors;const _errs6 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.resourceId === undefined) && (missing0 = "resourceId")) || ((data.sounds === undefined) && (missing0 = "sounds"))){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var valid2 = _errs6 === errors;if(valid2){const err4 = {instancePath,schemaPath:"#/allOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs5;if(vErrors !== null){if(_errs5){vErrors.length = _errs5;}else {vErrors = null;}}}const _errs8 = errors;const _errs9 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if(((data.startDelayMs === undefined) && (missing1 = "startDelayMs")) || ((data.sounds === undefined) && (missing1 = "sounds"))){const err5 = {};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var valid3 = _errs9 === errors;if(valid3){const err6 = {instancePath,schemaPath:"#/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!((((((((key0 === "sounds") || (key0 === "resourceId")) || (key0 === "volume")) || (key0 === "muted")) || (key0 === "pan")) || (key0 === "loop")) || (key0 === "interruption")) || (key0 === "startDelayMs"))){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.sounds !== undefined){let data0 = data.sounds;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0 100 || isNaN(data3)){const err10 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data3 < 0 || isNaN(data3)){const err11 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.muted !== undefined){if(typeof data.muted !== "boolean"){const err13 = {instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.pan !== undefined){let data5 = data.pan;if(typeof data5 == "number"){if(data5 > 1 || isNaN(data5)){const err14 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(data5 < -1 || isNaN(data5)){const err15 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}else {const err16 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.loop !== undefined){if(typeof data.loop !== "boolean"){const err17 = {instancePath:instancePath+"/loop",schemaPath:"#/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.interruption !== undefined){let data7 = data.interruption;if(typeof data7 !== "string"){const err18 = {instancePath:instancePath+"/interruption",schemaPath:"#/properties/interruption/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(!((data7 === "immediate") || (data7 === "loopEnd"))){const err19 = {instancePath:instancePath+"/interruption",schemaPath:"#/properties/interruption/enum",keyword:"enum",params:{allowedValues: schema44.properties.interruption.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.startDelayMs !== undefined){let data8 = data.startDelayMs;if(typeof data8 == "number"){if(data8 < 0 || isNaN(data8)){const err20 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/type",keyword:"type",params:{type: "number"},message:"must be number"};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++;}validate122.errors = vErrors;return errors === 0;}function validate121(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-voice.json" */;let vErrors = null;let errors = 0;if(!(validate122(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate122.errors : vErrors.concat(validate122.errors);errors = vErrors.length;}validate121.errors = vErrors;return errors === 0;}export const validateResourceAchievement = validate125;const schema45 = {"$id":"https://route-engine.runtime/schemas/runtime/resource-achievement.json","$ref":"https://route-engine.runtime/schemas/projectData/resources.yaml#/properties/achievements/patternProperties/^.+$"};const schema89 = {"type":"object","properties":{"type":{"type":"string","enum":["boolean","number"]},"target":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"lockedName":{"type":"string","minLength":1},"lockedDescription":{"type":"string","minLength":1},"hidden":{"type":"boolean"}},"required":["type","name","description"],"allOf":[{"if":{"properties":{"type":{"const":"number"}}},"then":{"required":["target"]}},{"if":{"properties":{"type":{"const":"boolean"}}},"then":{"not":{"required":["target"]}}}],"additionalProperties":false};function validate264(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.type !== undefined){if("number" !== data.type){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.target === undefined){const err1 = {instancePath,schemaPath:"#/allOf/0/then/required",keyword:"required",params:{missingProperty: "target"},message:"must have required property '"+"target"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}var _valid0 = _errs5 === errors;valid1 = _valid0;}if(!valid1){const err2 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}const _errs7 = errors;let valid3 = true;const _errs8 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.type !== undefined){if("boolean" !== data.type){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}var _valid1 = _errs8 === errors;errors = _errs7;if(vErrors !== null){if(_errs7){vErrors.length = _errs7;}else {vErrors = null;}}if(_valid1){const _errs10 = errors;const _errs11 = errors;const _errs12 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.target === undefined) && (missing0 = "target")){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var valid5 = _errs12 === errors;if(valid5){const err5 = {instancePath,schemaPath:"#/allOf/1/then/not",keyword:"not",params:{},message:"must NOT be valid"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs11;if(vErrors !== null){if(_errs11){vErrors.length = _errs11;}else {vErrors = null;}}}var _valid1 = _errs10 === errors;valid3 = _valid1;}if(!valid3){const err6 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.type === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.name === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.description === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "description"},message:"must have required property '"+"description"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key0 in data){if(!(((((((key0 === "type") || (key0 === "target")) || (key0 === "name")) || (key0 === "description")) || (key0 === "lockedName")) || (key0 === "lockedDescription")) || (key0 === "hidden"))){const err10 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.type !== undefined){let data2 = data.type;if(typeof data2 !== "string"){const err11 = {instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(!((data2 === "boolean") || (data2 === "number"))){const err12 = {instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues: schema89.properties.type.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.target !== undefined){let data3 = data.target;if(!((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3)))){const err13 = {instancePath:instancePath+"/target",schemaPath:"#/properties/target/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(typeof data3 == "number"){if(data3 < 1 || isNaN(data3)){const err14 = {instancePath:instancePath+"/target",schemaPath:"#/properties/target/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}if(data.name !== undefined){let data4 = data.name;if(typeof data4 === "string"){if(func4(data4) < 1){const err15 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}else {const err16 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.description !== undefined){let data5 = data.description;if(typeof data5 === "string"){if(func4(data5) < 1){const err17 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}else {const err18 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.lockedName !== undefined){let data6 = data.lockedName;if(typeof data6 === "string"){if(func4(data6) < 1){const err19 = {instancePath:instancePath+"/lockedName",schemaPath:"#/properties/lockedName/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/lockedName",schemaPath:"#/properties/lockedName/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.lockedDescription !== undefined){let data7 = data.lockedDescription;if(typeof data7 === "string"){if(func4(data7) < 1){const err21 = {instancePath:instancePath+"/lockedDescription",schemaPath:"#/properties/lockedDescription/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}else {const err22 = {instancePath:instancePath+"/lockedDescription",schemaPath:"#/properties/lockedDescription/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.hidden !== undefined){if(typeof data.hidden !== "boolean"){const err23 = {instancePath:instancePath+"/hidden",schemaPath:"#/properties/hidden/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}else {const err24 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}validate264.errors = vErrors;return errors === 0;}function validate125(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/resource-achievement.json" */;let vErrors = null;let errors = 0;if(!(validate264(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate264.errors : vErrors.concat(validate264.errors);errors = vErrors.length;}validate125.errors = vErrors;return errors === 0;}export const validateResourceAnimation = validate266;const schema90 = {"$id":"https://route-engine.runtime/schemas/runtime/resource-animation.json","$ref":"https://route-engine.runtime/schemas/projectData/resources.yaml#/properties/animations/patternProperties/^.+$"};const schema47 = {"type":"object","required":["type"],"$defs":{"keyframe":{"type":"object","required":["value","duration"],"properties":{"value":{"type":"number"},"duration":{"type":"number"},"easing":{"type":"string","enum":["linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","easeOutSine","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInBack","easeOutBack","easeInOutBack","easeInBounce","easeOutBounce","easeInOutBounce","easeInElastic","easeOutElastic","easeInOutElastic"]},"relative":{"type":"boolean"}},"additionalProperties":false},"tweenProperty":{"type":"object","properties":{"initialValue":{"type":"number"},"keyframes":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/keyframe"}}},"required":["keyframes"],"additionalProperties":false},"updateTween":{"type":"object","properties":{"alpha":{"$ref":"#/$defs/tweenProperty"},"x":{"$ref":"#/$defs/tweenProperty"},"y":{"$ref":"#/$defs/tweenProperty"},"scaleX":{"$ref":"#/$defs/tweenProperty"},"scaleY":{"$ref":"#/$defs/tweenProperty"},"rotation":{"$ref":"#/$defs/tweenProperty"}},"additionalProperties":false,"minProperties":1},"transitionTween":{"type":"object","properties":{"translateX":{"$ref":"#/$defs/tweenProperty"},"translateY":{"$ref":"#/$defs/tweenProperty"},"alpha":{"$ref":"#/$defs/tweenProperty"},"scaleX":{"$ref":"#/$defs/tweenProperty"},"scaleY":{"$ref":"#/$defs/tweenProperty"},"rotation":{"$ref":"#/$defs/tweenProperty"}},"additionalProperties":false,"minProperties":1},"transitionSide":{"type":"object","required":["tween"],"properties":{"tween":{"$ref":"#/$defs/transitionTween"}},"additionalProperties":false},"maskProgress":{"$ref":"#/$defs/tweenProperty"},"compositeMaskItem":{"type":"object","required":["texture"],"properties":{"texture":{"type":"string"},"channel":{"type":"string","enum":["red","green","blue","alpha"]},"invert":{"type":"boolean"}},"additionalProperties":false},"mask":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["single","sequence","composite"]},"texture":{"type":"string"},"textures":{"type":"array","minItems":1,"items":{"type":"string"}},"items":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/compositeMaskItem"}},"combine":{"type":"string","enum":["max","min","multiply","add"]},"channel":{"type":"string","enum":["red","green","blue","alpha"]},"softness":{"type":"number"},"invert":{"type":"boolean"},"sample":{"type":"string"},"progress":{"$ref":"#/$defs/maskProgress"}},"additionalProperties":false,"allOf":[{"if":{"properties":{"kind":{"const":"single"}}},"then":{"required":["texture"]}},{"if":{"properties":{"kind":{"const":"sequence"}}},"then":{"required":["textures"]}},{"if":{"properties":{"kind":{"const":"composite"}}},"then":{"required":["items"]}}]}},"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["update","transition"]},"complete":{"type":"object","properties":{"payload":{"type":"object"}},"additionalProperties":true},"tween":{"$ref":"#/$defs/updateTween"},"prev":{"$ref":"#/$defs/transitionSide"},"next":{"$ref":"#/$defs/transitionSide"},"mask":{"$ref":"#/$defs/mask"}},"allOf":[{"if":{"properties":{"type":{"const":"update"}}},"then":{"required":["tween"],"not":{"anyOf":[{"required":["prev"]},{"required":["next"]},{"required":["mask"]}]}}},{"if":{"properties":{"type":{"const":"transition"}}},"then":{"not":{"required":["tween"]},"anyOf":[{"required":["prev"]},{"required":["next"]},{"required":["mask"]}]}}],"additionalProperties":false,"$id":"https://route-engine.runtime/schemas/projectData/animationResource.yaml"};const schema48 = {"type":"object","properties":{"alpha":{"$ref":"#/$defs/tweenProperty"},"x":{"$ref":"#/$defs/tweenProperty"},"y":{"$ref":"#/$defs/tweenProperty"},"scaleX":{"$ref":"#/$defs/tweenProperty"},"scaleY":{"$ref":"#/$defs/tweenProperty"},"rotation":{"$ref":"#/$defs/tweenProperty"}},"additionalProperties":false,"minProperties":1};const schema49 = {"type":"object","properties":{"initialValue":{"type":"number"},"keyframes":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/keyframe"}}},"required":["keyframes"],"additionalProperties":false};const schema50 = {"type":"object","required":["value","duration"],"properties":{"value":{"type":"number"},"duration":{"type":"number"},"easing":{"type":"string","enum":["linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","easeOutSine","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInBack","easeOutBack","easeInOutBack","easeInBounce","easeOutBounce","easeInOutBounce","easeInElastic","easeOutElastic","easeInOutElastic"]},"relative":{"type":"boolean"}},"additionalProperties":false};function validate130(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.value === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "value"},message:"must have required property '"+"value"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.duration === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "duration"},message:"must have required property '"+"duration"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((((key0 === "value") || (key0 === "duration")) || (key0 === "easing")) || (key0 === "relative"))){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.value !== undefined){if(!(typeof data.value == "number")){const err3 = {instancePath:instancePath+"/value",schemaPath:"#/properties/value/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.duration !== undefined){if(!(typeof data.duration == "number")){const err4 = {instancePath:instancePath+"/duration",schemaPath:"#/properties/duration/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.easing !== undefined){let data2 = data.easing;if(typeof data2 !== "string"){const err5 = {instancePath:instancePath+"/easing",schemaPath:"#/properties/easing/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(!(((((((((((((((((((((((((((((((data2 === "linear") || (data2 === "easeInQuad")) || (data2 === "easeOutQuad")) || (data2 === "easeInOutQuad")) || (data2 === "easeInCubic")) || (data2 === "easeOutCubic")) || (data2 === "easeInOutCubic")) || (data2 === "easeInQuart")) || (data2 === "easeOutQuart")) || (data2 === "easeInOutQuart")) || (data2 === "easeInQuint")) || (data2 === "easeOutQuint")) || (data2 === "easeInOutQuint")) || (data2 === "easeInSine")) || (data2 === "easeOutSine")) || (data2 === "easeInOutSine")) || (data2 === "easeInExpo")) || (data2 === "easeOutExpo")) || (data2 === "easeInOutExpo")) || (data2 === "easeInCirc")) || (data2 === "easeOutCirc")) || (data2 === "easeInOutCirc")) || (data2 === "easeInBack")) || (data2 === "easeOutBack")) || (data2 === "easeInOutBack")) || (data2 === "easeInBounce")) || (data2 === "easeOutBounce")) || (data2 === "easeInOutBounce")) || (data2 === "easeInElastic")) || (data2 === "easeOutElastic")) || (data2 === "easeInOutElastic"))){const err6 = {instancePath:instancePath+"/easing",schemaPath:"#/properties/easing/enum",keyword:"enum",params:{allowedValues: schema50.properties.easing.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.relative !== undefined){if(typeof data.relative !== "boolean"){const err7 = {instancePath:instancePath+"/relative",schemaPath:"#/properties/relative/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}validate130.errors = vErrors;return errors === 0;}function validate129(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.keyframes === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyframes"},message:"must have required property '"+"keyframes"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === "initialValue") || (key0 === "keyframes"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.initialValue !== undefined){if(!(typeof data.initialValue == "number")){const err2 = {instancePath:instancePath+"/initialValue",schemaPath:"#/properties/initialValue/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.keyframes !== undefined){let data1 = data.keyframes;if(Array.isArray(data1)){if(data1.length < 1){const err3 = {instancePath:instancePath+"/keyframes",schemaPath:"#/properties/keyframes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}const len0 = data1.length;for(let i0=0; i0=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+"/duration",schemaPath:"#/properties/duration/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.delay !== undefined){let data3 = data.delay;if(typeof data3 == "number"){if(data3 < 0 || isNaN(data3)){const err6 = {instancePath:instancePath+"/delay",schemaPath:"#/properties/delay/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+"/delay",schemaPath:"#/properties/delay/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.easing !== undefined){if(!(validate165(data.easing, {instancePath:instancePath+"/easing",parentData:data,parentDataProperty:"easing",rootData}))){vErrors = vErrors === null ? validate165.errors : vErrors.concat(validate165.errors);errors = vErrors.length;}}if(data.relative !== undefined){if(typeof data.relative !== "boolean"){const err8 = {instancePath:instancePath+"/relative",schemaPath:"#/properties/relative/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate162.errors = vErrors;return errors === 0;}function validate161(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(!(validate162(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate162.errors : vErrors.concat(validate162.errors);errors = vErrors.length;}const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.value === undefined) && (missing0 = "value")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.value !== undefined){const _errs4 = errors;if(!(typeof data.value == "number")){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid2 = _errs4 === errors;}else {var valid2 = true;}if(valid2){if(data.relative !== undefined){const _errs6 = errors;if(false !== data.relative){const err2 = {};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid2 = _errs6 === errors;}else {var valid2 = true;}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs7 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.value !== undefined){let data2 = data.value;if(typeof data2 == "number"){if(data2 > 100 || isNaN(data2)){const err3 = {instancePath:instancePath+"/value",schemaPath:"#/allOf/1/then/properties/value/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data2 < 0 || isNaN(data2)){const err4 = {instancePath:instancePath+"/value",schemaPath:"#/allOf/1/then/properties/value/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var _valid0 = _errs7 === errors;valid1 = _valid0;}if(!valid1){const err5 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}const _errs10 = errors;let valid4 = true;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.relative !== undefined){if(false !== data.relative){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}var _valid1 = _errs11 === errors;errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}if(_valid1){const _errs13 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.startValue !== undefined){let data4 = data.startValue;if(typeof data4 == "number"){if(data4 > 100 || isNaN(data4)){const err7 = {instancePath:instancePath+"/startValue",schemaPath:"#/allOf/2/then/properties/startValue/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data4 < 0 || isNaN(data4)){const err8 = {instancePath:instancePath+"/startValue",schemaPath:"#/allOf/2/then/properties/startValue/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}}var _valid1 = _errs13 === errors;valid4 = _valid1;}if(!valid4){const err9 = {instancePath,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate161.errors = vErrors;return errors === 0;}function validate160(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.keyframes === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyframes"},message:"must have required property '"+"keyframes"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "keyframes")){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.keyframes !== undefined){let data0 = data.keyframes;if(Array.isArray(data0)){if(data0.length < 1){const err2 = {instancePath:instancePath+"/keyframes",schemaPath:"#/properties/keyframes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}const len0 = data0.length;for(let i0=0; i0 1 || isNaN(data2)){const err3 = {instancePath:instancePath+"/value",schemaPath:"#/allOf/1/then/properties/value/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data2 < -1 || isNaN(data2)){const err4 = {instancePath:instancePath+"/value",schemaPath:"#/allOf/1/then/properties/value/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var _valid0 = _errs7 === errors;valid1 = _valid0;}if(!valid1){const err5 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}const _errs10 = errors;let valid4 = true;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.relative !== undefined){if(false !== data.relative){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}var _valid1 = _errs11 === errors;errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}if(_valid1){const _errs13 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.startValue !== undefined){let data4 = data.startValue;if(typeof data4 == "number"){if(data4 > 1 || isNaN(data4)){const err7 = {instancePath:instancePath+"/startValue",schemaPath:"#/allOf/2/then/properties/startValue/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data4 < -1 || isNaN(data4)){const err8 = {instancePath:instancePath+"/startValue",schemaPath:"#/allOf/2/then/properties/startValue/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}}var _valid1 = _errs13 === errors;valid4 = _valid1;}if(!valid4){const err9 = {instancePath,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate171.errors = vErrors;return errors === 0;}function validate170(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.keyframes === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyframes"},message:"must have required property '"+"keyframes"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "keyframes")){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.keyframes !== undefined){let data0 = data.keyframes;if(Array.isArray(data0)){if(data0.length < 1){const err2 = {instancePath:instancePath+"/keyframes",schemaPath:"#/properties/keyframes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}const len0 = data0.length;for(let i0=0; i0=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}}var _valid0 = _errs7 === errors;valid1 = _valid0;}if(!valid1){const err4 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}const _errs10 = errors;let valid4 = true;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.relative !== undefined){if(false !== data.relative){const err5 = {};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}var _valid1 = _errs11 === errors;errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}if(_valid1){const _errs13 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.startValue !== undefined){let data4 = data.startValue;if(typeof data4 == "number"){if(data4 < 0 || isNaN(data4)){const err6 = {instancePath:instancePath+"/startValue",schemaPath:"#/allOf/2/then/properties/startValue/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}var _valid1 = _errs13 === errors;valid4 = _valid1;}if(!valid4){const err7 = {instancePath,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate176.errors = vErrors;return errors === 0;}function validate175(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.keyframes === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyframes"},message:"must have required property '"+"keyframes"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "keyframes")){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.keyframes !== undefined){let data0 = data.keyframes;if(Array.isArray(data0)){if(data0.length < 1){const err2 = {instancePath:instancePath+"/keyframes",schemaPath:"#/properties/keyframes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}const len0 = data0.length;for(let i0=0; i0=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+"/delay",schemaPath:"#/oneOf/0/properties/delay/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.duration !== undefined){let data1 = data.duration;if(typeof data1 == "number"){if(data1 < 0 || isNaN(data1)){const err4 = {instancePath:instancePath+"/duration",schemaPath:"#/oneOf/0/properties/duration/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+"/duration",schemaPath:"#/oneOf/0/properties/duration/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.easing !== undefined){if(!(validate165(data.easing, {instancePath:instancePath+"/easing",parentData:data,parentDataProperty:"easing",rootData}))){vErrors = vErrors === null ? validate165.errors : vErrors.concat(validate165.errors);errors = vErrors.length;}}}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;}const _errs9 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.keyframes === undefined){const err7 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "keyframes"},message:"must have required property '"+"keyframes"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key1 in data){if(!(key1 === "keyframes")){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.keyframes !== undefined){let data3 = data.keyframes;if(Array.isArray(data3)){if(data3.length < 1){const err9 = {instancePath:instancePath+"/keyframes",schemaPath:"#/oneOf/1/properties/keyframes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}const len0 = data3.length;for(let i0=0; i0", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.height !== undefined){let data1 = data.height;if(typeof data1 == "number"){if(data1 <= 0 || isNaN(data1)){const err16 = {instancePath:instancePath+"/height",schemaPath:"#/properties/height/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/height",schemaPath:"#/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.seed !== undefined){if(!(typeof data.seed == "number")){const err18 = {instancePath:instancePath+"/seed",schemaPath:"#/properties/seed/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.modules !== undefined){let data3 = data.modules;if(data3 && typeof data3 == "object" && !Array.isArray(data3)){if(data3.emission === undefined){const err19 = {instancePath:instancePath+"/modules",schemaPath:"#/properties/modules/required",keyword:"required",params:{missingProperty: "emission"},message:"must have required property '"+"emission"+"'"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(data3.appearance === undefined){const err20 = {instancePath:instancePath+"/modules",schemaPath:"#/properties/modules/required",keyword:"required",params:{missingProperty: "appearance"},message:"must have required property '"+"appearance"+"'"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}for(const key1 in data3){if(!((((key1 === "emission") || (key1 === "movement")) || (key1 === "appearance")) || (key1 === "bounds"))){const err21 = {instancePath:instancePath+"/modules",schemaPath:"#/properties/modules/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data3.emission !== undefined){let data4 = data3.emission;if(data4 && typeof data4 == "object" && !Array.isArray(data4)){}else {const err22 = {instancePath:instancePath+"/modules/emission",schemaPath:"#/properties/modules/properties/emission/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data3.movement !== undefined){let data5 = data3.movement;if(data5 && typeof data5 == "object" && !Array.isArray(data5)){}else {const err23 = {instancePath:instancePath+"/modules/movement",schemaPath:"#/properties/modules/properties/movement/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data3.appearance !== undefined){let data6 = data3.appearance;if(data6 && typeof data6 == "object" && !Array.isArray(data6)){}else {const err24 = {instancePath:instancePath+"/modules/appearance",schemaPath:"#/properties/modules/properties/appearance/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data3.bounds !== undefined){let data7 = data3.bounds;if(data7 && typeof data7 == "object" && !Array.isArray(data7)){}else {const err25 = {instancePath:instancePath+"/modules/bounds",schemaPath:"#/properties/modules/properties/bounds/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/modules",schemaPath:"#/properties/modules/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.count !== undefined){let data8 = data.count;if(!((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8)))){const err27 = {instancePath:instancePath+"/count",schemaPath:"#/properties/count/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(typeof data8 == "number"){if(data8 < 1 || isNaN(data8)){const err28 = {instancePath:instancePath+"/count",schemaPath:"#/properties/count/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}}if(data.texture !== undefined){let data9 = data.texture;const _errs36 = errors;let valid5 = false;let passing1 = null;const _errs37 = errors;if(typeof data9 === "string"){if(func4(data9) < 1){const err29 = {instancePath:instancePath+"/texture",schemaPath:"#/properties/texture/oneOf/0/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}else {const err30 = {instancePath:instancePath+"/texture",schemaPath:"#/properties/texture/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var _valid2 = _errs37 === errors;if(_valid2){valid5 = true;passing1 = 0;}const _errs39 = errors;if(data9 && typeof data9 == "object" && !Array.isArray(data9)){}else {const err31 = {instancePath:instancePath+"/texture",schemaPath:"#/properties/texture/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}var _valid2 = _errs39 === errors;if(_valid2 && valid5){valid5 = false;passing1 = [passing1, 1];}else {if(_valid2){valid5 = true;passing1 = 1;}}if(!valid5){const err32 = {instancePath:instancePath+"/texture",schemaPath:"#/properties/texture/oneOf",keyword:"oneOf",params:{passingSchemas: passing1},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}else {errors = _errs36;if(vErrors !== null){if(_errs36){vErrors.length = _errs36;}else {vErrors = null;}}}}if(data.behaviors !== undefined){let data10 = data.behaviors;if(Array.isArray(data10)){if(data10.length < 1){const err33 = {instancePath:instancePath+"/behaviors",schemaPath:"#/properties/behaviors/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}const len0 = data10.length;for(let i0=0; i0=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}else {const err45 = {instancePath:instancePath+"/emitter/lifetime/min",schemaPath:"#/properties/emitter/properties/lifetime/properties/min/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}if(data15.max !== undefined){let data17 = data15.max;if(typeof data17 == "number"){if(data17 < 0 || isNaN(data17)){const err46 = {instancePath:instancePath+"/emitter/lifetime/max",schemaPath:"#/properties/emitter/properties/lifetime/properties/max/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+"/emitter/lifetime/max",schemaPath:"#/properties/emitter/properties/lifetime/properties/max/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}}else {const err48 = {instancePath:instancePath+"/emitter/lifetime",schemaPath:"#/properties/emitter/properties/lifetime/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}}else {const err49 = {instancePath:instancePath+"/emitter",schemaPath:"#/properties/emitter/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}}else {const err50 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}validate317.errors = vErrors;return errors === 0;}function validate316(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/resource-particle.json" */;let vErrors = null;let errors = 0;if(!(validate317(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate317.errors : vErrors.concat(validate317.errors);errors = vErrors.length;}validate316.errors = vErrors;return errors === 0;}export const validateResourceSound = validate319;const schema113 = {"$id":"https://route-engine.runtime/schemas/runtime/resource-sound.json","$ref":"https://route-engine.runtime/schemas/projectData/resources.yaml#/properties/sounds/patternProperties/^.+$"};const schema114 = {"type":"object","properties":{"fileId":{"type":"string"},"fileType":{"type":"string"},"loop":{"type":"boolean"},"volume":{"type":"number","minimum":0,"maximum":100},"muted":{"type":"boolean"},"pan":{"type":"number","minimum":-1,"maximum":1},"startDelayMs":{"type":"number","minimum":0},"playbackRate":{"type":"number","minimum":0},"startAt":{"type":"number","minimum":0},"endAt":{"type":["number","null"],"minimum":0}},"required":["fileId"],"additionalProperties":false};function validate320(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.fileId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "fileId"},message:"must have required property '"+"fileId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(func2.call(schema114.properties, key0))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.fileId !== undefined){if(typeof data.fileId !== "string"){const err2 = {instancePath:instancePath+"/fileId",schemaPath:"#/properties/fileId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.fileType !== undefined){if(typeof data.fileType !== "string"){const err3 = {instancePath:instancePath+"/fileType",schemaPath:"#/properties/fileType/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.loop !== undefined){if(typeof data.loop !== "boolean"){const err4 = {instancePath:instancePath+"/loop",schemaPath:"#/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.volume !== undefined){let data3 = data.volume;if(typeof data3 == "number"){if(data3 > 100 || isNaN(data3)){const err5 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data3 < 0 || isNaN(data3)){const err6 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.muted !== undefined){if(typeof data.muted !== "boolean"){const err8 = {instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.pan !== undefined){let data5 = data.pan;if(typeof data5 == "number"){if(data5 > 1 || isNaN(data5)){const err9 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data5 < -1 || isNaN(data5)){const err10 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.startDelayMs !== undefined){let data6 = data.startDelayMs;if(typeof data6 == "number"){if(data6 < 0 || isNaN(data6)){const err12 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}else {const err13 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.playbackRate !== undefined){let data7 = data.playbackRate;if(typeof data7 == "number"){if(data7 < 0 || isNaN(data7)){const err14 = {instancePath:instancePath+"/playbackRate",schemaPath:"#/properties/playbackRate/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/playbackRate",schemaPath:"#/properties/playbackRate/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.startAt !== undefined){let data8 = data.startAt;if(typeof data8 == "number"){if(data8 < 0 || isNaN(data8)){const err16 = {instancePath:instancePath+"/startAt",schemaPath:"#/properties/startAt/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/startAt",schemaPath:"#/properties/startAt/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.endAt !== undefined){let data9 = data.endAt;if((!(typeof data9 == "number")) && (data9 !== null)){const err18 = {instancePath:instancePath+"/endAt",schemaPath:"#/properties/endAt/type",keyword:"type",params:{type: schema114.properties.endAt.type},message:"must be number,null"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(typeof data9 == "number"){if(data9 < 0 || isNaN(data9)){const err19 = {instancePath:instancePath+"/endAt",schemaPath:"#/properties/endAt/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}}else {const err20 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}validate320.errors = vErrors;return errors === 0;}function validate319(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/resource-sound.json" */;let vErrors = null;let errors = 0;if(!(validate320(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate320.errors : vErrors.concat(validate320.errors);errors = vErrors.length;}validate319.errors = vErrors;return errors === 0;}export const validateResourceSpritesheet = validate322;const schema115 = {"$id":"https://route-engine.runtime/schemas/runtime/resource-spritesheet.json","$ref":"https://route-engine.runtime/schemas/projectData/resources.yaml#/properties/spritesheets/patternProperties/^.+$"};const schema116 = {"type":"object","properties":{"fileId":{"type":"string"},"jsonData":{"type":"object"},"width":{"type":"integer"},"height":{"type":"integer"},"animations":{"type":"object","patternProperties":{"^.+$":{"type":"object","properties":{"frames":{"type":"array","items":{"type":"number"}},"animationSpeed":{"type":"number"},"loop":{"type":"boolean"}},"required":["frames"],"additionalProperties":false}}}},"required":["fileId","jsonData","width","height"],"additionalProperties":false};const pattern0 = new RegExp("^.+$", "u");function validate323(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.fileId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "fileId"},message:"must have required property '"+"fileId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.jsonData === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "jsonData"},message:"must have required property '"+"jsonData"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.width === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "width"},message:"must have required property '"+"width"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.height === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "height"},message:"must have required property '"+"height"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!(((((key0 === "fileId") || (key0 === "jsonData")) || (key0 === "width")) || (key0 === "height")) || (key0 === "animations"))){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.fileId !== undefined){if(typeof data.fileId !== "string"){const err5 = {instancePath:instancePath+"/fileId",schemaPath:"#/properties/fileId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.jsonData !== undefined){let data1 = data.jsonData;if(!(data1 && typeof data1 == "object" && !Array.isArray(data1))){const err6 = {instancePath:instancePath+"/jsonData",schemaPath:"#/properties/jsonData/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.width !== undefined){let data2 = data.width;if(!((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2)))){const err7 = {instancePath:instancePath+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.height !== undefined){let data3 = data.height;if(!((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3)))){const err8 = {instancePath:instancePath+"/height",schemaPath:"#/properties/height/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.animations !== undefined){let data4 = data.animations;if(data4 && typeof data4 == "object" && !Array.isArray(data4)){for(const key1 in data4){if(pattern0.test(key1)){let data5 = data4[key1];if(data5 && typeof data5 == "object" && !Array.isArray(data5)){if(data5.frames === undefined){const err9 = {instancePath:instancePath+"/animations/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/animations/patternProperties/%5E.%2B%24/required",keyword:"required",params:{missingProperty: "frames"},message:"must have required property '"+"frames"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key2 in data5){if(!(((key2 === "frames") || (key2 === "animationSpeed")) || (key2 === "loop"))){const err10 = {instancePath:instancePath+"/animations/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/animations/patternProperties/%5E.%2B%24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data5.frames !== undefined){let data6 = data5.frames;if(Array.isArray(data6)){const len0 = data6.length;for(let i0=0; i0 1){const indices0 = {};for(;i1--;){let item0 = data0[i1];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j0 = indices0[item0];const err12 = {instancePath:instancePath+"/fontId",schemaPath:"#/properties/fontId/oneOf/1/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;break;}indices0[item0] = i1;}}}else {const err13 = {instancePath:instancePath+"/fontId",schemaPath:"#/properties/fontId/oneOf/1/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs6 === errors;if(_valid0 && valid1){valid1 = false;passing0 = [passing0, 1];}else {if(_valid0){valid1 = true;passing0 = 1;}}if(!valid1){const err14 = {instancePath:instancePath+"/fontId",schemaPath:"#/properties/fontId/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}}if(data.colorId !== undefined){if(typeof data.colorId !== "string"){const err15 = {instancePath:instancePath+"/colorId",schemaPath:"#/properties/colorId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.colorAlpha !== undefined){if(!(typeof data.colorAlpha == "number")){const err16 = {instancePath:instancePath+"/colorAlpha",schemaPath:"#/properties/colorAlpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.fontSize !== undefined){if(!(typeof data.fontSize == "number")){const err17 = {instancePath:instancePath+"/fontSize",schemaPath:"#/properties/fontSize/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.fontWeight !== undefined){if(typeof data.fontWeight !== "string"){const err18 = {instancePath:instancePath+"/fontWeight",schemaPath:"#/properties/fontWeight/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.fontStyle !== undefined){let data6 = data.fontStyle;if(typeof data6 !== "string"){const err19 = {instancePath:instancePath+"/fontStyle",schemaPath:"#/properties/fontStyle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(!(((data6 === "normal") || (data6 === "italic")) || (data6 === "oblique"))){const err20 = {instancePath:instancePath+"/fontStyle",schemaPath:"#/properties/fontStyle/enum",keyword:"enum",params:{allowedValues: schema118.properties.fontStyle.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.lineHeight !== undefined){if(!(typeof data.lineHeight == "number")){const err21 = {instancePath:instancePath+"/lineHeight",schemaPath:"#/properties/lineHeight/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.align !== undefined){if(typeof data.align !== "string"){const err22 = {instancePath:instancePath+"/align",schemaPath:"#/properties/align/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.wordWrap !== undefined){if(typeof data.wordWrap !== "boolean"){const err23 = {instancePath:instancePath+"/wordWrap",schemaPath:"#/properties/wordWrap/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.breakWords !== undefined){if(typeof data.breakWords !== "boolean"){const err24 = {instancePath:instancePath+"/breakWords",schemaPath:"#/properties/breakWords/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data.wordWrapWidth !== undefined){if(!(typeof data.wordWrapWidth == "number")){const err25 = {instancePath:instancePath+"/wordWrapWidth",schemaPath:"#/properties/wordWrapWidth/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.strokeColorId !== undefined){if(typeof data.strokeColorId !== "string"){const err26 = {instancePath:instancePath+"/strokeColorId",schemaPath:"#/properties/strokeColorId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.strokeAlpha !== undefined){if(!(typeof data.strokeAlpha == "number")){const err27 = {instancePath:instancePath+"/strokeAlpha",schemaPath:"#/properties/strokeAlpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data.strokeWidth !== undefined){if(!(typeof data.strokeWidth == "number")){const err28 = {instancePath:instancePath+"/strokeWidth",schemaPath:"#/properties/strokeWidth/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}if(data.shadow !== undefined){let data15 = data.shadow;if(data15 && typeof data15 == "object" && !Array.isArray(data15)){if(data15.colorId === undefined){const err29 = {instancePath:instancePath+"/shadow",schemaPath:"#/properties/shadow/required",keyword:"required",params:{missingProperty: "colorId"},message:"must have required property '"+"colorId"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key1 in data15){if(!(((((key1 === "colorId") || (key1 === "alpha")) || (key1 === "blur")) || (key1 === "offsetX")) || (key1 === "offsetY"))){const err30 = {instancePath:instancePath+"/shadow",schemaPath:"#/properties/shadow/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data15.colorId !== undefined){let data16 = data15.colorId;if(typeof data16 === "string"){if(func4(data16) < 1){const err31 = {instancePath:instancePath+"/shadow/colorId",schemaPath:"#/properties/shadow/properties/colorId/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/shadow/colorId",schemaPath:"#/properties/shadow/properties/colorId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data15.alpha !== undefined){let data17 = data15.alpha;if(typeof data17 == "number"){if(data17 > 1 || isNaN(data17)){const err33 = {instancePath:instancePath+"/shadow/alpha",schemaPath:"#/properties/shadow/properties/alpha/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}if(data17 < 0 || isNaN(data17)){const err34 = {instancePath:instancePath+"/shadow/alpha",schemaPath:"#/properties/shadow/properties/alpha/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+"/shadow/alpha",schemaPath:"#/properties/shadow/properties/alpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data15.blur !== undefined){let data18 = data15.blur;if(typeof data18 == "number"){if(data18 < 0 || isNaN(data18)){const err36 = {instancePath:instancePath+"/shadow/blur",schemaPath:"#/properties/shadow/properties/blur/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}else {const err37 = {instancePath:instancePath+"/shadow/blur",schemaPath:"#/properties/shadow/properties/blur/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data15.offsetX !== undefined){if(!(typeof data15.offsetX == "number")){const err38 = {instancePath:instancePath+"/shadow/offsetX",schemaPath:"#/properties/shadow/properties/offsetX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data15.offsetY !== undefined){if(!(typeof data15.offsetY == "number")){const err39 = {instancePath:instancePath+"/shadow/offsetY",schemaPath:"#/properties/shadow/properties/offsetY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}}else {const err40 = {instancePath:instancePath+"/shadow",schemaPath:"#/properties/shadow/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}}else {const err41 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}validate326.errors = vErrors;return errors === 0;}function validate325(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/resource-textStyle.json" */;let vErrors = null;let errors = 0;if(!(validate326(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate326.errors : vErrors.concat(validate326.errors);errors = vErrors.length;}validate325.errors = vErrors;return errors === 0;}export const validateResourceTransform = validate328;const schema119 = {"$id":"https://route-engine.runtime/schemas/runtime/resource-transform.json","$ref":"https://route-engine.runtime/schemas/projectData/resources.yaml#/properties/transforms/patternProperties/^.+$"};const schema120 = {"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"},"anchorX":{"type":"number"},"anchorY":{"type":"number"},"scaleX":{"type":"number"},"scaleY":{"type":"number"},"flipX":{"type":"boolean"},"flipY":{"type":"boolean"},"rotation":{"type":"number"},"originX":{"type":"number"},"originY":{"type":"number"}},"additionalProperties":false};function validate329(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(func2.call(schema120.properties, key0))){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.x !== undefined){let data0 = data.x;if(!((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0)))){const err1 = {instancePath:instancePath+"/x",schemaPath:"#/properties/x/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.y !== undefined){let data1 = data.y;if(!((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1)))){const err2 = {instancePath:instancePath+"/y",schemaPath:"#/properties/y/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.anchorX !== undefined){if(!(typeof data.anchorX == "number")){const err3 = {instancePath:instancePath+"/anchorX",schemaPath:"#/properties/anchorX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.anchorY !== undefined){if(!(typeof data.anchorY == "number")){const err4 = {instancePath:instancePath+"/anchorY",schemaPath:"#/properties/anchorY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.scaleX !== undefined){if(!(typeof data.scaleX == "number")){const err5 = {instancePath:instancePath+"/scaleX",schemaPath:"#/properties/scaleX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.scaleY !== undefined){if(!(typeof data.scaleY == "number")){const err6 = {instancePath:instancePath+"/scaleY",schemaPath:"#/properties/scaleY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.flipX !== undefined){if(typeof data.flipX !== "boolean"){const err7 = {instancePath:instancePath+"/flipX",schemaPath:"#/properties/flipX/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.flipY !== undefined){if(typeof data.flipY !== "boolean"){const err8 = {instancePath:instancePath+"/flipY",schemaPath:"#/properties/flipY/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.rotation !== undefined){if(!(typeof data.rotation == "number")){const err9 = {instancePath:instancePath+"/rotation",schemaPath:"#/properties/rotation/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.originX !== undefined){if(!(typeof data.originX == "number")){const err10 = {instancePath:instancePath+"/originX",schemaPath:"#/properties/originX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.originY !== undefined){if(!(typeof data.originY == "number")){const err11 = {instancePath:instancePath+"/originY",schemaPath:"#/properties/originY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}else {const err12 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}validate329.errors = vErrors;return errors === 0;}function validate328(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/resource-transform.json" */;let vErrors = null;let errors = 0;if(!(validate329(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate329.errors : vErrors.concat(validate329.errors);errors = vErrors.length;}validate328.errors = vErrors;return errors === 0;}export const validateResourceVideo = validate331;const schema121 = {"$id":"https://route-engine.runtime/schemas/runtime/resource-video.json","$ref":"https://route-engine.runtime/schemas/projectData/resources.yaml#/properties/videos/patternProperties/^.+$"};const schema122 = {"type":"object","properties":{"fileId":{"type":"string"},"fileType":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["fileId","width","height"],"additionalProperties":false};function validate332(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.fileId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "fileId"},message:"must have required property '"+"fileId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.width === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "width"},message:"must have required property '"+"width"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.height === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "height"},message:"must have required property '"+"height"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!((((key0 === "fileId") || (key0 === "fileType")) || (key0 === "width")) || (key0 === "height"))){const err3 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.fileId !== undefined){if(typeof data.fileId !== "string"){const err4 = {instancePath:instancePath+"/fileId",schemaPath:"#/properties/fileId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.fileType !== undefined){if(typeof data.fileType !== "string"){const err5 = {instancePath:instancePath+"/fileType",schemaPath:"#/properties/fileType/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.width !== undefined){let data2 = data.width;if(!((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2)))){const err6 = {instancePath:instancePath+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.height !== undefined){let data3 = data.height;if(!((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3)))){const err7 = {instancePath:instancePath+"/height",schemaPath:"#/properties/height/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}validate332.errors = vErrors;return errors === 0;}function validate331(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/resource-video.json" */;let vErrors = null;let errors = 0;if(!(validate332(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate332.errors : vErrors.concat(validate332.errors);errors = vErrors.length;}validate331.errors = vErrors;return errors === 0;} +"use strict";export const validateActionBackground = validate21;const schema6 = {"$id":"https://route-engine.runtime/schemas/runtime/action-background.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/background"};const schema21 = {"type":"object","properties":{"resourceId":{"type":"string"},"animationName":{"type":"string"},"animationSpeed":{"type":"number"},"loop":{"type":"boolean"},"colorId":{"type":"string"},"transformId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"anchorX":{"type":"number"},"anchorY":{"type":"number"},"scaleX":{"type":"number"},"scaleY":{"type":"number"},"flipX":{"type":"boolean"},"flipY":{"type":"boolean"},"rotation":{"type":"number"},"originX":{"type":"number"},"originY":{"type":"number"},"alpha":{"type":"number","minimum":0,"maximum":1},"opacity":{"type":"number","minimum":0,"maximum":1},"blur":{"$ref":"#/definitions/backgroundBlur"},"filters":{"$ref":"#/definitions/shaderFilters"},"animations":{"$ref":"#/definitions/animationSelection"}},"additionalProperties":false};const func2 = Object.prototype.hasOwnProperty;const schema8 = {"anyOf":[{"type":"null"},{"type":"object","properties":{"x":{"type":"number","minimum":0},"y":{"type":"number","minimum":0},"quality":{"type":"number","minimum":1},"kernelSize":{"type":"integer","enum":[5,7,9,11,13,15]},"repeatEdgePixels":{"type":"boolean"}},"required":["x","y"],"additionalProperties":false}]};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(data !== null){const err0 = {instancePath,schemaPath:"#/anyOf/0/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.x === undefined){const err1 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: "x"},message:"must have required property '"+"x"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.y === undefined){const err2 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: "y"},message:"must have required property '"+"y"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!(((((key0 === "x") || (key0 === "y")) || (key0 === "quality")) || (key0 === "kernelSize")) || (key0 === "repeatEdgePixels"))){const err3 = {instancePath,schemaPath:"#/anyOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.x !== undefined){let data0 = data.x;if(typeof data0 == "number"){if(data0 < 0 || isNaN(data0)){const err4 = {instancePath:instancePath+"/x",schemaPath:"#/anyOf/1/properties/x/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+"/x",schemaPath:"#/anyOf/1/properties/x/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.y !== undefined){let data1 = data.y;if(typeof data1 == "number"){if(data1 < 0 || isNaN(data1)){const err6 = {instancePath:instancePath+"/y",schemaPath:"#/anyOf/1/properties/y/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+"/y",schemaPath:"#/anyOf/1/properties/y/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.quality !== undefined){let data2 = data.quality;if(typeof data2 == "number"){if(data2 < 1 || isNaN(data2)){const err8 = {instancePath:instancePath+"/quality",schemaPath:"#/anyOf/1/properties/quality/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}else {const err9 = {instancePath:instancePath+"/quality",schemaPath:"#/anyOf/1/properties/quality/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.kernelSize !== undefined){let data3 = data.kernelSize;if(!((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3)))){const err10 = {instancePath:instancePath+"/kernelSize",schemaPath:"#/anyOf/1/properties/kernelSize/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(!((((((data3 === 5) || (data3 === 7)) || (data3 === 9)) || (data3 === 11)) || (data3 === 13)) || (data3 === 15))){const err11 = {instancePath:instancePath+"/kernelSize",schemaPath:"#/anyOf/1/properties/kernelSize/enum",keyword:"enum",params:{allowedValues: schema8.anyOf[1].properties.kernelSize.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.repeatEdgePixels !== undefined){if(typeof data.repeatEdgePixels !== "boolean"){const err12 = {instancePath:instancePath+"/repeatEdgePixels",schemaPath:"#/anyOf/1/properties/repeatEdgePixels/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath,schemaPath:"#/anyOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs3 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err14 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate23.errors = vErrors;return errors === 0;}const schema11 = {"type":"array","items":{"$ref":"#/definitions/shaderFilter"}};const schema12 = {"type":"object","required":["id","type"],"properties":{"id":{"type":"string","minLength":1},"type":{"const":"shader"}},"additionalProperties":true};const func4 = require("ajv/dist/runtime/ucs2length").default;function validate31(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.type === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(func4(data0) < 1){const err2 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.type !== undefined){if("shader" !== data.type){const err4 = {instancePath:instancePath+"/type",schemaPath:"#/properties/type/const",keyword:"const",params:{allowedValue: "shader"},message:"must be equal to constant"};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++;}validate31.errors = vErrors;return errors === 0;}function validate30(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(Array.isArray(data)){const len0 = data.length;for(let i0=0; i0", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+"/speed",schemaPath:"#/properties/speed/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.loop !== undefined){if(typeof data.loop !== "boolean"){const err5 = {instancePath:instancePath+"/loop",schemaPath:"#/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}validate26.errors = vErrors;return errors === 0;}function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.resourceId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "resourceId"},message:"must have required property '"+"resourceId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === "resourceId") || (key0 === "playback"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.resourceId !== undefined){if(typeof data.resourceId !== "string"){const err2 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.playback !== undefined){if(!(validate26(data.playback, {instancePath:instancePath+"/playback",parentData:data,parentDataProperty:"playback",rootData}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}}else {const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}validate25.errors = vErrors;return errors === 0;}function validate68(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(func2.call(schema21.properties, key0))){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.resourceId !== undefined){if(typeof data.resourceId !== "string"){const err1 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.animationName !== undefined){if(typeof data.animationName !== "string"){const err2 = {instancePath:instancePath+"/animationName",schemaPath:"#/properties/animationName/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.animationSpeed !== undefined){if(!(typeof data.animationSpeed == "number")){const err3 = {instancePath:instancePath+"/animationSpeed",schemaPath:"#/properties/animationSpeed/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.loop !== undefined){if(typeof data.loop !== "boolean"){const err4 = {instancePath:instancePath+"/loop",schemaPath:"#/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.colorId !== undefined){if(typeof data.colorId !== "string"){const err5 = {instancePath:instancePath+"/colorId",schemaPath:"#/properties/colorId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.transformId !== undefined){if(typeof data.transformId !== "string"){const err6 = {instancePath:instancePath+"/transformId",schemaPath:"#/properties/transformId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.x !== undefined){if(!(typeof data.x == "number")){const err7 = {instancePath:instancePath+"/x",schemaPath:"#/properties/x/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.y !== undefined){if(!(typeof data.y == "number")){const err8 = {instancePath:instancePath+"/y",schemaPath:"#/properties/y/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.anchorX !== undefined){if(!(typeof data.anchorX == "number")){const err9 = {instancePath:instancePath+"/anchorX",schemaPath:"#/properties/anchorX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.anchorY !== undefined){if(!(typeof data.anchorY == "number")){const err10 = {instancePath:instancePath+"/anchorY",schemaPath:"#/properties/anchorY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.scaleX !== undefined){if(!(typeof data.scaleX == "number")){const err11 = {instancePath:instancePath+"/scaleX",schemaPath:"#/properties/scaleX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.scaleY !== undefined){if(!(typeof data.scaleY == "number")){const err12 = {instancePath:instancePath+"/scaleY",schemaPath:"#/properties/scaleY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.flipX !== undefined){if(typeof data.flipX !== "boolean"){const err13 = {instancePath:instancePath+"/flipX",schemaPath:"#/properties/flipX/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.flipY !== undefined){if(typeof data.flipY !== "boolean"){const err14 = {instancePath:instancePath+"/flipY",schemaPath:"#/properties/flipY/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.rotation !== undefined){if(!(typeof data.rotation == "number")){const err15 = {instancePath:instancePath+"/rotation",schemaPath:"#/properties/rotation/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.originX !== undefined){if(!(typeof data.originX == "number")){const err16 = {instancePath:instancePath+"/originX",schemaPath:"#/properties/originX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.originY !== undefined){if(!(typeof data.originY == "number")){const err17 = {instancePath:instancePath+"/originY",schemaPath:"#/properties/originY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.alpha !== undefined){let data17 = data.alpha;if(typeof data17 == "number"){if(data17 > 1 || isNaN(data17)){const err18 = {instancePath:instancePath+"/alpha",schemaPath:"#/properties/alpha/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(data17 < 0 || isNaN(data17)){const err19 = {instancePath:instancePath+"/alpha",schemaPath:"#/properties/alpha/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/alpha",schemaPath:"#/properties/alpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.opacity !== undefined){let data18 = data.opacity;if(typeof data18 == "number"){if(data18 > 1 || isNaN(data18)){const err21 = {instancePath:instancePath+"/opacity",schemaPath:"#/properties/opacity/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(data18 < 0 || isNaN(data18)){const err22 = {instancePath:instancePath+"/opacity",schemaPath:"#/properties/opacity/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}else {const err23 = {instancePath:instancePath+"/opacity",schemaPath:"#/properties/opacity/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.blur !== undefined){if(!(validate23(data.blur, {instancePath:instancePath+"/blur",parentData:data,parentDataProperty:"blur",rootData}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}}if(data.filters !== undefined){if(!(validate30(data.filters, {instancePath:instancePath+"/filters",parentData:data,parentDataProperty:"filters",rootData}))){vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);errors = vErrors.length;}}if(data.animations !== undefined){if(!(validate25(data.animations, {instancePath:instancePath+"/animations",parentData:data,parentDataProperty:"animations",rootData}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}else {const err24 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}validate68.errors = vErrors;return errors === 0;}function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-background.json" */;let vErrors = null;let errors = 0;if(!(validate68(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate68.errors : vErrors.concat(validate68.errors);errors = vErrors.length;}validate21.errors = vErrors;return errors === 0;}export const validateActionBgm = validate73;const schema22 = {"$id":"https://route-engine.runtime/schemas/runtime/action-bgm.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/bgm"};const schema23 = {"type":"object","properties":{"sounds":{"type":"array","items":{"$ref":"#/definitions/bgmSound"}},"resourceId":{"type":"string"},"loop":{"type":"boolean"},"interruption":{"type":"string","enum":["immediate","loopEnd"]},"volume":{"type":"number","minimum":0,"maximum":100},"muted":{"type":"boolean"},"pan":{"type":"number","minimum":-1,"maximum":1},"startDelayMs":{"type":"number","minimum":0},"audioEffects":{"$ref":"#/definitions/audioEffectSelection"}},"allOf":[{"not":{"required":["resourceId","sounds"]}},{"not":{"required":["startDelayMs","sounds"]}},{"if":{"required":["audioEffects"]},"then":{"required":["sounds"]}}],"additionalProperties":false};const schema20 = {"type":"object","properties":{"id":{"type":"string","minLength":1},"resourceId":{"type":"string","minLength":1},"loop":{"type":"boolean"},"volume":{"type":"number","minimum":0,"maximum":100},"muted":{"type":"boolean"},"pan":{"type":"number","minimum":-1,"maximum":1},"startDelayMs":{"type":"number","minimum":0},"playbackRate":{"type":"number","minimum":0},"startAt":{"type":"number","minimum":0},"endAt":{"type":["number","null"],"minimum":0},"beginEffect":{"$ref":"#/definitions/audioEffectSelection"},"endEffect":{"$ref":"#/definitions/audioEffectSelection"}},"required":["id","resourceId"],"additionalProperties":false};const schema18 = {"type":"object","properties":{"resourceId":{"type":"string","minLength":1},"playback":{"$ref":"#/definitions/audioEffectPlayback"}},"required":["resourceId"],"additionalProperties":false};const schema19 = {"type":"object","properties":{"speed":{"type":"number","exclusiveMinimum":0}},"additionalProperties":false};function validate55(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(key0 === "speed")){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.speed !== undefined){let data0 = data.speed;if(typeof data0 == "number"){if(data0 <= 0 || isNaN(data0)){const err1 = {instancePath:instancePath+"/speed",schemaPath:"#/properties/speed/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}else {const err2 = {instancePath:instancePath+"/speed",schemaPath:"#/properties/speed/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}else {const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}validate55.errors = vErrors;return errors === 0;}function validate54(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.resourceId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "resourceId"},message:"must have required property '"+"resourceId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === "resourceId") || (key0 === "playback"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.resourceId !== undefined){let data0 = data.resourceId;if(typeof data0 === "string"){if(func4(data0) < 1){const err2 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.playback !== undefined){if(!(validate55(data.playback, {instancePath:instancePath+"/playback",parentData:data,parentDataProperty:"playback",rootData}))){vErrors = vErrors === null ? validate55.errors : vErrors.concat(validate55.errors);errors = vErrors.length;}}}else {const err4 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}validate54.errors = vErrors;return errors === 0;}function validate61(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.resourceId === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "resourceId"},message:"must have required property '"+"resourceId"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(func2.call(schema20.properties, key0))){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.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(func4(data0) < 1){const err3 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.resourceId !== undefined){let data1 = data.resourceId;if(typeof data1 === "string"){if(func4(data1) < 1){const err5 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.loop !== undefined){if(typeof data.loop !== "boolean"){const err7 = {instancePath:instancePath+"/loop",schemaPath:"#/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.volume !== undefined){let data3 = data.volume;if(typeof data3 == "number"){if(data3 > 100 || isNaN(data3)){const err8 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data3 < 0 || isNaN(data3)){const err9 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.muted !== undefined){if(typeof data.muted !== "boolean"){const err11 = {instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.pan !== undefined){let data5 = data.pan;if(typeof data5 == "number"){if(data5 > 1 || isNaN(data5)){const err12 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data5 < -1 || isNaN(data5)){const err13 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}else {const err14 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.startDelayMs !== undefined){let data6 = data.startDelayMs;if(typeof data6 == "number"){if(data6 < 0 || isNaN(data6)){const err15 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}else {const err16 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.playbackRate !== undefined){let data7 = data.playbackRate;if(typeof data7 == "number"){if(data7 < 0 || isNaN(data7)){const err17 = {instancePath:instancePath+"/playbackRate",schemaPath:"#/properties/playbackRate/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}else {const err18 = {instancePath:instancePath+"/playbackRate",schemaPath:"#/properties/playbackRate/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.startAt !== undefined){let data8 = data.startAt;if(typeof data8 == "number"){if(data8 < 0 || isNaN(data8)){const err19 = {instancePath:instancePath+"/startAt",schemaPath:"#/properties/startAt/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/startAt",schemaPath:"#/properties/startAt/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.endAt !== undefined){let data9 = data.endAt;if((!(typeof data9 == "number")) && (data9 !== null)){const err21 = {instancePath:instancePath+"/endAt",schemaPath:"#/properties/endAt/type",keyword:"type",params:{type: schema20.properties.endAt.type},message:"must be number,null"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(typeof data9 == "number"){if(data9 < 0 || isNaN(data9)){const err22 = {instancePath:instancePath+"/endAt",schemaPath:"#/properties/endAt/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}if(data.beginEffect !== undefined){if(!(validate54(data.beginEffect, {instancePath:instancePath+"/beginEffect",parentData:data,parentDataProperty:"beginEffect",rootData}))){vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);errors = vErrors.length;}}if(data.endEffect !== undefined){if(!(validate54(data.endEffect, {instancePath:instancePath+"/endEffect",parentData:data,parentDataProperty:"endEffect",rootData}))){vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);errors = vErrors.length;}}}else {const err23 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}validate61.errors = vErrors;return errors === 0;}function validate74(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs2 = errors;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.resourceId === undefined) && (missing0 = "resourceId")) || ((data.sounds === undefined) && (missing0 = "sounds"))){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var valid1 = _errs3 === errors;if(valid1){const err1 = {instancePath,schemaPath:"#/allOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}}const _errs5 = errors;const _errs6 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if(((data.startDelayMs === undefined) && (missing1 = "startDelayMs")) || ((data.sounds === undefined) && (missing1 = "sounds"))){const err2 = {};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}var valid2 = _errs6 === errors;if(valid2){const err3 = {instancePath,schemaPath:"#/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}else {errors = _errs5;if(vErrors !== null){if(_errs5){vErrors.length = _errs5;}else {vErrors = null;}}}const _errs8 = errors;let valid3 = true;const _errs9 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing2;if((data.audioEffects === undefined) && (missing2 = "audioEffects")){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var _valid0 = _errs9 === errors;errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}if(_valid0){const _errs10 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.sounds === undefined){const err5 = {instancePath,schemaPath:"#/allOf/2/then/required",keyword:"required",params:{missingProperty: "sounds"},message:"must have required property '"+"sounds"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var _valid0 = _errs10 === errors;valid3 = _valid0;}if(!valid3){const err6 = {instancePath,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(func2.call(schema23.properties, key0))){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.sounds !== undefined){let data0 = data.sounds;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0 100 || isNaN(data5)){const err13 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data5 < 0 || isNaN(data5)){const err14 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.muted !== undefined){if(typeof data.muted !== "boolean"){const err16 = {instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.pan !== undefined){let data7 = data.pan;if(typeof data7 == "number"){if(data7 > 1 || isNaN(data7)){const err17 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(data7 < -1 || isNaN(data7)){const err18 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}else {const err19 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.startDelayMs !== undefined){let data8 = data.startDelayMs;if(typeof data8 == "number"){if(data8 < 0 || isNaN(data8)){const err20 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.audioEffects !== undefined){if(!(validate54(data.audioEffects, {instancePath:instancePath+"/audioEffects",parentData:data,parentDataProperty:"audioEffects",rootData}))){vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);errors = vErrors.length;}}}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++;}validate74.errors = vErrors;return errors === 0;}function validate73(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-bgm.json" */;let vErrors = null;let errors = 0;if(!(validate74(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate74.errors : vErrors.concat(validate74.errors);errors = vErrors.length;}validate73.errors = vErrors;return errors === 0;}export const validateActionCharacter = validate78;const schema24 = {"$id":"https://route-engine.runtime/schemas/runtime/action-character.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/character"};const schema25 = {"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"transformId":{"type":"string"},"x":{"type":"number"},"y":{"type":"number"},"anchorX":{"type":"number"},"anchorY":{"type":"number"},"scaleX":{"type":"number"},"scaleY":{"type":"number"},"flipX":{"type":"boolean"},"flipY":{"type":"boolean"},"rotation":{"type":"number"},"originX":{"type":"number"},"originY":{"type":"number"},"alpha":{"type":"number","minimum":0,"maximum":1},"opacity":{"type":"number","minimum":0,"maximum":1},"blur":{"$ref":"#/definitions/backgroundBlur"},"filters":{"$ref":"#/definitions/shaderFilters"},"sprites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"resourceId":{"type":"string"},"animationName":{"type":"string"},"animationSpeed":{"type":"number"},"loop":{"type":"boolean"}},"additionalProperties":false}},"animations":{"$ref":"#/definitions/animationSelection"}},"required":["id"],"allOf":[{"if":{"required":["sprites"]},"then":{"required":["transformId"]}}],"additionalProperties":false}}},"additionalProperties":false};function validate79(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(key0 === "items")){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.items !== undefined){let data0 = data.items;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0 1 || isNaN(data15)){const err19 = {instancePath:instancePath+"/items/" + i0+"/alpha",schemaPath:"#/properties/items/items/properties/alpha/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(data15 < 0 || isNaN(data15)){const err20 = {instancePath:instancePath+"/items/" + i0+"/alpha",schemaPath:"#/properties/items/items/properties/alpha/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/items/" + i0+"/alpha",schemaPath:"#/properties/items/items/properties/alpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data1.opacity !== undefined){let data16 = data1.opacity;if(typeof data16 == "number"){if(data16 > 1 || isNaN(data16)){const err22 = {instancePath:instancePath+"/items/" + i0+"/opacity",schemaPath:"#/properties/items/items/properties/opacity/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}if(data16 < 0 || isNaN(data16)){const err23 = {instancePath:instancePath+"/items/" + i0+"/opacity",schemaPath:"#/properties/items/items/properties/opacity/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}else {const err24 = {instancePath:instancePath+"/items/" + i0+"/opacity",schemaPath:"#/properties/items/items/properties/opacity/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data1.blur !== undefined){if(!(validate23(data1.blur, {instancePath:instancePath+"/items/" + i0+"/blur",parentData:data1,parentDataProperty:"blur",rootData}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}}if(data1.filters !== undefined){if(!(validate30(data1.filters, {instancePath:instancePath+"/items/" + i0+"/filters",parentData:data1,parentDataProperty:"filters",rootData}))){vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);errors = vErrors.length;}}if(data1.sprites !== undefined){let data19 = data1.sprites;if(Array.isArray(data19)){const len1 = data19.length;for(let i1=0; i1=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}}else {const err12 = {instancePath:instancePath+"/fields/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/fields/additionalProperties/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath:instancePath+"/fields",schemaPath:"#/properties/fields/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.submitActions !== undefined){let data10 = data.submitActions;if(!(data10 && typeof data10 == "object" && !Array.isArray(data10))){const err14 = {instancePath:instancePath+"/submitActions",schemaPath:"#/properties/submitActions/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.cancelActions !== undefined){let data11 = data.cancelActions;if(!(data11 && typeof data11 == "object" && !Array.isArray(data11))){const err15 = {instancePath:instancePath+"/cancelActions",schemaPath:"#/properties/cancelActions/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.animations !== undefined){if(!(validate25(data.animations, {instancePath:instancePath+"/animations",parentData:data,parentDataProperty:"animations",rootData}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}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++;}validate100.errors = vErrors;return errors === 0;}function validate99(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-form.json" */;let vErrors = null;let errors = 0;if(!(validate100(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate100.errors : vErrors.concat(validate100.errors);errors = vErrors.length;}validate99.errors = vErrors;return errors === 0;}export const validateActionLayout = validate103;const schema36 = {"$id":"https://route-engine.runtime/schemas/runtime/action-layout.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/layout"};const schema37 = {"type":"object","properties":{"resourceId":{"type":"string"},"animations":{"$ref":"#/definitions/animationSelection"}},"additionalProperties":false};function validate104(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!((key0 === "resourceId") || (key0 === "animations"))){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.resourceId !== undefined){if(typeof data.resourceId !== "string"){const err1 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.animations !== undefined){if(!(validate25(data.animations, {instancePath:instancePath+"/animations",parentData:data,parentDataProperty:"animations",rootData}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}else {const err2 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}validate104.errors = vErrors;return errors === 0;}function validate103(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-layout.json" */;let vErrors = null;let errors = 0;if(!(validate104(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate104.errors : vErrors.concat(validate104.errors);errors = vErrors.length;}validate103.errors = vErrors;return errors === 0;}export const validateActionScreen = validate107;const schema38 = {"$id":"https://route-engine.runtime/schemas/runtime/action-screen.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/screen"};const schema39 = {"type":"object","properties":{"alpha":{"type":"number","minimum":0,"maximum":1},"opacity":{"type":"number","minimum":0,"maximum":1},"blur":{"$ref":"#/definitions/backgroundBlur"},"animations":{"$ref":"#/definitions/animationSelection"}},"additionalProperties":false};function validate108(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!((((key0 === "alpha") || (key0 === "opacity")) || (key0 === "blur")) || (key0 === "animations"))){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.alpha !== undefined){let data0 = data.alpha;if(typeof data0 == "number"){if(data0 > 1 || isNaN(data0)){const err1 = {instancePath:instancePath+"/alpha",schemaPath:"#/properties/alpha/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data0 < 0 || isNaN(data0)){const err2 = {instancePath:instancePath+"/alpha",schemaPath:"#/properties/alpha/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+"/alpha",schemaPath:"#/properties/alpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.opacity !== undefined){let data1 = data.opacity;if(typeof data1 == "number"){if(data1 > 1 || isNaN(data1)){const err4 = {instancePath:instancePath+"/opacity",schemaPath:"#/properties/opacity/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data1 < 0 || isNaN(data1)){const err5 = {instancePath:instancePath+"/opacity",schemaPath:"#/properties/opacity/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/opacity",schemaPath:"#/properties/opacity/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.blur !== undefined){if(!(validate23(data.blur, {instancePath:instancePath+"/blur",parentData:data,parentDataProperty:"blur",rootData}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}}if(data.animations !== undefined){if(!(validate25(data.animations, {instancePath:instancePath+"/animations",parentData:data,parentDataProperty:"animations",rootData}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}else {const err7 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate108.errors = vErrors;return errors === 0;}function validate107(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-screen.json" */;let vErrors = null;let errors = 0;if(!(validate108(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate108.errors : vErrors.concat(validate108.errors);errors = vErrors.length;}validate107.errors = vErrors;return errors === 0;}export const validateActionSfx = validate112;const schema40 = {"$id":"https://route-engine.runtime/schemas/runtime/action-sfx.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/sfx"};const schema41 = {"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/definitions/audioSound"}},"channels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"volume":{"type":"number","minimum":0,"maximum":100},"muted":{"type":"boolean"},"pan":{"type":"number","minimum":-1,"maximum":1},"loop":{"type":"boolean"},"interruption":{"type":"string","enum":["immediate","loopEnd"]},"applyMode":{"type":"string","enum":["singleLine","persistent"]},"sounds":{"type":"array","items":{"$ref":"#/definitions/audioSound"}}},"required":["id","sounds"],"additionalProperties":false}}},"allOf":[{"not":{"required":["items","channels"]}}],"additionalProperties":false};const schema17 = {"type":"object","properties":{"id":{"type":"string","minLength":1},"resourceId":{"type":"string","minLength":1},"loop":{"type":"boolean"},"volume":{"type":"number","minimum":0,"maximum":100},"muted":{"type":"boolean"},"pan":{"type":"number","minimum":-1,"maximum":1},"startDelayMs":{"type":"number","minimum":0},"playbackRate":{"type":"number","minimum":0},"startAt":{"type":"number","minimum":0},"endAt":{"type":["number","null"],"minimum":0},"beginEffect":{"$ref":"#/definitions/audioEffectSelection"},"endEffect":{"$ref":"#/definitions/audioEffectSelection"}},"required":["id","resourceId"],"additionalProperties":false};function validate53(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.id === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "id"},message:"must have required property '"+"id"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.resourceId === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "resourceId"},message:"must have required property '"+"resourceId"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!(func2.call(schema17.properties, key0))){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.id !== undefined){let data0 = data.id;if(typeof data0 === "string"){if(func4(data0) < 1){const err3 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}else {const err4 = {instancePath:instancePath+"/id",schemaPath:"#/properties/id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.resourceId !== undefined){let data1 = data.resourceId;if(typeof data1 === "string"){if(func4(data1) < 1){const err5 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}else {const err6 = {instancePath:instancePath+"/resourceId",schemaPath:"#/properties/resourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.loop !== undefined){if(typeof data.loop !== "boolean"){const err7 = {instancePath:instancePath+"/loop",schemaPath:"#/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.volume !== undefined){let data3 = data.volume;if(typeof data3 == "number"){if(data3 > 100 || isNaN(data3)){const err8 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data3 < 0 || isNaN(data3)){const err9 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.muted !== undefined){if(typeof data.muted !== "boolean"){const err11 = {instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.pan !== undefined){let data5 = data.pan;if(typeof data5 == "number"){if(data5 > 1 || isNaN(data5)){const err12 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data5 < -1 || isNaN(data5)){const err13 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}else {const err14 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.startDelayMs !== undefined){let data6 = data.startDelayMs;if(typeof data6 == "number"){if(data6 < 0 || isNaN(data6)){const err15 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}else {const err16 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.playbackRate !== undefined){let data7 = data.playbackRate;if(typeof data7 == "number"){if(data7 < 0 || isNaN(data7)){const err17 = {instancePath:instancePath+"/playbackRate",schemaPath:"#/properties/playbackRate/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}else {const err18 = {instancePath:instancePath+"/playbackRate",schemaPath:"#/properties/playbackRate/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.startAt !== undefined){let data8 = data.startAt;if(typeof data8 == "number"){if(data8 < 0 || isNaN(data8)){const err19 = {instancePath:instancePath+"/startAt",schemaPath:"#/properties/startAt/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/startAt",schemaPath:"#/properties/startAt/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.endAt !== undefined){let data9 = data.endAt;if((!(typeof data9 == "number")) && (data9 !== null)){const err21 = {instancePath:instancePath+"/endAt",schemaPath:"#/properties/endAt/type",keyword:"type",params:{type: schema17.properties.endAt.type},message:"must be number,null"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}if(typeof data9 == "number"){if(data9 < 0 || isNaN(data9)){const err22 = {instancePath:instancePath+"/endAt",schemaPath:"#/properties/endAt/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}}if(data.beginEffect !== undefined){if(!(validate54(data.beginEffect, {instancePath:instancePath+"/beginEffect",parentData:data,parentDataProperty:"beginEffect",rootData}))){vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);errors = vErrors.length;}}if(data.endEffect !== undefined){if(!(validate54(data.endEffect, {instancePath:instancePath+"/endEffect",parentData:data,parentDataProperty:"endEffect",rootData}))){vErrors = vErrors === null ? validate54.errors : vErrors.concat(validate54.errors);errors = vErrors.length;}}}else {const err23 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}validate53.errors = vErrors;return errors === 0;}function validate113(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs2 = errors;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.items === undefined) && (missing0 = "items")) || ((data.channels === undefined) && (missing0 = "channels"))){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var valid1 = _errs3 === errors;if(valid1){const err1 = {instancePath,schemaPath:"#/allOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}else {errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}}if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!((key0 === "items") || (key0 === "channels"))){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.items !== undefined){let data0 = data.items;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0 100 || isNaN(data5)){const err9 = {instancePath:instancePath+"/channels/" + i1+"/volume",schemaPath:"#/properties/channels/items/properties/volume/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data5 < 0 || isNaN(data5)){const err10 = {instancePath:instancePath+"/channels/" + i1+"/volume",schemaPath:"#/properties/channels/items/properties/volume/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/channels/" + i1+"/volume",schemaPath:"#/properties/channels/items/properties/volume/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data3.muted !== undefined){if(typeof data3.muted !== "boolean"){const err12 = {instancePath:instancePath+"/channels/" + i1+"/muted",schemaPath:"#/properties/channels/items/properties/muted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data3.pan !== undefined){let data7 = data3.pan;if(typeof data7 == "number"){if(data7 > 1 || isNaN(data7)){const err13 = {instancePath:instancePath+"/channels/" + i1+"/pan",schemaPath:"#/properties/channels/items/properties/pan/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data7 < -1 || isNaN(data7)){const err14 = {instancePath:instancePath+"/channels/" + i1+"/pan",schemaPath:"#/properties/channels/items/properties/pan/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/channels/" + i1+"/pan",schemaPath:"#/properties/channels/items/properties/pan/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data3.loop !== undefined){if(typeof data3.loop !== "boolean"){const err16 = {instancePath:instancePath+"/channels/" + i1+"/loop",schemaPath:"#/properties/channels/items/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data3.interruption !== undefined){let data9 = data3.interruption;if(typeof data9 !== "string"){const err17 = {instancePath:instancePath+"/channels/" + i1+"/interruption",schemaPath:"#/properties/channels/items/properties/interruption/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if(!((data9 === "immediate") || (data9 === "loopEnd"))){const err18 = {instancePath:instancePath+"/channels/" + i1+"/interruption",schemaPath:"#/properties/channels/items/properties/interruption/enum",keyword:"enum",params:{allowedValues: schema41.properties.channels.items.properties.interruption.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data3.applyMode !== undefined){let data10 = data3.applyMode;if(typeof data10 !== "string"){const err19 = {instancePath:instancePath+"/channels/" + i1+"/applyMode",schemaPath:"#/properties/channels/items/properties/applyMode/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(!((data10 === "singleLine") || (data10 === "persistent"))){const err20 = {instancePath:instancePath+"/channels/" + i1+"/applyMode",schemaPath:"#/properties/channels/items/properties/applyMode/enum",keyword:"enum",params:{allowedValues: schema41.properties.channels.items.properties.applyMode.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data3.sounds !== undefined){let data11 = data3.sounds;if(Array.isArray(data11)){const len2 = data11.length;for(let i2=0; i2 1 || isNaN(data22)){const err29 = {instancePath:instancePath+"/items/" + i0+"/alpha",schemaPath:"#/properties/items/items/properties/alpha/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}if(data22 < 0 || isNaN(data22)){const err30 = {instancePath:instancePath+"/items/" + i0+"/alpha",schemaPath:"#/properties/items/items/properties/alpha/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}else {const err31 = {instancePath:instancePath+"/items/" + i0+"/alpha",schemaPath:"#/properties/items/items/properties/alpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}if(data1.opacity !== undefined){let data23 = data1.opacity;if(typeof data23 == "number"){if(data23 > 1 || isNaN(data23)){const err32 = {instancePath:instancePath+"/items/" + i0+"/opacity",schemaPath:"#/properties/items/items/properties/opacity/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}if(data23 < 0 || isNaN(data23)){const err33 = {instancePath:instancePath+"/items/" + i0+"/opacity",schemaPath:"#/properties/items/items/properties/opacity/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}}else {const err34 = {instancePath:instancePath+"/items/" + i0+"/opacity",schemaPath:"#/properties/items/items/properties/opacity/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}if(data1.blur !== undefined){if(!(validate23(data1.blur, {instancePath:instancePath+"/items/" + i0+"/blur",parentData:data1,parentDataProperty:"blur",rootData}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}}if(data1.filters !== undefined){if(!(validate30(data1.filters, {instancePath:instancePath+"/items/" + i0+"/filters",parentData:data1,parentDataProperty:"filters",rootData}))){vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);errors = vErrors.length;}}if(data1.animations !== undefined){if(!(validate25(data1.animations, {instancePath:instancePath+"/items/" + i0+"/animations",parentData:data1,parentDataProperty:"animations",rootData}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}else {const err35 = {instancePath:instancePath+"/items/" + i0,schemaPath:"#/properties/items/items/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}}else {const err36 = {instancePath:instancePath+"/items",schemaPath:"#/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}}else {const err37 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}validate118.errors = vErrors;return errors === 0;}function validate117(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-visual.json" */;let vErrors = null;let errors = 0;if(!(validate118(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate118.errors : vErrors.concat(validate118.errors);errors = vErrors.length;}validate117.errors = vErrors;return errors === 0;}export const validateActionVoice = validate126;const schema44 = {"$id":"https://route-engine.runtime/schemas/runtime/action-voice.json","$ref":"https://route-engine.runtime/schemas/presentationActions.yaml#/properties/voice"};const schema45 = {"type":"object","properties":{"sounds":{"type":"array","items":{"$ref":"#/definitions/audioSound"}},"resourceId":{"type":"string"},"volume":{"type":"number","minimum":0,"maximum":100},"muted":{"type":"boolean"},"pan":{"type":"number","minimum":-1,"maximum":1},"loop":{"type":"boolean"},"interruption":{"type":"string","enum":["immediate","loopEnd"]},"startDelayMs":{"type":"number","minimum":0}},"anyOf":[{"required":["resourceId"]},{"required":["sounds"]}],"allOf":[{"not":{"required":["resourceId","sounds"]}},{"not":{"required":["startDelayMs","sounds"]}}],"additionalProperties":false};function validate127(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs1 = errors;let valid0 = false;const _errs2 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.resourceId === undefined){const err0 = {instancePath,schemaPath:"#/anyOf/0/required",keyword:"required",params:{missingProperty: "resourceId"},message:"must have required property '"+"resourceId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}var _valid0 = _errs2 === errors;valid0 = valid0 || _valid0;if(!valid0){const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.sounds === undefined){const err1 = {instancePath,schemaPath:"#/anyOf/1/required",keyword:"required",params:{missingProperty: "sounds"},message:"must have required property '"+"sounds"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}var _valid0 = _errs3 === errors;valid0 = valid0 || _valid0;}if(!valid0){const err2 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}else {errors = _errs1;if(vErrors !== null){if(_errs1){vErrors.length = _errs1;}else {vErrors = null;}}}const _errs5 = errors;const _errs6 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if(((data.resourceId === undefined) && (missing0 = "resourceId")) || ((data.sounds === undefined) && (missing0 = "sounds"))){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}var valid2 = _errs6 === errors;if(valid2){const err4 = {instancePath,schemaPath:"#/allOf/0/not",keyword:"not",params:{},message:"must NOT be valid"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs5;if(vErrors !== null){if(_errs5){vErrors.length = _errs5;}else {vErrors = null;}}}const _errs8 = errors;const _errs9 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing1;if(((data.startDelayMs === undefined) && (missing1 = "startDelayMs")) || ((data.sounds === undefined) && (missing1 = "sounds"))){const err5 = {};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}var valid3 = _errs9 === errors;if(valid3){const err6 = {instancePath,schemaPath:"#/allOf/1/not",keyword:"not",params:{},message:"must NOT be valid"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}else {errors = _errs8;if(vErrors !== null){if(_errs8){vErrors.length = _errs8;}else {vErrors = null;}}}if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!((((((((key0 === "sounds") || (key0 === "resourceId")) || (key0 === "volume")) || (key0 === "muted")) || (key0 === "pan")) || (key0 === "loop")) || (key0 === "interruption")) || (key0 === "startDelayMs"))){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.sounds !== undefined){let data0 = data.sounds;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0 100 || isNaN(data3)){const err10 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data3 < 0 || isNaN(data3)){const err11 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}else {const err12 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.muted !== undefined){if(typeof data.muted !== "boolean"){const err13 = {instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.pan !== undefined){let data5 = data.pan;if(typeof data5 == "number"){if(data5 > 1 || isNaN(data5)){const err14 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(data5 < -1 || isNaN(data5)){const err15 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}else {const err16 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.loop !== undefined){if(typeof data.loop !== "boolean"){const err17 = {instancePath:instancePath+"/loop",schemaPath:"#/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.interruption !== undefined){let data7 = data.interruption;if(typeof data7 !== "string"){const err18 = {instancePath:instancePath+"/interruption",schemaPath:"#/properties/interruption/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(!((data7 === "immediate") || (data7 === "loopEnd"))){const err19 = {instancePath:instancePath+"/interruption",schemaPath:"#/properties/interruption/enum",keyword:"enum",params:{allowedValues: schema45.properties.interruption.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}if(data.startDelayMs !== undefined){let data8 = data.startDelayMs;if(typeof data8 == "number"){if(data8 < 0 || isNaN(data8)){const err20 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}else {const err21 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/type",keyword:"type",params:{type: "number"},message:"must be number"};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++;}validate127.errors = vErrors;return errors === 0;}function validate126(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/action-voice.json" */;let vErrors = null;let errors = 0;if(!(validate127(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate127.errors : vErrors.concat(validate127.errors);errors = vErrors.length;}validate126.errors = vErrors;return errors === 0;}export const validateResourceAchievement = validate130;const schema46 = {"$id":"https://route-engine.runtime/schemas/runtime/resource-achievement.json","$ref":"https://route-engine.runtime/schemas/projectData/resources.yaml#/properties/achievements/patternProperties/^.+$"};const schema90 = {"type":"object","properties":{"type":{"type":"string","enum":["boolean","number"]},"target":{"type":"integer","minimum":1},"name":{"type":"string","minLength":1},"description":{"type":"string","minLength":1},"lockedName":{"type":"string","minLength":1},"lockedDescription":{"type":"string","minLength":1},"hidden":{"type":"boolean"}},"required":["type","name","description"],"allOf":[{"if":{"properties":{"type":{"const":"number"}}},"then":{"required":["target"]}},{"if":{"properties":{"type":{"const":"boolean"}}},"then":{"not":{"required":["target"]}}}],"additionalProperties":false};function validate269(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.type !== undefined){if("number" !== data.type){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs5 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.target === undefined){const err1 = {instancePath,schemaPath:"#/allOf/0/then/required",keyword:"required",params:{missingProperty: "target"},message:"must have required property '"+"target"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}var _valid0 = _errs5 === errors;valid1 = _valid0;}if(!valid1){const err2 = {instancePath,schemaPath:"#/allOf/0/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}const _errs7 = errors;let valid3 = true;const _errs8 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.type !== undefined){if("boolean" !== data.type){const err3 = {};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}var _valid1 = _errs8 === errors;errors = _errs7;if(vErrors !== null){if(_errs7){vErrors.length = _errs7;}else {vErrors = null;}}if(_valid1){const _errs10 = errors;const _errs11 = errors;const _errs12 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.target === undefined) && (missing0 = "target")){const err4 = {};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}var valid5 = _errs12 === errors;if(valid5){const err5 = {instancePath,schemaPath:"#/allOf/1/then/not",keyword:"not",params:{},message:"must NOT be valid"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}else {errors = _errs11;if(vErrors !== null){if(_errs11){vErrors.length = _errs11;}else {vErrors = null;}}}var _valid1 = _errs10 === errors;valid3 = _valid1;}if(!valid3){const err6 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.type === undefined){const err7 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "type"},message:"must have required property '"+"type"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.name === undefined){const err8 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "name"},message:"must have required property '"+"name"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.description === undefined){const err9 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "description"},message:"must have required property '"+"description"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key0 in data){if(!(((((((key0 === "type") || (key0 === "target")) || (key0 === "name")) || (key0 === "description")) || (key0 === "lockedName")) || (key0 === "lockedDescription")) || (key0 === "hidden"))){const err10 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.type !== undefined){let data2 = data.type;if(typeof data2 !== "string"){const err11 = {instancePath:instancePath+"/type",schemaPath:"#/properties/type/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(!((data2 === "boolean") || (data2 === "number"))){const err12 = {instancePath:instancePath+"/type",schemaPath:"#/properties/type/enum",keyword:"enum",params:{allowedValues: schema90.properties.type.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.target !== undefined){let data3 = data.target;if(!((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3)))){const err13 = {instancePath:instancePath+"/target",schemaPath:"#/properties/target/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(typeof data3 == "number"){if(data3 < 1 || isNaN(data3)){const err14 = {instancePath:instancePath+"/target",schemaPath:"#/properties/target/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}if(data.name !== undefined){let data4 = data.name;if(typeof data4 === "string"){if(func4(data4) < 1){const err15 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}else {const err16 = {instancePath:instancePath+"/name",schemaPath:"#/properties/name/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.description !== undefined){let data5 = data.description;if(typeof data5 === "string"){if(func4(data5) < 1){const err17 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}else {const err18 = {instancePath:instancePath+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.lockedName !== undefined){let data6 = data.lockedName;if(typeof data6 === "string"){if(func4(data6) < 1){const err19 = {instancePath:instancePath+"/lockedName",schemaPath:"#/properties/lockedName/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}else {const err20 = {instancePath:instancePath+"/lockedName",schemaPath:"#/properties/lockedName/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.lockedDescription !== undefined){let data7 = data.lockedDescription;if(typeof data7 === "string"){if(func4(data7) < 1){const err21 = {instancePath:instancePath+"/lockedDescription",schemaPath:"#/properties/lockedDescription/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}else {const err22 = {instancePath:instancePath+"/lockedDescription",schemaPath:"#/properties/lockedDescription/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.hidden !== undefined){if(typeof data.hidden !== "boolean"){const err23 = {instancePath:instancePath+"/hidden",schemaPath:"#/properties/hidden/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}}else {const err24 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}validate269.errors = vErrors;return errors === 0;}function validate130(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/resource-achievement.json" */;let vErrors = null;let errors = 0;if(!(validate269(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate269.errors : vErrors.concat(validate269.errors);errors = vErrors.length;}validate130.errors = vErrors;return errors === 0;}export const validateResourceAnimation = validate271;const schema91 = {"$id":"https://route-engine.runtime/schemas/runtime/resource-animation.json","$ref":"https://route-engine.runtime/schemas/projectData/resources.yaml#/properties/animations/patternProperties/^.+$"};const schema48 = {"type":"object","required":["type"],"$defs":{"keyframe":{"type":"object","required":["value","duration"],"properties":{"value":{"type":"number"},"duration":{"type":"number"},"easing":{"type":"string","enum":["linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","easeOutSine","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInBack","easeOutBack","easeInOutBack","easeInBounce","easeOutBounce","easeInOutBounce","easeInElastic","easeOutElastic","easeInOutElastic"]},"relative":{"type":"boolean"}},"additionalProperties":false},"tweenProperty":{"type":"object","properties":{"initialValue":{"type":"number"},"keyframes":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/keyframe"}}},"required":["keyframes"],"additionalProperties":false},"updateTween":{"type":"object","properties":{"alpha":{"$ref":"#/$defs/tweenProperty"},"x":{"$ref":"#/$defs/tweenProperty"},"y":{"$ref":"#/$defs/tweenProperty"},"scaleX":{"$ref":"#/$defs/tweenProperty"},"scaleY":{"$ref":"#/$defs/tweenProperty"},"rotation":{"$ref":"#/$defs/tweenProperty"}},"additionalProperties":false,"minProperties":1},"transitionTween":{"type":"object","properties":{"translateX":{"$ref":"#/$defs/tweenProperty"},"translateY":{"$ref":"#/$defs/tweenProperty"},"alpha":{"$ref":"#/$defs/tweenProperty"},"scaleX":{"$ref":"#/$defs/tweenProperty"},"scaleY":{"$ref":"#/$defs/tweenProperty"},"rotation":{"$ref":"#/$defs/tweenProperty"}},"additionalProperties":false,"minProperties":1},"transitionSide":{"type":"object","required":["tween"],"properties":{"tween":{"$ref":"#/$defs/transitionTween"}},"additionalProperties":false},"maskProgress":{"$ref":"#/$defs/tweenProperty"},"compositeMaskItem":{"type":"object","required":["texture"],"properties":{"texture":{"type":"string"},"channel":{"type":"string","enum":["red","green","blue","alpha"]},"invert":{"type":"boolean"}},"additionalProperties":false},"mask":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["single","sequence","composite"]},"texture":{"type":"string"},"textures":{"type":"array","minItems":1,"items":{"type":"string"}},"items":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/compositeMaskItem"}},"combine":{"type":"string","enum":["max","min","multiply","add"]},"channel":{"type":"string","enum":["red","green","blue","alpha"]},"softness":{"type":"number"},"invert":{"type":"boolean"},"sample":{"type":"string"},"progress":{"$ref":"#/$defs/maskProgress"}},"additionalProperties":false,"allOf":[{"if":{"properties":{"kind":{"const":"single"}}},"then":{"required":["texture"]}},{"if":{"properties":{"kind":{"const":"sequence"}}},"then":{"required":["textures"]}},{"if":{"properties":{"kind":{"const":"composite"}}},"then":{"required":["items"]}}]}},"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["update","transition"]},"complete":{"type":"object","properties":{"payload":{"type":"object"}},"additionalProperties":true},"tween":{"$ref":"#/$defs/updateTween"},"prev":{"$ref":"#/$defs/transitionSide"},"next":{"$ref":"#/$defs/transitionSide"},"mask":{"$ref":"#/$defs/mask"}},"allOf":[{"if":{"properties":{"type":{"const":"update"}}},"then":{"required":["tween"],"not":{"anyOf":[{"required":["prev"]},{"required":["next"]},{"required":["mask"]}]}}},{"if":{"properties":{"type":{"const":"transition"}}},"then":{"not":{"required":["tween"]},"anyOf":[{"required":["prev"]},{"required":["next"]},{"required":["mask"]}]}}],"additionalProperties":false,"$id":"https://route-engine.runtime/schemas/projectData/animationResource.yaml"};const schema49 = {"type":"object","properties":{"alpha":{"$ref":"#/$defs/tweenProperty"},"x":{"$ref":"#/$defs/tweenProperty"},"y":{"$ref":"#/$defs/tweenProperty"},"scaleX":{"$ref":"#/$defs/tweenProperty"},"scaleY":{"$ref":"#/$defs/tweenProperty"},"rotation":{"$ref":"#/$defs/tweenProperty"}},"additionalProperties":false,"minProperties":1};const schema50 = {"type":"object","properties":{"initialValue":{"type":"number"},"keyframes":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/keyframe"}}},"required":["keyframes"],"additionalProperties":false};const schema51 = {"type":"object","required":["value","duration"],"properties":{"value":{"type":"number"},"duration":{"type":"number"},"easing":{"type":"string","enum":["linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","easeOutSine","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeInBack","easeOutBack","easeInOutBack","easeInBounce","easeOutBounce","easeInOutBounce","easeInElastic","easeOutElastic","easeInOutElastic"]},"relative":{"type":"boolean"}},"additionalProperties":false};function validate135(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.value === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "value"},message:"must have required property '"+"value"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.duration === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "duration"},message:"must have required property '"+"duration"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((((key0 === "value") || (key0 === "duration")) || (key0 === "easing")) || (key0 === "relative"))){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.value !== undefined){if(!(typeof data.value == "number")){const err3 = {instancePath:instancePath+"/value",schemaPath:"#/properties/value/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.duration !== undefined){if(!(typeof data.duration == "number")){const err4 = {instancePath:instancePath+"/duration",schemaPath:"#/properties/duration/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.easing !== undefined){let data2 = data.easing;if(typeof data2 !== "string"){const err5 = {instancePath:instancePath+"/easing",schemaPath:"#/properties/easing/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(!(((((((((((((((((((((((((((((((data2 === "linear") || (data2 === "easeInQuad")) || (data2 === "easeOutQuad")) || (data2 === "easeInOutQuad")) || (data2 === "easeInCubic")) || (data2 === "easeOutCubic")) || (data2 === "easeInOutCubic")) || (data2 === "easeInQuart")) || (data2 === "easeOutQuart")) || (data2 === "easeInOutQuart")) || (data2 === "easeInQuint")) || (data2 === "easeOutQuint")) || (data2 === "easeInOutQuint")) || (data2 === "easeInSine")) || (data2 === "easeOutSine")) || (data2 === "easeInOutSine")) || (data2 === "easeInExpo")) || (data2 === "easeOutExpo")) || (data2 === "easeInOutExpo")) || (data2 === "easeInCirc")) || (data2 === "easeOutCirc")) || (data2 === "easeInOutCirc")) || (data2 === "easeInBack")) || (data2 === "easeOutBack")) || (data2 === "easeInOutBack")) || (data2 === "easeInBounce")) || (data2 === "easeOutBounce")) || (data2 === "easeInOutBounce")) || (data2 === "easeInElastic")) || (data2 === "easeOutElastic")) || (data2 === "easeInOutElastic"))){const err6 = {instancePath:instancePath+"/easing",schemaPath:"#/properties/easing/enum",keyword:"enum",params:{allowedValues: schema51.properties.easing.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.relative !== undefined){if(typeof data.relative !== "boolean"){const err7 = {instancePath:instancePath+"/relative",schemaPath:"#/properties/relative/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}validate135.errors = vErrors;return errors === 0;}function validate134(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.keyframes === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyframes"},message:"must have required property '"+"keyframes"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === "initialValue") || (key0 === "keyframes"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.initialValue !== undefined){if(!(typeof data.initialValue == "number")){const err2 = {instancePath:instancePath+"/initialValue",schemaPath:"#/properties/initialValue/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.keyframes !== undefined){let data1 = data.keyframes;if(Array.isArray(data1)){if(data1.length < 1){const err3 = {instancePath:instancePath+"/keyframes",schemaPath:"#/properties/keyframes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}const len0 = data1.length;for(let i0=0; i0=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+"/duration",schemaPath:"#/properties/duration/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.delay !== undefined){let data3 = data.delay;if(typeof data3 == "number"){if(data3 < 0 || isNaN(data3)){const err6 = {instancePath:instancePath+"/delay",schemaPath:"#/properties/delay/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+"/delay",schemaPath:"#/properties/delay/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.easing !== undefined){if(!(validate170(data.easing, {instancePath:instancePath+"/easing",parentData:data,parentDataProperty:"easing",rootData}))){vErrors = vErrors === null ? validate170.errors : vErrors.concat(validate170.errors);errors = vErrors.length;}}if(data.relative !== undefined){if(typeof data.relative !== "boolean"){const err8 = {instancePath:instancePath+"/relative",schemaPath:"#/properties/relative/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}else {const err9 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate167.errors = vErrors;return errors === 0;}function validate166(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(!(validate167(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate167.errors : vErrors.concat(validate167.errors);errors = vErrors.length;}const _errs2 = errors;let valid1 = true;const _errs3 = errors;if(data && typeof data == "object" && !Array.isArray(data)){let missing0;if((data.value === undefined) && (missing0 = "value")){const err0 = {};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}else {if(data.value !== undefined){const _errs4 = errors;if(!(typeof data.value == "number")){const err1 = {};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}var valid2 = _errs4 === errors;}else {var valid2 = true;}if(valid2){if(data.relative !== undefined){const _errs6 = errors;if(false !== data.relative){const err2 = {};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}var valid2 = _errs6 === errors;}else {var valid2 = true;}}}}var _valid0 = _errs3 === errors;errors = _errs2;if(vErrors !== null){if(_errs2){vErrors.length = _errs2;}else {vErrors = null;}}if(_valid0){const _errs7 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.value !== undefined){let data2 = data.value;if(typeof data2 == "number"){if(data2 > 100 || isNaN(data2)){const err3 = {instancePath:instancePath+"/value",schemaPath:"#/allOf/1/then/properties/value/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data2 < 0 || isNaN(data2)){const err4 = {instancePath:instancePath+"/value",schemaPath:"#/allOf/1/then/properties/value/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var _valid0 = _errs7 === errors;valid1 = _valid0;}if(!valid1){const err5 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}const _errs10 = errors;let valid4 = true;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.relative !== undefined){if(false !== data.relative){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}var _valid1 = _errs11 === errors;errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}if(_valid1){const _errs13 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.startValue !== undefined){let data4 = data.startValue;if(typeof data4 == "number"){if(data4 > 100 || isNaN(data4)){const err7 = {instancePath:instancePath+"/startValue",schemaPath:"#/allOf/2/then/properties/startValue/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data4 < 0 || isNaN(data4)){const err8 = {instancePath:instancePath+"/startValue",schemaPath:"#/allOf/2/then/properties/startValue/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}}var _valid1 = _errs13 === errors;valid4 = _valid1;}if(!valid4){const err9 = {instancePath,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate166.errors = vErrors;return errors === 0;}function validate165(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.keyframes === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyframes"},message:"must have required property '"+"keyframes"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "keyframes")){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.keyframes !== undefined){let data0 = data.keyframes;if(Array.isArray(data0)){if(data0.length < 1){const err2 = {instancePath:instancePath+"/keyframes",schemaPath:"#/properties/keyframes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}const len0 = data0.length;for(let i0=0; i0 1 || isNaN(data2)){const err3 = {instancePath:instancePath+"/value",schemaPath:"#/allOf/1/then/properties/value/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data2 < -1 || isNaN(data2)){const err4 = {instancePath:instancePath+"/value",schemaPath:"#/allOf/1/then/properties/value/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}}var _valid0 = _errs7 === errors;valid1 = _valid0;}if(!valid1){const err5 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}const _errs10 = errors;let valid4 = true;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.relative !== undefined){if(false !== data.relative){const err6 = {};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}var _valid1 = _errs11 === errors;errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}if(_valid1){const _errs13 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.startValue !== undefined){let data4 = data.startValue;if(typeof data4 == "number"){if(data4 > 1 || isNaN(data4)){const err7 = {instancePath:instancePath+"/startValue",schemaPath:"#/allOf/2/then/properties/startValue/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data4 < -1 || isNaN(data4)){const err8 = {instancePath:instancePath+"/startValue",schemaPath:"#/allOf/2/then/properties/startValue/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}}}var _valid1 = _errs13 === errors;valid4 = _valid1;}if(!valid4){const err9 = {instancePath,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}validate176.errors = vErrors;return errors === 0;}function validate175(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.keyframes === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyframes"},message:"must have required property '"+"keyframes"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "keyframes")){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.keyframes !== undefined){let data0 = data.keyframes;if(Array.isArray(data0)){if(data0.length < 1){const err2 = {instancePath:instancePath+"/keyframes",schemaPath:"#/properties/keyframes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}const len0 = data0.length;for(let i0=0; i0=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}}var _valid0 = _errs7 === errors;valid1 = _valid0;}if(!valid1){const err4 = {instancePath,schemaPath:"#/allOf/1/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}const _errs10 = errors;let valid4 = true;const _errs11 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.relative !== undefined){if(false !== data.relative){const err5 = {};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}var _valid1 = _errs11 === errors;errors = _errs10;if(vErrors !== null){if(_errs10){vErrors.length = _errs10;}else {vErrors = null;}}if(_valid1){const _errs13 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.startValue !== undefined){let data4 = data.startValue;if(typeof data4 == "number"){if(data4 < 0 || isNaN(data4)){const err6 = {instancePath:instancePath+"/startValue",schemaPath:"#/allOf/2/then/properties/startValue/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}var _valid1 = _errs13 === errors;valid4 = _valid1;}if(!valid4){const err7 = {instancePath,schemaPath:"#/allOf/2/if",keyword:"if",params:{failingKeyword: "then"},message:"must match \"then\" schema"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}validate181.errors = vErrors;return errors === 0;}function validate180(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.keyframes === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "keyframes"},message:"must have required property '"+"keyframes"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "keyframes")){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.keyframes !== undefined){let data0 = data.keyframes;if(Array.isArray(data0)){if(data0.length < 1){const err2 = {instancePath:instancePath+"/keyframes",schemaPath:"#/properties/keyframes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}const len0 = data0.length;for(let i0=0; i0=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath:instancePath+"/delay",schemaPath:"#/oneOf/0/properties/delay/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.duration !== undefined){let data1 = data.duration;if(typeof data1 == "number"){if(data1 < 0 || isNaN(data1)){const err4 = {instancePath:instancePath+"/duration",schemaPath:"#/oneOf/0/properties/duration/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}else {const err5 = {instancePath:instancePath+"/duration",schemaPath:"#/oneOf/0/properties/duration/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.easing !== undefined){if(!(validate170(data.easing, {instancePath:instancePath+"/easing",parentData:data,parentDataProperty:"easing",rootData}))){vErrors = vErrors === null ? validate170.errors : vErrors.concat(validate170.errors);errors = vErrors.length;}}}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;}const _errs9 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.keyframes === undefined){const err7 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "keyframes"},message:"must have required property '"+"keyframes"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key1 in data){if(!(key1 === "keyframes")){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.keyframes !== undefined){let data3 = data.keyframes;if(Array.isArray(data3)){if(data3.length < 1){const err9 = {instancePath:instancePath+"/keyframes",schemaPath:"#/oneOf/1/properties/keyframes/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}const len0 = data3.length;for(let i0=0; i0", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.height !== undefined){let data1 = data.height;if(typeof data1 == "number"){if(data1 <= 0 || isNaN(data1)){const err16 = {instancePath:instancePath+"/height",schemaPath:"#/properties/height/exclusiveMinimum",keyword:"exclusiveMinimum",params:{comparison: ">", limit: 0},message:"must be > 0"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/height",schemaPath:"#/properties/height/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.seed !== undefined){if(!(typeof data.seed == "number")){const err18 = {instancePath:instancePath+"/seed",schemaPath:"#/properties/seed/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.modules !== undefined){let data3 = data.modules;if(data3 && typeof data3 == "object" && !Array.isArray(data3)){if(data3.emission === undefined){const err19 = {instancePath:instancePath+"/modules",schemaPath:"#/properties/modules/required",keyword:"required",params:{missingProperty: "emission"},message:"must have required property '"+"emission"+"'"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(data3.appearance === undefined){const err20 = {instancePath:instancePath+"/modules",schemaPath:"#/properties/modules/required",keyword:"required",params:{missingProperty: "appearance"},message:"must have required property '"+"appearance"+"'"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}for(const key1 in data3){if(!((((key1 === "emission") || (key1 === "movement")) || (key1 === "appearance")) || (key1 === "bounds"))){const err21 = {instancePath:instancePath+"/modules",schemaPath:"#/properties/modules/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data3.emission !== undefined){let data4 = data3.emission;if(data4 && typeof data4 == "object" && !Array.isArray(data4)){}else {const err22 = {instancePath:instancePath+"/modules/emission",schemaPath:"#/properties/modules/properties/emission/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data3.movement !== undefined){let data5 = data3.movement;if(data5 && typeof data5 == "object" && !Array.isArray(data5)){}else {const err23 = {instancePath:instancePath+"/modules/movement",schemaPath:"#/properties/modules/properties/movement/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data3.appearance !== undefined){let data6 = data3.appearance;if(data6 && typeof data6 == "object" && !Array.isArray(data6)){}else {const err24 = {instancePath:instancePath+"/modules/appearance",schemaPath:"#/properties/modules/properties/appearance/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data3.bounds !== undefined){let data7 = data3.bounds;if(data7 && typeof data7 == "object" && !Array.isArray(data7)){}else {const err25 = {instancePath:instancePath+"/modules/bounds",schemaPath:"#/properties/modules/properties/bounds/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}}else {const err26 = {instancePath:instancePath+"/modules",schemaPath:"#/properties/modules/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.count !== undefined){let data8 = data.count;if(!((typeof data8 == "number") && (!(data8 % 1) && !isNaN(data8)))){const err27 = {instancePath:instancePath+"/count",schemaPath:"#/properties/count/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}if(typeof data8 == "number"){if(data8 < 1 || isNaN(data8)){const err28 = {instancePath:instancePath+"/count",schemaPath:"#/properties/count/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}}if(data.texture !== undefined){let data9 = data.texture;const _errs36 = errors;let valid5 = false;let passing1 = null;const _errs37 = errors;if(typeof data9 === "string"){if(func4(data9) < 1){const err29 = {instancePath:instancePath+"/texture",schemaPath:"#/properties/texture/oneOf/0/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}}else {const err30 = {instancePath:instancePath+"/texture",schemaPath:"#/properties/texture/oneOf/0/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}var _valid2 = _errs37 === errors;if(_valid2){valid5 = true;passing1 = 0;}const _errs39 = errors;if(data9 && typeof data9 == "object" && !Array.isArray(data9)){}else {const err31 = {instancePath:instancePath+"/texture",schemaPath:"#/properties/texture/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}var _valid2 = _errs39 === errors;if(_valid2 && valid5){valid5 = false;passing1 = [passing1, 1];}else {if(_valid2){valid5 = true;passing1 = 1;}}if(!valid5){const err32 = {instancePath:instancePath+"/texture",schemaPath:"#/properties/texture/oneOf",keyword:"oneOf",params:{passingSchemas: passing1},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}else {errors = _errs36;if(vErrors !== null){if(_errs36){vErrors.length = _errs36;}else {vErrors = null;}}}}if(data.behaviors !== undefined){let data10 = data.behaviors;if(Array.isArray(data10)){if(data10.length < 1){const err33 = {instancePath:instancePath+"/behaviors",schemaPath:"#/properties/behaviors/minItems",keyword:"minItems",params:{limit: 1},message:"must NOT have fewer than 1 items"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}const len0 = data10.length;for(let i0=0; i0=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err44];}else {vErrors.push(err44);}errors++;}}else {const err45 = {instancePath:instancePath+"/emitter/lifetime/min",schemaPath:"#/properties/emitter/properties/lifetime/properties/min/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err45];}else {vErrors.push(err45);}errors++;}}if(data15.max !== undefined){let data17 = data15.max;if(typeof data17 == "number"){if(data17 < 0 || isNaN(data17)){const err46 = {instancePath:instancePath+"/emitter/lifetime/max",schemaPath:"#/properties/emitter/properties/lifetime/properties/max/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+"/emitter/lifetime/max",schemaPath:"#/properties/emitter/properties/lifetime/properties/max/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err47];}else {vErrors.push(err47);}errors++;}}}else {const err48 = {instancePath:instancePath+"/emitter/lifetime",schemaPath:"#/properties/emitter/properties/lifetime/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err48];}else {vErrors.push(err48);}errors++;}}}else {const err49 = {instancePath:instancePath+"/emitter",schemaPath:"#/properties/emitter/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err49];}else {vErrors.push(err49);}errors++;}}}else {const err50 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err50];}else {vErrors.push(err50);}errors++;}validate322.errors = vErrors;return errors === 0;}function validate321(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/resource-particle.json" */;let vErrors = null;let errors = 0;if(!(validate322(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate322.errors : vErrors.concat(validate322.errors);errors = vErrors.length;}validate321.errors = vErrors;return errors === 0;}export const validateResourceSound = validate324;const schema114 = {"$id":"https://route-engine.runtime/schemas/runtime/resource-sound.json","$ref":"https://route-engine.runtime/schemas/projectData/resources.yaml#/properties/sounds/patternProperties/^.+$"};const schema115 = {"type":"object","properties":{"fileId":{"type":"string"},"fileType":{"type":"string"},"loop":{"type":"boolean"},"volume":{"type":"number","minimum":0,"maximum":100},"muted":{"type":"boolean"},"pan":{"type":"number","minimum":-1,"maximum":1},"startDelayMs":{"type":"number","minimum":0},"playbackRate":{"type":"number","minimum":0},"startAt":{"type":"number","minimum":0},"endAt":{"type":["number","null"],"minimum":0}},"required":["fileId"],"additionalProperties":false};function validate325(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.fileId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "fileId"},message:"must have required property '"+"fileId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(func2.call(schema115.properties, key0))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.fileId !== undefined){if(typeof data.fileId !== "string"){const err2 = {instancePath:instancePath+"/fileId",schemaPath:"#/properties/fileId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.fileType !== undefined){if(typeof data.fileType !== "string"){const err3 = {instancePath:instancePath+"/fileType",schemaPath:"#/properties/fileType/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.loop !== undefined){if(typeof data.loop !== "boolean"){const err4 = {instancePath:instancePath+"/loop",schemaPath:"#/properties/loop/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.volume !== undefined){let data3 = data.volume;if(typeof data3 == "number"){if(data3 > 100 || isNaN(data3)){const err5 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/maximum",keyword:"maximum",params:{comparison: "<=", limit: 100},message:"must be <= 100"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data3 < 0 || isNaN(data3)){const err6 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}else {const err7 = {instancePath:instancePath+"/volume",schemaPath:"#/properties/volume/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.muted !== undefined){if(typeof data.muted !== "boolean"){const err8 = {instancePath:instancePath+"/muted",schemaPath:"#/properties/muted/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.pan !== undefined){let data5 = data.pan;if(typeof data5 == "number"){if(data5 > 1 || isNaN(data5)){const err9 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data5 < -1 || isNaN(data5)){const err10 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/minimum",keyword:"minimum",params:{comparison: ">=", limit: -1},message:"must be >= -1"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}else {const err11 = {instancePath:instancePath+"/pan",schemaPath:"#/properties/pan/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.startDelayMs !== undefined){let data6 = data.startDelayMs;if(typeof data6 == "number"){if(data6 < 0 || isNaN(data6)){const err12 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}else {const err13 = {instancePath:instancePath+"/startDelayMs",schemaPath:"#/properties/startDelayMs/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.playbackRate !== undefined){let data7 = data.playbackRate;if(typeof data7 == "number"){if(data7 < 0 || isNaN(data7)){const err14 = {instancePath:instancePath+"/playbackRate",schemaPath:"#/properties/playbackRate/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}else {const err15 = {instancePath:instancePath+"/playbackRate",schemaPath:"#/properties/playbackRate/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.startAt !== undefined){let data8 = data.startAt;if(typeof data8 == "number"){if(data8 < 0 || isNaN(data8)){const err16 = {instancePath:instancePath+"/startAt",schemaPath:"#/properties/startAt/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/startAt",schemaPath:"#/properties/startAt/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.endAt !== undefined){let data9 = data.endAt;if((!(typeof data9 == "number")) && (data9 !== null)){const err18 = {instancePath:instancePath+"/endAt",schemaPath:"#/properties/endAt/type",keyword:"type",params:{type: schema115.properties.endAt.type},message:"must be number,null"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if(typeof data9 == "number"){if(data9 < 0 || isNaN(data9)){const err19 = {instancePath:instancePath+"/endAt",schemaPath:"#/properties/endAt/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}}else {const err20 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}validate325.errors = vErrors;return errors === 0;}function validate324(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/resource-sound.json" */;let vErrors = null;let errors = 0;if(!(validate325(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate325.errors : vErrors.concat(validate325.errors);errors = vErrors.length;}validate324.errors = vErrors;return errors === 0;}export const validateResourceSpritesheet = validate327;const schema116 = {"$id":"https://route-engine.runtime/schemas/runtime/resource-spritesheet.json","$ref":"https://route-engine.runtime/schemas/projectData/resources.yaml#/properties/spritesheets/patternProperties/^.+$"};const schema117 = {"type":"object","properties":{"fileId":{"type":"string"},"jsonData":{"type":"object"},"width":{"type":"integer"},"height":{"type":"integer"},"animations":{"type":"object","patternProperties":{"^.+$":{"type":"object","properties":{"frames":{"type":"array","items":{"type":"number"}},"animationSpeed":{"type":"number"},"loop":{"type":"boolean"}},"required":["frames"],"additionalProperties":false}}}},"required":["fileId","jsonData","width","height"],"additionalProperties":false};const pattern0 = new RegExp("^.+$", "u");function validate328(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.fileId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "fileId"},message:"must have required property '"+"fileId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.jsonData === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "jsonData"},message:"must have required property '"+"jsonData"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.width === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "width"},message:"must have required property '"+"width"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.height === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "height"},message:"must have required property '"+"height"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!(((((key0 === "fileId") || (key0 === "jsonData")) || (key0 === "width")) || (key0 === "height")) || (key0 === "animations"))){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.fileId !== undefined){if(typeof data.fileId !== "string"){const err5 = {instancePath:instancePath+"/fileId",schemaPath:"#/properties/fileId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.jsonData !== undefined){let data1 = data.jsonData;if(!(data1 && typeof data1 == "object" && !Array.isArray(data1))){const err6 = {instancePath:instancePath+"/jsonData",schemaPath:"#/properties/jsonData/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.width !== undefined){let data2 = data.width;if(!((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2)))){const err7 = {instancePath:instancePath+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.height !== undefined){let data3 = data.height;if(!((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3)))){const err8 = {instancePath:instancePath+"/height",schemaPath:"#/properties/height/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.animations !== undefined){let data4 = data.animations;if(data4 && typeof data4 == "object" && !Array.isArray(data4)){for(const key1 in data4){if(pattern0.test(key1)){let data5 = data4[key1];if(data5 && typeof data5 == "object" && !Array.isArray(data5)){if(data5.frames === undefined){const err9 = {instancePath:instancePath+"/animations/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/animations/patternProperties/%5E.%2B%24/required",keyword:"required",params:{missingProperty: "frames"},message:"must have required property '"+"frames"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}for(const key2 in data5){if(!(((key2 === "frames") || (key2 === "animationSpeed")) || (key2 === "loop"))){const err10 = {instancePath:instancePath+"/animations/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),schemaPath:"#/properties/animations/patternProperties/%5E.%2B%24/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data5.frames !== undefined){let data6 = data5.frames;if(Array.isArray(data6)){const len0 = data6.length;for(let i0=0; i0 1){const indices0 = {};for(;i1--;){let item0 = data0[i1];if(typeof item0 !== "string"){continue;}if(typeof indices0[item0] == "number"){j0 = indices0[item0];const err12 = {instancePath:instancePath+"/fontId",schemaPath:"#/properties/fontId/oneOf/1/uniqueItems",keyword:"uniqueItems",params:{i: i1, j: j0},message:"must NOT have duplicate items (items ## "+j0+" and "+i1+" are identical)"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;break;}indices0[item0] = i1;}}}else {const err13 = {instancePath:instancePath+"/fontId",schemaPath:"#/properties/fontId/oneOf/1/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs6 === errors;if(_valid0 && valid1){valid1 = false;passing0 = [passing0, 1];}else {if(_valid0){valid1 = true;passing0 = 1;}}if(!valid1){const err14 = {instancePath:instancePath+"/fontId",schemaPath:"#/properties/fontId/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}else {errors = _errs3;if(vErrors !== null){if(_errs3){vErrors.length = _errs3;}else {vErrors = null;}}}}if(data.colorId !== undefined){if(typeof data.colorId !== "string"){const err15 = {instancePath:instancePath+"/colorId",schemaPath:"#/properties/colorId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.colorAlpha !== undefined){if(!(typeof data.colorAlpha == "number")){const err16 = {instancePath:instancePath+"/colorAlpha",schemaPath:"#/properties/colorAlpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.fontSize !== undefined){if(!(typeof data.fontSize == "number")){const err17 = {instancePath:instancePath+"/fontSize",schemaPath:"#/properties/fontSize/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.fontWeight !== undefined){if(typeof data.fontWeight !== "string"){const err18 = {instancePath:instancePath+"/fontWeight",schemaPath:"#/properties/fontWeight/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}if(data.fontStyle !== undefined){let data6 = data.fontStyle;if(typeof data6 !== "string"){const err19 = {instancePath:instancePath+"/fontStyle",schemaPath:"#/properties/fontStyle/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}if(!(((data6 === "normal") || (data6 === "italic")) || (data6 === "oblique"))){const err20 = {instancePath:instancePath+"/fontStyle",schemaPath:"#/properties/fontStyle/enum",keyword:"enum",params:{allowedValues: schema119.properties.fontStyle.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}}if(data.lineHeight !== undefined){if(!(typeof data.lineHeight == "number")){const err21 = {instancePath:instancePath+"/lineHeight",schemaPath:"#/properties/lineHeight/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}}if(data.align !== undefined){if(typeof data.align !== "string"){const err22 = {instancePath:instancePath+"/align",schemaPath:"#/properties/align/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.wordWrap !== undefined){if(typeof data.wordWrap !== "boolean"){const err23 = {instancePath:instancePath+"/wordWrap",schemaPath:"#/properties/wordWrap/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}}if(data.breakWords !== undefined){if(typeof data.breakWords !== "boolean"){const err24 = {instancePath:instancePath+"/breakWords",schemaPath:"#/properties/breakWords/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}if(data.wordWrapWidth !== undefined){if(!(typeof data.wordWrapWidth == "number")){const err25 = {instancePath:instancePath+"/wordWrapWidth",schemaPath:"#/properties/wordWrapWidth/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}}if(data.strokeColorId !== undefined){if(typeof data.strokeColorId !== "string"){const err26 = {instancePath:instancePath+"/strokeColorId",schemaPath:"#/properties/strokeColorId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}}if(data.strokeAlpha !== undefined){if(!(typeof data.strokeAlpha == "number")){const err27 = {instancePath:instancePath+"/strokeAlpha",schemaPath:"#/properties/strokeAlpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err27];}else {vErrors.push(err27);}errors++;}}if(data.strokeWidth !== undefined){if(!(typeof data.strokeWidth == "number")){const err28 = {instancePath:instancePath+"/strokeWidth",schemaPath:"#/properties/strokeWidth/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err28];}else {vErrors.push(err28);}errors++;}}if(data.shadow !== undefined){let data15 = data.shadow;if(data15 && typeof data15 == "object" && !Array.isArray(data15)){if(data15.colorId === undefined){const err29 = {instancePath:instancePath+"/shadow",schemaPath:"#/properties/shadow/required",keyword:"required",params:{missingProperty: "colorId"},message:"must have required property '"+"colorId"+"'"};if(vErrors === null){vErrors = [err29];}else {vErrors.push(err29);}errors++;}for(const key1 in data15){if(!(((((key1 === "colorId") || (key1 === "alpha")) || (key1 === "blur")) || (key1 === "offsetX")) || (key1 === "offsetY"))){const err30 = {instancePath:instancePath+"/shadow",schemaPath:"#/properties/shadow/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err30];}else {vErrors.push(err30);}errors++;}}if(data15.colorId !== undefined){let data16 = data15.colorId;if(typeof data16 === "string"){if(func4(data16) < 1){const err31 = {instancePath:instancePath+"/shadow/colorId",schemaPath:"#/properties/shadow/properties/colorId/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err31];}else {vErrors.push(err31);}errors++;}}else {const err32 = {instancePath:instancePath+"/shadow/colorId",schemaPath:"#/properties/shadow/properties/colorId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err32];}else {vErrors.push(err32);}errors++;}}if(data15.alpha !== undefined){let data17 = data15.alpha;if(typeof data17 == "number"){if(data17 > 1 || isNaN(data17)){const err33 = {instancePath:instancePath+"/shadow/alpha",schemaPath:"#/properties/shadow/properties/alpha/maximum",keyword:"maximum",params:{comparison: "<=", limit: 1},message:"must be <= 1"};if(vErrors === null){vErrors = [err33];}else {vErrors.push(err33);}errors++;}if(data17 < 0 || isNaN(data17)){const err34 = {instancePath:instancePath+"/shadow/alpha",schemaPath:"#/properties/shadow/properties/alpha/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err34];}else {vErrors.push(err34);}errors++;}}else {const err35 = {instancePath:instancePath+"/shadow/alpha",schemaPath:"#/properties/shadow/properties/alpha/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err35];}else {vErrors.push(err35);}errors++;}}if(data15.blur !== undefined){let data18 = data15.blur;if(typeof data18 == "number"){if(data18 < 0 || isNaN(data18)){const err36 = {instancePath:instancePath+"/shadow/blur",schemaPath:"#/properties/shadow/properties/blur/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err36];}else {vErrors.push(err36);}errors++;}}else {const err37 = {instancePath:instancePath+"/shadow/blur",schemaPath:"#/properties/shadow/properties/blur/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err37];}else {vErrors.push(err37);}errors++;}}if(data15.offsetX !== undefined){if(!(typeof data15.offsetX == "number")){const err38 = {instancePath:instancePath+"/shadow/offsetX",schemaPath:"#/properties/shadow/properties/offsetX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err38];}else {vErrors.push(err38);}errors++;}}if(data15.offsetY !== undefined){if(!(typeof data15.offsetY == "number")){const err39 = {instancePath:instancePath+"/shadow/offsetY",schemaPath:"#/properties/shadow/properties/offsetY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err39];}else {vErrors.push(err39);}errors++;}}}else {const err40 = {instancePath:instancePath+"/shadow",schemaPath:"#/properties/shadow/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err40];}else {vErrors.push(err40);}errors++;}}}else {const err41 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err41];}else {vErrors.push(err41);}errors++;}validate331.errors = vErrors;return errors === 0;}function validate330(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/resource-textStyle.json" */;let vErrors = null;let errors = 0;if(!(validate331(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate331.errors : vErrors.concat(validate331.errors);errors = vErrors.length;}validate330.errors = vErrors;return errors === 0;}export const validateResourceTransform = validate333;const schema120 = {"$id":"https://route-engine.runtime/schemas/runtime/resource-transform.json","$ref":"https://route-engine.runtime/schemas/projectData/resources.yaml#/properties/transforms/patternProperties/^.+$"};const schema121 = {"type":"object","properties":{"x":{"type":"integer"},"y":{"type":"integer"},"anchorX":{"type":"number"},"anchorY":{"type":"number"},"scaleX":{"type":"number"},"scaleY":{"type":"number"},"flipX":{"type":"boolean"},"flipY":{"type":"boolean"},"rotation":{"type":"number"},"originX":{"type":"number"},"originY":{"type":"number"}},"additionalProperties":false};function validate334(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){for(const key0 in data){if(!(func2.call(schema121.properties, key0))){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.x !== undefined){let data0 = data.x;if(!((typeof data0 == "number") && (!(data0 % 1) && !isNaN(data0)))){const err1 = {instancePath:instancePath+"/x",schemaPath:"#/properties/x/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.y !== undefined){let data1 = data.y;if(!((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1)))){const err2 = {instancePath:instancePath+"/y",schemaPath:"#/properties/y/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.anchorX !== undefined){if(!(typeof data.anchorX == "number")){const err3 = {instancePath:instancePath+"/anchorX",schemaPath:"#/properties/anchorX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.anchorY !== undefined){if(!(typeof data.anchorY == "number")){const err4 = {instancePath:instancePath+"/anchorY",schemaPath:"#/properties/anchorY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.scaleX !== undefined){if(!(typeof data.scaleX == "number")){const err5 = {instancePath:instancePath+"/scaleX",schemaPath:"#/properties/scaleX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.scaleY !== undefined){if(!(typeof data.scaleY == "number")){const err6 = {instancePath:instancePath+"/scaleY",schemaPath:"#/properties/scaleY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.flipX !== undefined){if(typeof data.flipX !== "boolean"){const err7 = {instancePath:instancePath+"/flipX",schemaPath:"#/properties/flipX/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.flipY !== undefined){if(typeof data.flipY !== "boolean"){const err8 = {instancePath:instancePath+"/flipY",schemaPath:"#/properties/flipY/type",keyword:"type",params:{type: "boolean"},message:"must be boolean"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.rotation !== undefined){if(!(typeof data.rotation == "number")){const err9 = {instancePath:instancePath+"/rotation",schemaPath:"#/properties/rotation/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.originX !== undefined){if(!(typeof data.originX == "number")){const err10 = {instancePath:instancePath+"/originX",schemaPath:"#/properties/originX/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.originY !== undefined){if(!(typeof data.originY == "number")){const err11 = {instancePath:instancePath+"/originY",schemaPath:"#/properties/originY/type",keyword:"type",params:{type: "number"},message:"must be number"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}}else {const err12 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}validate334.errors = vErrors;return errors === 0;}function validate333(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/resource-transform.json" */;let vErrors = null;let errors = 0;if(!(validate334(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate334.errors : vErrors.concat(validate334.errors);errors = vErrors.length;}validate333.errors = vErrors;return errors === 0;}export const validateResourceVideo = validate336;const schema122 = {"$id":"https://route-engine.runtime/schemas/runtime/resource-video.json","$ref":"https://route-engine.runtime/schemas/projectData/resources.yaml#/properties/videos/patternProperties/^.+$"};const schema123 = {"type":"object","properties":{"fileId":{"type":"string"},"fileType":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"}},"required":["fileId","width","height"],"additionalProperties":false};function validate337(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){let vErrors = null;let errors = 0;if(data && typeof data == "object" && !Array.isArray(data)){if(data.fileId === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "fileId"},message:"must have required property '"+"fileId"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.width === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "width"},message:"must have required property '"+"width"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.height === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "height"},message:"must have required property '"+"height"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}for(const key0 in data){if(!((((key0 === "fileId") || (key0 === "fileType")) || (key0 === "width")) || (key0 === "height"))){const err3 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.fileId !== undefined){if(typeof data.fileId !== "string"){const err4 = {instancePath:instancePath+"/fileId",schemaPath:"#/properties/fileId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.fileType !== undefined){if(typeof data.fileType !== "string"){const err5 = {instancePath:instancePath+"/fileType",schemaPath:"#/properties/fileType/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.width !== undefined){let data2 = data.width;if(!((typeof data2 == "number") && (!(data2 % 1) && !isNaN(data2)))){const err6 = {instancePath:instancePath+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.height !== undefined){let data3 = data.height;if(!((typeof data3 == "number") && (!(data3 % 1) && !isNaN(data3)))){const err7 = {instancePath:instancePath+"/height",schemaPath:"#/properties/height/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}}else {const err8 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}validate337.errors = vErrors;return errors === 0;}function validate336(data, {instancePath="", parentData, parentDataProperty, rootData=data}={}){/*# sourceURL="https://route-engine.runtime/schemas/runtime/resource-video.json" */;let vErrors = null;let errors = 0;if(!(validate337(data, {instancePath,parentData,parentDataProperty,rootData}))){vErrors = vErrors === null ? validate337.errors : vErrors.concat(validate337.errors);errors = vErrors.length;}validate336.errors = vErrors;return errors === 0;} diff --git a/src/resolveAudioEffects.js b/src/resolveAudioEffects.js index 0adbb1ce..b927c01e 100644 --- a/src/resolveAudioEffects.js +++ b/src/resolveAudioEffects.js @@ -39,11 +39,11 @@ const areEquivalentAudioValues = (authored, rendered) => Math.abs(authored - rendered) <= Number.EPSILON * Math.max(1, Math.abs(authored), Math.abs(rendered)); -const getPlaybackSpeed = (selection, actionPath) => { +const getPlaybackSpeed = (selection, selectionPath) => { const speed = selection?.playback?.speed ?? 1; if (typeof speed !== "number" || !Number.isFinite(speed) || speed <= 0) { throw new Error( - `[${actionPath}.audioEffects.playback.speed] Audio effect speed must be a finite number greater than 0.`, + `[${selectionPath}.playback.speed] Audio effect speed must be a finite number greater than 0.`, ); } return speed; @@ -129,6 +129,42 @@ const compileUpdateProperty = ({ property, authored, speed, resourcePath }) => { }; }; +export const resolveSoundBoundaryEffect = ({ + selection, + selectionPath, + resources = {}, +}) => { + if (!selection) return undefined; + + const resourceId = selection.resourceId; + const resourcePath = `resources.audioEffects.${resourceId}`; + const resource = resources.audioEffects?.[resourceId]; + if (!resource) { + throw new Error( + `[${selectionPath}.resourceId]\n[${resourcePath}] Unknown audio effect resource "${resourceId}".`, + ); + } + if (resource.type !== "update") { + throw new Error( + `[${selectionPath}]\n[${resourcePath}] Sound beginEffect and endEffect selections require an audio effect resource with type "update".`, + ); + } + + const speed = getPlaybackSpeed(selection, selectionPath); + const properties = {}; + for (const property of UPDATE_PROPERTIES) { + if (!hasOwn(resource.tween, property)) continue; + properties[property] = compileUpdateProperty({ + property, + authored: resource.tween[property], + speed, + resourcePath, + }); + } + + return properties; +}; + export const applyAudioEffectUpdateEndpoints = ({ bgm, resources = {} }) => { const resourceId = bgm?.audioEffects?.resourceId; const resource = resources.audioEffects?.[resourceId]; @@ -191,7 +227,7 @@ export const resolveAudioEffect = ({ ); } - const speed = getPlaybackSpeed(selection, actionPath); + const speed = getPlaybackSpeed(selection, `${actionPath}.audioEffects`); const previousSound = getSingleBgmSound(previousChannel, actionPath); const nextSound = getSingleBgmSound(nextChannel, actionPath); if (!previousSound && !nextSound) return null; @@ -283,3 +319,12 @@ export const resolveAudioEffect = ({ properties, }; }; + +export const resolveAudioEffects = (options) => { + const nextResources = options.nextResources ?? options.resources; + const legacyEffect = resolveAudioEffect({ + ...options, + resources: nextResources, + }); + return legacyEffect ? [legacyEffect] : []; +}; diff --git a/src/schemas/presentationActions.yaml b/src/schemas/presentationActions.yaml index 9036c114..ef476876 100644 --- a/src/schemas/presentationActions.yaml +++ b/src/schemas/presentationActions.yaml @@ -104,6 +104,65 @@ definitions: type: [number, "null"] minimum: 0 description: Optional end offset within the source, in seconds + beginEffect: + $ref: "#/definitions/audioEffectSelection" + description: Update effect applied whenever a playback iteration begins + endEffect: + $ref: "#/definitions/audioEffectSelection" + description: Update effect scheduled to finish at each natural playback iteration end + required: [id, resourceId] + additionalProperties: false + + bgmSound: + type: object + description: Sound owned by the persistent BGM channel + properties: + id: + type: string + minLength: 1 + description: Stable identifier for the sound within its authored channel + resourceId: + type: string + minLength: 1 + description: ID of the sound resource + loop: + type: boolean + description: Whether the sound loops + volume: + type: number + minimum: 0 + maximum: 100 + description: Local sound volume from 0 to 100 + muted: + type: boolean + description: Whether this sound is muted + pan: + type: number + minimum: -1 + maximum: 1 + description: Stereo pan from -1 (left) to 1 (right) + startDelayMs: + type: number + minimum: 0 + description: Delay before the sound begins, in milliseconds + playbackRate: + type: number + minimum: 0 + description: Playback speed multiplier + startAt: + type: number + minimum: 0 + description: Start offset within the source, in seconds + endAt: + type: [number, "null"] + minimum: 0 + description: Optional end offset within the source, in seconds + beginEffect: + $ref: "#/definitions/audioEffectSelection" + description: Update effect applied whenever a playback iteration begins + endEffect: + $ref: "#/definitions/audioEffectSelection" + description: Update effect scheduled to finish at each natural playback iteration end required: [id, resourceId] additionalProperties: false @@ -800,7 +859,7 @@ properties: type: array description: Desired sounds owned by the BGM channel items: - $ref: "#/definitions/audioSound" + $ref: "#/definitions/bgmSound" resourceId: type: string description: Legacy shorthand for a single BGM sound resource diff --git a/src/stores/constructRenderState.js b/src/stores/constructRenderState.js index 7347b729..d55cb431 100644 --- a/src/stores/constructRenderState.js +++ b/src/stores/constructRenderState.js @@ -12,6 +12,8 @@ import { VISUAL_LAYER, VISUAL_LAYER_VALUES, } from "../renderLayers.js"; +import { createAudioRenderId } from "../audioIds.js"; +import { resolveSoundBoundaryEffect } from "../resolveAudioEffects.js"; const jemplFunctions = { __arrayOrEmpty: (value) => (Array.isArray(value) ? value : []), @@ -1846,12 +1848,6 @@ const MUSIC_ROOM_SOUND_ID = "music-room:player"; const VOICE_CHANNEL_ID = "channel:voice"; const DEFAULT_SFX_CHANNEL_ID = "default"; -const escapeAudioIdComponent = (component) => - String(component).replaceAll("%", "%25").replaceAll(":", "%3A"); - -const createAudioRenderId = (...components) => - components.map(escapeAudioIdComponent).join(":"); - const assertUniqueAudioIds = (items, kind, parent) => { const seenIds = new Set(); @@ -1922,7 +1918,14 @@ const OPTIONAL_SOUND_PROPERTIES = [ "endAt", ]; -const createSoundNode = ({ id, sound, resource, defaultLoop = false }) => { +const createSoundNode = ({ + id, + sound, + resource, + projectResources, + soundPath = "sound", + defaultLoop = false, +}) => { const node = { id, type: "sound", @@ -1944,6 +1947,14 @@ const createSoundNode = ({ id, sound, resource, defaultLoop = false }) => { if (sound.playback !== undefined) { node.playback = structuredClone(sound.playback); } + for (const field of ["beginEffect", "endEffect"]) { + const effect = resolveSoundBoundaryEffect({ + selection: sound[field], + selectionPath: `${soundPath}.${field}`, + resources: projectResources, + }); + if (effect) node[field] = effect; + } const resolvedStartAt = node.startAt ?? 0; if (node.endAt !== undefined && node.endAt !== null) { @@ -3998,6 +4009,8 @@ export const createBgmChannelNode = ({ ), sound: renderSound, resource: audioResource, + projectResources: resources, + soundPath: `bgm.sounds[${JSON.stringify(sound.id)}]`, defaultLoop: loopsChannel ? false : true, }), bgm, @@ -4042,10 +4055,10 @@ export const addBgm = (state, params) => { export const addAudioEffects = ( state, - { activeAudioEffect, skipTransitionsAndAnimations }, + { activeAudioEffects, skipTransitionsAndAnimations }, ) => { - if (activeAudioEffect && !skipTransitionsAndAnimations) { - state.audioEffects = [structuredClone(activeAudioEffect)]; + if (activeAudioEffects?.length > 0 && !skipTransitionsAndAnimations) { + state.audioEffects = structuredClone(activeAudioEffects); } return state; }; @@ -4079,6 +4092,8 @@ export const addMusicRoom = ( playback: musicRoomPlayer.playback, }, resource: soundResource, + projectResources: resources, + soundPath: "musicRoom.sound", }); state.audio.push( @@ -4157,6 +4172,8 @@ export const addSfx = (state, { presentationState, resources, runtime }) => { : createAudioRenderId("sfx", channel.id, sound.id), sound: renderSound, resource: audioResource, + projectResources: resources, + soundPath: `sfx.channels[${JSON.stringify(channel.id)}].sounds[${JSON.stringify(sound.id)}]`, defaultLoop: loopsChannel ? false : undefined, }), ); @@ -4256,6 +4273,8 @@ export const addVoice = ( ), sound: renderSound, resource: voiceResource, + projectResources: resources, + soundPath: `voice.sounds[${JSON.stringify(sound.id)}]`, defaultLoop: loopsChannel ? false : undefined, }), ); diff --git a/src/stores/system.store.js b/src/stores/system.store.js index 16103618..ca7415e4 100644 --- a/src/stores/system.store.js +++ b/src/stores/system.store.js @@ -3899,7 +3899,7 @@ export const selectRenderState = ({ state }, options = {}) => { musicRoom, sceneReplay, musicRoomPlayer: cloneStateValue(state.global.musicRoomPlayer), - activeAudioEffect: options?.activeAudioEffect ?? null, + activeAudioEffects: options?.activeAudioEffects ?? [], }); return renderState; }; diff --git a/vt/specs/audioChannels/sound-boundary-effects.yaml b/vt/specs/audioChannels/sound-boundary-effects.yaml new file mode 100644 index 00000000..2e30df6e --- /dev/null +++ b/vt/specs/audioChannels/sound-boundary-effects.yaml @@ -0,0 +1,69 @@ +--- +title: Sound Boundary Effects +description: Per-sound update presets compile onto the rendered sound instead of top-level lifecycle phases. +skipInitialScreenshot: true +specs: + - a BGM sound selects reusable update effects for its natural begin and end boundaries + - Route Engine emits concrete beginEffect and endEffect tracks on the sound node + - no top-level audio effect occurrence is created for sound boundaries +steps: + - action: assert + type: js + global: __vtLastRenderState.audio.0.children.0.beginEffect.volume.keyframes.0.startValue + value: 0 + - action: assert + type: js + global: __vtLastRenderState.audio.0.children.0.beginEffect.volume.keyframes.0.value + value: 100 + - action: assert + type: js + global: __vtLastRenderState.audio.0.children.0.endEffect.volume.keyframes.0.value + value: 0 + - action: assert + type: js + global: __vtLastAudioEffect + value: null +--- +screen: + width: 640 + height: 360 +resources: + sounds: + theme: + fileId: 3ka3s + audioEffects: + fade-in: + type: update + tween: + volume: + keyframes: + - startValue: 0 + value: 100 + duration: 300 + fade-out: + type: update + tween: + volume: + keyframes: + - value: 0 + duration: 500 +story: + initialSceneId: scene1 + scenes: + scene1: + initialSectionId: section1 + sections: + section1: + lines: + - id: playing + actions: + bgm: + loop: true + sounds: + - id: main + resourceId: theme + loop: false + beginEffect: + resourceId: fade-in + endEffect: + resourceId: fade-out