diff --git a/.github/workflows/build-branch.yml b/.github/workflows/build-branch.yml new file mode 100644 index 0000000..15ba111 --- /dev/null +++ b/.github/workflows/build-branch.yml @@ -0,0 +1,34 @@ +name: Build Library + +on: + pull_request: + + +jobs: + build-library: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: ${{github.head_ref}} + + - name: Install Node.js and Yarn + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install dependencies + run: yarn install + + - name: Run yarn generate + run: yarn library + + - name: Commit and push changes + run: | + git config --global user.name "${{ github.actor }}" + git config --global user.email "${{ github.actor }}@users.noreply.github.com" + git add -f dist/ + git diff-index --quiet HEAD || git commit -m "Automated build by ${{github.sha}}" + git push origin ${{github.head_ref}} \ No newline at end of file diff --git a/dist/client/BridgeClient.d.ts b/dist/client/BridgeClient.d.ts new file mode 100644 index 0000000..7f18309 --- /dev/null +++ b/dist/client/BridgeClient.d.ts @@ -0,0 +1,219 @@ +import { Display } from "../components/displays"; +import { BridgeEventSource } from "../components/eventsource"; +import { Playlist } from "../playlists/playlist"; +import { HologramType } from "../components/hologram"; +import { BridgeEventMap } from "../schemas/schema.events"; +import { HologramParamMap } from "../schemas/schema.parameters"; +import * as schema from "../schemas/schema.responses"; +import { z } from "zod"; +import { Fallback } from "../components/fallback"; +import { BridgeVersion } from "../components/types"; +export declare class BridgeClient { + /** The name of the current orchestration */ + private orchestration; + /** A boolean that stores if the Bridge session is valid or not + * If the orchestration is not valid, some functions will not work + */ + isConnected: boolean; + /**A boolean for checking the status of the current disconnect event */ + isDisconnecting: boolean; + /**An array containing the connected Looking Glass Displays */ + private displays; + /**an Array containing Playlists, we store this to easily switch between multiple playlists */ + playlists: Playlist[] | undefined; + /** The index of playlists that is currently active */ + currentPlaylistIndex: number; + /**The index of the playlist Item that is currently active */ + currentPlaylistItemIndex: number; + /** the instance of the client that we create, BridgeClient is a singleton, there can only be one */ + static instance: BridgeClient; + static fallback: Fallback | undefined; + /** The websocket connection to Bridge's Event Source, this returns information from Bridge */ + static eventsource: BridgeEventSource; + /**control how often we log to the console, 3 is everything, 0 is nothing */ + static verbosity: 0 | 1 | 2 | 3; + /**store if we're currently in the middle of a cast */ + isCastPending: boolean; + /**the version of the Looking Glass Driver that's running */ + version: BridgeVersion; + private currentHologram; + /**a boolean for whether a disconnect was triggered automatically or manually */ + manualDisconnect: boolean; + playState: "PLAYING" | "PAUSED" | "STOPPED"; + constructor(); + static getInstance(): BridgeClient; + /** + * A helper function to check and see if Looking Glass Bridge is running or not. + * @returns boolean, true if Bridge is running, false if Bridge is not running + */ + status(): Promise; + /** + * Attempt to connect to Looking Glass Bridge. + * @returns + */ + connect(): Promise<{ + success: boolean; + response: { + version: BridgeVersion; + orchestration: string; + }; + }>; + /** + * Creates an orchestration called "default" if one does not already exist. + * @returns string, the name of the current orchestration + */ + createOrchestration(name: string): Promise<{ + success: boolean; + response: null | string; + }>; + /** + * Disconnect from Looking Glass Bridge, free up resources. + */ + disconnect(): Promise<{ + success: boolean; + }>; + /** + * changes the state of the Looking Glass Bridge Window + * @param showWindow boolean, true to show the Looking Glass window, false to hide the Looking Glass window + * @returns + */ + showWindow(showWindow: boolean): Promise<{ + success: boolean; + response: z.infer | null; + }>; + /** + * A helper function to get the version of Looking Glass Bridge that is running. + * @returns string of the version of Looking Glass Bridge that is running + */ + getVersion(): Promise<{ + success: boolean; + response: BridgeVersion; + }>; + /** + * A helper function to get the version of the Looking Glass Bridge API + * @returns the current version of the Looking Glass API + */ + apiVersion(): Promise<{ + success: boolean; + response: BridgeVersion; + }>; + /** + * QueryDisplays finds all displays that are connected to the computer, + * searches for Looking Glass displays, and returns them as an array of Display objects + * @returns the display object + */ + getDisplays(): Promise<{ + success: boolean; + response: Display[] | null; + }>; + /**Delete the instance of the playlist from Bridge, this will stop the playlist from playing if it's active. */ + deletePlaylist(playlist: Playlist): Promise<{ + success: boolean; + response: z.infer | null; + }>; + /** + * This function will allow you to cast a single hologram to the Looking Glass + * @param hologram + */ + cast(hologram: HologramType): Promise<{ + success: boolean; + }>; + getCurrentPlaylist(): Playlist | undefined; + playRemotePlaylist(holograms: HologramType[], index?: number): Promise<{ + success: boolean; + }>; + /**Play a Playlist created by Looking Glass Studio, requires the full path to the playlist.json file. */ + playStudioPlaylist(playlistPath: string): Promise<{ + success: boolean; + response: z.infer | null; + }>; + /**stop playing the studio playlist */ + stopStudioPlaylist(): Promise<{ + success: boolean; + }>; + /**Get the current playlist that is set to start automatically */ + getAutoStartPlaylist(): Promise<{ + success: boolean; + response: z.infer | null; + }>; + /**Choose a Playlist that exists on the local file system to set as the start up playlist */ + setAutoStartPlaylist(args: { + playlistName: string; + playlistPath: string; + }): Promise<{ + success: boolean; + response: z.infer | null; + }>; + /**set a playlist to auto-start, requires that all files are local on the system */ + createAutoStartPlaylist(args: { + playlist: Playlist; + }): Promise<{ + success: boolean; + response: z.infer | null; + }>; + /**Play the currently instanced playlist */ + play(): Promise<{ + success: boolean; + response: z.infer | null; + }>; + /**Pause the currently playing playlist */ + pause(): Promise<{ + success: boolean; + response: z.infer | null; + }>; + /**Got to the next playlist item */ + next(): Promise<{ + success: boolean; + response: z.infer | null; + }>; + /**Go to the previous playlist item */ + previous(): Promise<{ + success: boolean; + response: z.infer | null; + }>; + /**Seek to a specific item in a playlist */ + seek(index: number): Promise<{ + success: boolean; + response: z.infer | null; + }>; + /** + * Connect to Looking Glass Bridge's EventSource. + * The event source is a websocket connection that will send events from Bridge to the client. + * @returns the bridge event source + */ + private subscribeToEvents; + /** + * Adds an event listener that returns a message from Bridge's websocket based event source. + * @param event the event to listen for + * @param MessageHandler the function to call when the event is received + */ + addEventListener(event: T, MessageHandler: (event: BridgeEventMap[T]) => void): Promise; + removeEventListener(event: T, MessageHandler: (event: BridgeEventMap[T]) => void): Promise; + /**Update the parameters of the current hologram */ + updateCurrentHologram({ name, parameter, value, }: { + name: string; + parameter: T; + value: HologramParamMap[T]; + }): Promise<{ + success: boolean; + response: z.infer | null; + }>; + getCurrentHologram(): HologramType | undefined; + getVerbosity(): 0 | 2 | 1 | 3; + /** + *Set the level of console logging that Bridge.js library will do. + * @param verbosity 0 = no logging, 1 = errors only, 2 = only bridge values, 3 = full bridge response + */ + setVerbosity(verbosity: 0 | 1 | 2 | 3): void; + /**Asbtraction for logging with verbosity setting */ + log(...messages: unknown[]): void; + /**Asbtraction for logging with verbosity setting */ + warn(...messages: unknown[]): void; + /**Asbtraction for logging with verbosity setting */ + error(...messages: unknown[]): void; + /** + * helper function for determining if the version of Bridge is valid. + * @returns boolean, true if the version is compatible, false if not + */ + private isVersionCompatible; +} diff --git a/dist/components/displays.d.ts b/dist/components/displays.d.ts new file mode 100644 index 0000000..61eadfb --- /dev/null +++ b/dist/components/displays.d.ts @@ -0,0 +1,36 @@ +import { BridgeValue } from "./types"; +export interface Display { + calibration: CalibrationType | null; + defaultQuilt: QuiltType | null; + hardwareVersion: BridgeValue; + index: BridgeValue; + state: BridgeValue; + windowCoords: BridgeValue; +} +export interface CalibrationType { + DPI: number; + center: number; + configVersion: string; + flipImageX: number; + flipImageY: number; + flipSubp: number; + fringe: number; + invView: number; + pitch: number; + screenH: number; + screenW: number; + serial: string; + slope: number; + verticalAngle: number; + viewCone: number; +} +export interface QuiltType { + quiltAspect: number; + quiltWidth: number; + quiltHeight: number; + rows: number; + columns: number; +} +export declare function tryParseCalibration(value: string): CalibrationType | null; +export declare function tryParseQuilt(value: string): QuiltType | null; +export declare function tryParseDisplay(value: any): Display | null; diff --git a/dist/components/endpoints.d.ts b/dist/components/endpoints.d.ts new file mode 100644 index 0000000..d168fd3 --- /dev/null +++ b/dist/components/endpoints.d.ts @@ -0,0 +1,75 @@ +import * as BridgeResponse from "../schemas/schema.responses"; +import * as BridgeRequest from "../schemas/schema.requests"; +import { z } from "zod"; +export type BridgeEndpointType = "instance_studio_playlist" | "bridge_version" | "api_version" | "set_named_autostart_playlist" | "get_autostart_playlist" | "set_autostart_playlist" | "available_output_devices" | "enter_orchestration" | "exit_orchestration" | "instance_playlist" | "delete_playlist" | "insert_playlist_entry" | "update_playlist_entry" | "update_current_entry" | "sync_overwrite_playlist" | "cancel_pending" | "synced_file_hash" | "transport_control_play" | "transport_control_pause" | "transport_control_next" | "transport_control_previous" | "transport_control_seek_to_index" | "play_playlist" | "show_window"; +export type BridgeEndpointSchemaMap = { + instance_studio_playlist: z.infer; + bridge_version: z.infer; + api_version: z.infer; + get_autostart_playlist: z.infer; + set_named_autostart_playlist: z.infer; + set_autostart_playlist: z.infer; + available_output_devices: z.infer; + enter_orchestration: z.infer; + exit_orchestration: z.infer; + instance_playlist: z.infer; + delete_playlist: z.infer; + insert_playlist_entry: z.infer; + update_playlist_entry: z.infer; + update_current_entry: z.infer; + transport_control_play: z.infer; + transport_control_pause: z.infer; + transport_control_next: z.infer; + transport_control_previous: z.infer; + transport_control_seek_to_index: z.infer; + play_playlist: z.infer; + show_window: z.infer; +}; +export type BridgeRequestBodyMap = { + instance_studio_playlist: z.infer; + bridge_version: z.infer; + api_version: z.infer; + get_autostart_playlist: z.infer; + set_named_autostart_playlist: z.infer; + set_autostart_playlist: z.infer; + available_output_devices: z.infer; + enter_orchestration: z.infer; + exit_orchestration: z.infer; + instance_playlist: z.infer; + delete_playlist: z.infer; + insert_playlist_entry: z.infer; + update_playlist_entry: BridgeRequest.update_playlist_entry; + update_current_entry: BridgeRequest.update_current_entry; + transport_control_play: z.infer; + transport_control_pause: z.infer; + transport_control_next: z.infer; + transport_control_previous: z.infer; + transport_control_seek_to_index: z.infer; + play_playlist: z.infer; + show_window: z.infer; +}; +export type SuccessResponse = { + success: true; + response: T; +}; +export type ErrorResponse = { + success: false; + response: null; +}; +export type Response = SuccessResponse | ErrorResponse; +/** + * + * @param endpoint the bridge endpoint to send the message to, defined in BridgeEndpointType + * @param requestBody Optional, the Json body to send to Bridge, defaults to empty Json + * The requestbody is a json object that has been stringified. For example: + * const requestBody = { + * orchestration: this.orchestration, + * } + * @param baseUrl Optional, the localhost url that bridge uses, defaults to http://localhost:33334/ + * @returns the response from the bridge endpoint, as a json object + */ +export declare function sendMessage(params: { + endpoint: T; + requestBody: BridgeRequestBodyMap[T]; + baseUrl?: string; +}): Promise>; diff --git a/dist/components/eventsource.d.ts b/dist/components/eventsource.d.ts new file mode 100644 index 0000000..053390a --- /dev/null +++ b/dist/components/eventsource.d.ts @@ -0,0 +1,35 @@ +import { BridgeEventMap } from "../schemas/schema.events"; +export type MessageHandlerType = { + [event in keyof BridgeEventMap]?: ((payload: BridgeEventMap[event]) => void)[]; +}; +/** + * Attempt to establish a connection to Looking Glass Bridge's websocket connection. + * the websocket connection will send events from Bridge to the client. + * @param orchestration + * @returns + */ +export declare class BridgeEventSource { + eventSource: any; + MessageHandler: MessageHandlerType; + ws: WebSocket | undefined; + constructor(); + /** + * adds a new message handler object to the BridgeEventSource class + * @param event the event name to listen for + * @param MessageHandler the function to call when the event is received + */ + addMessageHandler({ event, MessageHandler, }: { + event: K; + MessageHandler: (payload: BridgeEventMap[K]) => void; + }): void; + removeMessageHandler({ event, MessageHandler, }: { + event: K; + MessageHandler: (payload: BridgeEventMap[K]) => void; + }): void; + private callMessageHandler; + connectEvent(): void; + disconnectEvent(): void; + connectToBridgeEventSource(orchestration: string): Promise<{ + success: boolean; + }>; +} diff --git a/dist/components/fallback.d.ts b/dist/components/fallback.d.ts new file mode 100644 index 0000000..66dbbcb --- /dev/null +++ b/dist/components/fallback.d.ts @@ -0,0 +1,13 @@ +/** + * provide a fallback in case we're unable to connect to bridge. + * This class uses HoloPlay Core to see if the older API endpoint used in HoloPlay Service is available. + */ +export declare class Fallback { + private holoPlayClient; + ws: WebSocket; + versionPromise: Promise | string; + constructor(); + messageCallback(message: any): Promise; + getLegacyVersion(): Promise; + errorCallback(): void; +} diff --git a/dist/components/hologram.d.ts b/dist/components/hologram.d.ts new file mode 100644 index 0000000..a3d14e6 --- /dev/null +++ b/dist/components/hologram.d.ts @@ -0,0 +1,30 @@ +import { z } from "zod"; +import * as schema from "../schemas/schema.hologram"; +/**Create a new Quilt Hologram */ +export declare class QuiltHologram { + uri: string; + type: "quilt"; + settings: z.infer; + constructor(args: { + uri: string; + settings: z.infer; + }); +} +/**Create a new RGBD Hologram */ +export declare class RGBDHologram { + uri: string; + type: "rgbd"; + settings: z.infer; + constructor(args: { + uri: string; + settings: z.infer; + }); +} +/**Allow the user to create a hologram manually based on type, + * this is useful for when we want to allow the end user to create a hologram themselves via a UI interface */ +export declare function hologramFactory({ uri, type, settings, }: { + uri: string; + type: T; + settings: schema.HologramSettings[T]; +}): QuiltHologram | RGBDHologram; +export type HologramType = QuiltHologram | RGBDHologram; diff --git a/dist/components/messageHandler.d.ts b/dist/components/messageHandler.d.ts new file mode 100644 index 0000000..392a8f8 --- /dev/null +++ b/dist/components/messageHandler.d.ts @@ -0,0 +1,83 @@ +import { BridgeClient } from ".."; +import { BridgeEventMap } from "../schemas/schema.events"; +export declare abstract class MessageHandler { + bridgeEventName: E; + client: BridgeClient; + constructor(args: { + bridgeEventName: E; + client: BridgeClient; + }); + abstract handle(message: BridgeEventMap[E]): void; +} +export declare class MonitorConnectedMessageHandler extends MessageHandler<"Monitor Connect"> { + constructor(args: { + client: BridgeClient; + }); + handle(message: BridgeEventMap["Monitor Connect"]): void; +} +export declare class MonitorDisconnectedMessageHandler extends MessageHandler<"Monitor Disconnect"> { + constructor(args: { + client: BridgeClient; + }); + handle(message: BridgeEventMap["Monitor Disconnect"]): void; +} +export declare class ProgressStartMessageHandler extends MessageHandler<"Progress Start"> { + constructor(args: { + client: BridgeClient; + }); + handle(message: BridgeEventMap["Progress Start"]): void; +} +export declare class ProgressCompletionMessageHandler extends MessageHandler<"Progress Completion"> { + constructor(args: { + client: BridgeClient; + }); + handle(message: BridgeEventMap["Progress Completion"]): void; +} +export declare class ProgressUpdateMessageHandler extends MessageHandler<"Progress Update"> { + constructor(args: { + client: BridgeClient; + }); + handle(message: BridgeEventMap["Progress Update"]): void; +} +export declare class PlaylistInstanceMessageHandler extends MessageHandler<"Playlist Instance"> { + constructor(args: { + client: BridgeClient; + }); + handle(message: BridgeEventMap["Playlist Instance"]): void; +} +export declare class PlaylistInsertMessageHandler extends MessageHandler<"Playlist Insert"> { + constructor(args: { + client: BridgeClient; + }); + handle(message: BridgeEventMap["Playlist Insert"]): void; +} +export declare class PlaylistDeleteMessageHandler extends MessageHandler<"Playlist Delete"> { + constructor(args: { + client: BridgeClient; + }); + handle(message: BridgeEventMap["Playlist Delete"]): void; +} +export declare class SyncPlayPlaylistMessageHandler extends MessageHandler<"Sync/Play Playlist"> { + constructor(args: { + client: BridgeClient; + }); + handle(message: BridgeEventMap["Sync/Play Playlist"]): void; +} +export declare class SyncPlayPlaylistCompleteMessageHandler extends MessageHandler<"Sync/Play Playlist Complete"> { + constructor(args: { + client: BridgeClient; + }); + handle(message: BridgeEventMap["Sync/Play Playlist Complete"]): void; +} +export declare class SyncPlayPlaylistCancelledMessageHandler extends MessageHandler<"Sync/Play Playlist Cancelled"> { + constructor(args: { + client: BridgeClient; + }); + handle(message: BridgeEventMap["Sync/Play Playlist Cancelled"]): void; +} +export declare class NewItemPlayingMessageHandler extends MessageHandler<"New Item Playing"> { + constructor(args: { + client: BridgeClient; + }); + handle(message: BridgeEventMap["New Item Playing"]): void; +} diff --git a/dist/components/orchestration.d.ts b/dist/components/orchestration.d.ts new file mode 100644 index 0000000..7bf82fd --- /dev/null +++ b/dist/components/orchestration.d.ts @@ -0,0 +1,19 @@ +import { z } from "zod"; +import * as BridgeResponse from "../schemas/schema.responses"; +export interface OrchestrationArgs { + name: string; + orchestration: string; +} +/** + * this function will attempt to enter an orchestration + * @param name + * @returns + */ +export declare function tryEnterOrchestration({ name, orchestration }: OrchestrationArgs): Promise<{ + success: boolean; + response: z.infer | null; +}>; +export declare function tryExitOrchestration(orchestration: string): Promise<{ + success: boolean; + response: z.infer | null; +}>; diff --git a/dist/components/types.d.ts b/dist/components/types.d.ts new file mode 100644 index 0000000..1f0db4f --- /dev/null +++ b/dist/components/types.d.ts @@ -0,0 +1,32 @@ +export interface BridgeOrchestration { + name: "orchestration"; + type: BridgeType; + value: ""; +} +export interface BridgePayload { + name: "value"; + orchestration: BridgeOrchestration; + payload: { + name: "payload"; + type: BridgeType; + value: BridgeValueMap; + }; +} +export type BridgeType = "BOOLEAN" | "CHAR" | "SHORT" | "UNSIGNED_SHORT" | "INT" | "LONG" | "FLOAT" | "DOUBLE" | "INT2" | "INT3" | "INT4" | "FLOAT2" | "FLOAT3" | "FLOAT4" | "FLOAT4X4" | "STRING" | "WSTRING" | "VARIANT_MAP"; +export interface BridgeValue { + name: string; + type: BridgeType; + value: string | number | boolean | { + x: number; + y: number; + }; +} +export interface BridgeValueMap { + [key: string]: BridgeValue; +} +export type BridgeVersion = { + major: number; + minor: number; + patch?: number; + hotfix?: number; +}; diff --git a/dist/index.d.ts b/dist/index.d.ts new file mode 100644 index 0000000..82c3292 --- /dev/null +++ b/dist/index.d.ts @@ -0,0 +1,9 @@ +export * from "./client/BridgeClient"; +export * from "./playlists/playlist"; +export * from "./playlists/playlistItems"; +export * from "./components/messageHandler"; +export * from "./components/hologram"; +export * from "./components/types"; +export * from "./schemas/schema.hologram"; +export * from "./schemas/schema.parameters"; +export * as defaults from "./schemas/defaults"; diff --git a/dist/looking-glass-bridge.js b/dist/looking-glass-bridge.js new file mode 100644 index 0000000..5ab64d3 --- /dev/null +++ b/dist/looking-glass-bridge.js @@ -0,0 +1,2 @@ +"use strict";var tt=Object.defineProperty;var st=(n,e,t)=>e in n?tt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var w=(n,e,t)=>(st(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function nt(n){const e=JSON.parse(n);return e==null?(console.warn("Unable to parse calibration"),null):{DPI:e.DPI.value,center:e.center.value,configVersion:e.configVersion,flipImageX:e.flipImageX.value,flipImageY:e.flipImageY.value,flipSubp:e.flipSubp.value,fringe:e.fringe.value,invView:e.invView.value,pitch:e.pitch.value,screenH:e.screenH.value,screenW:e.screenW.value,serial:e.serial,slope:e.slope.value,verticalAngle:e.verticalAngle.value,viewCone:e.viewCone.value}}function rt(n){const e=JSON.parse(n);return e==null?null:{quiltAspect:e.quiltAspect,quiltWidth:e.quiltX,quiltHeight:e.quiltY,rows:e.tileY,columns:e.tileX}}function at(n){return{calibration:nt(n.calibration.value),defaultQuilt:rt(n.defaultQuilt.value),hardwareVersion:n.hardwareVersion.value,index:n.index.value,state:n.state.value,windowCoords:n.windowCoords.value}}async function P(n){let e,t=j.getInstance();t.getVerbosity()>=3&&t.getVerbosity()!==void 0&&console.group("Endpoint:",n.endpoint),await new Promise(r=>setTimeout(r,10)),n.baseUrl==null&&(n.baseUrl="http://localhost:33334/"),t.getVerbosity()==3&&(console.group("Message:"),t.log(`${n.baseUrl+n.endpoint}`),t.log("body:",n.requestBody),console.groupEnd());const s={method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n.requestBody)};try{let r=await fetch(`${n.baseUrl+n.endpoint}`,s);return r.ok?(r.status==408&&(t.warn("%c Bridge Timeout:","color: #ff0000",r),console.groupEnd()),e=await r.json(),e.status.value!=="Completion"&&e.status.value!=="Pending"?(console.warn("%c Bridge Failure:","color: #ff0000",e),console.groupEnd(),{success:!0,response:e}):(t.log("%c Response:","color: #00aa00",e),console.groupEnd(),{success:!0,response:e})):{success:!1,response:null}}catch(r){return console.group("%c Bridge Error:","color: #ff0000"),console.error("Bridge Error",r),console.groupEnd(),console.groupEnd(),{success:!1,response:null}}}async function it({name:n,orchestration:e}){if(j.getInstance().log("%c function call: tryEnterOrchestration ","color: magenta; font-weight: bold; border: solid"),(n==null||n=="")&&(n="default"),e!==""&&e!==void 0)return{success:!1,response:null};let r=await P({endpoint:"enter_orchestration",requestBody:{name:n}});return r.success==!1?(console.error("failed to enter orchestration",r),{success:!1,response:null}):(console.groupEnd(),{success:!0,response:r.response})}async function ot(n){let e={orchestration:n},t=new Promise(r=>{let a=setTimeout(()=>{clearTimeout(a),r({success:!1,response:null})},5e3)}),s=await Promise.race([P({endpoint:"exit_orchestration",requestBody:e}),t]);return!s||s.success==!1?{success:!1,response:null}:{success:!0,response:s.response}}function lt(){return window!==void 0?!0:(console.error("Window is unavailable!"),!1)}function ct(){return"WebSocket"in window?!0:(console.error("WebSocket NOT supported by your Browser!"),!1)}class ut{constructor(){w(this,"eventSource");w(this,"MessageHandler");w(this,"ws");this.eventSource=void 0,this.MessageHandler={},this.ws=void 0}addMessageHandler({event:e,MessageHandler:t}){var r;const s=j.getInstance();e in this.MessageHandler||(this.MessageHandler[e]=[]),(r=this.MessageHandler[e])==null||r.push(t),s.log(`%c Add Message Handler: ${e} `,"color: YellowGreen; font-weight: bold; border: solid;")}removeMessageHandler({event:e,MessageHandler:t}){var r,a;if(j.getInstance().log(`%c Message Handler Removed: ${e} `,"color: Tomato; font-weight: bold; border: solid;"),e in this.MessageHandler){const o=(r=this.MessageHandler[e])==null?void 0:r.findIndex(l=>l===t);o!==-1&&o!==void 0&&((a=this.MessageHandler[e])==null||a.splice(o,1))}}callMessageHandler(e){let t;try{t=JSON.parse(e)}catch(s){j.getInstance().error("Failed to parse JSON",s);return}if(t.payload.value.event.value in this.MessageHandler){const s=this.MessageHandler[t.payload.value.event.value];s&&s.forEach(r=>r(t))}}connectEvent(){const e=this.MessageHandler["Bridge Connected"];e&&e.forEach(t=>t(void 0))}disconnectEvent(){const e=this.MessageHandler["Bridge Disconnected"];e&&e.forEach(t=>t(void 0))}async connectToBridgeEventSource(e){const t=j.getInstance();if(t.log("%c Connect to Bridge Events Source ","color: chartreuse; font-weight: bold; border: solid"),!lt())return{success:!1};if(!ct())return{success:!1};let s=this;return this.ws=new WebSocket("ws://localhost:9724/event_source"),new Promise(r=>{this.ws!==void 0&&(this.ws.onopen=()=>{var l;j.getInstance().log("%c Connected to Websocket ","color: chartreuse; font-weight: bold; border: solid");const o={subscribe_orchestration_events:e};(l=this.ws)==null||l.send(JSON.stringify(o)),r({success:!0})},this.ws.onmessage=function(a){s.callMessageHandler(a.data)},this.ws.onclose=function(){const a=j.getInstance();a.manualDisconnect||a.disconnect(),a.log(`%c Disconnected from Websocket, Manual Disconnect: ${a.manualDisconnect} `,"color: red; font-weight: bold; border: solid")},this.ws.onerror=function(a){t.warn("Unable to connect to WebSocket, is Bridge Running?",a),r({success:!1})})})}}class De{constructor(e){w(this,"orchestration");w(this,"hologram");w(this,"id");w(this,"index");w(this,"playlistName");this.hologram=e.hologram,this.id=e.id,this.index=e.index,this.playlistName=e.playlistName,this.orchestration=e.orchestration}toBridge(){let e;if(this.hologram.type=="quilt"){const t=this.hologram.settings;return e={orchestration:this.orchestration,id:this.id,name:this.playlistName,index:this.index,uri:this.hologram.uri,rows:t.rows,cols:t.columns,focus:t.focus?t.focus:0,aspect:t.aspect,view_count:t.viewCount,isRGBD:0},e}else if(this.hologram.type=="rgbd"){const t=this.hologram.settings;return e={orchestration:this.orchestration,id:this.id,name:this.playlistName,index:this.index,uri:this.hologram.uri,rows:8,cols:13,focus:t.focus?t.focus:0,aspect:t.aspect,view_count:8*13,isRGBD:1,depth_loc:t.depth_loc,depth_inversion:t.depth_inversion,chroma_depth:t.chroma_depth,depthiness:t.depthiness,zoom:t.zoom},e}throw new Error("Invalid hologram type")}}class Se extends De{constructor(e){super(e)}}class Ce extends De{constructor(e){super(e)}}class je{constructor(e){w(this,"name");w(this,"loop");w(this,"items");w(this,"orchestration");var t;this.name=e.name,this.loop=e.loop,this.orchestration=e.orchestration,e.items?this.items=(t=e.items)==null?void 0:t.map((s,r)=>{if(s.type=="quilt")return new Se({hologram:s,id:r,index:r,playlistName:this.name,orchestration:this.orchestration});if(s.type=="rgbd")return new Ce({hologram:s,id:r,index:r,playlistName:this.name,orchestration:this.orchestration})}).filter(s=>!!s):this.items=[]}setName(e){this.name=e}addItem(e){let t;return e.type=="quilt"?(t=new Se({hologram:e,id:this.items.length,index:this.items.length,playlistName:this.name,orchestration:this.orchestration}),this.items.push(t),t):e.type=="rgbd"?(t=new Ce({hologram:e,id:this.items.length,index:this.items.length,playlistName:this.name,orchestration:this.orchestration}),this.items.push(t),t):void 0}async addPlaylistItemToBridge(e){const t=e.toBridge();return(await P({endpoint:"insert_playlist_entry",requestBody:t})).success==!1?(console.error("failed to insert playlist entry"),!1):!0}removeItem(e){if(e.id!=null){this.items.splice(e.id,1);for(let t=0;tr;function e(r){}n.assertIs=e;function t(r){throw new Error}n.assertNever=t,n.arrayToEnum=r=>{const a={};for(const o of r)a[o]=o;return a},n.getValidEnumValues=r=>{const a=n.objectKeys(r).filter(l=>typeof r[r[l]]!="number"),o={};for(const l of a)o[l]=r[l];return n.objectValues(o)},n.objectValues=r=>n.objectKeys(r).map(function(a){return r[a]}),n.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const a=[];for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&a.push(o);return a},n.find=(r,a)=>{for(const o of r)if(a(o))return o},n.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&isFinite(r)&&Math.floor(r)===r;function s(r,a=" | "){return r.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}n.joinValues=s,n.jsonStringifyReplacer=(r,a)=>typeof a=="bigint"?a.toString():a})(k||(k={}));var Ee;(function(n){n.mergeShapes=(e,t)=>({...e,...t})})(Ee||(Ee={}));const h=k.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),U=n=>{switch(typeof n){case"undefined":return h.undefined;case"string":return h.string;case"number":return isNaN(n)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":return Array.isArray(n)?h.array:n===null?h.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?h.promise:typeof Map<"u"&&n instanceof Map?h.map:typeof Set<"u"&&n instanceof Set?h.set:typeof Date<"u"&&n instanceof Date?h.date:h.object;default:return h.unknown}},c=k.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),dt=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");class Z extends Error{constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(a){return a.message},s={_errors:[]},r=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(r);else if(o.code==="invalid_return_type")r(o.returnTypeError);else if(o.code==="invalid_arguments")r(o.argumentsError);else if(o.path.length===0)s._errors.push(t(o));else{let l=s,u=0;for(;ut.message){const t={},s=[];for(const r of this.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):s.push(e(r));return{formErrors:s,fieldErrors:t}}get formErrors(){return this.flatten()}}Z.create=n=>new Z(n);const ne=(n,e)=>{let t;switch(n.code){case c.invalid_type:n.received===h.undefined?t="Required":t=`Expected ${n.expected}, received ${n.received}`;break;case c.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(n.expected,k.jsonStringifyReplacer)}`;break;case c.unrecognized_keys:t=`Unrecognized key(s) in object: ${k.joinValues(n.keys,", ")}`;break;case c.invalid_union:t="Invalid input";break;case c.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${k.joinValues(n.options)}`;break;case c.invalid_enum_value:t=`Invalid enum value. Expected ${k.joinValues(n.options)}, received '${n.received}'`;break;case c.invalid_arguments:t="Invalid function arguments";break;case c.invalid_return_type:t="Invalid function return type";break;case c.invalid_date:t="Invalid date";break;case c.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(t=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?t=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?t=`Invalid input: must end with "${n.validation.endsWith}"`:k.assertNever(n.validation):n.validation!=="regex"?t=`Invalid ${n.validation}`:t="Invalid";break;case c.too_small:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:t="Invalid input";break;case c.too_big:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?t=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:t="Invalid input";break;case c.custom:t="Invalid input";break;case c.invalid_intersection_types:t="Intersection results could not be merged";break;case c.not_multiple_of:t=`Number must be a multiple of ${n.multipleOf}`;break;case c.not_finite:t="Number must be finite";break;default:t=e.defaultError,k.assertNever(n)}return{message:t}};let He=ne;function ht(n){He=n}function ye(){return He}const ge=n=>{const{data:e,path:t,errorMaps:s,issueData:r}=n,a=[...t,...r.path||[]],o={...r,path:a};let l="";const u=s.filter(d=>!!d).slice().reverse();for(const d of u)l=d(o,{data:e,defaultError:l}).message;return{...r,path:a,message:r.message||l}},pt=[];function p(n,e){const t=ge({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ye(),ne].filter(s=>!!s)});n.common.issues.push(t)}class C{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const s=[];for(const r of t){if(r.status==="aborted")return g;r.status==="dirty"&&e.dirty(),s.push(r.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,t){const s=[];for(const r of t)s.push({key:await r.key,value:await r.value});return C.mergeObjectSync(e,s)}static mergeObjectSync(e,t){const s={};for(const r of t){const{key:a,value:o}=r;if(a.status==="aborted"||o.status==="aborted")return g;a.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),(typeof o.value<"u"||r.alwaysSet)&&(s[a.value]=o.value)}return{status:e.value,value:s}}}const g=Object.freeze({status:"aborted"}),qe=n=>({status:"dirty",value:n}),E=n=>({status:"valid",value:n}),Ne=n=>n.status==="aborted",Oe=n=>n.status==="dirty",ve=n=>n.status==="valid",_e=n=>typeof Promise<"u"&&n instanceof Promise;var m;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(m||(m={}));class B{constructor(e,t,s,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=s,this._key=r}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Be=(n,e)=>{if(ve(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Z(n.common.issues);return this._error=t,this._error}}};function v(n){if(!n)return{};const{errorMap:e,invalid_type_error:t,required_error:s,description:r}=n;if(e&&(t||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:r}:{errorMap:(o,l)=>o.code!=="invalid_type"?{message:l.defaultError}:typeof l.data>"u"?{message:s??l.defaultError}:{message:t??l.defaultError},description:r}}class b{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return U(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:U(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C,ctx:{common:e.parent.common,data:e.data,parsedType:U(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(_e(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const s=this.safeParse(e,t);if(s.success)return s.data;throw s.error}safeParse(e,t){var s;const r={common:{issues:[],async:(s=t==null?void 0:t.async)!==null&&s!==void 0?s:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:U(e)},a=this._parseSync({data:e,path:r.path,parent:r});return Be(r,a)}async parseAsync(e,t){const s=await this.safeParseAsync(e,t);if(s.success)return s.data;throw s.error}async safeParseAsync(e,t){const s={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:U(e)},r=this._parse({data:e,path:s.path,parent:s}),a=await(_e(r)?r:Promise.resolve(r));return Be(s,a)}refine(e,t){const s=r=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(r):t;return this._refinement((r,a)=>{const o=e(r),l=()=>a.addIssue({code:c.custom,...s(r)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(e,t){return this._refinement((s,r)=>e(s)?!0:(r.addIssue(typeof t=="function"?t(s,r):t),!1))}_refinement(e){return new R({schema:this,typeName:y.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return q.create(this,this._def)}nullable(){return X.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return M.create(this,this._def)}promise(){return se.create(this,this._def)}or(e){return oe.create([this,e],this._def)}and(e){return le.create(this,e,this._def)}transform(e){return new R({...v(this._def),schema:this,typeName:y.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new pe({...v(this._def),innerType:this,defaultValue:t,typeName:y.ZodDefault})}brand(){return new $e({typeName:y.ZodBranded,type:this,...v(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ke({...v(this._def),innerType:this,catchValue:t,typeName:y.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return fe.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ft=/^c[^\s-]{8,}$/i,mt=/^[a-z][a-z0-9]*$/,yt=/[0-9A-HJKMNP-TV-Z]{26}/,gt=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,vt=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,_t=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,bt=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,wt=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,xt=n=>n.precision?n.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${n.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${n.precision}}Z$`):n.precision===0?n.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):n.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function kt(n,e){return!!((e==="v4"||!e)&&bt.test(n)||(e==="v6"||!e)&&wt.test(n))}class O extends b{constructor(){super(...arguments),this._regex=(e,t,s)=>this.refinement(r=>e.test(r),{validation:t,code:c.invalid_string,...m.errToObj(s)}),this.nonempty=e=>this.min(1,m.errToObj(e)),this.trim=()=>new O({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new O({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new O({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_type,expected:h.string,received:a.parsedType}),g}const s=new C;let r;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(r=this._getOrReturnCtx(e,r),p(r,{code:c.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),s.dirty());else if(a.kind==="length"){const o=e.data.length>a.value,l=e.data.length"u"?null:e==null?void 0:e.precision,offset:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,...m.errToObj(e==null?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...m.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...m.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...m.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...m.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...m.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...m.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...m.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new O({checks:[],typeName:y.ZodString,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...v(n)})};function Tt(n,e){const t=(n.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,r=t>s?t:s,a=parseInt(n.toFixed(r).replace(".","")),o=parseInt(e.toFixed(r).replace(".",""));return a%o/Math.pow(10,r)}class z extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==h.number){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_type,expected:h.number,received:a.parsedType}),g}let s;const r=new C;for(const a of this._def.checks)a.kind==="int"?k.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:c.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:c.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="multipleOf"?Tt(e.data,a.value)!==0&&(s=this._getOrReturnCtx(e,s),p(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),p(s,{code:c.not_finite,message:a.message}),r.dirty()):k.assertNever(a);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,m.toString(t))}gt(e,t){return this.setLimit("min",e,!1,m.toString(t))}lte(e,t){return this.setLimit("max",e,!0,m.toString(t))}lt(e,t){return this.setLimit("max",e,!1,m.toString(t))}setLimit(e,t,s,r){return new z({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:m.toString(r)}]})}_addCheck(e){return new z({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:m.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:m.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:m.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:m.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:m.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:m.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:m.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:m.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:m.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&k.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(t===null||s.value>t)&&(t=s.value):s.kind==="max"&&(e===null||s.valuenew z({checks:[],typeName:y.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...v(n)});class W extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==h.bigint){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_type,expected:h.bigint,received:a.parsedType}),g}let s;const r=new C;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(s=this._getOrReturnCtx(e,s),p(s,{code:c.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),p(s,{code:c.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):k.assertNever(a);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,m.toString(t))}gt(e,t){return this.setLimit("min",e,!1,m.toString(t))}lte(e,t){return this.setLimit("max",e,!0,m.toString(t))}lt(e,t){return this.setLimit("max",e,!1,m.toString(t))}setLimit(e,t,s,r){return new W({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:s,message:m.toString(r)}]})}_addCheck(e){return new W({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:m.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:m.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:m.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:m.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:m.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value{var e;return new W({checks:[],typeName:y.ZodBigInt,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...v(n)})};class re extends b{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:h.boolean,received:s.parsedType}),g}return E(e.data)}}re.create=n=>new re({typeName:y.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...v(n)});class J extends b{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_type,expected:h.date,received:a.parsedType}),g}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return p(a,{code:c.invalid_date}),g}const s=new C;let r;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(r=this._getOrReturnCtx(e,r),p(r,{code:c.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),s.dirty()):k.assertNever(a);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new J({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:m.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:m.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew J({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:y.ZodDate,...v(n)});class be extends b{_parse(e){if(this._getType(e)!==h.symbol){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:h.symbol,received:s.parsedType}),g}return E(e.data)}}be.create=n=>new be({typeName:y.ZodSymbol,...v(n)});class ae extends b{_parse(e){if(this._getType(e)!==h.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:h.undefined,received:s.parsedType}),g}return E(e.data)}}ae.create=n=>new ae({typeName:y.ZodUndefined,...v(n)});class ie extends b{_parse(e){if(this._getType(e)!==h.null){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:h.null,received:s.parsedType}),g}return E(e.data)}}ie.create=n=>new ie({typeName:y.ZodNull,...v(n)});class te extends b{constructor(){super(...arguments),this._any=!0}_parse(e){return E(e.data)}}te.create=n=>new te({typeName:y.ZodAny,...v(n)});class Q extends b{constructor(){super(...arguments),this._unknown=!0}_parse(e){return E(e.data)}}Q.create=n=>new Q({typeName:y.ZodUnknown,...v(n)});class L extends b{_parse(e){const t=this._getOrReturnCtx(e);return p(t,{code:c.invalid_type,expected:h.never,received:t.parsedType}),g}}L.create=n=>new L({typeName:y.ZodNever,...v(n)});class we extends b{_parse(e){if(this._getType(e)!==h.undefined){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:h.void,received:s.parsedType}),g}return E(e.data)}}we.create=n=>new we({typeName:y.ZodVoid,...v(n)});class M extends b{_parse(e){const{ctx:t,status:s}=this._processInputParams(e),r=this._def;if(t.parsedType!==h.array)return p(t,{code:c.invalid_type,expected:h.array,received:t.parsedType}),g;if(r.exactLength!==null){const o=t.data.length>r.exactLength.value,l=t.data.lengthr.maxLength.value&&(p(t,{code:c.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),s.dirty()),t.common.async)return Promise.all([...t.data].map((o,l)=>r.type._parseAsync(new B(t,o,t.path,l)))).then(o=>C.mergeArray(s,o));const a=[...t.data].map((o,l)=>r.type._parseSync(new B(t,o,t.path,l)));return C.mergeArray(s,a)}get element(){return this._def.type}min(e,t){return new M({...this._def,minLength:{value:e,message:m.toString(t)}})}max(e,t){return new M({...this._def,maxLength:{value:e,message:m.toString(t)}})}length(e,t){return new M({...this._def,exactLength:{value:e,message:m.toString(t)}})}nonempty(e){return this.min(1,e)}}M.create=(n,e)=>new M({type:n,minLength:null,maxLength:null,exactLength:null,typeName:y.ZodArray,...v(e)});function F(n){if(n instanceof I){const e={};for(const t in n.shape){const s=n.shape[t];e[t]=q.create(F(s))}return new I({...n._def,shape:()=>e})}else return n instanceof M?new M({...n._def,type:F(n.element)}):n instanceof q?q.create(F(n.unwrap())):n instanceof X?X.create(F(n.unwrap())):n instanceof V?V.create(n.items.map(e=>F(e))):n}class I extends b{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=k.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==h.object){const d=this._getOrReturnCtx(e);return p(d,{code:c.invalid_type,expected:h.object,received:d.parsedType}),g}const{status:s,ctx:r}=this._processInputParams(e),{shape:a,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof L&&this._def.unknownKeys==="strip"))for(const d in r.data)o.includes(d)||l.push(d);const u=[];for(const d of o){const _=a[d],K=r.data[d];u.push({key:{status:"valid",value:d},value:_._parse(new B(r,K,r.path,d)),alwaysSet:d in r.data})}if(this._def.catchall instanceof L){const d=this._def.unknownKeys;if(d==="passthrough")for(const _ of l)u.push({key:{status:"valid",value:_},value:{status:"valid",value:r.data[_]}});else if(d==="strict")l.length>0&&(p(r,{code:c.unrecognized_keys,keys:l}),s.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const _ of l){const K=r.data[_];u.push({key:{status:"valid",value:_},value:d._parse(new B(r,K,r.path,_)),alwaysSet:_ in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const d=[];for(const _ of u){const K=await _.key;d.push({key:K,value:await _.value,alwaysSet:_.alwaysSet})}return d}).then(d=>C.mergeObjectSync(s,d)):C.mergeObjectSync(s,u)}get shape(){return this._def.shape()}strict(e){return m.errToObj,new I({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,s)=>{var r,a,o,l;const u=(o=(a=(r=this._def).errorMap)===null||a===void 0?void 0:a.call(r,t,s).message)!==null&&o!==void 0?o:s.defaultError;return t.code==="unrecognized_keys"?{message:(l=m.errToObj(e).message)!==null&&l!==void 0?l:u}:{message:u}}}:{}})}strip(){return new I({...this._def,unknownKeys:"strip"})}passthrough(){return new I({...this._def,unknownKeys:"passthrough"})}extend(e){return new I({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new I({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:y.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new I({...this._def,catchall:e})}pick(e){const t={};return k.objectKeys(e).forEach(s=>{e[s]&&this.shape[s]&&(t[s]=this.shape[s])}),new I({...this._def,shape:()=>t})}omit(e){const t={};return k.objectKeys(this.shape).forEach(s=>{e[s]||(t[s]=this.shape[s])}),new I({...this._def,shape:()=>t})}deepPartial(){return F(this)}partial(e){const t={};return k.objectKeys(this.shape).forEach(s=>{const r=this.shape[s];e&&!e[s]?t[s]=r:t[s]=r.optional()}),new I({...this._def,shape:()=>t})}required(e){const t={};return k.objectKeys(this.shape).forEach(s=>{if(e&&!e[s])t[s]=this.shape[s];else{let a=this.shape[s];for(;a instanceof q;)a=a._def.innerType;t[s]=a}}),new I({...this._def,shape:()=>t})}keyof(){return Le(k.objectKeys(this.shape))}}I.create=(n,e)=>new I({shape:()=>n,unknownKeys:"strip",catchall:L.create(),typeName:y.ZodObject,...v(e)});I.strictCreate=(n,e)=>new I({shape:()=>n,unknownKeys:"strict",catchall:L.create(),typeName:y.ZodObject,...v(e)});I.lazycreate=(n,e)=>new I({shape:n,unknownKeys:"strip",catchall:L.create(),typeName:y.ZodObject,...v(e)});class oe extends b{_parse(e){const{ctx:t}=this._processInputParams(e),s=this._def.options;function r(a){for(const l of a)if(l.result.status==="valid")return l.result;for(const l of a)if(l.result.status==="dirty")return t.common.issues.push(...l.ctx.common.issues),l.result;const o=a.map(l=>new Z(l.ctx.common.issues));return p(t,{code:c.invalid_union,unionErrors:o}),g}if(t.common.async)return Promise.all(s.map(async a=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(r);{let a;const o=[];for(const u of s){const d={...t,common:{...t.common,issues:[]},parent:null},_=u._parseSync({data:t.data,path:t.path,parent:d});if(_.status==="valid")return _;_.status==="dirty"&&!a&&(a={result:_,ctx:d}),d.common.issues.length&&o.push(d.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.result;const l=o.map(u=>new Z(u));return p(t,{code:c.invalid_union,unionErrors:l}),g}}get options(){return this._def.options}}oe.create=(n,e)=>new oe({options:n,typeName:y.ZodUnion,...v(e)});const me=n=>n instanceof ue?me(n.schema):n instanceof R?me(n.innerType()):n instanceof de?[n.value]:n instanceof G?n.options:n instanceof he?Object.keys(n.enum):n instanceof pe?me(n._def.innerType):n instanceof ae?[void 0]:n instanceof ie?[null]:null;class Pe extends b{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.object)return p(t,{code:c.invalid_type,expected:h.object,received:t.parsedType}),g;const s=this.discriminator,r=t.data[s],a=this.optionsMap.get(r);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(p(t,{code:c.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),g)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,s){const r=new Map;for(const a of t){const o=me(a.shape[e]);if(!o)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const l of o){if(r.has(l))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(l)}`);r.set(l,a)}}return new Pe({typeName:y.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:r,...v(s)})}}function Ze(n,e){const t=U(n),s=U(e);if(n===e)return{valid:!0,data:n};if(t===h.object&&s===h.object){const r=k.objectKeys(e),a=k.objectKeys(n).filter(l=>r.indexOf(l)!==-1),o={...n,...e};for(const l of a){const u=Ze(n[l],e[l]);if(!u.valid)return{valid:!1};o[l]=u.data}return{valid:!0,data:o}}else if(t===h.array&&s===h.array){if(n.length!==e.length)return{valid:!1};const r=[];for(let a=0;a{if(Ne(a)||Ne(o))return g;const l=Ze(a.value,o.value);return l.valid?((Oe(a)||Oe(o))&&t.dirty(),{status:t.value,value:l.data}):(p(s,{code:c.invalid_intersection_types}),g)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([a,o])=>r(a,o)):r(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}le.create=(n,e,t)=>new le({left:n,right:e,typeName:y.ZodIntersection,...v(t)});class V extends b{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.array)return p(s,{code:c.invalid_type,expected:h.array,received:s.parsedType}),g;if(s.data.lengththis._def.items.length&&(p(s,{code:c.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const a=[...s.data].map((o,l)=>{const u=this._def.items[l]||this._def.rest;return u?u._parse(new B(s,o,s.path,l)):null}).filter(o=>!!o);return s.common.async?Promise.all(a).then(o=>C.mergeArray(t,o)):C.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new V({...this._def,rest:e})}}V.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new V({items:n,typeName:y.ZodTuple,rest:null,...v(e)})};class ce extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.object)return p(s,{code:c.invalid_type,expected:h.object,received:s.parsedType}),g;const r=[],a=this._def.keyType,o=this._def.valueType;for(const l in s.data)r.push({key:a._parse(new B(s,l,s.path,l)),value:o._parse(new B(s,s.data[l],s.path,l))});return s.common.async?C.mergeObjectAsync(t,r):C.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,s){return t instanceof b?new ce({keyType:e,valueType:t,typeName:y.ZodRecord,...v(s)}):new ce({keyType:O.create(),valueType:e,typeName:y.ZodRecord,...v(t)})}}class xe extends b{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.map)return p(s,{code:c.invalid_type,expected:h.map,received:s.parsedType}),g;const r=this._def.keyType,a=this._def.valueType,o=[...s.data.entries()].map(([l,u],d)=>({key:r._parse(new B(s,l,s.path,[d,"key"])),value:a._parse(new B(s,u,s.path,[d,"value"]))}));if(s.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const u of o){const d=await u.key,_=await u.value;if(d.status==="aborted"||_.status==="aborted")return g;(d.status==="dirty"||_.status==="dirty")&&t.dirty(),l.set(d.value,_.value)}return{status:t.value,value:l}})}else{const l=new Map;for(const u of o){const d=u.key,_=u.value;if(d.status==="aborted"||_.status==="aborted")return g;(d.status==="dirty"||_.status==="dirty")&&t.dirty(),l.set(d.value,_.value)}return{status:t.value,value:l}}}}xe.create=(n,e,t)=>new xe({valueType:e,keyType:n,typeName:y.ZodMap,...v(t)});class Y extends b{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.parsedType!==h.set)return p(s,{code:c.invalid_type,expected:h.set,received:s.parsedType}),g;const r=this._def;r.minSize!==null&&s.data.sizer.maxSize.value&&(p(s,{code:c.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const a=this._def.valueType;function o(u){const d=new Set;for(const _ of u){if(_.status==="aborted")return g;_.status==="dirty"&&t.dirty(),d.add(_.value)}return{status:t.value,value:d}}const l=[...s.data.values()].map((u,d)=>a._parse(new B(s,u,s.path,d)));return s.common.async?Promise.all(l).then(u=>o(u)):o(l)}min(e,t){return new Y({...this._def,minSize:{value:e,message:m.toString(t)}})}max(e,t){return new Y({...this._def,maxSize:{value:e,message:m.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Y.create=(n,e)=>new Y({valueType:n,minSize:null,maxSize:null,typeName:y.ZodSet,...v(e)});class ee extends b{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.function)return p(t,{code:c.invalid_type,expected:h.function,received:t.parsedType}),g;function s(l,u){return ge({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ye(),ne].filter(d=>!!d),issueData:{code:c.invalid_arguments,argumentsError:u}})}function r(l,u){return ge({data:l,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,ye(),ne].filter(d=>!!d),issueData:{code:c.invalid_return_type,returnTypeError:u}})}const a={errorMap:t.common.contextualErrorMap},o=t.data;return this._def.returns instanceof se?E(async(...l)=>{const u=new Z([]),d=await this._def.args.parseAsync(l,a).catch(Ie=>{throw u.addIssue(s(l,Ie)),u}),_=await o(...d);return await this._def.returns._def.type.parseAsync(_,a).catch(Ie=>{throw u.addIssue(r(_,Ie)),u})}):E((...l)=>{const u=this._def.args.safeParse(l,a);if(!u.success)throw new Z([s(l,u.error)]);const d=o(...u.data),_=this._def.returns.safeParse(d,a);if(!_.success)throw new Z([r(d,_.error)]);return _.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ee({...this._def,args:V.create(e).rest(Q.create())})}returns(e){return new ee({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,s){return new ee({args:e||V.create([]).rest(Q.create()),returns:t||Q.create(),typeName:y.ZodFunction,...v(s)})}}class ue extends b{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ue.create=(n,e)=>new ue({getter:n,typeName:y.ZodLazy,...v(e)});class de extends b{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return p(t,{received:t.data,code:c.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}}de.create=(n,e)=>new de({value:n,typeName:y.ZodLiteral,...v(e)});function Le(n,e){return new G({values:n,typeName:y.ZodEnum,...v(e)})}class G extends b{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{expected:k.joinValues(s),received:t.parsedType,code:c.invalid_type}),g}if(this._def.values.indexOf(e.data)===-1){const t=this._getOrReturnCtx(e),s=this._def.values;return p(t,{received:t.data,code:c.invalid_enum_value,options:s}),g}return E(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e){return G.create(e)}exclude(e){return G.create(this.options.filter(t=>!e.includes(t)))}}G.create=Le;class he extends b{_parse(e){const t=k.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==h.string&&s.parsedType!==h.number){const r=k.objectValues(t);return p(s,{expected:k.joinValues(r),received:s.parsedType,code:c.invalid_type}),g}if(t.indexOf(e.data)===-1){const r=k.objectValues(t);return p(s,{received:s.data,code:c.invalid_enum_value,options:r}),g}return E(e.data)}get enum(){return this._def.values}}he.create=(n,e)=>new he({values:n,typeName:y.ZodNativeEnum,...v(e)});class se extends b{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.promise&&t.common.async===!1)return p(t,{code:c.invalid_type,expected:h.promise,received:t.parsedType}),g;const s=t.parsedType===h.promise?t.data:Promise.resolve(t.data);return E(s.then(r=>this._def.type.parseAsync(r,{path:t.path,errorMap:t.common.contextualErrorMap})))}}se.create=(n,e)=>new se({type:n,typeName:y.ZodPromise,...v(e)});class R extends b{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===y.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:s}=this._processInputParams(e),r=this._def.effect||null;if(r.type==="preprocess"){const o=r.transform(s.data);return s.common.async?Promise.resolve(o).then(l=>this._def.schema._parseAsync({data:l,path:s.path,parent:s})):this._def.schema._parseSync({data:o,path:s.path,parent:s})}const a={addIssue:o=>{p(s,o),o.fatal?t.abort():t.dirty()},get path(){return s.path}};if(a.addIssue=a.addIssue.bind(a),r.type==="refinement"){const o=l=>{const u=r.refinement(l,a);if(s.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(s.common.async===!1){const l=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return l.status==="aborted"?g:(l.status==="dirty"&&t.dirty(),o(l.value),{status:t.value,value:l.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(l=>l.status==="aborted"?g:(l.status==="dirty"&&t.dirty(),o(l.value).then(()=>({status:t.value,value:l.value}))))}if(r.type==="transform")if(s.common.async===!1){const o=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!ve(o))return o;const l=r.transform(o.value,a);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:l}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(o=>ve(o)?Promise.resolve(r.transform(o.value,a)).then(l=>({status:t.value,value:l})):o);k.assertNever(r)}}R.create=(n,e,t)=>new R({schema:n,typeName:y.ZodEffects,effect:e,...v(t)});R.createWithPreprocess=(n,e,t)=>new R({schema:e,effect:{type:"preprocess",transform:n},typeName:y.ZodEffects,...v(t)});class q extends b{_parse(e){return this._getType(e)===h.undefined?E(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}q.create=(n,e)=>new q({innerType:n,typeName:y.ZodOptional,...v(e)});class X extends b{_parse(e){return this._getType(e)===h.null?E(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}X.create=(n,e)=>new X({innerType:n,typeName:y.ZodNullable,...v(e)});class pe extends b{_parse(e){const{ctx:t}=this._processInputParams(e);let s=t.data;return t.parsedType===h.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}pe.create=(n,e)=>new pe({innerType:n,typeName:y.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...v(e)});class ke extends b{_parse(e){const{ctx:t}=this._processInputParams(e),s={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return _e(r)?r.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Z(s.common.issues)},input:s.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Z(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}ke.create=(n,e)=>new ke({innerType:n,typeName:y.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...v(e)});class Te extends b{_parse(e){if(this._getType(e)!==h.nan){const s=this._getOrReturnCtx(e);return p(s,{code:c.invalid_type,expected:h.nan,received:s.parsedType}),g}return{status:"valid",value:e.data}}}Te.create=n=>new Te({typeName:y.ZodNaN,...v(n)});const Pt=Symbol("zod_brand");class $e extends b{_parse(e){const{ctx:t}=this._processInputParams(e),s=t.data;return this._def.type._parse({data:s,path:t.path,parent:t})}unwrap(){return this._def.type}}class fe extends b{_parse(e){const{status:t,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return a.status==="aborted"?g:a.status==="dirty"?(t.dirty(),qe(a.value)):this._def.out._parseAsync({data:a.value,path:s.path,parent:s})})();{const r=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return r.status==="aborted"?g:r.status==="dirty"?(t.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:s.path,parent:s})}}static create(e,t){return new fe({in:e,out:t,typeName:y.ZodPipeline})}}const Ue=(n,e={},t)=>n?te.create().superRefine((s,r)=>{var a,o;if(!n(s)){const l=typeof e=="function"?e(s):typeof e=="string"?{message:e}:e,u=(o=(a=l.fatal)!==null&&a!==void 0?a:t)!==null&&o!==void 0?o:!0,d=typeof l=="string"?{message:l}:l;r.addIssue({code:"custom",...d,fatal:u})}}):te.create(),It={object:I.lazycreate};var y;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline"})(y||(y={}));const St=(n,e={message:`Input not instance of ${n.name}`})=>Ue(t=>t instanceof n,e),Me=O.create,ze=z.create,Ct=Te.create,jt=W.create,We=re.create,Et=J.create,Nt=be.create,Ot=ae.create,Zt=ie.create,Mt=te.create,Rt=Q.create,At=L.create,Bt=we.create,Vt=M.create,Ge=I.create,Dt=I.strictCreate,Qe=oe.create,Ht=Pe.create,qt=le.create,Lt=V.create,$t=ce.create,Ut=xe.create,zt=Y.create,Wt=ee.create,Gt=ue.create,A=de.create,Qt=G.create,Jt=he.create,Yt=se.create,Ve=R.create,Xt=q.create,Kt=X.create,Ft=R.createWithPreprocess,es=fe.create,ts=()=>Me().optional(),ss=()=>ze().optional(),ns=()=>We().optional(),rs={string:n=>O.create({...n,coerce:!0}),number:n=>z.create({...n,coerce:!0}),boolean:n=>re.create({...n,coerce:!0}),bigint:n=>W.create({...n,coerce:!0}),date:n=>J.create({...n,coerce:!0})},as=g;var i=Object.freeze({__proto__:null,defaultErrorMap:ne,setErrorMap:ht,getErrorMap:ye,makeIssue:ge,EMPTY_PATH:pt,addIssueToContext:p,ParseStatus:C,INVALID:g,DIRTY:qe,OK:E,isAborted:Ne,isDirty:Oe,isValid:ve,isAsync:_e,get util(){return k},get objectUtil(){return Ee},ZodParsedType:h,getParsedType:U,ZodType:b,ZodString:O,ZodNumber:z,ZodBigInt:W,ZodBoolean:re,ZodDate:J,ZodSymbol:be,ZodUndefined:ae,ZodNull:ie,ZodAny:te,ZodUnknown:Q,ZodNever:L,ZodVoid:we,ZodArray:M,ZodObject:I,ZodUnion:oe,ZodDiscriminatedUnion:Pe,ZodIntersection:le,ZodTuple:V,ZodRecord:ce,ZodMap:xe,ZodSet:Y,ZodFunction:ee,ZodLazy:ue,ZodLiteral:de,ZodEnum:G,ZodNativeEnum:he,ZodPromise:se,ZodEffects:R,ZodTransformer:R,ZodOptional:q,ZodNullable:X,ZodDefault:pe,ZodCatch:ke,ZodNaN:Te,BRAND:Pt,ZodBranded:$e,ZodPipeline:fe,custom:Ue,Schema:b,ZodSchema:b,late:It,get ZodFirstPartyTypeKind(){return y},coerce:rs,any:Mt,array:Vt,bigint:jt,boolean:We,date:Et,discriminatedUnion:Ht,effect:Ve,enum:Qt,function:Wt,instanceof:St,intersection:qt,lazy:Gt,literal:A,map:Ut,nan:Ct,nativeEnum:Jt,never:At,null:Zt,nullable:Kt,number:ze,object:Ge,oboolean:ns,onumber:ss,optional:Xt,ostring:ts,pipeline:es,preprocess:Ft,promise:Yt,record:$t,set:zt,strictObject:Dt,string:Me,symbol:Nt,transformer:Ve,tuple:Lt,undefined:Ot,union:Qe,unknown:Rt,void:Bt,NEVER:as,ZodIssueCode:c,quotelessJson:dt,ZodError:Z});const is=A("UNSIGNED_INT");A("INT");A("FLOAT");const os=A("INT2"),x=A("WSTRING"),D=A("VARIANT_MAP"),ls=A("Completion"),cs=A("UnknownOrchestration"),us=A("Pending"),ds=A("Failure"),f=Me(),S=Ge({name:f,type:x,value:Qe([ls,us,ds,cs])});i.object({name:f,payload:i.object({name:f,type:x,value:i.string()}),status:S});i.object({name:f,payload:i.object({name:f,type:x,value:i.string()}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),payload:i.object({name:f,type:D,value:i.object({id:i.object({name:f,type:x,value:i.string()}).optional(),message:i.object({name:f,type:x,value:i.string()})})}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),payload:i.object({name:f,type:D,value:i.object({name:i.object({name:f,type:x,value:i.string()})})}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),payload:i.object({name:f,type:D,value:i.object({index:i.object({name:f,type:x,value:i.string()})})}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),payload:i.object({name:f,type:D,value:i.object({name:i.object({name:f,type:x,value:i.string()})})}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),status:S});const hs=i.object({name:f,type:D,value:i.object({calibration:i.object({name:f,type:x,value:i.string()}),defaultQuilt:i.object({name:f,type:x,value:i.string()}),hardwareVersion:i.object({name:f,type:x,value:i.string()}),hwid:i.object({name:f,type:x,value:i.string()}),index:i.object({name:f,type:is,value:i.number()}),state:i.object({name:f,type:x,value:i.string()}),windowCoords:i.object({name:f,type:os,value:i.object({x:i.number(),y:i.number()})})})}),ps=i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),payload:i.object({name:f,type:D,value:i.record(hs).optional()}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),payload:i.object({name:f,type:D,value:i.object({name:i.object({name:f,type:x,value:i.string()})})}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),payload:i.object({name:f,type:D,value:i.object({playlist_name:i.object({name:f,type:x,value:i.string()}),playlist_path:i.object({name:f,type:x,value:i.string()})})}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),payload:i.object({name:f,type:D,value:i.object({playlist_name:i.object({name:f,type:x,value:i.string()})})}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),payload:i.object({name:f,type:D,value:i.object({playlist_name:i.object({name:f,type:x,value:i.string()})})}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),status:S});i.object({name:f,orchestration:i.object({name:f,type:x,value:i.string()}),status:S});class N{constructor(e){w(this,"bridgeEventName");w(this,"client");this.bridgeEventName=e.bridgeEventName,this.client=e.client,this.client.addEventListener(this.bridgeEventName,this.handle.bind(this))}}class fs extends N{constructor(e){super({bridgeEventName:"Monitor Connect",client:e.client})}handle(e){this.client.log("%c Monitor Connect ","color: aqua; font-weight: bold; border: solid;",e)}}class ms extends N{constructor(e){super({bridgeEventName:"Monitor Disconnect",client:e.client})}handle(e){this.client.log("%c Monitor Disconnect ","color: aqua; font-weight: bold; border: solid;",e)}}class ys extends N{constructor(e){super({bridgeEventName:"Progress Start",client:e.client})}handle(e){this.client.log("%c Progress Start ","color: aqua; font-weight: bold; border: solid;",e)}}class gs extends N{constructor(e){super({bridgeEventName:"Progress Completion",client:e.client})}handle(e){this.client.log(e)}}class vs extends N{constructor(e){super({bridgeEventName:"Progress Update",client:e.client})}handle(e){this.client.log(e)}}class _s extends N{constructor(e){super({bridgeEventName:"Playlist Instance",client:e.client})}handle(e){this.client.log("%c Playlist Instance ","color: aqua; font-weight: bold; border: solid;",e)}}class bs extends N{constructor(e){super({bridgeEventName:"Playlist Insert",client:e.client})}handle(e){this.client.log("%c Playlist Insert ","color: aqua; font-weight: bold; border: solid;",e)}}class ws extends N{constructor(e){super({bridgeEventName:"Playlist Delete",client:e.client})}handle(e){this.client.log("%c Playlist Delete ","color: aqua; font-weight: bold; border: solid;",e)}}class xs extends N{constructor(e){super({bridgeEventName:"Sync/Play Playlist",client:e.client})}handle(e){this.client.log(e)}}class ks extends N{constructor(e){super({bridgeEventName:"Sync/Play Playlist Complete",client:e.client})}handle(e){this.client.log(e)}}class Ts extends N{constructor(e){super({bridgeEventName:"Sync/Play Playlist Cancelled",client:e.client})}handle(e){this.client.log(e)}}class Je extends N{constructor(e){super({bridgeEventName:"New Item Playing",client:e.client})}handle(e){var a,o;this.client.log("%c New Item Playing ","color: aqua; font-weight: bold; border: solid;",e);let t=this.client.currentPlaylistIndex,s=(o=(a=this.client.playlists)==null?void 0:a[t])==null?void 0:o.name,r=this.client.currentPlaylistItemIndex;e.payload.value.playlist_name.value==s&&e.payload.value.index.value==r&&(this.client.isCastPending=!1)}}function $(n){const[e,t,s,r]=n.split(".").map(Number);return{major:e,minor:t,patch:s,hotfix:r}}const T=class{constructor(){w(this,"orchestration");w(this,"isConnected");w(this,"isDisconnecting");w(this,"displays");w(this,"playlists");w(this,"currentPlaylistIndex");w(this,"currentPlaylistItemIndex");w(this,"isCastPending",!1);w(this,"version");w(this,"currentHologram");w(this,"manualDisconnect",!1);w(this,"playState","STOPPED");if(this.orchestration="",this.isConnected=!1,this.isDisconnecting=!1,this.displays=[],T.eventsource=new ut,T.fallback=void 0,this.playlists=[],this.currentPlaylistIndex=0,this.currentPlaylistItemIndex=0,this.version={major:0,minor:0,patch:0,hotfix:0},!T.instance)T.instance=this;else return T.instance}static getInstance(){return T.instance||(T.instance=new T),T.instance}async status(){this.log("%c function call: status ","color: magenta; font-weight: bold; border: solid");const e=new Promise(t=>{let s=setTimeout(()=>{clearTimeout(s),t(new Error("Timed out"))},5e3)});try{const t=await Promise.race([fetch("http://localhost:33334/"),e]);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return!0}catch(t){return t.message==="Timed out"?this.warn("Request timed out"):console.warn("Looking Glass Bridge is not running, please start Bridge and try again."),!1}}async connect(){if(this.log("%c function call: connect ","color: magenta; font-weight: bold; border: solid"),this.isConnected==!0)return console.warn("Already connected to Looking Glass Bridge."),{success:!0,response:{version:this.version,orchestration:this.orchestration}};if(await this.status()==!1)return{success:!1,response:{version:{major:0,minor:0,patch:0,hotfix:0},orchestration:""}};if(this.isConnected=!0,(await this.createOrchestration("")).success==!1){let s=await this.getVersion();if(s.success==!1)return{success:!1,response:{version:$("0"),orchestration:""}};if(s.response.major<2&&s.response.minor<1)return{success:!1,response:{version:s.response,orchestration:""}}}return await this.subscribeToEvents(),T.eventsource.connectEvent(),new Je({client:this}),{success:!0,response:{version:this.version,orchestration:this.orchestration}}}async createOrchestration(e){var r,a;if(this.log("%c function call: createOrchestration ","color: magenta; font-weight: bold; border: solid"),await this.status()==!1)return{success:!1,response:null};const t=await this.getVersion();if(t.response.major<2&&t.response.minor<1)return console.error("Unable to get Looking Glass Bridge version, please upgrade Looking Glass Bridge."),{success:!1,response:null};let s=await it({name:e,orchestration:this.orchestration});return s.success==!0&&(r=s.response)!=null&&r.payload.value&&(this.orchestration=(a=s.response)==null?void 0:a.payload.value),{success:!0,response:this.orchestration}}async disconnect(){var t,s,r,a;return this.log("%c function call: disconnect ","color: magenta; font-weight: bold; border: solid"),this.isDisconnecting==!0||this.isConnected==!1?{success:!1}:(this.isDisconnecting=!0,this.manualDisconnect=!0,(await ot(this.orchestration)).success==!1&&console.warn(" ⚠️ Unable to exit orchestration, Bridge is not reachable."),(t=T.eventsource)==null||t.disconnectEvent(),(r=(s=T.eventsource)==null?void 0:s.ws)==null||r.close(),(a=T.fallback)==null||a.ws.close(),T.fallback=void 0,this.displays=[],this.playlists=[],this.currentHologram=void 0,this.orchestration="",this.isDisconnecting=!1,this.isCastPending=!1,this.isConnected=!1,{success:!0})}async showWindow(e){if(this.isConnected==!1)return{success:!1,response:null};this.log("%c function call: showWindow ","color: magenta; font-weight: bold; border: solid");let t="this call is only supported in bridge 2.2 or newer, please upgrade Looking Glass Bridge.";if(await this.isVersionCompatible()==!1)return console.warn(t),{success:!1,response:null};const s={orchestration:this.orchestration,show_window:e,head_index:-1};let r=await P({endpoint:"show_window",requestBody:s});return r.success==!1?{success:!1,response:null}:{success:!0,response:r.response}}async getVersion(){var t;this.log("%c function call: getVersion ","color: magenta; font-weight: bold; border: solid");let e=await P({endpoint:"bridge_version",requestBody:{}});if(e.success==!0){let s=$(e.response.payload.value);return this.version=s,{success:!0,response:this.version}}else{let s=await((t=T.fallback)==null?void 0:t.getLegacyVersion());return s==null?{success:!1,response:$("0")}:{success:!0,response:$(s)}}}async apiVersion(){if(this.log("%c function call: apiVersion ","color: magenta; font-weight: bold; border: solid"),this.isConnected==!1)return{success:!1,response:$("0")};if(await this.isVersionCompatible()==!1)return{success:!1,response:$("0")};let e=await P({endpoint:"api_version",requestBody:{}});return e.success==!1?(console.warn("this call is only supported in bridge 2.2 or newer, please upgrade Looking Glass Bridge."),{success:!1,response:$("0")}):{success:!0,response:$(e.response.payload.value)}}async getDisplays(){if(this.log("%c function call: displays ","color: magenta; font-weight: bold; border: solid"),this.displays=[],this.isConnected==!1)return{success:!1,response:null};const e={orchestration:this.orchestration};let t=await P({endpoint:"available_output_devices",requestBody:e});if(t.success==!1)return{success:!1,response:null};ps.safeParse(t.response);for(let s in t.response.payload.value){let r=t.response.payload.value[`${s}`];if(r.value.hwid.value.includes("LKG")){let a=at(r.value);a!=null&&this.displays.push(a)}}return{success:!0,response:this.displays}}async deletePlaylist(e){if(this.log("%c function call: deletePlaylist ","color: magenta; font-weight: bold; border: solid"),this.isConnected==!1)return{success:!1,response:null};const t=e.getInstance(this.orchestration);let s=await P({endpoint:"delete_playlist",requestBody:t});return s.success==!1?{success:!1,response:null}:s}async cast(e){var a,o,l;if(this.isConnected==!1)return{success:!1};if(this.log("%c function call: cast ","color: magenta; font-weight: bold; border: solid"),this.isCastPending==!0)return this.warn("already casting please wait"),{success:!1};this.isCastPending=!0;let t="Cast_"+Math.random().toString(36).substring(7),s;s==null&&(s=new je({name:t,loop:!0,items:[],orchestration:this.orchestration}),(a=this.playlists)==null||a.push(s));let r=s.addItem(e);if(r!==void 0)await s.play(),(o=this.playlists)==null||o.forEach(u=>{var d;u.name!=t&&(this.deletePlaylist(u),(d=this.playlists)==null||d.splice(this.playlists.indexOf(u),1))}),this.currentPlaylistIndex=((l=this.playlists)==null?void 0:l.indexOf(s))??0,this.currentPlaylistItemIndex=r.index;else return{success:!1};return this.currentHologram=e,this.isCastPending=!1,{success:!0}}getCurrentPlaylist(){var e;return(e=this.playlists)==null?void 0:e[this.currentPlaylistIndex]}async playRemotePlaylist(e,t=0){var a,o,l;if(!this.isConnected&&!(await this.connect()).success)return{success:!1};if(console.log("%c function call: playRemotePlaylist ","color: magenta; font-weight: bold; border: solid"),this.isCastPending==!0)return{success:!1};this.isCastPending=!0;let s="Cast_"+Math.random().toString(36).substring(7);const r=new je({name:s,loop:!0,items:e,orchestration:this.orchestration});return(a=this.playlists)==null||a.push(r),(o=this.playlists)==null||o.forEach(u=>{var d;u.name!=s&&(this.deletePlaylist(u),(d=this.playlists)==null||d.splice(this.playlists.indexOf(u),1))}),this.currentPlaylistIndex=((l=this.playlists)==null?void 0:l.indexOf(r))??0,this.currentPlaylistItemIndex=t,this.currentHologram=e[t],this.isCastPending=!1,await r.play(),{success:!0}}async playStudioPlaylist(e){if(this.log("%c function call: subscribeToEvents ","color: magenta; font-weight: bold; border: solid"),this.isConnected==!1)return{success:!1,response:null};const t={orchestration:this.orchestration,name:"Studio Playlist",playlist_path:e,loop:!0};await P({endpoint:"instance_studio_playlist",requestBody:t});const s={orchestration:this.orchestration,name:"Studio Playlist",head_index:-1};return{success:!0,response:(await P({endpoint:"play_playlist",requestBody:s})).response}}async stopStudioPlaylist(){if(this.log("%c function call: stopStudioPlaylist ","color: magenta; font-weight: bold; border: solid"),this.isConnected==!1)return{success:!1};const e={orchestration:this.orchestration,name:"Studio Playlist",loop:!1};return(await P({endpoint:"delete_playlist",requestBody:e})).success==!1?{success:!1}:(await this.showWindow(!1),{success:!0})}async getAutoStartPlaylist(){if(this.log("%c function call: getAutoStartPlaylist ","color: magenta; font-weight: bold; border: solid"),this.isConnected==!1)return{success:!1,response:null};let e={orchestration:this.orchestration,head_index:-1},t=await P({endpoint:"get_autostart_playlist",requestBody:e});return t.success==!1?{success:!1,response:null}:{success:!0,response:t.response}}async setAutoStartPlaylist(e){if(this.log("%c function call: setAutoStartPlaylist ","color: magenta; font-weight: bold; border: solid"),this.isConnected==!1)return{success:!1,response:null};let t={orchestration:this.orchestration,head_index:-1,playlist_name:e.playlistName,playlist_path:e.playlistPath},s=await P({endpoint:"set_autostart_playlist",requestBody:t});return s.success==!1?{success:!1,response:null}:{success:!0,response:s.response}}async createAutoStartPlaylist(e){if(this.log("%c function call: createAutoStartPlaylist ","color: magenta; font-weight: bold; border: solid"),this.isConnected==!1)return{success:!1,response:null};for(let r=0;r=2&&console.log.apply(console,e)}warn(...e){T.verbosity>=1&&console.warn.apply(e)}error(...e){T.verbosity>=0&&console.error.apply(e)}async isVersionCompatible(){return this.version.major==0?this.isConnected=!1:this.version.major<2&&this.version.minor<1?(this.warn("Please update to the latest version for the best experience"),this.isConnected=!1):this.version.major>=2&&this.version.minor>=2&&(this.isConnected=!0),this.isConnected}};let j=T;w(j,"instance"),w(j,"fallback"),w(j,"eventsource"),w(j,"verbosity");const H=(n,e)=>i.number().refine(t=>t>=n&&t<=e,{message:`The value should be between ${n} and ${e}`}),Ps={min:.1,max:10,range:H(.1,10),type:"float"},Re={min:.1,max:4,range:H(.1,4),type:"float"},Is={min:0,max:1,range:H(0,1),type:"float"},Ss={min:-1,max:1,range:H(-1,1),type:"float"},Cs={min:-1,max:1,range:H(-1,1),type:"float"},Ae={min:.1,max:2,range:H(.1,2),type:"float"},js={min:-.05,max:.05,range:H(-.05,.05),type:"float"},Es={min:1,max:50,range:H(1,50),type:"int"},Ns={min:1,max:50,range:H(1,50),type:"int"},Os={min:1,max:2500,range:H(1,2500),type:"int"},Zs=Object.freeze(Object.defineProperty({__proto__:null,ASPECT:Ps,CROP_POS_X:Ss,CROP_POS_Y:Cs,DEPTHINESS:Re,DEPTH_CUTOFF:Is,FOCUS:js,QUILT_COLS:Ns,QUILT_ROWS:Es,QUILT_VIEW_COUNT:Os,ZOOM:Ae},Symbol.toStringTag,{value:"Module"})),Ms=i.union([i.literal("quilt"),i.literal("rgbd")]),Ye=i.object({rows:i.number(),columns:i.number(),aspect:i.number(),viewCount:i.number(),focus:i.number().optional()}),Xe=i.object({aspect:i.number(),depth_loc:i.union([i.literal(0),i.literal(1),i.literal(2),i.literal(3)]),depth_inversion:i.union([i.literal(0),i.literal(1)]),chroma_depth:i.union([i.literal(0),i.literal(1)]),depthiness:Re.range,focus:i.number().optional(),depth_cutoff:i.union([i.literal(1),i.literal(0)]).optional(),zoom:Ae.range}),Ke={quilt:Ye,rgbd:Xe};class Fe{constructor(e){w(this,"uri");w(this,"type");w(this,"settings");this.uri=e.uri,this.type="quilt",this.settings=e.settings}}class et{constructor(e){w(this,"uri");w(this,"type");w(this,"settings");this.uri=e.uri,this.type="rgbd",this.settings=e.settings}}function Rs({uri:n,type:e,settings:t}){switch(Ke[e].safeParse(t),e){case"quilt":return new Fe({uri:n,settings:t});case"rgbd":return new et({uri:n,settings:t});default:throw new Error(`Invalid type: ${e}`)}}const As=i.union([i.literal("focus"),i.literal("crop_pos_x"),i.literal("crop_pos_y"),i.literal("zoom"),i.literal("depth_loc"),i.literal("depth_inversion"),i.literal("chroma_depth"),i.literal("depthiness"),i.literal("depth_cutoff")]),Bs=i.object({focus:i.number().optional(),crop_pos_x:i.number().optional(),crop_pos_y:i.number().optional(),zoom:Ae.range,depth_loc:i.union([i.literal(0),i.literal(1),i.literal(2),i.literal(3)]),depth_inversion:i.union([i.literal(0),i.literal(1)]),chroma_depth:i.union([i.literal(0),i.literal(1)]),depthiness:Re.range,depth_cutoff:i.union([i.literal(1),i.literal(0)]).optional()});exports.BridgeClient=j;exports.MessageHandler=N;exports.MonitorConnectedMessageHandler=fs;exports.MonitorDisconnectedMessageHandler=ms;exports.NewItemPlayingMessageHandler=Je;exports.Playlist=je;exports.PlaylistDeleteMessageHandler=ws;exports.PlaylistInsertMessageHandler=bs;exports.PlaylistInstanceMessageHandler=_s;exports.ProgressCompletionMessageHandler=gs;exports.ProgressStartMessageHandler=ys;exports.ProgressUpdateMessageHandler=vs;exports.QuiltHologram=Fe;exports.QuiltHologramArgs=Ye;exports.QuiltPlaylistItem=Se;exports.RGBDHologram=et;exports.RGBDHologramArgs=Xe;exports.RGBDPlaylistItem=Ce;exports.SyncPlayPlaylistCancelledMessageHandler=Ts;exports.SyncPlayPlaylistCompleteMessageHandler=ks;exports.SyncPlayPlaylistMessageHandler=xs;exports.defaults=Zs;exports.hologramFactory=Rs;exports.hologramMap=Ke;exports.hologramParamMap=Bs;exports.hologramTypeSchema=Ms;exports.parameterNames=As; +//# sourceMappingURL=looking-glass-bridge.js.map diff --git a/dist/looking-glass-bridge.js.map b/dist/looking-glass-bridge.js.map new file mode 100644 index 0000000..3116bc0 --- /dev/null +++ b/dist/looking-glass-bridge.js.map @@ -0,0 +1 @@ +{"version":3,"file":"looking-glass-bridge.js","sources":["../src/library/components/displays.ts","../src/library/components/endpoints.ts","../src/library/components/orchestration.ts","../src/library/components/eventsource.ts","../src/library/playlists/playlistItems.ts","../src/library/playlists/playlist.ts","../node_modules/zod/lib/index.mjs","../src/library/schemas/schema.ts","../src/library/schemas/schema.responses.ts","../src/library/components/messageHandler.ts","../src/library/utilities/general.utils.ts","../src/library/client/BridgeClient.ts","../src/library/schemas/schema.utils.ts","../src/library/schemas/defaults.ts","../src/library/schemas/schema.hologram.ts","../src/library/components/hologram.ts","../src/library/schemas/schema.parameters.ts"],"sourcesContent":["export function tryParseCalibration(value) {\n const parsedValue = JSON.parse(value);\n if (parsedValue == undefined) {\n console.warn(\"Unable to parse calibration\");\n return null;\n }\n const calibration = {\n DPI: parsedValue.DPI.value,\n center: parsedValue.center.value,\n configVersion: parsedValue.configVersion,\n flipImageX: parsedValue.flipImageX.value,\n flipImageY: parsedValue.flipImageY.value,\n flipSubp: parsedValue.flipSubp.value,\n fringe: parsedValue.fringe.value,\n invView: parsedValue.invView.value,\n pitch: parsedValue.pitch.value,\n screenH: parsedValue.screenH.value,\n screenW: parsedValue.screenW.value,\n serial: parsedValue.serial,\n slope: parsedValue.slope.value,\n verticalAngle: parsedValue.verticalAngle.value,\n viewCone: parsedValue.viewCone.value,\n };\n return calibration;\n}\nexport function tryParseQuilt(value) {\n const parsedValue = JSON.parse(value);\n if (parsedValue == undefined) {\n return null;\n }\n const quilt = {\n quiltAspect: parsedValue.quiltAspect,\n quiltWidth: parsedValue.quiltX,\n quiltHeight: parsedValue.quiltY,\n rows: parsedValue.tileY,\n columns: parsedValue.tileX,\n };\n return quilt;\n}\nexport function tryParseDisplay(value) {\n const display = {\n calibration: tryParseCalibration(value.calibration.value),\n defaultQuilt: tryParseQuilt(value.defaultQuilt.value),\n hardwareVersion: value.hardwareVersion.value,\n index: value.index.value,\n state: value.state.value,\n windowCoords: value.windowCoords.value,\n };\n return display;\n}\n","import { BridgeClient } from \"..\";\n/**\n *\n * @param endpoint the bridge endpoint to send the message to, defined in BridgeEndpointType\n * @param requestBody Optional, the Json body to send to Bridge, defaults to empty Json\n * The requestbody is a json object that has been stringified. For example:\n * const requestBody = {\n * \torchestration: this.orchestration,\n * }\n * @param baseUrl Optional, the localhost url that bridge uses, defaults to http://localhost:33334/\n * @returns the response from the bridge endpoint, as a json object\n */\nexport async function sendMessage(params) {\n let parsedResponse;\n let Bridge = BridgeClient.getInstance();\n if (Bridge.getVerbosity() >= 3 && Bridge.getVerbosity() !== undefined) {\n console.group(\"Endpoint:\", params.endpoint);\n }\n // TEMPORARY: delay to give bridge a chance to handle events\n await new Promise((resolve) => setTimeout(resolve, 10));\n if (params.baseUrl == undefined) {\n params.baseUrl = \"http://localhost:33334/\";\n }\n if (Bridge.getVerbosity() == 3) {\n console.group(\"Message:\");\n Bridge.log(`${params.baseUrl + params.endpoint}`);\n Bridge.log(\"body:\", params.requestBody);\n console.groupEnd();\n }\n const request = {\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(params.requestBody),\n };\n try {\n let bridgeResponse = await fetch(`${params.baseUrl + params.endpoint}`, request);\n if (!bridgeResponse.ok) {\n return { success: false, response: null };\n }\n //if response timed out, exit\n if (bridgeResponse.status == 408) {\n Bridge.warn(\"%c Bridge Timeout:\", \"color: #ff0000\", bridgeResponse);\n console.groupEnd();\n }\n parsedResponse = await bridgeResponse.json();\n if (parsedResponse.status.value !== \"Completion\" && parsedResponse.status.value !== \"Pending\") {\n console.warn(\"%c Bridge Failure:\", \"color: #ff0000\", parsedResponse);\n console.groupEnd();\n // the call worked, but the response failed.\n return { success: true, response: parsedResponse };\n }\n Bridge.log(\"%c Response:\", \"color: #00aa00\", parsedResponse);\n console.groupEnd();\n return { success: true, response: parsedResponse };\n }\n catch (error) {\n console.group(\"%c Bridge Error:\", \"color: #ff0000\");\n console.error(\"Bridge Error\", error);\n console.groupEnd();\n console.groupEnd();\n return { success: false, response: null };\n }\n}\n","import { BridgeClient } from \"..\";\nimport { sendMessage } from \"./endpoints\";\n/**\n * this function will attempt to enter an orchestration\n * @param name\n * @returns\n */\nexport async function tryEnterOrchestration({ name, orchestration }) {\n let Bridge = BridgeClient.getInstance();\n Bridge.log(\"%c function call: tryEnterOrchestration \", \"color: magenta; font-weight: bold; border: solid\");\n if (name == undefined || name == \"\") {\n name = \"default\";\n }\n // if we're already in an orchestration, exit it\n if (orchestration !== \"\" && orchestration !== undefined) {\n return { success: false, response: null };\n }\n // a new orchestration will be created if the name is different.\n let requestBody = {\n name: name,\n };\n let message = await sendMessage({\n endpoint: \"enter_orchestration\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n console.error(\"failed to enter orchestration\", message);\n return { success: false, response: null };\n }\n console.groupEnd();\n return { success: true, response: message.response };\n}\nexport async function tryExitOrchestration(orchestration) {\n let body = {\n orchestration: orchestration,\n };\n let timeout = new Promise((reject) => {\n let id = setTimeout(() => {\n clearTimeout(id);\n reject({ success: false, response: null });\n }, 5000);\n });\n let message = await Promise.race([\n sendMessage({\n endpoint: \"exit_orchestration\",\n requestBody: body,\n }),\n timeout,\n ]);\n if (!message || message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n}\n","import { BridgeClient } from \"..\";\nfunction isWindowAvailable() {\n if (window !== undefined) {\n return true;\n }\n else {\n console.error(\"Window is unavailable!\");\n return false;\n }\n}\nfunction isWebSocketAvailable() {\n if (\"WebSocket\" in window) {\n return true;\n }\n else {\n console.error(\"WebSocket NOT supported by your Browser!\");\n return false;\n }\n}\n/**\n * Attempt to establish a connection to Looking Glass Bridge's websocket connection.\n * the websocket connection will send events from Bridge to the client.\n * @param orchestration\n * @returns\n */\nexport class BridgeEventSource {\n eventSource;\n MessageHandler;\n ws;\n constructor() {\n this.eventSource = undefined;\n this.MessageHandler = {};\n this.ws = undefined;\n }\n /**\n * adds a new message handler object to the BridgeEventSource class\n * @param event the event name to listen for\n * @param MessageHandler the function to call when the event is received\n */\n addMessageHandler({ event, MessageHandler, }) {\n const client = BridgeClient.getInstance();\n // The WebSocket is connected, we can add the event handler directly\n if (!(event in this.MessageHandler)) {\n this.MessageHandler[event] = [];\n }\n this.MessageHandler[event]?.push(MessageHandler);\n client.log(`%c Add Message Handler: ${event} `, \"color: YellowGreen; font-weight: bold; border: solid;\");\n }\n removeMessageHandler({ event, MessageHandler, }) {\n const client = BridgeClient.getInstance();\n client.log(`%c Message Handler Removed: ${event} `, \"color: Tomato; font-weight: bold; border: solid;\");\n if (event in this.MessageHandler) {\n const handlerIndex = this.MessageHandler[event]?.findIndex((handler) => handler === MessageHandler);\n if (handlerIndex !== -1 && handlerIndex !== undefined) {\n this.MessageHandler[event]?.splice(handlerIndex, 1);\n }\n }\n }\n callMessageHandler(response) {\n let parsedResponse;\n try {\n parsedResponse = JSON.parse(response);\n }\n catch (error) {\n const client = BridgeClient.getInstance();\n client.error(\"Failed to parse JSON\", error);\n return;\n }\n if (parsedResponse.payload.value.event.value in this.MessageHandler) {\n const handlers = this.MessageHandler[parsedResponse.payload.value.event.value];\n if (handlers) {\n handlers.forEach((handler) => handler(parsedResponse));\n }\n }\n }\n connectEvent() {\n const handlers = this.MessageHandler[\"Bridge Connected\"];\n if (handlers) {\n handlers.forEach((handler) => handler(undefined));\n }\n }\n disconnectEvent() {\n const handlers = this.MessageHandler[\"Bridge Disconnected\"];\n if (handlers) {\n handlers.forEach((handler) => handler(undefined));\n }\n }\n async connectToBridgeEventSource(orchestration) {\n const client = BridgeClient.getInstance();\n client.log(\"%c Connect to Bridge Events Source \", \"color: chartreuse; font-weight: bold; border: solid\");\n if (!isWindowAvailable())\n return { success: false };\n if (!isWebSocketAvailable())\n return { success: false };\n let bridgeEventSource = this;\n // provided we have web socket support, we can proceed to query Bridge\n this.ws = new WebSocket(\"ws://localhost:9724/event_source\");\n return new Promise((resolve) => {\n if (this.ws !== undefined) {\n this.ws.onopen = () => {\n const client = BridgeClient.getInstance();\n client.log(\"%c Connected to Websocket \", \"color: chartreuse; font-weight: bold; border: solid\");\n const params = {\n subscribe_orchestration_events: orchestration,\n };\n this.ws?.send(JSON.stringify(params));\n resolve({ success: true });\n };\n this.ws.onmessage = function (evt) {\n bridgeEventSource.callMessageHandler(evt.data);\n };\n this.ws.onclose = function () {\n const client = BridgeClient.getInstance();\n if (!client.manualDisconnect) {\n client.disconnect();\n }\n client.log(`%c Disconnected from Websocket, Manual Disconnect: ${client.manualDisconnect} `, \"color: red; font-weight: bold; border: solid\");\n };\n this.ws.onerror = function (error) {\n client.warn(\"Unable to connect to WebSocket, is Bridge Running?\", error);\n resolve({ success: false });\n };\n }\n });\n }\n}\n","/**Playist items are what we actually end up sending to Bridge.\n * These are managed by the Playlist class, and should not be called externally.\n * We take the hologram object the user creates and prepare it to be added to a playlist with the toBridge function. */\nclass PlaylistItem {\n orchestration;\n hologram;\n id;\n index;\n playlistName;\n constructor(args) {\n this.hologram = args.hologram;\n this.id = args.id;\n this.index = args.index;\n this.playlistName = args.playlistName;\n this.orchestration = args.orchestration;\n }\n toBridge() {\n let playlistItem;\n if (this.hologram.type == \"quilt\") {\n const settings = this.hologram.settings;\n playlistItem = {\n orchestration: this.orchestration,\n id: this.id,\n name: this.playlistName,\n index: this.index,\n uri: this.hologram.uri,\n rows: settings.rows,\n cols: settings.columns,\n focus: settings.focus ? settings.focus : 0,\n aspect: settings.aspect,\n view_count: settings.viewCount,\n isRGBD: 0,\n };\n return playlistItem;\n }\n else if (this.hologram.type == \"rgbd\") {\n const settings = this.hologram.settings;\n playlistItem = {\n orchestration: this.orchestration,\n id: this.id,\n name: this.playlistName,\n index: this.index,\n uri: this.hologram.uri,\n rows: 8,\n cols: 13,\n focus: settings.focus ? settings.focus : 0,\n aspect: settings.aspect,\n view_count: 8 * 13,\n isRGBD: 1,\n depth_loc: settings.depth_loc,\n depth_inversion: settings.depth_inversion,\n chroma_depth: settings.chroma_depth,\n depthiness: settings.depthiness,\n zoom: settings.zoom,\n };\n return playlistItem;\n }\n throw new Error(\"Invalid hologram type\");\n }\n}\nexport class QuiltPlaylistItem extends PlaylistItem {\n constructor(args) {\n super(args);\n }\n}\nexport class RGBDPlaylistItem extends PlaylistItem {\n constructor(args) {\n super(args);\n }\n}\n","import { sendMessage } from \"../components/endpoints\";\nimport { RGBDPlaylistItem, QuiltPlaylistItem } from \"./playlistItems\";\n/**\n * Playlist class\n * @class\n *\n */\nexport class Playlist {\n name;\n loop;\n items;\n orchestration;\n constructor(args) {\n this.name = args.name;\n this.loop = args.loop;\n this.orchestration = args.orchestration;\n if (args.items) {\n this.items = args.items?.map((item, index) => {\n if (item.type == \"quilt\") {\n return new QuiltPlaylistItem({\n hologram: item,\n id: index,\n index: index,\n playlistName: this.name,\n orchestration: this.orchestration,\n });\n }\n else if (item.type == \"rgbd\") {\n return new RGBDPlaylistItem({\n hologram: item,\n id: index,\n index: index,\n playlistName: this.name,\n orchestration: this.orchestration,\n });\n }\n }).filter((item) => !!item);\n }\n else\n this.items = [];\n }\n setName(name) {\n this.name = name;\n }\n addItem(hologram) {\n let item;\n if (hologram.type == \"quilt\") {\n item = new QuiltPlaylistItem({\n hologram: hologram,\n id: this.items.length,\n index: this.items.length,\n playlistName: this.name,\n orchestration: this.orchestration,\n });\n this.items.push(item);\n return item;\n }\n else if (hologram.type == \"rgbd\") {\n item = new RGBDPlaylistItem({\n hologram: hologram,\n id: this.items.length,\n index: this.items.length,\n playlistName: this.name,\n orchestration: this.orchestration,\n });\n this.items.push(item);\n return item;\n }\n else {\n return undefined;\n }\n }\n async addPlaylistItemToBridge(item) {\n const pRequestBody = item.toBridge();\n let message = await sendMessage({ endpoint: \"insert_playlist_entry\", requestBody: pRequestBody });\n if (message.success == false) {\n console.error(\"failed to insert playlist entry\");\n return false;\n }\n else {\n return true;\n }\n }\n removeItem(item) {\n if (item.id == undefined)\n return;\n this.items.splice(item.id, 1);\n for (let i = 0; i < this.items.length; i++) {\n this.items[i].id = i;\n }\n }\n clearItems() {\n this.items = [];\n }\n /**\n * gets the object for the current playlist that is currently being played\n * @param orchestration\n * @param head\n * @returns\n */\n getCurrent({ orchestration, head }) {\n const content = {\n orchestration: orchestration,\n name: this.name,\n head_index: head,\n };\n return content;\n }\n /**\n * create the json object for the playlist instance\n * @param orchestration\n * @returns\n */\n getInstance(orchestration) {\n const content = { orchestration: orchestration, name: this.name, loop: this.loop };\n return content;\n }\n /**\n * this function will play a playlist on a Looking Glass display\n * the playlist must be created and populated with content before calling this function\n * @param playlist\n * @param head\n * @returns\n */\n async play({ head } = {}) {\n let orchestration = this.orchestration;\n const requestBody = this.getInstance(this.orchestration);\n if (!head) {\n head = -1;\n }\n let instancePlaylist = await sendMessage({ endpoint: \"instance_playlist\", requestBody: requestBody });\n if (instancePlaylist.success == false) {\n console.error(\"failed to initialize playlist\");\n return false;\n }\n const PlaylistItems = this.items;\n if (instancePlaylist.success == true) {\n if (orchestration !== undefined) {\n for (let i = 0; i < PlaylistItems.length; i++) {\n PlaylistItems[i].orchestration = this.orchestration;\n const pRequestBody = PlaylistItems[i].toBridge();\n let message = await sendMessage({ endpoint: \"insert_playlist_entry\", requestBody: pRequestBody });\n if (message.success == false) {\n console.error(\"failed to insert playlist entry\");\n return false;\n }\n }\n }\n }\n const playRequestBody = this.getCurrent({ orchestration, head });\n let play_playlist = await sendMessage({\n endpoint: \"play_playlist\",\n requestBody: playRequestBody,\n });\n if (play_playlist.success == false) {\n return false;\n }\n return true;\n }\n}\n","var util;\n(function (util) {\n util.assertEqual = (val) => val;\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array\n .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n .join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util || (util = {}));\nvar objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil || (objectUtil = {}));\nconst ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nconst getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then &&\n typeof data.then === \"function\" &&\n data.catch &&\n typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n};\n\nconst ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nclass ZodError extends Error {\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n get errors() {\n return this.issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `smaller than or equal to`\n : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n};\n\nlet overrideErrorMap = errorMap;\nfunction setErrorMap(map) {\n overrideErrorMap = map;\n}\nfunction getErrorMap() {\n return overrideErrorMap;\n}\n\nconst makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message || errorMessage,\n };\n};\nconst EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n const issue = makeIssue({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nclass ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n syncPairs.push({\n key: await pair.key,\n value: await pair.value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (typeof value.value !== \"undefined\" || pair.alwaysSet) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nconst INVALID = Object.freeze({\n status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nconst OK = (value) => ({ status: \"valid\", value });\nconst isAborted = (x) => x.status === \"aborted\";\nconst isDirty = (x) => x.status === \"dirty\";\nconst isValid = (x) => x.status === \"valid\";\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n\nvar errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil || (errorUtil = {}));\n\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (this._key instanceof Array) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n if (typeof ctx.data === \"undefined\") {\n return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };\n }\n return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nclass ZodType {\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n }\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n var _a;\n const ctx = {\n common: {\n issues: [],\n async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n async: true,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult)\n ? maybeAsyncResult\n : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\"\n ? refinementData(val, ctx)\n : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this, this._def);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[a-z][a-z0-9]*$/;\nconst ulidRegex = /[0-9A-HJKMNP-TV-Z]{26}/;\nconst uuidRegex = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\nconst emailRegex = /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst emojiRegex = /^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$/u;\nconst ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;\nconst ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\n// Adapted from https://stackoverflow.com/a/3143231\nconst datetimeRegex = (args) => {\n if (args.precision) {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}Z$`);\n }\n }\n else if (args.precision === 0) {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}Z$`);\n }\n }\n else {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?Z$`);\n }\n }\n};\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nclass ZodString extends ZodType {\n constructor() {\n super(...arguments);\n this._regex = (regex, validation, message) => this.refinement((data) => regex.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message),\n });\n /**\n * @deprecated Use z.string().min(1) instead.\n * @see {@link ZodString.min}\n */\n this.nonempty = (message) => this.min(1, errorUtil.errToObj(message));\n this.trim = () => new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n this.toLowerCase = () => new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n this.toUpperCase = () => new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx.parsedType,\n }\n //\n );\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch (_a) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n var _a;\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options === null || options === void 0 ? void 0 : options.position,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message),\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodString.create = (params) => {\n var _a;\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null, min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" ||\n ch.kind === \"int\" ||\n ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = BigInt(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodBigInt.create = (params) => {\n var _a;\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\nclass ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_date,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nclass ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nclass ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nclass ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nclass ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nclass ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nclass ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n}\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nclass ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nclass ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nclass ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util.objectKeys(shape);\n return (this._cached = { shape, keys });\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever &&\n this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") ;\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n syncPairs.push({\n key,\n value: await pair.value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n var _a, _b, _c, _d;\n const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n util.objectKeys(mask).forEach((key) => {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n}\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nclass ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError(issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return Object.keys(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else {\n return null;\n }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nfunction mergeValues(a, b) {\n const aType = getParsedType(a);\n const bType = getParsedType(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b);\n const sharedKeys = util\n .objectKeys(a)\n .filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === ZodParsedType.date &&\n bType === ZodParsedType.date &&\n +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nclass ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types,\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\nclass ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nclass ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nclass ZodMap extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nclass ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nclass ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n return OK(async (...args) => {\n const error = new ZodError([]);\n const parsedArgs = await this._def.args\n .parseAsync(args, params)\n .catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await fn(...parsedArgs);\n const parsedReturns = await this._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n return OK((...args) => {\n const parsedArgs = this._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = fn(...parsedArgs.data);\n const parsedReturns = this._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args\n ? args\n : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nclass ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nclass ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nclass ZodEnum extends ZodType {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (this._def.values.indexOf(input.data) === -1) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values) {\n return ZodEnum.create(values);\n }\n exclude(values) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));\n }\n}\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string &&\n ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (nativeEnumValues.indexOf(input.data) === -1) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nclass ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise &&\n ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise\n ? ctx.data\n : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nclass ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data);\n if (ctx.common.async) {\n return Promise.resolve(processed).then((processed) => {\n return this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n });\n }\n else {\n return this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc\n // effect: RefinementEffect\n ) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!isValid(base))\n return base;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((base) => {\n if (!isValid(base))\n return base;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n });\n }\n }\n util.assertNever(effect);\n }\n}\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nclass ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nclass ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nclass ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\"\n ? params.default\n : () => params.default,\n ...processCreateParams(params),\n });\n};\nclass ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if (isAsync(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nclass ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nconst BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nclass ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nconst custom = (check, params = {}, \n/*\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) => {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n var _a, _b;\n if (!check(data)) {\n const p = typeof params === \"function\"\n ? params(data)\n : typeof params === \"string\"\n ? { message: params }\n : params;\n const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n ctx.addIssue({ code: \"custom\", ...p2, fatal: _fatal });\n }\n });\n return ZodAny.create();\n};\nconst late = {\n object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\nconst instanceOfType = (\n// const instanceOfType = any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nconst coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nconst NEVER = INVALID;\n\nvar z = /*#__PURE__*/Object.freeze({\n __proto__: null,\n defaultErrorMap: errorMap,\n setErrorMap: setErrorMap,\n getErrorMap: getErrorMap,\n makeIssue: makeIssue,\n EMPTY_PATH: EMPTY_PATH,\n addIssueToContext: addIssueToContext,\n ParseStatus: ParseStatus,\n INVALID: INVALID,\n DIRTY: DIRTY,\n OK: OK,\n isAborted: isAborted,\n isDirty: isDirty,\n isValid: isValid,\n isAsync: isAsync,\n get util () { return util; },\n get objectUtil () { return objectUtil; },\n ZodParsedType: ZodParsedType,\n getParsedType: getParsedType,\n ZodType: ZodType,\n ZodString: ZodString,\n ZodNumber: ZodNumber,\n ZodBigInt: ZodBigInt,\n ZodBoolean: ZodBoolean,\n ZodDate: ZodDate,\n ZodSymbol: ZodSymbol,\n ZodUndefined: ZodUndefined,\n ZodNull: ZodNull,\n ZodAny: ZodAny,\n ZodUnknown: ZodUnknown,\n ZodNever: ZodNever,\n ZodVoid: ZodVoid,\n ZodArray: ZodArray,\n ZodObject: ZodObject,\n ZodUnion: ZodUnion,\n ZodDiscriminatedUnion: ZodDiscriminatedUnion,\n ZodIntersection: ZodIntersection,\n ZodTuple: ZodTuple,\n ZodRecord: ZodRecord,\n ZodMap: ZodMap,\n ZodSet: ZodSet,\n ZodFunction: ZodFunction,\n ZodLazy: ZodLazy,\n ZodLiteral: ZodLiteral,\n ZodEnum: ZodEnum,\n ZodNativeEnum: ZodNativeEnum,\n ZodPromise: ZodPromise,\n ZodEffects: ZodEffects,\n ZodTransformer: ZodEffects,\n ZodOptional: ZodOptional,\n ZodNullable: ZodNullable,\n ZodDefault: ZodDefault,\n ZodCatch: ZodCatch,\n ZodNaN: ZodNaN,\n BRAND: BRAND,\n ZodBranded: ZodBranded,\n ZodPipeline: ZodPipeline,\n custom: custom,\n Schema: ZodType,\n ZodSchema: ZodType,\n late: late,\n get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; },\n coerce: coerce,\n any: anyType,\n array: arrayType,\n bigint: bigIntType,\n boolean: booleanType,\n date: dateType,\n discriminatedUnion: discriminatedUnionType,\n effect: effectsType,\n 'enum': enumType,\n 'function': functionType,\n 'instanceof': instanceOfType,\n intersection: intersectionType,\n lazy: lazyType,\n literal: literalType,\n map: mapType,\n nan: nanType,\n nativeEnum: nativeEnumType,\n never: neverType,\n 'null': nullType,\n nullable: nullableType,\n number: numberType,\n object: objectType,\n oboolean: oboolean,\n onumber: onumber,\n optional: optionalType,\n ostring: ostring,\n pipeline: pipelineType,\n preprocess: preprocessType,\n promise: promiseType,\n record: recordType,\n set: setType,\n strictObject: strictObjectType,\n string: stringType,\n symbol: symbolType,\n transformer: effectsType,\n tuple: tupleType,\n 'undefined': undefinedType,\n union: unionType,\n unknown: unknownType,\n 'void': voidType,\n NEVER: NEVER,\n ZodIssueCode: ZodIssueCode,\n quotelessJson: quotelessJson,\n ZodError: ZodError\n});\n\nexport { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z };\n","import * as z from \"zod\";\n// const boolean = z.literal(\"BOOLEAN\")\n// const char = z.literal(\"CHAR\")\n// const short = z.literal(\"SHORT\")\n// const unsigned_short = z.literal(\"UNSIGNED_SHORT\")\nexport const unsigned_int = z.literal(\"UNSIGNED_INT\");\nexport const int = z.literal(\"INT\");\n// const long = z.literal(\"LONG\")\nexport const float = z.literal(\"FLOAT\");\n// const double = z.literal(\"DOUBLE\")\nexport const int2 = z.literal(\"INT2\");\n// const int3 = z.literal(\"INT3\")\n// const int4 = z.literal(\"INT4\")\n// const float2 = z.literal(\"FLOAT2\")\n// const float3 = z.literal(\"FLOAT3\")\n// const float4 = z.literal(\"FLOAT4\")\n// const float4x4 = z.literal(\"FLOAT4X4\")\n// const string = z.literal(\"STRING\")\nexport const wstring = z.literal(\"WSTRING\");\nexport const variant_map = z.literal(\"VARIANT_MAP\");\n// possible types that can be returned by bridge' status object.\nexport const completion = z.literal(\"Completion\");\nexport const unknown = z.literal(\"UnknownOrchestration\");\nexport const pending = z.literal(\"Pending\");\nexport const failure = z.literal(\"Failure\");\n// these types exist, but haven't been seen in the wild.\n// export const NotImplemented = z.literal(\"NotImplemented\")\n// export const aborted = z.literal(\"Aborted\")\n// export const fileNotFound = z.literal(\"FileNotFound\")\n// export const invalidCast = z.literal(\"InvalidCast\")\n// export const errorInParams = z.literal(\"ErrorInParams\")\n// export const inComplete = z.literal(\"Incomplete\")\n// export const inTearDown = z.literal(\"InTeardown\")\n// export const verbNotFound = z.literal(\"VerbNotFound\")\n// export const unknownWork = z.literal(\"UnknownWork\")\n// export const unknownPlaylist = z.literal(\"UnknownPlaylist\")\n// export const objectDelted = z.literal(\"ObjectDeleted\")\n// export const framesExhausted = z.literal(\"FramesExhausted\")\nexport const name = z.string();\nexport const status = z.object({\n name: name,\n type: wstring,\n value: z.union([completion, pending, failure, unknown]),\n});\n","import { z } from \"zod\";\nimport * as schema from \"./schema\";\n// possible types that can be returned by bridge.\nexport const version = z.object({\n name: schema.name,\n // the payload value is unique to each bridge response.\n payload: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const orchestration = z.object({\n name: schema.name,\n payload: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const play_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n id: z\n .object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n })\n .optional(),\n message: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const instance_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n name: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const insert_playlist_entry = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n index: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const delete_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n name: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const show_window = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nconst displayItem = z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n calibration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n defaultQuilt: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n hardwareVersion: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n hwid: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n index: z.object({\n name: schema.name,\n type: schema.unsigned_int,\n value: z.number(),\n }),\n state: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n windowCoords: z.object({\n name: schema.name,\n type: schema.int2,\n value: z.object({\n x: z.number(),\n y: z.number(),\n }),\n }),\n }),\n});\nexport const available_output_devices = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.record(displayItem).optional(),\n }),\n status: schema.status,\n});\nexport const instance_studio_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n name: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const update_playlist_entry = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const update_current_entry = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const get_autostart_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n playlist_name: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n playlist_path: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const set_autostart_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n playlist_name: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const set_named_autostart_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n playlist_name: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const transport_control_play = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const transport_control_pause = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const transport_control_next = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const transport_control_previous = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const transport_control_seek_to_index = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\n","export class MessageHandler {\n bridgeEventName;\n client;\n constructor(args) {\n this.bridgeEventName = args.bridgeEventName;\n this.client = args.client;\n this.client.addEventListener(this.bridgeEventName, this.handle.bind(this));\n }\n}\nexport class MonitorConnectedMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Monitor Connect\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c Monitor Connect \", \"color: aqua; font-weight: bold; border: solid;\", message);\n }\n}\nexport class MonitorDisconnectedMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Monitor Disconnect\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c Monitor Disconnect \", \"color: aqua; font-weight: bold; border: solid;\", message);\n }\n}\nexport class ProgressStartMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Progress Start\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c Progress Start \", \"color: aqua; font-weight: bold; border: solid;\", message);\n }\n}\nexport class ProgressCompletionMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Progress Completion\", client: args.client });\n }\n handle(message) {\n this.client.log(message);\n }\n}\nexport class ProgressUpdateMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Progress Update\", client: args.client });\n }\n handle(message) {\n this.client.log(message);\n }\n}\nexport class PlaylistInstanceMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Playlist Instance\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c Playlist Instance \", \"color: aqua; font-weight: bold; border: solid;\", message);\n }\n}\nexport class PlaylistInsertMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Playlist Insert\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c Playlist Insert \", \"color: aqua; font-weight: bold; border: solid;\", message);\n }\n}\nexport class PlaylistDeleteMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Playlist Delete\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c Playlist Delete \", \"color: aqua; font-weight: bold; border: solid;\", message);\n }\n}\nexport class SyncPlayPlaylistMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Sync/Play Playlist\", client: args.client });\n }\n handle(message) {\n this.client.log(message);\n }\n}\nexport class SyncPlayPlaylistCompleteMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Sync/Play Playlist Complete\", client: args.client });\n }\n handle(message) {\n this.client.log(message);\n }\n}\nexport class SyncPlayPlaylistCancelledMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Sync/Play Playlist Cancelled\", client: args.client });\n }\n handle(message) {\n this.client.log(message);\n }\n}\nexport class NewItemPlayingMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"New Item Playing\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c New Item Playing \", \"color: aqua; font-weight: bold; border: solid;\", message);\n let index = this.client.currentPlaylistIndex;\n let playlistName = this.client.playlists?.[index]?.name;\n let playlistItemIndex = this.client.currentPlaylistItemIndex;\n if (message.payload.value.playlist_name.value == playlistName &&\n message.payload.value.index.value == playlistItemIndex) {\n this.client.isCastPending = false;\n }\n }\n}\n","/**\n * Parse the version from Bridge's version string\n * Bridge uses a major, minor, patch, hotfix versioning system\n * @param versionString The version string to parse\n * @returns BridgeVersion\n */\nexport function parseBridgeVersion(versionString) {\n const [major, minor, patch, hotfix] = versionString.split(\".\").map(Number);\n return {\n major,\n minor,\n patch,\n hotfix,\n };\n}\n","import { tryParseDisplay } from \"../components/displays\";\nimport { sendMessage } from \"../components/endpoints\";\nimport { tryEnterOrchestration, tryExitOrchestration } from \"../components/orchestration\";\nimport { BridgeEventSource } from \"../components/eventsource\";\nimport { Playlist } from \"../playlists/playlist\";\nimport * as schema from \"../schemas/schema.responses\";\nimport { NewItemPlayingMessageHandler } from \"../components/messageHandler\";\nimport { parseBridgeVersion } from \"../utilities/general.utils\";\nexport class BridgeClient {\n /** The name of the current orchestration */\n orchestration;\n /** A boolean that stores if the Bridge session is valid or not\n * If the orchestration is not valid, some functions will not work\n */\n isConnected;\n /**A boolean for checking the status of the current disconnect event */\n isDisconnecting;\n /**An array containing the connected Looking Glass Displays */\n displays;\n /**an Array containing Playlists, we store this to easily switch between multiple playlists */\n playlists;\n /** The index of playlists that is currently active */\n currentPlaylistIndex;\n /**The index of the playlist Item that is currently active */\n currentPlaylistItemIndex;\n /** the instance of the client that we create, BridgeClient is a singleton, there can only be one */\n static instance;\n static fallback;\n /** The websocket connection to Bridge's Event Source, this returns information from Bridge */\n static eventsource;\n /**control how often we log to the console, 3 is everything, 0 is nothing */\n static verbosity;\n /**store if we're currently in the middle of a cast */\n isCastPending = false;\n /**the version of the Looking Glass Driver that's running */\n version;\n currentHologram;\n /**a boolean for whether a disconnect was triggered automatically or manually */\n manualDisconnect = false;\n playState = \"STOPPED\";\n constructor() {\n this.orchestration = \"\";\n this.isConnected = false;\n this.isDisconnecting = false;\n this.displays = [];\n BridgeClient.eventsource = new BridgeEventSource();\n BridgeClient.fallback = undefined;\n this.playlists = [];\n this.currentPlaylistIndex = 0;\n this.currentPlaylistItemIndex = 0;\n this.version = { major: 0, minor: 0, patch: 0, hotfix: 0 };\n if (!BridgeClient.instance) {\n BridgeClient.instance = this;\n }\n else {\n return BridgeClient.instance;\n }\n }\n static getInstance() {\n if (!BridgeClient.instance) {\n BridgeClient.instance = new BridgeClient();\n }\n return BridgeClient.instance;\n }\n /**\n * A helper function to check and see if Looking Glass Bridge is running or not.\n * @returns boolean, true if Bridge is running, false if Bridge is not running\n */\n async status() {\n this.log(\"%c function call: status \", \"color: magenta; font-weight: bold; border: solid\");\n const timeout = new Promise((reject) => {\n let id = setTimeout(() => {\n clearTimeout(id);\n reject(new Error(\"Timed out\"));\n }, 5000);\n });\n try {\n const response = (await Promise.race([fetch(\"http://localhost:33334/\"), timeout]));\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n return true;\n }\n catch (error) {\n const err = error;\n if (err.message === \"Timed out\") {\n this.warn(\"Request timed out\");\n }\n else {\n console.warn(`Looking Glass Bridge is not running, please start Bridge and try again.`);\n }\n return false;\n }\n }\n /**\n * Attempt to connect to Looking Glass Bridge.\n * @returns\n */\n async connect() {\n this.log(\"%c function call: connect \", \"color: magenta; font-weight: bold; border: solid\");\n // check if we're already connected\n if (this.isConnected == true) {\n console.warn(`Already connected to Looking Glass Bridge.`);\n return { success: true, response: { version: this.version, orchestration: this.orchestration } };\n }\n // check that the websocket and the http server are running\n let status = await this.status();\n if (status == false)\n return {\n success: false,\n response: { version: { major: 0, minor: 0, patch: 0, hotfix: 0 }, orchestration: \"\" },\n };\n this.isConnected = true;\n // BridgeClient.fallback = new Fallback()\n let call = await this.createOrchestration(\"\");\n if (call.success == false) {\n let version = await this.getVersion();\n if (version.success == false) {\n return { success: false, response: { version: parseBridgeVersion(\"0\"), orchestration: \"\" } };\n }\n else if (version.response.major < 2 && version.response.minor < 1) {\n return { success: false, response: { version: version.response, orchestration: \"\" } };\n }\n }\n // create event source and fallback\n await this.subscribeToEvents();\n BridgeClient.eventsource.connectEvent();\n new NewItemPlayingMessageHandler({ client: this });\n return { success: true, response: { version: this.version, orchestration: this.orchestration } };\n }\n /**\n * Creates an orchestration called \"default\" if one does not already exist.\n * @returns string, the name of the current orchestration\n */\n async createOrchestration(name) {\n this.log(\"%c function call: createOrchestration \", \"color: magenta; font-weight: bold; border: solid\");\n if ((await this.status()) == false) {\n return { success: false, response: null };\n }\n const version = await this.getVersion();\n if (version.response.major < 2 && version.response.minor < 1) {\n console.error(`Unable to get Looking Glass Bridge version, please upgrade Looking Glass Bridge.`);\n return { success: false, response: null };\n }\n let new_orchestration = await tryEnterOrchestration({ name: name, orchestration: this.orchestration });\n if (new_orchestration.success == true) {\n if (new_orchestration.response?.payload.value) {\n this.orchestration = new_orchestration.response?.payload.value;\n }\n }\n return { success: true, response: this.orchestration };\n }\n /**\n * Disconnect from Looking Glass Bridge, free up resources.\n */\n async disconnect() {\n this.log(\"%c function call: disconnect \", \"color: magenta; font-weight: bold; border: solid\");\n // check that we're not already disconnecting\n if (this.isDisconnecting == true || this.isConnected == false) {\n return { success: false };\n }\n this.isDisconnecting = true;\n this.manualDisconnect = true;\n let exit = await tryExitOrchestration(this.orchestration);\n if (exit.success == false) {\n console.warn(` ⚠️ Unable to exit orchestration, Bridge is not reachable.`);\n }\n // shutdown\n BridgeClient.eventsource?.disconnectEvent();\n BridgeClient.eventsource?.ws?.close();\n BridgeClient.fallback?.ws.close();\n BridgeClient.fallback = undefined;\n this.displays = [];\n this.playlists = [];\n this.currentHologram = undefined;\n this.orchestration = \"\";\n this.isDisconnecting = false;\n this.isCastPending = false;\n this.isConnected = false;\n return { success: true };\n }\n /**\n * changes the state of the Looking Glass Bridge Window\n * @param showWindow boolean, true to show the Looking Glass window, false to hide the Looking Glass window\n * @returns\n */\n async showWindow(showWindow) {\n if (this.isConnected == false)\n return { success: false, response: null };\n this.log(\"%c function call: showWindow \", \"color: magenta; font-weight: bold; border: solid\");\n let errorMessage = `this call is only supported in bridge 2.2 or newer, please upgrade Looking Glass Bridge.`;\n if ((await this.isVersionCompatible()) == false) {\n console.warn(errorMessage);\n return { success: false, response: null };\n }\n const requestBody = {\n orchestration: this.orchestration,\n show_window: showWindow,\n head_index: -1,\n };\n let message = await sendMessage({\n endpoint: \"show_window\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n }\n /**\n * A helper function to get the version of Looking Glass Bridge that is running.\n * @returns string of the version of Looking Glass Bridge that is running\n */\n async getVersion() {\n this.log(\"%c function call: getVersion \", \"color: magenta; font-weight: bold; border: solid\");\n let message = await sendMessage({ endpoint: \"bridge_version\", requestBody: {} });\n if (message.success == true) {\n let response = parseBridgeVersion(message.response.payload.value);\n this.version = response;\n return { success: true, response: this.version };\n }\n // if the bridge version fails, try the legacy version\n else {\n let version = await BridgeClient.fallback?.getLegacyVersion();\n if (version == undefined)\n return { success: false, response: parseBridgeVersion(\"0\") };\n return { success: true, response: parseBridgeVersion(version) };\n }\n }\n /**\n * A helper function to get the version of the Looking Glass Bridge API\n * @returns the current version of the Looking Glass API\n */\n async apiVersion() {\n this.log(\"%c function call: apiVersion \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false) {\n return { success: false, response: parseBridgeVersion(\"0\") };\n }\n if ((await this.isVersionCompatible()) == false)\n return { success: false, response: parseBridgeVersion(\"0\") };\n let response = await sendMessage({ endpoint: \"api_version\", requestBody: {} });\n if (response.success == false) {\n console.warn(`this call is only supported in bridge 2.2 or newer, please upgrade Looking Glass Bridge.`);\n return { success: false, response: parseBridgeVersion(\"0\") };\n }\n let APIVersion = parseBridgeVersion(response.response.payload.value);\n return { success: true, response: APIVersion };\n }\n /**\n * QueryDisplays finds all displays that are connected to the computer,\n * searches for Looking Glass displays, and returns them as an array of Display objects\n * @returns the display object\n */\n async getDisplays() {\n this.log(\"%c function call: displays \", \"color: magenta; font-weight: bold; border: solid\");\n this.displays = [];\n // if there is no orchestration, attempt to create one, if that fails, return false\n if (this.isConnected == false)\n return { success: false, response: null };\n const requestBody = {\n orchestration: this.orchestration,\n };\n let data = await sendMessage({\n endpoint: \"available_output_devices\",\n requestBody: requestBody,\n });\n if (data.success == false) {\n return { success: false, response: null };\n }\n schema.available_output_devices.safeParse(data.response);\n for (let key in data.response.payload.value) {\n let display = data.response.payload.value[`${key}`];\n if (display.value.hwid.value.includes(\"LKG\")) {\n let lkg = tryParseDisplay(display.value);\n if (lkg != undefined) {\n this.displays.push(lkg);\n }\n }\n }\n return { success: true, response: this.displays };\n }\n /**Delete the instance of the playlist from Bridge, this will stop the playlist from playing if it's active. */\n async deletePlaylist(playlist) {\n this.log(\"%c function call: deletePlaylist \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false) {\n return { success: false, response: null };\n }\n const requestBody = playlist.getInstance(this.orchestration);\n let response = await sendMessage({\n endpoint: \"delete_playlist\",\n requestBody: requestBody,\n });\n if (response.success == false) {\n return { success: false, response: null };\n }\n return response;\n }\n /**\n * This function will allow you to cast a single hologram to the Looking Glass\n * @param hologram\n */\n async cast(hologram) {\n if (this.isConnected == false)\n return { success: false };\n this.log(\"%c function call: cast \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isCastPending == true) {\n this.warn(\"already casting please wait\");\n return { success: false };\n }\n this.isCastPending = true;\n // try to find an existing cast playlist\n let randomName = \"Cast_\" + Math.random().toString(36).substring(7);\n let playlist = undefined;\n // if our cast playlist doesn't exist, create one\n if (playlist == undefined) {\n playlist = new Playlist({\n name: randomName,\n loop: true,\n items: [],\n orchestration: this.orchestration,\n });\n this.playlists?.push(playlist);\n }\n // add the hologram to the playlist, and seek to it\n let currentCastItem = playlist.addItem(hologram);\n if (currentCastItem !== undefined) {\n await playlist.play();\n // delete old playlists\n this.playlists?.forEach((playlist) => {\n if (playlist.name != randomName) {\n this.deletePlaylist(playlist);\n this.playlists?.splice(this.playlists.indexOf(playlist), 1);\n }\n });\n //update the current playlist index value.\n this.currentPlaylistIndex = this.playlists?.indexOf(playlist) ?? 0;\n //update the current playlistItem Index value.\n this.currentPlaylistItemIndex = currentCastItem.index;\n }\n else {\n return { success: false };\n }\n this.currentHologram = hologram;\n this.isCastPending = false;\n return { success: true };\n }\n getCurrentPlaylist() {\n return this.playlists?.[this.currentPlaylistIndex];\n }\n async playRemotePlaylist(holograms, index = 0) {\n if (!this.isConnected && !(await this.connect()).success) {\n return { success: false };\n }\n console.log(\"%c function call: playRemotePlaylist \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isCastPending == true) {\n return { success: false };\n }\n this.isCastPending = true;\n // try to find an existing cast playlist\n let randomName = \"Cast_\" + Math.random().toString(36).substring(7);\n const playlist = new Playlist({\n name: randomName,\n loop: true,\n items: holograms,\n orchestration: this.orchestration,\n });\n this.playlists?.push(playlist);\n // delete old playlists\n this.playlists?.forEach((playlist) => {\n if (playlist.name != randomName) {\n this.deletePlaylist(playlist);\n this.playlists?.splice(this.playlists.indexOf(playlist), 1);\n }\n });\n //update the current playlist index value.\n this.currentPlaylistIndex = this.playlists?.indexOf(playlist) ?? 0;\n //update the current playlistItem Index value.\n this.currentPlaylistItemIndex = index;\n this.currentHologram = holograms[index];\n this.isCastPending = false;\n await playlist.play();\n return { success: true };\n }\n /**Play a Playlist created by Looking Glass Studio, requires the full path to the playlist.json file. */\n async playStudioPlaylist(playlistPath) {\n this.log(\"%c function call: subscribeToEvents \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false)\n return { success: false, response: null };\n const requestBody = {\n orchestration: this.orchestration,\n name: \"Studio Playlist\",\n playlist_path: playlistPath,\n loop: true,\n };\n await sendMessage({\n endpoint: \"instance_studio_playlist\",\n requestBody: requestBody,\n });\n const playRequestBody = {\n orchestration: this.orchestration,\n name: \"Studio Playlist\",\n head_index: -1,\n };\n let play_playlist = await sendMessage({\n endpoint: \"play_playlist\",\n requestBody: playRequestBody,\n });\n return { success: true, response: play_playlist.response };\n }\n /**stop playing the studio playlist */\n async stopStudioPlaylist() {\n this.log(\"%c function call: stopStudioPlaylist \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false)\n return { success: false };\n const requestBody = {\n orchestration: this.orchestration,\n name: \"Studio Playlist\",\n loop: false,\n };\n let message = await sendMessage({\n endpoint: \"delete_playlist\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false };\n }\n await this.showWindow(false);\n return { success: true };\n }\n /**Get the current playlist that is set to start automatically */\n async getAutoStartPlaylist() {\n this.log(\"%c function call: getAutoStartPlaylist \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false)\n return { success: false, response: null };\n let requestBody = {\n orchestration: this.orchestration,\n head_index: -1,\n };\n let message = await sendMessage({\n endpoint: \"get_autostart_playlist\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n }\n /**Choose a Playlist that exists on the local file system to set as the start up playlist */\n async setAutoStartPlaylist(args) {\n this.log(\"%c function call: setAutoStartPlaylist \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false)\n return { success: false, response: null };\n let requestBody = {\n orchestration: this.orchestration,\n head_index: -1,\n playlist_name: args.playlistName,\n playlist_path: args.playlistPath,\n };\n let message = await sendMessage({\n endpoint: \"set_autostart_playlist\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n }\n /**set a playlist to auto-start, requires that all files are local on the system */\n async createAutoStartPlaylist(args) {\n this.log(\"%c function call: createAutoStartPlaylist \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false)\n return { success: false, response: null };\n // check that all holograms are local\n for (let i = 0; i < args.playlist.items.length; i++) {\n let item = args.playlist.items[i];\n if (item.hologram.uri.includes(\"http\")) {\n this.warn(\"playlist contains a web uri, cannot create autostart playlist\");\n return { success: false, response: null };\n }\n }\n let requestBody = {\n orchestration: this.orchestration,\n head_index: -1,\n playlist_name: args.playlist.name,\n };\n let message = await sendMessage({\n endpoint: \"set_named_autostart_playlist\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n }\n // TRANSPORT CONTROLS\n /**Play the currently instanced playlist */\n async play() {\n let requestBody = {\n orchestration: this.orchestration,\n };\n let message = await sendMessage({\n endpoint: \"transport_control_play\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n this.playState = \"PLAYING\";\n return { success: true, response: message.response };\n }\n /**Pause the currently playing playlist */\n async pause() {\n let requestBody = {\n orchestration: this.orchestration,\n };\n let message = await sendMessage({\n endpoint: \"transport_control_pause\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n this.playState = \"PAUSED\";\n return { success: true, response: message.response };\n }\n /**Got to the next playlist item */\n async next() {\n let requestBody = {\n orchestration: this.orchestration,\n };\n let message = await sendMessage({\n endpoint: \"transport_control_next\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n const playlist = this.getCurrentPlaylist();\n const loop = playlist?.loop;\n const length = playlist?.items.length;\n const index = this.currentPlaylistItemIndex;\n if (index + 1 === length) {\n if (loop) {\n this.currentPlaylistItemIndex = 0;\n }\n //TODO: Handle case where we've reached end of playlist\n }\n else {\n this.currentPlaylistItemIndex++;\n }\n return { success: true, response: message.response };\n }\n /**Go to the previous playlist item */\n async previous() {\n let requestBody = {\n orchestration: this.orchestration,\n };\n let message = await sendMessage({\n endpoint: \"transport_control_previous\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n const playlist = this.getCurrentPlaylist();\n const loop = playlist?.loop;\n const length = playlist?.items.length;\n const index = this.currentPlaylistIndex;\n if (index === 0) {\n if (loop && length) {\n this.currentPlaylistItemIndex = length;\n }\n else {\n //TODO: Repeat first track\n }\n }\n else {\n this.currentPlaylistItemIndex--;\n }\n return { success: true, response: message.response };\n }\n /**Seek to a specific item in a playlist */\n async seek(index) {\n let requestBody = {\n orchestration: this.orchestration,\n index: index,\n };\n let message = await sendMessage({\n endpoint: \"transport_control_seek_to_index\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n }\n /**\n * Connect to Looking Glass Bridge's EventSource.\n * The event source is a websocket connection that will send events from Bridge to the client.\n * @returns the bridge event source\n */\n async subscribeToEvents() {\n this.log(\"%c function call: subscribeToEvents \", \"color: magenta; font-weight: bold; border: solid\");\n let events = await BridgeClient.eventsource?.connectToBridgeEventSource(this.orchestration);\n if (events?.success == true)\n return { success: true };\n else\n return { success: false };\n }\n /**\n * Adds an event listener that returns a message from Bridge's websocket based event source.\n * @param event the event to listen for\n * @param MessageHandler the function to call when the event is received\n */\n async addEventListener(event, MessageHandler) {\n if (BridgeClient.eventsource == undefined) {\n await this.subscribeToEvents();\n }\n else {\n BridgeClient.eventsource.addMessageHandler({ event: event, MessageHandler: MessageHandler });\n }\n }\n async removeEventListener(event, MessageHandler) {\n if (BridgeClient.eventsource == undefined) {\n await this.subscribeToEvents();\n }\n else {\n BridgeClient.eventsource.removeMessageHandler({ event: event, MessageHandler: MessageHandler });\n }\n }\n /**Update the parameters of the current hologram */\n async updateCurrentHologram({ name, parameter, value, }) {\n let requestBody = {\n orchestration: this.orchestration,\n name: name,\n [parameter]: `${value}`,\n };\n let message = await sendMessage({ endpoint: \"update_current_entry\", requestBody: requestBody });\n if (message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n }\n getCurrentHologram() {\n return this.currentHologram;\n }\n getVerbosity() {\n return BridgeClient.verbosity;\n }\n /**\n *Set the level of console logging that Bridge.js library will do.\n * @param verbosity 0 = no logging, 1 = errors only, 2 = only bridge values, 3 = full bridge response\n */\n setVerbosity(verbosity) {\n BridgeClient.verbosity = verbosity;\n }\n /**Asbtraction for logging with verbosity setting */\n log(...messages) {\n if (BridgeClient.verbosity >= 2) {\n console.log.apply(console, messages);\n }\n }\n /**Asbtraction for logging with verbosity setting */\n warn(...messages) {\n if (BridgeClient.verbosity >= 1) {\n console.warn.apply(messages);\n }\n }\n /**Asbtraction for logging with verbosity setting */\n error(...messages) {\n if (BridgeClient.verbosity >= 0) {\n console.error.apply(messages);\n }\n }\n /**\n * helper function for determining if the version of Bridge is valid.\n * @returns boolean, true if the version is compatible, false if not\n */\n async isVersionCompatible() {\n if (this.version.major == 0) {\n this.isConnected = false;\n }\n else if (this.version.major < 2 && this.version.minor < 1) {\n this.warn(\"Please update to the latest version for the best experience\");\n this.isConnected = false;\n }\n else if (this.version.major >= 2 && this.version.minor >= 2) {\n this.isConnected = true;\n }\n return this.isConnected;\n }\n}\n","import { z } from \"zod\";\n/**a utility to allow us to have ranges in our schemas */\nexport const numberRange = (min, max) => {\n return z.number().refine((value) => value >= min && value <= max, {\n message: `The value should be between ${min} and ${max}`,\n });\n};\n","import { numberRange } from \"./schema.utils\";\nexport const ASPECT = {\n min: 0.1,\n max: 10,\n range: numberRange(0.1, 10),\n type: \"float\",\n};\nexport const DEPTHINESS = {\n min: 0.1,\n max: 4,\n range: numberRange(0.1, 4),\n type: \"float\",\n};\nexport const DEPTH_CUTOFF = {\n min: 0,\n max: 1,\n range: numberRange(0, 1),\n type: \"float\",\n};\nexport const CROP_POS_X = {\n min: -1,\n max: 1,\n range: numberRange(-1, 1),\n type: \"float\",\n};\nexport const CROP_POS_Y = {\n min: -1,\n max: 1,\n range: numberRange(-1, 1),\n type: \"float\",\n};\nexport const ZOOM = {\n min: 0.1,\n max: 2,\n range: numberRange(0.1, 2),\n type: \"float\",\n};\nexport const FOCUS = {\n min: -0.05,\n max: 0.05,\n range: numberRange(-0.05, 0.05),\n type: \"float\",\n};\nexport const QUILT_ROWS = {\n min: 1,\n max: 50,\n range: numberRange(1, 50),\n type: \"int\",\n};\nexport const QUILT_COLS = {\n min: 1,\n max: 50,\n range: numberRange(1, 50),\n type: \"int\",\n};\nexport const QUILT_VIEW_COUNT = {\n min: 1,\n max: 2500,\n range: numberRange(1, 2500),\n type: \"int\",\n};\n","import { z } from \"zod\";\nimport { DEPTHINESS, ZOOM } from \"./defaults\";\nexport const hologramTypeSchema = z.union([z.literal(\"quilt\"), z.literal(\"rgbd\")]);\nexport const QuiltHologramArgs = z.object({\n rows: z.number(),\n columns: z.number(),\n aspect: z.number(),\n viewCount: z.number(),\n focus: z.number().optional(),\n});\nexport const RGBDHologramArgs = z.object({\n /**Aspect Ratio of the hologram,\n * this should match the source image you provide, not the RGBD Pair */\n aspect: z.number(),\n /**Where are the holograms located?\n * 0 Top\n * 1 Bottom\n * 2 Right\n * 3 Left */\n depth_loc: z.union([z.literal(0), z.literal(1), z.literal(2), z.literal(3)]),\n /**Is the Depth inverted? 0 for false, 1 for true */\n depth_inversion: z.union([z.literal(0), z.literal(1)]),\n /**Is the depth map chroma or grayscale? 0 for false, 1 for true */\n chroma_depth: z.union([z.literal(0), z.literal(1)]),\n /**Depthiness can be a value between 0.1 and 2 */\n depthiness: DEPTHINESS.range,\n /**Controls the Focus of the hologram */\n focus: z.number().optional(),\n /**Whether or not to cutoff depth beyond a certain point. 0 for false, 1 for true */\n depth_cutoff: z.union([z.literal(1), z.literal(0)]).optional(),\n /**Zoom can be between 0.1 and 2 */\n zoom: ZOOM.range,\n});\nexport const hologramMap = {\n quilt: QuiltHologramArgs,\n rgbd: RGBDHologramArgs,\n};\n","import * as schema from \"../schemas/schema.hologram\";\n/**Create a new Quilt Hologram */\nexport class QuiltHologram {\n uri;\n type;\n settings;\n constructor(args) {\n this.uri = args.uri;\n this.type = \"quilt\";\n this.settings = args.settings;\n }\n}\n/**Create a new RGBD Hologram */\nexport class RGBDHologram {\n uri;\n type;\n settings;\n constructor(args) {\n this.uri = args.uri;\n this.type = \"rgbd\";\n this.settings = args.settings;\n }\n}\n/**Allow the user to create a hologram manually based on type,\n * this is useful for when we want to allow the end user to create a hologram themselves via a UI interface */\nexport function hologramFactory({ uri, type, settings, }) {\n const ArgsSchema = schema.hologramMap[type];\n ArgsSchema.safeParse(settings);\n switch (type) {\n case \"quilt\":\n return new QuiltHologram({ uri, settings: settings });\n case \"rgbd\":\n return new RGBDHologram({ uri, settings: settings });\n default:\n throw new Error(`Invalid type: ${type}`);\n }\n}\n","import { z } from \"zod\";\nimport { DEPTHINESS, ZOOM } from \"./defaults\";\nexport const parameterNames = z.union([\n z.literal(\"focus\"),\n z.literal(\"crop_pos_x\"),\n z.literal(\"crop_pos_y\"),\n z.literal(\"zoom\"),\n //rgbd specific\n z.literal(\"depth_loc\"),\n z.literal(\"depth_inversion\"),\n z.literal(\"chroma_depth\"),\n z.literal(\"depthiness\"),\n z.literal(\"depth_cutoff\"),\n]);\nexport const hologramParamMap = z.object({\n focus: z.number().optional(),\n crop_pos_x: z.number().optional(),\n crop_pos_y: z.number().optional(),\n zoom: ZOOM.range,\n //rgbd specific\n depth_loc: z.union([z.literal(0), z.literal(1), z.literal(2), z.literal(3)]),\n depth_inversion: z.union([z.literal(0), z.literal(1)]),\n chroma_depth: z.union([z.literal(0), z.literal(1)]),\n depthiness: DEPTHINESS.range,\n depth_cutoff: z.union([z.literal(1), z.literal(0)]).optional(),\n});\n"],"names":["tryParseCalibration","value","parsedValue","tryParseQuilt","tryParseDisplay","sendMessage","params","parsedResponse","Bridge","BridgeClient","resolve","request","bridgeResponse","error","tryEnterOrchestration","name","orchestration","message","tryExitOrchestration","body","timeout","reject","id","isWindowAvailable","isWebSocketAvailable","BridgeEventSource","__publicField","event","MessageHandler","client","_a","handlerIndex","handler","_b","response","handlers","bridgeEventSource","evt","PlaylistItem","args","playlistItem","settings","QuiltPlaylistItem","RGBDPlaylistItem","Playlist","item","index","hologram","pRequestBody","i","head","requestBody","instancePlaylist","PlaylistItems","playRequestBody","util","val","assertIs","_arg","assertNever","_x","items","obj","validKeys","k","filtered","e","object","keys","key","arr","checker","joinValues","array","separator","_","objectUtil","first","second","ZodParsedType","getParsedType","data","ZodIssueCode","quotelessJson","ZodError","issues","sub","subs","actualProto","_mapper","mapper","issue","fieldErrors","processError","curr","el","formErrors","errorMap","_ctx","overrideErrorMap","setErrorMap","map","getErrorMap","makeIssue","path","errorMaps","issueData","fullPath","fullIssue","errorMessage","maps","m","EMPTY_PATH","addIssueToContext","ctx","x","ParseStatus","status","results","arrayValue","s","INVALID","pairs","syncPairs","pair","finalObject","DIRTY","OK","isAborted","isDirty","isValid","isAsync","errorUtil","ParseInputLazyPath","parent","handleResult","result","processCreateParams","invalid_type_error","required_error","description","iss","ZodType","def","input","maybeAsyncResult","check","getIssueProperties","setError","refinementData","refinement","ZodEffects","ZodFirstPartyTypeKind","ZodOptional","ZodNullable","ZodArray","ZodPromise","option","ZodUnion","incoming","ZodIntersection","transform","defaultValueFunc","ZodDefault","ZodBranded","catchValueFunc","ZodCatch","This","target","ZodPipeline","cuidRegex","cuid2Regex","ulidRegex","uuidRegex","emailRegex","emojiRegex","ipv4Regex","ipv6Regex","datetimeRegex","isValidIP","ip","version","ZodString","regex","validation","tooBig","tooSmall","options","minLength","maxLength","len","ch","min","max","floatSafeRemainder","step","valDecCount","stepDecCount","decCount","valInt","stepInt","ZodNumber","kind","inclusive","ZodBigInt","ZodBoolean","ZodDate","minDate","maxDate","ZodSymbol","ZodUndefined","ZodNull","ZodAny","ZodUnknown","ZodNever","ZodVoid","schema","deepPartialify","ZodObject","newShape","fieldSchema","ZodTuple","shape","shapeKeys","extraKeys","keyValidator","unknownKeys","catchall","_c","_d","defaultError","augmentation","merging","mask","newField","createZodEnum","handleResults","unionErrors","childCtx","dirty","types","getDiscriminator","type","ZodLazy","ZodLiteral","ZodEnum","ZodNativeEnum","ZodDiscriminatedUnion","discriminator","discriminatorValue","optionsMap","discriminatorValues","mergeValues","a","b","aType","bType","bKeys","sharedKeys","newObj","sharedValue","newArray","itemA","itemB","handleParsed","parsedLeft","parsedRight","merged","left","right","itemIndex","rest","schemas","ZodRecord","keyType","valueType","third","ZodMap","finalMap","ZodSet","finalizeSet","elements","parsedSet","element","minSize","maxSize","size","ZodFunction","makeArgsIssue","makeReturnsIssue","returns","fn","parsedArgs","parsedReturns","returnType","func","getter","values","expectedValues","enumValues","opt","nativeEnumValues","promisified","effect","processed","checkCtx","arg","executeRefinement","acc","inner","base","preprocess","newCtx","ZodNaN","BRAND","inResult","custom","fatal","p","_fatal","p2","late","instanceOfType","cls","stringType","numberType","nanType","bigIntType","booleanType","dateType","symbolType","undefinedType","nullType","anyType","unknownType","neverType","voidType","arrayType","objectType","strictObjectType","unionType","discriminatedUnionType","intersectionType","tupleType","recordType","mapType","setType","functionType","lazyType","literalType","enumType","nativeEnumType","promiseType","effectsType","optionalType","nullableType","preprocessType","pipelineType","ostring","onumber","oboolean","coerce","NEVER","z","unsigned_int","z.literal","int2","wstring","variant_map","completion","unknown","pending","failure","z.string","z.object","z.union","schema.name","schema.wstring","schema.status","schema.variant_map","displayItem","schema.unsigned_int","schema.int2","available_output_devices","MonitorConnectedMessageHandler","MonitorDisconnectedMessageHandler","ProgressStartMessageHandler","ProgressCompletionMessageHandler","ProgressUpdateMessageHandler","PlaylistInstanceMessageHandler","PlaylistInsertMessageHandler","PlaylistDeleteMessageHandler","SyncPlayPlaylistMessageHandler","SyncPlayPlaylistCompleteMessageHandler","SyncPlayPlaylistCancelledMessageHandler","NewItemPlayingMessageHandler","playlistName","playlistItemIndex","parseBridgeVersion","versionString","major","minor","patch","hotfix","_BridgeClient","new_orchestration","showWindow","schema.available_output_devices","display","lkg","playlist","randomName","currentCastItem","holograms","playlistPath","loop","length","events","parameter","verbosity","messages","numberRange","ASPECT","DEPTHINESS","DEPTH_CUTOFF","CROP_POS_X","CROP_POS_Y","ZOOM","FOCUS","QUILT_ROWS","QUILT_COLS","QUILT_VIEW_COUNT","hologramTypeSchema","QuiltHologramArgs","RGBDHologramArgs","hologramMap","QuiltHologram","RGBDHologram","hologramFactory","uri","schema.hologramMap","parameterNames","hologramParamMap"],"mappings":"4PAAO,SAASA,GAAoBC,EAAO,CACjC,MAAAC,EAAc,KAAK,MAAMD,CAAK,EACpC,OAAIC,GAAe,MACf,QAAQ,KAAK,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xBA,EAAE,QAAQ,YAAY,EACtBA,EAAE,QAAQ,cAAc,CAC5B,CAAC,EACY+E,GAAmB/E,EAAE,OAAO,CACrC,MAAOA,EAAE,OAAO,EAAE,SAAS,EAC3B,WAAYA,EAAE,OAAO,EAAE,SAAS,EAChC,WAAYA,EAAE,OAAO,EAAE,SAAS,EAChC,KAAMgE,GAAK,MAEX,UAAWhE,EAAE,MAAM,CAACA,EAAE,QAAQ,CAAC,EAAGA,EAAE,QAAQ,CAAC,EAAGA,EAAE,QAAQ,CAAC,EAAGA,EAAE,QAAQ,CAAC,CAAC,CAAC,EAC3E,gBAAiBA,EAAE,MAAM,CAACA,EAAE,QAAQ,CAAC,EAAGA,EAAE,QAAQ,CAAC,CAAC,CAAC,EACrD,aAAcA,EAAE,MAAM,CAACA,EAAE,QAAQ,CAAC,EAAGA,EAAE,QAAQ,CAAC,CAAC,CAAC,EAClD,WAAY4D,GAAW,MACvB,aAAc5D,EAAE,MAAM,CAACA,EAAE,QAAQ,CAAC,EAAGA,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CACjE,CAAC","x_google_ignoreList":[6]} \ No newline at end of file diff --git a/dist/looking-glass-bridge.mjs b/dist/looking-glass-bridge.mjs new file mode 100644 index 0000000..312d78e --- /dev/null +++ b/dist/looking-glass-bridge.mjs @@ -0,0 +1,4090 @@ +var Ye = Object.defineProperty; +var Qe = (n, e, t) => e in n ? Ye(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t; +var x = (n, e, t) => (Qe(n, typeof e != "symbol" ? e + "" : e, t), t); +function Xe(n) { + const e = JSON.parse(n); + return e == null ? (console.warn("Unable to parse calibration"), null) : { + DPI: e.DPI.value, + center: e.center.value, + configVersion: e.configVersion, + flipImageX: e.flipImageX.value, + flipImageY: e.flipImageY.value, + flipSubp: e.flipSubp.value, + fringe: e.fringe.value, + invView: e.invView.value, + pitch: e.pitch.value, + screenH: e.screenH.value, + screenW: e.screenW.value, + serial: e.serial, + slope: e.slope.value, + verticalAngle: e.verticalAngle.value, + viewCone: e.viewCone.value + }; +} +function Ke(n) { + const e = JSON.parse(n); + return e == null ? null : { + quiltAspect: e.quiltAspect, + quiltWidth: e.quiltX, + quiltHeight: e.quiltY, + rows: e.tileY, + columns: e.tileX + }; +} +function Fe(n) { + return { + calibration: Xe(n.calibration.value), + defaultQuilt: Ke(n.defaultQuilt.value), + hardwareVersion: n.hardwareVersion.value, + index: n.index.value, + state: n.state.value, + windowCoords: n.windowCoords.value + }; +} +async function I(n) { + let e, t = E.getInstance(); + t.getVerbosity() >= 3 && t.getVerbosity() !== void 0 && console.group("Endpoint:", n.endpoint), await new Promise((r) => setTimeout(r, 10)), n.baseUrl == null && (n.baseUrl = "http://localhost:33334/"), t.getVerbosity() == 3 && (console.group("Message:"), t.log(`${n.baseUrl + n.endpoint}`), t.log("body:", n.requestBody), console.groupEnd()); + const s = { + method: "PUT", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify(n.requestBody) + }; + try { + let r = await fetch(`${n.baseUrl + n.endpoint}`, s); + return r.ok ? (r.status == 408 && (t.warn("%c Bridge Timeout:", "color: #ff0000", r), console.groupEnd()), e = await r.json(), e.status.value !== "Completion" && e.status.value !== "Pending" ? (console.warn("%c Bridge Failure:", "color: #ff0000", e), console.groupEnd(), { success: !0, response: e }) : (t.log("%c Response:", "color: #00aa00", e), console.groupEnd(), { success: !0, response: e })) : { success: !1, response: null }; + } catch (r) { + return console.group("%c Bridge Error:", "color: #ff0000"), console.error("Bridge Error", r), console.groupEnd(), console.groupEnd(), { success: !1, response: null }; + } +} +async function et({ name: n, orchestration: e }) { + if (E.getInstance().log("%c function call: tryEnterOrchestration ", "color: magenta; font-weight: bold; border: solid"), (n == null || n == "") && (n = "default"), e !== "" && e !== void 0) + return { success: !1, response: null }; + let r = await I({ + endpoint: "enter_orchestration", + requestBody: { + name: n + } + }); + return r.success == !1 ? (console.error("failed to enter orchestration", r), { success: !1, response: null }) : (console.groupEnd(), { success: !0, response: r.response }); +} +async function tt(n) { + let e = { + orchestration: n + }, t = new Promise((r) => { + let a = setTimeout(() => { + clearTimeout(a), r({ success: !1, response: null }); + }, 5e3); + }), s = await Promise.race([ + I({ + endpoint: "exit_orchestration", + requestBody: e + }), + t + ]); + return !s || s.success == !1 ? { success: !1, response: null } : { success: !0, response: s.response }; +} +function st() { + return window !== void 0 ? !0 : (console.error("Window is unavailable!"), !1); +} +function nt() { + return "WebSocket" in window ? !0 : (console.error("WebSocket NOT supported by your Browser!"), !1); +} +class rt { + constructor() { + x(this, "eventSource"); + x(this, "MessageHandler"); + x(this, "ws"); + this.eventSource = void 0, this.MessageHandler = {}, this.ws = void 0; + } + /** + * adds a new message handler object to the BridgeEventSource class + * @param event the event name to listen for + * @param MessageHandler the function to call when the event is received + */ + addMessageHandler({ event: e, MessageHandler: t }) { + var r; + const s = E.getInstance(); + e in this.MessageHandler || (this.MessageHandler[e] = []), (r = this.MessageHandler[e]) == null || r.push(t), s.log(`%c Add Message Handler: ${e} `, "color: YellowGreen; font-weight: bold; border: solid;"); + } + removeMessageHandler({ event: e, MessageHandler: t }) { + var r, a; + if (E.getInstance().log(`%c Message Handler Removed: ${e} `, "color: Tomato; font-weight: bold; border: solid;"), e in this.MessageHandler) { + const o = (r = this.MessageHandler[e]) == null ? void 0 : r.findIndex((c) => c === t); + o !== -1 && o !== void 0 && ((a = this.MessageHandler[e]) == null || a.splice(o, 1)); + } + } + callMessageHandler(e) { + let t; + try { + t = JSON.parse(e); + } catch (s) { + E.getInstance().error("Failed to parse JSON", s); + return; + } + if (t.payload.value.event.value in this.MessageHandler) { + const s = this.MessageHandler[t.payload.value.event.value]; + s && s.forEach((r) => r(t)); + } + } + connectEvent() { + const e = this.MessageHandler["Bridge Connected"]; + e && e.forEach((t) => t(void 0)); + } + disconnectEvent() { + const e = this.MessageHandler["Bridge Disconnected"]; + e && e.forEach((t) => t(void 0)); + } + async connectToBridgeEventSource(e) { + const t = E.getInstance(); + if (t.log("%c Connect to Bridge Events Source ", "color: chartreuse; font-weight: bold; border: solid"), !st()) + return { success: !1 }; + if (!nt()) + return { success: !1 }; + let s = this; + return this.ws = new WebSocket("ws://localhost:9724/event_source"), new Promise((r) => { + this.ws !== void 0 && (this.ws.onopen = () => { + var c; + E.getInstance().log("%c Connected to Websocket ", "color: chartreuse; font-weight: bold; border: solid"); + const o = { + subscribe_orchestration_events: e + }; + (c = this.ws) == null || c.send(JSON.stringify(o)), r({ success: !0 }); + }, this.ws.onmessage = function(a) { + s.callMessageHandler(a.data); + }, this.ws.onclose = function() { + const a = E.getInstance(); + a.manualDisconnect || a.disconnect(), a.log(`%c Disconnected from Websocket, Manual Disconnect: ${a.manualDisconnect} `, "color: red; font-weight: bold; border: solid"); + }, this.ws.onerror = function(a) { + t.warn("Unable to connect to WebSocket, is Bridge Running?", a), r({ success: !1 }); + }); + }); + } +} +class De { + constructor(e) { + x(this, "orchestration"); + x(this, "hologram"); + x(this, "id"); + x(this, "index"); + x(this, "playlistName"); + this.hologram = e.hologram, this.id = e.id, this.index = e.index, this.playlistName = e.playlistName, this.orchestration = e.orchestration; + } + toBridge() { + let e; + if (this.hologram.type == "quilt") { + const t = this.hologram.settings; + return e = { + orchestration: this.orchestration, + id: this.id, + name: this.playlistName, + index: this.index, + uri: this.hologram.uri, + rows: t.rows, + cols: t.columns, + focus: t.focus ? t.focus : 0, + aspect: t.aspect, + view_count: t.viewCount, + isRGBD: 0 + }, e; + } else if (this.hologram.type == "rgbd") { + const t = this.hologram.settings; + return e = { + orchestration: this.orchestration, + id: this.id, + name: this.playlistName, + index: this.index, + uri: this.hologram.uri, + rows: 8, + cols: 13, + focus: t.focus ? t.focus : 0, + aspect: t.aspect, + view_count: 8 * 13, + isRGBD: 1, + depth_loc: t.depth_loc, + depth_inversion: t.depth_inversion, + chroma_depth: t.chroma_depth, + depthiness: t.depthiness, + zoom: t.zoom + }, e; + } + throw new Error("Invalid hologram type"); + } +} +class Re extends De { + constructor(e) { + super(e); + } +} +class Me extends De { + constructor(e) { + super(e); + } +} +class Ae { + constructor(e) { + x(this, "name"); + x(this, "loop"); + x(this, "items"); + x(this, "orchestration"); + var t; + this.name = e.name, this.loop = e.loop, this.orchestration = e.orchestration, e.items ? this.items = (t = e.items) == null ? void 0 : t.map((s, r) => { + if (s.type == "quilt") + return new Re({ + hologram: s, + id: r, + index: r, + playlistName: this.name, + orchestration: this.orchestration + }); + if (s.type == "rgbd") + return new Me({ + hologram: s, + id: r, + index: r, + playlistName: this.name, + orchestration: this.orchestration + }); + }).filter((s) => !!s) : this.items = []; + } + setName(e) { + this.name = e; + } + addItem(e) { + let t; + return e.type == "quilt" ? (t = new Re({ + hologram: e, + id: this.items.length, + index: this.items.length, + playlistName: this.name, + orchestration: this.orchestration + }), this.items.push(t), t) : e.type == "rgbd" ? (t = new Me({ + hologram: e, + id: this.items.length, + index: this.items.length, + playlistName: this.name, + orchestration: this.orchestration + }), this.items.push(t), t) : void 0; + } + async addPlaylistItemToBridge(e) { + const t = e.toBridge(); + return (await I({ endpoint: "insert_playlist_entry", requestBody: t })).success == !1 ? (console.error("failed to insert playlist entry"), !1) : !0; + } + removeItem(e) { + if (e.id != null) { + this.items.splice(e.id, 1); + for (let t = 0; t < this.items.length; t++) + this.items[t].id = t; + } + } + clearItems() { + this.items = []; + } + /** + * gets the object for the current playlist that is currently being played + * @param orchestration + * @param head + * @returns + */ + getCurrent({ orchestration: e, head: t }) { + return { + orchestration: e, + name: this.name, + head_index: t + }; + } + /** + * create the json object for the playlist instance + * @param orchestration + * @returns + */ + getInstance(e) { + return { orchestration: e, name: this.name, loop: this.loop }; + } + /** + * this function will play a playlist on a Looking Glass display + * the playlist must be created and populated with content before calling this function + * @param playlist + * @param head + * @returns + */ + async play({ head: e } = {}) { + let t = this.orchestration; + const s = this.getInstance(this.orchestration); + e || (e = -1); + let r = await I({ endpoint: "instance_playlist", requestBody: s }); + if (r.success == !1) + return console.error("failed to initialize playlist"), !1; + const a = this.items; + if (r.success == !0 && t !== void 0) + for (let u = 0; u < a.length; u++) { + a[u].orchestration = this.orchestration; + const d = a[u].toBridge(); + if ((await I({ endpoint: "insert_playlist_entry", requestBody: d })).success == !1) + return console.error("failed to insert playlist entry"), !1; + } + const o = this.getCurrent({ orchestration: t, head: e }); + return (await I({ + endpoint: "play_playlist", + requestBody: o + })).success != !1; + } +} +var k; +(function(n) { + n.assertEqual = (r) => r; + function e(r) { + } + n.assertIs = e; + function t(r) { + throw new Error(); + } + n.assertNever = t, n.arrayToEnum = (r) => { + const a = {}; + for (const o of r) + a[o] = o; + return a; + }, n.getValidEnumValues = (r) => { + const a = n.objectKeys(r).filter((c) => typeof r[r[c]] != "number"), o = {}; + for (const c of a) + o[c] = r[c]; + return n.objectValues(o); + }, n.objectValues = (r) => n.objectKeys(r).map(function(a) { + return r[a]; + }), n.objectKeys = typeof Object.keys == "function" ? (r) => Object.keys(r) : (r) => { + const a = []; + for (const o in r) + Object.prototype.hasOwnProperty.call(r, o) && a.push(o); + return a; + }, n.find = (r, a) => { + for (const o of r) + if (a(o)) + return o; + }, n.isInteger = typeof Number.isInteger == "function" ? (r) => Number.isInteger(r) : (r) => typeof r == "number" && isFinite(r) && Math.floor(r) === r; + function s(r, a = " | ") { + return r.map((o) => typeof o == "string" ? `'${o}'` : o).join(a); + } + n.joinValues = s, n.jsonStringifyReplacer = (r, a) => typeof a == "bigint" ? a.toString() : a; +})(k || (k = {})); +var Se; +(function(n) { + n.mergeShapes = (e, t) => ({ + ...e, + ...t + // second overwrites first + }); +})(Se || (Se = {})); +const h = k.arrayToEnum([ + "string", + "nan", + "number", + "integer", + "float", + "boolean", + "date", + "bigint", + "symbol", + "function", + "undefined", + "null", + "array", + "object", + "unknown", + "promise", + "void", + "never", + "map", + "set" +]), H = (n) => { + switch (typeof n) { + case "undefined": + return h.undefined; + case "string": + return h.string; + case "number": + return isNaN(n) ? h.nan : h.number; + case "boolean": + return h.boolean; + case "function": + return h.function; + case "bigint": + return h.bigint; + case "symbol": + return h.symbol; + case "object": + return Array.isArray(n) ? h.array : n === null ? h.null : n.then && typeof n.then == "function" && n.catch && typeof n.catch == "function" ? h.promise : typeof Map < "u" && n instanceof Map ? h.map : typeof Set < "u" && n instanceof Set ? h.set : typeof Date < "u" && n instanceof Date ? h.date : h.object; + default: + return h.unknown; + } +}, l = k.arrayToEnum([ + "invalid_type", + "invalid_literal", + "custom", + "invalid_union", + "invalid_union_discriminator", + "invalid_enum_value", + "unrecognized_keys", + "invalid_arguments", + "invalid_return_type", + "invalid_date", + "invalid_string", + "too_small", + "too_big", + "invalid_intersection_types", + "not_multiple_of", + "not_finite" +]), at = (n) => JSON.stringify(n, null, 2).replace(/"([^"]+)":/g, "$1:"); +class Z extends Error { + constructor(e) { + super(), this.issues = [], this.addIssue = (s) => { + this.issues = [...this.issues, s]; + }, this.addIssues = (s = []) => { + this.issues = [...this.issues, ...s]; + }; + const t = new.target.prototype; + Object.setPrototypeOf ? Object.setPrototypeOf(this, t) : this.__proto__ = t, this.name = "ZodError", this.issues = e; + } + get errors() { + return this.issues; + } + format(e) { + const t = e || function(a) { + return a.message; + }, s = { _errors: [] }, r = (a) => { + for (const o of a.issues) + if (o.code === "invalid_union") + o.unionErrors.map(r); + else if (o.code === "invalid_return_type") + r(o.returnTypeError); + else if (o.code === "invalid_arguments") + r(o.argumentsError); + else if (o.path.length === 0) + s._errors.push(t(o)); + else { + let c = s, u = 0; + for (; u < o.path.length; ) { + const d = o.path[u]; + u === o.path.length - 1 ? (c[d] = c[d] || { _errors: [] }, c[d]._errors.push(t(o))) : c[d] = c[d] || { _errors: [] }, c = c[d], u++; + } + } + }; + return r(this), s; + } + toString() { + return this.message; + } + get message() { + return JSON.stringify(this.issues, k.jsonStringifyReplacer, 2); + } + get isEmpty() { + return this.issues.length === 0; + } + flatten(e = (t) => t.message) { + const t = {}, s = []; + for (const r of this.issues) + r.path.length > 0 ? (t[r.path[0]] = t[r.path[0]] || [], t[r.path[0]].push(e(r))) : s.push(e(r)); + return { formErrors: s, fieldErrors: t }; + } + get formErrors() { + return this.flatten(); + } +} +Z.create = (n) => new Z(n); +const ne = (n, e) => { + let t; + switch (n.code) { + case l.invalid_type: + n.received === h.undefined ? t = "Required" : t = `Expected ${n.expected}, received ${n.received}`; + break; + case l.invalid_literal: + t = `Invalid literal value, expected ${JSON.stringify(n.expected, k.jsonStringifyReplacer)}`; + break; + case l.unrecognized_keys: + t = `Unrecognized key(s) in object: ${k.joinValues(n.keys, ", ")}`; + break; + case l.invalid_union: + t = "Invalid input"; + break; + case l.invalid_union_discriminator: + t = `Invalid discriminator value. Expected ${k.joinValues(n.options)}`; + break; + case l.invalid_enum_value: + t = `Invalid enum value. Expected ${k.joinValues(n.options)}, received '${n.received}'`; + break; + case l.invalid_arguments: + t = "Invalid function arguments"; + break; + case l.invalid_return_type: + t = "Invalid function return type"; + break; + case l.invalid_date: + t = "Invalid date"; + break; + case l.invalid_string: + typeof n.validation == "object" ? "includes" in n.validation ? (t = `Invalid input: must include "${n.validation.includes}"`, typeof n.validation.position == "number" && (t = `${t} at one or more positions greater than or equal to ${n.validation.position}`)) : "startsWith" in n.validation ? t = `Invalid input: must start with "${n.validation.startsWith}"` : "endsWith" in n.validation ? t = `Invalid input: must end with "${n.validation.endsWith}"` : k.assertNever(n.validation) : n.validation !== "regex" ? t = `Invalid ${n.validation}` : t = "Invalid"; + break; + case l.too_small: + n.type === "array" ? t = `Array must contain ${n.exact ? "exactly" : n.inclusive ? "at least" : "more than"} ${n.minimum} element(s)` : n.type === "string" ? t = `String must contain ${n.exact ? "exactly" : n.inclusive ? "at least" : "over"} ${n.minimum} character(s)` : n.type === "number" ? t = `Number must be ${n.exact ? "exactly equal to " : n.inclusive ? "greater than or equal to " : "greater than "}${n.minimum}` : n.type === "date" ? t = `Date must be ${n.exact ? "exactly equal to " : n.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(n.minimum))}` : t = "Invalid input"; + break; + case l.too_big: + n.type === "array" ? t = `Array must contain ${n.exact ? "exactly" : n.inclusive ? "at most" : "less than"} ${n.maximum} element(s)` : n.type === "string" ? t = `String must contain ${n.exact ? "exactly" : n.inclusive ? "at most" : "under"} ${n.maximum} character(s)` : n.type === "number" ? t = `Number must be ${n.exact ? "exactly" : n.inclusive ? "less than or equal to" : "less than"} ${n.maximum}` : n.type === "bigint" ? t = `BigInt must be ${n.exact ? "exactly" : n.inclusive ? "less than or equal to" : "less than"} ${n.maximum}` : n.type === "date" ? t = `Date must be ${n.exact ? "exactly" : n.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(n.maximum))}` : t = "Invalid input"; + break; + case l.custom: + t = "Invalid input"; + break; + case l.invalid_intersection_types: + t = "Intersection results could not be merged"; + break; + case l.not_multiple_of: + t = `Number must be a multiple of ${n.multipleOf}`; + break; + case l.not_finite: + t = "Number must be finite"; + break; + default: + t = e.defaultError, k.assertNever(n); + } + return { message: t }; +}; +let qe = ne; +function it(n) { + qe = n; +} +function ye() { + return qe; +} +const ge = (n) => { + const { data: e, path: t, errorMaps: s, issueData: r } = n, a = [...t, ...r.path || []], o = { + ...r, + path: a + }; + let c = ""; + const u = s.filter((d) => !!d).slice().reverse(); + for (const d of u) + c = d(o, { data: e, defaultError: c }).message; + return { + ...r, + path: a, + message: r.message || c + }; +}, ot = []; +function f(n, e) { + const t = ge({ + issueData: e, + data: n.data, + path: n.path, + errorMaps: [ + n.common.contextualErrorMap, + n.schemaErrorMap, + ye(), + ne + // then global default map + ].filter((s) => !!s) + }); + n.common.issues.push(t); +} +class P { + constructor() { + this.value = "valid"; + } + dirty() { + this.value === "valid" && (this.value = "dirty"); + } + abort() { + this.value !== "aborted" && (this.value = "aborted"); + } + static mergeArray(e, t) { + const s = []; + for (const r of t) { + if (r.status === "aborted") + return g; + r.status === "dirty" && e.dirty(), s.push(r.value); + } + return { status: e.value, value: s }; + } + static async mergeObjectAsync(e, t) { + const s = []; + for (const r of t) + s.push({ + key: await r.key, + value: await r.value + }); + return P.mergeObjectSync(e, s); + } + static mergeObjectSync(e, t) { + const s = {}; + for (const r of t) { + const { key: a, value: o } = r; + if (a.status === "aborted" || o.status === "aborted") + return g; + a.status === "dirty" && e.dirty(), o.status === "dirty" && e.dirty(), (typeof o.value < "u" || r.alwaysSet) && (s[a.value] = o.value); + } + return { status: e.value, value: s }; + } +} +const g = Object.freeze({ + status: "aborted" +}), Le = (n) => ({ status: "dirty", value: n }), j = (n) => ({ status: "valid", value: n }), Pe = (n) => n.status === "aborted", je = (n) => n.status === "dirty", ve = (n) => n.status === "valid", _e = (n) => typeof Promise < "u" && n instanceof Promise; +var m; +(function(n) { + n.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, n.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message; +})(m || (m = {})); +class B { + constructor(e, t, s, r) { + this._cachedPath = [], this.parent = e, this.data = t, this._path = s, this._key = r; + } + get path() { + return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath; + } +} +const Be = (n, e) => { + if (ve(e)) + return { success: !0, data: e.value }; + if (!n.common.issues.length) + throw new Error("Validation failed but no issues detected."); + return { + success: !1, + get error() { + if (this._error) + return this._error; + const t = new Z(n.common.issues); + return this._error = t, this._error; + } + }; +}; +function v(n) { + if (!n) + return {}; + const { errorMap: e, invalid_type_error: t, required_error: s, description: r } = n; + if (e && (t || s)) + throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`); + return e ? { errorMap: e, description: r } : { errorMap: (o, c) => o.code !== "invalid_type" ? { message: c.defaultError } : typeof c.data > "u" ? { message: s ?? c.defaultError } : { message: t ?? c.defaultError }, description: r }; +} +class b { + constructor(e) { + this.spa = this.safeParseAsync, this._def = e, this.parse = this.parse.bind(this), this.safeParse = this.safeParse.bind(this), this.parseAsync = this.parseAsync.bind(this), this.safeParseAsync = this.safeParseAsync.bind(this), this.spa = this.spa.bind(this), this.refine = this.refine.bind(this), this.refinement = this.refinement.bind(this), this.superRefine = this.superRefine.bind(this), this.optional = this.optional.bind(this), this.nullable = this.nullable.bind(this), this.nullish = this.nullish.bind(this), this.array = this.array.bind(this), this.promise = this.promise.bind(this), this.or = this.or.bind(this), this.and = this.and.bind(this), this.transform = this.transform.bind(this), this.brand = this.brand.bind(this), this.default = this.default.bind(this), this.catch = this.catch.bind(this), this.describe = this.describe.bind(this), this.pipe = this.pipe.bind(this), this.isNullable = this.isNullable.bind(this), this.isOptional = this.isOptional.bind(this); + } + get description() { + return this._def.description; + } + _getType(e) { + return H(e.data); + } + _getOrReturnCtx(e, t) { + return t || { + common: e.parent.common, + data: e.data, + parsedType: H(e.data), + schemaErrorMap: this._def.errorMap, + path: e.path, + parent: e.parent + }; + } + _processInputParams(e) { + return { + status: new P(), + ctx: { + common: e.parent.common, + data: e.data, + parsedType: H(e.data), + schemaErrorMap: this._def.errorMap, + path: e.path, + parent: e.parent + } + }; + } + _parseSync(e) { + const t = this._parse(e); + if (_e(t)) + throw new Error("Synchronous parse encountered promise."); + return t; + } + _parseAsync(e) { + const t = this._parse(e); + return Promise.resolve(t); + } + parse(e, t) { + const s = this.safeParse(e, t); + if (s.success) + return s.data; + throw s.error; + } + safeParse(e, t) { + var s; + const r = { + common: { + issues: [], + async: (s = t == null ? void 0 : t.async) !== null && s !== void 0 ? s : !1, + contextualErrorMap: t == null ? void 0 : t.errorMap + }, + path: (t == null ? void 0 : t.path) || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data: e, + parsedType: H(e) + }, a = this._parseSync({ data: e, path: r.path, parent: r }); + return Be(r, a); + } + async parseAsync(e, t) { + const s = await this.safeParseAsync(e, t); + if (s.success) + return s.data; + throw s.error; + } + async safeParseAsync(e, t) { + const s = { + common: { + issues: [], + contextualErrorMap: t == null ? void 0 : t.errorMap, + async: !0 + }, + path: (t == null ? void 0 : t.path) || [], + schemaErrorMap: this._def.errorMap, + parent: null, + data: e, + parsedType: H(e) + }, r = this._parse({ data: e, path: s.path, parent: s }), a = await (_e(r) ? r : Promise.resolve(r)); + return Be(s, a); + } + refine(e, t) { + const s = (r) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(r) : t; + return this._refinement((r, a) => { + const o = e(r), c = () => a.addIssue({ + code: l.custom, + ...s(r) + }); + return typeof Promise < "u" && o instanceof Promise ? o.then((u) => u ? !0 : (c(), !1)) : o ? !0 : (c(), !1); + }); + } + refinement(e, t) { + return this._refinement((s, r) => e(s) ? !0 : (r.addIssue(typeof t == "function" ? t(s, r) : t), !1)); + } + _refinement(e) { + return new M({ + schema: this, + typeName: y.ZodEffects, + effect: { type: "refinement", refinement: e } + }); + } + superRefine(e) { + return this._refinement(e); + } + optional() { + return L.create(this, this._def); + } + nullable() { + return X.create(this, this._def); + } + nullish() { + return this.nullable().optional(); + } + array() { + return R.create(this, this._def); + } + promise() { + return se.create(this, this._def); + } + or(e) { + return oe.create([this, e], this._def); + } + and(e) { + return ce.create(this, e, this._def); + } + transform(e) { + return new M({ + ...v(this._def), + schema: this, + typeName: y.ZodEffects, + effect: { type: "transform", transform: e } + }); + } + default(e) { + const t = typeof e == "function" ? e : () => e; + return new fe({ + ...v(this._def), + innerType: this, + defaultValue: t, + typeName: y.ZodDefault + }); + } + brand() { + return new Ue({ + typeName: y.ZodBranded, + type: this, + ...v(this._def) + }); + } + catch(e) { + const t = typeof e == "function" ? e : () => e; + return new ke({ + ...v(this._def), + innerType: this, + catchValue: t, + typeName: y.ZodCatch + }); + } + describe(e) { + const t = this.constructor; + return new t({ + ...this._def, + description: e + }); + } + pipe(e) { + return pe.create(this, e); + } + isOptional() { + return this.safeParse(void 0).success; + } + isNullable() { + return this.safeParse(null).success; + } +} +const ct = /^c[^\s-]{8,}$/i, lt = /^[a-z][a-z0-9]*$/, ut = /[0-9A-HJKMNP-TV-Z]{26}/, dt = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i, ht = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/, ft = /^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u, pt = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/, mt = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, yt = (n) => n.precision ? n.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${n.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${n.precision}}Z$`) : n.precision === 0 ? n.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : n.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"); +function gt(n, e) { + return !!((e === "v4" || !e) && pt.test(n) || (e === "v6" || !e) && mt.test(n)); +} +class O extends b { + constructor() { + super(...arguments), this._regex = (e, t, s) => this.refinement((r) => e.test(r), { + validation: t, + code: l.invalid_string, + ...m.errToObj(s) + }), this.nonempty = (e) => this.min(1, m.errToObj(e)), this.trim = () => new O({ + ...this._def, + checks: [...this._def.checks, { kind: "trim" }] + }), this.toLowerCase = () => new O({ + ...this._def, + checks: [...this._def.checks, { kind: "toLowerCase" }] + }), this.toUpperCase = () => new O({ + ...this._def, + checks: [...this._def.checks, { kind: "toUpperCase" }] + }); + } + _parse(e) { + if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== h.string) { + const a = this._getOrReturnCtx(e); + return f( + a, + { + code: l.invalid_type, + expected: h.string, + received: a.parsedType + } + // + ), g; + } + const s = new P(); + let r; + for (const a of this._def.checks) + if (a.kind === "min") + e.data.length < a.value && (r = this._getOrReturnCtx(e, r), f(r, { + code: l.too_small, + minimum: a.value, + type: "string", + inclusive: !0, + exact: !1, + message: a.message + }), s.dirty()); + else if (a.kind === "max") + e.data.length > a.value && (r = this._getOrReturnCtx(e, r), f(r, { + code: l.too_big, + maximum: a.value, + type: "string", + inclusive: !0, + exact: !1, + message: a.message + }), s.dirty()); + else if (a.kind === "length") { + const o = e.data.length > a.value, c = e.data.length < a.value; + (o || c) && (r = this._getOrReturnCtx(e, r), o ? f(r, { + code: l.too_big, + maximum: a.value, + type: "string", + inclusive: !0, + exact: !0, + message: a.message + }) : c && f(r, { + code: l.too_small, + minimum: a.value, + type: "string", + inclusive: !0, + exact: !0, + message: a.message + }), s.dirty()); + } else if (a.kind === "email") + ht.test(e.data) || (r = this._getOrReturnCtx(e, r), f(r, { + validation: "email", + code: l.invalid_string, + message: a.message + }), s.dirty()); + else if (a.kind === "emoji") + ft.test(e.data) || (r = this._getOrReturnCtx(e, r), f(r, { + validation: "emoji", + code: l.invalid_string, + message: a.message + }), s.dirty()); + else if (a.kind === "uuid") + dt.test(e.data) || (r = this._getOrReturnCtx(e, r), f(r, { + validation: "uuid", + code: l.invalid_string, + message: a.message + }), s.dirty()); + else if (a.kind === "cuid") + ct.test(e.data) || (r = this._getOrReturnCtx(e, r), f(r, { + validation: "cuid", + code: l.invalid_string, + message: a.message + }), s.dirty()); + else if (a.kind === "cuid2") + lt.test(e.data) || (r = this._getOrReturnCtx(e, r), f(r, { + validation: "cuid2", + code: l.invalid_string, + message: a.message + }), s.dirty()); + else if (a.kind === "ulid") + ut.test(e.data) || (r = this._getOrReturnCtx(e, r), f(r, { + validation: "ulid", + code: l.invalid_string, + message: a.message + }), s.dirty()); + else if (a.kind === "url") + try { + new URL(e.data); + } catch { + r = this._getOrReturnCtx(e, r), f(r, { + validation: "url", + code: l.invalid_string, + message: a.message + }), s.dirty(); + } + else + a.kind === "regex" ? (a.regex.lastIndex = 0, a.regex.test(e.data) || (r = this._getOrReturnCtx(e, r), f(r, { + validation: "regex", + code: l.invalid_string, + message: a.message + }), s.dirty())) : a.kind === "trim" ? e.data = e.data.trim() : a.kind === "includes" ? e.data.includes(a.value, a.position) || (r = this._getOrReturnCtx(e, r), f(r, { + code: l.invalid_string, + validation: { includes: a.value, position: a.position }, + message: a.message + }), s.dirty()) : a.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : a.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : a.kind === "startsWith" ? e.data.startsWith(a.value) || (r = this._getOrReturnCtx(e, r), f(r, { + code: l.invalid_string, + validation: { startsWith: a.value }, + message: a.message + }), s.dirty()) : a.kind === "endsWith" ? e.data.endsWith(a.value) || (r = this._getOrReturnCtx(e, r), f(r, { + code: l.invalid_string, + validation: { endsWith: a.value }, + message: a.message + }), s.dirty()) : a.kind === "datetime" ? yt(a).test(e.data) || (r = this._getOrReturnCtx(e, r), f(r, { + code: l.invalid_string, + validation: "datetime", + message: a.message + }), s.dirty()) : a.kind === "ip" ? gt(e.data, a.version) || (r = this._getOrReturnCtx(e, r), f(r, { + validation: "ip", + code: l.invalid_string, + message: a.message + }), s.dirty()) : k.assertNever(a); + return { status: s.value, value: e.data }; + } + _addCheck(e) { + return new O({ + ...this._def, + checks: [...this._def.checks, e] + }); + } + email(e) { + return this._addCheck({ kind: "email", ...m.errToObj(e) }); + } + url(e) { + return this._addCheck({ kind: "url", ...m.errToObj(e) }); + } + emoji(e) { + return this._addCheck({ kind: "emoji", ...m.errToObj(e) }); + } + uuid(e) { + return this._addCheck({ kind: "uuid", ...m.errToObj(e) }); + } + cuid(e) { + return this._addCheck({ kind: "cuid", ...m.errToObj(e) }); + } + cuid2(e) { + return this._addCheck({ kind: "cuid2", ...m.errToObj(e) }); + } + ulid(e) { + return this._addCheck({ kind: "ulid", ...m.errToObj(e) }); + } + ip(e) { + return this._addCheck({ kind: "ip", ...m.errToObj(e) }); + } + datetime(e) { + var t; + return typeof e == "string" ? this._addCheck({ + kind: "datetime", + precision: null, + offset: !1, + message: e + }) : this._addCheck({ + kind: "datetime", + precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision, + offset: (t = e == null ? void 0 : e.offset) !== null && t !== void 0 ? t : !1, + ...m.errToObj(e == null ? void 0 : e.message) + }); + } + regex(e, t) { + return this._addCheck({ + kind: "regex", + regex: e, + ...m.errToObj(t) + }); + } + includes(e, t) { + return this._addCheck({ + kind: "includes", + value: e, + position: t == null ? void 0 : t.position, + ...m.errToObj(t == null ? void 0 : t.message) + }); + } + startsWith(e, t) { + return this._addCheck({ + kind: "startsWith", + value: e, + ...m.errToObj(t) + }); + } + endsWith(e, t) { + return this._addCheck({ + kind: "endsWith", + value: e, + ...m.errToObj(t) + }); + } + min(e, t) { + return this._addCheck({ + kind: "min", + value: e, + ...m.errToObj(t) + }); + } + max(e, t) { + return this._addCheck({ + kind: "max", + value: e, + ...m.errToObj(t) + }); + } + length(e, t) { + return this._addCheck({ + kind: "length", + value: e, + ...m.errToObj(t) + }); + } + get isDatetime() { + return !!this._def.checks.find((e) => e.kind === "datetime"); + } + get isEmail() { + return !!this._def.checks.find((e) => e.kind === "email"); + } + get isURL() { + return !!this._def.checks.find((e) => e.kind === "url"); + } + get isEmoji() { + return !!this._def.checks.find((e) => e.kind === "emoji"); + } + get isUUID() { + return !!this._def.checks.find((e) => e.kind === "uuid"); + } + get isCUID() { + return !!this._def.checks.find((e) => e.kind === "cuid"); + } + get isCUID2() { + return !!this._def.checks.find((e) => e.kind === "cuid2"); + } + get isULID() { + return !!this._def.checks.find((e) => e.kind === "ulid"); + } + get isIP() { + return !!this._def.checks.find((e) => e.kind === "ip"); + } + get minLength() { + let e = null; + for (const t of this._def.checks) + t.kind === "min" && (e === null || t.value > e) && (e = t.value); + return e; + } + get maxLength() { + let e = null; + for (const t of this._def.checks) + t.kind === "max" && (e === null || t.value < e) && (e = t.value); + return e; + } +} +O.create = (n) => { + var e; + return new O({ + checks: [], + typeName: y.ZodString, + coerce: (e = n == null ? void 0 : n.coerce) !== null && e !== void 0 ? e : !1, + ...v(n) + }); +}; +function vt(n, e) { + const t = (n.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, r = t > s ? t : s, a = parseInt(n.toFixed(r).replace(".", "")), o = parseInt(e.toFixed(r).replace(".", "")); + return a % o / Math.pow(10, r); +} +class z extends b { + constructor() { + super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf; + } + _parse(e) { + if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== h.number) { + const a = this._getOrReturnCtx(e); + return f(a, { + code: l.invalid_type, + expected: h.number, + received: a.parsedType + }), g; + } + let s; + const r = new P(); + for (const a of this._def.checks) + a.kind === "int" ? k.isInteger(e.data) || (s = this._getOrReturnCtx(e, s), f(s, { + code: l.invalid_type, + expected: "integer", + received: "float", + message: a.message + }), r.dirty()) : a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (s = this._getOrReturnCtx(e, s), f(s, { + code: l.too_small, + minimum: a.value, + type: "number", + inclusive: a.inclusive, + exact: !1, + message: a.message + }), r.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (s = this._getOrReturnCtx(e, s), f(s, { + code: l.too_big, + maximum: a.value, + type: "number", + inclusive: a.inclusive, + exact: !1, + message: a.message + }), r.dirty()) : a.kind === "multipleOf" ? vt(e.data, a.value) !== 0 && (s = this._getOrReturnCtx(e, s), f(s, { + code: l.not_multiple_of, + multipleOf: a.value, + message: a.message + }), r.dirty()) : a.kind === "finite" ? Number.isFinite(e.data) || (s = this._getOrReturnCtx(e, s), f(s, { + code: l.not_finite, + message: a.message + }), r.dirty()) : k.assertNever(a); + return { status: r.value, value: e.data }; + } + gte(e, t) { + return this.setLimit("min", e, !0, m.toString(t)); + } + gt(e, t) { + return this.setLimit("min", e, !1, m.toString(t)); + } + lte(e, t) { + return this.setLimit("max", e, !0, m.toString(t)); + } + lt(e, t) { + return this.setLimit("max", e, !1, m.toString(t)); + } + setLimit(e, t, s, r) { + return new z({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind: e, + value: t, + inclusive: s, + message: m.toString(r) + } + ] + }); + } + _addCheck(e) { + return new z({ + ...this._def, + checks: [...this._def.checks, e] + }); + } + int(e) { + return this._addCheck({ + kind: "int", + message: m.toString(e) + }); + } + positive(e) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: !1, + message: m.toString(e) + }); + } + negative(e) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: !1, + message: m.toString(e) + }); + } + nonpositive(e) { + return this._addCheck({ + kind: "max", + value: 0, + inclusive: !0, + message: m.toString(e) + }); + } + nonnegative(e) { + return this._addCheck({ + kind: "min", + value: 0, + inclusive: !0, + message: m.toString(e) + }); + } + multipleOf(e, t) { + return this._addCheck({ + kind: "multipleOf", + value: e, + message: m.toString(t) + }); + } + finite(e) { + return this._addCheck({ + kind: "finite", + message: m.toString(e) + }); + } + safe(e) { + return this._addCheck({ + kind: "min", + inclusive: !0, + value: Number.MIN_SAFE_INTEGER, + message: m.toString(e) + })._addCheck({ + kind: "max", + inclusive: !0, + value: Number.MAX_SAFE_INTEGER, + message: m.toString(e) + }); + } + get minValue() { + let e = null; + for (const t of this._def.checks) + t.kind === "min" && (e === null || t.value > e) && (e = t.value); + return e; + } + get maxValue() { + let e = null; + for (const t of this._def.checks) + t.kind === "max" && (e === null || t.value < e) && (e = t.value); + return e; + } + get isInt() { + return !!this._def.checks.find((e) => e.kind === "int" || e.kind === "multipleOf" && k.isInteger(e.value)); + } + get isFinite() { + let e = null, t = null; + for (const s of this._def.checks) { + if (s.kind === "finite" || s.kind === "int" || s.kind === "multipleOf") + return !0; + s.kind === "min" ? (t === null || s.value > t) && (t = s.value) : s.kind === "max" && (e === null || s.value < e) && (e = s.value); + } + return Number.isFinite(t) && Number.isFinite(e); + } +} +z.create = (n) => new z({ + checks: [], + typeName: y.ZodNumber, + coerce: (n == null ? void 0 : n.coerce) || !1, + ...v(n) +}); +class W extends b { + constructor() { + super(...arguments), this.min = this.gte, this.max = this.lte; + } + _parse(e) { + if (this._def.coerce && (e.data = BigInt(e.data)), this._getType(e) !== h.bigint) { + const a = this._getOrReturnCtx(e); + return f(a, { + code: l.invalid_type, + expected: h.bigint, + received: a.parsedType + }), g; + } + let s; + const r = new P(); + for (const a of this._def.checks) + a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (s = this._getOrReturnCtx(e, s), f(s, { + code: l.too_small, + type: "bigint", + minimum: a.value, + inclusive: a.inclusive, + message: a.message + }), r.dirty()) : a.kind === "max" ? (a.inclusive ? e.data > a.value : e.data >= a.value) && (s = this._getOrReturnCtx(e, s), f(s, { + code: l.too_big, + type: "bigint", + maximum: a.value, + inclusive: a.inclusive, + message: a.message + }), r.dirty()) : a.kind === "multipleOf" ? e.data % a.value !== BigInt(0) && (s = this._getOrReturnCtx(e, s), f(s, { + code: l.not_multiple_of, + multipleOf: a.value, + message: a.message + }), r.dirty()) : k.assertNever(a); + return { status: r.value, value: e.data }; + } + gte(e, t) { + return this.setLimit("min", e, !0, m.toString(t)); + } + gt(e, t) { + return this.setLimit("min", e, !1, m.toString(t)); + } + lte(e, t) { + return this.setLimit("max", e, !0, m.toString(t)); + } + lt(e, t) { + return this.setLimit("max", e, !1, m.toString(t)); + } + setLimit(e, t, s, r) { + return new W({ + ...this._def, + checks: [ + ...this._def.checks, + { + kind: e, + value: t, + inclusive: s, + message: m.toString(r) + } + ] + }); + } + _addCheck(e) { + return new W({ + ...this._def, + checks: [...this._def.checks, e] + }); + } + positive(e) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: !1, + message: m.toString(e) + }); + } + negative(e) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: !1, + message: m.toString(e) + }); + } + nonpositive(e) { + return this._addCheck({ + kind: "max", + value: BigInt(0), + inclusive: !0, + message: m.toString(e) + }); + } + nonnegative(e) { + return this._addCheck({ + kind: "min", + value: BigInt(0), + inclusive: !0, + message: m.toString(e) + }); + } + multipleOf(e, t) { + return this._addCheck({ + kind: "multipleOf", + value: e, + message: m.toString(t) + }); + } + get minValue() { + let e = null; + for (const t of this._def.checks) + t.kind === "min" && (e === null || t.value > e) && (e = t.value); + return e; + } + get maxValue() { + let e = null; + for (const t of this._def.checks) + t.kind === "max" && (e === null || t.value < e) && (e = t.value); + return e; + } +} +W.create = (n) => { + var e; + return new W({ + checks: [], + typeName: y.ZodBigInt, + coerce: (e = n == null ? void 0 : n.coerce) !== null && e !== void 0 ? e : !1, + ...v(n) + }); +}; +class re extends b { + _parse(e) { + if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== h.boolean) { + const s = this._getOrReturnCtx(e); + return f(s, { + code: l.invalid_type, + expected: h.boolean, + received: s.parsedType + }), g; + } + return j(e.data); + } +} +re.create = (n) => new re({ + typeName: y.ZodBoolean, + coerce: (n == null ? void 0 : n.coerce) || !1, + ...v(n) +}); +class Y extends b { + _parse(e) { + if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== h.date) { + const a = this._getOrReturnCtx(e); + return f(a, { + code: l.invalid_type, + expected: h.date, + received: a.parsedType + }), g; + } + if (isNaN(e.data.getTime())) { + const a = this._getOrReturnCtx(e); + return f(a, { + code: l.invalid_date + }), g; + } + const s = new P(); + let r; + for (const a of this._def.checks) + a.kind === "min" ? e.data.getTime() < a.value && (r = this._getOrReturnCtx(e, r), f(r, { + code: l.too_small, + message: a.message, + inclusive: !0, + exact: !1, + minimum: a.value, + type: "date" + }), s.dirty()) : a.kind === "max" ? e.data.getTime() > a.value && (r = this._getOrReturnCtx(e, r), f(r, { + code: l.too_big, + message: a.message, + inclusive: !0, + exact: !1, + maximum: a.value, + type: "date" + }), s.dirty()) : k.assertNever(a); + return { + status: s.value, + value: new Date(e.data.getTime()) + }; + } + _addCheck(e) { + return new Y({ + ...this._def, + checks: [...this._def.checks, e] + }); + } + min(e, t) { + return this._addCheck({ + kind: "min", + value: e.getTime(), + message: m.toString(t) + }); + } + max(e, t) { + return this._addCheck({ + kind: "max", + value: e.getTime(), + message: m.toString(t) + }); + } + get minDate() { + let e = null; + for (const t of this._def.checks) + t.kind === "min" && (e === null || t.value > e) && (e = t.value); + return e != null ? new Date(e) : null; + } + get maxDate() { + let e = null; + for (const t of this._def.checks) + t.kind === "max" && (e === null || t.value < e) && (e = t.value); + return e != null ? new Date(e) : null; + } +} +Y.create = (n) => new Y({ + checks: [], + coerce: (n == null ? void 0 : n.coerce) || !1, + typeName: y.ZodDate, + ...v(n) +}); +class be extends b { + _parse(e) { + if (this._getType(e) !== h.symbol) { + const s = this._getOrReturnCtx(e); + return f(s, { + code: l.invalid_type, + expected: h.symbol, + received: s.parsedType + }), g; + } + return j(e.data); + } +} +be.create = (n) => new be({ + typeName: y.ZodSymbol, + ...v(n) +}); +class ae extends b { + _parse(e) { + if (this._getType(e) !== h.undefined) { + const s = this._getOrReturnCtx(e); + return f(s, { + code: l.invalid_type, + expected: h.undefined, + received: s.parsedType + }), g; + } + return j(e.data); + } +} +ae.create = (n) => new ae({ + typeName: y.ZodUndefined, + ...v(n) +}); +class ie extends b { + _parse(e) { + if (this._getType(e) !== h.null) { + const s = this._getOrReturnCtx(e); + return f(s, { + code: l.invalid_type, + expected: h.null, + received: s.parsedType + }), g; + } + return j(e.data); + } +} +ie.create = (n) => new ie({ + typeName: y.ZodNull, + ...v(n) +}); +class te extends b { + constructor() { + super(...arguments), this._any = !0; + } + _parse(e) { + return j(e.data); + } +} +te.create = (n) => new te({ + typeName: y.ZodAny, + ...v(n) +}); +class J extends b { + constructor() { + super(...arguments), this._unknown = !0; + } + _parse(e) { + return j(e.data); + } +} +J.create = (n) => new J({ + typeName: y.ZodUnknown, + ...v(n) +}); +class $ extends b { + _parse(e) { + const t = this._getOrReturnCtx(e); + return f(t, { + code: l.invalid_type, + expected: h.never, + received: t.parsedType + }), g; + } +} +$.create = (n) => new $({ + typeName: y.ZodNever, + ...v(n) +}); +class xe extends b { + _parse(e) { + if (this._getType(e) !== h.undefined) { + const s = this._getOrReturnCtx(e); + return f(s, { + code: l.invalid_type, + expected: h.void, + received: s.parsedType + }), g; + } + return j(e.data); + } +} +xe.create = (n) => new xe({ + typeName: y.ZodVoid, + ...v(n) +}); +class R extends b { + _parse(e) { + const { ctx: t, status: s } = this._processInputParams(e), r = this._def; + if (t.parsedType !== h.array) + return f(t, { + code: l.invalid_type, + expected: h.array, + received: t.parsedType + }), g; + if (r.exactLength !== null) { + const o = t.data.length > r.exactLength.value, c = t.data.length < r.exactLength.value; + (o || c) && (f(t, { + code: o ? l.too_big : l.too_small, + minimum: c ? r.exactLength.value : void 0, + maximum: o ? r.exactLength.value : void 0, + type: "array", + inclusive: !0, + exact: !0, + message: r.exactLength.message + }), s.dirty()); + } + if (r.minLength !== null && t.data.length < r.minLength.value && (f(t, { + code: l.too_small, + minimum: r.minLength.value, + type: "array", + inclusive: !0, + exact: !1, + message: r.minLength.message + }), s.dirty()), r.maxLength !== null && t.data.length > r.maxLength.value && (f(t, { + code: l.too_big, + maximum: r.maxLength.value, + type: "array", + inclusive: !0, + exact: !1, + message: r.maxLength.message + }), s.dirty()), t.common.async) + return Promise.all([...t.data].map((o, c) => r.type._parseAsync(new B(t, o, t.path, c)))).then((o) => P.mergeArray(s, o)); + const a = [...t.data].map((o, c) => r.type._parseSync(new B(t, o, t.path, c))); + return P.mergeArray(s, a); + } + get element() { + return this._def.type; + } + min(e, t) { + return new R({ + ...this._def, + minLength: { value: e, message: m.toString(t) } + }); + } + max(e, t) { + return new R({ + ...this._def, + maxLength: { value: e, message: m.toString(t) } + }); + } + length(e, t) { + return new R({ + ...this._def, + exactLength: { value: e, message: m.toString(t) } + }); + } + nonempty(e) { + return this.min(1, e); + } +} +R.create = (n, e) => new R({ + type: n, + minLength: null, + maxLength: null, + exactLength: null, + typeName: y.ZodArray, + ...v(e) +}); +function F(n) { + if (n instanceof C) { + const e = {}; + for (const t in n.shape) { + const s = n.shape[t]; + e[t] = L.create(F(s)); + } + return new C({ + ...n._def, + shape: () => e + }); + } else + return n instanceof R ? new R({ + ...n._def, + type: F(n.element) + }) : n instanceof L ? L.create(F(n.unwrap())) : n instanceof X ? X.create(F(n.unwrap())) : n instanceof V ? V.create(n.items.map((e) => F(e))) : n; +} +class C extends b { + constructor() { + super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend; + } + _getCached() { + if (this._cached !== null) + return this._cached; + const e = this._def.shape(), t = k.objectKeys(e); + return this._cached = { shape: e, keys: t }; + } + _parse(e) { + if (this._getType(e) !== h.object) { + const d = this._getOrReturnCtx(e); + return f(d, { + code: l.invalid_type, + expected: h.object, + received: d.parsedType + }), g; + } + const { status: s, ctx: r } = this._processInputParams(e), { shape: a, keys: o } = this._getCached(), c = []; + if (!(this._def.catchall instanceof $ && this._def.unknownKeys === "strip")) + for (const d in r.data) + o.includes(d) || c.push(d); + const u = []; + for (const d of o) { + const _ = a[d], K = r.data[d]; + u.push({ + key: { status: "valid", value: d }, + value: _._parse(new B(r, K, r.path, d)), + alwaysSet: d in r.data + }); + } + if (this._def.catchall instanceof $) { + const d = this._def.unknownKeys; + if (d === "passthrough") + for (const _ of c) + u.push({ + key: { status: "valid", value: _ }, + value: { status: "valid", value: r.data[_] } + }); + else if (d === "strict") + c.length > 0 && (f(r, { + code: l.unrecognized_keys, + keys: c + }), s.dirty()); + else if (d !== "strip") + throw new Error("Internal ZodObject error: invalid unknownKeys value."); + } else { + const d = this._def.catchall; + for (const _ of c) { + const K = r.data[_]; + u.push({ + key: { status: "valid", value: _ }, + value: d._parse( + new B(r, K, r.path, _) + //, ctx.child(key), value, getParsedType(value) + ), + alwaysSet: _ in r.data + }); + } + } + return r.common.async ? Promise.resolve().then(async () => { + const d = []; + for (const _ of u) { + const K = await _.key; + d.push({ + key: K, + value: await _.value, + alwaysSet: _.alwaysSet + }); + } + return d; + }).then((d) => P.mergeObjectSync(s, d)) : P.mergeObjectSync(s, u); + } + get shape() { + return this._def.shape(); + } + strict(e) { + return m.errToObj, new C({ + ...this._def, + unknownKeys: "strict", + ...e !== void 0 ? { + errorMap: (t, s) => { + var r, a, o, c; + const u = (o = (a = (r = this._def).errorMap) === null || a === void 0 ? void 0 : a.call(r, t, s).message) !== null && o !== void 0 ? o : s.defaultError; + return t.code === "unrecognized_keys" ? { + message: (c = m.errToObj(e).message) !== null && c !== void 0 ? c : u + } : { + message: u + }; + } + } : {} + }); + } + strip() { + return new C({ + ...this._def, + unknownKeys: "strip" + }); + } + passthrough() { + return new C({ + ...this._def, + unknownKeys: "passthrough" + }); + } + // const AugmentFactory = + // (def: Def) => + // ( + // augmentation: Augmentation + // ): ZodObject< + // extendShape, Augmentation>, + // Def["unknownKeys"], + // Def["catchall"] + // > => { + // return new ZodObject({ + // ...def, + // shape: () => ({ + // ...def.shape(), + // ...augmentation, + // }), + // }) as any; + // }; + extend(e) { + return new C({ + ...this._def, + shape: () => ({ + ...this._def.shape(), + ...e + }) + }); + } + /** + * Prior to zod@1.0.12 there was a bug in the + * inferred type of merged objects. Please + * upgrade if you are experiencing issues. + */ + merge(e) { + return new C({ + unknownKeys: e._def.unknownKeys, + catchall: e._def.catchall, + shape: () => ({ + ...this._def.shape(), + ...e._def.shape() + }), + typeName: y.ZodObject + }); + } + // merge< + // Incoming extends AnyZodObject, + // Augmentation extends Incoming["shape"], + // NewOutput extends { + // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation + // ? Augmentation[k]["_output"] + // : k extends keyof Output + // ? Output[k] + // : never; + // }, + // NewInput extends { + // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation + // ? Augmentation[k]["_input"] + // : k extends keyof Input + // ? Input[k] + // : never; + // } + // >( + // merging: Incoming + // ): ZodObject< + // extendShape>, + // Incoming["_def"]["unknownKeys"], + // Incoming["_def"]["catchall"], + // NewOutput, + // NewInput + // > { + // const merged: any = new ZodObject({ + // unknownKeys: merging._def.unknownKeys, + // catchall: merging._def.catchall, + // shape: () => + // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), + // typeName: ZodFirstPartyTypeKind.ZodObject, + // }) as any; + // return merged; + // } + setKey(e, t) { + return this.augment({ [e]: t }); + } + // merge( + // merging: Incoming + // ): //ZodObject = (merging) => { + // ZodObject< + // extendShape>, + // Incoming["_def"]["unknownKeys"], + // Incoming["_def"]["catchall"] + // > { + // // const mergedShape = objectUtil.mergeShapes( + // // this._def.shape(), + // // merging._def.shape() + // // ); + // const merged: any = new ZodObject({ + // unknownKeys: merging._def.unknownKeys, + // catchall: merging._def.catchall, + // shape: () => + // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()), + // typeName: ZodFirstPartyTypeKind.ZodObject, + // }) as any; + // return merged; + // } + catchall(e) { + return new C({ + ...this._def, + catchall: e + }); + } + pick(e) { + const t = {}; + return k.objectKeys(e).forEach((s) => { + e[s] && this.shape[s] && (t[s] = this.shape[s]); + }), new C({ + ...this._def, + shape: () => t + }); + } + omit(e) { + const t = {}; + return k.objectKeys(this.shape).forEach((s) => { + e[s] || (t[s] = this.shape[s]); + }), new C({ + ...this._def, + shape: () => t + }); + } + /** + * @deprecated + */ + deepPartial() { + return F(this); + } + partial(e) { + const t = {}; + return k.objectKeys(this.shape).forEach((s) => { + const r = this.shape[s]; + e && !e[s] ? t[s] = r : t[s] = r.optional(); + }), new C({ + ...this._def, + shape: () => t + }); + } + required(e) { + const t = {}; + return k.objectKeys(this.shape).forEach((s) => { + if (e && !e[s]) + t[s] = this.shape[s]; + else { + let a = this.shape[s]; + for (; a instanceof L; ) + a = a._def.innerType; + t[s] = a; + } + }), new C({ + ...this._def, + shape: () => t + }); + } + keyof() { + return $e(k.objectKeys(this.shape)); + } +} +C.create = (n, e) => new C({ + shape: () => n, + unknownKeys: "strip", + catchall: $.create(), + typeName: y.ZodObject, + ...v(e) +}); +C.strictCreate = (n, e) => new C({ + shape: () => n, + unknownKeys: "strict", + catchall: $.create(), + typeName: y.ZodObject, + ...v(e) +}); +C.lazycreate = (n, e) => new C({ + shape: n, + unknownKeys: "strip", + catchall: $.create(), + typeName: y.ZodObject, + ...v(e) +}); +class oe extends b { + _parse(e) { + const { ctx: t } = this._processInputParams(e), s = this._def.options; + function r(a) { + for (const c of a) + if (c.result.status === "valid") + return c.result; + for (const c of a) + if (c.result.status === "dirty") + return t.common.issues.push(...c.ctx.common.issues), c.result; + const o = a.map((c) => new Z(c.ctx.common.issues)); + return f(t, { + code: l.invalid_union, + unionErrors: o + }), g; + } + if (t.common.async) + return Promise.all(s.map(async (a) => { + const o = { + ...t, + common: { + ...t.common, + issues: [] + }, + parent: null + }; + return { + result: await a._parseAsync({ + data: t.data, + path: t.path, + parent: o + }), + ctx: o + }; + })).then(r); + { + let a; + const o = []; + for (const u of s) { + const d = { + ...t, + common: { + ...t.common, + issues: [] + }, + parent: null + }, _ = u._parseSync({ + data: t.data, + path: t.path, + parent: d + }); + if (_.status === "valid") + return _; + _.status === "dirty" && !a && (a = { result: _, ctx: d }), d.common.issues.length && o.push(d.common.issues); + } + if (a) + return t.common.issues.push(...a.ctx.common.issues), a.result; + const c = o.map((u) => new Z(u)); + return f(t, { + code: l.invalid_union, + unionErrors: c + }), g; + } + } + get options() { + return this._def.options; + } +} +oe.create = (n, e) => new oe({ + options: n, + typeName: y.ZodUnion, + ...v(e) +}); +const me = (n) => n instanceof ue ? me(n.schema) : n instanceof M ? me(n.innerType()) : n instanceof de ? [n.value] : n instanceof G ? n.options : n instanceof he ? Object.keys(n.enum) : n instanceof fe ? me(n._def.innerType) : n instanceof ae ? [void 0] : n instanceof ie ? [null] : null; +class Ie extends b { + _parse(e) { + const { ctx: t } = this._processInputParams(e); + if (t.parsedType !== h.object) + return f(t, { + code: l.invalid_type, + expected: h.object, + received: t.parsedType + }), g; + const s = this.discriminator, r = t.data[s], a = this.optionsMap.get(r); + return a ? t.common.async ? a._parseAsync({ + data: t.data, + path: t.path, + parent: t + }) : a._parseSync({ + data: t.data, + path: t.path, + parent: t + }) : (f(t, { + code: l.invalid_union_discriminator, + options: Array.from(this.optionsMap.keys()), + path: [s] + }), g); + } + get discriminator() { + return this._def.discriminator; + } + get options() { + return this._def.options; + } + get optionsMap() { + return this._def.optionsMap; + } + /** + * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor. + * However, it only allows a union of objects, all of which need to share a discriminator property. This property must + * have a different value for each object in the union. + * @param discriminator the name of the discriminator property + * @param types an array of object schemas + * @param params + */ + static create(e, t, s) { + const r = /* @__PURE__ */ new Map(); + for (const a of t) { + const o = me(a.shape[e]); + if (!o) + throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`); + for (const c of o) { + if (r.has(c)) + throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(c)}`); + r.set(c, a); + } + } + return new Ie({ + typeName: y.ZodDiscriminatedUnion, + discriminator: e, + options: t, + optionsMap: r, + ...v(s) + }); + } +} +function Ee(n, e) { + const t = H(n), s = H(e); + if (n === e) + return { valid: !0, data: n }; + if (t === h.object && s === h.object) { + const r = k.objectKeys(e), a = k.objectKeys(n).filter((c) => r.indexOf(c) !== -1), o = { ...n, ...e }; + for (const c of a) { + const u = Ee(n[c], e[c]); + if (!u.valid) + return { valid: !1 }; + o[c] = u.data; + } + return { valid: !0, data: o }; + } else if (t === h.array && s === h.array) { + if (n.length !== e.length) + return { valid: !1 }; + const r = []; + for (let a = 0; a < n.length; a++) { + const o = n[a], c = e[a], u = Ee(o, c); + if (!u.valid) + return { valid: !1 }; + r.push(u.data); + } + return { valid: !0, data: r }; + } else + return t === h.date && s === h.date && +n == +e ? { valid: !0, data: n } : { valid: !1 }; +} +class ce extends b { + _parse(e) { + const { status: t, ctx: s } = this._processInputParams(e), r = (a, o) => { + if (Pe(a) || Pe(o)) + return g; + const c = Ee(a.value, o.value); + return c.valid ? ((je(a) || je(o)) && t.dirty(), { status: t.value, value: c.data }) : (f(s, { + code: l.invalid_intersection_types + }), g); + }; + return s.common.async ? Promise.all([ + this._def.left._parseAsync({ + data: s.data, + path: s.path, + parent: s + }), + this._def.right._parseAsync({ + data: s.data, + path: s.path, + parent: s + }) + ]).then(([a, o]) => r(a, o)) : r(this._def.left._parseSync({ + data: s.data, + path: s.path, + parent: s + }), this._def.right._parseSync({ + data: s.data, + path: s.path, + parent: s + })); + } +} +ce.create = (n, e, t) => new ce({ + left: n, + right: e, + typeName: y.ZodIntersection, + ...v(t) +}); +class V extends b { + _parse(e) { + const { status: t, ctx: s } = this._processInputParams(e); + if (s.parsedType !== h.array) + return f(s, { + code: l.invalid_type, + expected: h.array, + received: s.parsedType + }), g; + if (s.data.length < this._def.items.length) + return f(s, { + code: l.too_small, + minimum: this._def.items.length, + inclusive: !0, + exact: !1, + type: "array" + }), g; + !this._def.rest && s.data.length > this._def.items.length && (f(s, { + code: l.too_big, + maximum: this._def.items.length, + inclusive: !0, + exact: !1, + type: "array" + }), t.dirty()); + const a = [...s.data].map((o, c) => { + const u = this._def.items[c] || this._def.rest; + return u ? u._parse(new B(s, o, s.path, c)) : null; + }).filter((o) => !!o); + return s.common.async ? Promise.all(a).then((o) => P.mergeArray(t, o)) : P.mergeArray(t, a); + } + get items() { + return this._def.items; + } + rest(e) { + return new V({ + ...this._def, + rest: e + }); + } +} +V.create = (n, e) => { + if (!Array.isArray(n)) + throw new Error("You must pass an array of schemas to z.tuple([ ... ])"); + return new V({ + items: n, + typeName: y.ZodTuple, + rest: null, + ...v(e) + }); +}; +class le extends b { + get keySchema() { + return this._def.keyType; + } + get valueSchema() { + return this._def.valueType; + } + _parse(e) { + const { status: t, ctx: s } = this._processInputParams(e); + if (s.parsedType !== h.object) + return f(s, { + code: l.invalid_type, + expected: h.object, + received: s.parsedType + }), g; + const r = [], a = this._def.keyType, o = this._def.valueType; + for (const c in s.data) + r.push({ + key: a._parse(new B(s, c, s.path, c)), + value: o._parse(new B(s, s.data[c], s.path, c)) + }); + return s.common.async ? P.mergeObjectAsync(t, r) : P.mergeObjectSync(t, r); + } + get element() { + return this._def.valueType; + } + static create(e, t, s) { + return t instanceof b ? new le({ + keyType: e, + valueType: t, + typeName: y.ZodRecord, + ...v(s) + }) : new le({ + keyType: O.create(), + valueType: e, + typeName: y.ZodRecord, + ...v(t) + }); + } +} +class we extends b { + _parse(e) { + const { status: t, ctx: s } = this._processInputParams(e); + if (s.parsedType !== h.map) + return f(s, { + code: l.invalid_type, + expected: h.map, + received: s.parsedType + }), g; + const r = this._def.keyType, a = this._def.valueType, o = [...s.data.entries()].map(([c, u], d) => ({ + key: r._parse(new B(s, c, s.path, [d, "key"])), + value: a._parse(new B(s, u, s.path, [d, "value"])) + })); + if (s.common.async) { + const c = /* @__PURE__ */ new Map(); + return Promise.resolve().then(async () => { + for (const u of o) { + const d = await u.key, _ = await u.value; + if (d.status === "aborted" || _.status === "aborted") + return g; + (d.status === "dirty" || _.status === "dirty") && t.dirty(), c.set(d.value, _.value); + } + return { status: t.value, value: c }; + }); + } else { + const c = /* @__PURE__ */ new Map(); + for (const u of o) { + const d = u.key, _ = u.value; + if (d.status === "aborted" || _.status === "aborted") + return g; + (d.status === "dirty" || _.status === "dirty") && t.dirty(), c.set(d.value, _.value); + } + return { status: t.value, value: c }; + } + } +} +we.create = (n, e, t) => new we({ + valueType: e, + keyType: n, + typeName: y.ZodMap, + ...v(t) +}); +class Q extends b { + _parse(e) { + const { status: t, ctx: s } = this._processInputParams(e); + if (s.parsedType !== h.set) + return f(s, { + code: l.invalid_type, + expected: h.set, + received: s.parsedType + }), g; + const r = this._def; + r.minSize !== null && s.data.size < r.minSize.value && (f(s, { + code: l.too_small, + minimum: r.minSize.value, + type: "set", + inclusive: !0, + exact: !1, + message: r.minSize.message + }), t.dirty()), r.maxSize !== null && s.data.size > r.maxSize.value && (f(s, { + code: l.too_big, + maximum: r.maxSize.value, + type: "set", + inclusive: !0, + exact: !1, + message: r.maxSize.message + }), t.dirty()); + const a = this._def.valueType; + function o(u) { + const d = /* @__PURE__ */ new Set(); + for (const _ of u) { + if (_.status === "aborted") + return g; + _.status === "dirty" && t.dirty(), d.add(_.value); + } + return { status: t.value, value: d }; + } + const c = [...s.data.values()].map((u, d) => a._parse(new B(s, u, s.path, d))); + return s.common.async ? Promise.all(c).then((u) => o(u)) : o(c); + } + min(e, t) { + return new Q({ + ...this._def, + minSize: { value: e, message: m.toString(t) } + }); + } + max(e, t) { + return new Q({ + ...this._def, + maxSize: { value: e, message: m.toString(t) } + }); + } + size(e, t) { + return this.min(e, t).max(e, t); + } + nonempty(e) { + return this.min(1, e); + } +} +Q.create = (n, e) => new Q({ + valueType: n, + minSize: null, + maxSize: null, + typeName: y.ZodSet, + ...v(e) +}); +class ee extends b { + constructor() { + super(...arguments), this.validate = this.implement; + } + _parse(e) { + const { ctx: t } = this._processInputParams(e); + if (t.parsedType !== h.function) + return f(t, { + code: l.invalid_type, + expected: h.function, + received: t.parsedType + }), g; + function s(c, u) { + return ge({ + data: c, + path: t.path, + errorMaps: [ + t.common.contextualErrorMap, + t.schemaErrorMap, + ye(), + ne + ].filter((d) => !!d), + issueData: { + code: l.invalid_arguments, + argumentsError: u + } + }); + } + function r(c, u) { + return ge({ + data: c, + path: t.path, + errorMaps: [ + t.common.contextualErrorMap, + t.schemaErrorMap, + ye(), + ne + ].filter((d) => !!d), + issueData: { + code: l.invalid_return_type, + returnTypeError: u + } + }); + } + const a = { errorMap: t.common.contextualErrorMap }, o = t.data; + return this._def.returns instanceof se ? j(async (...c) => { + const u = new Z([]), d = await this._def.args.parseAsync(c, a).catch((Ce) => { + throw u.addIssue(s(c, Ce)), u; + }), _ = await o(...d); + return await this._def.returns._def.type.parseAsync(_, a).catch((Ce) => { + throw u.addIssue(r(_, Ce)), u; + }); + }) : j((...c) => { + const u = this._def.args.safeParse(c, a); + if (!u.success) + throw new Z([s(c, u.error)]); + const d = o(...u.data), _ = this._def.returns.safeParse(d, a); + if (!_.success) + throw new Z([r(d, _.error)]); + return _.data; + }); + } + parameters() { + return this._def.args; + } + returnType() { + return this._def.returns; + } + args(...e) { + return new ee({ + ...this._def, + args: V.create(e).rest(J.create()) + }); + } + returns(e) { + return new ee({ + ...this._def, + returns: e + }); + } + implement(e) { + return this.parse(e); + } + strictImplement(e) { + return this.parse(e); + } + static create(e, t, s) { + return new ee({ + args: e || V.create([]).rest(J.create()), + returns: t || J.create(), + typeName: y.ZodFunction, + ...v(s) + }); + } +} +class ue extends b { + get schema() { + return this._def.getter(); + } + _parse(e) { + const { ctx: t } = this._processInputParams(e); + return this._def.getter()._parse({ data: t.data, path: t.path, parent: t }); + } +} +ue.create = (n, e) => new ue({ + getter: n, + typeName: y.ZodLazy, + ...v(e) +}); +class de extends b { + _parse(e) { + if (e.data !== this._def.value) { + const t = this._getOrReturnCtx(e); + return f(t, { + received: t.data, + code: l.invalid_literal, + expected: this._def.value + }), g; + } + return { status: "valid", value: e.data }; + } + get value() { + return this._def.value; + } +} +de.create = (n, e) => new de({ + value: n, + typeName: y.ZodLiteral, + ...v(e) +}); +function $e(n, e) { + return new G({ + values: n, + typeName: y.ZodEnum, + ...v(e) + }); +} +class G extends b { + _parse(e) { + if (typeof e.data != "string") { + const t = this._getOrReturnCtx(e), s = this._def.values; + return f(t, { + expected: k.joinValues(s), + received: t.parsedType, + code: l.invalid_type + }), g; + } + if (this._def.values.indexOf(e.data) === -1) { + const t = this._getOrReturnCtx(e), s = this._def.values; + return f(t, { + received: t.data, + code: l.invalid_enum_value, + options: s + }), g; + } + return j(e.data); + } + get options() { + return this._def.values; + } + get enum() { + const e = {}; + for (const t of this._def.values) + e[t] = t; + return e; + } + get Values() { + const e = {}; + for (const t of this._def.values) + e[t] = t; + return e; + } + get Enum() { + const e = {}; + for (const t of this._def.values) + e[t] = t; + return e; + } + extract(e) { + return G.create(e); + } + exclude(e) { + return G.create(this.options.filter((t) => !e.includes(t))); + } +} +G.create = $e; +class he extends b { + _parse(e) { + const t = k.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e); + if (s.parsedType !== h.string && s.parsedType !== h.number) { + const r = k.objectValues(t); + return f(s, { + expected: k.joinValues(r), + received: s.parsedType, + code: l.invalid_type + }), g; + } + if (t.indexOf(e.data) === -1) { + const r = k.objectValues(t); + return f(s, { + received: s.data, + code: l.invalid_enum_value, + options: r + }), g; + } + return j(e.data); + } + get enum() { + return this._def.values; + } +} +he.create = (n, e) => new he({ + values: n, + typeName: y.ZodNativeEnum, + ...v(e) +}); +class se extends b { + unwrap() { + return this._def.type; + } + _parse(e) { + const { ctx: t } = this._processInputParams(e); + if (t.parsedType !== h.promise && t.common.async === !1) + return f(t, { + code: l.invalid_type, + expected: h.promise, + received: t.parsedType + }), g; + const s = t.parsedType === h.promise ? t.data : Promise.resolve(t.data); + return j(s.then((r) => this._def.type.parseAsync(r, { + path: t.path, + errorMap: t.common.contextualErrorMap + }))); + } +} +se.create = (n, e) => new se({ + type: n, + typeName: y.ZodPromise, + ...v(e) +}); +class M extends b { + innerType() { + return this._def.schema; + } + sourceType() { + return this._def.schema._def.typeName === y.ZodEffects ? this._def.schema.sourceType() : this._def.schema; + } + _parse(e) { + const { status: t, ctx: s } = this._processInputParams(e), r = this._def.effect || null; + if (r.type === "preprocess") { + const o = r.transform(s.data); + return s.common.async ? Promise.resolve(o).then((c) => this._def.schema._parseAsync({ + data: c, + path: s.path, + parent: s + })) : this._def.schema._parseSync({ + data: o, + path: s.path, + parent: s + }); + } + const a = { + addIssue: (o) => { + f(s, o), o.fatal ? t.abort() : t.dirty(); + }, + get path() { + return s.path; + } + }; + if (a.addIssue = a.addIssue.bind(a), r.type === "refinement") { + const o = (c) => { + const u = r.refinement(c, a); + if (s.common.async) + return Promise.resolve(u); + if (u instanceof Promise) + throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead."); + return c; + }; + if (s.common.async === !1) { + const c = this._def.schema._parseSync({ + data: s.data, + path: s.path, + parent: s + }); + return c.status === "aborted" ? g : (c.status === "dirty" && t.dirty(), o(c.value), { status: t.value, value: c.value }); + } else + return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((c) => c.status === "aborted" ? g : (c.status === "dirty" && t.dirty(), o(c.value).then(() => ({ status: t.value, value: c.value })))); + } + if (r.type === "transform") + if (s.common.async === !1) { + const o = this._def.schema._parseSync({ + data: s.data, + path: s.path, + parent: s + }); + if (!ve(o)) + return o; + const c = r.transform(o.value, a); + if (c instanceof Promise) + throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead."); + return { status: t.value, value: c }; + } else + return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((o) => ve(o) ? Promise.resolve(r.transform(o.value, a)).then((c) => ({ status: t.value, value: c })) : o); + k.assertNever(r); + } +} +M.create = (n, e, t) => new M({ + schema: n, + typeName: y.ZodEffects, + effect: e, + ...v(t) +}); +M.createWithPreprocess = (n, e, t) => new M({ + schema: e, + effect: { type: "preprocess", transform: n }, + typeName: y.ZodEffects, + ...v(t) +}); +class L extends b { + _parse(e) { + return this._getType(e) === h.undefined ? j(void 0) : this._def.innerType._parse(e); + } + unwrap() { + return this._def.innerType; + } +} +L.create = (n, e) => new L({ + innerType: n, + typeName: y.ZodOptional, + ...v(e) +}); +class X extends b { + _parse(e) { + return this._getType(e) === h.null ? j(null) : this._def.innerType._parse(e); + } + unwrap() { + return this._def.innerType; + } +} +X.create = (n, e) => new X({ + innerType: n, + typeName: y.ZodNullable, + ...v(e) +}); +class fe extends b { + _parse(e) { + const { ctx: t } = this._processInputParams(e); + let s = t.data; + return t.parsedType === h.undefined && (s = this._def.defaultValue()), this._def.innerType._parse({ + data: s, + path: t.path, + parent: t + }); + } + removeDefault() { + return this._def.innerType; + } +} +fe.create = (n, e) => new fe({ + innerType: n, + typeName: y.ZodDefault, + defaultValue: typeof e.default == "function" ? e.default : () => e.default, + ...v(e) +}); +class ke extends b { + _parse(e) { + const { ctx: t } = this._processInputParams(e), s = { + ...t, + common: { + ...t.common, + issues: [] + } + }, r = this._def.innerType._parse({ + data: s.data, + path: s.path, + parent: { + ...s + } + }); + return _e(r) ? r.then((a) => ({ + status: "valid", + value: a.status === "valid" ? a.value : this._def.catchValue({ + get error() { + return new Z(s.common.issues); + }, + input: s.data + }) + })) : { + status: "valid", + value: r.status === "valid" ? r.value : this._def.catchValue({ + get error() { + return new Z(s.common.issues); + }, + input: s.data + }) + }; + } + removeCatch() { + return this._def.innerType; + } +} +ke.create = (n, e) => new ke({ + innerType: n, + typeName: y.ZodCatch, + catchValue: typeof e.catch == "function" ? e.catch : () => e.catch, + ...v(e) +}); +class Te extends b { + _parse(e) { + if (this._getType(e) !== h.nan) { + const s = this._getOrReturnCtx(e); + return f(s, { + code: l.invalid_type, + expected: h.nan, + received: s.parsedType + }), g; + } + return { status: "valid", value: e.data }; + } +} +Te.create = (n) => new Te({ + typeName: y.ZodNaN, + ...v(n) +}); +const _t = Symbol("zod_brand"); +class Ue extends b { + _parse(e) { + const { ctx: t } = this._processInputParams(e), s = t.data; + return this._def.type._parse({ + data: s, + path: t.path, + parent: t + }); + } + unwrap() { + return this._def.type; + } +} +class pe extends b { + _parse(e) { + const { status: t, ctx: s } = this._processInputParams(e); + if (s.common.async) + return (async () => { + const a = await this._def.in._parseAsync({ + data: s.data, + path: s.path, + parent: s + }); + return a.status === "aborted" ? g : a.status === "dirty" ? (t.dirty(), Le(a.value)) : this._def.out._parseAsync({ + data: a.value, + path: s.path, + parent: s + }); + })(); + { + const r = this._def.in._parseSync({ + data: s.data, + path: s.path, + parent: s + }); + return r.status === "aborted" ? g : r.status === "dirty" ? (t.dirty(), { + status: "dirty", + value: r.value + }) : this._def.out._parseSync({ + data: r.value, + path: s.path, + parent: s + }); + } + } + static create(e, t) { + return new pe({ + in: e, + out: t, + typeName: y.ZodPipeline + }); + } +} +const He = (n, e = {}, t) => n ? te.create().superRefine((s, r) => { + var a, o; + if (!n(s)) { + const c = typeof e == "function" ? e(s) : typeof e == "string" ? { message: e } : e, u = (o = (a = c.fatal) !== null && a !== void 0 ? a : t) !== null && o !== void 0 ? o : !0, d = typeof c == "string" ? { message: c } : c; + r.addIssue({ code: "custom", ...d, fatal: u }); + } +}) : te.create(), bt = { + object: C.lazycreate +}; +var y; +(function(n) { + n.ZodString = "ZodString", n.ZodNumber = "ZodNumber", n.ZodNaN = "ZodNaN", n.ZodBigInt = "ZodBigInt", n.ZodBoolean = "ZodBoolean", n.ZodDate = "ZodDate", n.ZodSymbol = "ZodSymbol", n.ZodUndefined = "ZodUndefined", n.ZodNull = "ZodNull", n.ZodAny = "ZodAny", n.ZodUnknown = "ZodUnknown", n.ZodNever = "ZodNever", n.ZodVoid = "ZodVoid", n.ZodArray = "ZodArray", n.ZodObject = "ZodObject", n.ZodUnion = "ZodUnion", n.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", n.ZodIntersection = "ZodIntersection", n.ZodTuple = "ZodTuple", n.ZodRecord = "ZodRecord", n.ZodMap = "ZodMap", n.ZodSet = "ZodSet", n.ZodFunction = "ZodFunction", n.ZodLazy = "ZodLazy", n.ZodLiteral = "ZodLiteral", n.ZodEnum = "ZodEnum", n.ZodEffects = "ZodEffects", n.ZodNativeEnum = "ZodNativeEnum", n.ZodOptional = "ZodOptional", n.ZodNullable = "ZodNullable", n.ZodDefault = "ZodDefault", n.ZodCatch = "ZodCatch", n.ZodPromise = "ZodPromise", n.ZodBranded = "ZodBranded", n.ZodPipeline = "ZodPipeline"; +})(y || (y = {})); +const xt = (n, e = { + message: `Input not instance of ${n.name}` +}) => He((t) => t instanceof n, e), Ne = O.create, ze = z.create, wt = Te.create, kt = W.create, We = re.create, Tt = Y.create, It = be.create, Ct = ae.create, St = ie.create, Pt = te.create, jt = J.create, Et = $.create, Nt = xe.create, Ot = R.create, Ge = C.create, Zt = C.strictCreate, Je = oe.create, Rt = Ie.create, Mt = ce.create, At = V.create, Bt = le.create, Vt = we.create, Dt = Q.create, qt = ee.create, Lt = ue.create, A = de.create, $t = G.create, Ut = he.create, Ht = se.create, Ve = M.create, zt = L.create, Wt = X.create, Gt = M.createWithPreprocess, Jt = pe.create, Yt = () => Ne().optional(), Qt = () => ze().optional(), Xt = () => We().optional(), Kt = { + string: (n) => O.create({ ...n, coerce: !0 }), + number: (n) => z.create({ ...n, coerce: !0 }), + boolean: (n) => re.create({ + ...n, + coerce: !0 + }), + bigint: (n) => W.create({ ...n, coerce: !0 }), + date: (n) => Y.create({ ...n, coerce: !0 }) +}, Ft = g; +var i = /* @__PURE__ */ Object.freeze({ + __proto__: null, + defaultErrorMap: ne, + setErrorMap: it, + getErrorMap: ye, + makeIssue: ge, + EMPTY_PATH: ot, + addIssueToContext: f, + ParseStatus: P, + INVALID: g, + DIRTY: Le, + OK: j, + isAborted: Pe, + isDirty: je, + isValid: ve, + isAsync: _e, + get util() { + return k; + }, + get objectUtil() { + return Se; + }, + ZodParsedType: h, + getParsedType: H, + ZodType: b, + ZodString: O, + ZodNumber: z, + ZodBigInt: W, + ZodBoolean: re, + ZodDate: Y, + ZodSymbol: be, + ZodUndefined: ae, + ZodNull: ie, + ZodAny: te, + ZodUnknown: J, + ZodNever: $, + ZodVoid: xe, + ZodArray: R, + ZodObject: C, + ZodUnion: oe, + ZodDiscriminatedUnion: Ie, + ZodIntersection: ce, + ZodTuple: V, + ZodRecord: le, + ZodMap: we, + ZodSet: Q, + ZodFunction: ee, + ZodLazy: ue, + ZodLiteral: de, + ZodEnum: G, + ZodNativeEnum: he, + ZodPromise: se, + ZodEffects: M, + ZodTransformer: M, + ZodOptional: L, + ZodNullable: X, + ZodDefault: fe, + ZodCatch: ke, + ZodNaN: Te, + BRAND: _t, + ZodBranded: Ue, + ZodPipeline: pe, + custom: He, + Schema: b, + ZodSchema: b, + late: bt, + get ZodFirstPartyTypeKind() { + return y; + }, + coerce: Kt, + any: Pt, + array: Ot, + bigint: kt, + boolean: We, + date: Tt, + discriminatedUnion: Rt, + effect: Ve, + enum: $t, + function: qt, + instanceof: xt, + intersection: Mt, + lazy: Lt, + literal: A, + map: Vt, + nan: wt, + nativeEnum: Ut, + never: Et, + null: St, + nullable: Wt, + number: ze, + object: Ge, + oboolean: Xt, + onumber: Qt, + optional: zt, + ostring: Yt, + pipeline: Jt, + preprocess: Gt, + promise: Ht, + record: Bt, + set: Dt, + strictObject: Zt, + string: Ne, + symbol: It, + transformer: Ve, + tuple: At, + undefined: Ct, + union: Je, + unknown: jt, + void: Nt, + NEVER: Ft, + ZodIssueCode: l, + quotelessJson: at, + ZodError: Z +}); +const es = A("UNSIGNED_INT"); +A("INT"); +A("FLOAT"); +const ts = A("INT2"), w = A("WSTRING"), D = A("VARIANT_MAP"), ss = A("Completion"), ns = A("UnknownOrchestration"), rs = A("Pending"), as = A("Failure"), p = Ne(), S = Ge({ + name: p, + type: w, + value: Je([ss, rs, as, ns]) +}); +i.object({ + name: p, + // the payload value is unique to each bridge response. + payload: i.object({ + name: p, + type: w, + value: i.string() + }), + status: S +}); +i.object({ + name: p, + payload: i.object({ + name: p, + type: w, + value: i.string() + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + payload: i.object({ + name: p, + type: D, + value: i.object({ + id: i.object({ + name: p, + type: w, + value: i.string() + }).optional(), + message: i.object({ + name: p, + type: w, + value: i.string() + }) + }) + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + payload: i.object({ + name: p, + type: D, + value: i.object({ + name: i.object({ + name: p, + type: w, + value: i.string() + }) + }) + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + payload: i.object({ + name: p, + type: D, + value: i.object({ + index: i.object({ + name: p, + type: w, + value: i.string() + }) + }) + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + payload: i.object({ + name: p, + type: D, + value: i.object({ + name: i.object({ + name: p, + type: w, + value: i.string() + }) + }) + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + status: S +}); +const is = i.object({ + name: p, + type: D, + value: i.object({ + calibration: i.object({ + name: p, + type: w, + value: i.string() + }), + defaultQuilt: i.object({ + name: p, + type: w, + value: i.string() + }), + hardwareVersion: i.object({ + name: p, + type: w, + value: i.string() + }), + hwid: i.object({ + name: p, + type: w, + value: i.string() + }), + index: i.object({ + name: p, + type: es, + value: i.number() + }), + state: i.object({ + name: p, + type: w, + value: i.string() + }), + windowCoords: i.object({ + name: p, + type: ts, + value: i.object({ + x: i.number(), + y: i.number() + }) + }) + }) +}), os = i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + payload: i.object({ + name: p, + type: D, + value: i.record(is).optional() + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + payload: i.object({ + name: p, + type: D, + value: i.object({ + name: i.object({ + name: p, + type: w, + value: i.string() + }) + }) + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + payload: i.object({ + name: p, + type: D, + value: i.object({ + playlist_name: i.object({ + name: p, + type: w, + value: i.string() + }), + playlist_path: i.object({ + name: p, + type: w, + value: i.string() + }) + }) + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + payload: i.object({ + name: p, + type: D, + value: i.object({ + playlist_name: i.object({ + name: p, + type: w, + value: i.string() + }) + }) + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + payload: i.object({ + name: p, + type: D, + value: i.object({ + playlist_name: i.object({ + name: p, + type: w, + value: i.string() + }) + }) + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + status: S +}); +i.object({ + name: p, + orchestration: i.object({ + name: p, + type: w, + value: i.string() + }), + status: S +}); +class N { + constructor(e) { + x(this, "bridgeEventName"); + x(this, "client"); + this.bridgeEventName = e.bridgeEventName, this.client = e.client, this.client.addEventListener(this.bridgeEventName, this.handle.bind(this)); + } +} +class ks extends N { + constructor(e) { + super({ bridgeEventName: "Monitor Connect", client: e.client }); + } + handle(e) { + this.client.log("%c Monitor Connect ", "color: aqua; font-weight: bold; border: solid;", e); + } +} +class Ts extends N { + constructor(e) { + super({ bridgeEventName: "Monitor Disconnect", client: e.client }); + } + handle(e) { + this.client.log("%c Monitor Disconnect ", "color: aqua; font-weight: bold; border: solid;", e); + } +} +class Is extends N { + constructor(e) { + super({ bridgeEventName: "Progress Start", client: e.client }); + } + handle(e) { + this.client.log("%c Progress Start ", "color: aqua; font-weight: bold; border: solid;", e); + } +} +class Cs extends N { + constructor(e) { + super({ bridgeEventName: "Progress Completion", client: e.client }); + } + handle(e) { + this.client.log(e); + } +} +class Ss extends N { + constructor(e) { + super({ bridgeEventName: "Progress Update", client: e.client }); + } + handle(e) { + this.client.log(e); + } +} +class Ps extends N { + constructor(e) { + super({ bridgeEventName: "Playlist Instance", client: e.client }); + } + handle(e) { + this.client.log("%c Playlist Instance ", "color: aqua; font-weight: bold; border: solid;", e); + } +} +class js extends N { + constructor(e) { + super({ bridgeEventName: "Playlist Insert", client: e.client }); + } + handle(e) { + this.client.log("%c Playlist Insert ", "color: aqua; font-weight: bold; border: solid;", e); + } +} +class Es extends N { + constructor(e) { + super({ bridgeEventName: "Playlist Delete", client: e.client }); + } + handle(e) { + this.client.log("%c Playlist Delete ", "color: aqua; font-weight: bold; border: solid;", e); + } +} +class Ns extends N { + constructor(e) { + super({ bridgeEventName: "Sync/Play Playlist", client: e.client }); + } + handle(e) { + this.client.log(e); + } +} +class Os extends N { + constructor(e) { + super({ bridgeEventName: "Sync/Play Playlist Complete", client: e.client }); + } + handle(e) { + this.client.log(e); + } +} +class Zs extends N { + constructor(e) { + super({ bridgeEventName: "Sync/Play Playlist Cancelled", client: e.client }); + } + handle(e) { + this.client.log(e); + } +} +class cs extends N { + constructor(e) { + super({ bridgeEventName: "New Item Playing", client: e.client }); + } + handle(e) { + var a, o; + this.client.log("%c New Item Playing ", "color: aqua; font-weight: bold; border: solid;", e); + let t = this.client.currentPlaylistIndex, s = (o = (a = this.client.playlists) == null ? void 0 : a[t]) == null ? void 0 : o.name, r = this.client.currentPlaylistItemIndex; + e.payload.value.playlist_name.value == s && e.payload.value.index.value == r && (this.client.isCastPending = !1); + } +} +function U(n) { + const [e, t, s, r] = n.split(".").map(Number); + return { + major: e, + minor: t, + patch: s, + hotfix: r + }; +} +const T = class { + constructor() { + /** The name of the current orchestration */ + x(this, "orchestration"); + /** A boolean that stores if the Bridge session is valid or not + * If the orchestration is not valid, some functions will not work + */ + x(this, "isConnected"); + /**A boolean for checking the status of the current disconnect event */ + x(this, "isDisconnecting"); + /**An array containing the connected Looking Glass Displays */ + x(this, "displays"); + /**an Array containing Playlists, we store this to easily switch between multiple playlists */ + x(this, "playlists"); + /** The index of playlists that is currently active */ + x(this, "currentPlaylistIndex"); + /**The index of the playlist Item that is currently active */ + x(this, "currentPlaylistItemIndex"); + /**store if we're currently in the middle of a cast */ + x(this, "isCastPending", !1); + /**the version of the Looking Glass Driver that's running */ + x(this, "version"); + x(this, "currentHologram"); + /**a boolean for whether a disconnect was triggered automatically or manually */ + x(this, "manualDisconnect", !1); + x(this, "playState", "STOPPED"); + if (this.orchestration = "", this.isConnected = !1, this.isDisconnecting = !1, this.displays = [], T.eventsource = new rt(), T.fallback = void 0, this.playlists = [], this.currentPlaylistIndex = 0, this.currentPlaylistItemIndex = 0, this.version = { major: 0, minor: 0, patch: 0, hotfix: 0 }, !T.instance) + T.instance = this; + else + return T.instance; + } + static getInstance() { + return T.instance || (T.instance = new T()), T.instance; + } + /** + * A helper function to check and see if Looking Glass Bridge is running or not. + * @returns boolean, true if Bridge is running, false if Bridge is not running + */ + async status() { + this.log("%c function call: status ", "color: magenta; font-weight: bold; border: solid"); + const e = new Promise((t) => { + let s = setTimeout(() => { + clearTimeout(s), t(new Error("Timed out")); + }, 5e3); + }); + try { + const t = await Promise.race([fetch("http://localhost:33334/"), e]); + if (!t.ok) + throw new Error(`HTTP error! status: ${t.status}`); + return !0; + } catch (t) { + return t.message === "Timed out" ? this.warn("Request timed out") : console.warn("Looking Glass Bridge is not running, please start Bridge and try again."), !1; + } + } + /** + * Attempt to connect to Looking Glass Bridge. + * @returns + */ + async connect() { + if (this.log("%c function call: connect ", "color: magenta; font-weight: bold; border: solid"), this.isConnected == !0) + return console.warn("Already connected to Looking Glass Bridge."), { success: !0, response: { version: this.version, orchestration: this.orchestration } }; + if (await this.status() == !1) + return { + success: !1, + response: { version: { major: 0, minor: 0, patch: 0, hotfix: 0 }, orchestration: "" } + }; + if (this.isConnected = !0, (await this.createOrchestration("")).success == !1) { + let s = await this.getVersion(); + if (s.success == !1) + return { success: !1, response: { version: U("0"), orchestration: "" } }; + if (s.response.major < 2 && s.response.minor < 1) + return { success: !1, response: { version: s.response, orchestration: "" } }; + } + return await this.subscribeToEvents(), T.eventsource.connectEvent(), new cs({ client: this }), { success: !0, response: { version: this.version, orchestration: this.orchestration } }; + } + /** + * Creates an orchestration called "default" if one does not already exist. + * @returns string, the name of the current orchestration + */ + async createOrchestration(e) { + var r, a; + if (this.log("%c function call: createOrchestration ", "color: magenta; font-weight: bold; border: solid"), await this.status() == !1) + return { success: !1, response: null }; + const t = await this.getVersion(); + if (t.response.major < 2 && t.response.minor < 1) + return console.error("Unable to get Looking Glass Bridge version, please upgrade Looking Glass Bridge."), { success: !1, response: null }; + let s = await et({ name: e, orchestration: this.orchestration }); + return s.success == !0 && (r = s.response) != null && r.payload.value && (this.orchestration = (a = s.response) == null ? void 0 : a.payload.value), { success: !0, response: this.orchestration }; + } + /** + * Disconnect from Looking Glass Bridge, free up resources. + */ + async disconnect() { + var t, s, r, a; + return this.log("%c function call: disconnect ", "color: magenta; font-weight: bold; border: solid"), this.isDisconnecting == !0 || this.isConnected == !1 ? { success: !1 } : (this.isDisconnecting = !0, this.manualDisconnect = !0, (await tt(this.orchestration)).success == !1 && console.warn(" ⚠️ Unable to exit orchestration, Bridge is not reachable."), (t = T.eventsource) == null || t.disconnectEvent(), (r = (s = T.eventsource) == null ? void 0 : s.ws) == null || r.close(), (a = T.fallback) == null || a.ws.close(), T.fallback = void 0, this.displays = [], this.playlists = [], this.currentHologram = void 0, this.orchestration = "", this.isDisconnecting = !1, this.isCastPending = !1, this.isConnected = !1, { success: !0 }); + } + /** + * changes the state of the Looking Glass Bridge Window + * @param showWindow boolean, true to show the Looking Glass window, false to hide the Looking Glass window + * @returns + */ + async showWindow(e) { + if (this.isConnected == !1) + return { success: !1, response: null }; + this.log("%c function call: showWindow ", "color: magenta; font-weight: bold; border: solid"); + let t = "this call is only supported in bridge 2.2 or newer, please upgrade Looking Glass Bridge."; + if (await this.isVersionCompatible() == !1) + return console.warn(t), { success: !1, response: null }; + const s = { + orchestration: this.orchestration, + show_window: e, + head_index: -1 + }; + let r = await I({ + endpoint: "show_window", + requestBody: s + }); + return r.success == !1 ? { success: !1, response: null } : { success: !0, response: r.response }; + } + /** + * A helper function to get the version of Looking Glass Bridge that is running. + * @returns string of the version of Looking Glass Bridge that is running + */ + async getVersion() { + var t; + this.log("%c function call: getVersion ", "color: magenta; font-weight: bold; border: solid"); + let e = await I({ endpoint: "bridge_version", requestBody: {} }); + if (e.success == !0) { + let s = U(e.response.payload.value); + return this.version = s, { success: !0, response: this.version }; + } else { + let s = await ((t = T.fallback) == null ? void 0 : t.getLegacyVersion()); + return s == null ? { success: !1, response: U("0") } : { success: !0, response: U(s) }; + } + } + /** + * A helper function to get the version of the Looking Glass Bridge API + * @returns the current version of the Looking Glass API + */ + async apiVersion() { + if (this.log("%c function call: apiVersion ", "color: magenta; font-weight: bold; border: solid"), this.isConnected == !1) + return { success: !1, response: U("0") }; + if (await this.isVersionCompatible() == !1) + return { success: !1, response: U("0") }; + let e = await I({ endpoint: "api_version", requestBody: {} }); + return e.success == !1 ? (console.warn("this call is only supported in bridge 2.2 or newer, please upgrade Looking Glass Bridge."), { success: !1, response: U("0") }) : { success: !0, response: U(e.response.payload.value) }; + } + /** + * QueryDisplays finds all displays that are connected to the computer, + * searches for Looking Glass displays, and returns them as an array of Display objects + * @returns the display object + */ + async getDisplays() { + if (this.log("%c function call: displays ", "color: magenta; font-weight: bold; border: solid"), this.displays = [], this.isConnected == !1) + return { success: !1, response: null }; + const e = { + orchestration: this.orchestration + }; + let t = await I({ + endpoint: "available_output_devices", + requestBody: e + }); + if (t.success == !1) + return { success: !1, response: null }; + os.safeParse(t.response); + for (let s in t.response.payload.value) { + let r = t.response.payload.value[`${s}`]; + if (r.value.hwid.value.includes("LKG")) { + let a = Fe(r.value); + a != null && this.displays.push(a); + } + } + return { success: !0, response: this.displays }; + } + /**Delete the instance of the playlist from Bridge, this will stop the playlist from playing if it's active. */ + async deletePlaylist(e) { + if (this.log("%c function call: deletePlaylist ", "color: magenta; font-weight: bold; border: solid"), this.isConnected == !1) + return { success: !1, response: null }; + const t = e.getInstance(this.orchestration); + let s = await I({ + endpoint: "delete_playlist", + requestBody: t + }); + return s.success == !1 ? { success: !1, response: null } : s; + } + /** + * This function will allow you to cast a single hologram to the Looking Glass + * @param hologram + */ + async cast(e) { + var a, o, c; + if (this.isConnected == !1) + return { success: !1 }; + if (this.log("%c function call: cast ", "color: magenta; font-weight: bold; border: solid"), this.isCastPending == !0) + return this.warn("already casting please wait"), { success: !1 }; + this.isCastPending = !0; + let t = "Cast_" + Math.random().toString(36).substring(7), s; + s == null && (s = new Ae({ + name: t, + loop: !0, + items: [], + orchestration: this.orchestration + }), (a = this.playlists) == null || a.push(s)); + let r = s.addItem(e); + if (r !== void 0) + await s.play(), (o = this.playlists) == null || o.forEach((u) => { + var d; + u.name != t && (this.deletePlaylist(u), (d = this.playlists) == null || d.splice(this.playlists.indexOf(u), 1)); + }), this.currentPlaylistIndex = ((c = this.playlists) == null ? void 0 : c.indexOf(s)) ?? 0, this.currentPlaylistItemIndex = r.index; + else + return { success: !1 }; + return this.currentHologram = e, this.isCastPending = !1, { success: !0 }; + } + getCurrentPlaylist() { + var e; + return (e = this.playlists) == null ? void 0 : e[this.currentPlaylistIndex]; + } + async playRemotePlaylist(e, t = 0) { + var a, o, c; + if (!this.isConnected && !(await this.connect()).success) + return { success: !1 }; + if (console.log("%c function call: playRemotePlaylist ", "color: magenta; font-weight: bold; border: solid"), this.isCastPending == !0) + return { success: !1 }; + this.isCastPending = !0; + let s = "Cast_" + Math.random().toString(36).substring(7); + const r = new Ae({ + name: s, + loop: !0, + items: e, + orchestration: this.orchestration + }); + return (a = this.playlists) == null || a.push(r), (o = this.playlists) == null || o.forEach((u) => { + var d; + u.name != s && (this.deletePlaylist(u), (d = this.playlists) == null || d.splice(this.playlists.indexOf(u), 1)); + }), this.currentPlaylistIndex = ((c = this.playlists) == null ? void 0 : c.indexOf(r)) ?? 0, this.currentPlaylistItemIndex = t, this.currentHologram = e[t], this.isCastPending = !1, await r.play(), { success: !0 }; + } + /**Play a Playlist created by Looking Glass Studio, requires the full path to the playlist.json file. */ + async playStudioPlaylist(e) { + if (this.log("%c function call: subscribeToEvents ", "color: magenta; font-weight: bold; border: solid"), this.isConnected == !1) + return { success: !1, response: null }; + const t = { + orchestration: this.orchestration, + name: "Studio Playlist", + playlist_path: e, + loop: !0 + }; + await I({ + endpoint: "instance_studio_playlist", + requestBody: t + }); + const s = { + orchestration: this.orchestration, + name: "Studio Playlist", + head_index: -1 + }; + return { success: !0, response: (await I({ + endpoint: "play_playlist", + requestBody: s + })).response }; + } + /**stop playing the studio playlist */ + async stopStudioPlaylist() { + if (this.log("%c function call: stopStudioPlaylist ", "color: magenta; font-weight: bold; border: solid"), this.isConnected == !1) + return { success: !1 }; + const e = { + orchestration: this.orchestration, + name: "Studio Playlist", + loop: !1 + }; + return (await I({ + endpoint: "delete_playlist", + requestBody: e + })).success == !1 ? { success: !1 } : (await this.showWindow(!1), { success: !0 }); + } + /**Get the current playlist that is set to start automatically */ + async getAutoStartPlaylist() { + if (this.log("%c function call: getAutoStartPlaylist ", "color: magenta; font-weight: bold; border: solid"), this.isConnected == !1) + return { success: !1, response: null }; + let e = { + orchestration: this.orchestration, + head_index: -1 + }, t = await I({ + endpoint: "get_autostart_playlist", + requestBody: e + }); + return t.success == !1 ? { success: !1, response: null } : { success: !0, response: t.response }; + } + /**Choose a Playlist that exists on the local file system to set as the start up playlist */ + async setAutoStartPlaylist(e) { + if (this.log("%c function call: setAutoStartPlaylist ", "color: magenta; font-weight: bold; border: solid"), this.isConnected == !1) + return { success: !1, response: null }; + let t = { + orchestration: this.orchestration, + head_index: -1, + playlist_name: e.playlistName, + playlist_path: e.playlistPath + }, s = await I({ + endpoint: "set_autostart_playlist", + requestBody: t + }); + return s.success == !1 ? { success: !1, response: null } : { success: !0, response: s.response }; + } + /**set a playlist to auto-start, requires that all files are local on the system */ + async createAutoStartPlaylist(e) { + if (this.log("%c function call: createAutoStartPlaylist ", "color: magenta; font-weight: bold; border: solid"), this.isConnected == !1) + return { success: !1, response: null }; + for (let r = 0; r < e.playlist.items.length; r++) + if (e.playlist.items[r].hologram.uri.includes("http")) + return this.warn("playlist contains a web uri, cannot create autostart playlist"), { success: !1, response: null }; + let t = { + orchestration: this.orchestration, + head_index: -1, + playlist_name: e.playlist.name + }, s = await I({ + endpoint: "set_named_autostart_playlist", + requestBody: t + }); + return s.success == !1 ? { success: !1, response: null } : { success: !0, response: s.response }; + } + // TRANSPORT CONTROLS + /**Play the currently instanced playlist */ + async play() { + let e = { + orchestration: this.orchestration + }, t = await I({ + endpoint: "transport_control_play", + requestBody: e + }); + return t.success == !1 ? { success: !1, response: null } : (this.playState = "PLAYING", { success: !0, response: t.response }); + } + /**Pause the currently playing playlist */ + async pause() { + let e = { + orchestration: this.orchestration + }, t = await I({ + endpoint: "transport_control_pause", + requestBody: e + }); + return t.success == !1 ? { success: !1, response: null } : (this.playState = "PAUSED", { success: !0, response: t.response }); + } + /**Got to the next playlist item */ + async next() { + let e = { + orchestration: this.orchestration + }, t = await I({ + endpoint: "transport_control_next", + requestBody: e + }); + if (t.success == !1) + return { success: !1, response: null }; + const s = this.getCurrentPlaylist(), r = s == null ? void 0 : s.loop, a = s == null ? void 0 : s.items.length; + return this.currentPlaylistItemIndex + 1 === a ? r && (this.currentPlaylistItemIndex = 0) : this.currentPlaylistItemIndex++, { success: !0, response: t.response }; + } + /**Go to the previous playlist item */ + async previous() { + let e = { + orchestration: this.orchestration + }, t = await I({ + endpoint: "transport_control_previous", + requestBody: e + }); + if (t.success == !1) + return { success: !1, response: null }; + const s = this.getCurrentPlaylist(), r = s == null ? void 0 : s.loop, a = s == null ? void 0 : s.items.length; + return this.currentPlaylistIndex === 0 ? r && a && (this.currentPlaylistItemIndex = a) : this.currentPlaylistItemIndex--, { success: !0, response: t.response }; + } + /**Seek to a specific item in a playlist */ + async seek(e) { + let t = { + orchestration: this.orchestration, + index: e + }, s = await I({ + endpoint: "transport_control_seek_to_index", + requestBody: t + }); + return s.success == !1 ? { success: !1, response: null } : { success: !0, response: s.response }; + } + /** + * Connect to Looking Glass Bridge's EventSource. + * The event source is a websocket connection that will send events from Bridge to the client. + * @returns the bridge event source + */ + async subscribeToEvents() { + var t; + this.log("%c function call: subscribeToEvents ", "color: magenta; font-weight: bold; border: solid"); + let e = await ((t = T.eventsource) == null ? void 0 : t.connectToBridgeEventSource(this.orchestration)); + return (e == null ? void 0 : e.success) == !0 ? { success: !0 } : { success: !1 }; + } + /** + * Adds an event listener that returns a message from Bridge's websocket based event source. + * @param event the event to listen for + * @param MessageHandler the function to call when the event is received + */ + async addEventListener(e, t) { + T.eventsource == null ? await this.subscribeToEvents() : T.eventsource.addMessageHandler({ event: e, MessageHandler: t }); + } + async removeEventListener(e, t) { + T.eventsource == null ? await this.subscribeToEvents() : T.eventsource.removeMessageHandler({ event: e, MessageHandler: t }); + } + /**Update the parameters of the current hologram */ + async updateCurrentHologram({ name: e, parameter: t, value: s }) { + let r = { + orchestration: this.orchestration, + name: e, + [t]: `${s}` + }, a = await I({ endpoint: "update_current_entry", requestBody: r }); + return a.success == !1 ? { success: !1, response: null } : { success: !0, response: a.response }; + } + getCurrentHologram() { + return this.currentHologram; + } + getVerbosity() { + return T.verbosity; + } + /** + *Set the level of console logging that Bridge.js library will do. + * @param verbosity 0 = no logging, 1 = errors only, 2 = only bridge values, 3 = full bridge response + */ + setVerbosity(e) { + T.verbosity = e; + } + /**Asbtraction for logging with verbosity setting */ + log(...e) { + T.verbosity >= 2 && console.log.apply(console, e); + } + /**Asbtraction for logging with verbosity setting */ + warn(...e) { + T.verbosity >= 1 && console.warn.apply(e); + } + /**Asbtraction for logging with verbosity setting */ + error(...e) { + T.verbosity >= 0 && console.error.apply(e); + } + /** + * helper function for determining if the version of Bridge is valid. + * @returns boolean, true if the version is compatible, false if not + */ + async isVersionCompatible() { + return this.version.major == 0 ? this.isConnected = !1 : this.version.major < 2 && this.version.minor < 1 ? (this.warn("Please update to the latest version for the best experience"), this.isConnected = !1) : this.version.major >= 2 && this.version.minor >= 2 && (this.isConnected = !0), this.isConnected; + } +}; +let E = T; +/** the instance of the client that we create, BridgeClient is a singleton, there can only be one */ +x(E, "instance"), x(E, "fallback"), /** The websocket connection to Bridge's Event Source, this returns information from Bridge */ +x(E, "eventsource"), /**control how often we log to the console, 3 is everything, 0 is nothing */ +x(E, "verbosity"); +const q = (n, e) => i.number().refine((t) => t >= n && t <= e, { + message: `The value should be between ${n} and ${e}` +}), ls = { + min: 0.1, + max: 10, + range: q(0.1, 10), + type: "float" +}, Oe = { + min: 0.1, + max: 4, + range: q(0.1, 4), + type: "float" +}, us = { + min: 0, + max: 1, + range: q(0, 1), + type: "float" +}, ds = { + min: -1, + max: 1, + range: q(-1, 1), + type: "float" +}, hs = { + min: -1, + max: 1, + range: q(-1, 1), + type: "float" +}, Ze = { + min: 0.1, + max: 2, + range: q(0.1, 2), + type: "float" +}, fs = { + min: -0.05, + max: 0.05, + range: q(-0.05, 0.05), + type: "float" +}, ps = { + min: 1, + max: 50, + range: q(1, 50), + type: "int" +}, ms = { + min: 1, + max: 50, + range: q(1, 50), + type: "int" +}, ys = { + min: 1, + max: 2500, + range: q(1, 2500), + type: "int" +}, Rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ + __proto__: null, + ASPECT: ls, + CROP_POS_X: ds, + CROP_POS_Y: hs, + DEPTHINESS: Oe, + DEPTH_CUTOFF: us, + FOCUS: fs, + QUILT_COLS: ms, + QUILT_ROWS: ps, + QUILT_VIEW_COUNT: ys, + ZOOM: Ze +}, Symbol.toStringTag, { value: "Module" })), Ms = i.union([i.literal("quilt"), i.literal("rgbd")]), gs = i.object({ + rows: i.number(), + columns: i.number(), + aspect: i.number(), + viewCount: i.number(), + focus: i.number().optional() +}), vs = i.object({ + /**Aspect Ratio of the hologram, + * this should match the source image you provide, not the RGBD Pair */ + aspect: i.number(), + /**Where are the holograms located? + * 0 Top + * 1 Bottom + * 2 Right + * 3 Left */ + depth_loc: i.union([i.literal(0), i.literal(1), i.literal(2), i.literal(3)]), + /**Is the Depth inverted? 0 for false, 1 for true */ + depth_inversion: i.union([i.literal(0), i.literal(1)]), + /**Is the depth map chroma or grayscale? 0 for false, 1 for true */ + chroma_depth: i.union([i.literal(0), i.literal(1)]), + /**Depthiness can be a value between 0.1 and 2 */ + depthiness: Oe.range, + /**Controls the Focus of the hologram */ + focus: i.number().optional(), + /**Whether or not to cutoff depth beyond a certain point. 0 for false, 1 for true */ + depth_cutoff: i.union([i.literal(1), i.literal(0)]).optional(), + /**Zoom can be between 0.1 and 2 */ + zoom: Ze.range +}), _s = { + quilt: gs, + rgbd: vs +}; +class bs { + constructor(e) { + x(this, "uri"); + x(this, "type"); + x(this, "settings"); + this.uri = e.uri, this.type = "quilt", this.settings = e.settings; + } +} +class xs { + constructor(e) { + x(this, "uri"); + x(this, "type"); + x(this, "settings"); + this.uri = e.uri, this.type = "rgbd", this.settings = e.settings; + } +} +function As({ uri: n, type: e, settings: t }) { + switch (_s[e].safeParse(t), e) { + case "quilt": + return new bs({ uri: n, settings: t }); + case "rgbd": + return new xs({ uri: n, settings: t }); + default: + throw new Error(`Invalid type: ${e}`); + } +} +const Bs = i.union([ + i.literal("focus"), + i.literal("crop_pos_x"), + i.literal("crop_pos_y"), + i.literal("zoom"), + //rgbd specific + i.literal("depth_loc"), + i.literal("depth_inversion"), + i.literal("chroma_depth"), + i.literal("depthiness"), + i.literal("depth_cutoff") +]), Vs = i.object({ + focus: i.number().optional(), + crop_pos_x: i.number().optional(), + crop_pos_y: i.number().optional(), + zoom: Ze.range, + //rgbd specific + depth_loc: i.union([i.literal(0), i.literal(1), i.literal(2), i.literal(3)]), + depth_inversion: i.union([i.literal(0), i.literal(1)]), + chroma_depth: i.union([i.literal(0), i.literal(1)]), + depthiness: Oe.range, + depth_cutoff: i.union([i.literal(1), i.literal(0)]).optional() +}); +export { + E as BridgeClient, + N as MessageHandler, + ks as MonitorConnectedMessageHandler, + Ts as MonitorDisconnectedMessageHandler, + cs as NewItemPlayingMessageHandler, + Ae as Playlist, + Es as PlaylistDeleteMessageHandler, + js as PlaylistInsertMessageHandler, + Ps as PlaylistInstanceMessageHandler, + Cs as ProgressCompletionMessageHandler, + Is as ProgressStartMessageHandler, + Ss as ProgressUpdateMessageHandler, + bs as QuiltHologram, + gs as QuiltHologramArgs, + Re as QuiltPlaylistItem, + xs as RGBDHologram, + vs as RGBDHologramArgs, + Me as RGBDPlaylistItem, + Zs as SyncPlayPlaylistCancelledMessageHandler, + Os as SyncPlayPlaylistCompleteMessageHandler, + Ns as SyncPlayPlaylistMessageHandler, + Rs as defaults, + As as hologramFactory, + _s as hologramMap, + Vs as hologramParamMap, + Ms as hologramTypeSchema, + Bs as parameterNames +}; +//# sourceMappingURL=looking-glass-bridge.mjs.map diff --git a/dist/looking-glass-bridge.mjs.map b/dist/looking-glass-bridge.mjs.map new file mode 100644 index 0000000..5a783d4 --- /dev/null +++ b/dist/looking-glass-bridge.mjs.map @@ -0,0 +1 @@ +{"version":3,"file":"looking-glass-bridge.mjs","sources":["../src/library/components/displays.ts","../src/library/components/endpoints.ts","../src/library/components/orchestration.ts","../src/library/components/eventsource.ts","../src/library/playlists/playlistItems.ts","../src/library/playlists/playlist.ts","../node_modules/zod/lib/index.mjs","../src/library/schemas/schema.ts","../src/library/schemas/schema.responses.ts","../src/library/components/messageHandler.ts","../src/library/utilities/general.utils.ts","../src/library/client/BridgeClient.ts","../src/library/schemas/schema.utils.ts","../src/library/schemas/defaults.ts","../src/library/schemas/schema.hologram.ts","../src/library/components/hologram.ts","../src/library/schemas/schema.parameters.ts"],"sourcesContent":["export function tryParseCalibration(value) {\n const parsedValue = JSON.parse(value);\n if (parsedValue == undefined) {\n console.warn(\"Unable to parse calibration\");\n return null;\n }\n const calibration = {\n DPI: parsedValue.DPI.value,\n center: parsedValue.center.value,\n configVersion: parsedValue.configVersion,\n flipImageX: parsedValue.flipImageX.value,\n flipImageY: parsedValue.flipImageY.value,\n flipSubp: parsedValue.flipSubp.value,\n fringe: parsedValue.fringe.value,\n invView: parsedValue.invView.value,\n pitch: parsedValue.pitch.value,\n screenH: parsedValue.screenH.value,\n screenW: parsedValue.screenW.value,\n serial: parsedValue.serial,\n slope: parsedValue.slope.value,\n verticalAngle: parsedValue.verticalAngle.value,\n viewCone: parsedValue.viewCone.value,\n };\n return calibration;\n}\nexport function tryParseQuilt(value) {\n const parsedValue = JSON.parse(value);\n if (parsedValue == undefined) {\n return null;\n }\n const quilt = {\n quiltAspect: parsedValue.quiltAspect,\n quiltWidth: parsedValue.quiltX,\n quiltHeight: parsedValue.quiltY,\n rows: parsedValue.tileY,\n columns: parsedValue.tileX,\n };\n return quilt;\n}\nexport function tryParseDisplay(value) {\n const display = {\n calibration: tryParseCalibration(value.calibration.value),\n defaultQuilt: tryParseQuilt(value.defaultQuilt.value),\n hardwareVersion: value.hardwareVersion.value,\n index: value.index.value,\n state: value.state.value,\n windowCoords: value.windowCoords.value,\n };\n return display;\n}\n","import { BridgeClient } from \"..\";\n/**\n *\n * @param endpoint the bridge endpoint to send the message to, defined in BridgeEndpointType\n * @param requestBody Optional, the Json body to send to Bridge, defaults to empty Json\n * The requestbody is a json object that has been stringified. For example:\n * const requestBody = {\n * \torchestration: this.orchestration,\n * }\n * @param baseUrl Optional, the localhost url that bridge uses, defaults to http://localhost:33334/\n * @returns the response from the bridge endpoint, as a json object\n */\nexport async function sendMessage(params) {\n let parsedResponse;\n let Bridge = BridgeClient.getInstance();\n if (Bridge.getVerbosity() >= 3 && Bridge.getVerbosity() !== undefined) {\n console.group(\"Endpoint:\", params.endpoint);\n }\n // TEMPORARY: delay to give bridge a chance to handle events\n await new Promise((resolve) => setTimeout(resolve, 10));\n if (params.baseUrl == undefined) {\n params.baseUrl = \"http://localhost:33334/\";\n }\n if (Bridge.getVerbosity() == 3) {\n console.group(\"Message:\");\n Bridge.log(`${params.baseUrl + params.endpoint}`);\n Bridge.log(\"body:\", params.requestBody);\n console.groupEnd();\n }\n const request = {\n method: \"PUT\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(params.requestBody),\n };\n try {\n let bridgeResponse = await fetch(`${params.baseUrl + params.endpoint}`, request);\n if (!bridgeResponse.ok) {\n return { success: false, response: null };\n }\n //if response timed out, exit\n if (bridgeResponse.status == 408) {\n Bridge.warn(\"%c Bridge Timeout:\", \"color: #ff0000\", bridgeResponse);\n console.groupEnd();\n }\n parsedResponse = await bridgeResponse.json();\n if (parsedResponse.status.value !== \"Completion\" && parsedResponse.status.value !== \"Pending\") {\n console.warn(\"%c Bridge Failure:\", \"color: #ff0000\", parsedResponse);\n console.groupEnd();\n // the call worked, but the response failed.\n return { success: true, response: parsedResponse };\n }\n Bridge.log(\"%c Response:\", \"color: #00aa00\", parsedResponse);\n console.groupEnd();\n return { success: true, response: parsedResponse };\n }\n catch (error) {\n console.group(\"%c Bridge Error:\", \"color: #ff0000\");\n console.error(\"Bridge Error\", error);\n console.groupEnd();\n console.groupEnd();\n return { success: false, response: null };\n }\n}\n","import { BridgeClient } from \"..\";\nimport { sendMessage } from \"./endpoints\";\n/**\n * this function will attempt to enter an orchestration\n * @param name\n * @returns\n */\nexport async function tryEnterOrchestration({ name, orchestration }) {\n let Bridge = BridgeClient.getInstance();\n Bridge.log(\"%c function call: tryEnterOrchestration \", \"color: magenta; font-weight: bold; border: solid\");\n if (name == undefined || name == \"\") {\n name = \"default\";\n }\n // if we're already in an orchestration, exit it\n if (orchestration !== \"\" && orchestration !== undefined) {\n return { success: false, response: null };\n }\n // a new orchestration will be created if the name is different.\n let requestBody = {\n name: name,\n };\n let message = await sendMessage({\n endpoint: \"enter_orchestration\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n console.error(\"failed to enter orchestration\", message);\n return { success: false, response: null };\n }\n console.groupEnd();\n return { success: true, response: message.response };\n}\nexport async function tryExitOrchestration(orchestration) {\n let body = {\n orchestration: orchestration,\n };\n let timeout = new Promise((reject) => {\n let id = setTimeout(() => {\n clearTimeout(id);\n reject({ success: false, response: null });\n }, 5000);\n });\n let message = await Promise.race([\n sendMessage({\n endpoint: \"exit_orchestration\",\n requestBody: body,\n }),\n timeout,\n ]);\n if (!message || message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n}\n","import { BridgeClient } from \"..\";\nfunction isWindowAvailable() {\n if (window !== undefined) {\n return true;\n }\n else {\n console.error(\"Window is unavailable!\");\n return false;\n }\n}\nfunction isWebSocketAvailable() {\n if (\"WebSocket\" in window) {\n return true;\n }\n else {\n console.error(\"WebSocket NOT supported by your Browser!\");\n return false;\n }\n}\n/**\n * Attempt to establish a connection to Looking Glass Bridge's websocket connection.\n * the websocket connection will send events from Bridge to the client.\n * @param orchestration\n * @returns\n */\nexport class BridgeEventSource {\n eventSource;\n MessageHandler;\n ws;\n constructor() {\n this.eventSource = undefined;\n this.MessageHandler = {};\n this.ws = undefined;\n }\n /**\n * adds a new message handler object to the BridgeEventSource class\n * @param event the event name to listen for\n * @param MessageHandler the function to call when the event is received\n */\n addMessageHandler({ event, MessageHandler, }) {\n const client = BridgeClient.getInstance();\n // The WebSocket is connected, we can add the event handler directly\n if (!(event in this.MessageHandler)) {\n this.MessageHandler[event] = [];\n }\n this.MessageHandler[event]?.push(MessageHandler);\n client.log(`%c Add Message Handler: ${event} `, \"color: YellowGreen; font-weight: bold; border: solid;\");\n }\n removeMessageHandler({ event, MessageHandler, }) {\n const client = BridgeClient.getInstance();\n client.log(`%c Message Handler Removed: ${event} `, \"color: Tomato; font-weight: bold; border: solid;\");\n if (event in this.MessageHandler) {\n const handlerIndex = this.MessageHandler[event]?.findIndex((handler) => handler === MessageHandler);\n if (handlerIndex !== -1 && handlerIndex !== undefined) {\n this.MessageHandler[event]?.splice(handlerIndex, 1);\n }\n }\n }\n callMessageHandler(response) {\n let parsedResponse;\n try {\n parsedResponse = JSON.parse(response);\n }\n catch (error) {\n const client = BridgeClient.getInstance();\n client.error(\"Failed to parse JSON\", error);\n return;\n }\n if (parsedResponse.payload.value.event.value in this.MessageHandler) {\n const handlers = this.MessageHandler[parsedResponse.payload.value.event.value];\n if (handlers) {\n handlers.forEach((handler) => handler(parsedResponse));\n }\n }\n }\n connectEvent() {\n const handlers = this.MessageHandler[\"Bridge Connected\"];\n if (handlers) {\n handlers.forEach((handler) => handler(undefined));\n }\n }\n disconnectEvent() {\n const handlers = this.MessageHandler[\"Bridge Disconnected\"];\n if (handlers) {\n handlers.forEach((handler) => handler(undefined));\n }\n }\n async connectToBridgeEventSource(orchestration) {\n const client = BridgeClient.getInstance();\n client.log(\"%c Connect to Bridge Events Source \", \"color: chartreuse; font-weight: bold; border: solid\");\n if (!isWindowAvailable())\n return { success: false };\n if (!isWebSocketAvailable())\n return { success: false };\n let bridgeEventSource = this;\n // provided we have web socket support, we can proceed to query Bridge\n this.ws = new WebSocket(\"ws://localhost:9724/event_source\");\n return new Promise((resolve) => {\n if (this.ws !== undefined) {\n this.ws.onopen = () => {\n const client = BridgeClient.getInstance();\n client.log(\"%c Connected to Websocket \", \"color: chartreuse; font-weight: bold; border: solid\");\n const params = {\n subscribe_orchestration_events: orchestration,\n };\n this.ws?.send(JSON.stringify(params));\n resolve({ success: true });\n };\n this.ws.onmessage = function (evt) {\n bridgeEventSource.callMessageHandler(evt.data);\n };\n this.ws.onclose = function () {\n const client = BridgeClient.getInstance();\n if (!client.manualDisconnect) {\n client.disconnect();\n }\n client.log(`%c Disconnected from Websocket, Manual Disconnect: ${client.manualDisconnect} `, \"color: red; font-weight: bold; border: solid\");\n };\n this.ws.onerror = function (error) {\n client.warn(\"Unable to connect to WebSocket, is Bridge Running?\", error);\n resolve({ success: false });\n };\n }\n });\n }\n}\n","/**Playist items are what we actually end up sending to Bridge.\n * These are managed by the Playlist class, and should not be called externally.\n * We take the hologram object the user creates and prepare it to be added to a playlist with the toBridge function. */\nclass PlaylistItem {\n orchestration;\n hologram;\n id;\n index;\n playlistName;\n constructor(args) {\n this.hologram = args.hologram;\n this.id = args.id;\n this.index = args.index;\n this.playlistName = args.playlistName;\n this.orchestration = args.orchestration;\n }\n toBridge() {\n let playlistItem;\n if (this.hologram.type == \"quilt\") {\n const settings = this.hologram.settings;\n playlistItem = {\n orchestration: this.orchestration,\n id: this.id,\n name: this.playlistName,\n index: this.index,\n uri: this.hologram.uri,\n rows: settings.rows,\n cols: settings.columns,\n focus: settings.focus ? settings.focus : 0,\n aspect: settings.aspect,\n view_count: settings.viewCount,\n isRGBD: 0,\n };\n return playlistItem;\n }\n else if (this.hologram.type == \"rgbd\") {\n const settings = this.hologram.settings;\n playlistItem = {\n orchestration: this.orchestration,\n id: this.id,\n name: this.playlistName,\n index: this.index,\n uri: this.hologram.uri,\n rows: 8,\n cols: 13,\n focus: settings.focus ? settings.focus : 0,\n aspect: settings.aspect,\n view_count: 8 * 13,\n isRGBD: 1,\n depth_loc: settings.depth_loc,\n depth_inversion: settings.depth_inversion,\n chroma_depth: settings.chroma_depth,\n depthiness: settings.depthiness,\n zoom: settings.zoom,\n };\n return playlistItem;\n }\n throw new Error(\"Invalid hologram type\");\n }\n}\nexport class QuiltPlaylistItem extends PlaylistItem {\n constructor(args) {\n super(args);\n }\n}\nexport class RGBDPlaylistItem extends PlaylistItem {\n constructor(args) {\n super(args);\n }\n}\n","import { sendMessage } from \"../components/endpoints\";\nimport { RGBDPlaylistItem, QuiltPlaylistItem } from \"./playlistItems\";\n/**\n * Playlist class\n * @class\n *\n */\nexport class Playlist {\n name;\n loop;\n items;\n orchestration;\n constructor(args) {\n this.name = args.name;\n this.loop = args.loop;\n this.orchestration = args.orchestration;\n if (args.items) {\n this.items = args.items?.map((item, index) => {\n if (item.type == \"quilt\") {\n return new QuiltPlaylistItem({\n hologram: item,\n id: index,\n index: index,\n playlistName: this.name,\n orchestration: this.orchestration,\n });\n }\n else if (item.type == \"rgbd\") {\n return new RGBDPlaylistItem({\n hologram: item,\n id: index,\n index: index,\n playlistName: this.name,\n orchestration: this.orchestration,\n });\n }\n }).filter((item) => !!item);\n }\n else\n this.items = [];\n }\n setName(name) {\n this.name = name;\n }\n addItem(hologram) {\n let item;\n if (hologram.type == \"quilt\") {\n item = new QuiltPlaylistItem({\n hologram: hologram,\n id: this.items.length,\n index: this.items.length,\n playlistName: this.name,\n orchestration: this.orchestration,\n });\n this.items.push(item);\n return item;\n }\n else if (hologram.type == \"rgbd\") {\n item = new RGBDPlaylistItem({\n hologram: hologram,\n id: this.items.length,\n index: this.items.length,\n playlistName: this.name,\n orchestration: this.orchestration,\n });\n this.items.push(item);\n return item;\n }\n else {\n return undefined;\n }\n }\n async addPlaylistItemToBridge(item) {\n const pRequestBody = item.toBridge();\n let message = await sendMessage({ endpoint: \"insert_playlist_entry\", requestBody: pRequestBody });\n if (message.success == false) {\n console.error(\"failed to insert playlist entry\");\n return false;\n }\n else {\n return true;\n }\n }\n removeItem(item) {\n if (item.id == undefined)\n return;\n this.items.splice(item.id, 1);\n for (let i = 0; i < this.items.length; i++) {\n this.items[i].id = i;\n }\n }\n clearItems() {\n this.items = [];\n }\n /**\n * gets the object for the current playlist that is currently being played\n * @param orchestration\n * @param head\n * @returns\n */\n getCurrent({ orchestration, head }) {\n const content = {\n orchestration: orchestration,\n name: this.name,\n head_index: head,\n };\n return content;\n }\n /**\n * create the json object for the playlist instance\n * @param orchestration\n * @returns\n */\n getInstance(orchestration) {\n const content = { orchestration: orchestration, name: this.name, loop: this.loop };\n return content;\n }\n /**\n * this function will play a playlist on a Looking Glass display\n * the playlist must be created and populated with content before calling this function\n * @param playlist\n * @param head\n * @returns\n */\n async play({ head } = {}) {\n let orchestration = this.orchestration;\n const requestBody = this.getInstance(this.orchestration);\n if (!head) {\n head = -1;\n }\n let instancePlaylist = await sendMessage({ endpoint: \"instance_playlist\", requestBody: requestBody });\n if (instancePlaylist.success == false) {\n console.error(\"failed to initialize playlist\");\n return false;\n }\n const PlaylistItems = this.items;\n if (instancePlaylist.success == true) {\n if (orchestration !== undefined) {\n for (let i = 0; i < PlaylistItems.length; i++) {\n PlaylistItems[i].orchestration = this.orchestration;\n const pRequestBody = PlaylistItems[i].toBridge();\n let message = await sendMessage({ endpoint: \"insert_playlist_entry\", requestBody: pRequestBody });\n if (message.success == false) {\n console.error(\"failed to insert playlist entry\");\n return false;\n }\n }\n }\n }\n const playRequestBody = this.getCurrent({ orchestration, head });\n let play_playlist = await sendMessage({\n endpoint: \"play_playlist\",\n requestBody: playRequestBody,\n });\n if (play_playlist.success == false) {\n return false;\n }\n return true;\n }\n}\n","var util;\n(function (util) {\n util.assertEqual = (val) => val;\n function assertIs(_arg) { }\n util.assertIs = assertIs;\n function assertNever(_x) {\n throw new Error();\n }\n util.assertNever = assertNever;\n util.arrayToEnum = (items) => {\n const obj = {};\n for (const item of items) {\n obj[item] = item;\n }\n return obj;\n };\n util.getValidEnumValues = (obj) => {\n const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n const filtered = {};\n for (const k of validKeys) {\n filtered[k] = obj[k];\n }\n return util.objectValues(filtered);\n };\n util.objectValues = (obj) => {\n return util.objectKeys(obj).map(function (e) {\n return obj[e];\n });\n };\n util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n : (object) => {\n const keys = [];\n for (const key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n keys.push(key);\n }\n }\n return keys;\n };\n util.find = (arr, checker) => {\n for (const item of arr) {\n if (checker(item))\n return item;\n }\n return undefined;\n };\n util.isInteger = typeof Number.isInteger === \"function\"\n ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n : (val) => typeof val === \"number\" && isFinite(val) && Math.floor(val) === val;\n function joinValues(array, separator = \" | \") {\n return array\n .map((val) => (typeof val === \"string\" ? `'${val}'` : val))\n .join(separator);\n }\n util.joinValues = joinValues;\n util.jsonStringifyReplacer = (_, value) => {\n if (typeof value === \"bigint\") {\n return value.toString();\n }\n return value;\n };\n})(util || (util = {}));\nvar objectUtil;\n(function (objectUtil) {\n objectUtil.mergeShapes = (first, second) => {\n return {\n ...first,\n ...second, // second overwrites first\n };\n };\n})(objectUtil || (objectUtil = {}));\nconst ZodParsedType = util.arrayToEnum([\n \"string\",\n \"nan\",\n \"number\",\n \"integer\",\n \"float\",\n \"boolean\",\n \"date\",\n \"bigint\",\n \"symbol\",\n \"function\",\n \"undefined\",\n \"null\",\n \"array\",\n \"object\",\n \"unknown\",\n \"promise\",\n \"void\",\n \"never\",\n \"map\",\n \"set\",\n]);\nconst getParsedType = (data) => {\n const t = typeof data;\n switch (t) {\n case \"undefined\":\n return ZodParsedType.undefined;\n case \"string\":\n return ZodParsedType.string;\n case \"number\":\n return isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n case \"boolean\":\n return ZodParsedType.boolean;\n case \"function\":\n return ZodParsedType.function;\n case \"bigint\":\n return ZodParsedType.bigint;\n case \"symbol\":\n return ZodParsedType.symbol;\n case \"object\":\n if (Array.isArray(data)) {\n return ZodParsedType.array;\n }\n if (data === null) {\n return ZodParsedType.null;\n }\n if (data.then &&\n typeof data.then === \"function\" &&\n data.catch &&\n typeof data.catch === \"function\") {\n return ZodParsedType.promise;\n }\n if (typeof Map !== \"undefined\" && data instanceof Map) {\n return ZodParsedType.map;\n }\n if (typeof Set !== \"undefined\" && data instanceof Set) {\n return ZodParsedType.set;\n }\n if (typeof Date !== \"undefined\" && data instanceof Date) {\n return ZodParsedType.date;\n }\n return ZodParsedType.object;\n default:\n return ZodParsedType.unknown;\n }\n};\n\nconst ZodIssueCode = util.arrayToEnum([\n \"invalid_type\",\n \"invalid_literal\",\n \"custom\",\n \"invalid_union\",\n \"invalid_union_discriminator\",\n \"invalid_enum_value\",\n \"unrecognized_keys\",\n \"invalid_arguments\",\n \"invalid_return_type\",\n \"invalid_date\",\n \"invalid_string\",\n \"too_small\",\n \"too_big\",\n \"invalid_intersection_types\",\n \"not_multiple_of\",\n \"not_finite\",\n]);\nconst quotelessJson = (obj) => {\n const json = JSON.stringify(obj, null, 2);\n return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nclass ZodError extends Error {\n constructor(issues) {\n super();\n this.issues = [];\n this.addIssue = (sub) => {\n this.issues = [...this.issues, sub];\n };\n this.addIssues = (subs = []) => {\n this.issues = [...this.issues, ...subs];\n };\n const actualProto = new.target.prototype;\n if (Object.setPrototypeOf) {\n // eslint-disable-next-line ban/ban\n Object.setPrototypeOf(this, actualProto);\n }\n else {\n this.__proto__ = actualProto;\n }\n this.name = \"ZodError\";\n this.issues = issues;\n }\n get errors() {\n return this.issues;\n }\n format(_mapper) {\n const mapper = _mapper ||\n function (issue) {\n return issue.message;\n };\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\") {\n issue.unionErrors.map(processError);\n }\n else if (issue.code === \"invalid_return_type\") {\n processError(issue.returnTypeError);\n }\n else if (issue.code === \"invalid_arguments\") {\n processError(issue.argumentsError);\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n // if (typeof el === \"string\") {\n // curr[el] = curr[el] || { _errors: [] };\n // } else if (typeof el === \"number\") {\n // const errorArray: any = [];\n // errorArray._errors = [];\n // curr[el] = curr[el] || errorArray;\n // }\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(this);\n return fieldErrors;\n }\n toString() {\n return this.message;\n }\n get message() {\n return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n }\n get isEmpty() {\n return this.issues.length === 0;\n }\n flatten(mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of this.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n }\n get formErrors() {\n return this.flatten();\n }\n}\nZodError.create = (issues) => {\n const error = new ZodError(issues);\n return error;\n};\n\nconst errorMap = (issue, _ctx) => {\n let message;\n switch (issue.code) {\n case ZodIssueCode.invalid_type:\n if (issue.received === ZodParsedType.undefined) {\n message = \"Required\";\n }\n else {\n message = `Expected ${issue.expected}, received ${issue.received}`;\n }\n break;\n case ZodIssueCode.invalid_literal:\n message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n break;\n case ZodIssueCode.unrecognized_keys:\n message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n break;\n case ZodIssueCode.invalid_union:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_union_discriminator:\n message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n break;\n case ZodIssueCode.invalid_enum_value:\n message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n break;\n case ZodIssueCode.invalid_arguments:\n message = `Invalid function arguments`;\n break;\n case ZodIssueCode.invalid_return_type:\n message = `Invalid function return type`;\n break;\n case ZodIssueCode.invalid_date:\n message = `Invalid date`;\n break;\n case ZodIssueCode.invalid_string:\n if (typeof issue.validation === \"object\") {\n if (\"includes\" in issue.validation) {\n message = `Invalid input: must include \"${issue.validation.includes}\"`;\n if (typeof issue.validation.position === \"number\") {\n message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n }\n }\n else if (\"startsWith\" in issue.validation) {\n message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n }\n else if (\"endsWith\" in issue.validation) {\n message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n }\n else {\n util.assertNever(issue.validation);\n }\n }\n else if (issue.validation !== \"regex\") {\n message = `Invalid ${issue.validation}`;\n }\n else {\n message = \"Invalid\";\n }\n break;\n case ZodIssueCode.too_small:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${issue.minimum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly equal to `\n : issue.inclusive\n ? `greater than or equal to `\n : `greater than `}${new Date(Number(issue.minimum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.too_big:\n if (issue.type === \"array\")\n message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n else if (issue.type === \"string\")\n message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n else if (issue.type === \"number\")\n message = `Number must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"bigint\")\n message = `BigInt must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `less than or equal to`\n : `less than`} ${issue.maximum}`;\n else if (issue.type === \"date\")\n message = `Date must be ${issue.exact\n ? `exactly`\n : issue.inclusive\n ? `smaller than or equal to`\n : `smaller than`} ${new Date(Number(issue.maximum))}`;\n else\n message = \"Invalid input\";\n break;\n case ZodIssueCode.custom:\n message = `Invalid input`;\n break;\n case ZodIssueCode.invalid_intersection_types:\n message = `Intersection results could not be merged`;\n break;\n case ZodIssueCode.not_multiple_of:\n message = `Number must be a multiple of ${issue.multipleOf}`;\n break;\n case ZodIssueCode.not_finite:\n message = \"Number must be finite\";\n break;\n default:\n message = _ctx.defaultError;\n util.assertNever(issue);\n }\n return { message };\n};\n\nlet overrideErrorMap = errorMap;\nfunction setErrorMap(map) {\n overrideErrorMap = map;\n}\nfunction getErrorMap() {\n return overrideErrorMap;\n}\n\nconst makeIssue = (params) => {\n const { data, path, errorMaps, issueData } = params;\n const fullPath = [...path, ...(issueData.path || [])];\n const fullIssue = {\n ...issueData,\n path: fullPath,\n };\n let errorMessage = \"\";\n const maps = errorMaps\n .filter((m) => !!m)\n .slice()\n .reverse();\n for (const map of maps) {\n errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n }\n return {\n ...issueData,\n path: fullPath,\n message: issueData.message || errorMessage,\n };\n};\nconst EMPTY_PATH = [];\nfunction addIssueToContext(ctx, issueData) {\n const issue = makeIssue({\n issueData: issueData,\n data: ctx.data,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap, // then global default map\n ].filter((x) => !!x),\n });\n ctx.common.issues.push(issue);\n}\nclass ParseStatus {\n constructor() {\n this.value = \"valid\";\n }\n dirty() {\n if (this.value === \"valid\")\n this.value = \"dirty\";\n }\n abort() {\n if (this.value !== \"aborted\")\n this.value = \"aborted\";\n }\n static mergeArray(status, results) {\n const arrayValue = [];\n for (const s of results) {\n if (s.status === \"aborted\")\n return INVALID;\n if (s.status === \"dirty\")\n status.dirty();\n arrayValue.push(s.value);\n }\n return { status: status.value, value: arrayValue };\n }\n static async mergeObjectAsync(status, pairs) {\n const syncPairs = [];\n for (const pair of pairs) {\n syncPairs.push({\n key: await pair.key,\n value: await pair.value,\n });\n }\n return ParseStatus.mergeObjectSync(status, syncPairs);\n }\n static mergeObjectSync(status, pairs) {\n const finalObject = {};\n for (const pair of pairs) {\n const { key, value } = pair;\n if (key.status === \"aborted\")\n return INVALID;\n if (value.status === \"aborted\")\n return INVALID;\n if (key.status === \"dirty\")\n status.dirty();\n if (value.status === \"dirty\")\n status.dirty();\n if (typeof value.value !== \"undefined\" || pair.alwaysSet) {\n finalObject[key.value] = value.value;\n }\n }\n return { status: status.value, value: finalObject };\n }\n}\nconst INVALID = Object.freeze({\n status: \"aborted\",\n});\nconst DIRTY = (value) => ({ status: \"dirty\", value });\nconst OK = (value) => ({ status: \"valid\", value });\nconst isAborted = (x) => x.status === \"aborted\";\nconst isDirty = (x) => x.status === \"dirty\";\nconst isValid = (x) => x.status === \"valid\";\nconst isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n\nvar errorUtil;\n(function (errorUtil) {\n errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n errorUtil.toString = (message) => typeof message === \"string\" ? message : message === null || message === void 0 ? void 0 : message.message;\n})(errorUtil || (errorUtil = {}));\n\nclass ParseInputLazyPath {\n constructor(parent, value, path, key) {\n this._cachedPath = [];\n this.parent = parent;\n this.data = value;\n this._path = path;\n this._key = key;\n }\n get path() {\n if (!this._cachedPath.length) {\n if (this._key instanceof Array) {\n this._cachedPath.push(...this._path, ...this._key);\n }\n else {\n this._cachedPath.push(...this._path, this._key);\n }\n }\n return this._cachedPath;\n }\n}\nconst handleResult = (ctx, result) => {\n if (isValid(result)) {\n return { success: true, data: result.value };\n }\n else {\n if (!ctx.common.issues.length) {\n throw new Error(\"Validation failed but no issues detected.\");\n }\n return {\n success: false,\n get error() {\n if (this._error)\n return this._error;\n const error = new ZodError(ctx.common.issues);\n this._error = error;\n return this._error;\n },\n };\n }\n};\nfunction processCreateParams(params) {\n if (!params)\n return {};\n const { errorMap, invalid_type_error, required_error, description } = params;\n if (errorMap && (invalid_type_error || required_error)) {\n throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n }\n if (errorMap)\n return { errorMap: errorMap, description };\n const customMap = (iss, ctx) => {\n if (iss.code !== \"invalid_type\")\n return { message: ctx.defaultError };\n if (typeof ctx.data === \"undefined\") {\n return { message: required_error !== null && required_error !== void 0 ? required_error : ctx.defaultError };\n }\n return { message: invalid_type_error !== null && invalid_type_error !== void 0 ? invalid_type_error : ctx.defaultError };\n };\n return { errorMap: customMap, description };\n}\nclass ZodType {\n constructor(def) {\n /** Alias of safeParseAsync */\n this.spa = this.safeParseAsync;\n this._def = def;\n this.parse = this.parse.bind(this);\n this.safeParse = this.safeParse.bind(this);\n this.parseAsync = this.parseAsync.bind(this);\n this.safeParseAsync = this.safeParseAsync.bind(this);\n this.spa = this.spa.bind(this);\n this.refine = this.refine.bind(this);\n this.refinement = this.refinement.bind(this);\n this.superRefine = this.superRefine.bind(this);\n this.optional = this.optional.bind(this);\n this.nullable = this.nullable.bind(this);\n this.nullish = this.nullish.bind(this);\n this.array = this.array.bind(this);\n this.promise = this.promise.bind(this);\n this.or = this.or.bind(this);\n this.and = this.and.bind(this);\n this.transform = this.transform.bind(this);\n this.brand = this.brand.bind(this);\n this.default = this.default.bind(this);\n this.catch = this.catch.bind(this);\n this.describe = this.describe.bind(this);\n this.pipe = this.pipe.bind(this);\n this.isNullable = this.isNullable.bind(this);\n this.isOptional = this.isOptional.bind(this);\n }\n get description() {\n return this._def.description;\n }\n _getType(input) {\n return getParsedType(input.data);\n }\n _getOrReturnCtx(input, ctx) {\n return (ctx || {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n });\n }\n _processInputParams(input) {\n return {\n status: new ParseStatus(),\n ctx: {\n common: input.parent.common,\n data: input.data,\n parsedType: getParsedType(input.data),\n schemaErrorMap: this._def.errorMap,\n path: input.path,\n parent: input.parent,\n },\n };\n }\n _parseSync(input) {\n const result = this._parse(input);\n if (isAsync(result)) {\n throw new Error(\"Synchronous parse encountered promise.\");\n }\n return result;\n }\n _parseAsync(input) {\n const result = this._parse(input);\n return Promise.resolve(result);\n }\n parse(data, params) {\n const result = this.safeParse(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n safeParse(data, params) {\n var _a;\n const ctx = {\n common: {\n issues: [],\n async: (_a = params === null || params === void 0 ? void 0 : params.async) !== null && _a !== void 0 ? _a : false,\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n return handleResult(ctx, result);\n }\n async parseAsync(data, params) {\n const result = await this.safeParseAsync(data, params);\n if (result.success)\n return result.data;\n throw result.error;\n }\n async safeParseAsync(data, params) {\n const ctx = {\n common: {\n issues: [],\n contextualErrorMap: params === null || params === void 0 ? void 0 : params.errorMap,\n async: true,\n },\n path: (params === null || params === void 0 ? void 0 : params.path) || [],\n schemaErrorMap: this._def.errorMap,\n parent: null,\n data,\n parsedType: getParsedType(data),\n };\n const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n const result = await (isAsync(maybeAsyncResult)\n ? maybeAsyncResult\n : Promise.resolve(maybeAsyncResult));\n return handleResult(ctx, result);\n }\n refine(check, message) {\n const getIssueProperties = (val) => {\n if (typeof message === \"string\" || typeof message === \"undefined\") {\n return { message };\n }\n else if (typeof message === \"function\") {\n return message(val);\n }\n else {\n return message;\n }\n };\n return this._refinement((val, ctx) => {\n const result = check(val);\n const setError = () => ctx.addIssue({\n code: ZodIssueCode.custom,\n ...getIssueProperties(val),\n });\n if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n return result.then((data) => {\n if (!data) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n if (!result) {\n setError();\n return false;\n }\n else {\n return true;\n }\n });\n }\n refinement(check, refinementData) {\n return this._refinement((val, ctx) => {\n if (!check(val)) {\n ctx.addIssue(typeof refinementData === \"function\"\n ? refinementData(val, ctx)\n : refinementData);\n return false;\n }\n else {\n return true;\n }\n });\n }\n _refinement(refinement) {\n return new ZodEffects({\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"refinement\", refinement },\n });\n }\n superRefine(refinement) {\n return this._refinement(refinement);\n }\n optional() {\n return ZodOptional.create(this, this._def);\n }\n nullable() {\n return ZodNullable.create(this, this._def);\n }\n nullish() {\n return this.nullable().optional();\n }\n array() {\n return ZodArray.create(this, this._def);\n }\n promise() {\n return ZodPromise.create(this, this._def);\n }\n or(option) {\n return ZodUnion.create([this, option], this._def);\n }\n and(incoming) {\n return ZodIntersection.create(this, incoming, this._def);\n }\n transform(transform) {\n return new ZodEffects({\n ...processCreateParams(this._def),\n schema: this,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect: { type: \"transform\", transform },\n });\n }\n default(def) {\n const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodDefault({\n ...processCreateParams(this._def),\n innerType: this,\n defaultValue: defaultValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n });\n }\n brand() {\n return new ZodBranded({\n typeName: ZodFirstPartyTypeKind.ZodBranded,\n type: this,\n ...processCreateParams(this._def),\n });\n }\n catch(def) {\n const catchValueFunc = typeof def === \"function\" ? def : () => def;\n return new ZodCatch({\n ...processCreateParams(this._def),\n innerType: this,\n catchValue: catchValueFunc,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n });\n }\n describe(description) {\n const This = this.constructor;\n return new This({\n ...this._def,\n description,\n });\n }\n pipe(target) {\n return ZodPipeline.create(this, target);\n }\n isOptional() {\n return this.safeParse(undefined).success;\n }\n isNullable() {\n return this.safeParse(null).success;\n }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[a-z][a-z0-9]*$/;\nconst ulidRegex = /[0-9A-HJKMNP-TV-Z]{26}/;\nconst uuidRegex = /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\nconst emailRegex = /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\])|(\\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst emojiRegex = /^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$/u;\nconst ipv4Regex = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;\nconst ipv6Regex = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;\n// Adapted from https://stackoverflow.com/a/3143231\nconst datetimeRegex = (args) => {\n if (args.precision) {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}\\\\.\\\\d{${args.precision}}Z$`);\n }\n }\n else if (args.precision === 0) {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}Z$`);\n }\n }\n else {\n if (args.offset) {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?(([+-]\\\\d{2}(:?\\\\d{2})?)|Z)$`);\n }\n else {\n return new RegExp(`^\\\\d{4}-\\\\d{2}-\\\\d{2}T\\\\d{2}:\\\\d{2}:\\\\d{2}(\\\\.\\\\d+)?Z$`);\n }\n }\n};\nfunction isValidIP(ip, version) {\n if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n return true;\n }\n if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n return true;\n }\n return false;\n}\nclass ZodString extends ZodType {\n constructor() {\n super(...arguments);\n this._regex = (regex, validation, message) => this.refinement((data) => regex.test(data), {\n validation,\n code: ZodIssueCode.invalid_string,\n ...errorUtil.errToObj(message),\n });\n /**\n * @deprecated Use z.string().min(1) instead.\n * @see {@link ZodString.min}\n */\n this.nonempty = (message) => this.min(1, errorUtil.errToObj(message));\n this.trim = () => new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"trim\" }],\n });\n this.toLowerCase = () => new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n });\n this.toUpperCase = () => new ZodString({\n ...this._def,\n checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n });\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = String(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.string) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.string,\n received: ctx.parsedType,\n }\n //\n );\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.length < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.length > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"length\") {\n const tooBig = input.data.length > check.value;\n const tooSmall = input.data.length < check.value;\n if (tooBig || tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n if (tooBig) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n else if (tooSmall) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"string\",\n inclusive: true,\n exact: true,\n message: check.message,\n });\n }\n status.dirty();\n }\n }\n else if (check.kind === \"email\") {\n if (!emailRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"email\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"emoji\") {\n if (!emojiRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"emoji\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"uuid\") {\n if (!uuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"uuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid\") {\n if (!cuidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"cuid2\") {\n if (!cuid2Regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"cuid2\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ulid\") {\n if (!ulidRegex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ulid\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"url\") {\n try {\n new URL(input.data);\n }\n catch (_a) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"url\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"regex\") {\n check.regex.lastIndex = 0;\n const testResult = check.regex.test(input.data);\n if (!testResult) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"regex\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"trim\") {\n input.data = input.data.trim();\n }\n else if (check.kind === \"includes\") {\n if (!input.data.includes(check.value, check.position)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { includes: check.value, position: check.position },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"toLowerCase\") {\n input.data = input.data.toLowerCase();\n }\n else if (check.kind === \"toUpperCase\") {\n input.data = input.data.toUpperCase();\n }\n else if (check.kind === \"startsWith\") {\n if (!input.data.startsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { startsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"endsWith\") {\n if (!input.data.endsWith(check.value)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: { endsWith: check.value },\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"datetime\") {\n const regex = datetimeRegex(check);\n if (!regex.test(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_string,\n validation: \"datetime\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"ip\") {\n if (!isValidIP(input.data, check.version)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n validation: \"ip\",\n code: ZodIssueCode.invalid_string,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n _addCheck(check) {\n return new ZodString({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n email(message) {\n return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n }\n url(message) {\n return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n }\n emoji(message) {\n return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n }\n uuid(message) {\n return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n }\n cuid(message) {\n return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n }\n cuid2(message) {\n return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n }\n ulid(message) {\n return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n }\n ip(options) {\n return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n }\n datetime(options) {\n var _a;\n if (typeof options === \"string\") {\n return this._addCheck({\n kind: \"datetime\",\n precision: null,\n offset: false,\n message: options,\n });\n }\n return this._addCheck({\n kind: \"datetime\",\n precision: typeof (options === null || options === void 0 ? void 0 : options.precision) === \"undefined\" ? null : options === null || options === void 0 ? void 0 : options.precision,\n offset: (_a = options === null || options === void 0 ? void 0 : options.offset) !== null && _a !== void 0 ? _a : false,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n regex(regex, message) {\n return this._addCheck({\n kind: \"regex\",\n regex: regex,\n ...errorUtil.errToObj(message),\n });\n }\n includes(value, options) {\n return this._addCheck({\n kind: \"includes\",\n value: value,\n position: options === null || options === void 0 ? void 0 : options.position,\n ...errorUtil.errToObj(options === null || options === void 0 ? void 0 : options.message),\n });\n }\n startsWith(value, message) {\n return this._addCheck({\n kind: \"startsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n endsWith(value, message) {\n return this._addCheck({\n kind: \"endsWith\",\n value: value,\n ...errorUtil.errToObj(message),\n });\n }\n min(minLength, message) {\n return this._addCheck({\n kind: \"min\",\n value: minLength,\n ...errorUtil.errToObj(message),\n });\n }\n max(maxLength, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxLength,\n ...errorUtil.errToObj(message),\n });\n }\n length(len, message) {\n return this._addCheck({\n kind: \"length\",\n value: len,\n ...errorUtil.errToObj(message),\n });\n }\n get isDatetime() {\n return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n }\n get isEmail() {\n return !!this._def.checks.find((ch) => ch.kind === \"email\");\n }\n get isURL() {\n return !!this._def.checks.find((ch) => ch.kind === \"url\");\n }\n get isEmoji() {\n return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n }\n get isUUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n }\n get isCUID() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n }\n get isCUID2() {\n return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n }\n get isULID() {\n return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n }\n get isIP() {\n return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n }\n get minLength() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxLength() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodString.create = (params) => {\n var _a;\n return new ZodString({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodString,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n const valInt = parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n const stepInt = parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n return (valInt % stepInt) / Math.pow(10, decCount);\n}\nclass ZodNumber extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n this.step = this.multipleOf;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = Number(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.number) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.number,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"int\") {\n if (!util.isInteger(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: \"integer\",\n received: \"float\",\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: check.value,\n type: \"number\",\n inclusive: check.inclusive,\n exact: false,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (floatSafeRemainder(input.data, check.value) !== 0) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"finite\") {\n if (!Number.isFinite(input.data)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_finite,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodNumber({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodNumber({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n int(message) {\n return this._addCheck({\n kind: \"int\",\n message: errorUtil.toString(message),\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: 0,\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value: value,\n message: errorUtil.toString(message),\n });\n }\n finite(message) {\n return this._addCheck({\n kind: \"finite\",\n message: errorUtil.toString(message),\n });\n }\n safe(message) {\n return this._addCheck({\n kind: \"min\",\n inclusive: true,\n value: Number.MIN_SAFE_INTEGER,\n message: errorUtil.toString(message),\n })._addCheck({\n kind: \"max\",\n inclusive: true,\n value: Number.MAX_SAFE_INTEGER,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n get isInt() {\n return !!this._def.checks.find((ch) => ch.kind === \"int\" ||\n (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n }\n get isFinite() {\n let max = null, min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"finite\" ||\n ch.kind === \"int\" ||\n ch.kind === \"multipleOf\") {\n return true;\n }\n else if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n else if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return Number.isFinite(min) && Number.isFinite(max);\n }\n}\nZodNumber.create = (params) => {\n return new ZodNumber({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodNumber,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodBigInt extends ZodType {\n constructor() {\n super(...arguments);\n this.min = this.gte;\n this.max = this.lte;\n }\n _parse(input) {\n if (this._def.coerce) {\n input.data = BigInt(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.bigint) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.bigint,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n let ctx = undefined;\n const status = new ParseStatus();\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n const tooSmall = check.inclusive\n ? input.data < check.value\n : input.data <= check.value;\n if (tooSmall) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n type: \"bigint\",\n minimum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n const tooBig = check.inclusive\n ? input.data > check.value\n : input.data >= check.value;\n if (tooBig) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n type: \"bigint\",\n maximum: check.value,\n inclusive: check.inclusive,\n message: check.message,\n });\n status.dirty();\n }\n }\n else if (check.kind === \"multipleOf\") {\n if (input.data % check.value !== BigInt(0)) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.not_multiple_of,\n multipleOf: check.value,\n message: check.message,\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return { status: status.value, value: input.data };\n }\n gte(value, message) {\n return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n }\n gt(value, message) {\n return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n }\n lte(value, message) {\n return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n }\n lt(value, message) {\n return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n }\n setLimit(kind, value, inclusive, message) {\n return new ZodBigInt({\n ...this._def,\n checks: [\n ...this._def.checks,\n {\n kind,\n value,\n inclusive,\n message: errorUtil.toString(message),\n },\n ],\n });\n }\n _addCheck(check) {\n return new ZodBigInt({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n positive(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n negative(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: false,\n message: errorUtil.toString(message),\n });\n }\n nonpositive(message) {\n return this._addCheck({\n kind: \"max\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n nonnegative(message) {\n return this._addCheck({\n kind: \"min\",\n value: BigInt(0),\n inclusive: true,\n message: errorUtil.toString(message),\n });\n }\n multipleOf(value, message) {\n return this._addCheck({\n kind: \"multipleOf\",\n value,\n message: errorUtil.toString(message),\n });\n }\n get minValue() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min;\n }\n get maxValue() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max;\n }\n}\nZodBigInt.create = (params) => {\n var _a;\n return new ZodBigInt({\n checks: [],\n typeName: ZodFirstPartyTypeKind.ZodBigInt,\n coerce: (_a = params === null || params === void 0 ? void 0 : params.coerce) !== null && _a !== void 0 ? _a : false,\n ...processCreateParams(params),\n });\n};\nclass ZodBoolean extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = Boolean(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.boolean) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.boolean,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodBoolean.create = (params) => {\n return new ZodBoolean({\n typeName: ZodFirstPartyTypeKind.ZodBoolean,\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n ...processCreateParams(params),\n });\n};\nclass ZodDate extends ZodType {\n _parse(input) {\n if (this._def.coerce) {\n input.data = new Date(input.data);\n }\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.date) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.date,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (isNaN(input.data.getTime())) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_date,\n });\n return INVALID;\n }\n const status = new ParseStatus();\n let ctx = undefined;\n for (const check of this._def.checks) {\n if (check.kind === \"min\") {\n if (input.data.getTime() < check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n message: check.message,\n inclusive: true,\n exact: false,\n minimum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else if (check.kind === \"max\") {\n if (input.data.getTime() > check.value) {\n ctx = this._getOrReturnCtx(input, ctx);\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n message: check.message,\n inclusive: true,\n exact: false,\n maximum: check.value,\n type: \"date\",\n });\n status.dirty();\n }\n }\n else {\n util.assertNever(check);\n }\n }\n return {\n status: status.value,\n value: new Date(input.data.getTime()),\n };\n }\n _addCheck(check) {\n return new ZodDate({\n ...this._def,\n checks: [...this._def.checks, check],\n });\n }\n min(minDate, message) {\n return this._addCheck({\n kind: \"min\",\n value: minDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n max(maxDate, message) {\n return this._addCheck({\n kind: \"max\",\n value: maxDate.getTime(),\n message: errorUtil.toString(message),\n });\n }\n get minDate() {\n let min = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"min\") {\n if (min === null || ch.value > min)\n min = ch.value;\n }\n }\n return min != null ? new Date(min) : null;\n }\n get maxDate() {\n let max = null;\n for (const ch of this._def.checks) {\n if (ch.kind === \"max\") {\n if (max === null || ch.value < max)\n max = ch.value;\n }\n }\n return max != null ? new Date(max) : null;\n }\n}\nZodDate.create = (params) => {\n return new ZodDate({\n checks: [],\n coerce: (params === null || params === void 0 ? void 0 : params.coerce) || false,\n typeName: ZodFirstPartyTypeKind.ZodDate,\n ...processCreateParams(params),\n });\n};\nclass ZodSymbol extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.symbol) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.symbol,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodSymbol.create = (params) => {\n return new ZodSymbol({\n typeName: ZodFirstPartyTypeKind.ZodSymbol,\n ...processCreateParams(params),\n });\n};\nclass ZodUndefined extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.undefined,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodUndefined.create = (params) => {\n return new ZodUndefined({\n typeName: ZodFirstPartyTypeKind.ZodUndefined,\n ...processCreateParams(params),\n });\n};\nclass ZodNull extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.null) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.null,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodNull.create = (params) => {\n return new ZodNull({\n typeName: ZodFirstPartyTypeKind.ZodNull,\n ...processCreateParams(params),\n });\n};\nclass ZodAny extends ZodType {\n constructor() {\n super(...arguments);\n // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n this._any = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodAny.create = (params) => {\n return new ZodAny({\n typeName: ZodFirstPartyTypeKind.ZodAny,\n ...processCreateParams(params),\n });\n};\nclass ZodUnknown extends ZodType {\n constructor() {\n super(...arguments);\n // required\n this._unknown = true;\n }\n _parse(input) {\n return OK(input.data);\n }\n}\nZodUnknown.create = (params) => {\n return new ZodUnknown({\n typeName: ZodFirstPartyTypeKind.ZodUnknown,\n ...processCreateParams(params),\n });\n};\nclass ZodNever extends ZodType {\n _parse(input) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.never,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n}\nZodNever.create = (params) => {\n return new ZodNever({\n typeName: ZodFirstPartyTypeKind.ZodNever,\n ...processCreateParams(params),\n });\n};\nclass ZodVoid extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.undefined) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.void,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n}\nZodVoid.create = (params) => {\n return new ZodVoid({\n typeName: ZodFirstPartyTypeKind.ZodVoid,\n ...processCreateParams(params),\n });\n};\nclass ZodArray extends ZodType {\n _parse(input) {\n const { ctx, status } = this._processInputParams(input);\n const def = this._def;\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (def.exactLength !== null) {\n const tooBig = ctx.data.length > def.exactLength.value;\n const tooSmall = ctx.data.length < def.exactLength.value;\n if (tooBig || tooSmall) {\n addIssueToContext(ctx, {\n code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n minimum: (tooSmall ? def.exactLength.value : undefined),\n maximum: (tooBig ? def.exactLength.value : undefined),\n type: \"array\",\n inclusive: true,\n exact: true,\n message: def.exactLength.message,\n });\n status.dirty();\n }\n }\n if (def.minLength !== null) {\n if (ctx.data.length < def.minLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.minLength.message,\n });\n status.dirty();\n }\n }\n if (def.maxLength !== null) {\n if (ctx.data.length > def.maxLength.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxLength.value,\n type: \"array\",\n inclusive: true,\n exact: false,\n message: def.maxLength.message,\n });\n status.dirty();\n }\n }\n if (ctx.common.async) {\n return Promise.all([...ctx.data].map((item, i) => {\n return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n })).then((result) => {\n return ParseStatus.mergeArray(status, result);\n });\n }\n const result = [...ctx.data].map((item, i) => {\n return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n });\n return ParseStatus.mergeArray(status, result);\n }\n get element() {\n return this._def.type;\n }\n min(minLength, message) {\n return new ZodArray({\n ...this._def,\n minLength: { value: minLength, message: errorUtil.toString(message) },\n });\n }\n max(maxLength, message) {\n return new ZodArray({\n ...this._def,\n maxLength: { value: maxLength, message: errorUtil.toString(message) },\n });\n }\n length(len, message) {\n return new ZodArray({\n ...this._def,\n exactLength: { value: len, message: errorUtil.toString(message) },\n });\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodArray.create = (schema, params) => {\n return new ZodArray({\n type: schema,\n minLength: null,\n maxLength: null,\n exactLength: null,\n typeName: ZodFirstPartyTypeKind.ZodArray,\n ...processCreateParams(params),\n });\n};\nfunction deepPartialify(schema) {\n if (schema instanceof ZodObject) {\n const newShape = {};\n for (const key in schema.shape) {\n const fieldSchema = schema.shape[key];\n newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n }\n return new ZodObject({\n ...schema._def,\n shape: () => newShape,\n });\n }\n else if (schema instanceof ZodArray) {\n return new ZodArray({\n ...schema._def,\n type: deepPartialify(schema.element),\n });\n }\n else if (schema instanceof ZodOptional) {\n return ZodOptional.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodNullable) {\n return ZodNullable.create(deepPartialify(schema.unwrap()));\n }\n else if (schema instanceof ZodTuple) {\n return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n }\n else {\n return schema;\n }\n}\nclass ZodObject extends ZodType {\n constructor() {\n super(...arguments);\n this._cached = null;\n /**\n * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n * If you want to pass through unknown properties, use `.passthrough()` instead.\n */\n this.nonstrict = this.passthrough;\n // extend<\n // Augmentation extends ZodRawShape,\n // NewOutput extends util.flatten<{\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // }>,\n // NewInput extends util.flatten<{\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }>\n // >(\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape,\n // UnknownKeys,\n // Catchall,\n // NewOutput,\n // NewInput\n // > {\n // return new ZodObject({\n // ...this._def,\n // shape: () => ({\n // ...this._def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // }\n /**\n * @deprecated Use `.extend` instead\n * */\n this.augment = this.extend;\n }\n _getCached() {\n if (this._cached !== null)\n return this._cached;\n const shape = this._def.shape();\n const keys = util.objectKeys(shape);\n return (this._cached = { shape, keys });\n }\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.object) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const { status, ctx } = this._processInputParams(input);\n const { shape, keys: shapeKeys } = this._getCached();\n const extraKeys = [];\n if (!(this._def.catchall instanceof ZodNever &&\n this._def.unknownKeys === \"strip\")) {\n for (const key in ctx.data) {\n if (!shapeKeys.includes(key)) {\n extraKeys.push(key);\n }\n }\n }\n const pairs = [];\n for (const key of shapeKeys) {\n const keyValidator = shape[key];\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n alwaysSet: key in ctx.data,\n });\n }\n if (this._def.catchall instanceof ZodNever) {\n const unknownKeys = this._def.unknownKeys;\n if (unknownKeys === \"passthrough\") {\n for (const key of extraKeys) {\n pairs.push({\n key: { status: \"valid\", value: key },\n value: { status: \"valid\", value: ctx.data[key] },\n });\n }\n }\n else if (unknownKeys === \"strict\") {\n if (extraKeys.length > 0) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.unrecognized_keys,\n keys: extraKeys,\n });\n status.dirty();\n }\n }\n else if (unknownKeys === \"strip\") ;\n else {\n throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n }\n }\n else {\n // run catchall validation\n const catchall = this._def.catchall;\n for (const key of extraKeys) {\n const value = ctx.data[key];\n pairs.push({\n key: { status: \"valid\", value: key },\n value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n ),\n alwaysSet: key in ctx.data,\n });\n }\n }\n if (ctx.common.async) {\n return Promise.resolve()\n .then(async () => {\n const syncPairs = [];\n for (const pair of pairs) {\n const key = await pair.key;\n syncPairs.push({\n key,\n value: await pair.value,\n alwaysSet: pair.alwaysSet,\n });\n }\n return syncPairs;\n })\n .then((syncPairs) => {\n return ParseStatus.mergeObjectSync(status, syncPairs);\n });\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get shape() {\n return this._def.shape();\n }\n strict(message) {\n errorUtil.errToObj;\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strict\",\n ...(message !== undefined\n ? {\n errorMap: (issue, ctx) => {\n var _a, _b, _c, _d;\n const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;\n if (issue.code === \"unrecognized_keys\")\n return {\n message: (_d = errorUtil.errToObj(message).message) !== null && _d !== void 0 ? _d : defaultError,\n };\n return {\n message: defaultError,\n };\n },\n }\n : {}),\n });\n }\n strip() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"strip\",\n });\n }\n passthrough() {\n return new ZodObject({\n ...this._def,\n unknownKeys: \"passthrough\",\n });\n }\n // const AugmentFactory =\n // (def: Def) =>\n // (\n // augmentation: Augmentation\n // ): ZodObject<\n // extendShape, Augmentation>,\n // Def[\"unknownKeys\"],\n // Def[\"catchall\"]\n // > => {\n // return new ZodObject({\n // ...def,\n // shape: () => ({\n // ...def.shape(),\n // ...augmentation,\n // }),\n // }) as any;\n // };\n extend(augmentation) {\n return new ZodObject({\n ...this._def,\n shape: () => ({\n ...this._def.shape(),\n ...augmentation,\n }),\n });\n }\n /**\n * Prior to zod@1.0.12 there was a bug in the\n * inferred type of merged objects. Please\n * upgrade if you are experiencing issues.\n */\n merge(merging) {\n const merged = new ZodObject({\n unknownKeys: merging._def.unknownKeys,\n catchall: merging._def.catchall,\n shape: () => ({\n ...this._def.shape(),\n ...merging._def.shape(),\n }),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n });\n return merged;\n }\n // merge<\n // Incoming extends AnyZodObject,\n // Augmentation extends Incoming[\"shape\"],\n // NewOutput extends {\n // [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n // ? Augmentation[k][\"_output\"]\n // : k extends keyof Output\n // ? Output[k]\n // : never;\n // },\n // NewInput extends {\n // [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n // ? Augmentation[k][\"_input\"]\n // : k extends keyof Input\n // ? Input[k]\n // : never;\n // }\n // >(\n // merging: Incoming\n // ): ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"],\n // NewOutput,\n // NewInput\n // > {\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n setKey(key, schema) {\n return this.augment({ [key]: schema });\n }\n // merge(\n // merging: Incoming\n // ): //ZodObject = (merging) => {\n // ZodObject<\n // extendShape>,\n // Incoming[\"_def\"][\"unknownKeys\"],\n // Incoming[\"_def\"][\"catchall\"]\n // > {\n // // const mergedShape = objectUtil.mergeShapes(\n // // this._def.shape(),\n // // merging._def.shape()\n // // );\n // const merged: any = new ZodObject({\n // unknownKeys: merging._def.unknownKeys,\n // catchall: merging._def.catchall,\n // shape: () =>\n // objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n // typeName: ZodFirstPartyTypeKind.ZodObject,\n // }) as any;\n // return merged;\n // }\n catchall(index) {\n return new ZodObject({\n ...this._def,\n catchall: index,\n });\n }\n pick(mask) {\n const shape = {};\n util.objectKeys(mask).forEach((key) => {\n if (mask[key] && this.shape[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n omit(mask) {\n const shape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (!mask[key]) {\n shape[key] = this.shape[key];\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => shape,\n });\n }\n /**\n * @deprecated\n */\n deepPartial() {\n return deepPartialify(this);\n }\n partial(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n const fieldSchema = this.shape[key];\n if (mask && !mask[key]) {\n newShape[key] = fieldSchema;\n }\n else {\n newShape[key] = fieldSchema.optional();\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n required(mask) {\n const newShape = {};\n util.objectKeys(this.shape).forEach((key) => {\n if (mask && !mask[key]) {\n newShape[key] = this.shape[key];\n }\n else {\n const fieldSchema = this.shape[key];\n let newField = fieldSchema;\n while (newField instanceof ZodOptional) {\n newField = newField._def.innerType;\n }\n newShape[key] = newField;\n }\n });\n return new ZodObject({\n ...this._def,\n shape: () => newShape,\n });\n }\n keyof() {\n return createZodEnum(util.objectKeys(this.shape));\n }\n}\nZodObject.create = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.strictCreate = (shape, params) => {\n return new ZodObject({\n shape: () => shape,\n unknownKeys: \"strict\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nZodObject.lazycreate = (shape, params) => {\n return new ZodObject({\n shape,\n unknownKeys: \"strip\",\n catchall: ZodNever.create(),\n typeName: ZodFirstPartyTypeKind.ZodObject,\n ...processCreateParams(params),\n });\n};\nclass ZodUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const options = this._def.options;\n function handleResults(results) {\n // return first issue-free validation if it exists\n for (const result of results) {\n if (result.result.status === \"valid\") {\n return result.result;\n }\n }\n for (const result of results) {\n if (result.result.status === \"dirty\") {\n // add issues from dirty option\n ctx.common.issues.push(...result.ctx.common.issues);\n return result.result;\n }\n }\n // return invalid\n const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return Promise.all(options.map(async (option) => {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n return {\n result: await option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n }),\n ctx: childCtx,\n };\n })).then(handleResults);\n }\n else {\n let dirty = undefined;\n const issues = [];\n for (const option of options) {\n const childCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n parent: null,\n };\n const result = option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: childCtx,\n });\n if (result.status === \"valid\") {\n return result;\n }\n else if (result.status === \"dirty\" && !dirty) {\n dirty = { result, ctx: childCtx };\n }\n if (childCtx.common.issues.length) {\n issues.push(childCtx.common.issues);\n }\n }\n if (dirty) {\n ctx.common.issues.push(...dirty.ctx.common.issues);\n return dirty.result;\n }\n const unionErrors = issues.map((issues) => new ZodError(issues));\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union,\n unionErrors,\n });\n return INVALID;\n }\n }\n get options() {\n return this._def.options;\n }\n}\nZodUnion.create = (types, params) => {\n return new ZodUnion({\n options: types,\n typeName: ZodFirstPartyTypeKind.ZodUnion,\n ...processCreateParams(params),\n });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n////////// //////////\n////////// ZodDiscriminatedUnion //////////\n////////// //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n if (type instanceof ZodLazy) {\n return getDiscriminator(type.schema);\n }\n else if (type instanceof ZodEffects) {\n return getDiscriminator(type.innerType());\n }\n else if (type instanceof ZodLiteral) {\n return [type.value];\n }\n else if (type instanceof ZodEnum) {\n return type.options;\n }\n else if (type instanceof ZodNativeEnum) {\n // eslint-disable-next-line ban/ban\n return Object.keys(type.enum);\n }\n else if (type instanceof ZodDefault) {\n return getDiscriminator(type._def.innerType);\n }\n else if (type instanceof ZodUndefined) {\n return [undefined];\n }\n else if (type instanceof ZodNull) {\n return [null];\n }\n else {\n return null;\n }\n};\nclass ZodDiscriminatedUnion extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const discriminator = this.discriminator;\n const discriminatorValue = ctx.data[discriminator];\n const option = this.optionsMap.get(discriminatorValue);\n if (!option) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_union_discriminator,\n options: Array.from(this.optionsMap.keys()),\n path: [discriminator],\n });\n return INVALID;\n }\n if (ctx.common.async) {\n return option._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n else {\n return option._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n get discriminator() {\n return this._def.discriminator;\n }\n get options() {\n return this._def.options;\n }\n get optionsMap() {\n return this._def.optionsMap;\n }\n /**\n * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n * have a different value for each object in the union.\n * @param discriminator the name of the discriminator property\n * @param types an array of object schemas\n * @param params\n */\n static create(discriminator, options, params) {\n // Get all the valid discriminator values\n const optionsMap = new Map();\n // try {\n for (const type of options) {\n const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n if (!discriminatorValues) {\n throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n }\n for (const value of discriminatorValues) {\n if (optionsMap.has(value)) {\n throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n }\n optionsMap.set(value, type);\n }\n }\n return new ZodDiscriminatedUnion({\n typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n discriminator,\n options,\n optionsMap,\n ...processCreateParams(params),\n });\n }\n}\nfunction mergeValues(a, b) {\n const aType = getParsedType(a);\n const bType = getParsedType(b);\n if (a === b) {\n return { valid: true, data: a };\n }\n else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n const bKeys = util.objectKeys(b);\n const sharedKeys = util\n .objectKeys(a)\n .filter((key) => bKeys.indexOf(key) !== -1);\n const newObj = { ...a, ...b };\n for (const key of sharedKeys) {\n const sharedValue = mergeValues(a[key], b[key]);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newObj[key] = sharedValue.data;\n }\n return { valid: true, data: newObj };\n }\n else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n if (a.length !== b.length) {\n return { valid: false };\n }\n const newArray = [];\n for (let index = 0; index < a.length; index++) {\n const itemA = a[index];\n const itemB = b[index];\n const sharedValue = mergeValues(itemA, itemB);\n if (!sharedValue.valid) {\n return { valid: false };\n }\n newArray.push(sharedValue.data);\n }\n return { valid: true, data: newArray };\n }\n else if (aType === ZodParsedType.date &&\n bType === ZodParsedType.date &&\n +a === +b) {\n return { valid: true, data: a };\n }\n else {\n return { valid: false };\n }\n}\nclass ZodIntersection extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const handleParsed = (parsedLeft, parsedRight) => {\n if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n return INVALID;\n }\n const merged = mergeValues(parsedLeft.value, parsedRight.value);\n if (!merged.valid) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_intersection_types,\n });\n return INVALID;\n }\n if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n status.dirty();\n }\n return { status: status.value, value: merged.data };\n };\n if (ctx.common.async) {\n return Promise.all([\n this._def.left._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n this._def.right._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }),\n ]).then(([left, right]) => handleParsed(left, right));\n }\n else {\n return handleParsed(this._def.left._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }), this._def.right._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n }));\n }\n }\n}\nZodIntersection.create = (left, right, params) => {\n return new ZodIntersection({\n left: left,\n right: right,\n typeName: ZodFirstPartyTypeKind.ZodIntersection,\n ...processCreateParams(params),\n });\n};\nclass ZodTuple extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.array) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.array,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n if (ctx.data.length < this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n return INVALID;\n }\n const rest = this._def.rest;\n if (!rest && ctx.data.length > this._def.items.length) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: this._def.items.length,\n inclusive: true,\n exact: false,\n type: \"array\",\n });\n status.dirty();\n }\n const items = [...ctx.data]\n .map((item, itemIndex) => {\n const schema = this._def.items[itemIndex] || this._def.rest;\n if (!schema)\n return null;\n return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n })\n .filter((x) => !!x); // filter nulls\n if (ctx.common.async) {\n return Promise.all(items).then((results) => {\n return ParseStatus.mergeArray(status, results);\n });\n }\n else {\n return ParseStatus.mergeArray(status, items);\n }\n }\n get items() {\n return this._def.items;\n }\n rest(rest) {\n return new ZodTuple({\n ...this._def,\n rest,\n });\n }\n}\nZodTuple.create = (schemas, params) => {\n if (!Array.isArray(schemas)) {\n throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n }\n return new ZodTuple({\n items: schemas,\n typeName: ZodFirstPartyTypeKind.ZodTuple,\n rest: null,\n ...processCreateParams(params),\n });\n};\nclass ZodRecord extends ZodType {\n get keySchema() {\n return this._def.keyType;\n }\n get valueSchema() {\n return this._def.valueType;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.object) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.object,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const pairs = [];\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n for (const key in ctx.data) {\n pairs.push({\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n });\n }\n if (ctx.common.async) {\n return ParseStatus.mergeObjectAsync(status, pairs);\n }\n else {\n return ParseStatus.mergeObjectSync(status, pairs);\n }\n }\n get element() {\n return this._def.valueType;\n }\n static create(first, second, third) {\n if (second instanceof ZodType) {\n return new ZodRecord({\n keyType: first,\n valueType: second,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(third),\n });\n }\n return new ZodRecord({\n keyType: ZodString.create(),\n valueType: first,\n typeName: ZodFirstPartyTypeKind.ZodRecord,\n ...processCreateParams(second),\n });\n }\n}\nclass ZodMap extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.map) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.map,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const keyType = this._def.keyType;\n const valueType = this._def.valueType;\n const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n return {\n key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n };\n });\n if (ctx.common.async) {\n const finalMap = new Map();\n return Promise.resolve().then(async () => {\n for (const pair of pairs) {\n const key = await pair.key;\n const value = await pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n });\n }\n else {\n const finalMap = new Map();\n for (const pair of pairs) {\n const key = pair.key;\n const value = pair.value;\n if (key.status === \"aborted\" || value.status === \"aborted\") {\n return INVALID;\n }\n if (key.status === \"dirty\" || value.status === \"dirty\") {\n status.dirty();\n }\n finalMap.set(key.value, value.value);\n }\n return { status: status.value, value: finalMap };\n }\n }\n}\nZodMap.create = (keyType, valueType, params) => {\n return new ZodMap({\n valueType,\n keyType,\n typeName: ZodFirstPartyTypeKind.ZodMap,\n ...processCreateParams(params),\n });\n};\nclass ZodSet extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.set) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.set,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const def = this._def;\n if (def.minSize !== null) {\n if (ctx.data.size < def.minSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_small,\n minimum: def.minSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.minSize.message,\n });\n status.dirty();\n }\n }\n if (def.maxSize !== null) {\n if (ctx.data.size > def.maxSize.value) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.too_big,\n maximum: def.maxSize.value,\n type: \"set\",\n inclusive: true,\n exact: false,\n message: def.maxSize.message,\n });\n status.dirty();\n }\n }\n const valueType = this._def.valueType;\n function finalizeSet(elements) {\n const parsedSet = new Set();\n for (const element of elements) {\n if (element.status === \"aborted\")\n return INVALID;\n if (element.status === \"dirty\")\n status.dirty();\n parsedSet.add(element.value);\n }\n return { status: status.value, value: parsedSet };\n }\n const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n if (ctx.common.async) {\n return Promise.all(elements).then((elements) => finalizeSet(elements));\n }\n else {\n return finalizeSet(elements);\n }\n }\n min(minSize, message) {\n return new ZodSet({\n ...this._def,\n minSize: { value: minSize, message: errorUtil.toString(message) },\n });\n }\n max(maxSize, message) {\n return new ZodSet({\n ...this._def,\n maxSize: { value: maxSize, message: errorUtil.toString(message) },\n });\n }\n size(size, message) {\n return this.min(size, message).max(size, message);\n }\n nonempty(message) {\n return this.min(1, message);\n }\n}\nZodSet.create = (valueType, params) => {\n return new ZodSet({\n valueType,\n minSize: null,\n maxSize: null,\n typeName: ZodFirstPartyTypeKind.ZodSet,\n ...processCreateParams(params),\n });\n};\nclass ZodFunction extends ZodType {\n constructor() {\n super(...arguments);\n this.validate = this.implement;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.function) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.function,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n function makeArgsIssue(args, error) {\n return makeIssue({\n data: args,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_arguments,\n argumentsError: error,\n },\n });\n }\n function makeReturnsIssue(returns, error) {\n return makeIssue({\n data: returns,\n path: ctx.path,\n errorMaps: [\n ctx.common.contextualErrorMap,\n ctx.schemaErrorMap,\n getErrorMap(),\n errorMap,\n ].filter((x) => !!x),\n issueData: {\n code: ZodIssueCode.invalid_return_type,\n returnTypeError: error,\n },\n });\n }\n const params = { errorMap: ctx.common.contextualErrorMap };\n const fn = ctx.data;\n if (this._def.returns instanceof ZodPromise) {\n return OK(async (...args) => {\n const error = new ZodError([]);\n const parsedArgs = await this._def.args\n .parseAsync(args, params)\n .catch((e) => {\n error.addIssue(makeArgsIssue(args, e));\n throw error;\n });\n const result = await fn(...parsedArgs);\n const parsedReturns = await this._def.returns._def.type\n .parseAsync(result, params)\n .catch((e) => {\n error.addIssue(makeReturnsIssue(result, e));\n throw error;\n });\n return parsedReturns;\n });\n }\n else {\n return OK((...args) => {\n const parsedArgs = this._def.args.safeParse(args, params);\n if (!parsedArgs.success) {\n throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n }\n const result = fn(...parsedArgs.data);\n const parsedReturns = this._def.returns.safeParse(result, params);\n if (!parsedReturns.success) {\n throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n }\n return parsedReturns.data;\n });\n }\n }\n parameters() {\n return this._def.args;\n }\n returnType() {\n return this._def.returns;\n }\n args(...items) {\n return new ZodFunction({\n ...this._def,\n args: ZodTuple.create(items).rest(ZodUnknown.create()),\n });\n }\n returns(returnType) {\n return new ZodFunction({\n ...this._def,\n returns: returnType,\n });\n }\n implement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n strictImplement(func) {\n const validatedFunc = this.parse(func);\n return validatedFunc;\n }\n static create(args, returns, params) {\n return new ZodFunction({\n args: (args\n ? args\n : ZodTuple.create([]).rest(ZodUnknown.create())),\n returns: returns || ZodUnknown.create(),\n typeName: ZodFirstPartyTypeKind.ZodFunction,\n ...processCreateParams(params),\n });\n }\n}\nclass ZodLazy extends ZodType {\n get schema() {\n return this._def.getter();\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const lazySchema = this._def.getter();\n return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n }\n}\nZodLazy.create = (getter, params) => {\n return new ZodLazy({\n getter: getter,\n typeName: ZodFirstPartyTypeKind.ZodLazy,\n ...processCreateParams(params),\n });\n};\nclass ZodLiteral extends ZodType {\n _parse(input) {\n if (input.data !== this._def.value) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_literal,\n expected: this._def.value,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n get value() {\n return this._def.value;\n }\n}\nZodLiteral.create = (value, params) => {\n return new ZodLiteral({\n value: value,\n typeName: ZodFirstPartyTypeKind.ZodLiteral,\n ...processCreateParams(params),\n });\n};\nfunction createZodEnum(values, params) {\n return new ZodEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodEnum,\n ...processCreateParams(params),\n });\n}\nclass ZodEnum extends ZodType {\n _parse(input) {\n if (typeof input.data !== \"string\") {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (this._def.values.indexOf(input.data) === -1) {\n const ctx = this._getOrReturnCtx(input);\n const expectedValues = this._def.values;\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get options() {\n return this._def.values;\n }\n get enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Values() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n get Enum() {\n const enumValues = {};\n for (const val of this._def.values) {\n enumValues[val] = val;\n }\n return enumValues;\n }\n extract(values) {\n return ZodEnum.create(values);\n }\n exclude(values) {\n return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)));\n }\n}\nZodEnum.create = createZodEnum;\nclass ZodNativeEnum extends ZodType {\n _parse(input) {\n const nativeEnumValues = util.getValidEnumValues(this._def.values);\n const ctx = this._getOrReturnCtx(input);\n if (ctx.parsedType !== ZodParsedType.string &&\n ctx.parsedType !== ZodParsedType.number) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n expected: util.joinValues(expectedValues),\n received: ctx.parsedType,\n code: ZodIssueCode.invalid_type,\n });\n return INVALID;\n }\n if (nativeEnumValues.indexOf(input.data) === -1) {\n const expectedValues = util.objectValues(nativeEnumValues);\n addIssueToContext(ctx, {\n received: ctx.data,\n code: ZodIssueCode.invalid_enum_value,\n options: expectedValues,\n });\n return INVALID;\n }\n return OK(input.data);\n }\n get enum() {\n return this._def.values;\n }\n}\nZodNativeEnum.create = (values, params) => {\n return new ZodNativeEnum({\n values: values,\n typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n ...processCreateParams(params),\n });\n};\nclass ZodPromise extends ZodType {\n unwrap() {\n return this._def.type;\n }\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n if (ctx.parsedType !== ZodParsedType.promise &&\n ctx.common.async === false) {\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.promise,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n const promisified = ctx.parsedType === ZodParsedType.promise\n ? ctx.data\n : Promise.resolve(ctx.data);\n return OK(promisified.then((data) => {\n return this._def.type.parseAsync(data, {\n path: ctx.path,\n errorMap: ctx.common.contextualErrorMap,\n });\n }));\n }\n}\nZodPromise.create = (schema, params) => {\n return new ZodPromise({\n type: schema,\n typeName: ZodFirstPartyTypeKind.ZodPromise,\n ...processCreateParams(params),\n });\n};\nclass ZodEffects extends ZodType {\n innerType() {\n return this._def.schema;\n }\n sourceType() {\n return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n ? this._def.schema.sourceType()\n : this._def.schema;\n }\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n const effect = this._def.effect || null;\n if (effect.type === \"preprocess\") {\n const processed = effect.transform(ctx.data);\n if (ctx.common.async) {\n return Promise.resolve(processed).then((processed) => {\n return this._def.schema._parseAsync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n });\n }\n else {\n return this._def.schema._parseSync({\n data: processed,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n const checkCtx = {\n addIssue: (arg) => {\n addIssueToContext(ctx, arg);\n if (arg.fatal) {\n status.abort();\n }\n else {\n status.dirty();\n }\n },\n get path() {\n return ctx.path;\n },\n };\n checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n if (effect.type === \"refinement\") {\n const executeRefinement = (acc\n // effect: RefinementEffect\n ) => {\n const result = effect.refinement(acc, checkCtx);\n if (ctx.common.async) {\n return Promise.resolve(result);\n }\n if (result instanceof Promise) {\n throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n }\n return acc;\n };\n if (ctx.common.async === false) {\n const inner = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n // return value is ignored\n executeRefinement(inner.value);\n return { status: status.value, value: inner.value };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((inner) => {\n if (inner.status === \"aborted\")\n return INVALID;\n if (inner.status === \"dirty\")\n status.dirty();\n return executeRefinement(inner.value).then(() => {\n return { status: status.value, value: inner.value };\n });\n });\n }\n }\n if (effect.type === \"transform\") {\n if (ctx.common.async === false) {\n const base = this._def.schema._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (!isValid(base))\n return base;\n const result = effect.transform(base.value, checkCtx);\n if (result instanceof Promise) {\n throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n }\n return { status: status.value, value: result };\n }\n else {\n return this._def.schema\n ._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })\n .then((base) => {\n if (!isValid(base))\n return base;\n return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({ status: status.value, value: result }));\n });\n }\n }\n util.assertNever(effect);\n }\n}\nZodEffects.create = (schema, effect, params) => {\n return new ZodEffects({\n schema,\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n effect,\n ...processCreateParams(params),\n });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n return new ZodEffects({\n schema,\n effect: { type: \"preprocess\", transform: preprocess },\n typeName: ZodFirstPartyTypeKind.ZodEffects,\n ...processCreateParams(params),\n });\n};\nclass ZodOptional extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.undefined) {\n return OK(undefined);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodOptional.create = (type, params) => {\n return new ZodOptional({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodOptional,\n ...processCreateParams(params),\n });\n};\nclass ZodNullable extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType === ZodParsedType.null) {\n return OK(null);\n }\n return this._def.innerType._parse(input);\n }\n unwrap() {\n return this._def.innerType;\n }\n}\nZodNullable.create = (type, params) => {\n return new ZodNullable({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodNullable,\n ...processCreateParams(params),\n });\n};\nclass ZodDefault extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n let data = ctx.data;\n if (ctx.parsedType === ZodParsedType.undefined) {\n data = this._def.defaultValue();\n }\n return this._def.innerType._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n removeDefault() {\n return this._def.innerType;\n }\n}\nZodDefault.create = (type, params) => {\n return new ZodDefault({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodDefault,\n defaultValue: typeof params.default === \"function\"\n ? params.default\n : () => params.default,\n ...processCreateParams(params),\n });\n};\nclass ZodCatch extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n // newCtx is used to not collect issues from inner types in ctx\n const newCtx = {\n ...ctx,\n common: {\n ...ctx.common,\n issues: [],\n },\n };\n const result = this._def.innerType._parse({\n data: newCtx.data,\n path: newCtx.path,\n parent: {\n ...newCtx,\n },\n });\n if (isAsync(result)) {\n return result.then((result) => {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n });\n }\n else {\n return {\n status: \"valid\",\n value: result.status === \"valid\"\n ? result.value\n : this._def.catchValue({\n get error() {\n return new ZodError(newCtx.common.issues);\n },\n input: newCtx.data,\n }),\n };\n }\n }\n removeCatch() {\n return this._def.innerType;\n }\n}\nZodCatch.create = (type, params) => {\n return new ZodCatch({\n innerType: type,\n typeName: ZodFirstPartyTypeKind.ZodCatch,\n catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n ...processCreateParams(params),\n });\n};\nclass ZodNaN extends ZodType {\n _parse(input) {\n const parsedType = this._getType(input);\n if (parsedType !== ZodParsedType.nan) {\n const ctx = this._getOrReturnCtx(input);\n addIssueToContext(ctx, {\n code: ZodIssueCode.invalid_type,\n expected: ZodParsedType.nan,\n received: ctx.parsedType,\n });\n return INVALID;\n }\n return { status: \"valid\", value: input.data };\n }\n}\nZodNaN.create = (params) => {\n return new ZodNaN({\n typeName: ZodFirstPartyTypeKind.ZodNaN,\n ...processCreateParams(params),\n });\n};\nconst BRAND = Symbol(\"zod_brand\");\nclass ZodBranded extends ZodType {\n _parse(input) {\n const { ctx } = this._processInputParams(input);\n const data = ctx.data;\n return this._def.type._parse({\n data,\n path: ctx.path,\n parent: ctx,\n });\n }\n unwrap() {\n return this._def.type;\n }\n}\nclass ZodPipeline extends ZodType {\n _parse(input) {\n const { status, ctx } = this._processInputParams(input);\n if (ctx.common.async) {\n const handleAsync = async () => {\n const inResult = await this._def.in._parseAsync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return DIRTY(inResult.value);\n }\n else {\n return this._def.out._parseAsync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n };\n return handleAsync();\n }\n else {\n const inResult = this._def.in._parseSync({\n data: ctx.data,\n path: ctx.path,\n parent: ctx,\n });\n if (inResult.status === \"aborted\")\n return INVALID;\n if (inResult.status === \"dirty\") {\n status.dirty();\n return {\n status: \"dirty\",\n value: inResult.value,\n };\n }\n else {\n return this._def.out._parseSync({\n data: inResult.value,\n path: ctx.path,\n parent: ctx,\n });\n }\n }\n }\n static create(a, b) {\n return new ZodPipeline({\n in: a,\n out: b,\n typeName: ZodFirstPartyTypeKind.ZodPipeline,\n });\n }\n}\nconst custom = (check, params = {}, \n/*\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) => {\n if (check)\n return ZodAny.create().superRefine((data, ctx) => {\n var _a, _b;\n if (!check(data)) {\n const p = typeof params === \"function\"\n ? params(data)\n : typeof params === \"string\"\n ? { message: params }\n : params;\n const _fatal = (_b = (_a = p.fatal) !== null && _a !== void 0 ? _a : fatal) !== null && _b !== void 0 ? _b : true;\n const p2 = typeof p === \"string\" ? { message: p } : p;\n ctx.addIssue({ code: \"custom\", ...p2, fatal: _fatal });\n }\n });\n return ZodAny.create();\n};\nconst late = {\n object: ZodObject.lazycreate,\n};\nvar ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\nconst instanceOfType = (\n// const instanceOfType = any>(\ncls, params = {\n message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nconst coerce = {\n string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n boolean: ((arg) => ZodBoolean.create({\n ...arg,\n coerce: true,\n })),\n bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nconst NEVER = INVALID;\n\nvar z = /*#__PURE__*/Object.freeze({\n __proto__: null,\n defaultErrorMap: errorMap,\n setErrorMap: setErrorMap,\n getErrorMap: getErrorMap,\n makeIssue: makeIssue,\n EMPTY_PATH: EMPTY_PATH,\n addIssueToContext: addIssueToContext,\n ParseStatus: ParseStatus,\n INVALID: INVALID,\n DIRTY: DIRTY,\n OK: OK,\n isAborted: isAborted,\n isDirty: isDirty,\n isValid: isValid,\n isAsync: isAsync,\n get util () { return util; },\n get objectUtil () { return objectUtil; },\n ZodParsedType: ZodParsedType,\n getParsedType: getParsedType,\n ZodType: ZodType,\n ZodString: ZodString,\n ZodNumber: ZodNumber,\n ZodBigInt: ZodBigInt,\n ZodBoolean: ZodBoolean,\n ZodDate: ZodDate,\n ZodSymbol: ZodSymbol,\n ZodUndefined: ZodUndefined,\n ZodNull: ZodNull,\n ZodAny: ZodAny,\n ZodUnknown: ZodUnknown,\n ZodNever: ZodNever,\n ZodVoid: ZodVoid,\n ZodArray: ZodArray,\n ZodObject: ZodObject,\n ZodUnion: ZodUnion,\n ZodDiscriminatedUnion: ZodDiscriminatedUnion,\n ZodIntersection: ZodIntersection,\n ZodTuple: ZodTuple,\n ZodRecord: ZodRecord,\n ZodMap: ZodMap,\n ZodSet: ZodSet,\n ZodFunction: ZodFunction,\n ZodLazy: ZodLazy,\n ZodLiteral: ZodLiteral,\n ZodEnum: ZodEnum,\n ZodNativeEnum: ZodNativeEnum,\n ZodPromise: ZodPromise,\n ZodEffects: ZodEffects,\n ZodTransformer: ZodEffects,\n ZodOptional: ZodOptional,\n ZodNullable: ZodNullable,\n ZodDefault: ZodDefault,\n ZodCatch: ZodCatch,\n ZodNaN: ZodNaN,\n BRAND: BRAND,\n ZodBranded: ZodBranded,\n ZodPipeline: ZodPipeline,\n custom: custom,\n Schema: ZodType,\n ZodSchema: ZodType,\n late: late,\n get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; },\n coerce: coerce,\n any: anyType,\n array: arrayType,\n bigint: bigIntType,\n boolean: booleanType,\n date: dateType,\n discriminatedUnion: discriminatedUnionType,\n effect: effectsType,\n 'enum': enumType,\n 'function': functionType,\n 'instanceof': instanceOfType,\n intersection: intersectionType,\n lazy: lazyType,\n literal: literalType,\n map: mapType,\n nan: nanType,\n nativeEnum: nativeEnumType,\n never: neverType,\n 'null': nullType,\n nullable: nullableType,\n number: numberType,\n object: objectType,\n oboolean: oboolean,\n onumber: onumber,\n optional: optionalType,\n ostring: ostring,\n pipeline: pipelineType,\n preprocess: preprocessType,\n promise: promiseType,\n record: recordType,\n set: setType,\n strictObject: strictObjectType,\n string: stringType,\n symbol: symbolType,\n transformer: effectsType,\n tuple: tupleType,\n 'undefined': undefinedType,\n union: unionType,\n unknown: unknownType,\n 'void': voidType,\n NEVER: NEVER,\n ZodIssueCode: ZodIssueCode,\n quotelessJson: quotelessJson,\n ZodError: ZodError\n});\n\nexport { BRAND, DIRTY, EMPTY_PATH, INVALID, NEVER, OK, ParseStatus, ZodType as Schema, ZodAny, ZodArray, ZodBigInt, ZodBoolean, ZodBranded, ZodCatch, ZodDate, ZodDefault, ZodDiscriminatedUnion, ZodEffects, ZodEnum, ZodError, ZodFirstPartyTypeKind, ZodFunction, ZodIntersection, ZodIssueCode, ZodLazy, ZodLiteral, ZodMap, ZodNaN, ZodNativeEnum, ZodNever, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodParsedType, ZodPipeline, ZodPromise, ZodRecord, ZodType as ZodSchema, ZodSet, ZodString, ZodSymbol, ZodEffects as ZodTransformer, ZodTuple, ZodType, ZodUndefined, ZodUnion, ZodUnknown, ZodVoid, addIssueToContext, anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, coerce, custom, dateType as date, z as default, errorMap as defaultErrorMap, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, getErrorMap, getParsedType, instanceOfType as instanceof, intersectionType as intersection, isAborted, isAsync, isDirty, isValid, late, lazyType as lazy, literalType as literal, makeIssue, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, objectUtil, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, quotelessJson, recordType as record, setType as set, setErrorMap, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, util, voidType as void, z };\n","import * as z from \"zod\";\n// const boolean = z.literal(\"BOOLEAN\")\n// const char = z.literal(\"CHAR\")\n// const short = z.literal(\"SHORT\")\n// const unsigned_short = z.literal(\"UNSIGNED_SHORT\")\nexport const unsigned_int = z.literal(\"UNSIGNED_INT\");\nexport const int = z.literal(\"INT\");\n// const long = z.literal(\"LONG\")\nexport const float = z.literal(\"FLOAT\");\n// const double = z.literal(\"DOUBLE\")\nexport const int2 = z.literal(\"INT2\");\n// const int3 = z.literal(\"INT3\")\n// const int4 = z.literal(\"INT4\")\n// const float2 = z.literal(\"FLOAT2\")\n// const float3 = z.literal(\"FLOAT3\")\n// const float4 = z.literal(\"FLOAT4\")\n// const float4x4 = z.literal(\"FLOAT4X4\")\n// const string = z.literal(\"STRING\")\nexport const wstring = z.literal(\"WSTRING\");\nexport const variant_map = z.literal(\"VARIANT_MAP\");\n// possible types that can be returned by bridge' status object.\nexport const completion = z.literal(\"Completion\");\nexport const unknown = z.literal(\"UnknownOrchestration\");\nexport const pending = z.literal(\"Pending\");\nexport const failure = z.literal(\"Failure\");\n// these types exist, but haven't been seen in the wild.\n// export const NotImplemented = z.literal(\"NotImplemented\")\n// export const aborted = z.literal(\"Aborted\")\n// export const fileNotFound = z.literal(\"FileNotFound\")\n// export const invalidCast = z.literal(\"InvalidCast\")\n// export const errorInParams = z.literal(\"ErrorInParams\")\n// export const inComplete = z.literal(\"Incomplete\")\n// export const inTearDown = z.literal(\"InTeardown\")\n// export const verbNotFound = z.literal(\"VerbNotFound\")\n// export const unknownWork = z.literal(\"UnknownWork\")\n// export const unknownPlaylist = z.literal(\"UnknownPlaylist\")\n// export const objectDelted = z.literal(\"ObjectDeleted\")\n// export const framesExhausted = z.literal(\"FramesExhausted\")\nexport const name = z.string();\nexport const status = z.object({\n name: name,\n type: wstring,\n value: z.union([completion, pending, failure, unknown]),\n});\n","import { z } from \"zod\";\nimport * as schema from \"./schema\";\n// possible types that can be returned by bridge.\nexport const version = z.object({\n name: schema.name,\n // the payload value is unique to each bridge response.\n payload: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const orchestration = z.object({\n name: schema.name,\n payload: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const play_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n id: z\n .object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n })\n .optional(),\n message: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const instance_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n name: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const insert_playlist_entry = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n index: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const delete_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n name: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const show_window = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nconst displayItem = z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n calibration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n defaultQuilt: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n hardwareVersion: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n hwid: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n index: z.object({\n name: schema.name,\n type: schema.unsigned_int,\n value: z.number(),\n }),\n state: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n windowCoords: z.object({\n name: schema.name,\n type: schema.int2,\n value: z.object({\n x: z.number(),\n y: z.number(),\n }),\n }),\n }),\n});\nexport const available_output_devices = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.record(displayItem).optional(),\n }),\n status: schema.status,\n});\nexport const instance_studio_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n name: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const update_playlist_entry = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const update_current_entry = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const get_autostart_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n playlist_name: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n playlist_path: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const set_autostart_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n playlist_name: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const set_named_autostart_playlist = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n payload: z.object({\n name: schema.name,\n type: schema.variant_map,\n value: z.object({\n playlist_name: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n }),\n }),\n status: schema.status,\n});\nexport const transport_control_play = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const transport_control_pause = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const transport_control_next = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const transport_control_previous = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\nexport const transport_control_seek_to_index = z.object({\n name: schema.name,\n orchestration: z.object({\n name: schema.name,\n type: schema.wstring,\n value: z.string(),\n }),\n status: schema.status,\n});\n","export class MessageHandler {\n bridgeEventName;\n client;\n constructor(args) {\n this.bridgeEventName = args.bridgeEventName;\n this.client = args.client;\n this.client.addEventListener(this.bridgeEventName, this.handle.bind(this));\n }\n}\nexport class MonitorConnectedMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Monitor Connect\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c Monitor Connect \", \"color: aqua; font-weight: bold; border: solid;\", message);\n }\n}\nexport class MonitorDisconnectedMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Monitor Disconnect\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c Monitor Disconnect \", \"color: aqua; font-weight: bold; border: solid;\", message);\n }\n}\nexport class ProgressStartMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Progress Start\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c Progress Start \", \"color: aqua; font-weight: bold; border: solid;\", message);\n }\n}\nexport class ProgressCompletionMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Progress Completion\", client: args.client });\n }\n handle(message) {\n this.client.log(message);\n }\n}\nexport class ProgressUpdateMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Progress Update\", client: args.client });\n }\n handle(message) {\n this.client.log(message);\n }\n}\nexport class PlaylistInstanceMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Playlist Instance\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c Playlist Instance \", \"color: aqua; font-weight: bold; border: solid;\", message);\n }\n}\nexport class PlaylistInsertMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Playlist Insert\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c Playlist Insert \", \"color: aqua; font-weight: bold; border: solid;\", message);\n }\n}\nexport class PlaylistDeleteMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Playlist Delete\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c Playlist Delete \", \"color: aqua; font-weight: bold; border: solid;\", message);\n }\n}\nexport class SyncPlayPlaylistMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Sync/Play Playlist\", client: args.client });\n }\n handle(message) {\n this.client.log(message);\n }\n}\nexport class SyncPlayPlaylistCompleteMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Sync/Play Playlist Complete\", client: args.client });\n }\n handle(message) {\n this.client.log(message);\n }\n}\nexport class SyncPlayPlaylistCancelledMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"Sync/Play Playlist Cancelled\", client: args.client });\n }\n handle(message) {\n this.client.log(message);\n }\n}\nexport class NewItemPlayingMessageHandler extends MessageHandler {\n constructor(args) {\n super({ bridgeEventName: \"New Item Playing\", client: args.client });\n }\n handle(message) {\n this.client.log(\"%c New Item Playing \", \"color: aqua; font-weight: bold; border: solid;\", message);\n let index = this.client.currentPlaylistIndex;\n let playlistName = this.client.playlists?.[index]?.name;\n let playlistItemIndex = this.client.currentPlaylistItemIndex;\n if (message.payload.value.playlist_name.value == playlistName &&\n message.payload.value.index.value == playlistItemIndex) {\n this.client.isCastPending = false;\n }\n }\n}\n","/**\n * Parse the version from Bridge's version string\n * Bridge uses a major, minor, patch, hotfix versioning system\n * @param versionString The version string to parse\n * @returns BridgeVersion\n */\nexport function parseBridgeVersion(versionString) {\n const [major, minor, patch, hotfix] = versionString.split(\".\").map(Number);\n return {\n major,\n minor,\n patch,\n hotfix,\n };\n}\n","import { tryParseDisplay } from \"../components/displays\";\nimport { sendMessage } from \"../components/endpoints\";\nimport { tryEnterOrchestration, tryExitOrchestration } from \"../components/orchestration\";\nimport { BridgeEventSource } from \"../components/eventsource\";\nimport { Playlist } from \"../playlists/playlist\";\nimport * as schema from \"../schemas/schema.responses\";\nimport { NewItemPlayingMessageHandler } from \"../components/messageHandler\";\nimport { parseBridgeVersion } from \"../utilities/general.utils\";\nexport class BridgeClient {\n /** The name of the current orchestration */\n orchestration;\n /** A boolean that stores if the Bridge session is valid or not\n * If the orchestration is not valid, some functions will not work\n */\n isConnected;\n /**A boolean for checking the status of the current disconnect event */\n isDisconnecting;\n /**An array containing the connected Looking Glass Displays */\n displays;\n /**an Array containing Playlists, we store this to easily switch between multiple playlists */\n playlists;\n /** The index of playlists that is currently active */\n currentPlaylistIndex;\n /**The index of the playlist Item that is currently active */\n currentPlaylistItemIndex;\n /** the instance of the client that we create, BridgeClient is a singleton, there can only be one */\n static instance;\n static fallback;\n /** The websocket connection to Bridge's Event Source, this returns information from Bridge */\n static eventsource;\n /**control how often we log to the console, 3 is everything, 0 is nothing */\n static verbosity;\n /**store if we're currently in the middle of a cast */\n isCastPending = false;\n /**the version of the Looking Glass Driver that's running */\n version;\n currentHologram;\n /**a boolean for whether a disconnect was triggered automatically or manually */\n manualDisconnect = false;\n playState = \"STOPPED\";\n constructor() {\n this.orchestration = \"\";\n this.isConnected = false;\n this.isDisconnecting = false;\n this.displays = [];\n BridgeClient.eventsource = new BridgeEventSource();\n BridgeClient.fallback = undefined;\n this.playlists = [];\n this.currentPlaylistIndex = 0;\n this.currentPlaylistItemIndex = 0;\n this.version = { major: 0, minor: 0, patch: 0, hotfix: 0 };\n if (!BridgeClient.instance) {\n BridgeClient.instance = this;\n }\n else {\n return BridgeClient.instance;\n }\n }\n static getInstance() {\n if (!BridgeClient.instance) {\n BridgeClient.instance = new BridgeClient();\n }\n return BridgeClient.instance;\n }\n /**\n * A helper function to check and see if Looking Glass Bridge is running or not.\n * @returns boolean, true if Bridge is running, false if Bridge is not running\n */\n async status() {\n this.log(\"%c function call: status \", \"color: magenta; font-weight: bold; border: solid\");\n const timeout = new Promise((reject) => {\n let id = setTimeout(() => {\n clearTimeout(id);\n reject(new Error(\"Timed out\"));\n }, 5000);\n });\n try {\n const response = (await Promise.race([fetch(\"http://localhost:33334/\"), timeout]));\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n return true;\n }\n catch (error) {\n const err = error;\n if (err.message === \"Timed out\") {\n this.warn(\"Request timed out\");\n }\n else {\n console.warn(`Looking Glass Bridge is not running, please start Bridge and try again.`);\n }\n return false;\n }\n }\n /**\n * Attempt to connect to Looking Glass Bridge.\n * @returns\n */\n async connect() {\n this.log(\"%c function call: connect \", \"color: magenta; font-weight: bold; border: solid\");\n // check if we're already connected\n if (this.isConnected == true) {\n console.warn(`Already connected to Looking Glass Bridge.`);\n return { success: true, response: { version: this.version, orchestration: this.orchestration } };\n }\n // check that the websocket and the http server are running\n let status = await this.status();\n if (status == false)\n return {\n success: false,\n response: { version: { major: 0, minor: 0, patch: 0, hotfix: 0 }, orchestration: \"\" },\n };\n this.isConnected = true;\n // BridgeClient.fallback = new Fallback()\n let call = await this.createOrchestration(\"\");\n if (call.success == false) {\n let version = await this.getVersion();\n if (version.success == false) {\n return { success: false, response: { version: parseBridgeVersion(\"0\"), orchestration: \"\" } };\n }\n else if (version.response.major < 2 && version.response.minor < 1) {\n return { success: false, response: { version: version.response, orchestration: \"\" } };\n }\n }\n // create event source and fallback\n await this.subscribeToEvents();\n BridgeClient.eventsource.connectEvent();\n new NewItemPlayingMessageHandler({ client: this });\n return { success: true, response: { version: this.version, orchestration: this.orchestration } };\n }\n /**\n * Creates an orchestration called \"default\" if one does not already exist.\n * @returns string, the name of the current orchestration\n */\n async createOrchestration(name) {\n this.log(\"%c function call: createOrchestration \", \"color: magenta; font-weight: bold; border: solid\");\n if ((await this.status()) == false) {\n return { success: false, response: null };\n }\n const version = await this.getVersion();\n if (version.response.major < 2 && version.response.minor < 1) {\n console.error(`Unable to get Looking Glass Bridge version, please upgrade Looking Glass Bridge.`);\n return { success: false, response: null };\n }\n let new_orchestration = await tryEnterOrchestration({ name: name, orchestration: this.orchestration });\n if (new_orchestration.success == true) {\n if (new_orchestration.response?.payload.value) {\n this.orchestration = new_orchestration.response?.payload.value;\n }\n }\n return { success: true, response: this.orchestration };\n }\n /**\n * Disconnect from Looking Glass Bridge, free up resources.\n */\n async disconnect() {\n this.log(\"%c function call: disconnect \", \"color: magenta; font-weight: bold; border: solid\");\n // check that we're not already disconnecting\n if (this.isDisconnecting == true || this.isConnected == false) {\n return { success: false };\n }\n this.isDisconnecting = true;\n this.manualDisconnect = true;\n let exit = await tryExitOrchestration(this.orchestration);\n if (exit.success == false) {\n console.warn(` ⚠️ Unable to exit orchestration, Bridge is not reachable.`);\n }\n // shutdown\n BridgeClient.eventsource?.disconnectEvent();\n BridgeClient.eventsource?.ws?.close();\n BridgeClient.fallback?.ws.close();\n BridgeClient.fallback = undefined;\n this.displays = [];\n this.playlists = [];\n this.currentHologram = undefined;\n this.orchestration = \"\";\n this.isDisconnecting = false;\n this.isCastPending = false;\n this.isConnected = false;\n return { success: true };\n }\n /**\n * changes the state of the Looking Glass Bridge Window\n * @param showWindow boolean, true to show the Looking Glass window, false to hide the Looking Glass window\n * @returns\n */\n async showWindow(showWindow) {\n if (this.isConnected == false)\n return { success: false, response: null };\n this.log(\"%c function call: showWindow \", \"color: magenta; font-weight: bold; border: solid\");\n let errorMessage = `this call is only supported in bridge 2.2 or newer, please upgrade Looking Glass Bridge.`;\n if ((await this.isVersionCompatible()) == false) {\n console.warn(errorMessage);\n return { success: false, response: null };\n }\n const requestBody = {\n orchestration: this.orchestration,\n show_window: showWindow,\n head_index: -1,\n };\n let message = await sendMessage({\n endpoint: \"show_window\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n }\n /**\n * A helper function to get the version of Looking Glass Bridge that is running.\n * @returns string of the version of Looking Glass Bridge that is running\n */\n async getVersion() {\n this.log(\"%c function call: getVersion \", \"color: magenta; font-weight: bold; border: solid\");\n let message = await sendMessage({ endpoint: \"bridge_version\", requestBody: {} });\n if (message.success == true) {\n let response = parseBridgeVersion(message.response.payload.value);\n this.version = response;\n return { success: true, response: this.version };\n }\n // if the bridge version fails, try the legacy version\n else {\n let version = await BridgeClient.fallback?.getLegacyVersion();\n if (version == undefined)\n return { success: false, response: parseBridgeVersion(\"0\") };\n return { success: true, response: parseBridgeVersion(version) };\n }\n }\n /**\n * A helper function to get the version of the Looking Glass Bridge API\n * @returns the current version of the Looking Glass API\n */\n async apiVersion() {\n this.log(\"%c function call: apiVersion \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false) {\n return { success: false, response: parseBridgeVersion(\"0\") };\n }\n if ((await this.isVersionCompatible()) == false)\n return { success: false, response: parseBridgeVersion(\"0\") };\n let response = await sendMessage({ endpoint: \"api_version\", requestBody: {} });\n if (response.success == false) {\n console.warn(`this call is only supported in bridge 2.2 or newer, please upgrade Looking Glass Bridge.`);\n return { success: false, response: parseBridgeVersion(\"0\") };\n }\n let APIVersion = parseBridgeVersion(response.response.payload.value);\n return { success: true, response: APIVersion };\n }\n /**\n * QueryDisplays finds all displays that are connected to the computer,\n * searches for Looking Glass displays, and returns them as an array of Display objects\n * @returns the display object\n */\n async getDisplays() {\n this.log(\"%c function call: displays \", \"color: magenta; font-weight: bold; border: solid\");\n this.displays = [];\n // if there is no orchestration, attempt to create one, if that fails, return false\n if (this.isConnected == false)\n return { success: false, response: null };\n const requestBody = {\n orchestration: this.orchestration,\n };\n let data = await sendMessage({\n endpoint: \"available_output_devices\",\n requestBody: requestBody,\n });\n if (data.success == false) {\n return { success: false, response: null };\n }\n schema.available_output_devices.safeParse(data.response);\n for (let key in data.response.payload.value) {\n let display = data.response.payload.value[`${key}`];\n if (display.value.hwid.value.includes(\"LKG\")) {\n let lkg = tryParseDisplay(display.value);\n if (lkg != undefined) {\n this.displays.push(lkg);\n }\n }\n }\n return { success: true, response: this.displays };\n }\n /**Delete the instance of the playlist from Bridge, this will stop the playlist from playing if it's active. */\n async deletePlaylist(playlist) {\n this.log(\"%c function call: deletePlaylist \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false) {\n return { success: false, response: null };\n }\n const requestBody = playlist.getInstance(this.orchestration);\n let response = await sendMessage({\n endpoint: \"delete_playlist\",\n requestBody: requestBody,\n });\n if (response.success == false) {\n return { success: false, response: null };\n }\n return response;\n }\n /**\n * This function will allow you to cast a single hologram to the Looking Glass\n * @param hologram\n */\n async cast(hologram) {\n if (this.isConnected == false)\n return { success: false };\n this.log(\"%c function call: cast \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isCastPending == true) {\n this.warn(\"already casting please wait\");\n return { success: false };\n }\n this.isCastPending = true;\n // try to find an existing cast playlist\n let randomName = \"Cast_\" + Math.random().toString(36).substring(7);\n let playlist = undefined;\n // if our cast playlist doesn't exist, create one\n if (playlist == undefined) {\n playlist = new Playlist({\n name: randomName,\n loop: true,\n items: [],\n orchestration: this.orchestration,\n });\n this.playlists?.push(playlist);\n }\n // add the hologram to the playlist, and seek to it\n let currentCastItem = playlist.addItem(hologram);\n if (currentCastItem !== undefined) {\n await playlist.play();\n // delete old playlists\n this.playlists?.forEach((playlist) => {\n if (playlist.name != randomName) {\n this.deletePlaylist(playlist);\n this.playlists?.splice(this.playlists.indexOf(playlist), 1);\n }\n });\n //update the current playlist index value.\n this.currentPlaylistIndex = this.playlists?.indexOf(playlist) ?? 0;\n //update the current playlistItem Index value.\n this.currentPlaylistItemIndex = currentCastItem.index;\n }\n else {\n return { success: false };\n }\n this.currentHologram = hologram;\n this.isCastPending = false;\n return { success: true };\n }\n getCurrentPlaylist() {\n return this.playlists?.[this.currentPlaylistIndex];\n }\n async playRemotePlaylist(holograms, index = 0) {\n if (!this.isConnected && !(await this.connect()).success) {\n return { success: false };\n }\n console.log(\"%c function call: playRemotePlaylist \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isCastPending == true) {\n return { success: false };\n }\n this.isCastPending = true;\n // try to find an existing cast playlist\n let randomName = \"Cast_\" + Math.random().toString(36).substring(7);\n const playlist = new Playlist({\n name: randomName,\n loop: true,\n items: holograms,\n orchestration: this.orchestration,\n });\n this.playlists?.push(playlist);\n // delete old playlists\n this.playlists?.forEach((playlist) => {\n if (playlist.name != randomName) {\n this.deletePlaylist(playlist);\n this.playlists?.splice(this.playlists.indexOf(playlist), 1);\n }\n });\n //update the current playlist index value.\n this.currentPlaylistIndex = this.playlists?.indexOf(playlist) ?? 0;\n //update the current playlistItem Index value.\n this.currentPlaylistItemIndex = index;\n this.currentHologram = holograms[index];\n this.isCastPending = false;\n await playlist.play();\n return { success: true };\n }\n /**Play a Playlist created by Looking Glass Studio, requires the full path to the playlist.json file. */\n async playStudioPlaylist(playlistPath) {\n this.log(\"%c function call: subscribeToEvents \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false)\n return { success: false, response: null };\n const requestBody = {\n orchestration: this.orchestration,\n name: \"Studio Playlist\",\n playlist_path: playlistPath,\n loop: true,\n };\n await sendMessage({\n endpoint: \"instance_studio_playlist\",\n requestBody: requestBody,\n });\n const playRequestBody = {\n orchestration: this.orchestration,\n name: \"Studio Playlist\",\n head_index: -1,\n };\n let play_playlist = await sendMessage({\n endpoint: \"play_playlist\",\n requestBody: playRequestBody,\n });\n return { success: true, response: play_playlist.response };\n }\n /**stop playing the studio playlist */\n async stopStudioPlaylist() {\n this.log(\"%c function call: stopStudioPlaylist \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false)\n return { success: false };\n const requestBody = {\n orchestration: this.orchestration,\n name: \"Studio Playlist\",\n loop: false,\n };\n let message = await sendMessage({\n endpoint: \"delete_playlist\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false };\n }\n await this.showWindow(false);\n return { success: true };\n }\n /**Get the current playlist that is set to start automatically */\n async getAutoStartPlaylist() {\n this.log(\"%c function call: getAutoStartPlaylist \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false)\n return { success: false, response: null };\n let requestBody = {\n orchestration: this.orchestration,\n head_index: -1,\n };\n let message = await sendMessage({\n endpoint: \"get_autostart_playlist\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n }\n /**Choose a Playlist that exists on the local file system to set as the start up playlist */\n async setAutoStartPlaylist(args) {\n this.log(\"%c function call: setAutoStartPlaylist \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false)\n return { success: false, response: null };\n let requestBody = {\n orchestration: this.orchestration,\n head_index: -1,\n playlist_name: args.playlistName,\n playlist_path: args.playlistPath,\n };\n let message = await sendMessage({\n endpoint: \"set_autostart_playlist\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n }\n /**set a playlist to auto-start, requires that all files are local on the system */\n async createAutoStartPlaylist(args) {\n this.log(\"%c function call: createAutoStartPlaylist \", \"color: magenta; font-weight: bold; border: solid\");\n if (this.isConnected == false)\n return { success: false, response: null };\n // check that all holograms are local\n for (let i = 0; i < args.playlist.items.length; i++) {\n let item = args.playlist.items[i];\n if (item.hologram.uri.includes(\"http\")) {\n this.warn(\"playlist contains a web uri, cannot create autostart playlist\");\n return { success: false, response: null };\n }\n }\n let requestBody = {\n orchestration: this.orchestration,\n head_index: -1,\n playlist_name: args.playlist.name,\n };\n let message = await sendMessage({\n endpoint: \"set_named_autostart_playlist\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n }\n // TRANSPORT CONTROLS\n /**Play the currently instanced playlist */\n async play() {\n let requestBody = {\n orchestration: this.orchestration,\n };\n let message = await sendMessage({\n endpoint: \"transport_control_play\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n this.playState = \"PLAYING\";\n return { success: true, response: message.response };\n }\n /**Pause the currently playing playlist */\n async pause() {\n let requestBody = {\n orchestration: this.orchestration,\n };\n let message = await sendMessage({\n endpoint: \"transport_control_pause\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n this.playState = \"PAUSED\";\n return { success: true, response: message.response };\n }\n /**Got to the next playlist item */\n async next() {\n let requestBody = {\n orchestration: this.orchestration,\n };\n let message = await sendMessage({\n endpoint: \"transport_control_next\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n const playlist = this.getCurrentPlaylist();\n const loop = playlist?.loop;\n const length = playlist?.items.length;\n const index = this.currentPlaylistItemIndex;\n if (index + 1 === length) {\n if (loop) {\n this.currentPlaylistItemIndex = 0;\n }\n //TODO: Handle case where we've reached end of playlist\n }\n else {\n this.currentPlaylistItemIndex++;\n }\n return { success: true, response: message.response };\n }\n /**Go to the previous playlist item */\n async previous() {\n let requestBody = {\n orchestration: this.orchestration,\n };\n let message = await sendMessage({\n endpoint: \"transport_control_previous\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n const playlist = this.getCurrentPlaylist();\n const loop = playlist?.loop;\n const length = playlist?.items.length;\n const index = this.currentPlaylistIndex;\n if (index === 0) {\n if (loop && length) {\n this.currentPlaylistItemIndex = length;\n }\n else {\n //TODO: Repeat first track\n }\n }\n else {\n this.currentPlaylistItemIndex--;\n }\n return { success: true, response: message.response };\n }\n /**Seek to a specific item in a playlist */\n async seek(index) {\n let requestBody = {\n orchestration: this.orchestration,\n index: index,\n };\n let message = await sendMessage({\n endpoint: \"transport_control_seek_to_index\",\n requestBody: requestBody,\n });\n if (message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n }\n /**\n * Connect to Looking Glass Bridge's EventSource.\n * The event source is a websocket connection that will send events from Bridge to the client.\n * @returns the bridge event source\n */\n async subscribeToEvents() {\n this.log(\"%c function call: subscribeToEvents \", \"color: magenta; font-weight: bold; border: solid\");\n let events = await BridgeClient.eventsource?.connectToBridgeEventSource(this.orchestration);\n if (events?.success == true)\n return { success: true };\n else\n return { success: false };\n }\n /**\n * Adds an event listener that returns a message from Bridge's websocket based event source.\n * @param event the event to listen for\n * @param MessageHandler the function to call when the event is received\n */\n async addEventListener(event, MessageHandler) {\n if (BridgeClient.eventsource == undefined) {\n await this.subscribeToEvents();\n }\n else {\n BridgeClient.eventsource.addMessageHandler({ event: event, MessageHandler: MessageHandler });\n }\n }\n async removeEventListener(event, MessageHandler) {\n if (BridgeClient.eventsource == undefined) {\n await this.subscribeToEvents();\n }\n else {\n BridgeClient.eventsource.removeMessageHandler({ event: event, MessageHandler: MessageHandler });\n }\n }\n /**Update the parameters of the current hologram */\n async updateCurrentHologram({ name, parameter, value, }) {\n let requestBody = {\n orchestration: this.orchestration,\n name: name,\n [parameter]: `${value}`,\n };\n let message = await sendMessage({ endpoint: \"update_current_entry\", requestBody: requestBody });\n if (message.success == false) {\n return { success: false, response: null };\n }\n return { success: true, response: message.response };\n }\n getCurrentHologram() {\n return this.currentHologram;\n }\n getVerbosity() {\n return BridgeClient.verbosity;\n }\n /**\n *Set the level of console logging that Bridge.js library will do.\n * @param verbosity 0 = no logging, 1 = errors only, 2 = only bridge values, 3 = full bridge response\n */\n setVerbosity(verbosity) {\n BridgeClient.verbosity = verbosity;\n }\n /**Asbtraction for logging with verbosity setting */\n log(...messages) {\n if (BridgeClient.verbosity >= 2) {\n console.log.apply(console, messages);\n }\n }\n /**Asbtraction for logging with verbosity setting */\n warn(...messages) {\n if (BridgeClient.verbosity >= 1) {\n console.warn.apply(messages);\n }\n }\n /**Asbtraction for logging with verbosity setting */\n error(...messages) {\n if (BridgeClient.verbosity >= 0) {\n console.error.apply(messages);\n }\n }\n /**\n * helper function for determining if the version of Bridge is valid.\n * @returns boolean, true if the version is compatible, false if not\n */\n async isVersionCompatible() {\n if (this.version.major == 0) {\n this.isConnected = false;\n }\n else if (this.version.major < 2 && this.version.minor < 1) {\n this.warn(\"Please update to the latest version for the best experience\");\n this.isConnected = false;\n }\n else if (this.version.major >= 2 && this.version.minor >= 2) {\n this.isConnected = true;\n }\n return this.isConnected;\n }\n}\n","import { z } from \"zod\";\n/**a utility to allow us to have ranges in our schemas */\nexport const numberRange = (min, max) => {\n return z.number().refine((value) => value >= min && value <= max, {\n message: `The value should be between ${min} and ${max}`,\n });\n};\n","import { numberRange } from \"./schema.utils\";\nexport const ASPECT = {\n min: 0.1,\n max: 10,\n range: numberRange(0.1, 10),\n type: \"float\",\n};\nexport const DEPTHINESS = {\n min: 0.1,\n max: 4,\n range: numberRange(0.1, 4),\n type: \"float\",\n};\nexport const DEPTH_CUTOFF = {\n min: 0,\n max: 1,\n range: numberRange(0, 1),\n type: \"float\",\n};\nexport const CROP_POS_X = {\n min: -1,\n max: 1,\n range: numberRange(-1, 1),\n type: \"float\",\n};\nexport const CROP_POS_Y = {\n min: -1,\n max: 1,\n range: numberRange(-1, 1),\n type: \"float\",\n};\nexport const ZOOM = {\n min: 0.1,\n max: 2,\n range: numberRange(0.1, 2),\n type: \"float\",\n};\nexport const FOCUS = {\n min: -0.05,\n max: 0.05,\n range: numberRange(-0.05, 0.05),\n type: \"float\",\n};\nexport const QUILT_ROWS = {\n min: 1,\n max: 50,\n range: numberRange(1, 50),\n type: \"int\",\n};\nexport const QUILT_COLS = {\n min: 1,\n max: 50,\n range: numberRange(1, 50),\n type: \"int\",\n};\nexport const QUILT_VIEW_COUNT = {\n min: 1,\n max: 2500,\n range: numberRange(1, 2500),\n type: \"int\",\n};\n","import { z } from \"zod\";\nimport { DEPTHINESS, ZOOM } from \"./defaults\";\nexport const hologramTypeSchema = z.union([z.literal(\"quilt\"), z.literal(\"rgbd\")]);\nexport const QuiltHologramArgs = z.object({\n rows: z.number(),\n columns: z.number(),\n aspect: z.number(),\n viewCount: z.number(),\n focus: z.number().optional(),\n});\nexport const RGBDHologramArgs = z.object({\n /**Aspect Ratio of the hologram,\n * this should match the source image you provide, not the RGBD Pair */\n aspect: z.number(),\n /**Where are the holograms located?\n * 0 Top\n * 1 Bottom\n * 2 Right\n * 3 Left */\n depth_loc: z.union([z.literal(0), z.literal(1), z.literal(2), z.literal(3)]),\n /**Is the Depth inverted? 0 for false, 1 for true */\n depth_inversion: z.union([z.literal(0), z.literal(1)]),\n /**Is the depth map chroma or grayscale? 0 for false, 1 for true */\n chroma_depth: z.union([z.literal(0), z.literal(1)]),\n /**Depthiness can be a value between 0.1 and 2 */\n depthiness: DEPTHINESS.range,\n /**Controls the Focus of the hologram */\n focus: z.number().optional(),\n /**Whether or not to cutoff depth beyond a certain point. 0 for false, 1 for true */\n depth_cutoff: z.union([z.literal(1), z.literal(0)]).optional(),\n /**Zoom can be between 0.1 and 2 */\n zoom: ZOOM.range,\n});\nexport const hologramMap = {\n quilt: QuiltHologramArgs,\n rgbd: RGBDHologramArgs,\n};\n","import * as schema from \"../schemas/schema.hologram\";\n/**Create a new Quilt Hologram */\nexport class QuiltHologram {\n uri;\n type;\n settings;\n constructor(args) {\n this.uri = args.uri;\n this.type = \"quilt\";\n this.settings = args.settings;\n }\n}\n/**Create a new RGBD Hologram */\nexport class RGBDHologram {\n uri;\n type;\n settings;\n constructor(args) {\n this.uri = args.uri;\n this.type = \"rgbd\";\n this.settings = args.settings;\n }\n}\n/**Allow the user to create a hologram manually based on type,\n * this is useful for when we want to allow the end user to create a hologram themselves via a UI interface */\nexport function hologramFactory({ uri, type, settings, }) {\n const ArgsSchema = schema.hologramMap[type];\n ArgsSchema.safeParse(settings);\n switch (type) {\n case \"quilt\":\n return new QuiltHologram({ uri, settings: settings });\n case \"rgbd\":\n return new RGBDHologram({ uri, settings: settings });\n default:\n throw new Error(`Invalid type: ${type}`);\n }\n}\n","import { z } from \"zod\";\nimport { DEPTHINESS, ZOOM } from \"./defaults\";\nexport const parameterNames = z.union([\n z.literal(\"focus\"),\n z.literal(\"crop_pos_x\"),\n z.literal(\"crop_pos_y\"),\n z.literal(\"zoom\"),\n //rgbd specific\n z.literal(\"depth_loc\"),\n z.literal(\"depth_inversion\"),\n z.literal(\"chroma_depth\"),\n z.literal(\"depthiness\"),\n z.literal(\"depth_cutoff\"),\n]);\nexport const hologramParamMap = z.object({\n focus: z.number().optional(),\n crop_pos_x: z.number().optional(),\n crop_pos_y: z.number().optional(),\n zoom: ZOOM.range,\n //rgbd specific\n depth_loc: z.union([z.literal(0), z.literal(1), z.literal(2), z.literal(3)]),\n depth_inversion: z.union([z.literal(0), z.literal(1)]),\n chroma_depth: z.union([z.literal(0), z.literal(1)]),\n depthiness: DEPTHINESS.range,\n depth_cutoff: z.union([z.literal(1), z.literal(0)]).optional(),\n});\n"],"names":["tryParseCalibration","value","parsedValue","tryParseQuilt","tryParseDisplay","sendMessage","params","parsedResponse","Bridge","BridgeClient","resolve","request","bridgeResponse","error","tryEnterOrchestration","name","orchestration","message","tryExitOrchestration","body","timeout","reject","id","isWindowAvailable","isWebSocketAvailable","BridgeEventSource","__publicField","event","MessageHandler","_a","client","_b","handlerIndex","handler","response","handlers","bridgeEventSource","evt","PlaylistItem","args","playlistItem","settings","QuiltPlaylistItem","RGBDPlaylistItem","Playlist","item","index","hologram","pRequestBody","i","head","requestBody","instancePlaylist","PlaylistItems","playRequestBody","util","val","assertIs","_arg","assertNever","_x","items","obj","validKeys","k","filtered","e","object","keys","key","arr","checker","joinValues","array","separator","_","objectUtil","first","second","ZodParsedType","getParsedType","data","ZodIssueCode","quotelessJson","ZodError","issues","sub","subs","actualProto","_mapper","mapper","issue","fieldErrors","processError","curr","el","formErrors","errorMap","_ctx","overrideErrorMap","setErrorMap","map","getErrorMap","makeIssue","path","errorMaps","issueData","fullPath","fullIssue","errorMessage","maps","m","EMPTY_PATH","addIssueToContext","ctx","x","ParseStatus","status","results","arrayValue","s","INVALID","pairs","syncPairs","pair","finalObject","DIRTY","OK","isAborted","isDirty","isValid","isAsync","errorUtil","ParseInputLazyPath","parent","handleResult","result","processCreateParams","invalid_type_error","required_error","description","iss","ZodType","def","input","maybeAsyncResult","check","getIssueProperties","setError","refinementData","refinement","ZodEffects","ZodFirstPartyTypeKind","ZodOptional","ZodNullable","ZodArray","ZodPromise","option","ZodUnion","incoming","ZodIntersection","transform","defaultValueFunc","ZodDefault","ZodBranded","catchValueFunc","ZodCatch","This","target","ZodPipeline","cuidRegex","cuid2Regex","ulidRegex","uuidRegex","emailRegex","emojiRegex","ipv4Regex","ipv6Regex","datetimeRegex","isValidIP","ip","version","ZodString","regex","validation","tooBig","tooSmall","options","minLength","maxLength","len","ch","min","max","floatSafeRemainder","step","valDecCount","stepDecCount","decCount","valInt","stepInt","ZodNumber","kind","inclusive","ZodBigInt","ZodBoolean","ZodDate","minDate","maxDate","ZodSymbol","ZodUndefined","ZodNull","ZodAny","ZodUnknown","ZodNever","ZodVoid","schema","deepPartialify","ZodObject","newShape","fieldSchema","ZodTuple","shape","shapeKeys","extraKeys","keyValidator","unknownKeys","catchall","_c","_d","defaultError","augmentation","merging","mask","newField","createZodEnum","handleResults","unionErrors","childCtx","dirty","types","getDiscriminator","type","ZodLazy","ZodLiteral","ZodEnum","ZodNativeEnum","ZodDiscriminatedUnion","discriminator","discriminatorValue","optionsMap","discriminatorValues","mergeValues","a","b","aType","bType","bKeys","sharedKeys","newObj","sharedValue","newArray","itemA","itemB","handleParsed","parsedLeft","parsedRight","merged","left","right","itemIndex","rest","schemas","ZodRecord","keyType","valueType","third","ZodMap","finalMap","ZodSet","finalizeSet","elements","parsedSet","element","minSize","maxSize","size","ZodFunction","makeArgsIssue","makeReturnsIssue","returns","fn","parsedArgs","parsedReturns","returnType","func","getter","values","expectedValues","enumValues","opt","nativeEnumValues","promisified","effect","processed","checkCtx","arg","executeRefinement","acc","inner","base","preprocess","newCtx","ZodNaN","BRAND","inResult","custom","fatal","p","_fatal","p2","late","instanceOfType","cls","stringType","numberType","nanType","bigIntType","booleanType","dateType","symbolType","undefinedType","nullType","anyType","unknownType","neverType","voidType","arrayType","objectType","strictObjectType","unionType","discriminatedUnionType","intersectionType","tupleType","recordType","mapType","setType","functionType","lazyType","literalType","enumType","nativeEnumType","promiseType","effectsType","optionalType","nullableType","preprocessType","pipelineType","ostring","onumber","oboolean","coerce","NEVER","z","unsigned_int","z.literal","int2","wstring","variant_map","completion","unknown","pending","failure","z.string","z.object","z.union","schema.name","schema.wstring","schema.status","schema.variant_map","displayItem","schema.unsigned_int","schema.int2","available_output_devices","MonitorConnectedMessageHandler","MonitorDisconnectedMessageHandler","ProgressStartMessageHandler","ProgressCompletionMessageHandler","ProgressUpdateMessageHandler","PlaylistInstanceMessageHandler","PlaylistInsertMessageHandler","PlaylistDeleteMessageHandler","SyncPlayPlaylistMessageHandler","SyncPlayPlaylistCompleteMessageHandler","SyncPlayPlaylistCancelledMessageHandler","NewItemPlayingMessageHandler","playlistName","playlistItemIndex","parseBridgeVersion","versionString","major","minor","patch","hotfix","_BridgeClient","new_orchestration","showWindow","schema.available_output_devices","display","lkg","playlist","randomName","currentCastItem","holograms","playlistPath","loop","length","events","parameter","verbosity","messages","numberRange","ASPECT","DEPTHINESS","DEPTH_CUTOFF","CROP_POS_X","CROP_POS_Y","ZOOM","FOCUS","QUILT_ROWS","QUILT_COLS","QUILT_VIEW_COUNT","hologramTypeSchema","QuiltHologramArgs","RGBDHologramArgs","hologramMap","QuiltHologram","RGBDHologram","hologramFactory","uri","schema.hologramMap","parameterNames","hologramParamMap"],"mappings":";;;AAAO,SAASA,GAAoBC,GAAO;AACjC,QAAAC,IAAc,KAAK,MA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A,EACvB,cAAc5D,EAAE,MAAM,CAACA,EAAE,QAAQ,CAAC,GAAGA,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS;AACjE,CAAC;","x_google_ignoreList":[6]} \ No newline at end of file diff --git a/dist/manifest.json b/dist/manifest.json new file mode 100644 index 0000000..c9f2ba1 --- /dev/null +++ b/dist/manifest.json @@ -0,0 +1,7 @@ +{ + "src/library/index.ts": { + "file": "looking-glass-bridge.js", + "isEntry": true, + "src": "src/library/index.ts" + } +} \ No newline at end of file diff --git a/dist/playlists/playlist.d.ts b/dist/playlists/playlist.d.ts new file mode 100644 index 0000000..025932d --- /dev/null +++ b/dist/playlists/playlist.d.ts @@ -0,0 +1,67 @@ +import { HologramType } from "../components/hologram"; +import { RGBDPlaylistItem, QuiltPlaylistItem } from "./playlistItems"; +export type PlaylistItemType = QuiltPlaylistItem | RGBDPlaylistItem; +export interface PlaylistType { + name: string; + loop: boolean; + items: PlaylistItemType[]; +} +export interface getPlayPlaylistJsonArgs { + orchestration: string; + head: number; +} +export interface PlaylistArgs { + /** display */ + head?: number; +} +/** + * Playlist class + * @class + * + */ +export declare class Playlist { + name: string; + loop: boolean; + items: PlaylistItemType[]; + orchestration: string; + constructor(args: { + name: string; + loop: boolean; + items?: HologramType[]; + orchestration: string; + }); + setName(name: string): void; + addItem(hologram: HologramType): PlaylistItemType | undefined; + addPlaylistItemToBridge(item: PlaylistItemType): Promise; + removeItem(item: PlaylistItemType): void; + clearItems(): void; + /** + * gets the object for the current playlist that is currently being played + * @param orchestration + * @param head + * @returns + */ + getCurrent({ orchestration, head }: getPlayPlaylistJsonArgs): { + orchestration: string; + name: string; + head_index: number; + }; + /** + * create the json object for the playlist instance + * @param orchestration + * @returns + */ + getInstance(orchestration: string): { + orchestration: string; + name: string; + loop: boolean; + }; + /** + * this function will play a playlist on a Looking Glass display + * the playlist must be created and populated with content before calling this function + * @param playlist + * @param head + * @returns + */ + play({ head }?: PlaylistArgs): Promise; +} diff --git a/dist/playlists/playlistItems.d.ts b/dist/playlists/playlistItems.d.ts new file mode 100644 index 0000000..5ed4739 --- /dev/null +++ b/dist/playlists/playlistItems.d.ts @@ -0,0 +1,57 @@ +import { z } from "zod"; +import { HologramType, QuiltHologram, RGBDHologram } from "../components/hologram"; +import { insert_playlist_entry } from "../schemas/schema.requests"; +export interface PlaylistItemArgs { + orchestration: string; + name: string; + index: number; + id: string; + uri: string; + rows: number; + cols: number; + aspect: number; + view_count: number; + isRGBD: 0 | 1; + depth_loc: 0 | 1 | 2 | 3; + depth_inversion: 0 | 1; + chroma_depth: 0 | 1; + depthiness: number; + zoom: number; +} +/**Playist items are what we actually end up sending to Bridge. + * These are managed by the Playlist class, and should not be called externally. + * We take the hologram object the user creates and prepare it to be added to a playlist with the toBridge function. */ +declare class PlaylistItem { + orchestration: string; + hologram: HologramType; + id: number; + index: number; + playlistName: string; + constructor(args: { + hologram: HologramType; + id: number; + index: number; + playlistName: string; + orchestration: string; + }); + toBridge(): z.infer | never; +} +export declare class QuiltPlaylistItem extends PlaylistItem { + constructor(args: { + hologram: QuiltHologram; + id: number; + index: number; + playlistName: string; + orchestration: string; + }); +} +export declare class RGBDPlaylistItem extends PlaylistItem { + constructor(args: { + hologram: RGBDHologram; + id: number; + index: number; + playlistName: string; + orchestration: string; + }); +} +export {}; diff --git a/dist/schemas/defaults.d.ts b/dist/schemas/defaults.d.ts new file mode 100644 index 0000000..189e678 --- /dev/null +++ b/dist/schemas/defaults.d.ts @@ -0,0 +1,21 @@ +import { numberRange } from "./schema.utils"; +/**for certain values we need defaults in order to define our type schemas and also clamp values. + * This helps prevent sending bridge values that are out of range. + */ +export type NumberType = "int" | "float"; +export interface defaults { + min: number; + max: number; + range: ReturnType; + type: NumberType; +} +export declare const ASPECT: defaults; +export declare const DEPTHINESS: defaults; +export declare const DEPTH_CUTOFF: defaults; +export declare const CROP_POS_X: defaults; +export declare const CROP_POS_Y: defaults; +export declare const ZOOM: defaults; +export declare const FOCUS: defaults; +export declare const QUILT_ROWS: defaults; +export declare const QUILT_COLS: defaults; +export declare const QUILT_VIEW_COUNT: defaults; diff --git a/dist/schemas/schema.d.ts b/dist/schemas/schema.d.ts new file mode 100644 index 0000000..db2116e --- /dev/null +++ b/dist/schemas/schema.d.ts @@ -0,0 +1,25 @@ +import * as z from "zod"; +export declare const unsigned_int: z.ZodLiteral<"UNSIGNED_INT">; +export declare const int: z.ZodLiteral<"INT">; +export declare const float: z.ZodLiteral<"FLOAT">; +export declare const int2: z.ZodLiteral<"INT2">; +export declare const wstring: z.ZodLiteral<"WSTRING">; +export declare const variant_map: z.ZodLiteral<"VARIANT_MAP">; +export declare const completion: z.ZodLiteral<"Completion">; +export declare const unknown: z.ZodLiteral<"UnknownOrchestration">; +export declare const pending: z.ZodLiteral<"Pending">; +export declare const failure: z.ZodLiteral<"Failure">; +export declare const name: z.ZodString; +export declare const status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; +}, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; +}, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; +}>; diff --git a/dist/schemas/schema.events.d.ts b/dist/schemas/schema.events.d.ts new file mode 100644 index 0000000..b58601c --- /dev/null +++ b/dist/schemas/schema.events.d.ts @@ -0,0 +1,1978 @@ +import { z } from "zod"; +export declare const BridgeEvent: z.ZodUnion<[z.ZodLiteral<"Monitor Connect">, z.ZodLiteral<"Monitor Disconnect">, z.ZodLiteral<"Progress Start">, z.ZodLiteral<"Progress Completion">, z.ZodLiteral<"Progress Update">, z.ZodLiteral<"Playlist Instance">, z.ZodLiteral<"Playlist Insert">, z.ZodLiteral<"Playlist Delete">, z.ZodLiteral<"Sync/Play Playlist">, z.ZodLiteral<"Sync/Play Playlist Complete">, z.ZodLiteral<"Sync/Play Playlist Cancelled">, z.ZodLiteral<"Transport Control Pause">]>; +export declare const monitorConnectResponse: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + event: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Monitor Connect">, z.ZodLiteral<"Monitor Disconnect">, z.ZodLiteral<"Progress Start">, z.ZodLiteral<"Progress Completion">, z.ZodLiteral<"Progress Update">, z.ZodLiteral<"Playlist Instance">, z.ZodLiteral<"Playlist Insert">, z.ZodLiteral<"Playlist Delete">, z.ZodLiteral<"Sync/Play Playlist">, z.ZodLiteral<"Sync/Play Playlist Complete">, z.ZodLiteral<"Sync/Play Playlist Cancelled">, z.ZodLiteral<"Transport Control Pause">]>; + }, "strip", z.ZodTypeAny, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }>; + head_index: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"UNSIGNED_INT">; + value: z.ZodNumber; + }, "strip", z.ZodTypeAny, { + value: number; + name: string; + type: "UNSIGNED_INT"; + }, { + value: number; + name: string; + type: "UNSIGNED_INT"; + }>; + height: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"UNSIGNED_INT">; + value: z.ZodNumber; + }, "strip", z.ZodTypeAny, { + value: number; + name: string; + type: "UNSIGNED_INT"; + }, { + value: number; + name: string; + type: "UNSIGNED_INT"; + }>; + hw: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + hw_long_name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + hw_short_name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + made_by_looking_glass: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + message: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + width: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"UNSIGNED_INT">; + value: z.ZodNumber; + }, "strip", z.ZodTypeAny, { + value: number; + name: string; + type: "UNSIGNED_INT"; + }, { + value: number; + name: string; + type: "UNSIGNED_INT"; + }>; + x: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"INT">; + value: z.ZodNumber; + }, "strip", z.ZodTypeAny, { + value: number; + name: string; + type: "INT"; + }, { + value: number; + name: string; + type: "INT"; + }>; + y: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"INT">; + value: z.ZodNumber; + }, "strip", z.ZodTypeAny, { + value: number; + name: string; + type: "INT"; + }, { + value: number; + name: string; + type: "INT"; + }>; + }, "strip", z.ZodTypeAny, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + x: { + value: number; + name: string; + type: "INT"; + }; + y: { + value: number; + name: string; + type: "INT"; + }; + head_index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + height: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + hw: { + value: string; + name: string; + type: "WSTRING"; + }; + hw_long_name: { + value: string; + name: string; + type: "WSTRING"; + }; + hw_short_name: { + value: string; + name: string; + type: "WSTRING"; + }; + made_by_looking_glass: { + value: string; + name: string; + type: "WSTRING"; + }; + width: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + }, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + x: { + value: number; + name: string; + type: "INT"; + }; + y: { + value: number; + name: string; + type: "INT"; + }; + head_index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + height: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + hw: { + value: string; + name: string; + type: "WSTRING"; + }; + hw_long_name: { + value: string; + name: string; + type: "WSTRING"; + }; + hw_short_name: { + value: string; + name: string; + type: "WSTRING"; + }; + made_by_looking_glass: { + value: string; + name: string; + type: "WSTRING"; + }; + width: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + x: { + value: number; + name: string; + type: "INT"; + }; + y: { + value: number; + name: string; + type: "INT"; + }; + head_index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + height: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + hw: { + value: string; + name: string; + type: "WSTRING"; + }; + hw_long_name: { + value: string; + name: string; + type: "WSTRING"; + }; + hw_short_name: { + value: string; + name: string; + type: "WSTRING"; + }; + made_by_looking_glass: { + value: string; + name: string; + type: "WSTRING"; + }; + width: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + x: { + value: number; + name: string; + type: "INT"; + }; + y: { + value: number; + name: string; + type: "INT"; + }; + head_index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + height: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + hw: { + value: string; + name: string; + type: "WSTRING"; + }; + hw_long_name: { + value: string; + name: string; + type: "WSTRING"; + }; + hw_short_name: { + value: string; + name: string; + type: "WSTRING"; + }; + made_by_looking_glass: { + value: string; + name: string; + type: "WSTRING"; + }; + width: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + x: { + value: number; + name: string; + type: "INT"; + }; + y: { + value: number; + name: string; + type: "INT"; + }; + head_index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + height: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + hw: { + value: string; + name: string; + type: "WSTRING"; + }; + hw_long_name: { + value: string; + name: string; + type: "WSTRING"; + }; + hw_short_name: { + value: string; + name: string; + type: "WSTRING"; + }; + made_by_looking_glass: { + value: string; + name: string; + type: "WSTRING"; + }; + width: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + x: { + value: number; + name: string; + type: "INT"; + }; + y: { + value: number; + name: string; + type: "INT"; + }; + head_index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + height: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + hw: { + value: string; + name: string; + type: "WSTRING"; + }; + hw_long_name: { + value: string; + name: string; + type: "WSTRING"; + }; + hw_short_name: { + value: string; + name: string; + type: "WSTRING"; + }; + made_by_looking_glass: { + value: string; + name: string; + type: "WSTRING"; + }; + width: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const progressUpdateResponse: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + event: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Monitor Connect">, z.ZodLiteral<"Monitor Disconnect">, z.ZodLiteral<"Progress Start">, z.ZodLiteral<"Progress Completion">, z.ZodLiteral<"Progress Update">, z.ZodLiteral<"Playlist Instance">, z.ZodLiteral<"Playlist Insert">, z.ZodLiteral<"Playlist Delete">, z.ZodLiteral<"Sync/Play Playlist">, z.ZodLiteral<"Sync/Play Playlist Complete">, z.ZodLiteral<"Sync/Play Playlist Cancelled">, z.ZodLiteral<"Transport Control Pause">]>; + }, "strip", z.ZodTypeAny, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }>; + message: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + progress: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"FLOAT">; + value: z.ZodNumber; + }, "strip", z.ZodTypeAny, { + value: number; + name: string; + type: "FLOAT"; + }, { + value: number; + name: string; + type: "FLOAT"; + }>; + progress_type: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + progress: { + value: number; + name: string; + type: "FLOAT"; + }; + progress_type: { + value: string; + name: string; + type: "WSTRING"; + }; + }, { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + progress: { + value: number; + name: string; + type: "FLOAT"; + }; + progress_type: { + value: string; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + progress: { + value: number; + name: string; + type: "FLOAT"; + }; + progress_type: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + progress: { + value: number; + name: string; + type: "FLOAT"; + }; + progress_type: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + progress: { + value: number; + name: string; + type: "FLOAT"; + }; + progress_type: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + progress: { + value: number; + name: string; + type: "FLOAT"; + }; + progress_type: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const insertPlaylistResponse: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + event: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Monitor Connect">, z.ZodLiteral<"Monitor Disconnect">, z.ZodLiteral<"Progress Start">, z.ZodLiteral<"Progress Completion">, z.ZodLiteral<"Progress Update">, z.ZodLiteral<"Playlist Instance">, z.ZodLiteral<"Playlist Insert">, z.ZodLiteral<"Playlist Delete">, z.ZodLiteral<"Sync/Play Playlist">, z.ZodLiteral<"Sync/Play Playlist Complete">, z.ZodLiteral<"Sync/Play Playlist Cancelled">, z.ZodLiteral<"Transport Control Pause">]>; + }, "strip", z.ZodTypeAny, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }>; + index: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"UNSIGNED_INT">; + value: z.ZodNumber; + }, "strip", z.ZodTypeAny, { + value: number; + name: string; + type: "UNSIGNED_INT"; + }, { + value: number; + name: string; + type: "UNSIGNED_INT"; + }>; + message: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + uri: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + uri: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }, { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + uri: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + uri: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + uri: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + uri: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + uri: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const instancePlaylistResponse: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + event: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Monitor Connect">, z.ZodLiteral<"Monitor Disconnect">, z.ZodLiteral<"Progress Start">, z.ZodLiteral<"Progress Completion">, z.ZodLiteral<"Progress Update">, z.ZodLiteral<"Playlist Instance">, z.ZodLiteral<"Playlist Insert">, z.ZodLiteral<"Playlist Delete">, z.ZodLiteral<"Sync/Play Playlist">, z.ZodLiteral<"Sync/Play Playlist Complete">, z.ZodLiteral<"Sync/Play Playlist Cancelled">, z.ZodLiteral<"Transport Control Pause">]>; + }, "strip", z.ZodTypeAny, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }>; + message: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const deletePlaylistResponse: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + event: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Monitor Connect">, z.ZodLiteral<"Monitor Disconnect">, z.ZodLiteral<"Progress Start">, z.ZodLiteral<"Progress Completion">, z.ZodLiteral<"Progress Update">, z.ZodLiteral<"Playlist Instance">, z.ZodLiteral<"Playlist Insert">, z.ZodLiteral<"Playlist Delete">, z.ZodLiteral<"Sync/Play Playlist">, z.ZodLiteral<"Sync/Play Playlist Complete">, z.ZodLiteral<"Sync/Play Playlist Cancelled">, z.ZodLiteral<"Transport Control Pause">]>; + }, "strip", z.ZodTypeAny, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }>; + message: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const transportControlPauseResponse: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + event: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Monitor Connect">, z.ZodLiteral<"Monitor Disconnect">, z.ZodLiteral<"Progress Start">, z.ZodLiteral<"Progress Completion">, z.ZodLiteral<"Progress Update">, z.ZodLiteral<"Playlist Instance">, z.ZodLiteral<"Playlist Insert">, z.ZodLiteral<"Playlist Delete">, z.ZodLiteral<"Sync/Play Playlist">, z.ZodLiteral<"Sync/Play Playlist Complete">, z.ZodLiteral<"Sync/Play Playlist Cancelled">, z.ZodLiteral<"Transport Control Pause">]>; + }, "strip", z.ZodTypeAny, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }>; + message: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + message: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const newItemPlayingResponse: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + event: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Monitor Connect">, z.ZodLiteral<"Monitor Disconnect">, z.ZodLiteral<"Progress Start">, z.ZodLiteral<"Progress Completion">, z.ZodLiteral<"Progress Update">, z.ZodLiteral<"Playlist Instance">, z.ZodLiteral<"Playlist Insert">, z.ZodLiteral<"Playlist Delete">, z.ZodLiteral<"Sync/Play Playlist">, z.ZodLiteral<"Sync/Play Playlist Complete">, z.ZodLiteral<"Sync/Play Playlist Cancelled">, z.ZodLiteral<"Transport Control Pause">]>; + }, "strip", z.ZodTypeAny, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }, { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }>; + index: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"UNSIGNED_INT">; + value: z.ZodNumber; + }, "strip", z.ZodTypeAny, { + value: number; + name: string; + type: "UNSIGNED_INT"; + }, { + value: number; + name: string; + type: "UNSIGNED_INT"; + }>; + playlist_name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }, { + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + event: { + value: "Monitor Connect" | "Monitor Disconnect" | "Progress Start" | "Progress Completion" | "Progress Update" | "Playlist Instance" | "Playlist Insert" | "Playlist Delete" | "Sync/Play Playlist" | "Sync/Play Playlist Complete" | "Sync/Play Playlist Cancelled" | "Transport Control Pause"; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export type BridgeEventMap = { + "Monitor Connect": z.infer; + "Monitor Disconnect": z.infer; + "Progress Start": z.infer; + "Progress Completion": z.infer; + "Progress Update": z.infer; + "Playlist Instance": z.infer; + "Playlist Insert": z.infer; + "Playlist Delete": z.infer; + "Sync/Play Playlist": z.infer; + "Sync/Play Playlist Complete": z.infer; + "Sync/Play Playlist Cancelled": z.infer; + "Transport Control Pause": z.infer; + "New Item Playing": z.infer; + /**CUSTOM CLIENT EVENTS BELOW THESE ARE NOT PART OF BRIDGE */ + "Bridge Connected": z.infer; + "Bridge Disconnected": z.infer; +}; +export type BridgeEventKey = keyof BridgeEventMap; diff --git a/dist/schemas/schema.failures.d.ts b/dist/schemas/schema.failures.d.ts new file mode 100644 index 0000000..01fcb10 --- /dev/null +++ b/dist/schemas/schema.failures.d.ts @@ -0,0 +1,127 @@ +import { z } from "zod"; +export declare const play_playist_failure: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + message: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + }, { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; diff --git a/dist/schemas/schema.hologram.d.ts b/dist/schemas/schema.hologram.d.ts new file mode 100644 index 0000000..2315563 --- /dev/null +++ b/dist/schemas/schema.hologram.d.ts @@ -0,0 +1,75 @@ +import { z } from "zod"; +import { QuiltHologram, RGBDHologram } from ".."; +export declare const hologramTypeSchema: z.ZodUnion<[z.ZodLiteral<"quilt">, z.ZodLiteral<"rgbd">]>; +export type hologramTypes = z.infer; +export declare const QuiltHologramArgs: z.ZodObject<{ + rows: z.ZodNumber; + columns: z.ZodNumber; + aspect: z.ZodNumber; + viewCount: z.ZodNumber; + focus: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + rows: number; + aspect: number; + columns: number; + viewCount: number; + focus?: number | undefined; +}, { + rows: number; + aspect: number; + columns: number; + viewCount: number; + focus?: number | undefined; +}>; +export declare const RGBDHologramArgs: z.ZodObject<{ + /**Aspect Ratio of the hologram, + * this should match the source image you provide, not the RGBD Pair */ + aspect: z.ZodNumber; + /**Where are the holograms located? + * 0 Top + * 1 Bottom + * 2 Right + * 3 Left */ + depth_loc: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>; + /**Is the Depth inverted? 0 for false, 1 for true */ + depth_inversion: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>; + /**Is the depth map chroma or grayscale? 0 for false, 1 for true */ + chroma_depth: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>; + /**Depthiness can be a value between 0.1 and 2 */ + depthiness: z.ZodEffects; + /**Controls the Focus of the hologram */ + focus: z.ZodOptional; + /**Whether or not to cutoff depth beyond a certain point. 0 for false, 1 for true */ + depth_cutoff: z.ZodOptional, z.ZodLiteral<0>]>>; + /**Zoom can be between 0.1 and 2 */ + zoom: z.ZodEffects; +}, "strip", z.ZodTypeAny, { + zoom: number; + depth_loc: 0 | 2 | 1 | 3; + depth_inversion: 0 | 1; + chroma_depth: 0 | 1; + depthiness: number; + aspect: number; + focus?: number | undefined; + depth_cutoff?: 0 | 1 | undefined; +}, { + zoom: number; + depth_loc: 0 | 2 | 1 | 3; + depth_inversion: 0 | 1; + chroma_depth: 0 | 1; + depthiness: number; + aspect: number; + focus?: number | undefined; + depth_cutoff?: 0 | 1 | undefined; +}>; +export interface HologramClasses { + quilt: QuiltHologram; + rgbd: RGBDHologram; +} +export declare const hologramMap: { + [type in keyof HologramClasses]: any; +}; +export type HologramSettings = { + quilt: z.infer; + rgbd: z.infer; +}; diff --git a/dist/schemas/schema.parameters.d.ts b/dist/schemas/schema.parameters.d.ts new file mode 100644 index 0000000..05d1b76 --- /dev/null +++ b/dist/schemas/schema.parameters.d.ts @@ -0,0 +1,34 @@ +import { z } from "zod"; +export declare const parameterNames: z.ZodUnion<[z.ZodLiteral<"focus">, z.ZodLiteral<"crop_pos_x">, z.ZodLiteral<"crop_pos_y">, z.ZodLiteral<"zoom">, z.ZodLiteral<"depth_loc">, z.ZodLiteral<"depth_inversion">, z.ZodLiteral<"chroma_depth">, z.ZodLiteral<"depthiness">, z.ZodLiteral<"depth_cutoff">]>; +export declare const hologramParamMap: z.ZodObject<{ + focus: z.ZodOptional; + crop_pos_x: z.ZodOptional; + crop_pos_y: z.ZodOptional; + zoom: z.ZodEffects; + depth_loc: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>; + depth_inversion: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>; + chroma_depth: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>; + depthiness: z.ZodEffects; + depth_cutoff: z.ZodOptional, z.ZodLiteral<0>]>>; +}, "strip", z.ZodTypeAny, { + zoom: number; + depth_loc: 0 | 2 | 1 | 3; + depth_inversion: 0 | 1; + chroma_depth: 0 | 1; + depthiness: number; + focus?: number | undefined; + crop_pos_x?: number | undefined; + crop_pos_y?: number | undefined; + depth_cutoff?: 0 | 1 | undefined; +}, { + zoom: number; + depth_loc: 0 | 2 | 1 | 3; + depth_inversion: 0 | 1; + chroma_depth: 0 | 1; + depthiness: number; + focus?: number | undefined; + crop_pos_x?: number | undefined; + crop_pos_y?: number | undefined; + depth_cutoff?: 0 | 1 | undefined; +}>; +export type HologramParamMap = z.infer; diff --git a/dist/schemas/schema.requests.d.ts b/dist/schemas/schema.requests.d.ts new file mode 100644 index 0000000..999f284 --- /dev/null +++ b/dist/schemas/schema.requests.d.ts @@ -0,0 +1,221 @@ +import { z } from "zod"; +import { HologramParamMap } from "./schema.parameters"; +export declare const version: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>; +export declare const orchestration: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>; +export declare const show_window: z.ZodObject<{ + orchestration: z.ZodString; + show_window: z.ZodBoolean; + head_index: z.ZodNumber; +}, "strip", z.ZodTypeAny, { + orchestration: string; + show_window: boolean; + head_index: number; +}, { + orchestration: string; + show_window: boolean; + head_index: number; +}>; +export declare const instance_studio_playlist: z.ZodObject<{ + orchestration: z.ZodString; + name: z.ZodString; + playlist_path: z.ZodString; + loop: z.ZodBoolean; +}, "strip", z.ZodTypeAny, { + orchestration: string; + name: string; + playlist_path: string; + loop: boolean; +}, { + orchestration: string; + name: string; + playlist_path: string; + loop: boolean; +}>; +export declare const get_autostart_playlist: z.ZodObject<{ + orchestration: z.ZodString; + head_index: z.ZodNumber; +}, "strip", z.ZodTypeAny, { + orchestration: string; + head_index: number; +}, { + orchestration: string; + head_index: number; +}>; +export declare const set_autostart_playlist: z.ZodObject<{ + orchestration: z.ZodString; + head_index: z.ZodNumber; + playlist_name: z.ZodString; + playlist_path: z.ZodString; +}, "strip", z.ZodTypeAny, { + orchestration: string; + playlist_name: string; + playlist_path: string; + head_index: number; +}, { + orchestration: string; + playlist_name: string; + playlist_path: string; + head_index: number; +}>; +export declare const set_named_autostart_playlist: z.ZodObject<{ + orchestration: z.ZodString; + head_index: z.ZodNumber; + playlist_name: z.ZodString; +}, "strip", z.ZodTypeAny, { + orchestration: string; + playlist_name: string; + head_index: number; +}, { + orchestration: string; + playlist_name: string; + head_index: number; +}>; +export declare const available_output_devices: z.ZodObject<{ + orchestration: z.ZodString; +}, "strip", z.ZodTypeAny, { + orchestration: string; +}, { + orchestration: string; +}>; +export declare const delete_playlist: z.ZodObject<{ + orchestration: z.ZodString; + name: z.ZodString; + loop: z.ZodBoolean; +}, "strip", z.ZodTypeAny, { + orchestration: string; + name: string; + loop: boolean; +}, { + orchestration: string; + name: string; + loop: boolean; +}>; +export declare const instance_playlist: z.ZodObject<{ + orchestration: z.ZodString; + name: z.ZodString; + loop: z.ZodBoolean; +}, "strip", z.ZodTypeAny, { + orchestration: string; + name: string; + loop: boolean; +}, { + orchestration: string; + name: string; + loop: boolean; +}>; +export declare const insert_playlist_entry: z.ZodObject<{ + orchestration: z.ZodString; + name: z.ZodString; + id: z.ZodNumber; + index: z.ZodNumber; + uri: z.ZodString; + focus: z.ZodNumber; + rows: z.ZodNumber; + cols: z.ZodNumber; + aspect: z.ZodNumber; + view_count: z.ZodNumber; + isRGBD: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>; + depth_loc: z.ZodOptional, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>]>>; + depth_inversion: z.ZodOptional, z.ZodLiteral<1>]>>; + chroma_depth: z.ZodOptional, z.ZodLiteral<1>]>>; + depthiness: z.ZodOptional; + zoom: z.ZodOptional; +}, "strip", z.ZodTypeAny, { + orchestration: string; + name: string; + id: number; + index: number; + focus: number; + uri: string; + rows: number; + cols: number; + aspect: number; + view_count: number; + isRGBD: 0 | 1; + depth_loc?: 0 | 2 | 1 | 3 | undefined; + depth_inversion?: 0 | 1 | undefined; + chroma_depth?: 0 | 1 | undefined; + depthiness?: number | undefined; + zoom?: number | undefined; +}, { + orchestration: string; + name: string; + id: number; + index: number; + focus: number; + uri: string; + rows: number; + cols: number; + aspect: number; + view_count: number; + isRGBD: 0 | 1; + depth_loc?: 0 | 2 | 1 | 3 | undefined; + depth_inversion?: 0 | 1 | undefined; + chroma_depth?: 0 | 1 | undefined; + depthiness?: number | undefined; + zoom?: number | undefined; +}>; +export type update_playlist_entry = { + orchestration: string; + playlistName: string; + playlistIndex: number; +} & { + [K in keyof HologramParamMap]?: `${K}: ${HologramParamMap[K]}`; +}; +export type update_current_entry = { + orchestration: string; + name: string; +} & { + [K in keyof HologramParamMap]?: `${K}: ${HologramParamMap[K]}`; +}; +export declare const play_playlist: z.ZodObject<{ + orchestration: z.ZodString; + name: z.ZodString; + head_index: z.ZodNumber; +}, "strip", z.ZodTypeAny, { + orchestration: string; + name: string; + head_index: number; +}, { + orchestration: string; + name: string; + head_index: number; +}>; +export declare const transport_control_play: z.ZodObject<{ + orchestration: z.ZodString; +}, "strip", z.ZodTypeAny, { + orchestration: string; +}, { + orchestration: string; +}>; +export declare const transport_control_pause: z.ZodObject<{ + orchestration: z.ZodString; +}, "strip", z.ZodTypeAny, { + orchestration: string; +}, { + orchestration: string; +}>; +export declare const transport_control_next: z.ZodObject<{ + orchestration: z.ZodString; +}, "strip", z.ZodTypeAny, { + orchestration: string; +}, { + orchestration: string; +}>; +export declare const transport_control_previous: z.ZodObject<{ + orchestration: z.ZodString; +}, "strip", z.ZodTypeAny, { + orchestration: string; +}, { + orchestration: string; +}>; +export declare const transport_control_seek_to_index: z.ZodObject<{ + orchestration: z.ZodString; + index: z.ZodNumber; +}, "strip", z.ZodTypeAny, { + orchestration: string; + index: number; +}, { + orchestration: string; + index: number; +}>; diff --git a/dist/schemas/schema.responses.d.ts b/dist/schemas/schema.responses.d.ts new file mode 100644 index 0000000..55449f8 --- /dev/null +++ b/dist/schemas/schema.responses.d.ts @@ -0,0 +1,2148 @@ +import { z } from "zod"; +export declare const version: z.ZodObject<{ + name: z.ZodString; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + payload: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + payload: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const orchestration: z.ZodObject<{ + name: z.ZodString; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + payload: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + payload: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const play_playlist: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + id: z.ZodOptional; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>>; + message: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + id?: { + value: string; + name: string; + type: "WSTRING"; + } | undefined; + }, { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + id?: { + value: string; + name: string; + type: "WSTRING"; + } | undefined; + }>; + }, "strip", z.ZodTypeAny, { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + id?: { + value: string; + name: string; + type: "WSTRING"; + } | undefined; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + id?: { + value: string; + name: string; + type: "WSTRING"; + } | undefined; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + id?: { + value: string; + name: string; + type: "WSTRING"; + } | undefined; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + message: { + value: string; + name: string; + type: "WSTRING"; + }; + id?: { + value: string; + name: string; + type: "WSTRING"; + } | undefined; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const instance_playlist: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const insert_playlist_entry: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + index: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + index: { + value: string; + name: string; + type: "WSTRING"; + }; + }, { + index: { + value: string; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + index: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + index: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + index: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + index: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const delete_playlist: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const show_window: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const available_output_devices: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodOptional; + value: z.ZodObject<{ + calibration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + defaultQuilt: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + hardwareVersion: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + hwid: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + index: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"UNSIGNED_INT">; + value: z.ZodNumber; + }, "strip", z.ZodTypeAny, { + value: number; + name: string; + type: "UNSIGNED_INT"; + }, { + value: number; + name: string; + type: "UNSIGNED_INT"; + }>; + state: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + windowCoords: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"INT2">; + value: z.ZodObject<{ + x: z.ZodNumber; + y: z.ZodNumber; + }, "strip", z.ZodTypeAny, { + x: number; + y: number; + }, { + x: number; + y: number; + }>; + }, "strip", z.ZodTypeAny, { + value: { + x: number; + y: number; + }; + name: string; + type: "INT2"; + }, { + value: { + x: number; + y: number; + }; + name: string; + type: "INT2"; + }>; + }, "strip", z.ZodTypeAny, { + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + calibration: { + value: string; + name: string; + type: "WSTRING"; + }; + defaultQuilt: { + value: string; + name: string; + type: "WSTRING"; + }; + hardwareVersion: { + value: string; + name: string; + type: "WSTRING"; + }; + hwid: { + value: string; + name: string; + type: "WSTRING"; + }; + state: { + value: string; + name: string; + type: "WSTRING"; + }; + windowCoords: { + value: { + x: number; + y: number; + }; + name: string; + type: "INT2"; + }; + }, { + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + calibration: { + value: string; + name: string; + type: "WSTRING"; + }; + defaultQuilt: { + value: string; + name: string; + type: "WSTRING"; + }; + hardwareVersion: { + value: string; + name: string; + type: "WSTRING"; + }; + hwid: { + value: string; + name: string; + type: "WSTRING"; + }; + state: { + value: string; + name: string; + type: "WSTRING"; + }; + windowCoords: { + value: { + x: number; + y: number; + }; + name: string; + type: "INT2"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + calibration: { + value: string; + name: string; + type: "WSTRING"; + }; + defaultQuilt: { + value: string; + name: string; + type: "WSTRING"; + }; + hardwareVersion: { + value: string; + name: string; + type: "WSTRING"; + }; + hwid: { + value: string; + name: string; + type: "WSTRING"; + }; + state: { + value: string; + name: string; + type: "WSTRING"; + }; + windowCoords: { + value: { + x: number; + y: number; + }; + name: string; + type: "INT2"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + index: { + value: number; + name: string; + type: "UNSIGNED_INT"; + }; + calibration: { + value: string; + name: string; + type: "WSTRING"; + }; + defaultQuilt: { + value: string; + name: string; + type: "WSTRING"; + }; + hardwareVersion: { + value: string; + name: string; + type: "WSTRING"; + }; + hwid: { + value: string; + name: string; + type: "WSTRING"; + }; + state: { + value: string; + name: string; + type: "WSTRING"; + }; + windowCoords: { + value: { + x: number; + y: number; + }; + name: string; + type: "INT2"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>>>; + }, "strip", z.ZodTypeAny, { + name: string; + type: "VARIANT_MAP"; + value?: Record | undefined; + }, { + name: string; + type: "VARIANT_MAP"; + value?: Record | undefined; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + name: string; + type: "VARIANT_MAP"; + value?: Record | undefined; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + name: string; + type: "VARIANT_MAP"; + value?: Record | undefined; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const instance_studio_playlist: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }, { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const update_playlist_entry: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const update_current_entry: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const get_autostart_playlist: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + playlist_name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + playlist_path: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + playlist_path: { + value: string; + name: string; + type: "WSTRING"; + }; + }, { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + playlist_path: { + value: string; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + playlist_path: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + playlist_path: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + playlist_path: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + playlist_path: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const set_autostart_playlist: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + playlist_name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + }, { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const set_named_autostart_playlist: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + payload: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"VARIANT_MAP">; + value: z.ZodObject<{ + playlist_name: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + }, "strip", z.ZodTypeAny, { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + }, { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + }>; + }, "strip", z.ZodTypeAny, { + value: { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }, { + value: { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + payload: { + value: { + playlist_name: { + value: string; + name: string; + type: "WSTRING"; + }; + }; + name: string; + type: "VARIANT_MAP"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const transport_control_play: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const transport_control_pause: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const transport_control_next: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const transport_control_previous: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; +export declare const transport_control_seek_to_index: z.ZodObject<{ + name: z.ZodString; + orchestration: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodString; + }, "strip", z.ZodTypeAny, { + value: string; + name: string; + type: "WSTRING"; + }, { + value: string; + name: string; + type: "WSTRING"; + }>; + status: z.ZodObject<{ + name: z.ZodString; + type: z.ZodLiteral<"WSTRING">; + value: z.ZodUnion<[z.ZodLiteral<"Completion">, z.ZodLiteral<"Pending">, z.ZodLiteral<"Failure">, z.ZodLiteral<"UnknownOrchestration">]>; + }, "strip", z.ZodTypeAny, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }, { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }>; +}, "strip", z.ZodTypeAny, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}, { + orchestration: { + value: string; + name: string; + type: "WSTRING"; + }; + name: string; + status: { + value: "Completion" | "UnknownOrchestration" | "Pending" | "Failure"; + name: string; + type: "WSTRING"; + }; +}>; diff --git a/dist/schemas/schema.utils.d.ts b/dist/schemas/schema.utils.d.ts new file mode 100644 index 0000000..9f9ab73 --- /dev/null +++ b/dist/schemas/schema.utils.d.ts @@ -0,0 +1,3 @@ +import { z } from "zod"; +/**a utility to allow us to have ranges in our schemas */ +export declare const numberRange: (min: number, max: number) => z.ZodEffects; diff --git a/dist/tsconfig.tsbuildinfo b/dist/tsconfig.tsbuildinfo new file mode 100644 index 0000000..7431d79 --- /dev/null +++ b/dist/tsconfig.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../../node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/typescript/lib/lib.es2021.d.ts","../../node_modules/typescript/lib/lib.es2022.d.ts","../../node_modules/typescript/lib/lib.es2023.d.ts","../../node_modules/typescript/lib/lib.esnext.d.ts","../../node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../node_modules/typescript/lib/lib.es2023.array.d.ts","../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/tslib/tslib.d.ts","../../node_modules/@types/react/ts5.0/global.d.ts","../../node_modules/csstype/index.d.ts","../../node_modules/@types/prop-types/index.d.ts","../../node_modules/@types/scheduler/tracing.d.ts","../../node_modules/@types/react/ts5.0/index.d.ts","../../node_modules/@types/react/ts5.0/jsx-runtime.d.ts","../../src/library/components/types.ts","../../src/library/components/displays.ts","../../node_modules/zod/lib/helpers/typeAliases.d.ts","../../node_modules/zod/lib/helpers/util.d.ts","../../node_modules/zod/lib/ZodError.d.ts","../../node_modules/zod/lib/locales/en.d.ts","../../node_modules/zod/lib/errors.d.ts","../../node_modules/zod/lib/helpers/parseUtil.d.ts","../../node_modules/zod/lib/helpers/enumUtil.d.ts","../../node_modules/zod/lib/helpers/errorUtil.d.ts","../../node_modules/zod/lib/helpers/partialUtil.d.ts","../../node_modules/zod/lib/types.d.ts","../../node_modules/zod/lib/external.d.ts","../../node_modules/zod/lib/index.d.ts","../../node_modules/zod/index.d.ts","../../src/library/schemas/schema.ts","../../src/library/schemas/schema.responses.ts","../../src/library/schemas/schema.utils.ts","../../src/library/schemas/defaults.ts","../../src/library/schemas/schema.parameters.ts","../../src/library/schemas/schema.requests.ts","../../src/library/components/endpoints.ts","../../src/library/components/orchestration.ts","../../src/library/schemas/schema.events.ts","../../src/library/components/eventsource.ts","../../src/library/schemas/schema.hologram.ts","../../src/library/components/hologram.ts","../../src/library/playlists/playlistItems.ts","../../src/library/playlists/playlist.ts","../../src/library/components/fallback.ts","../../src/library/components/messageHandler.ts","../../src/library/utilities/general.utils.ts","../../src/library/client/BridgeClient.ts","../../src/library/index.ts","../../src/library/schemas/schema.failures.ts","../../node_modules/vite/types/hmrPayload.d.ts","../../node_modules/vite/types/customEvent.d.ts","../../node_modules/vite/types/hot.d.ts","../../node_modules/vite/types/importGlob.d.ts","../../node_modules/vite/types/importMeta.d.ts","../../node_modules/vite/client.d.ts","../../node_modules/@types/node/assert.d.ts","../../node_modules/@types/node/assert/strict.d.ts","../../node_modules/@types/node/globals.d.ts","../../node_modules/@types/node/async_hooks.d.ts","../../node_modules/@types/node/buffer.d.ts","../../node_modules/@types/node/child_process.d.ts","../../node_modules/@types/node/cluster.d.ts","../../node_modules/@types/node/console.d.ts","../../node_modules/@types/node/constants.d.ts","../../node_modules/@types/node/crypto.d.ts","../../node_modules/@types/node/dgram.d.ts","../../node_modules/@types/node/diagnostics_channel.d.ts","../../node_modules/@types/node/dns.d.ts","../../node_modules/@types/node/dns/promises.d.ts","../../node_modules/@types/node/domain.d.ts","../../node_modules/@types/node/dom-events.d.ts","../../node_modules/@types/node/events.d.ts","../../node_modules/@types/node/fs.d.ts","../../node_modules/@types/node/fs/promises.d.ts","../../node_modules/@types/node/http.d.ts","../../node_modules/@types/node/http2.d.ts","../../node_modules/@types/node/https.d.ts","../../node_modules/@types/node/inspector.d.ts","../../node_modules/@types/node/module.d.ts","../../node_modules/@types/node/net.d.ts","../../node_modules/@types/node/os.d.ts","../../node_modules/@types/node/path.d.ts","../../node_modules/@types/node/perf_hooks.d.ts","../../node_modules/@types/node/process.d.ts","../../node_modules/@types/node/punycode.d.ts","../../node_modules/@types/node/querystring.d.ts","../../node_modules/@types/node/readline.d.ts","../../node_modules/@types/node/readline/promises.d.ts","../../node_modules/@types/node/repl.d.ts","../../node_modules/@types/node/stream.d.ts","../../node_modules/@types/node/stream/promises.d.ts","../../node_modules/@types/node/stream/consumers.d.ts","../../node_modules/@types/node/stream/web.d.ts","../../node_modules/@types/node/string_decoder.d.ts","../../node_modules/@types/node/test.d.ts","../../node_modules/@types/node/timers.d.ts","../../node_modules/@types/node/timers/promises.d.ts","../../node_modules/@types/node/tls.d.ts","../../node_modules/@types/node/trace_events.d.ts","../../node_modules/@types/node/tty.d.ts","../../node_modules/@types/node/url.d.ts","../../node_modules/@types/node/util.d.ts","../../node_modules/@types/node/v8.d.ts","../../node_modules/@types/node/vm.d.ts","../../node_modules/@types/node/wasi.d.ts","../../node_modules/@types/node/worker_threads.d.ts","../../node_modules/@types/node/zlib.d.ts","../../node_modules/@types/node/globals.global.d.ts","../../node_modules/@types/node/index.d.ts"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","f4e736d6c8d69ae5b3ab0ddfcaa3dc365c3e76909d6660af5b4e979b3934ac20","eeeb3aca31fbadef8b82502484499dfd1757204799a6f5b33116201c810676ec",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"9a60b92bca4c1257db03b349d58e63e4868cfc0d1c8d0ba60c2dbc63f4e6c9f6","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"709efdae0cb5df5f49376cde61daacc95cdd44ae4671da13a540da5088bf3f30","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"61ed9b6d07af959e745fb11f9593ecd743b279418cc8a99448ea3cd5f3b3eb22","affectsGlobalScope":true},{"version":"038a2f66a34ee7a9c2fbc3584c8ab43dff2995f8c68e3f566f4c300d2175e31e","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"f5c92f2c27b06c1a41b88f6db8299205aee52c2a2943f7ed29bd585977f254e8","affectsGlobalScope":true},{"version":"b7feb7967c6c6003e11f49efa8f5de989484e0a6ba2e5a6c41b55f8b8bd85dba","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"b9ea5778ff8b50d7c04c9890170db34c26a5358cccba36844fe319f50a43a61a","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"25de46552b782d43cb7284df22fe2a265de387cf0248b747a7a1b647d81861f6","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"14a84fbe4ec531dcbaf5d2594fd95df107258e60ae6c6a076404f13c3f66f28e",{"version":"549df62b64a71004aee17685b445a8289013daf96246ce4d9b087d13d7a27a61","affectsGlobalScope":true},"4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288","6a386ff939f180ae8ef064699d8b7b6e62bc2731a62d7fbf5e02589383838dea","f5a8b384f182b3851cec3596ccc96cb7464f8d3469f48c74bf2befb782a19de5",{"version":"d6070956a76cd4119de9baf0d47ec6f46cab9036bf3bef2fd5dfc74178808be0","affectsGlobalScope":true},"2bd85abc6423fc5c27a1dabb65bbb015cc798d1f43bee927e91eec217103ab11","769e34b13397517060c57608cc4348603bcd0f380819a2962f74f829ddbe9130","f3cd07e75b757f2031bd9ec1d5655c3e0a00d5f2669789a9189ad5c0c3a33cff","5487b97cfa28b26b4a9ef0770f872bdbebd4c46124858de00f242c3eed7519f4","7a01f546ace66019156e4232a1bee2fabc2f8eabeb052473d926ee1693956265","fb53b1c6a6c799b7e3cc2de3fb5c9a1c04a1c60d4380a37792d84c5f8b33933b","8485b6da53ec35637d072e516631d25dae53984500de70a6989058f24354666f","ebe80346928736532e4a822154eb77f57ef3389dbe2b3ba4e571366a15448ef2","c2cb3c8ff388781258ea9ddbcd8a947f751bddd6886e1d3b3ea09ddaa895df80","f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","98a9cc18f661d28e6bd31c436e1984f3980f35e0f0aa9cf795c54f8ccb667ffe","c76b0c5727302341d0bdfa2cc2cee4b19ff185b554edb6e8543f0661d8487116","19903057d0249e45c579bef2b771c37609e4853a8b88adbb0b6b63f9e1d1f372","f5ef066942e4f0bd98200aa6a6694b831e73200c9b3ade77ad0aa2409e8fe1b1","b9e99cd94f4166a245f5158f7286c05406e2a4c694619bceb7a4f3519d1d768e","5568d7c32e5cf5f35e092649f4e5e168c3114c800b1d7545b7ae5e0415704802","686aa4dc77d22704bc0f1d3ea2627bf0bc23498874ed754403af2600ab985080","dad53080b83919ad10d41d07b85b6707261a38b899de88bcfbcd8f20314b70a8","85c6ee5fc76addf0d71872732ccbb8ee136f629a00d9260931e3f05ea4c66d40","f93fd157f34eb585aa5a56b05b1de6fbe0d15fc879e03aefb8233c62b0a742fe","3a4b85e95e0cb3c24e854897d93c2aa03ca037a8599ec107ddc6f0f6bb3a8471","66aebb4cd01f70e76225a1b413ef66bf4345d7a70cd676ed0b460161373da5d4","1b3ed9c2d81f94a58ac3fa79d8daedc414d6058e0c304e9836b7f9c667008435","01c1cebab57ee48a3947fac2ce221fa4af8edf6efcd40a84de53b46bbc7d71b9","8675ddfb9f4ea907065e47bf5057755a20b14ed9c9ea5ed1d8597de83fb567fe","7f265024bd422a8d9931e5e0af612d386767179e65838ff3bc2a1da0133908d2","0dccecc71c84f788ca47bc8d21f182013cbc4c909abef7afea0af4ead0ee1012","25b0b4ff9f5d8221affd230968b31b92bcb9cd32b86e0bc3b8af41c40fcda247","38e50ccddc3b6e528329406b9ea797e1755f04ea68143bea58f60d531375a067","7a641e8f87cf9b6bbfcf94b0034d7b8cdcc50b1080fabf4433eec6086a40a92d","5a37097db779a0672899668e343cc1ef86deba7955d96d0f45b41f70e90c05c5","fa2530322f7afdf3f1e44abba420061c7f0372182807baa7a48c0d60d06bb061","6e1604195eca6b356cbc386684c0625939eb9653980500165535252f51d011e5","376b7386dcbac63cfc5b0beac6eb14a5be5b2341c7aacfb8f2889fcdaa612288","7546c9fd891e40a5eedde0601d8ca34bc36ec7e620355bd37e5e4b16be9600a9","95bb72e9e6835409f78be8211f3a8f83673ffaa380becbae2728680701e63d0c","bcb6ea18f23dae2c48459d7b86d3adccd6898f824fcbf9da08b935f559896580","0aa7220845f5f3902fe043f646f9d9218bd7dd6c4046e8471580866ea6b03aa2","4d5fb5d6b35f731b2ae4d9d7c592d48e91d6de531dd130628edf4eba16add893","739c2c46edc112421fc023c24b4898b1f413f792bb6a02b40ba182c648e56c2f",{"version":"df93bb67d5ae7be3d599323de42e12cb8da59f0b490c3186ae91d493632b5e36","affectsGlobalScope":true},{"version":"f8b8b34c4f7651c9f7b126af8affda4139a0499e62e74f0f8dc2be36e9f14b59","affectsGlobalScope":true},"9122ed7070e054b73ebab37c2373a196def2d90e7d1a9a7fcd9d46b0e51fae78","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"5e0a9d1cc0a6f7fb58c1ccd9b6374351c85262d5ead0e7ef781ce76362111890","affectsGlobalScope":true},"21a167fec8f933752fb8157f06d28fab6817af3ad9b0bdb1908a10762391eab9",{"version":"bb65c6267c5d6676be61acbf6604cf0a4555ac4b505df58ac15c831fcbff4e3e","affectsGlobalScope":true},"0c0cee62cb619aed81133b904f644515ba3064487002a7da83fd8aa07b1b4abd","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","dd1d8b922bd0874a7715e43015ebfe4ce1eb55fbe405a6d97b7c9756dc608813","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","75ecef44f126e2ae018b4abbd85b6e8a2e2ba1638ebec56cc64274643ce3567b","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true},"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","fa68e523cb5d3c2f1f02a94ea8ba2a61a9d1c88dc3c163e411311a826be1f9f3","04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","dbe5aa5a5dd8bd1c6a8d11b1310c3f0cdabaacc78a37b394a8c7b14faeb5fb84","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e8b18c6385ff784228a6f369694fcf1a6b475355ba89090a88de13587a9391d5","affectsGlobalScope":true},"d076fede3cb042e7b13fc29442aaa03a57806bc51e2b26a67a01fbc66a7c0c12","7c013aa892414a7fdcfd861ae524a668eaa3ede8c7c0acafaf611948122c8d93","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","3163f47436da41706c6e2b3c1511f3b7cce9f9f3905b2f3e01246c48b4ba7d14","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","24ad30a03d6c9266b63540956868dd70fa2dc523d60d780d6586eb0c281946bc",{"version":"970a90f76d4d219ad60819d61f5994514087ba94c985647a3474a5a3d12714ed","affectsGlobalScope":true},"664d8f2d59164f2e08c543981453893bc7e003e4dfd29651ce09db13e9457980","4c8525f256873c7ba3135338c647eaf0ca7115a1a2805ae2d0056629461186ce","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true},{"version":"f7db71191aa7aac5d6bc927ed6e7075c2763d22c7238227ec0c63c8cf5cb6a8b","affectsGlobalScope":true},"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"e9a8d4274033cb520ee12d6f68d161ba2b9128b87399645d3916b71187032836"],"root":[69,70,[84,103]],"options":{"allowSyntheticDefaultImports":true,"composite":true,"declaration":true,"emitDeclarationOnly":false,"esModuleInterop":true,"importHelpers":true,"jsx":4,"module":99,"noEmitHelpers":true,"noFallthroughCasesInSwitch":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"..","rootDir":"../../src","skipLibCheck":true,"sourceMap":false,"strict":true,"target":99},"fileIdsList":[[110,156],[113,156],[114,119,147,156],[115,126,127,134,144,155,156],[115,116,126,134,156],[117,156],[118,119,127,135,156],[119,144,152,156],[120,122,126,134,156],[121,156],[122,123,156],[126,156],[124,126,156],[126,127,128,144,155,156],[126,127,128,141,144,147,156],[156,160],[156],[129,134,144,155,156],[126,127,129,130,134,144,152,155,156],[129,131,144,152,155,156],[110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162],[126,132,156],[133,155,156],[122,126,134,144,156],[135,156],[136,156],[113,137,156],[138,154,156,160],[139,156],[140,156],[126,141,142,156],[141,143,156,158],[114,126,144,145,146,147,156],[114,144,146,156],[144,145,156],[147,156],[148,156],[126,150,151,156],[150,151,156],[119,134,144,152,156],[153,156],[134,154,156],[114,129,140,155,156],[119,156],[144,156,157],[156,158],[156,159],[114,119,126,128,137,144,155,156,158,160],[144,156,161],[63,64,65,66,156],[67,156],[108,156],[104,156],[105,156],[106,107,156],[82,156],[71,72,82,156],[73,74,156],[71,72,73,75,76,80,156],[72,73,156],[81,156],[73,156],[71,72,73,76,77,78,79,156],[62,68,69,70,83,85,88,90,91,92,93,95,97,98,99,100,156],[62,68,69,156],[62,68,83,85,89,102,156],[62,68,92,102,156],[62,68,156],[62,68,83,94,156],[62,68,83,85,90,102,156],[62,68,69,87,88,94,95,96,97,99,101,156],[62,68,90,95,96,156],[62,68,83,89,95,156],[62,68,86,156],[62,68,83,84,156],[62,68,83,87,102,156],[62,68,83,87,156],[62,68,83,88,156],[62,68,83,156]],"referencedMap":[[110,1],[111,1],[113,2],[114,3],[115,4],[116,5],[117,6],[118,7],[119,8],[120,9],[121,10],[122,11],[123,11],[125,12],[124,13],[126,12],[127,14],[128,15],[112,16],[162,17],[129,18],[130,19],[131,20],[163,21],[132,22],[133,23],[134,24],[135,25],[136,26],[137,27],[138,28],[139,29],[140,30],[141,31],[142,31],[143,32],[144,33],[146,34],[145,35],[147,36],[148,37],[149,17],[150,38],[151,39],[152,40],[153,41],[154,42],[155,43],[156,44],[157,45],[158,46],[159,47],[160,48],[161,49],[65,17],[63,17],[67,50],[68,51],[66,17],[64,17],[62,17],[60,17],[61,17],[12,17],[13,17],[15,17],[14,17],[2,17],[16,17],[17,17],[18,17],[19,17],[20,17],[21,17],[22,17],[23,17],[3,17],[4,17],[27,17],[24,17],[25,17],[26,17],[28,17],[29,17],[30,17],[5,17],[31,17],[32,17],[33,17],[34,17],[6,17],[38,17],[35,17],[36,17],[37,17],[39,17],[7,17],[40,17],[45,17],[46,17],[41,17],[42,17],[43,17],[44,17],[8,17],[50,17],[47,17],[48,17],[49,17],[51,17],[9,17],[52,17],[53,17],[54,17],[57,17],[55,17],[56,17],[58,17],[10,17],[1,17],[11,17],[59,17],[109,52],[105,53],[104,17],[106,54],[107,17],[108,55],[83,56],[73,57],[75,58],[81,59],[77,17],[78,17],[76,60],[79,56],[71,17],[72,17],[82,61],[74,62],[80,63],[101,64],[70,65],[90,66],[93,67],[98,68],[95,69],[99,67],[91,70],[69,68],[102,71],[97,72],[96,73],[87,74],[92,75],[103,75],[94,76],[88,77],[89,78],[85,75],[84,79],[86,79],[100,65]],"exportedModulesMap":[[110,1],[111,1],[113,2],[114,3],[115,4],[116,5],[117,6],[118,7],[119,8],[120,9],[121,10],[122,11],[123,11],[125,12],[124,13],[126,12],[127,14],[128,15],[112,16],[162,17],[129,18],[130,19],[131,20],[163,21],[132,22],[133,23],[134,24],[135,25],[136,26],[137,27],[138,28],[139,29],[140,30],[141,31],[142,31],[143,32],[144,33],[146,34],[145,35],[147,36],[148,37],[149,17],[150,38],[151,39],[152,40],[153,41],[154,42],[155,43],[156,44],[157,45],[158,46],[159,47],[160,48],[161,49],[65,17],[63,17],[67,50],[68,51],[66,17],[64,17],[62,17],[60,17],[61,17],[12,17],[13,17],[15,17],[14,17],[2,17],[16,17],[17,17],[18,17],[19,17],[20,17],[21,17],[22,17],[23,17],[3,17],[4,17],[27,17],[24,17],[25,17],[26,17],[28,17],[29,17],[30,17],[5,17],[31,17],[32,17],[33,17],[34,17],[6,17],[38,17],[35,17],[36,17],[37,17],[39,17],[7,17],[40,17],[45,17],[46,17],[41,17],[42,17],[43,17],[44,17],[8,17],[50,17],[47,17],[48,17],[49,17],[51,17],[9,17],[52,17],[53,17],[54,17],[57,17],[55,17],[56,17],[58,17],[10,17],[1,17],[11,17],[59,17],[109,52],[105,53],[104,17],[106,54],[107,17],[108,55],[83,56],[73,57],[75,58],[81,59],[77,17],[78,17],[76,60],[79,56],[71,17],[72,17],[82,61],[74,62],[80,63],[101,64],[70,65],[90,66],[93,67],[98,68],[95,69],[99,67],[91,70],[69,68],[102,71],[97,72],[96,73],[87,74],[92,75],[103,75],[94,76],[88,77],[89,78],[85,75],[84,79],[86,79],[100,65]],"semanticDiagnosticsPerFile":[110,111,113,114,115,116,117,118,119,120,121,122,123,125,124,126,127,128,112,162,129,130,131,163,132,133,134,135,136,137,138,139,140,141,142,143,144,146,145,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,65,63,67,68,66,64,62,60,61,12,13,15,14,2,16,17,18,19,20,21,22,23,3,4,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,53,54,57,55,56,58,10,1,11,59,109,105,104,106,107,108,83,73,75,81,77,78,76,79,71,72,82,74,80,101,70,90,93,98,95,99,91,69,102,97,96,87,92,103,94,88,89,85,84,86,100],"emitSignatures":[[69,"a118cd9a19336e3888d7b6e0437f49073c5cfebaea0561974b2d847a8b2885c3"],[70,"741490d96e29ac1e8271ee4f846720455add8627cb0e9a617f7eb996dcc0248a"],[84,"d935e8ba17740701763c12b63fe2ea496b09b579c03e5533eeeb99ab4e9a8874"],[85,"85f0b8fbd661287d62612e37ee80855ed0e080d0c1186dbef8524d75c2d95b53"],[86,"d605a1aeaae40e3484b5d3125004e7597544561df80256f97b6c6aae4ee360ea"],[87,"cc843211c92d0627d4d191c7ba4b2d0e19d691919e661401865008e6ab7aa01e"],[88,"d90e851f7eaa46acbdf64d370cb542c6609074ac02fe8117a401c98fe7ee72f9"],[89,"6fd2003e80e659513dc3f721b902b70e423ff63bfa62a48ce0c7402320e4de79"],[90,"d30d3216080c900c79c1147d8d85dd205663810b8053552630e281fd65988a5e"],[91,"009e417b18f342a48d5d739cdb097ba7758ec5c4ad543aaedcdf4ba2ce1f0074"],[92,"866e3220c24b38464014a3529d00ad6e319a63db62bd5bd5ed6f36d9da1d2355"],[93,"9ec95871c1fccd68a191c9efc9864328b28b531fef14d7df44bd3f24e25a5da3"],[94,"ecc72bd3b51234794a43a02c77f07c1d1c50c2fa0499fc63e3c031ee5d0b5e04"],[95,"5ef1ee70b15037f9c649b92bc1ada3198e0e9d266e253d1d165cd71a4d59a030"],[96,"35b30428998fcbfa06bbaa71ff55918353bdd0763ccac230496a08be9f8590ed"],[97,"29f8defc3ebd136a649ab3ce6ee8a8b570bba9af74a0d64446231e832d5fa7fc"],[98,"45d7668510ae4d4aa8180bb10d56429af04d7b3ab77b10a11c6704a24571e5e4"],[99,"e6abed715ac9908ca49158491cddc14d803df78d7a74ba5522d9147067de1cea"],[100,"110d869074c62423d6284dec1d96cbadaef7181db5e5b890365cb0adbe4106ae"],[101,"7947d24d80cfa9f02f64ef8924ab9ea3b4ff60be1e41827e53256ba5e1f153cc"],[102,"42072f4627616e25df4df18b077dd972288231115b849268a101a2cfc5f31753"],[103,"df693adf0e5a371b2fb713e217cfcd54e434bf0ace2a696f514fad20acecfb18"]],"latestChangedDtsFile":"./schemas/schema.failures.d.ts"},"version":"5.0.4"} \ No newline at end of file diff --git a/dist/utilities/general.utils.d.ts b/dist/utilities/general.utils.d.ts new file mode 100644 index 0000000..dd84351 --- /dev/null +++ b/dist/utilities/general.utils.d.ts @@ -0,0 +1,8 @@ +import { BridgeVersion } from "@library/components/types"; +/** + * Parse the version from Bridge's version string + * Bridge uses a major, minor, patch, hotfix versioning system + * @param versionString The version string to parse + * @returns BridgeVersion + */ +export declare function parseBridgeVersion(versionString: string): BridgeVersion; diff --git a/docs/README.md b/docs/README.md index a253b17..3f846d4 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,8 +6,7 @@ ### Modules -- [client](modules/client.md) -- [components](modules/components.md) +- [client/BridgeClient](modules/client_BridgeClient.md) - [components/displays](modules/components_displays.md) - [components/endpoints](modules/components_endpoints.md) - [components/eventsource](modules/components_eventsource.md) @@ -15,7 +14,7 @@ - [components/hologram](modules/components_hologram.md) - [components/messageHandler](modules/components_messageHandler.md) - [components/orchestration](modules/components_orchestration.md) -- [index](modules/index.md) +- [components/types](modules/components_types.md) - [playlists/playlist](modules/playlists_playlist.md) - [playlists/playlistItems](modules/playlists_playlistItems.md) - [schemas/defaults](modules/schemas_defaults.md) diff --git a/docs/classes/client.BridgeClient.md b/docs/classes/client_BridgeClient.BridgeClient.md similarity index 50% rename from docs/classes/client.BridgeClient.md rename to docs/classes/client_BridgeClient.BridgeClient.md index 8ea8583..8ab2833 100644 --- a/docs/classes/client.BridgeClient.md +++ b/docs/classes/client_BridgeClient.BridgeClient.md @@ -1,62 +1,65 @@ -[@lookingglass/bridge](../README.md) / [client](../modules/client.md) / BridgeClient +[@lookingglass/bridge](../README.md) / [client/BridgeClient](../modules/client_BridgeClient.md) / BridgeClient # Class: BridgeClient -[client](../modules/client.md).BridgeClient +[client/BridgeClient](../modules/client_BridgeClient.md).BridgeClient ## Table of contents ### Constructors -- [constructor](client.BridgeClient.md#constructor) +- [constructor](client_BridgeClient.BridgeClient.md#constructor) ### Properties -- [currentPlaylistIndex](client.BridgeClient.md#currentplaylistindex) -- [currentPlaylistItemIndex](client.BridgeClient.md#currentplaylistitemindex) -- [isCastPending](client.BridgeClient.md#iscastpending) -- [isConnected](client.BridgeClient.md#isconnected) -- [isDisconnecting](client.BridgeClient.md#isdisconnecting) -- [manualDisconnect](client.BridgeClient.md#manualdisconnect) -- [playlists](client.BridgeClient.md#playlists) -- [version](client.BridgeClient.md#version) -- [eventsource](client.BridgeClient.md#eventsource) -- [fallback](client.BridgeClient.md#fallback) -- [instance](client.BridgeClient.md#instance) -- [verbosity](client.BridgeClient.md#verbosity) +- [currentPlaylistIndex](client_BridgeClient.BridgeClient.md#currentplaylistindex) +- [currentPlaylistItemIndex](client_BridgeClient.BridgeClient.md#currentplaylistitemindex) +- [isCastPending](client_BridgeClient.BridgeClient.md#iscastpending) +- [isConnected](client_BridgeClient.BridgeClient.md#isconnected) +- [isDisconnecting](client_BridgeClient.BridgeClient.md#isdisconnecting) +- [manualDisconnect](client_BridgeClient.BridgeClient.md#manualdisconnect) +- [playState](client_BridgeClient.BridgeClient.md#playstate) +- [playlists](client_BridgeClient.BridgeClient.md#playlists) +- [version](client_BridgeClient.BridgeClient.md#version) +- [eventsource](client_BridgeClient.BridgeClient.md#eventsource) +- [fallback](client_BridgeClient.BridgeClient.md#fallback) +- [instance](client_BridgeClient.BridgeClient.md#instance) +- [verbosity](client_BridgeClient.BridgeClient.md#verbosity) ### Methods -- [addEventListener](client.BridgeClient.md#addeventlistener) -- [apiVersion](client.BridgeClient.md#apiversion) -- [cast](client.BridgeClient.md#cast) -- [connect](client.BridgeClient.md#connect) -- [createAutoStartPlaylist](client.BridgeClient.md#createautostartplaylist) -- [createOrchestration](client.BridgeClient.md#createorchestration) -- [deletePlaylist](client.BridgeClient.md#deleteplaylist) -- [disconnect](client.BridgeClient.md#disconnect) -- [error](client.BridgeClient.md#error) -- [getAutoStartPlaylist](client.BridgeClient.md#getautostartplaylist) -- [getCurrentHologram](client.BridgeClient.md#getcurrenthologram) -- [getDisplays](client.BridgeClient.md#getdisplays) -- [getVerbosity](client.BridgeClient.md#getverbosity) -- [getVersion](client.BridgeClient.md#getversion) -- [log](client.BridgeClient.md#log) -- [next](client.BridgeClient.md#next) -- [pause](client.BridgeClient.md#pause) -- [play](client.BridgeClient.md#play) -- [playStudioPlaylist](client.BridgeClient.md#playstudioplaylist) -- [previous](client.BridgeClient.md#previous) -- [removeEventListener](client.BridgeClient.md#removeeventlistener) -- [seek](client.BridgeClient.md#seek) -- [setAutoStartPlaylist](client.BridgeClient.md#setautostartplaylist) -- [setVerbosity](client.BridgeClient.md#setverbosity) -- [showWindow](client.BridgeClient.md#showwindow) -- [status](client.BridgeClient.md#status) -- [stopStudioPlaylist](client.BridgeClient.md#stopstudioplaylist) -- [updateCurrentHologram](client.BridgeClient.md#updatecurrenthologram) -- [warn](client.BridgeClient.md#warn) -- [getInstance](client.BridgeClient.md#getinstance) +- [addEventListener](client_BridgeClient.BridgeClient.md#addeventlistener) +- [apiVersion](client_BridgeClient.BridgeClient.md#apiversion) +- [cast](client_BridgeClient.BridgeClient.md#cast) +- [connect](client_BridgeClient.BridgeClient.md#connect) +- [createAutoStartPlaylist](client_BridgeClient.BridgeClient.md#createautostartplaylist) +- [createOrchestration](client_BridgeClient.BridgeClient.md#createorchestration) +- [deletePlaylist](client_BridgeClient.BridgeClient.md#deleteplaylist) +- [disconnect](client_BridgeClient.BridgeClient.md#disconnect) +- [error](client_BridgeClient.BridgeClient.md#error) +- [getAutoStartPlaylist](client_BridgeClient.BridgeClient.md#getautostartplaylist) +- [getCurrentHologram](client_BridgeClient.BridgeClient.md#getcurrenthologram) +- [getCurrentPlaylist](client_BridgeClient.BridgeClient.md#getcurrentplaylist) +- [getDisplays](client_BridgeClient.BridgeClient.md#getdisplays) +- [getVerbosity](client_BridgeClient.BridgeClient.md#getverbosity) +- [getVersion](client_BridgeClient.BridgeClient.md#getversion) +- [log](client_BridgeClient.BridgeClient.md#log) +- [next](client_BridgeClient.BridgeClient.md#next) +- [pause](client_BridgeClient.BridgeClient.md#pause) +- [play](client_BridgeClient.BridgeClient.md#play) +- [playRemotePlaylist](client_BridgeClient.BridgeClient.md#playremoteplaylist) +- [playStudioPlaylist](client_BridgeClient.BridgeClient.md#playstudioplaylist) +- [previous](client_BridgeClient.BridgeClient.md#previous) +- [removeEventListener](client_BridgeClient.BridgeClient.md#removeeventlistener) +- [seek](client_BridgeClient.BridgeClient.md#seek) +- [setAutoStartPlaylist](client_BridgeClient.BridgeClient.md#setautostartplaylist) +- [setVerbosity](client_BridgeClient.BridgeClient.md#setverbosity) +- [showWindow](client_BridgeClient.BridgeClient.md#showwindow) +- [status](client_BridgeClient.BridgeClient.md#status) +- [stopStudioPlaylist](client_BridgeClient.BridgeClient.md#stopstudioplaylist) +- [updateCurrentHologram](client_BridgeClient.BridgeClient.md#updatecurrenthologram) +- [warn](client_BridgeClient.BridgeClient.md#warn) +- [getInstance](client_BridgeClient.BridgeClient.md#getinstance) ## Constructors @@ -115,6 +118,12 @@ a boolean for whether a disconnect was triggered automatically or manually ___ +### playState + +• **playState**: ``"PLAYING"`` \| ``"PAUSED"`` \| ``"STOPPED"`` = `'STOPPED'` + +___ + ### playlists • **playlists**: `undefined` \| [`Playlist`](playlists_playlist.Playlist.md)[] @@ -125,7 +134,7 @@ ___ ### version -• **version**: [`BridgeVersion`](../modules/components.md#bridgeversion) +• **version**: [`BridgeVersion`](../modules/components_types.md#bridgeversion) the version of the Looking Glass Driver that's running @@ -147,7 +156,7 @@ ___ ### instance -▪ `Static` **instance**: [`BridgeClient`](client.BridgeClient.md) +▪ `Static` **instance**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) the instance of the client that we create, BridgeClient is a singleton, there can only be one @@ -188,13 +197,13 @@ ___ ### apiVersion -▸ **apiVersion**(): `Promise`<{ `response`: [`BridgeVersion`](../modules/components.md#bridgeversion) ; `success`: `boolean` }\> +▸ **apiVersion**(): `Promise`<{ `response`: [`BridgeVersion`](../modules/components_types.md#bridgeversion) ; `success`: `boolean` }\> A helper function to get the version of the Looking Glass Bridge API #### Returns -`Promise`<{ `response`: [`BridgeVersion`](../modules/components.md#bridgeversion) ; `success`: `boolean` }\> +`Promise`<{ `response`: [`BridgeVersion`](../modules/components_types.md#bridgeversion) ; `success`: `boolean` }\> the current version of the Looking Glass API @@ -220,19 +229,19 @@ ___ ### connect -▸ **connect**(): `Promise`<{ `response`: { `orchestration`: `string` ; `version`: [`BridgeVersion`](../modules/components.md#bridgeversion) } ; `success`: `boolean` }\> +▸ **connect**(): `Promise`<{ `response`: { `orchestration`: `string` ; `version`: [`BridgeVersion`](../modules/components_types.md#bridgeversion) } ; `success`: `boolean` }\> Attempt to connect to Looking Glass Bridge. #### Returns -`Promise`<{ `response`: { `orchestration`: `string` ; `version`: [`BridgeVersion`](../modules/components.md#bridgeversion) } ; `success`: `boolean` }\> +`Promise`<{ `response`: { `orchestration`: `string` ; `version`: [`BridgeVersion`](../modules/components_types.md#bridgeversion) } ; `success`: `boolean` }\> ___ ### createAutoStartPlaylist -▸ **createAutoStartPlaylist**(`args`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +▸ **createAutoStartPlaylist**(`args`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> set a playlist to auto-start, requires that all files are local on the system @@ -245,7 +254,7 @@ set a playlist to auto-start, requires that all files are local on the system #### Returns -`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> ___ @@ -271,7 +280,7 @@ ___ ### deletePlaylist -▸ **deletePlaylist**(`playlist`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +▸ **deletePlaylist**(`playlist`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> Delete the instance of the playlist from Bridge, this will stop the playlist from playing if it's active. @@ -283,7 +292,7 @@ Delete the instance of the playlist from Bridge, this will stop the playlist fro #### Returns -`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> ___ @@ -319,13 +328,13 @@ ___ ### getAutoStartPlaylist -▸ **getAutoStartPlaylist**(): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_path: { value: string; type: "WSTRING"; name: string; }; playlist\_name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +▸ **getAutoStartPlaylist**(): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; playlist\_path: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> Get the current playlist that is set to start automatically #### Returns -`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_path: { value: string; type: "WSTRING"; name: string; }; playlist\_name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; playlist\_path: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> ___ @@ -339,6 +348,16 @@ ___ ___ +### getCurrentPlaylist + +▸ **getCurrentPlaylist**(): `undefined` \| [`Playlist`](playlists_playlist.Playlist.md) + +#### Returns + +`undefined` \| [`Playlist`](playlists_playlist.Playlist.md) + +___ + ### getDisplays ▸ **getDisplays**(): `Promise`<{ `response`: ``null`` \| [`Display`](../interfaces/components_displays.Display.md)[] ; `success`: `boolean` }\> @@ -366,13 +385,13 @@ ___ ### getVersion -▸ **getVersion**(): `Promise`<{ `response`: [`BridgeVersion`](../modules/components.md#bridgeversion) ; `success`: `boolean` }\> +▸ **getVersion**(): `Promise`<{ `response`: [`BridgeVersion`](../modules/components_types.md#bridgeversion) ; `success`: `boolean` }\> A helper function to get the version of Looking Glass Bridge that is running. #### Returns -`Promise`<{ `response`: [`BridgeVersion`](../modules/components.md#bridgeversion) ; `success`: `boolean` }\> +`Promise`<{ `response`: [`BridgeVersion`](../modules/components_types.md#bridgeversion) ; `success`: `boolean` }\> string of the version of Looking Glass Bridge that is running @@ -398,43 +417,60 @@ ___ ### next -▸ **next**(): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +▸ **next**(): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> Got to the next playlist item #### Returns -`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> ___ ### pause -▸ **pause**(): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +▸ **pause**(): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> Pause the currently playing playlist #### Returns -`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> ___ ### play -▸ **play**(): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +▸ **play**(): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> Play the currently instanced playlist #### Returns -`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> + +___ + +### playRemotePlaylist + +▸ **playRemotePlaylist**(`holograms`, `index?`): `Promise`<{ `success`: `boolean` = false }\> + +#### Parameters + +| Name | Type | Default value | +| :------ | :------ | :------ | +| `holograms` | [`HologramType`](../modules/components_hologram.md#hologramtype)[] | `undefined` | +| `index` | `number` | `0` | + +#### Returns + +`Promise`<{ `success`: `boolean` = false }\> ___ ### playStudioPlaylist -▸ **playStudioPlaylist**(`playlistPath`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; id?: { value: string; type: "WSTRING"; name: string; } \| undefined; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +▸ **playStudioPlaylist**(`playlistPath`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { message: { value: string; name: string; type: "WSTRING"; }; id?: { value: string; name: string; type: "WSTRING"; } \| undefined; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> Play a Playlist created by Looking Glass Studio, requires the full path to the playlist.json file. @@ -446,19 +482,19 @@ Play a Playlist created by Looking Glass Studio, requires the full path to the p #### Returns -`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; id?: { value: string; type: "WSTRING"; name: string; } \| undefined; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { message: { value: string; name: string; type: "WSTRING"; }; id?: { value: string; name: string; type: "WSTRING"; } \| undefined; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> ___ ### previous -▸ **previous**(): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +▸ **previous**(): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> Go to the previous playlist item #### Returns -`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> ___ @@ -487,7 +523,7 @@ ___ ### seek -▸ **seek**(`index`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +▸ **seek**(`index`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> Seek to a specific item in a playlist @@ -499,13 +535,13 @@ Seek to a specific item in a playlist #### Returns -`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> ___ ### setAutoStartPlaylist -▸ **setAutoStartPlaylist**(`args`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +▸ **setAutoStartPlaylist**(`args`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> Choose a Playlist that exists on the local file system to set as the start up playlist @@ -519,7 +555,7 @@ Choose a Playlist that exists on the local file system to set as the start up pl #### Returns -`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> ___ @@ -543,7 +579,7 @@ ___ ### showWindow -▸ **showWindow**(`showWindow`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +▸ **showWindow**(`showWindow`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> changes the state of the Looking Glass Bridge Window @@ -555,7 +591,7 @@ changes the state of the Looking Glass Bridge Window #### Returns -`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> ___ @@ -587,7 +623,7 @@ ___ ### updateCurrentHologram -▸ **updateCurrentHologram**<`T`\>(`«destructured»`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +▸ **updateCurrentHologram**<`T`\>(`«destructured»`): `Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> Update the parameters of the current hologram @@ -595,7 +631,7 @@ Update the parameters of the current hologram | Name | Type | | :------ | :------ | -| `T` | extends ``"focus"`` \| ``"depth_loc"`` \| ``"depth_inversion"`` \| ``"chroma_depth"`` \| ``"depthiness"`` \| ``"depth_cutoff"`` \| ``"zoom"`` \| ``"crop_pos_x"`` \| ``"crop_pos_y"`` | +| `T` | extends ``"focus"`` \| ``"crop_pos_x"`` \| ``"crop_pos_y"`` \| ``"zoom"`` \| ``"depth_loc"`` \| ``"depth_inversion"`` \| ``"chroma_depth"`` \| ``"depthiness"`` \| ``"depth_cutoff"`` | #### Parameters @@ -608,7 +644,7 @@ Update the parameters of the current hologram #### Returns -`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status } ; `success`: `boolean` }\> +`Promise`<{ `response`: ``null`` \| { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status } ; `success`: `boolean` }\> ___ @@ -632,8 +668,8 @@ ___ ### getInstance -▸ `Static` **getInstance**(): [`BridgeClient`](client.BridgeClient.md) +▸ `Static` **getInstance**(): [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Returns -[`BridgeClient`](client.BridgeClient.md) +[`BridgeClient`](client_BridgeClient.BridgeClient.md) diff --git a/docs/classes/components_messageHandler.MessageHandler.md b/docs/classes/components_messageHandler.MessageHandler.md index 1367656..4d8e4e1 100644 --- a/docs/classes/components_messageHandler.MessageHandler.md +++ b/docs/classes/components_messageHandler.MessageHandler.md @@ -71,7 +71,7 @@ | :------ | :------ | | `args` | `Object` | | `args.bridgeEventName` | `E` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | ## Properties @@ -83,7 +83,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) ## Methods diff --git a/docs/classes/components_messageHandler.MonitorConnectedMessageHandler.md b/docs/classes/components_messageHandler.MonitorConnectedMessageHandler.md index fb43387..9679a29 100644 --- a/docs/classes/components_messageHandler.MonitorConnectedMessageHandler.md +++ b/docs/classes/components_messageHandler.MonitorConnectedMessageHandler.md @@ -36,7 +36,7 @@ | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | #### Overrides @@ -56,7 +56,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Inherited from @@ -74,9 +74,9 @@ ___ | :------ | :------ | :------ | | `message` | `Object` | `undefined` | | `message.name` | `string` | `schema.name` | -| `message.orchestration` | { value: string; type: "WSTRING"; name: string; } | `undefined` | -| `message.payload` | { value: { message: { value: string; type: "WSTRING"; name: string; }; head\_index: { value: number; type: "UNSIGNED\_INT"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; ... 7 ... | `undefined` | -| `message.status` | { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } | `schema.status` | +| `message.orchestration` | { value: string; name: string; type: "WSTRING"; } | `undefined` | +| `message.payload` | { value: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; x: { value: number; name: string; type: "INT"; }; y: { value: number; name: string; type: "INT"; }; ... 7 more ...; width: { ...; }; }; name: string; type: "VARIANT\_MAP"; } | `undefined` | +| `message.status` | { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } | `schema.status` | #### Returns diff --git a/docs/classes/components_messageHandler.MonitorDisconnectedMessageHandler.md b/docs/classes/components_messageHandler.MonitorDisconnectedMessageHandler.md index e3d4586..e6409ab 100644 --- a/docs/classes/components_messageHandler.MonitorDisconnectedMessageHandler.md +++ b/docs/classes/components_messageHandler.MonitorDisconnectedMessageHandler.md @@ -36,7 +36,7 @@ | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | #### Overrides @@ -56,7 +56,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Inherited from @@ -74,9 +74,9 @@ ___ | :------ | :------ | :------ | | `message` | `Object` | `undefined` | | `message.name` | `string` | `schema.name` | -| `message.orchestration` | { value: string; type: "WSTRING"; name: string; } | `undefined` | -| `message.payload` | { value: { message: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | -| `message.status` | { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } | `schema.status` | +| `message.orchestration` | { value: string; name: string; type: "WSTRING"; } | `undefined` | +| `message.payload` | { value: { message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | +| `message.status` | { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } | `schema.status` | #### Returns diff --git a/docs/classes/components_messageHandler.NewItemPlayingMessageHandler.md b/docs/classes/components_messageHandler.NewItemPlayingMessageHandler.md index bc419ed..f6d8f1f 100644 --- a/docs/classes/components_messageHandler.NewItemPlayingMessageHandler.md +++ b/docs/classes/components_messageHandler.NewItemPlayingMessageHandler.md @@ -36,7 +36,7 @@ | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | #### Overrides @@ -56,7 +56,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Inherited from @@ -74,9 +74,9 @@ ___ | :------ | :------ | :------ | | `message` | `Object` | `undefined` | | `message.name` | `string` | `schema.name` | -| `message.orchestration` | { value: string; type: "WSTRING"; name: string; } | `undefined` | -| `message.payload` | { value: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; index: { value: number; type: "UNSIGNED\_INT"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| ... 9 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } | `undefined` | -| `message.status` | { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } | `schema.status` | +| `message.orchestration` | { value: string; name: string; type: "WSTRING"; } | `undefined` | +| `message.payload` | { value: { index: { value: number; name: string; type: "UNSIGNED\_INT"; }; playlist\_name: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| ... 9 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } | `undefined` | +| `message.status` | { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } | `schema.status` | #### Returns diff --git a/docs/classes/components_messageHandler.PlaylistDeleteMessageHandler.md b/docs/classes/components_messageHandler.PlaylistDeleteMessageHandler.md index 4728d0a..3c6deb3 100644 --- a/docs/classes/components_messageHandler.PlaylistDeleteMessageHandler.md +++ b/docs/classes/components_messageHandler.PlaylistDeleteMessageHandler.md @@ -36,7 +36,7 @@ | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | #### Overrides @@ -56,7 +56,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Inherited from @@ -74,9 +74,9 @@ ___ | :------ | :------ | :------ | | `message` | `Object` | `undefined` | | `message.name` | `string` | `schema.name` | -| `message.orchestration` | { value: string; type: "WSTRING"; name: string; } | `undefined` | -| `message.payload` | { value: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: str... | `undefined` | -| `message.status` | { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } | `schema.status` | +| `message.orchestration` | { value: string; name: string; type: "WSTRING"; } | `undefined` | +| `message.payload` | { value: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_M... | `undefined` | +| `message.status` | { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } | `schema.status` | #### Returns diff --git a/docs/classes/components_messageHandler.PlaylistInsertMessageHandler.md b/docs/classes/components_messageHandler.PlaylistInsertMessageHandler.md index 3d6e51b..24b6ed3 100644 --- a/docs/classes/components_messageHandler.PlaylistInsertMessageHandler.md +++ b/docs/classes/components_messageHandler.PlaylistInsertMessageHandler.md @@ -36,7 +36,7 @@ | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | #### Overrides @@ -56,7 +56,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Inherited from @@ -74,9 +74,9 @@ ___ | :------ | :------ | :------ | | `message` | `Object` | `undefined` | | `message.name` | `string` | `schema.name` | -| `message.orchestration` | { value: string; type: "WSTRING"; name: string; } | `undefined` | -| `message.payload` | { value: { message: { value: string; type: "WSTRING"; name: string; }; uri: { value: string; type: "WSTRING"; name: string; }; index: { value: number; type: "UNSIGNED\_INT"; name: string; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VA... | `undefined` | -| `message.status` | { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } | `schema.status` | +| `message.orchestration` | { value: string; name: string; type: "WSTRING"; } | `undefined` | +| `message.payload` | { value: { message: { value: string; name: string; type: "WSTRING"; }; index: { value: number; name: string; type: "UNSIGNED\_INT"; }; uri: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: str... | `undefined` | +| `message.status` | { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } | `schema.status` | #### Returns diff --git a/docs/classes/components_messageHandler.PlaylistInstanceMessageHandler.md b/docs/classes/components_messageHandler.PlaylistInstanceMessageHandler.md index 6d90f3b..ad81628 100644 --- a/docs/classes/components_messageHandler.PlaylistInstanceMessageHandler.md +++ b/docs/classes/components_messageHandler.PlaylistInstanceMessageHandler.md @@ -36,7 +36,7 @@ | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | #### Overrides @@ -56,7 +56,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Inherited from @@ -74,9 +74,9 @@ ___ | :------ | :------ | :------ | | `message` | `Object` | `undefined` | | `message.name` | `string` | `schema.name` | -| `message.orchestration` | { value: string; type: "WSTRING"; name: string; } | `undefined` | -| `message.payload` | { value: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: str... | `undefined` | -| `message.status` | { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } | `schema.status` | +| `message.orchestration` | { value: string; name: string; type: "WSTRING"; } | `undefined` | +| `message.payload` | { value: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_M... | `undefined` | +| `message.status` | { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } | `schema.status` | #### Returns diff --git a/docs/classes/components_messageHandler.ProgressCompletionMessageHandler.md b/docs/classes/components_messageHandler.ProgressCompletionMessageHandler.md index e5634c6..16e71e4 100644 --- a/docs/classes/components_messageHandler.ProgressCompletionMessageHandler.md +++ b/docs/classes/components_messageHandler.ProgressCompletionMessageHandler.md @@ -36,7 +36,7 @@ | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | #### Overrides @@ -56,7 +56,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Inherited from @@ -74,9 +74,9 @@ ___ | :------ | :------ | :------ | | `message` | `Object` | `undefined` | | `message.name` | `string` | `schema.name` | -| `message.orchestration` | { value: string; type: "WSTRING"; name: string; } | `undefined` | -| `message.payload` | { value: { message: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | -| `message.status` | { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } | `schema.status` | +| `message.orchestration` | { value: string; name: string; type: "WSTRING"; } | `undefined` | +| `message.payload` | { value: { message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | +| `message.status` | { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } | `schema.status` | #### Returns diff --git a/docs/classes/components_messageHandler.ProgressStartMessageHandler.md b/docs/classes/components_messageHandler.ProgressStartMessageHandler.md index 9c6a323..5790831 100644 --- a/docs/classes/components_messageHandler.ProgressStartMessageHandler.md +++ b/docs/classes/components_messageHandler.ProgressStartMessageHandler.md @@ -36,7 +36,7 @@ | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | #### Overrides @@ -56,7 +56,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Inherited from @@ -74,9 +74,9 @@ ___ | :------ | :------ | :------ | | `message` | `Object` | `undefined` | | `message.name` | `string` | `schema.name` | -| `message.orchestration` | { value: string; type: "WSTRING"; name: string; } | `undefined` | -| `message.payload` | { value: { message: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | -| `message.status` | { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } | `schema.status` | +| `message.orchestration` | { value: string; name: string; type: "WSTRING"; } | `undefined` | +| `message.payload` | { value: { message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | +| `message.status` | { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } | `schema.status` | #### Returns diff --git a/docs/classes/components_messageHandler.ProgressUpdateMessageHandler.md b/docs/classes/components_messageHandler.ProgressUpdateMessageHandler.md index 361545a..a5e1c2a 100644 --- a/docs/classes/components_messageHandler.ProgressUpdateMessageHandler.md +++ b/docs/classes/components_messageHandler.ProgressUpdateMessageHandler.md @@ -36,7 +36,7 @@ | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | #### Overrides @@ -56,7 +56,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Inherited from @@ -74,9 +74,9 @@ ___ | :------ | :------ | :------ | | `message` | `Object` | `undefined` | | `message.name` | `string` | `schema.name` | -| `message.orchestration` | { value: string; type: "WSTRING"; name: string; } | `undefined` | -| `message.payload` | { value: { message: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | -| `message.status` | { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } | `schema.status` | +| `message.orchestration` | { value: string; name: string; type: "WSTRING"; } | `undefined` | +| `message.payload` | { value: { message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | +| `message.status` | { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } | `schema.status` | #### Returns diff --git a/docs/classes/components_messageHandler.SyncPlayPlaylistCancelledMessageHandler.md b/docs/classes/components_messageHandler.SyncPlayPlaylistCancelledMessageHandler.md index 8811779..ec8791b 100644 --- a/docs/classes/components_messageHandler.SyncPlayPlaylistCancelledMessageHandler.md +++ b/docs/classes/components_messageHandler.SyncPlayPlaylistCancelledMessageHandler.md @@ -36,7 +36,7 @@ | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | #### Overrides @@ -56,7 +56,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Inherited from @@ -74,9 +74,9 @@ ___ | :------ | :------ | :------ | | `message` | `Object` | `undefined` | | `message.name` | `string` | `schema.name` | -| `message.orchestration` | { value: string; type: "WSTRING"; name: string; } | `undefined` | -| `message.payload` | { value: { message: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | -| `message.status` | { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } | `schema.status` | +| `message.orchestration` | { value: string; name: string; type: "WSTRING"; } | `undefined` | +| `message.payload` | { value: { message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | +| `message.status` | { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } | `schema.status` | #### Returns diff --git a/docs/classes/components_messageHandler.SyncPlayPlaylistCompleteMessageHandler.md b/docs/classes/components_messageHandler.SyncPlayPlaylistCompleteMessageHandler.md index ab0d598..c5f9eff 100644 --- a/docs/classes/components_messageHandler.SyncPlayPlaylistCompleteMessageHandler.md +++ b/docs/classes/components_messageHandler.SyncPlayPlaylistCompleteMessageHandler.md @@ -36,7 +36,7 @@ | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | #### Overrides @@ -56,7 +56,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Inherited from @@ -74,9 +74,9 @@ ___ | :------ | :------ | :------ | | `message` | `Object` | `undefined` | | `message.name` | `string` | `schema.name` | -| `message.orchestration` | { value: string; type: "WSTRING"; name: string; } | `undefined` | -| `message.payload` | { value: { message: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | -| `message.status` | { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } | `schema.status` | +| `message.orchestration` | { value: string; name: string; type: "WSTRING"; } | `undefined` | +| `message.payload` | { value: { message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | +| `message.status` | { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } | `schema.status` | #### Returns diff --git a/docs/classes/components_messageHandler.SyncPlayPlaylistMessageHandler.md b/docs/classes/components_messageHandler.SyncPlayPlaylistMessageHandler.md index 2d9b895..f5fd4d3 100644 --- a/docs/classes/components_messageHandler.SyncPlayPlaylistMessageHandler.md +++ b/docs/classes/components_messageHandler.SyncPlayPlaylistMessageHandler.md @@ -36,7 +36,7 @@ | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.client` | [`BridgeClient`](client.BridgeClient.md) | +| `args.client` | [`BridgeClient`](client_BridgeClient.BridgeClient.md) | #### Overrides @@ -56,7 +56,7 @@ ___ ### client -• **client**: [`BridgeClient`](client.BridgeClient.md) +• **client**: [`BridgeClient`](client_BridgeClient.BridgeClient.md) #### Inherited from @@ -74,9 +74,9 @@ ___ | :------ | :------ | :------ | | `message` | `Object` | `undefined` | | `message.name` | `string` | `schema.name` | -| `message.orchestration` | { value: string; type: "WSTRING"; name: string; } | `undefined` | -| `message.payload` | { value: { message: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | -| `message.status` | { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } | `schema.status` | +| `message.orchestration` | { value: string; name: string; type: "WSTRING"; } | `undefined` | +| `message.payload` | { value: { message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; progress: { ...; }; progress\_type: { ...; }; }... | `undefined` | +| `message.status` | { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } | `schema.status` | #### Returns diff --git a/docs/classes/playlists_playlist.Playlist.md b/docs/classes/playlists_playlist.Playlist.md index 47679f3..629e9a0 100644 --- a/docs/classes/playlists_playlist.Playlist.md +++ b/docs/classes/playlists_playlist.Playlist.md @@ -41,7 +41,7 @@ Playlist class | Name | Type | | :------ | :------ | | `args` | `Object` | -| `args.items` | [`PlaylistItemType`](../modules/playlists_playlist.md#playlistitemtype)[] | +| `args.items?` | [`HologramType`](../modules/components_hologram.md#hologramtype)[] | | `args.loop` | `boolean` | | `args.name` | `string` | | `args.orchestration` | `string` | @@ -164,7 +164,7 @@ ___ ### play -▸ **play**(`«destructured»`): `Promise`<`boolean`\> +▸ **play**(`«destructured»?`): `Promise`<`boolean`\> this function will play a playlist on a Looking Glass display the playlist must be created and populated with content before calling this function diff --git a/docs/interfaces/components.BridgeOrchestration.md b/docs/interfaces/components.BridgeOrchestration.md deleted file mode 100644 index 1fb4b0e..0000000 --- a/docs/interfaces/components.BridgeOrchestration.md +++ /dev/null @@ -1,31 +0,0 @@ -[@lookingglass/bridge](../README.md) / [components](../modules/components.md) / BridgeOrchestration - -# Interface: BridgeOrchestration - -[components](../modules/components.md).BridgeOrchestration - -## Table of contents - -### Properties - -- [name](components.BridgeOrchestration.md#name) -- [type](components.BridgeOrchestration.md#type) -- [value](components.BridgeOrchestration.md#value) - -## Properties - -### name - -• **name**: ``"orchestration"`` - -___ - -### type - -• **type**: [`BridgeType`](../modules/components.md#bridgetype) - -___ - -### value - -• **value**: ``""`` diff --git a/docs/interfaces/components.BridgePayload.md b/docs/interfaces/components.BridgePayload.md deleted file mode 100644 index 30406e4..0000000 --- a/docs/interfaces/components.BridgePayload.md +++ /dev/null @@ -1,39 +0,0 @@ -[@lookingglass/bridge](../README.md) / [components](../modules/components.md) / BridgePayload - -# Interface: BridgePayload - -[components](../modules/components.md).BridgePayload - -## Table of contents - -### Properties - -- [name](components.BridgePayload.md#name) -- [orchestration](components.BridgePayload.md#orchestration) -- [payload](components.BridgePayload.md#payload) - -## Properties - -### name - -• **name**: ``"value"`` - -___ - -### orchestration - -• **orchestration**: [`BridgeOrchestration`](components.BridgeOrchestration.md) - -___ - -### payload - -• **payload**: `Object` - -#### Type declaration - -| Name | Type | -| :------ | :------ | -| `name` | ``"payload"`` | -| `type` | [`BridgeType`](../modules/components.md#bridgetype) | -| `value` | [`BridgeValueMap`](components.BridgeValueMap.md) | diff --git a/docs/interfaces/components.BridgeValue.md b/docs/interfaces/components.BridgeValue.md deleted file mode 100644 index c38f9a2..0000000 --- a/docs/interfaces/components.BridgeValue.md +++ /dev/null @@ -1,31 +0,0 @@ -[@lookingglass/bridge](../README.md) / [components](../modules/components.md) / BridgeValue - -# Interface: BridgeValue - -[components](../modules/components.md).BridgeValue - -## Table of contents - -### Properties - -- [name](components.BridgeValue.md#name) -- [type](components.BridgeValue.md#type) -- [value](components.BridgeValue.md#value) - -## Properties - -### name - -• **name**: `string` - -___ - -### type - -• **type**: [`BridgeType`](../modules/components.md#bridgetype) - -___ - -### value - -• **value**: `string` \| `number` \| `boolean` \| { `x`: `number` ; `y`: `number` } diff --git a/docs/interfaces/components.BridgeValueMap.md b/docs/interfaces/components.BridgeValueMap.md deleted file mode 100644 index 6bbf1c9..0000000 --- a/docs/interfaces/components.BridgeValueMap.md +++ /dev/null @@ -1,9 +0,0 @@ -[@lookingglass/bridge](../README.md) / [components](../modules/components.md) / BridgeValueMap - -# Interface: BridgeValueMap - -[components](../modules/components.md).BridgeValueMap - -## Indexable - -▪ [key: `string`]: [`BridgeValue`](components.BridgeValue.md) diff --git a/docs/interfaces/components.ClientResponse.md b/docs/interfaces/components.ClientResponse.md deleted file mode 100644 index 850eca8..0000000 --- a/docs/interfaces/components.ClientResponse.md +++ /dev/null @@ -1,17 +0,0 @@ -[@lookingglass/bridge](../README.md) / [components](../modules/components.md) / ClientResponse - -# Interface: ClientResponse - -[components](../modules/components.md).ClientResponse - -## Table of contents - -### Properties - -- [success](components.ClientResponse.md#success) - -## Properties - -### success - -• **success**: `boolean` diff --git a/docs/interfaces/components_displays.Display.md b/docs/interfaces/components_displays.Display.md index 1b26023..b186ada 100644 --- a/docs/interfaces/components_displays.Display.md +++ b/docs/interfaces/components_displays.Display.md @@ -31,22 +31,22 @@ ___ ### hardwareVersion -• **hardwareVersion**: [`BridgeValue`](components.BridgeValue.md) +• **hardwareVersion**: [`BridgeValue`](components_types.BridgeValue.md) ___ ### index -• **index**: [`BridgeValue`](components.BridgeValue.md) +• **index**: [`BridgeValue`](components_types.BridgeValue.md) ___ ### state -• **state**: [`BridgeValue`](components.BridgeValue.md) +• **state**: [`BridgeValue`](components_types.BridgeValue.md) ___ ### windowCoords -• **windowCoords**: [`BridgeValue`](components.BridgeValue.md) +• **windowCoords**: [`BridgeValue`](components_types.BridgeValue.md) diff --git a/docs/interfaces/components_types.BridgeOrchestration.md b/docs/interfaces/components_types.BridgeOrchestration.md new file mode 100644 index 0000000..4c8be8c --- /dev/null +++ b/docs/interfaces/components_types.BridgeOrchestration.md @@ -0,0 +1,31 @@ +[@lookingglass/bridge](../README.md) / [components/types](../modules/components_types.md) / BridgeOrchestration + +# Interface: BridgeOrchestration + +[components/types](../modules/components_types.md).BridgeOrchestration + +## Table of contents + +### Properties + +- [name](components_types.BridgeOrchestration.md#name) +- [type](components_types.BridgeOrchestration.md#type) +- [value](components_types.BridgeOrchestration.md#value) + +## Properties + +### name + +• **name**: ``"orchestration"`` + +___ + +### type + +• **type**: [`BridgeType`](../modules/components_types.md#bridgetype) + +___ + +### value + +• **value**: ``""`` diff --git a/docs/interfaces/components_types.BridgePayload.md b/docs/interfaces/components_types.BridgePayload.md new file mode 100644 index 0000000..21989d9 --- /dev/null +++ b/docs/interfaces/components_types.BridgePayload.md @@ -0,0 +1,39 @@ +[@lookingglass/bridge](../README.md) / [components/types](../modules/components_types.md) / BridgePayload + +# Interface: BridgePayload + +[components/types](../modules/components_types.md).BridgePayload + +## Table of contents + +### Properties + +- [name](components_types.BridgePayload.md#name) +- [orchestration](components_types.BridgePayload.md#orchestration) +- [payload](components_types.BridgePayload.md#payload) + +## Properties + +### name + +• **name**: ``"value"`` + +___ + +### orchestration + +• **orchestration**: [`BridgeOrchestration`](components_types.BridgeOrchestration.md) + +___ + +### payload + +• **payload**: `Object` + +#### Type declaration + +| Name | Type | +| :------ | :------ | +| `name` | ``"payload"`` | +| `type` | [`BridgeType`](../modules/components_types.md#bridgetype) | +| `value` | [`BridgeValueMap`](components_types.BridgeValueMap.md) | diff --git a/docs/interfaces/components_types.BridgeValue.md b/docs/interfaces/components_types.BridgeValue.md new file mode 100644 index 0000000..1504b39 --- /dev/null +++ b/docs/interfaces/components_types.BridgeValue.md @@ -0,0 +1,31 @@ +[@lookingglass/bridge](../README.md) / [components/types](../modules/components_types.md) / BridgeValue + +# Interface: BridgeValue + +[components/types](../modules/components_types.md).BridgeValue + +## Table of contents + +### Properties + +- [name](components_types.BridgeValue.md#name) +- [type](components_types.BridgeValue.md#type) +- [value](components_types.BridgeValue.md#value) + +## Properties + +### name + +• **name**: `string` + +___ + +### type + +• **type**: [`BridgeType`](../modules/components_types.md#bridgetype) + +___ + +### value + +• **value**: `string` \| `number` \| `boolean` \| { `x`: `number` ; `y`: `number` } diff --git a/docs/interfaces/components_types.BridgeValueMap.md b/docs/interfaces/components_types.BridgeValueMap.md new file mode 100644 index 0000000..da27ec9 --- /dev/null +++ b/docs/interfaces/components_types.BridgeValueMap.md @@ -0,0 +1,9 @@ +[@lookingglass/bridge](../README.md) / [components/types](../modules/components_types.md) / BridgeValueMap + +# Interface: BridgeValueMap + +[components/types](../modules/components_types.md).BridgeValueMap + +## Indexable + +▪ [key: `string`]: [`BridgeValue`](components_types.BridgeValue.md) diff --git a/docs/interfaces/playlists_playlist.PlaylistArgs.md b/docs/interfaces/playlists_playlist.PlaylistArgs.md index f2c01d8..35adf13 100644 --- a/docs/interfaces/playlists_playlist.PlaylistArgs.md +++ b/docs/interfaces/playlists_playlist.PlaylistArgs.md @@ -9,7 +9,6 @@ ### Properties - [head](playlists_playlist.PlaylistArgs.md#head) -- [playlist](playlists_playlist.PlaylistArgs.md#playlist) ## Properties @@ -18,11 +17,3 @@ • `Optional` **head**: `number` display - -___ - -### playlist - -• **playlist**: [`Playlist`](../classes/playlists_playlist.Playlist.md) - -the playlist class diff --git a/docs/modules/client.md b/docs/modules/client.md deleted file mode 100644 index 2508ee2..0000000 --- a/docs/modules/client.md +++ /dev/null @@ -1,9 +0,0 @@ -[@lookingglass/bridge](../README.md) / client - -# Module: client - -## Table of contents - -### Classes - -- [BridgeClient](../classes/client.BridgeClient.md) diff --git a/docs/modules/client_BridgeClient.md b/docs/modules/client_BridgeClient.md new file mode 100644 index 0000000..df503d5 --- /dev/null +++ b/docs/modules/client_BridgeClient.md @@ -0,0 +1,9 @@ +[@lookingglass/bridge](../README.md) / client/BridgeClient + +# Module: client/BridgeClient + +## Table of contents + +### Classes + +- [BridgeClient](../classes/client_BridgeClient.BridgeClient.md) diff --git a/docs/modules/components_endpoints.md b/docs/modules/components_endpoints.md index a738d80..10bfa36 100644 --- a/docs/modules/components_endpoints.md +++ b/docs/modules/components_endpoints.md @@ -141,7 +141,7 @@ ___ | Name | Type | | :------ | :------ | -| `T` | extends ``"show_window"`` \| ``"insert_playlist_entry"`` \| ``"instance_studio_playlist"`` \| ``"bridge_version"`` \| ``"api_version"`` \| ``"get_autostart_playlist"`` \| ``"set_named_autostart_playlist"`` \| ``"set_autostart_playlist"`` \| ``"available_output_devices"`` \| ``"enter_orchestration"`` \| ``"exit_orchestration"`` \| ``"instance_playlist"`` \| ``"delete_playlist"`` \| ``"update_playlist_entry"`` \| ``"update_current_entry"`` \| ``"transport_control_play"`` \| ``"transport_control_pause"`` \| ``"transport_control_next"`` \| ``"transport_control_previous"`` \| ``"transport_control_seek_to_index"`` \| ``"play_playlist"`` | +| `T` | extends ``"show_window"`` \| ``"instance_studio_playlist"`` \| ``"bridge_version"`` \| ``"api_version"`` \| ``"set_named_autostart_playlist"`` \| ``"get_autostart_playlist"`` \| ``"set_autostart_playlist"`` \| ``"available_output_devices"`` \| ``"enter_orchestration"`` \| ``"exit_orchestration"`` \| ``"instance_playlist"`` \| ``"delete_playlist"`` \| ``"insert_playlist_entry"`` \| ``"update_playlist_entry"`` \| ``"update_current_entry"`` \| ``"transport_control_play"`` \| ``"transport_control_pause"`` \| ``"transport_control_next"`` \| ``"transport_control_previous"`` \| ``"transport_control_seek_to_index"`` \| ``"play_playlist"`` | #### Parameters diff --git a/docs/modules/components.md b/docs/modules/components_types.md similarity index 56% rename from docs/modules/components.md rename to docs/modules/components_types.md index 7bcdfe7..645fa23 100644 --- a/docs/modules/components.md +++ b/docs/modules/components_types.md @@ -1,21 +1,20 @@ -[@lookingglass/bridge](../README.md) / components +[@lookingglass/bridge](../README.md) / components/types -# Module: components +# Module: components/types ## Table of contents ### Interfaces -- [BridgeOrchestration](../interfaces/components.BridgeOrchestration.md) -- [BridgePayload](../interfaces/components.BridgePayload.md) -- [BridgeValue](../interfaces/components.BridgeValue.md) -- [BridgeValueMap](../interfaces/components.BridgeValueMap.md) -- [ClientResponse](../interfaces/components.ClientResponse.md) +- [BridgeOrchestration](../interfaces/components_types.BridgeOrchestration.md) +- [BridgePayload](../interfaces/components_types.BridgePayload.md) +- [BridgeValue](../interfaces/components_types.BridgeValue.md) +- [BridgeValueMap](../interfaces/components_types.BridgeValueMap.md) ### Type Aliases -- [BridgeType](components.md#bridgetype) -- [BridgeVersion](components.md#bridgeversion) +- [BridgeType](components_types.md#bridgetype) +- [BridgeVersion](components_types.md#bridgeversion) ## Type Aliases diff --git a/docs/modules/index.md b/docs/modules/index.md deleted file mode 100644 index dcdfe01..0000000 --- a/docs/modules/index.md +++ /dev/null @@ -1,267 +0,0 @@ -[@lookingglass/bridge](../README.md) / index - -# Module: index - -## Table of contents - -### References - -- [BridgeClient](index.md#bridgeclient) -- [HologramClasses](index.md#hologramclasses) -- [HologramParamMap](index.md#hologramparammap) -- [HologramSettings](index.md#hologramsettings) -- [HologramType](index.md#hologramtype) -- [MessageHandler](index.md#messagehandler) -- [MonitorConnectedMessageHandler](index.md#monitorconnectedmessagehandler) -- [MonitorDisconnectedMessageHandler](index.md#monitordisconnectedmessagehandler) -- [NewItemPlayingMessageHandler](index.md#newitemplayingmessagehandler) -- [Playlist](index.md#playlist) -- [PlaylistArgs](index.md#playlistargs) -- [PlaylistDeleteMessageHandler](index.md#playlistdeletemessagehandler) -- [PlaylistInsertMessageHandler](index.md#playlistinsertmessagehandler) -- [PlaylistInstanceMessageHandler](index.md#playlistinstancemessagehandler) -- [PlaylistItemArgs](index.md#playlistitemargs) -- [PlaylistItemType](index.md#playlistitemtype) -- [PlaylistType](index.md#playlisttype) -- [ProgressCompletionMessageHandler](index.md#progresscompletionmessagehandler) -- [ProgressStartMessageHandler](index.md#progressstartmessagehandler) -- [ProgressUpdateMessageHandler](index.md#progressupdatemessagehandler) -- [QuiltHologram](index.md#quilthologram) -- [QuiltHologramArgs](index.md#quilthologramargs) -- [QuiltPlaylistItem](index.md#quiltplaylistitem) -- [RGBDHologram](index.md#rgbdhologram) -- [RGBDHologramArgs](index.md#rgbdhologramargs) -- [RGBDPlaylistItem](index.md#rgbdplaylistitem) -- [SyncPlayPlaylistCancelledMessageHandler](index.md#syncplayplaylistcancelledmessagehandler) -- [SyncPlayPlaylistCompleteMessageHandler](index.md#syncplayplaylistcompletemessagehandler) -- [SyncPlayPlaylistMessageHandler](index.md#syncplayplaylistmessagehandler) -- [defaults](index.md#defaults) -- [getPlayPlaylistJsonArgs](index.md#getplayplaylistjsonargs) -- [hologramFactory](index.md#hologramfactory) -- [hologramMap](index.md#hologrammap) -- [hologramParamMap](index.md#hologramparammap-1) -- [hologramTypeSchema](index.md#hologramtypeschema) -- [hologramTypes](index.md#hologramtypes) -- [parameterNames](index.md#parameternames) - -## References - -### BridgeClient - -Re-exports [BridgeClient](../classes/client.BridgeClient.md) - -___ - -### HologramClasses - -Re-exports [HologramClasses](../interfaces/schemas_schema_hologram.HologramClasses.md) - -___ - -### HologramParamMap - -Re-exports [HologramParamMap](schemas_schema_parameters.md#hologramparammap) - -___ - -### HologramSettings - -Re-exports [HologramSettings](schemas_schema_hologram.md#hologramsettings) - -___ - -### HologramType - -Re-exports [HologramType](components_hologram.md#hologramtype) - -___ - -### MessageHandler - -Re-exports [MessageHandler](../classes/components_messageHandler.MessageHandler.md) - -___ - -### MonitorConnectedMessageHandler - -Re-exports [MonitorConnectedMessageHandler](../classes/components_messageHandler.MonitorConnectedMessageHandler.md) - -___ - -### MonitorDisconnectedMessageHandler - -Re-exports [MonitorDisconnectedMessageHandler](../classes/components_messageHandler.MonitorDisconnectedMessageHandler.md) - -___ - -### NewItemPlayingMessageHandler - -Re-exports [NewItemPlayingMessageHandler](../classes/components_messageHandler.NewItemPlayingMessageHandler.md) - -___ - -### Playlist - -Re-exports [Playlist](../classes/playlists_playlist.Playlist.md) - -___ - -### PlaylistArgs - -Re-exports [PlaylistArgs](../interfaces/playlists_playlist.PlaylistArgs.md) - -___ - -### PlaylistDeleteMessageHandler - -Re-exports [PlaylistDeleteMessageHandler](../classes/components_messageHandler.PlaylistDeleteMessageHandler.md) - -___ - -### PlaylistInsertMessageHandler - -Re-exports [PlaylistInsertMessageHandler](../classes/components_messageHandler.PlaylistInsertMessageHandler.md) - -___ - -### PlaylistInstanceMessageHandler - -Re-exports [PlaylistInstanceMessageHandler](../classes/components_messageHandler.PlaylistInstanceMessageHandler.md) - -___ - -### PlaylistItemArgs - -Re-exports [PlaylistItemArgs](../interfaces/playlists_playlistItems.PlaylistItemArgs.md) - -___ - -### PlaylistItemType - -Re-exports [PlaylistItemType](playlists_playlist.md#playlistitemtype) - -___ - -### PlaylistType - -Re-exports [PlaylistType](../interfaces/playlists_playlist.PlaylistType.md) - -___ - -### ProgressCompletionMessageHandler - -Re-exports [ProgressCompletionMessageHandler](../classes/components_messageHandler.ProgressCompletionMessageHandler.md) - -___ - -### ProgressStartMessageHandler - -Re-exports [ProgressStartMessageHandler](../classes/components_messageHandler.ProgressStartMessageHandler.md) - -___ - -### ProgressUpdateMessageHandler - -Re-exports [ProgressUpdateMessageHandler](../classes/components_messageHandler.ProgressUpdateMessageHandler.md) - -___ - -### QuiltHologram - -Re-exports [QuiltHologram](../classes/components_hologram.QuiltHologram.md) - -___ - -### QuiltHologramArgs - -Re-exports [QuiltHologramArgs](schemas_schema_hologram.md#quilthologramargs) - -___ - -### QuiltPlaylistItem - -Re-exports [QuiltPlaylistItem](../classes/playlists_playlistItems.QuiltPlaylistItem.md) - -___ - -### RGBDHologram - -Re-exports [RGBDHologram](../classes/components_hologram.RGBDHologram.md) - -___ - -### RGBDHologramArgs - -Re-exports [RGBDHologramArgs](schemas_schema_hologram.md#rgbdhologramargs) - -___ - -### RGBDPlaylistItem - -Re-exports [RGBDPlaylistItem](../classes/playlists_playlistItems.RGBDPlaylistItem.md) - -___ - -### SyncPlayPlaylistCancelledMessageHandler - -Re-exports [SyncPlayPlaylistCancelledMessageHandler](../classes/components_messageHandler.SyncPlayPlaylistCancelledMessageHandler.md) - -___ - -### SyncPlayPlaylistCompleteMessageHandler - -Re-exports [SyncPlayPlaylistCompleteMessageHandler](../classes/components_messageHandler.SyncPlayPlaylistCompleteMessageHandler.md) - -___ - -### SyncPlayPlaylistMessageHandler - -Re-exports [SyncPlayPlaylistMessageHandler](../classes/components_messageHandler.SyncPlayPlaylistMessageHandler.md) - -___ - -### defaults - -Renames and re-exports [schemas/defaults](schemas_defaults.md) - -___ - -### getPlayPlaylistJsonArgs - -Re-exports [getPlayPlaylistJsonArgs](../interfaces/playlists_playlist.getPlayPlaylistJsonArgs.md) - -___ - -### hologramFactory - -Re-exports [hologramFactory](components_hologram.md#hologramfactory) - -___ - -### hologramMap - -Re-exports [hologramMap](schemas_schema_hologram.md#hologrammap) - -___ - -### hologramParamMap - -Re-exports [hologramParamMap](schemas_schema_parameters.md#hologramparammap-1) - -___ - -### hologramTypeSchema - -Re-exports [hologramTypeSchema](schemas_schema_hologram.md#hologramtypeschema) - -___ - -### hologramTypes - -Re-exports [hologramTypes](schemas_schema_hologram.md#hologramtypes) - -___ - -### parameterNames - -Re-exports [parameterNames](schemas_schema_parameters.md#parameternames) diff --git a/docs/modules/schemas_schema.md b/docs/modules/schemas_schema.md index 14aec16..e6c9f7a 100644 --- a/docs/modules/schemas_schema.md +++ b/docs/modules/schemas_schema.md @@ -65,7 +65,7 @@ ___ ### status -• `Const` **status**: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> +• `Const` **status**: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> ___ diff --git a/docs/modules/schemas_schema_events.md b/docs/modules/schemas_schema_events.md index e20ba59..3f65fcd 100644 --- a/docs/modules/schemas_schema_events.md +++ b/docs/modules/schemas_schema_events.md @@ -62,40 +62,40 @@ ___ ### deletePlaylistResponse -• `Const` **deletePlaylistResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `message`: { value: string; type: "WSTRING"; name: string; } ; `name`: { value: string; type: "WSTRING"; name: string; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `message`: { value: string; type: "WSTRING"; name: string; } ; `name`: { value: string; type: "WSTRING"; name: string; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; } = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; } = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: str... ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: str... ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **deletePlaylistResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `message`: { value: string; name: string; type: "WSTRING"; } ; `name`: { value: string; name: string; type: "WSTRING"; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `message`: { value: string; name: string; type: "WSTRING"; } ; `name`: { value: string; name: string; type: "WSTRING"; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; } = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; } = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_M... ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_M... ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### insertPlaylistResponse -• `Const` **insertPlaylistResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `index`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"UNSIGNED_INT"``\> = schema.unsigned\_int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `uri`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `index`: { value: number; type: "UNSIGNED\_INT"; name: string; } ; `message`: { value: string; type: "WSTRING"; name: string; } ; `uri`: { value: string; type: "WSTRING"; name: string; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `index`: { value: number; type: "UNSIGNED\_INT"; name: string; } ; `message`: { value: string; type: "WSTRING"; name: string; } ; `uri`: { value: string; type: "WSTRING"; name: string; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; uri: { value: string; type: "WSTRING"; name: string; }; index: { value: number; type: "UNSIGNED\_INT"; name: string; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; } = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; uri: { value: string; type: "WSTRING"; name: string; }; index: { value: number; type: "UNSIGNED\_INT"; name: string; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; } = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; uri: { value: string; type: "WSTRING"; name: string; }; index: { value: number; type: "UNSIGNED\_INT"; name: string; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VA... ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; uri: { value: string; type: "WSTRING"; name: string; }; index: { value: number; type: "UNSIGNED\_INT"; name: string; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VA... ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **insertPlaylistResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `index`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"UNSIGNED_INT"``\> = schema.unsigned\_int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `uri`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `index`: { value: number; name: string; type: "UNSIGNED\_INT"; } ; `message`: { value: string; name: string; type: "WSTRING"; } ; `uri`: { value: string; name: string; type: "WSTRING"; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `index`: { value: number; name: string; type: "UNSIGNED\_INT"; } ; `message`: { value: string; name: string; type: "WSTRING"; } ; `uri`: { value: string; name: string; type: "WSTRING"; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; name: string; type: "WSTRING"; }; index: { value: number; name: string; type: "UNSIGNED\_INT"; }; uri: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; } = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; name: string; type: "WSTRING"; }; index: { value: number; name: string; type: "UNSIGNED\_INT"; }; uri: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; } = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { message: { value: string; name: string; type: "WSTRING"; }; index: { value: number; name: string; type: "UNSIGNED\_INT"; }; uri: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: str... ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { message: { value: string; name: string; type: "WSTRING"; }; index: { value: number; name: string; type: "UNSIGNED\_INT"; }; uri: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: str... ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### instancePlaylistResponse -• `Const` **instancePlaylistResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `message`: { value: string; type: "WSTRING"; name: string; } ; `name`: { value: string; type: "WSTRING"; name: string; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `message`: { value: string; type: "WSTRING"; name: string; } ; `name`: { value: string; type: "WSTRING"; name: string; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; } = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; } = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: str... ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: str... ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **instancePlaylistResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `message`: { value: string; name: string; type: "WSTRING"; } ; `name`: { value: string; name: string; type: "WSTRING"; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `message`: { value: string; name: string; type: "WSTRING"; } ; `name`: { value: string; name: string; type: "WSTRING"; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; } = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; } = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_M... ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_M... ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### monitorConnectResponse -• `Const` **monitorConnectResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `head_index`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"UNSIGNED_INT"``\> = schema.unsigned\_int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }\> ; `height`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"UNSIGNED_INT"``\> = schema.unsigned\_int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }\> ; `hw`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `hw_long_name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `hw_short_name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `made_by_looking_glass`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `width`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"UNSIGNED_INT"``\> = schema.unsigned\_int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }\> ; `x`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"INT"``\> = schema.int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"INT"`` = schema.int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"INT"`` = schema.int; `value`: `number` }\> ; `y`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"INT"``\> = schema.int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"INT"`` = schema.int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"INT"`` = schema.int; `value`: `number` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `head_index`: { value: number; type: "UNSIGNED\_INT"; name: string; } ; `height`: { value: number; type: "UNSIGNED\_INT"; name: string; } ; `hw`: { value: string; type: "WSTRING"; name: string; } ; `hw_long_name`: { value: string; type: "WSTRING"; name: string; } ; `hw_short_name`: { value: string; type: "WSTRING"; name: string; } ; `made_by_looking_glass`: { value: string; type: "WSTRING"; name: string; } ; `message`: { value: string; type: "WSTRING"; name: string; } ; `name`: { value: string; type: "WSTRING"; name: string; } ; `width`: { value: number; type: "UNSIGNED\_INT"; name: string; } ; `x`: { value: number; type: "INT"; name: string; } ; `y`: { value: number; type: "INT"; name: string; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `head_index`: { value: number; type: "UNSIGNED\_INT"; name: string; } ; `height`: { value: number; type: "UNSIGNED\_INT"; name: string; } ; `hw`: { value: string; type: "WSTRING"; name: string; } ; `hw_long_name`: { value: string; type: "WSTRING"; name: string; } ; `hw_short_name`: { value: string; type: "WSTRING"; name: string; } ; `made_by_looking_glass`: { value: string; type: "WSTRING"; name: string; } ; `message`: { value: string; type: "WSTRING"; name: string; } ; `name`: { value: string; type: "WSTRING"; name: string; } ; `width`: { value: number; type: "UNSIGNED\_INT"; name: string; } ; `x`: { value: number; type: "INT"; name: string; } ; `y`: { value: number; type: "INT"; name: string; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; head\_index: { value: number; type: "UNSIGNED\_INT"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; ... 7 more ...;... = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; head\_index: { value: number; type: "UNSIGNED\_INT"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; ... 7 more ...;... = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; head\_index: { value: number; type: "UNSIGNED\_INT"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; ... 7 ... ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; head\_index: { value: number; type: "UNSIGNED\_INT"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| ... 10 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; ... 7 ... ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **monitorConnectResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `head_index`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"UNSIGNED_INT"``\> = schema.unsigned\_int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }\> ; `height`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"UNSIGNED_INT"``\> = schema.unsigned\_int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }\> ; `hw`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `hw_long_name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `hw_short_name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `made_by_looking_glass`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `width`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"UNSIGNED_INT"``\> = schema.unsigned\_int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }\> ; `x`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"INT"``\> = schema.int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"INT"`` = schema.int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"INT"`` = schema.int; `value`: `number` }\> ; `y`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"INT"``\> = schema.int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"INT"`` = schema.int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"INT"`` = schema.int; `value`: `number` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `head_index`: { value: number; name: string; type: "UNSIGNED\_INT"; } ; `height`: { value: number; name: string; type: "UNSIGNED\_INT"; } ; `hw`: { value: string; name: string; type: "WSTRING"; } ; `hw_long_name`: { value: string; name: string; type: "WSTRING"; } ; `hw_short_name`: { value: string; name: string; type: "WSTRING"; } ; `made_by_looking_glass`: { value: string; name: string; type: "WSTRING"; } ; `message`: { value: string; name: string; type: "WSTRING"; } ; `name`: { value: string; name: string; type: "WSTRING"; } ; `width`: { value: number; name: string; type: "UNSIGNED\_INT"; } ; `x`: { value: number; name: string; type: "INT"; } ; `y`: { value: number; name: string; type: "INT"; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `head_index`: { value: number; name: string; type: "UNSIGNED\_INT"; } ; `height`: { value: number; name: string; type: "UNSIGNED\_INT"; } ; `hw`: { value: string; name: string; type: "WSTRING"; } ; `hw_long_name`: { value: string; name: string; type: "WSTRING"; } ; `hw_short_name`: { value: string; name: string; type: "WSTRING"; } ; `made_by_looking_glass`: { value: string; name: string; type: "WSTRING"; } ; `message`: { value: string; name: string; type: "WSTRING"; } ; `name`: { value: string; name: string; type: "WSTRING"; } ; `width`: { value: number; name: string; type: "UNSIGNED\_INT"; } ; `x`: { value: number; name: string; type: "INT"; } ; `y`: { value: number; name: string; type: "INT"; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; x: { value: number; name: string; type: "INT"; }; y: { value: number; name: string; type: "INT"; }; ... 7 more ...; width: { ...; }; } = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; x: { value: number; name: string; type: "INT"; }; y: { value: number; name: string; type: "INT"; }; ... 7 more ...; width: { ...; }; } = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; x: { value: number; name: string; type: "INT"; }; y: { value: number; name: string; type: "INT"; }; ... 7 more ...; width: { ...; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; x: { value: number; name: string; type: "INT"; }; y: { value: number; name: string; type: "INT"; }; ... 7 more ...; width: { ...; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### newItemPlayingResponse -• `Const` **newItemPlayingResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `index`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"UNSIGNED_INT"``\> = schema.unsigned\_int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }\> ; `playlist_name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `index`: { value: number; type: "UNSIGNED\_INT"; name: string; } ; `playlist_name`: { value: string; type: "WSTRING"; name: string; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `index`: { value: number; type: "UNSIGNED\_INT"; name: string; } ; `playlist_name`: { value: string; type: "WSTRING"; name: string; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; index: { value: number; type: "UNSIGNED\_INT"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; } = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; index: { value: number; type: "UNSIGNED\_INT"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; } = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; index: { value: number; type: "UNSIGNED\_INT"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| ... 9 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; index: { value: number; type: "UNSIGNED\_INT"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| ... 9 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **newItemPlayingResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `index`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"UNSIGNED_INT"``\> = schema.unsigned\_int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }\> ; `playlist_name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `index`: { value: number; name: string; type: "UNSIGNED\_INT"; } ; `playlist_name`: { value: string; name: string; type: "WSTRING"; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `index`: { value: number; name: string; type: "UNSIGNED\_INT"; } ; `playlist_name`: { value: string; name: string; type: "WSTRING"; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { index: { value: number; name: string; type: "UNSIGNED\_INT"; }; playlist\_name: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; } = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { index: { value: number; name: string; type: "UNSIGNED\_INT"; }; playlist\_name: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; } = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { index: { value: number; name: string; type: "UNSIGNED\_INT"; }; playlist\_name: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| ... 9 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { index: { value: number; name: string; type: "UNSIGNED\_INT"; }; playlist\_name: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| ... 9 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### progressUpdateResponse -• `Const` **progressUpdateResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `progress`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"FLOAT"``\> = schema.float; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"FLOAT"`` = schema.float; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"FLOAT"`` = schema.float; `value`: `number` }\> ; `progress_type`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `message`: { value: string; type: "WSTRING"; name: string; } ; `progress`: { value: number; type: "FLOAT"; name: string; } ; `progress_type`: { value: string; type: "WSTRING"; name: string; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `message`: { value: string; type: "WSTRING"; name: string; } ; `progress`: { value: number; type: "FLOAT"; name: string; } ; `progress_type`: { value: string; type: "WSTRING"; name: string; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| ... 5 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; progress: { ...; }; progress\_type... = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| ... 5 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; progress: { ...; }; progress\_type... = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; progress: { ...; }; progress\_type: { ...; }; }... ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; progress: { ...; }; progress\_type: { ...; }; }... ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **progressUpdateResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `progress`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"FLOAT"``\> = schema.float; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"FLOAT"`` = schema.float; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"FLOAT"`` = schema.float; `value`: `number` }\> ; `progress_type`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `message`: { value: string; name: string; type: "WSTRING"; } ; `progress`: { value: number; name: string; type: "FLOAT"; } ; `progress_type`: { value: string; name: string; type: "WSTRING"; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `message`: { value: string; name: string; type: "WSTRING"; } ; `progress`: { value: number; name: string; type: "FLOAT"; } ; `progress_type`: { value: string; name: string; type: "WSTRING"; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| ... 5 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; progress: { ...; }; progress\_type... = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| ... 5 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; progress: { ...; }; progress\_type... = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; progress: { ...; }; progress\_type: { ...; }; }... ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| ... 6 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; progress: { ...; }; progress\_type: { ...; }; }... ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### transportControlPauseResponse -• `Const` **transportControlPauseResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `message`: { value: string; type: "WSTRING"; name: string; } ; `name`: { value: string; type: "WSTRING"; name: string; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; type: "WSTRING"; name: st... ; `message`: { value: string; type: "WSTRING"; name: string; } ; `name`: { value: string; type: "WSTRING"; name: string; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; } = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; } = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: str... ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; name: { value: string; type: "WSTRING"; name: string; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: str... ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **transportControlPauseResponse**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `event`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Monitor Connect"``\>, `ZodLiteral`<``"Monitor Disconnect"``\>, `ZodLiteral`<``"Progress Start"``\>, `ZodLiteral`<``"Progress Completion"``\>, `ZodLiteral`<``"Progress Update"``\>, `ZodLiteral`<``"Playlist Instance"``\>]\> = BridgeEvent }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: ``"Monitor Connect"`` \| ``"Monitor Disconnect"`` \| ``"Progress Start"`` \| ``"Progress Completion"`` \| ``"Progress Update"`` \| ``"Playlist Instance"`` \| ``"Playlist Insert"`` \| ``"Playlist Delete"`` \| ``"Sync/Play Playlist"`` \| ``"Sync/Play Playlist Complete"`` \| ``"Sync/Play Playlist Cancelled"`` \| ``"Transport Control Pause"`` = BridgeEvent }\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `message`: { value: string; name: string; type: "WSTRING"; } ; `name`: { value: string; name: string; type: "WSTRING"; } }, { `event`: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| "Progress Completion" \| "Progress Update" \| "Playlist Instance" \| "Playlist Insert" \| "Playlist Delete" \| "Sync/Play Playlist" \| "Sync/Play Playlist Complete" \| "Sync/Play Playlist Cancelled" \| "Transport Control Pause"; name: string; type: "WSTR... ; `message`: { value: string; name: string; type: "WSTRING"; } ; `name`: { value: string; name: string; type: "WSTRING"; } }\> = valueSchema }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; } = valueSchema }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; } = valueSchema }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_M... ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; message: { value: string; name: string; type: "WSTRING"; }; event: { value: "Monitor Connect" \| "Monitor Disconnect" \| "Progress Start" \| ... 8 more ... \| "Transport Control Pause"; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_M... ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> diff --git a/docs/modules/schemas_schema_failures.md b/docs/modules/schemas_schema_failures.md index 3ca2d6e..448016e 100644 --- a/docs/modules/schemas_schema_failures.md +++ b/docs/modules/schemas_schema_failures.md @@ -12,4 +12,4 @@ ### play\_playist\_failure -• `Const` **play\_playist\_failure**: `ZodObject`<{ `name`: `ZodString` ; `orchestration`: `ZodObject`<{ `name`: `ZodString` ; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` ; `type`: ``"WSTRING"`` = wstring; `value`: `string` }, { `name`: `string` ; `type`: ``"WSTRING"`` = wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` ; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = variant\_map; `value`: `ZodObject`<{ `message`: `ZodObject`<{ `name`: `ZodString` ; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` ; `type`: ``"WSTRING"`` = wstring; `value`: `string` }, { `name`: `string` ; `type`: ``"WSTRING"`` = wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `message`: { value: string; type: "WSTRING"; name: string; } }, { `message`: { value: string; type: "WSTRING"; name: string; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` ; `type`: ``"VARIANT_MAP"`` = variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; } }, { `name`: `string` ; `type`: ``"VARIANT_MAP"`` = variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` ; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = status }, { `name`: `string` ; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = status }\> +• `Const` **play\_playist\_failure**: `ZodObject`<{ `name`: `ZodString` ; `orchestration`: `ZodObject`<{ `name`: `ZodString` ; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` ; `type`: ``"WSTRING"`` = wstring; `value`: `string` }, { `name`: `string` ; `type`: ``"WSTRING"`` = wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` ; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = variant\_map; `value`: `ZodObject`<{ `message`: `ZodObject`<{ `name`: `ZodString` ; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` ; `type`: ``"WSTRING"`` = wstring; `value`: `string` }, { `name`: `string` ; `type`: ``"WSTRING"`` = wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `message`: { value: string; name: string; type: "WSTRING"; } }, { `message`: { value: string; name: string; type: "WSTRING"; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` ; `type`: ``"VARIANT_MAP"`` = variant\_map; `value`: { message: { value: string; name: string; type: "WSTRING"; }; } }, { `name`: `string` ; `type`: ``"VARIANT_MAP"`` = variant\_map; `value`: { message: { value: string; name: string; type: "WSTRING"; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` ; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { message: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = status }, { `name`: `string` ; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { message: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = status }\> diff --git a/docs/modules/schemas_schema_responses.md b/docs/modules/schemas_schema_responses.md index d8713bf..1549c3c 100644 --- a/docs/modules/schemas_schema_responses.md +++ b/docs/modules/schemas_schema_responses.md @@ -30,112 +30,112 @@ ### available\_output\_devices -• `Const` **available\_output\_devices**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodOptional`<`ZodRecord`<`ZodString`, `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `calibration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `defaultQuilt`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `hardwareVersion`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `hwid`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `index`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"UNSIGNED_INT"``\> = schema.unsigned\_int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }\> ; `state`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `windowCoords`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"INT2"``\> = schema.int2; `value`: `ZodObject`<{ `x`: `ZodNumber` ; `y`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `x`: `number` ; `y`: `number` }, { `x`: `number` ; `y`: `number` }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"INT2"`` = schema.int2; `value`: { x: number; y: number; } }, { `name`: `string` = schema.name; `type`: ``"INT2"`` = schema.int2; `value`: { x: number; y: number; } }\> }, ``"strip"``, `ZodTypeAny`, { `calibration`: { value: string; type: "WSTRING"; name: string; } ; `defaultQuilt`: { value: string; type: "WSTRING"; name: string; } ; `hardwareVersion`: { value: string; type: "WSTRING"; name: string; } ; `hwid`: { value: string; type: "WSTRING"; name: string; } ; `index`: { value: number; type: "UNSIGNED\_INT"; name: string; } ; `state`: { value: string; type: "WSTRING"; name: string; } ; `windowCoords`: { value: { x: number; y: number; }; type: "INT2"; name: string; } }, { `calibration`: { value: string; type: "WSTRING"; name: string; } ; `defaultQuilt`: { value: string; type: "WSTRING"; name: string; } ; `hardwareVersion`: { value: string; type: "WSTRING"; name: string; } ; `hwid`: { value: string; type: "WSTRING"; name: string; } ; `index`: { value: number; type: "UNSIGNED\_INT"; name: string; } ; `state`: { value: string; type: "WSTRING"; name: string; } ; `windowCoords`: { value: { x: number; y: number; }; type: "INT2"; name: string; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { index: { value: number; type: "UNSIGNED\_INT"; name: string; }; calibration: { value: string; type: "WSTRING"; name: string; }; defaultQuilt: { value: string; type: "WSTRING"; name: string; }; hardwareVersion: { ...; }; hwid: { ...; }; state: { ...; }; windowCoords: { ...; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { index: { value: number; type: "UNSIGNED\_INT"; name: string; }; calibration: { value: string; type: "WSTRING"; name: string; }; defaultQuilt: { value: string; type: "WSTRING"; name: string; }; hardwareVersion: { ...; }; hwid: { ...; }; state: { ...; }; windowCoords: { ...; }; } }\>\>\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value?`: `Record`<`string`, { value: { index: { value: number; type: "UNSIGNED\_INT"; name: string; }; calibration: { value: string; type: "WSTRING"; name: string; }; defaultQuilt: { value: string; type: "WSTRING"; name: string; }; hardwareVersion: { ...; }; hwid: { ...; }; state: { ...; }; windowCoords: { ...; }; }; type: "VARIANT\_MAP"; name: ...\> }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value?`: `Record`<`string`, { value: { index: { value: number; type: "UNSIGNED\_INT"; name: string; }; calibration: { value: string; type: "WSTRING"; name: string; }; defaultQuilt: { value: string; type: "WSTRING"; name: string; }; hardwareVersion: { ...; }; hwid: { ...; }; state: { ...; }; windowCoords: { ...; }; }; type: "VARIANT\_MAP"; name: ...\> }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { type: "VARIANT\_MAP"; name: string; value?: Record +• `Const` **available\_output\_devices**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodOptional`<`ZodRecord`<`ZodString`, `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `calibration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `defaultQuilt`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `hardwareVersion`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `hwid`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `index`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"UNSIGNED_INT"``\> = schema.unsigned\_int; `value`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }, { `name`: `string` = schema.name; `type`: ``"UNSIGNED_INT"`` = schema.unsigned\_int; `value`: `number` }\> ; `state`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `windowCoords`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"INT2"``\> = schema.int2; `value`: `ZodObject`<{ `x`: `ZodNumber` ; `y`: `ZodNumber` }, ``"strip"``, `ZodTypeAny`, { `x`: `number` ; `y`: `number` }, { `x`: `number` ; `y`: `number` }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"INT2"`` = schema.int2; `value`: { x: number; y: number; } }, { `name`: `string` = schema.name; `type`: ``"INT2"`` = schema.int2; `value`: { x: number; y: number; } }\> }, ``"strip"``, `ZodTypeAny`, { `calibration`: { value: string; name: string; type: "WSTRING"; } ; `defaultQuilt`: { value: string; name: string; type: "WSTRING"; } ; `hardwareVersion`: { value: string; name: string; type: "WSTRING"; } ; `hwid`: { value: string; name: string; type: "WSTRING"; } ; `index`: { value: number; name: string; type: "UNSIGNED\_INT"; } ; `state`: { value: string; name: string; type: "WSTRING"; } ; `windowCoords`: { value: { x: number; y: number; }; name: string; type: "INT2"; } }, { `calibration`: { value: string; name: string; type: "WSTRING"; } ; `defaultQuilt`: { value: string; name: string; type: "WSTRING"; } ; `hardwareVersion`: { value: string; name: string; type: "WSTRING"; } ; `hwid`: { value: string; name: string; type: "WSTRING"; } ; `index`: { value: number; name: string; type: "UNSIGNED\_INT"; } ; `state`: { value: string; name: string; type: "WSTRING"; } ; `windowCoords`: { value: { x: number; y: number; }; name: string; type: "INT2"; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { index: { value: number; name: string; type: "UNSIGNED\_INT"; }; calibration: { value: string; name: string; type: "WSTRING"; }; defaultQuilt: { value: string; name: string; type: "WSTRING"; }; hardwareVersion: { ...; }; hwid: { ...; }; state: { ...; }; windowCoords: { ...; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { index: { value: number; name: string; type: "UNSIGNED\_INT"; }; calibration: { value: string; name: string; type: "WSTRING"; }; defaultQuilt: { value: string; name: string; type: "WSTRING"; }; hardwareVersion: { ...; }; hwid: { ...; }; state: { ...; }; windowCoords: { ...; }; } }\>\>\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value?`: `Record`<`string`, { value: { index: { value: number; name: string; type: "UNSIGNED\_INT"; }; calibration: { value: string; name: string; type: "WSTRING"; }; defaultQuilt: { value: string; name: string; type: "WSTRING"; }; hardwareVersion: { ...; }; hwid: { ...; }; state: { ...; }; windowCoords: { ...; }; }; name: string; type: "VARIAN...\> }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value?`: `Record`<`string`, { value: { index: { value: number; name: string; type: "UNSIGNED\_INT"; }; calibration: { value: string; name: string; type: "WSTRING"; }; defaultQuilt: { value: string; name: string; type: "WSTRING"; }; hardwareVersion: { ...; }; hwid: { ...; }; state: { ...; }; windowCoords: { ...; }; }; name: string; type: "VARIAN...\> }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { name: string; type: "VARIANT\_MAP"; value?: Record ___ ### delete\_playlist -• `Const` **delete\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `name`: { value: string; type: "WSTRING"; name: string; } }, { `name`: { value: string; type: "WSTRING"; name: string; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; type: "WSTRING"; name: string; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; type: "WSTRING"; name: string; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **delete\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `name`: { value: string; name: string; type: "WSTRING"; } }, { `name`: { value: string; name: string; type: "WSTRING"; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### get\_autostart\_playlist -• `Const` **get\_autostart\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `playlist_name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `playlist_path`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `playlist_name`: { value: string; type: "WSTRING"; name: string; } ; `playlist_path`: { value: string; type: "WSTRING"; name: string; } }, { `playlist_name`: { value: string; type: "WSTRING"; name: string; } ; `playlist_path`: { value: string; type: "WSTRING"; name: string; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_path: { value: string; type: "WSTRING"; name: string; }; playlist\_name: { value: string; type: "WSTRING"; name: string; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_path: { value: string; type: "WSTRING"; name: string; }; playlist\_name: { value: string; type: "WSTRING"; name: string; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_path: { value: string; type: "WSTRING"; name: string; }; playlist\_name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_path: { value: string; type: "WSTRING"; name: string; }; playlist\_name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **get\_autostart\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `playlist_name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `playlist_path`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `playlist_name`: { value: string; name: string; type: "WSTRING"; } ; `playlist_path`: { value: string; name: string; type: "WSTRING"; } }, { `playlist_name`: { value: string; name: string; type: "WSTRING"; } ; `playlist_path`: { value: string; name: string; type: "WSTRING"; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; playlist\_path: { value: string; name: string; type: "WSTRING"; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; playlist\_path: { value: string; name: string; type: "WSTRING"; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; playlist\_path: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; playlist\_path: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### insert\_playlist\_entry -• `Const` **insert\_playlist\_entry**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `index`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `index`: { value: string; type: "WSTRING"; name: string; } }, { `index`: { value: string; type: "WSTRING"; name: string; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { index: { value: string; type: "WSTRING"; name: string; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { index: { value: string; type: "WSTRING"; name: string; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { index: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { index: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **insert\_playlist\_entry**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `index`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `index`: { value: string; name: string; type: "WSTRING"; } }, { `index`: { value: string; name: string; type: "WSTRING"; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { index: { value: string; name: string; type: "WSTRING"; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { index: { value: string; name: string; type: "WSTRING"; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { index: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { index: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### instance\_playlist -• `Const` **instance\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `name`: { value: string; type: "WSTRING"; name: string; } }, { `name`: { value: string; type: "WSTRING"; name: string; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; type: "WSTRING"; name: string; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; type: "WSTRING"; name: string; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **instance\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `name`: { value: string; name: string; type: "WSTRING"; } }, { `name`: { value: string; name: string; type: "WSTRING"; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### instance\_studio\_playlist -• `Const` **instance\_studio\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `name`: { value: string; type: "WSTRING"; name: string; } }, { `name`: { value: string; type: "WSTRING"; name: string; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; type: "WSTRING"; name: string; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; type: "WSTRING"; name: string; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **instance\_studio\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `name`: { value: string; name: string; type: "WSTRING"; } }, { `name`: { value: string; name: string; type: "WSTRING"; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { name: { value: string; name: string; type: "WSTRING"; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### orchestration -• `Const` **orchestration**: `ZodObject`<{ `name`: `ZodString` = schema.name; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `payload`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `payload`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **orchestration**: `ZodObject`<{ `name`: `ZodString` = schema.name; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `payload`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `payload`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### play\_playlist -• `Const` **play\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `id`: `ZodOptional`<`ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\>\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `id?`: { value: string; type: "WSTRING"; name: string; } ; `message`: { value: string; type: "WSTRING"; name: string; } }, { `id?`: { value: string; type: "WSTRING"; name: string; } ; `message`: { value: string; type: "WSTRING"; name: string; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; id?: { value: string; type: "WSTRING"; name: string; } \| undefined; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; type: "WSTRING"; name: string; }; id?: { value: string; type: "WSTRING"; name: string; } \| undefined; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; id?: { value: string; type: "WSTRING"; name: string; } \| undefined; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { message: { value: string; type: "WSTRING"; name: string; }; id?: { value: string; type: "WSTRING"; name: string; } \| undefined; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **play\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `id`: `ZodOptional`<`ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\>\> ; `message`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `id?`: { value: string; name: string; type: "WSTRING"; } ; `message`: { value: string; name: string; type: "WSTRING"; } }, { `id?`: { value: string; name: string; type: "WSTRING"; } ; `message`: { value: string; name: string; type: "WSTRING"; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; name: string; type: "WSTRING"; }; id?: { value: string; name: string; type: "WSTRING"; } \| undefined; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { message: { value: string; name: string; type: "WSTRING"; }; id?: { value: string; name: string; type: "WSTRING"; } \| undefined; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { message: { value: string; name: string; type: "WSTRING"; }; id?: { value: string; name: string; type: "WSTRING"; } \| undefined; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { message: { value: string; name: string; type: "WSTRING"; }; id?: { value: string; name: string; type: "WSTRING"; } \| undefined; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### set\_autostart\_playlist -• `Const` **set\_autostart\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `playlist_name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `playlist_name`: { value: string; type: "WSTRING"; name: string; } }, { `playlist_name`: { value: string; type: "WSTRING"; name: string; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **set\_autostart\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `playlist_name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `playlist_name`: { value: string; name: string; type: "WSTRING"; } }, { `playlist_name`: { value: string; name: string; type: "WSTRING"; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### set\_named\_autostart\_playlist -• `Const` **set\_named\_autostart\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `playlist_name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `playlist_name`: { value: string; type: "WSTRING"; name: string; } }, { `playlist_name`: { value: string; type: "WSTRING"; name: string; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `payload`: { value: { playlist\_name: { value: string; type: "WSTRING"; name: string; }; }; type: "VARIANT\_MAP"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **set\_named\_autostart\_playlist**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"VARIANT_MAP"``\> = schema.variant\_map; `value`: `ZodObject`<{ `playlist_name`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> }, ``"strip"``, `ZodTypeAny`, { `playlist_name`: { value: string; name: string; type: "WSTRING"; } }, { `playlist_name`: { value: string; name: string; type: "WSTRING"; } }\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; } }, { `name`: `string` = schema.name; `type`: ``"VARIANT_MAP"`` = schema.variant\_map; `value`: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; } }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `payload`: { value: { playlist\_name: { value: string; name: string; type: "WSTRING"; }; }; name: string; type: "VARIANT\_MAP"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### show\_window -• `Const` **show\_window**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **show\_window**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### transport\_control\_next -• `Const` **transport\_control\_next**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **transport\_control\_next**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### transport\_control\_pause -• `Const` **transport\_control\_pause**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **transport\_control\_pause**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### transport\_control\_play -• `Const` **transport\_control\_play**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **transport\_control\_play**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### transport\_control\_previous -• `Const` **transport\_control\_previous**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **transport\_control\_previous**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### transport\_control\_seek\_to\_index -• `Const` **transport\_control\_seek\_to\_index**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **transport\_control\_seek\_to\_index**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### update\_current\_entry -• `Const` **update\_current\_entry**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **update\_current\_entry**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### update\_playlist\_entry -• `Const` **update\_playlist\_entry**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **update\_playlist\_entry**: `ZodObject`<{ `name`: `ZodString` = schema.name; `orchestration`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `orchestration`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> ___ ### version -• `Const` **version**: `ZodObject`<{ `name`: `ZodString` = schema.name; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"Pending"`` \| ``"Failure"`` \| ``"UnknownOrchestration"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `payload`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }, { `name`: `string` = schema.name; `payload`: { value: string; type: "WSTRING"; name: string; } ; `status`: { value: "Completion" \| "Pending" \| "Failure" \| "UnknownOrchestration"; type: "WSTRING"; name: string; } = schema.status }\> +• `Const` **version**: `ZodObject`<{ `name`: `ZodString` = schema.name; `payload`: `ZodObject`<{ `name`: `ZodString` = schema.name; `type`: `ZodLiteral`<``"WSTRING"``\> = schema.wstring; `value`: `ZodString` }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }, { `name`: `string` = schema.name; `type`: ``"WSTRING"`` = schema.wstring; `value`: `string` }\> ; `status`: `ZodObject`<{ `name`: `ZodString` = name; `type`: `ZodLiteral`<``"WSTRING"``\> = wstring; `value`: `ZodUnion`<[`ZodLiteral`<``"Completion"``\>, `ZodLiteral`<``"Pending"``\>, `ZodLiteral`<``"Failure"``\>, `ZodLiteral`<``"UnknownOrchestration"``\>]\> }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }, { `name`: `string` = name; `type`: ``"WSTRING"`` = wstring; `value`: ``"Completion"`` \| ``"UnknownOrchestration"`` \| ``"Pending"`` \| ``"Failure"`` }\> = schema.status }, ``"strip"``, `ZodTypeAny`, { `name`: `string` = schema.name; `payload`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }, { `name`: `string` = schema.name; `payload`: { value: string; name: string; type: "WSTRING"; } ; `status`: { value: "Completion" \| "UnknownOrchestration" \| "Pending" \| "Failure"; name: string; type: "WSTRING"; } = schema.status }\> diff --git a/docs/modules/utilities_general_utils.md b/docs/modules/utilities_general_utils.md index af4d2fb..bec45f0 100644 --- a/docs/modules/utilities_general_utils.md +++ b/docs/modules/utilities_general_utils.md @@ -12,7 +12,7 @@ ### parseBridgeVersion -▸ **parseBridgeVersion**(`versionString`): [`BridgeVersion`](components.md#bridgeversion) +▸ **parseBridgeVersion**(`versionString`): [`BridgeVersion`](components_types.md#bridgeversion) Parse the version from Bridge's version string Bridge uses a major, minor, patch, hotfix versioning system @@ -25,6 +25,6 @@ Bridge uses a major, minor, patch, hotfix versioning system #### Returns -[`BridgeVersion`](components.md#bridgeversion) +[`BridgeVersion`](components_types.md#bridgeversion) BridgeVersion diff --git a/package.json b/package.json index 8f5a517..afa87b5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lookingglass/bridge", - "version": "0.0.8-alpha", + "version": "0.0.8-alpha.1", "license": "MIT", "description": "Official Looking Glass Library for interacting with Looking Glass holographic displays.", "types": "./dist/index.d.ts", @@ -23,7 +23,7 @@ "scripts": { "build": "tsc && vite build --mode react", "build:watch": "tsc && vite build --watch", - "library": "vite build --mode library && yarn typedoc && node ./post-build.js", + "library": "vite build --mode library --sourcemap true && yarn typedoc && node ./post-build.js", "dev": "vite --mode react", "typedoc": "npx typedoc --plugin typedoc-plugin-markdown --out docs --entryPoints src/library/**/*.ts --excludePrivate --readme none --disableSources", "typedoc:watch": "npx typedoc --plugin typedoc-plugin-markdown --out docs --entryPoints src/library/**/*.ts --excludePrivate --readme none --disableSources --watch" diff --git a/src/library/client.ts b/src/library/client/BridgeClient.ts similarity index 89% rename from src/library/client.ts rename to src/library/client/BridgeClient.ts index 50de494..060f1e8 100644 --- a/src/library/client.ts +++ b/src/library/client/BridgeClient.ts @@ -1,17 +1,17 @@ -import { Display, tryParseDisplay } from "./components/displays" -import { sendMessage } from "./components/endpoints" -import { tryEnterOrchestration, tryExitOrchestration } from "./components/orchestration" -import { BridgeEventSource } from "./components/eventsource" -import { Playlist } from "./playlists/playlist" -import { HologramType } from "./components/hologram" -import { BridgeEventMap } from "./schemas/schema.events" -import { HologramParamMap } from "./schemas/schema.parameters" -import * as schema from "./schemas/schema.responses" +import { Display, tryParseDisplay } from "../components/displays" +import { sendMessage } from "../components/endpoints" +import { tryEnterOrchestration, tryExitOrchestration } from "../components/orchestration" +import { BridgeEventSource } from "../components/eventsource" +import { Playlist } from "../playlists/playlist" +import { HologramType } from "../components/hologram" +import { BridgeEventMap } from "../schemas/schema.events" +import { HologramParamMap } from "../schemas/schema.parameters" +import * as schema from "../schemas/schema.responses" import { z } from "zod" -import { Fallback } from "./components/fallback" -import { NewItemPlayingMessageHandler } from "./components/messageHandler" -import { BridgeVersion } from "./components" -import { parseBridgeVersion } from "./utilities/general.utils" +import { Fallback } from "../components/fallback" +import { NewItemPlayingMessageHandler } from "../components/messageHandler" +import { BridgeVersion } from "../components/types" +import { parseBridgeVersion } from "../utilities/general.utils" export class BridgeClient { /** The name of the current orchestration */ @@ -45,6 +45,8 @@ export class BridgeClient { /**a boolean for whether a disconnect was triggered automatically or manually */ public manualDisconnect = false + public playState: "PLAYING" | "PAUSED" | "STOPPED" = "STOPPED" + constructor() { this.orchestration = "" this.isConnected = false @@ -372,7 +374,7 @@ export class BridgeClient { // add the hologram to the playlist, and seek to it let currentCastItem = playlist.addItem(hologram) if (currentCastItem !== undefined) { - await playlist.play({ playlist }) + await playlist.play() // delete old playlists this.playlists?.forEach((playlist) => { if (playlist.name != randomName) { @@ -393,6 +395,54 @@ export class BridgeClient { return { success: true } } + getCurrentPlaylist() { + return this.playlists?.[this.currentPlaylistIndex] + } + + public async playRemotePlaylist(holograms: HologramType[], index: number = 0) { + if (!this.isConnected && !(await this.connect()).success) { + return { success: false } + } + + console.log("%c function call: playRemotePlaylist ", "color: magenta; font-weight: bold; border: solid") + + if (this.isCastPending == true) { + return { success: false } + } + + this.isCastPending = true + + // try to find an existing cast playlist + let randomName = "Cast_" + Math.random().toString(36).substring(7) + + const playlist = new Playlist({ + name: randomName, + loop: true, + items: holograms, + orchestration: this.orchestration, + }) + this.playlists?.push(playlist) + + // delete old playlists + this.playlists?.forEach((playlist) => { + if (playlist.name != randomName) { + this.deletePlaylist(playlist) + this.playlists?.splice(this.playlists.indexOf(playlist), 1) + } + }) + //update the current playlist index value. + this.currentPlaylistIndex = this.playlists?.indexOf(playlist) ?? 0 + //update the current playlistItem Index value. + this.currentPlaylistItemIndex = index + + this.currentHologram = holograms[index] + this.isCastPending = false + + await playlist.play() + + return { success: true } + } + /**Play a Playlist created by Looking Glass Studio, requires the full path to the playlist.json file. */ public async playStudioPlaylist( playlistPath: string @@ -558,6 +608,8 @@ export class BridgeClient { return { success: false, response: null } } + this.playState = "PLAYING" + return { success: true, response: message.response } } @@ -579,6 +631,8 @@ export class BridgeClient { return { success: false, response: null } } + this.playState = "PAUSED" + return { success: true, response: message.response } } @@ -600,6 +654,20 @@ export class BridgeClient { return { success: false, response: null } } + const playlist = this.getCurrentPlaylist() + const loop = playlist?.loop + const length = playlist?.items.length + const index = this.currentPlaylistItemIndex + + if (index + 1 === length) { + if (loop) { + this.currentPlaylistItemIndex = 0 + } + //TODO: Handle case where we've reached end of playlist + } else { + this.currentPlaylistItemIndex++ + } + return { success: true, response: message.response } } @@ -621,6 +689,21 @@ export class BridgeClient { return { success: false, response: null } } + const playlist = this.getCurrentPlaylist() + const loop = playlist?.loop + const length = playlist?.items.length + const index = this.currentPlaylistIndex + + if (index === 0) { + if (loop && length) { + this.currentPlaylistItemIndex = length + } else { + //TODO: Repeat first track + } + } else { + this.currentPlaylistItemIndex-- + } + return { success: true, response: message.response } } diff --git a/src/library/components/displays.ts b/src/library/components/displays.ts index 3185c95..6f433f2 100644 --- a/src/library/components/displays.ts +++ b/src/library/components/displays.ts @@ -1,4 +1,4 @@ -import { BridgeValue } from "." +import { BridgeValue } from "./types" export interface Display { calibration: CalibrationType | null diff --git a/src/library/components/messageHandler.ts b/src/library/components/messageHandler.ts index 4323a6d..6f26144 100644 --- a/src/library/components/messageHandler.ts +++ b/src/library/components/messageHandler.ts @@ -34,6 +34,50 @@ export class MonitorDisconnectedMessageHandler extends MessageHandler<"Monitor D } } +export class TransportControlPauseMessageHandler extends MessageHandler<"Transport Control Pause"> { + constructor(args: { client: BridgeClient }) { + super({ bridgeEventName: "Transport Control Pause", client: args.client }) + } + + handle(message: BridgeEventMap["Transport Control Pause"]): void { + this.client.log("%c Transport Control Pause ", "color: aqua; font-weight: bold; border: solid;", message) + } +} + +export class TransportControlPlayMessageHandler extends MessageHandler<"Transport Control Play"> { + constructor(args: { client: BridgeClient }) { + super({ bridgeEventName: "Transport Control Play", client: args.client }) + } + + handle(message: BridgeEventMap["Transport Control Play"]): void { + this.client.log("%c Transport Control Play ", "color: aqua; font-weight: bold; border: solid;", message) + } +} + +export class TransportControlNextMessageHandler extends MessageHandler<"Transport Control Next"> { + constructor(args: { client: BridgeClient }) { + super({ bridgeEventName: "Transport Control Next", client: args.client }) + } + + handle(message: BridgeEventMap["Transport Control Next"]): void { + this.client.log("%c Transport Control Next ", "color: aqua; font-weight: bold; border: solid;", message) + } +} + +export class TransportControlPreviousMessageHandler extends MessageHandler<"Transport Control Previous"> { + constructor(args: { client: BridgeClient }) { + super({ bridgeEventName: "Transport Control Previous", client: args.client }) + } + + handle(message: BridgeEventMap["Transport Control Previous"]): void { + this.client.log( + "%c Transport Control Previous ", + "color: aqua; font-weight: bold; border: solid;", + message + ) + } +} + export class ProgressStartMessageHandler extends MessageHandler<"Progress Start"> { constructor(args: { client: BridgeClient }) { super({ bridgeEventName: "Progress Start", client: args.client }) @@ -60,7 +104,12 @@ export class ProgressUpdateMessageHandler extends MessageHandler<"Progress Updat } handle(message: BridgeEventMap["Progress Update"]): void { - this.client.log(message) + this.client.log( + "%c Progress Update ", + "color: aqua; font-weight: bold; border: solid;", + message.payload.value.progress_type, + message.payload.value.progress.value + ) } } diff --git a/src/library/components/index.d.ts b/src/library/components/types.ts similarity index 90% rename from src/library/components/index.d.ts rename to src/library/components/types.ts index 8e4e2b2..a835d97 100644 --- a/src/library/components/index.d.ts +++ b/src/library/components/types.ts @@ -44,12 +44,6 @@ export interface BridgeValueMap { [key: string]: BridgeValue } -declare module "holoplay-core" - -interface ClientResponse { - success: boolean -} - export type BridgeVersion = { major: number minor: number diff --git a/src/library/index.ts b/src/library/index.ts index b6d27cc..85c5bfb 100644 --- a/src/library/index.ts +++ b/src/library/index.ts @@ -1,8 +1,9 @@ -export * from "./client" +export * from "./client/BridgeClient" export * from "./playlists/playlist" export * from "./playlists/playlistItems" export * from "./components/messageHandler" export * from "./components/hologram" +export * from "./components/types" export * from "./schemas/schema.hologram" export * from "./schemas/schema.parameters" export * as defaults from "./schemas/defaults" diff --git a/src/library/playlists/playlist.ts b/src/library/playlists/playlist.ts index 5fcc8af..8a6e9ec 100644 --- a/src/library/playlists/playlist.ts +++ b/src/library/playlists/playlist.ts @@ -16,8 +16,6 @@ export interface getPlayPlaylistJsonArgs { } export interface PlaylistArgs { - /** the playlist class */ - playlist: Playlist /** display */ head?: number } @@ -32,11 +30,33 @@ export class Playlist { public items: PlaylistItemType[] public orchestration: string - constructor(args: { name: string; loop: boolean; items: PlaylistItemType[]; orchestration: string }) { + constructor(args: { name: string; loop: boolean; items?: HologramType[]; orchestration: string }) { this.name = args.name this.loop = args.loop - this.items = args.items this.orchestration = args.orchestration + + if (args.items) { + this.items = args.items?.map((item, index) => { + if (item.type == "quilt") { + return new QuiltPlaylistItem({ + hologram: item as QuiltHologram, + id: index, + index: index, + playlistName: this.name, + orchestration: this.orchestration, + }) + + } else if (item.type == "rgbd") { + return new RGBDPlaylistItem({ + hologram: item as RGBDHologram, + id: index, + index: index, + playlistName: this.name, + orchestration: this.orchestration, + }) } + }).filter((item): item is PlaylistItemType => !!item) + } + else this.items = [] } public setName(name: string) { @@ -131,9 +151,9 @@ export class Playlist { * @param head * @returns */ - public async play({ playlist, head }: PlaylistArgs): Promise { + public async play({ head }: PlaylistArgs = {}): Promise { let orchestration = this.orchestration - const requestBody = playlist.getInstance(this.orchestration) + const requestBody = this.getInstance(this.orchestration) if (!head) { head = -1 @@ -145,7 +165,7 @@ export class Playlist { return false } - const PlaylistItems: PlaylistItemType[] = playlist.items + const PlaylistItems: PlaylistItemType[] = this.items if (instancePlaylist.success == true) { if (orchestration !== undefined) { for (let i = 0; i < PlaylistItems.length; i++) { @@ -161,7 +181,7 @@ export class Playlist { } } - const playRequestBody = playlist.getCurrent({ orchestration, head }) + const playRequestBody = this.getCurrent({ orchestration, head }) let play_playlist = await sendMessage({ endpoint: "play_playlist", requestBody: playRequestBody, diff --git a/src/library/schemas/schema.events.ts b/src/library/schemas/schema.events.ts index 85e2ef8..104493f 100644 --- a/src/library/schemas/schema.events.ts +++ b/src/library/schemas/schema.events.ts @@ -14,6 +14,9 @@ export const BridgeEvent = z.union([ z.literal("Sync/Play Playlist Complete"), z.literal("Sync/Play Playlist Cancelled"), z.literal("Transport Control Pause"), + z.literal("Transport Control Play"), + z.literal("Transport Control Next"), + z.literal("Transport Control Previous"), // z.literal("All Events"), ]) @@ -162,7 +165,7 @@ const deletePlaylist = z.object({ }), }) -const transportControlPause = z.object({ +const transportControlEvent = z.object({ event: z.object({ name: schema.name, type: schema.wstring, @@ -223,7 +226,7 @@ export const progressUpdateResponse = PayloadResponse(progressUpdate) export const insertPlaylistResponse = PayloadResponse(insertPlaylist) export const instancePlaylistResponse = PayloadResponse(playlistInstance) export const deletePlaylistResponse = PayloadResponse(deletePlaylist) -export const transportControlPauseResponse = PayloadResponse(transportControlPause) +export const transportControlResponse = PayloadResponse(transportControlEvent) export const newItemPlayingResponse = PayloadResponse(NewItemPlaying) // export const all_events = z.union([monitorConnectResponse, progressUpdateResponse]) @@ -240,7 +243,10 @@ export type BridgeEventMap = { "Sync/Play Playlist": z.infer "Sync/Play Playlist Complete": z.infer "Sync/Play Playlist Cancelled": z.infer - "Transport Control Pause": z.infer + "Transport Control Pause": z.infer + "Transport Control Play": z.infer + "Transport Control Next": z.infer + "Transport Control Previous": z.infer "New Item Playing": z.infer // "All Events": all_events, /**CUSTOM CLIENT EVENTS BELOW THESE ARE NOT PART OF BRIDGE */ diff --git a/src/library/utilities/general.utils.ts b/src/library/utilities/general.utils.ts index 36ffd99..b98fe4d 100644 --- a/src/library/utilities/general.utils.ts +++ b/src/library/utilities/general.utils.ts @@ -1,4 +1,4 @@ -import { BridgeVersion } from "@library/components" +import { BridgeVersion } from "@library/components/types" /** * Parse the version from Bridge's version string diff --git a/src/react-app/App.tsx b/src/react-app/App.tsx index fb6971a..1e7157d 100644 --- a/src/react-app/App.tsx +++ b/src/react-app/App.tsx @@ -8,6 +8,10 @@ import { PlaylistInstanceMessageHandler, hologramTypes, Playlist, + TransportControlPauseMessageHandler, + TransportControlPlayMessageHandler, + TransportControlNextMessageHandler, + TransportControlPreviousMessageHandler, } from "@library/index" import HologramForm from "./components/HologramForm" import { PlaylistUI } from "./components/Playlist" @@ -441,6 +445,10 @@ function App() { new PlaylistInsertMessageHandler({ client: Bridge }) new PlaylistInstanceMessageHandler({ client: Bridge }) new PlaylistDeleteMessageHandler({ client: Bridge }) + new TransportControlPauseMessageHandler({ client: Bridge }) + new TransportControlPlayMessageHandler({ client: Bridge }) + new TransportControlNextMessageHandler({ client: Bridge }) + new TransportControlPreviousMessageHandler({ client: Bridge }) setEventStatus("Listening to Events") }} disabled={!connected}>