{"hash":"fb663ce58a9cfb7a974a6aeca37d5969df004fed8a2c2bdca4fb12e11d39da48","types":[{"exports":["ActionBindingDirective","ActionBindings","ActionCallback","InputAction","InputDevice","InputGamepad","InputKeyState","InputKeyboard","InputModule","InputScheme","InputService","KeyItemDirective","KeyItemEntry","KeyItemGroupDirective","NavigationModule"],"facadeModuleId":"/web/Webland/app/dist/input/tmp-typings/webland-input.d.ts","isDynamicEntry":false,"isEntry":true,"isImplicitEntry":false,"moduleIds":["/web/Webland/app/dist/input/tmp-typings/lib/modules/input/input-module.d.ts","/web/Webland/app/dist/input/tmp-typings/lib/modules/input/models/input-action.d.ts","/web/Webland/app/dist/input/tmp-typings/lib/modules/input/models/input-device.d.ts","/web/Webland/app/dist/input/tmp-typings/lib/modules/input/models/input-scheme.d.ts","/web/Webland/app/dist/input/tmp-typings/lib/modules/input/services/input.service.d.ts","/web/Webland/app/dist/input/tmp-typings/lib/modules/input/models/devices/input-gamepad.d.ts","/web/Webland/app/dist/input/tmp-typings/lib/modules/input/models/devices/input-keyboard.d.ts","/web/Webland/app/dist/input/tmp-typings/lib/modules/navigation/directives/action-binding.directive.d.ts","/web/Webland/app/dist/input/tmp-typings/lib/modules/navigation/directives/key-item-group.directive.d.ts","/web/Webland/app/dist/input/tmp-typings/lib/modules/navigation/directives/key-item.directive.d.ts","/web/Webland/app/dist/input/tmp-typings/lib/modules/navigation/navigation-module.d.ts","/web/Webland/app/dist/input/tmp-typings/webland-input.d.ts"],"name":"webland-input.d","type":"chunk","dynamicImports":[],"fileName":"index.d.ts","implicitlyLoadedBefore":[],"importedBindings":{"@angular/core":["*","EventEmitter","ElementRef","OnInit","OnDestroy"],"@angular/common":["*"],"rxjs":["BehaviorSubject"]},"imports":["@angular/core","@angular/common","rxjs"],"modules":{"/web/Webland/app/dist/input/tmp-typings/lib/modules/input/input-module.d.ts":{"code":"declare class InputModule {\n static ɵfac: i0.ɵɵFactoryDeclaration;\n static ɵmod: i0.ɵɵNgModuleDeclaration;\n static ɵinj: i0.ɵɵInjectorDeclaration;\n}","originalLength":327,"removedExports":[],"renderedExports":["InputModule"],"renderedLength":243},"/web/Webland/app/dist/input/tmp-typings/lib/modules/input/models/input-action.d.ts":{"code":"type ActionCallback = (value: number, data: unknown, angle?: number, timePressed?: number) => void;\ndeclare class InputAction {\n readonly name: string;\n private currentValue;\n private downActions;\n private upActions;\n private changeActions;\n constructor(name: string);\n mapKeysToScheme(scheme: InputScheme, keys: (string | number)[]): this;\n fire(value: number, data?: unknown, angle?: number, timePressed?: number): void;\n onDown(action: ActionCallback): void;\n onUp(action: ActionCallback): void;\n onChange(action: ActionCallback): void;\n}","originalLength":635,"removedExports":[],"renderedExports":["ActionCallback","InputAction"],"renderedLength":574},"/web/Webland/app/dist/input/tmp-typings/lib/modules/input/models/input-device.d.ts":{"code":"interface InputKeyState {\n key: string | number;\n value: number;\n angle?: number;\n}\ndeclare abstract class InputDevice {\n readonly name: string;\n readonly type: string;\n protected scheme?: InputScheme;\n protected keyStates: InputKeyState[];\n keyStateChanged: EventEmitter;\n constructor(name: string, type?: string);\n mapKey(action: InputAction, keys: (string | number)[]): this;\n getScheme(): InputScheme | undefined;\n hasScheme(): boolean;\n setKey(key: string | number, value?: number, angle?: number): this;\n assignScheme(scheme: InputScheme): this;\n}","originalLength":763,"removedExports":[],"renderedExports":["InputKeyState","InputDevice"],"renderedLength":610},"/web/Webland/app/dist/input/tmp-typings/lib/modules/input/models/input-scheme.d.ts":{"code":"declare class InputScheme {\n readonly name: string;\n private data;\n private actions;\n private devices;\n deviceListChanged: BehaviorSubject;\n constructor(name: string);\n clearKeyBindings(): void;\n clearDeviceAssignments(): void;\n unassignDevice(device: InputDevice): void;\n getDevices(): InputDevice[];\n getKeyForAction(action: string): (string | number)[];\n setData(data: unknown): void;\n mapKey(action: InputAction, keys: (string | number)[]): void;\n setKeyState(key: string | number, value: number, angle?: number): void;\n assignDevice(device: InputDevice): void;\n}","originalLength":767,"removedExports":[],"renderedExports":["InputScheme"],"renderedLength":627},"/web/Webland/app/dist/input/tmp-typings/lib/modules/input/services/input.service.d.ts":{"code":"declare class InputService {\n actions: InputAction[];\n schemes: InputScheme[];\n devices: InputDevice[];\n deviceListChanged: BehaviorSubject;\n constructor();\n private defineKeyboard;\n private defineGamepad;\n defineAction(name: string): InputAction;\n defineScheme(name: string): InputScheme;\n getDevices(): InputDevice[];\n static ɵfac: i0.ɵɵFactoryDeclaration;\n static ɵprov: i0.ɵɵInjectableDeclaration;\n}","originalLength":736,"removedExports":[],"renderedExports":["InputService"],"renderedLength":489},"/web/Webland/app/dist/input/tmp-typings/lib/modules/input/models/devices/input-gamepad.d.ts":{"code":"interface GamepadButtonState {\n value: number;\n angle?: number;\n id: number;\n}\ndeclare class InputGamepad extends InputDevice {\n private gamepad;\n static listenerInited: boolean;\n static DeviceConnected: EventEmitter;\n static DeviceDisconnected: EventEmitter;\n static DeviceListChanged: EventEmitter;\n private static gamepads;\n private stateUpdateAgent?;\n private buttonState;\n axesState: GamepadButtonState[];\n constructor(gamepad: Gamepad);\n static GetName(gamepad: Gamepad): string;\n getMapping(): GamepadMappingType;\n private static attachEvents;\n connect(): void;\n disconnect(): void;\n private static updateGamepadStates;\n static Init(): void;\n}","originalLength":866,"removedExports":[],"renderedExports":["InputGamepad"],"renderedLength":754},"/web/Webland/app/dist/input/tmp-typings/lib/modules/input/models/devices/input-keyboard.d.ts":{"code":"declare class InputKeyboard extends InputDevice {\n static listenerInited: boolean;\n constructor(name: string);\n private attachEvents;\n private catchKey;\n}","originalLength":221,"removedExports":[],"renderedExports":["InputKeyboard"],"renderedLength":166},"/web/Webland/app/dist/input/tmp-typings/lib/modules/navigation/directives/action-binding.directive.d.ts":{"code":"declare class ActionBindingDirective {\n inputActionBinding: string;\n private element;\n constructor(elementRef: ElementRef);\n ngOnInit(): void;\n static ɵfac: i0.ɵɵFactoryDeclaration;\n static ɵdir: i0.ɵɵDirectiveDeclaration;\n}","originalLength":530,"removedExports":[],"renderedExports":["ActionBindingDirective"],"renderedLength":441},"/web/Webland/app/dist/input/tmp-typings/lib/modules/navigation/directives/key-item-group.directive.d.ts":{"code":"declare class KeyItemGroupDirective {\n static groups: KeyItemGroupDirective[];\n items: KeyItemEntry[];\n constructor();\n ngOnInit(): void;\n ngOnDestroy(): void;\n static ɵfac: i0.ɵɵFactoryDeclaration;\n static ɵdir: i0.ɵɵDirectiveDeclaration;\n}","originalLength":478,"removedExports":[],"renderedExports":["KeyItemGroupDirective"],"renderedLength":380},"/web/Webland/app/dist/input/tmp-typings/lib/modules/navigation/directives/key-item.directive.d.ts":{"code":"interface ActionBindings {\n [action: string]: () => undefined | boolean;\n}\ninterface KeyItemEntry {\n element: HTMLKeyItemEntryElement;\n top: number;\n left: number;\n}\ninterface HTMLKeyItemEntryElement extends HTMLElement {\n keyId: number;\n active: string;\n actionBindings: ActionBindings;\n activate: () => void;\n deactivate: () => void;\n focus: () => void;\n blur: () => void;\n}\ndeclare class KeyItemDirective implements OnInit, OnDestroy {\n private group;\n active: string;\n activate: () => any;\n deactivate: () => any;\n focus: () => any;\n blur: () => any;\n actionBindings: ActionBindings;\n private static allItems;\n private static current?;\n private element;\n private static NextId;\n private id;\n constructor(group: KeyItemGroupDirective, elementRef: ElementRef);\n static FireAction(action: string): boolean;\n ngOnInit(): void;\n ngOnDestroy(): void;\n onHover(): void;\n onLeave(): void;\n static ActivateCurrentItem(): void;\n static getCurrentGroup(): KeyItemGroupDirective | null;\n static SelectNexItem(fromAngleDeg: number, toAngleDeg: number): void;\n static SetCurrentItem(item?: KeyItemEntry): void;\n static updateItems(): void;\n static ɵfac: i0.ɵɵFactoryDeclaration;\n static ɵdir: i0.ɵɵDirectiveDeclaration;\n}","originalLength":1986,"removedExports":[],"renderedExports":["ActionBindings","KeyItemEntry","KeyItemDirective"],"renderedLength":1785},"/web/Webland/app/dist/input/tmp-typings/lib/modules/navigation/navigation-module.d.ts":{"code":"declare class NavigationModule {\n static ɵfac: i0.ɵɵFactoryDeclaration;\n static ɵmod: i0.ɵɵNgModuleDeclaration;\n static ɵinj: i0.ɵɵInjectorDeclaration;\n}","originalLength":709,"removedExports":[],"renderedExports":["NavigationModule"],"renderedLength":430},"/web/Webland/app/dist/input/tmp-typings/webland-input.d.ts":{"code":null,"originalLength":119,"removedExports":[],"renderedExports":[],"renderedLength":0}},"referencedFiles":[],"code":"import * as i0 from '@angular/core';\nimport { EventEmitter, ElementRef, OnInit, OnDestroy } from '@angular/core';\nimport * as i1 from '@angular/common';\nimport { BehaviorSubject } from 'rxjs';\n\ndeclare class InputModule {\n static ɵfac: i0.ɵɵFactoryDeclaration;\n static ɵmod: i0.ɵɵNgModuleDeclaration;\n static ɵinj: i0.ɵɵInjectorDeclaration;\n}\n\ntype ActionCallback = (value: number, data: unknown, angle?: number, timePressed?: number) => void;\ndeclare class InputAction {\n readonly name: string;\n private currentValue;\n private downActions;\n private upActions;\n private changeActions;\n constructor(name: string);\n mapKeysToScheme(scheme: InputScheme, keys: (string | number)[]): this;\n fire(value: number, data?: unknown, angle?: number, timePressed?: number): void;\n onDown(action: ActionCallback): void;\n onUp(action: ActionCallback): void;\n onChange(action: ActionCallback): void;\n}\n\ninterface InputKeyState {\n key: string | number;\n value: number;\n angle?: number;\n}\ndeclare abstract class InputDevice {\n readonly name: string;\n readonly type: string;\n protected scheme?: InputScheme;\n protected keyStates: InputKeyState[];\n keyStateChanged: EventEmitter;\n constructor(name: string, type?: string);\n mapKey(action: InputAction, keys: (string | number)[]): this;\n getScheme(): InputScheme | undefined;\n hasScheme(): boolean;\n setKey(key: string | number, value?: number, angle?: number): this;\n assignScheme(scheme: InputScheme): this;\n}\n\ndeclare class InputScheme {\n readonly name: string;\n private data;\n private actions;\n private devices;\n deviceListChanged: BehaviorSubject;\n constructor(name: string);\n clearKeyBindings(): void;\n clearDeviceAssignments(): void;\n unassignDevice(device: InputDevice): void;\n getDevices(): InputDevice[];\n getKeyForAction(action: string): (string | number)[];\n setData(data: unknown): void;\n mapKey(action: InputAction, keys: (string | number)[]): void;\n setKeyState(key: string | number, value: number, angle?: number): void;\n assignDevice(device: InputDevice): void;\n}\n\ndeclare class InputService {\n actions: InputAction[];\n schemes: InputScheme[];\n devices: InputDevice[];\n deviceListChanged: BehaviorSubject;\n constructor();\n private defineKeyboard;\n private defineGamepad;\n defineAction(name: string): InputAction;\n defineScheme(name: string): InputScheme;\n getDevices(): InputDevice[];\n static ɵfac: i0.ɵɵFactoryDeclaration;\n static ɵprov: i0.ɵɵInjectableDeclaration;\n}\n\ninterface GamepadButtonState {\n value: number;\n angle?: number;\n id: number;\n}\ndeclare class InputGamepad extends InputDevice {\n private gamepad;\n static listenerInited: boolean;\n static DeviceConnected: EventEmitter;\n static DeviceDisconnected: EventEmitter;\n static DeviceListChanged: EventEmitter;\n private static gamepads;\n private stateUpdateAgent?;\n private buttonState;\n axesState: GamepadButtonState[];\n constructor(gamepad: Gamepad);\n static GetName(gamepad: Gamepad): string;\n getMapping(): GamepadMappingType;\n private static attachEvents;\n connect(): void;\n disconnect(): void;\n private static updateGamepadStates;\n static Init(): void;\n}\n\ndeclare class InputKeyboard extends InputDevice {\n static listenerInited: boolean;\n constructor(name: string);\n private attachEvents;\n private catchKey;\n}\n\ndeclare class ActionBindingDirective {\n inputActionBinding: string;\n private element;\n constructor(elementRef: ElementRef);\n ngOnInit(): void;\n static ɵfac: i0.ɵɵFactoryDeclaration;\n static ɵdir: i0.ɵɵDirectiveDeclaration;\n}\n\ndeclare class KeyItemGroupDirective {\n static groups: KeyItemGroupDirective[];\n items: KeyItemEntry[];\n constructor();\n ngOnInit(): void;\n ngOnDestroy(): void;\n static ɵfac: i0.ɵɵFactoryDeclaration;\n static ɵdir: i0.ɵɵDirectiveDeclaration;\n}\n\ninterface ActionBindings {\n [action: string]: () => undefined | boolean;\n}\ninterface KeyItemEntry {\n element: HTMLKeyItemEntryElement;\n top: number;\n left: number;\n}\ninterface HTMLKeyItemEntryElement extends HTMLElement {\n keyId: number;\n active: string;\n actionBindings: ActionBindings;\n activate: () => void;\n deactivate: () => void;\n focus: () => void;\n blur: () => void;\n}\ndeclare class KeyItemDirective implements OnInit, OnDestroy {\n private group;\n active: string;\n activate: () => any;\n deactivate: () => any;\n focus: () => any;\n blur: () => any;\n actionBindings: ActionBindings;\n private static allItems;\n private static current?;\n private element;\n private static NextId;\n private id;\n constructor(group: KeyItemGroupDirective, elementRef: ElementRef);\n static FireAction(action: string): boolean;\n ngOnInit(): void;\n ngOnDestroy(): void;\n onHover(): void;\n onLeave(): void;\n static ActivateCurrentItem(): void;\n static getCurrentGroup(): KeyItemGroupDirective | null;\n static SelectNexItem(fromAngleDeg: number, toAngleDeg: number): void;\n static SetCurrentItem(item?: KeyItemEntry): void;\n static updateItems(): void;\n static ɵfac: i0.ɵɵFactoryDeclaration;\n static ɵdir: i0.ɵɵDirectiveDeclaration;\n}\n\ndeclare class NavigationModule {\n static ɵfac: i0.ɵɵFactoryDeclaration;\n static ɵmod: i0.ɵɵNgModuleDeclaration;\n static ɵinj: i0.ɵɵInjectorDeclaration;\n}\n\nexport { ActionBindingDirective, InputAction, InputDevice, InputGamepad, InputKeyboard, InputModule, InputScheme, InputService, KeyItemDirective, KeyItemGroupDirective, NavigationModule };\nexport type { ActionBindings, ActionCallback, InputKeyState, KeyItemEntry };\n","map":null,"preliminaryFileName":"index.d.ts","sourcemapFileName":null}],"fesm2022":[{"exports":["ActionBindingDirective","InputAction","InputDevice","InputGamepad","InputKeyboard","InputModule","InputScheme","InputService","KeyItemDirective","KeyItemGroupDirective","NavigationModule"],"facadeModuleId":"/web/Webland/app/dist/input/tmp-esm2022/webland-input.js","isDynamicEntry":false,"isEntry":true,"isImplicitEntry":false,"moduleIds":["/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/input-module.js","/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/models/input-scheme.js","/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/models/input-action.js","/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/models/input-device.js","/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/models/devices/input-keyboard.js","/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/models/devices/input-gamepad.js","/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/services/input.service.js","/web/Webland/app/dist/input/tmp-esm2022/lib/modules/navigation/directives/action-binding.directive.js","/web/Webland/app/dist/input/tmp-esm2022/lib/modules/navigation/directives/key-item-group.directive.js","/web/Webland/app/dist/input/tmp-esm2022/lib/modules/navigation/directives/key-item.directive.js","/web/Webland/app/dist/input/tmp-esm2022/lib/modules/navigation/navigation-module.js","/web/Webland/app/dist/input/tmp-esm2022/public-api.js","/web/Webland/app/dist/input/tmp-esm2022/webland-input.js"],"name":"webland-input","type":"chunk","dynamicImports":[],"fileName":"webland-input.mjs","implicitlyLoadedBefore":[],"importedBindings":{"@angular/core":["*","NgModule","EventEmitter","Injectable","Input","Directive","HostListener","Optional"],"@angular/common":["CommonModule"],"rxjs":["BehaviorSubject"]},"imports":["@angular/core","@angular/common","rxjs"],"modules":{"/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/input-module.js":{"code":"class InputModule {\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: InputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"20.1.3\", ngImport: i0, type: InputModule, imports: [CommonModule] });\n static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: InputModule, imports: [CommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: InputModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [],\n imports: [\n CommonModule,\n ],\n exports: []\n }]\n }] });","originalLength":1016,"removedExports":[],"renderedExports":["InputModule"],"renderedLength":841},"/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/models/input-scheme.js":{"code":"class InputScheme {\n name;\n data;\n actions = [];\n devices = [];\n deviceListChanged = new BehaviorSubject([]);\n constructor(name) {\n this.name = name;\n this.devices = [];\n }\n clearKeyBindings() {\n this.actions = [];\n }\n clearDeviceAssignments() {\n this.devices = [];\n this.deviceListChanged.next(this.devices);\n }\n unassignDevice(device) {\n this.devices.splice(this.devices.indexOf(device), 1);\n this.deviceListChanged.next(this.devices);\n }\n getDevices() {\n return this.devices;\n }\n getKeyForAction(action) {\n return this.actions.find(a => a.action.name === action)?.keys || [];\n }\n setData(data) {\n this.data = data;\n }\n mapKey(action, keys) {\n this.actions.push({ action, keys });\n }\n setKeyState(key, value, angle = 0) {\n const binds = this.actions.filter(a => a.keys.includes(key));\n if (binds.length) {\n binds.forEach(bind => bind.action.fire(value, this.data, angle));\n }\n }\n assignDevice(device) {\n device.assignScheme(this);\n this.devices.push(device);\n this.deviceListChanged.next(this.devices);\n }\n}","originalLength":1302,"removedExports":[],"renderedExports":["InputScheme"],"renderedLength":1214},"/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/models/input-action.js":{"code":"class InputAction {\n name;\n currentValue = 0;\n downActions = [];\n upActions = [];\n changeActions = [];\n constructor(name) {\n this.name = name;\n }\n mapKeysToScheme(scheme, keys) {\n scheme.mapKey(this, keys);\n return this;\n }\n fire(value, data = undefined, angle, timePressed) {\n const isPressed = value > 0;\n const wasPressed = this.currentValue > 0;\n if (isPressed !== wasPressed) {\n if (isPressed) {\n this.downActions.forEach(action => action(value, data, angle, timePressed));\n }\n else {\n this.upActions.forEach(action => action(value, data, angle, timePressed));\n }\n }\n else {\n this.changeActions.forEach(action => action(value, data, angle, timePressed));\n }\n this.currentValue = value;\n }\n onDown(action) {\n this.downActions.push(action);\n }\n onUp(action) {\n this.upActions.push(action);\n }\n onChange(action) {\n this.changeActions.push(action);\n }\n}","originalLength":1129,"removedExports":[],"renderedExports":["InputAction"],"renderedLength":1081},"/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/models/input-device.js":{"code":"class InputDevice {\n name;\n type;\n scheme;\n keyStates = [];\n keyStateChanged = new EventEmitter();\n constructor(name, type = 'unknown') {\n this.name = name;\n this.type = type;\n }\n mapKey(action, keys) {\n this.scheme?.mapKey(action, keys);\n return this;\n }\n getScheme() {\n return this.scheme;\n }\n hasScheme() {\n return !!this.scheme;\n }\n setKey(key, value = 1, angle = 0) {\n let exists = this.keyStates.find(k => k.key === key);\n if (!exists) {\n exists = {\n key,\n value,\n angle,\n };\n this.keyStates.push(exists);\n }\n else {\n exists.value = value;\n exists.angle = angle;\n }\n this.keyStateChanged.emit(exists);\n this.scheme?.setKeyState(key, value, angle);\n return this;\n }\n assignScheme(scheme) {\n this.scheme = scheme;\n return this;\n }\n}","originalLength":1093,"removedExports":[],"renderedExports":["InputDevice"],"renderedLength":999},"/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/models/devices/input-keyboard.js":{"code":"class InputKeyboard extends InputDevice {\n static listenerInited = false;\n constructor(name) {\n super(name, 'keyboard');\n this.attachEvents();\n }\n attachEvents() {\n if (InputKeyboard.listenerInited) {\n return;\n }\n window.addEventListener('keydown', e => this.catchKey(e, 1));\n window.addEventListener('keyup', e => this.catchKey(e, 0));\n InputKeyboard.listenerInited = true;\n }\n catchKey(event, value = 1, angle = 0) {\n const key = event.key;\n super.setKey(key, value, angle);\n event.preventDefault();\n return false;\n }\n}","originalLength":727,"removedExports":[],"renderedExports":["InputKeyboard"],"renderedLength":630},"/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/models/devices/input-gamepad.js":{"code":"class InputGamepad extends InputDevice {\n gamepad;\n static listenerInited = false;\n static DeviceConnected = new EventEmitter();\n static DeviceDisconnected = new EventEmitter();\n static DeviceListChanged = new EventEmitter();\n static gamepads = [];\n stateUpdateAgent;\n buttonState = [];\n axesState = [];\n constructor(gamepad) {\n super(InputGamepad.GetName(gamepad), 'gamepad');\n this.gamepad = gamepad;\n }\n static GetName(gamepad) {\n return `${gamepad.id} #${gamepad.index}`;\n }\n getMapping() {\n return this.gamepad.mapping;\n }\n static attachEvents() {\n if (InputGamepad.listenerInited) {\n return;\n }\n window.addEventListener('gamepadconnected', e => this.updateGamepadStates(e));\n window.addEventListener('gamepaddisconnected', e => this.updateGamepadStates(e));\n InputGamepad.listenerInited = true;\n }\n connect() {\n this.gamepad.buttons.forEach((button, index) => {\n this.buttonState.push({\n value: button.value,\n angle: 0,\n id: index,\n });\n });\n let axisIndex = 0;\n for (let i = 0; i < this.gamepad.axes.length; i += 2) {\n const axis = {\n value: 0,\n angle: 0,\n id: axisIndex++,\n };\n this.axesState.push(axis);\n }\n this.stateUpdateAgent = setInterval(() => {\n this.gamepad.buttons.forEach((button, index) => {\n const state = this.buttonState.find(s => s.id === index);\n if (!state) {\n return;\n }\n const wasPressed = state.value > 0;\n const isPressed = button.value > 0;\n state.value = button.value;\n if (isPressed !== wasPressed) {\n this.setKey(`gamepad.button.${index}`, button.value);\n }\n });\n axisIndex = 0;\n for (let i = 0; i < this.gamepad.axes.length; i += 2) {\n const state = this.axesState.find(s => s.id === axisIndex);\n if (!state) {\n return;\n }\n const left = Math.abs(Math.max(0, this.gamepad.axes[i]));\n const right = Math.abs(0 - Math.min(0, this.gamepad.axes[i]));\n const up = Math.abs(Math.max(0, this.gamepad.axes[i + 1]));\n const down = Math.abs(0 - Math.min(0, this.gamepad.axes[i + 1]));\n const x = right - left;\n const y = up - down;\n const value = Math.sqrt(x * x + y * y);\n const angle = Math.atan2(x, y);\n if (value !== state.value || angle !== state.angle) {\n this.setKey(`gamepad.axis.${state.id}`, value, angle);\n }\n state.value = value;\n state.angle = angle;\n axisIndex++;\n }\n }, 50);\n }\n disconnect() {\n this.scheme?.unassignDevice(this);\n this.scheme = undefined;\n clearInterval(this.stateUpdateAgent);\n }\n static updateGamepadStates(event) {\n console.log({ event });\n switch (event.type) {\n case 'gamepadconnected':\n const newGamepad = new InputGamepad(event.gamepad);\n this.DeviceConnected.emit(newGamepad);\n this.gamepads.push(newGamepad);\n newGamepad.connect();\n this.DeviceListChanged.emit(this.gamepads);\n break;\n case 'gamepaddisconnected':\n const gamepad = this.gamepads.find(g => g.name === event.gamepad.id);\n if (gamepad) {\n gamepad.disconnect();\n this.DeviceDisconnected.emit(gamepad);\n this.gamepads.splice(this.gamepads.indexOf(gamepad), 1);\n this.DeviceListChanged.emit(this.gamepads);\n }\n break;\n }\n }\n static Init() {\n this.attachEvents();\n }\n}","originalLength":4265,"removedExports":[],"renderedExports":["InputGamepad"],"renderedLength":4123},"/web/Webland/app/dist/input/tmp-esm2022/lib/modules/input/services/input.service.js":{"code":"class InputService {\n actions = [];\n schemes = [];\n devices = [];\n deviceListChanged = new BehaviorSubject([]);\n constructor() {\n this.defineKeyboard();\n this.defineGamepad();\n }\n defineKeyboard() {\n const keyboard = new InputKeyboard('Keyboard');\n this.devices.push(keyboard);\n this.deviceListChanged.next(this.devices);\n }\n defineGamepad() {\n InputGamepad.DeviceConnected.subscribe(gamepad => {\n this.devices.push(gamepad);\n this.deviceListChanged.next(this.devices);\n });\n InputGamepad.DeviceDisconnected.subscribe(gamepad => {\n this.devices = this.devices.filter(d => d.name !== gamepad.name);\n this.deviceListChanged.next(this.devices);\n });\n InputGamepad.Init();\n }\n defineAction(name) {\n const action = new InputAction(name);\n this.actions.push(action);\n return action;\n }\n defineScheme(name) {\n const scheme = new InputScheme(name);\n this.schemes.push(scheme);\n return scheme;\n }\n getDevices() {\n return this.devices;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: InputService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: InputService, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: InputService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], ctorParameters: () => [] });","originalLength":2132,"removedExports":[],"renderedExports":["InputService"],"renderedLength":1724},"/web/Webland/app/dist/input/tmp-esm2022/lib/modules/navigation/directives/action-binding.directive.js":{"code":"class ActionBindingDirective {\n inputActionBinding = '';\n element;\n constructor(elementRef) {\n this.element = elementRef.nativeElement;\n }\n ngOnInit() {\n this.element.setAttribute('action', this.inputActionBinding);\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: ActionBindingDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\n static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"20.1.3\", type: ActionBindingDirective, isStandalone: true, selector: \"[inputActionBinding]\", inputs: { inputActionBinding: \"inputActionBinding\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: ActionBindingDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[inputActionBinding]',\n standalone: true\n }]\n }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { inputActionBinding: [{\n type: Input\n }] } });","originalLength":1282,"removedExports":[],"renderedExports":["ActionBindingDirective"],"renderedLength":1135},"/web/Webland/app/dist/input/tmp-esm2022/lib/modules/navigation/directives/key-item-group.directive.js":{"code":"class KeyItemGroupDirective {\n static groups = [];\n items = [];\n constructor() {\n }\n ngOnInit() {\n KeyItemDirective.SetCurrentItem();\n KeyItemGroupDirective.groups.push(this);\n }\n ngOnDestroy() {\n const index = KeyItemGroupDirective.groups.findIndex(g => g === this);\n if (index > -1) {\n KeyItemGroupDirective.groups.splice(index, 1);\n }\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: KeyItemGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"20.1.3\", type: KeyItemGroupDirective, isStandalone: true, selector: \"[inputKeyItemGroup]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: KeyItemGroupDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[inputKeyItemGroup]',\n standalone: true\n }]\n }], ctorParameters: () => [] });","originalLength":1299,"removedExports":[],"renderedExports":["KeyItemGroupDirective"],"renderedLength":1102},"/web/Webland/app/dist/input/tmp-esm2022/lib/modules/navigation/directives/key-item.directive.js":{"code":"class KeyItemDirective {\n group;\n active = 'active';\n activate = () => { };\n deactivate = () => { };\n focus = () => { };\n blur = () => { };\n actionBindings = {};\n static allItems = [];\n static current;\n element;\n static NextId = 0;\n id = KeyItemDirective.NextId++;\n constructor(group, elementRef) {\n this.group = group;\n this.element = elementRef.nativeElement;\n }\n static FireAction(action) {\n const item = KeyItemDirective.current;\n if (item) {\n return item.element.actionBindings?.[action]?.() ?? true;\n }\n return true;\n }\n ngOnInit() {\n this.element.active = this.active;\n this.element.activate = this.activate;\n this.element.deactivate = this.deactivate;\n this.element.keyId = this.id;\n this.element.actionBindings = this.actionBindings;\n this.element.focus = this.focus;\n this.element.blur = this.blur;\n const position = this.element.getBoundingClientRect();\n const item = {\n element: this.element,\n top: position.top + position.height / 2,\n left: position.left + position.width / 2,\n };\n KeyItemDirective.allItems.push(item);\n this.group?.items.push(item);\n if (this.group) {\n this.group.items = this.group.items.sort((a, b) => {\n const tabIndexA = a.element.tabIndex;\n const tabIndexB = b.element.tabIndex;\n return tabIndexA - tabIndexB;\n });\n }\n }\n ngOnDestroy() {\n const index = KeyItemDirective.allItems.findIndex(item => item.element.keyId === this.id);\n if (index > -1) {\n KeyItemDirective.allItems.splice(index, 1);\n }\n if (this.group) {\n const index = this.group.items.findIndex(item => item.element.keyId === this.id);\n if (index > -1) {\n this.group.items.splice(index, 1);\n }\n }\n }\n onHover() {\n if (this.active && !this.element.classList.contains(this.active)) {\n this.element.classList.add(this.active);\n }\n this.focus();\n const item = KeyItemDirective.allItems.find(item => item.element.keyId === this.id);\n KeyItemDirective.SetCurrentItem(item);\n }\n onLeave() {\n if (this.active && this.element.classList.contains(this.active)) {\n this.element.classList.remove(this.active);\n }\n this.blur();\n }\n static ActivateCurrentItem() {\n this.current?.element.activate.bind(this.current?.element)();\n }\n static getCurrentGroup() {\n if (KeyItemGroupDirective.groups.length === 0) {\n return null;\n }\n return KeyItemGroupDirective.groups[KeyItemGroupDirective.groups.length - 1];\n }\n static SelectNexItem(fromAngleDeg, toAngleDeg) {\n this.updateItems();\n let current = this.current;\n let allItems = this.allItems;\n const currentGroup = this.getCurrentGroup();\n if (currentGroup) {\n const isCurrentInCurrentGroup = this.current && currentGroup.items.some(i => i.element.keyId === this.current.element.keyId);\n allItems = currentGroup.items;\n if (!isCurrentInCurrentGroup) {\n current = undefined;\n }\n }\n if (current) {\n const list = allItems.map(item => {\n const distance = Math.sqrt(Math.pow(item.top - this.current.top, 2) + Math.pow(item.left - this.current.left, 2));\n const angle = 90 + Math.atan2(item.top - this.current.top, item.left - this.current.left) * 180 / Math.PI;\n return {\n item,\n distance,\n angle,\n };\n })\n .filter(item => {\n const angle = item.angle;\n const normalizedAngle = angle < 0 ? angle + 360 : angle;\n return normalizedAngle >= fromAngleDeg && normalizedAngle <= toAngleDeg && item.distance > 0;\n })\n .sort((a, b) => a.distance - b.distance);\n if (list.length > 0) {\n this.SetCurrentItem(list[0].item);\n }\n else {\n let index = allItems.findIndex(i => i.element.keyId === this.current.element.keyId);\n index = (index + 1) % allItems.length;\n this.SetCurrentItem(allItems[index]);\n }\n }\n else {\n this.SetCurrentItem(allItems[0]);\n }\n }\n static SetCurrentItem(item) {\n if (this.current?.element.active && this.current.element.classList.contains(this.current.element.active)) {\n this.current.element.classList.remove(this.current.element.active);\n }\n this.current?.element.blur();\n this.current = item;\n this.current?.element.focus();\n if (this.current?.element.active && !this.current.element.classList.contains(this.current.element.active)) {\n this.current.element.classList.add(this.current.element.active);\n }\n }\n static updateItems() {\n this.allItems.forEach(item => {\n const position = item.element.getBoundingClientRect();\n item.top = position.top + position.height / 2;\n item.left = position.left + position.width / 2;\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: KeyItemDirective, deps: [{ token: KeyItemGroupDirective, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\n static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"20.1.3\", type: KeyItemDirective, isStandalone: true, selector: \"[inputKeyItem]\", inputs: { active: \"active\", activate: \"activate\", deactivate: \"deactivate\", focus: \"focus\", blur: \"blur\", actionBindings: \"actionBindings\" }, host: { listeners: { \"mouseenter\": \"onHover()\", \"mouseleave\": \"onLeave()\" } }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: KeyItemDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[inputKeyItem]',\n standalone: true\n }]\n }], ctorParameters: () => [{ type: KeyItemGroupDirective, decorators: [{\n type: Optional\n }] }, { type: i0.ElementRef }], propDecorators: { active: [{\n type: Input\n }], activate: [{\n type: Input\n }], deactivate: [{\n type: Input\n }], focus: [{\n type: Input\n }], blur: [{\n type: Input\n }], actionBindings: [{\n type: Input\n }], onHover: [{\n type: HostListener,\n args: ['mouseenter']\n }], onLeave: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });","originalLength":7354,"removedExports":[],"renderedExports":["KeyItemDirective"],"renderedLength":7065},"/web/Webland/app/dist/input/tmp-esm2022/lib/modules/navigation/navigation-module.js":{"code":"class NavigationModule {\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: NavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"20.1.3\", ngImport: i0, type: NavigationModule, imports: [CommonModule,\n ActionBindingDirective,\n KeyItemDirective,\n KeyItemGroupDirective], exports: [ActionBindingDirective,\n KeyItemDirective,\n KeyItemGroupDirective] });\n static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: NavigationModule, imports: [CommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: NavigationModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [],\n imports: [\n CommonModule,\n ActionBindingDirective,\n KeyItemDirective,\n KeyItemGroupDirective,\n ],\n exports: [\n ActionBindingDirective,\n KeyItemDirective,\n KeyItemGroupDirective,\n ],\n }]\n }] });","originalLength":1770,"removedExports":[],"renderedExports":["NavigationModule"],"renderedLength":1363},"/web/Webland/app/dist/input/tmp-esm2022/public-api.js":{"code":"/*\n * Public API Surface of input\n */","originalLength":778,"removedExports":[],"renderedExports":[],"renderedLength":37},"/web/Webland/app/dist/input/tmp-esm2022/webland-input.js":{"code":"/**\n * Generated bundle index. Do not edit.\n */","originalLength":119,"removedExports":[],"renderedExports":[],"renderedLength":47}},"referencedFiles":[],"code":"import * as i0 from '@angular/core';\nimport { NgModule, EventEmitter, Injectable, Input, Directive, HostListener, Optional } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { BehaviorSubject } from 'rxjs';\n\nclass InputModule {\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: InputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"20.1.3\", ngImport: i0, type: InputModule, imports: [CommonModule] });\n static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: InputModule, imports: [CommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: InputModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [],\n imports: [\n CommonModule,\n ],\n exports: []\n }]\n }] });\n\nclass InputScheme {\n name;\n data;\n actions = [];\n devices = [];\n deviceListChanged = new BehaviorSubject([]);\n constructor(name) {\n this.name = name;\n this.devices = [];\n }\n clearKeyBindings() {\n this.actions = [];\n }\n clearDeviceAssignments() {\n this.devices = [];\n this.deviceListChanged.next(this.devices);\n }\n unassignDevice(device) {\n this.devices.splice(this.devices.indexOf(device), 1);\n this.deviceListChanged.next(this.devices);\n }\n getDevices() {\n return this.devices;\n }\n getKeyForAction(action) {\n return this.actions.find(a => a.action.name === action)?.keys || [];\n }\n setData(data) {\n this.data = data;\n }\n mapKey(action, keys) {\n this.actions.push({ action, keys });\n }\n setKeyState(key, value, angle = 0) {\n const binds = this.actions.filter(a => a.keys.includes(key));\n if (binds.length) {\n binds.forEach(bind => bind.action.fire(value, this.data, angle));\n }\n }\n assignDevice(device) {\n device.assignScheme(this);\n this.devices.push(device);\n this.deviceListChanged.next(this.devices);\n }\n}\n\nclass InputAction {\n name;\n currentValue = 0;\n downActions = [];\n upActions = [];\n changeActions = [];\n constructor(name) {\n this.name = name;\n }\n mapKeysToScheme(scheme, keys) {\n scheme.mapKey(this, keys);\n return this;\n }\n fire(value, data = undefined, angle, timePressed) {\n const isPressed = value > 0;\n const wasPressed = this.currentValue > 0;\n if (isPressed !== wasPressed) {\n if (isPressed) {\n this.downActions.forEach(action => action(value, data, angle, timePressed));\n }\n else {\n this.upActions.forEach(action => action(value, data, angle, timePressed));\n }\n }\n else {\n this.changeActions.forEach(action => action(value, data, angle, timePressed));\n }\n this.currentValue = value;\n }\n onDown(action) {\n this.downActions.push(action);\n }\n onUp(action) {\n this.upActions.push(action);\n }\n onChange(action) {\n this.changeActions.push(action);\n }\n}\n\nclass InputDevice {\n name;\n type;\n scheme;\n keyStates = [];\n keyStateChanged = new EventEmitter();\n constructor(name, type = 'unknown') {\n this.name = name;\n this.type = type;\n }\n mapKey(action, keys) {\n this.scheme?.mapKey(action, keys);\n return this;\n }\n getScheme() {\n return this.scheme;\n }\n hasScheme() {\n return !!this.scheme;\n }\n setKey(key, value = 1, angle = 0) {\n let exists = this.keyStates.find(k => k.key === key);\n if (!exists) {\n exists = {\n key,\n value,\n angle,\n };\n this.keyStates.push(exists);\n }\n else {\n exists.value = value;\n exists.angle = angle;\n }\n this.keyStateChanged.emit(exists);\n this.scheme?.setKeyState(key, value, angle);\n return this;\n }\n assignScheme(scheme) {\n this.scheme = scheme;\n return this;\n }\n}\n\nclass InputKeyboard extends InputDevice {\n static listenerInited = false;\n constructor(name) {\n super(name, 'keyboard');\n this.attachEvents();\n }\n attachEvents() {\n if (InputKeyboard.listenerInited) {\n return;\n }\n window.addEventListener('keydown', e => this.catchKey(e, 1));\n window.addEventListener('keyup', e => this.catchKey(e, 0));\n InputKeyboard.listenerInited = true;\n }\n catchKey(event, value = 1, angle = 0) {\n const key = event.key;\n super.setKey(key, value, angle);\n event.preventDefault();\n return false;\n }\n}\n\nclass InputGamepad extends InputDevice {\n gamepad;\n static listenerInited = false;\n static DeviceConnected = new EventEmitter();\n static DeviceDisconnected = new EventEmitter();\n static DeviceListChanged = new EventEmitter();\n static gamepads = [];\n stateUpdateAgent;\n buttonState = [];\n axesState = [];\n constructor(gamepad) {\n super(InputGamepad.GetName(gamepad), 'gamepad');\n this.gamepad = gamepad;\n }\n static GetName(gamepad) {\n return `${gamepad.id} #${gamepad.index}`;\n }\n getMapping() {\n return this.gamepad.mapping;\n }\n static attachEvents() {\n if (InputGamepad.listenerInited) {\n return;\n }\n window.addEventListener('gamepadconnected', e => this.updateGamepadStates(e));\n window.addEventListener('gamepaddisconnected', e => this.updateGamepadStates(e));\n InputGamepad.listenerInited = true;\n }\n connect() {\n this.gamepad.buttons.forEach((button, index) => {\n this.buttonState.push({\n value: button.value,\n angle: 0,\n id: index,\n });\n });\n let axisIndex = 0;\n for (let i = 0; i < this.gamepad.axes.length; i += 2) {\n const axis = {\n value: 0,\n angle: 0,\n id: axisIndex++,\n };\n this.axesState.push(axis);\n }\n this.stateUpdateAgent = setInterval(() => {\n this.gamepad.buttons.forEach((button, index) => {\n const state = this.buttonState.find(s => s.id === index);\n if (!state) {\n return;\n }\n const wasPressed = state.value > 0;\n const isPressed = button.value > 0;\n state.value = button.value;\n if (isPressed !== wasPressed) {\n this.setKey(`gamepad.button.${index}`, button.value);\n }\n });\n axisIndex = 0;\n for (let i = 0; i < this.gamepad.axes.length; i += 2) {\n const state = this.axesState.find(s => s.id === axisIndex);\n if (!state) {\n return;\n }\n const left = Math.abs(Math.max(0, this.gamepad.axes[i]));\n const right = Math.abs(0 - Math.min(0, this.gamepad.axes[i]));\n const up = Math.abs(Math.max(0, this.gamepad.axes[i + 1]));\n const down = Math.abs(0 - Math.min(0, this.gamepad.axes[i + 1]));\n const x = right - left;\n const y = up - down;\n const value = Math.sqrt(x * x + y * y);\n const angle = Math.atan2(x, y);\n if (value !== state.value || angle !== state.angle) {\n this.setKey(`gamepad.axis.${state.id}`, value, angle);\n }\n state.value = value;\n state.angle = angle;\n axisIndex++;\n }\n }, 50);\n }\n disconnect() {\n this.scheme?.unassignDevice(this);\n this.scheme = undefined;\n clearInterval(this.stateUpdateAgent);\n }\n static updateGamepadStates(event) {\n console.log({ event });\n switch (event.type) {\n case 'gamepadconnected':\n const newGamepad = new InputGamepad(event.gamepad);\n this.DeviceConnected.emit(newGamepad);\n this.gamepads.push(newGamepad);\n newGamepad.connect();\n this.DeviceListChanged.emit(this.gamepads);\n break;\n case 'gamepaddisconnected':\n const gamepad = this.gamepads.find(g => g.name === event.gamepad.id);\n if (gamepad) {\n gamepad.disconnect();\n this.DeviceDisconnected.emit(gamepad);\n this.gamepads.splice(this.gamepads.indexOf(gamepad), 1);\n this.DeviceListChanged.emit(this.gamepads);\n }\n break;\n }\n }\n static Init() {\n this.attachEvents();\n }\n}\n\nclass InputService {\n actions = [];\n schemes = [];\n devices = [];\n deviceListChanged = new BehaviorSubject([]);\n constructor() {\n this.defineKeyboard();\n this.defineGamepad();\n }\n defineKeyboard() {\n const keyboard = new InputKeyboard('Keyboard');\n this.devices.push(keyboard);\n this.deviceListChanged.next(this.devices);\n }\n defineGamepad() {\n InputGamepad.DeviceConnected.subscribe(gamepad => {\n this.devices.push(gamepad);\n this.deviceListChanged.next(this.devices);\n });\n InputGamepad.DeviceDisconnected.subscribe(gamepad => {\n this.devices = this.devices.filter(d => d.name !== gamepad.name);\n this.deviceListChanged.next(this.devices);\n });\n InputGamepad.Init();\n }\n defineAction(name) {\n const action = new InputAction(name);\n this.actions.push(action);\n return action;\n }\n defineScheme(name) {\n const scheme = new InputScheme(name);\n this.schemes.push(scheme);\n return scheme;\n }\n getDevices() {\n return this.devices;\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: InputService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });\n static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: InputService, providedIn: 'root' });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: InputService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root'\n }]\n }], ctorParameters: () => [] });\n\nclass ActionBindingDirective {\n inputActionBinding = '';\n element;\n constructor(elementRef) {\n this.element = elementRef.nativeElement;\n }\n ngOnInit() {\n this.element.setAttribute('action', this.inputActionBinding);\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: ActionBindingDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\n static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"20.1.3\", type: ActionBindingDirective, isStandalone: true, selector: \"[inputActionBinding]\", inputs: { inputActionBinding: \"inputActionBinding\" }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: ActionBindingDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[inputActionBinding]',\n standalone: true\n }]\n }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { inputActionBinding: [{\n type: Input\n }] } });\n\nclass KeyItemGroupDirective {\n static groups = [];\n items = [];\n constructor() {\n }\n ngOnInit() {\n KeyItemDirective.SetCurrentItem();\n KeyItemGroupDirective.groups.push(this);\n }\n ngOnDestroy() {\n const index = KeyItemGroupDirective.groups.findIndex(g => g === this);\n if (index > -1) {\n KeyItemGroupDirective.groups.splice(index, 1);\n }\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: KeyItemGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });\n static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"20.1.3\", type: KeyItemGroupDirective, isStandalone: true, selector: \"[inputKeyItemGroup]\", ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: KeyItemGroupDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[inputKeyItemGroup]',\n standalone: true\n }]\n }], ctorParameters: () => [] });\n\nclass KeyItemDirective {\n group;\n active = 'active';\n activate = () => { };\n deactivate = () => { };\n focus = () => { };\n blur = () => { };\n actionBindings = {};\n static allItems = [];\n static current;\n element;\n static NextId = 0;\n id = KeyItemDirective.NextId++;\n constructor(group, elementRef) {\n this.group = group;\n this.element = elementRef.nativeElement;\n }\n static FireAction(action) {\n const item = KeyItemDirective.current;\n if (item) {\n return item.element.actionBindings?.[action]?.() ?? true;\n }\n return true;\n }\n ngOnInit() {\n this.element.active = this.active;\n this.element.activate = this.activate;\n this.element.deactivate = this.deactivate;\n this.element.keyId = this.id;\n this.element.actionBindings = this.actionBindings;\n this.element.focus = this.focus;\n this.element.blur = this.blur;\n const position = this.element.getBoundingClientRect();\n const item = {\n element: this.element,\n top: position.top + position.height / 2,\n left: position.left + position.width / 2,\n };\n KeyItemDirective.allItems.push(item);\n this.group?.items.push(item);\n if (this.group) {\n this.group.items = this.group.items.sort((a, b) => {\n const tabIndexA = a.element.tabIndex;\n const tabIndexB = b.element.tabIndex;\n return tabIndexA - tabIndexB;\n });\n }\n }\n ngOnDestroy() {\n const index = KeyItemDirective.allItems.findIndex(item => item.element.keyId === this.id);\n if (index > -1) {\n KeyItemDirective.allItems.splice(index, 1);\n }\n if (this.group) {\n const index = this.group.items.findIndex(item => item.element.keyId === this.id);\n if (index > -1) {\n this.group.items.splice(index, 1);\n }\n }\n }\n onHover() {\n if (this.active && !this.element.classList.contains(this.active)) {\n this.element.classList.add(this.active);\n }\n this.focus();\n const item = KeyItemDirective.allItems.find(item => item.element.keyId === this.id);\n KeyItemDirective.SetCurrentItem(item);\n }\n onLeave() {\n if (this.active && this.element.classList.contains(this.active)) {\n this.element.classList.remove(this.active);\n }\n this.blur();\n }\n static ActivateCurrentItem() {\n this.current?.element.activate.bind(this.current?.element)();\n }\n static getCurrentGroup() {\n if (KeyItemGroupDirective.groups.length === 0) {\n return null;\n }\n return KeyItemGroupDirective.groups[KeyItemGroupDirective.groups.length - 1];\n }\n static SelectNexItem(fromAngleDeg, toAngleDeg) {\n this.updateItems();\n let current = this.current;\n let allItems = this.allItems;\n const currentGroup = this.getCurrentGroup();\n if (currentGroup) {\n const isCurrentInCurrentGroup = this.current && currentGroup.items.some(i => i.element.keyId === this.current.element.keyId);\n allItems = currentGroup.items;\n if (!isCurrentInCurrentGroup) {\n current = undefined;\n }\n }\n if (current) {\n const list = allItems.map(item => {\n const distance = Math.sqrt(Math.pow(item.top - this.current.top, 2) + Math.pow(item.left - this.current.left, 2));\n const angle = 90 + Math.atan2(item.top - this.current.top, item.left - this.current.left) * 180 / Math.PI;\n return {\n item,\n distance,\n angle,\n };\n })\n .filter(item => {\n const angle = item.angle;\n const normalizedAngle = angle < 0 ? angle + 360 : angle;\n return normalizedAngle >= fromAngleDeg && normalizedAngle <= toAngleDeg && item.distance > 0;\n })\n .sort((a, b) => a.distance - b.distance);\n if (list.length > 0) {\n this.SetCurrentItem(list[0].item);\n }\n else {\n let index = allItems.findIndex(i => i.element.keyId === this.current.element.keyId);\n index = (index + 1) % allItems.length;\n this.SetCurrentItem(allItems[index]);\n }\n }\n else {\n this.SetCurrentItem(allItems[0]);\n }\n }\n static SetCurrentItem(item) {\n if (this.current?.element.active && this.current.element.classList.contains(this.current.element.active)) {\n this.current.element.classList.remove(this.current.element.active);\n }\n this.current?.element.blur();\n this.current = item;\n this.current?.element.focus();\n if (this.current?.element.active && !this.current.element.classList.contains(this.current.element.active)) {\n this.current.element.classList.add(this.current.element.active);\n }\n }\n static updateItems() {\n this.allItems.forEach(item => {\n const position = item.element.getBoundingClientRect();\n item.top = position.top + position.height / 2;\n item.left = position.left + position.width / 2;\n });\n }\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: KeyItemDirective, deps: [{ token: KeyItemGroupDirective, optional: true }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });\n static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"20.1.3\", type: KeyItemDirective, isStandalone: true, selector: \"[inputKeyItem]\", inputs: { active: \"active\", activate: \"activate\", deactivate: \"deactivate\", focus: \"focus\", blur: \"blur\", actionBindings: \"actionBindings\" }, host: { listeners: { \"mouseenter\": \"onHover()\", \"mouseleave\": \"onLeave()\" } }, ngImport: i0 });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: KeyItemDirective, decorators: [{\n type: Directive,\n args: [{\n selector: '[inputKeyItem]',\n standalone: true\n }]\n }], ctorParameters: () => [{ type: KeyItemGroupDirective, decorators: [{\n type: Optional\n }] }, { type: i0.ElementRef }], propDecorators: { active: [{\n type: Input\n }], activate: [{\n type: Input\n }], deactivate: [{\n type: Input\n }], focus: [{\n type: Input\n }], blur: [{\n type: Input\n }], actionBindings: [{\n type: Input\n }], onHover: [{\n type: HostListener,\n args: ['mouseenter']\n }], onLeave: [{\n type: HostListener,\n args: ['mouseleave']\n }] } });\n\nclass NavigationModule {\n static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: NavigationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });\n static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"20.1.3\", ngImport: i0, type: NavigationModule, imports: [CommonModule,\n ActionBindingDirective,\n KeyItemDirective,\n KeyItemGroupDirective], exports: [ActionBindingDirective,\n KeyItemDirective,\n KeyItemGroupDirective] });\n static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: NavigationModule, imports: [CommonModule] });\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"20.1.3\", ngImport: i0, type: NavigationModule, decorators: [{\n type: NgModule,\n args: [{\n declarations: [],\n imports: [\n CommonModule,\n ActionBindingDirective,\n KeyItemDirective,\n KeyItemGroupDirective,\n ],\n exports: [\n ActionBindingDirective,\n KeyItemDirective,\n KeyItemGroupDirective,\n ],\n }]\n }] });\n\n/*\n * Public API Surface of input\n */\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { ActionBindingDirective, InputAction, InputDevice, InputGamepad, InputKeyboard, InputModule, InputScheme, InputService, KeyItemDirective, KeyItemGroupDirective, NavigationModule };\n//# sourceMappingURL=webland-input.mjs.map\n","map":null,"preliminaryFileName":"webland-input.mjs","sourcemapFileName":"webland-input.mjs.map"},{"fileName":"webland-input.mjs.map","names":[],"needsCodeReference":false,"originalFileName":null,"originalFileNames":[],"source":"{\"version\":3,\"file\":\"webland-input.mjs\",\"sources\":[\"../../../packages/input/src/lib/modules/input/input-module.ts\",\"../../../packages/input/src/lib/modules/input/models/input-scheme.ts\",\"../../../packages/input/src/lib/modules/input/models/input-action.ts\",\"../../../packages/input/src/lib/modules/input/models/input-device.ts\",\"../../../packages/input/src/lib/modules/input/models/devices/input-keyboard.ts\",\"../../../packages/input/src/lib/modules/input/models/devices/input-gamepad.ts\",\"../../../packages/input/src/lib/modules/input/services/input.service.ts\",\"../../../packages/input/src/lib/modules/navigation/directives/action-binding.directive.ts\",\"../../../packages/input/src/lib/modules/navigation/directives/key-item-group.directive.ts\",\"../../../packages/input/src/lib/modules/navigation/directives/key-item.directive.ts\",\"../../../packages/input/src/lib/modules/navigation/navigation-module.ts\",\"../../../packages/input/src/public-api.ts\",\"../../../packages/input/src/webland-input.ts\"],\"sourcesContent\":[\"import { NgModule } from '@angular/core';\\nimport { CommonModule } from '@angular/common';\\n\\n@NgModule({\\n declarations: [],\\n imports: [\\n CommonModule,\\n ],\\n exports: [\\n ]\\n})\\nexport class InputModule { }\\n\",\"import { BehaviorSubject } from \\\"rxjs\\\";\\nimport { InputAction } from \\\"./input-action\\\";\\nimport { InputDevice } from \\\"./input-device\\\";\\n\\ninterface InputActionBind {\\n action: InputAction;\\n keys: (string | number)[];\\n}\\n\\nexport class InputScheme {\\n\\n private data: unknown;\\n private actions: InputActionBind[] = [];\\n private devices: InputDevice[] = [];\\n public deviceListChanged = new BehaviorSubject([]);\\n\\n constructor(\\n public readonly name: string,\\n ) {\\n this.devices = [];\\n }\\n\\n public clearKeyBindings() {\\n this.actions = [];\\n\\n }\\n\\n public clearDeviceAssignments() {\\n this.devices = [];\\n this.deviceListChanged.next(this.devices);\\n }\\n\\n public unassignDevice(device: InputDevice) {\\n this.devices.splice(this.devices.indexOf(device), 1);\\n this.deviceListChanged.next(this.devices);\\n }\\n\\n public getDevices() {\\n return this.devices;\\n }\\n\\n public getKeyForAction(action: string): (string | number)[] {\\n return this.actions.find(a => a.action.name === action)?.keys || [];\\n }\\n\\n public setData(data: unknown) {\\n this.data = data;\\n }\\n\\n public mapKey(action: InputAction, keys: (string | number)[]) {\\n this.actions.push({ action, keys });\\n }\\n\\n public setKeyState(key: string | number, value: number, angle: number = 0) {\\n const binds = this.actions.filter(a => a.keys.includes(key));\\n if (binds.length) {\\n binds.forEach(bind => bind.action.fire(value, this.data, angle));\\n }\\n }\\n\\n public assignDevice(device: InputDevice): void {\\n device.assignScheme(this);\\n this.devices.push(device);\\n this.deviceListChanged.next(this.devices);\\n }\\n}\\n\",\"import { InputScheme } from \\\"./input-scheme\\\";\\n\\nexport type ActionCallback = (value: number, data: unknown, angle?:number, timePressed?: number) => void;\\n\\nexport class InputAction {\\n\\n private currentValue: number = 0;\\n private downActions: ActionCallback[] = [];\\n private upActions: ActionCallback[] = [];\\n private changeActions: ActionCallback[] = [];\\n\\n constructor(\\n public readonly name: string,\\n ) {\\n\\n }\\n\\n public mapKeysToScheme(scheme: InputScheme, keys: (string | number)[]): this {\\n scheme.mapKey(this, keys);\\n return this;\\n }\\n\\n public fire(value: number, data: unknown = undefined, angle?: number, timePressed?: number) {\\n const isPressed = value > 0;\\n const wasPressed = this.currentValue > 0;\\n if (isPressed !== wasPressed) {\\n if (isPressed) {\\n this.downActions.forEach(action => action(value, data, angle, timePressed));\\n } else {\\n this.upActions.forEach(action => action(value, data, angle, timePressed));\\n }\\n } else {\\n this.changeActions.forEach(action => action(value, data, angle, timePressed));\\n }\\n\\n this.currentValue = value;\\n }\\n\\n public onDown(action: ActionCallback) {\\n this.downActions.push(action);\\n }\\n\\n public onUp(action: ActionCallback) {\\n this.upActions.push(action);\\n }\\n\\n public onChange(action: ActionCallback) {\\n this.changeActions.push(action);\\n }\\n}\\n\",\"import { EventEmitter } from \\\"@angular/core\\\";\\nimport { InputScheme } from \\\"./input-scheme\\\";\\nimport { InputAction } from \\\"./input-action\\\";\\n\\nexport interface InputKeyState {\\n key: string | number;\\n value: number;\\n angle?: number;\\n}\\n\\nexport abstract class InputDevice {\\n\\n protected scheme?: InputScheme;\\n protected keyStates: InputKeyState[] = [];\\n public keyStateChanged = new EventEmitter();\\n\\n constructor(\\n public readonly name: string,\\n public readonly type = 'unknown',\\n ) {\\n }\\n\\n public mapKey(action: InputAction, keys: (string | number)[]): this {\\n this.scheme?.mapKey(action, keys);\\n return this;\\n }\\n\\n public getScheme(): InputScheme | undefined {\\n return this.scheme;\\n }\\n\\n public hasScheme(): boolean {\\n return !!this.scheme;\\n }\\n\\n public setKey(key: string | number, value: number = 1, angle: number = 0): this {\\n let exists = this.keyStates.find(k => k.key === key);\\n if (!exists) {\\n exists = {\\n key,\\n value,\\n angle,\\n };\\n this.keyStates.push(exists);\\n } else {\\n exists.value = value;\\n exists.angle = angle;\\n }\\n\\n this.keyStateChanged.emit(exists);\\n this.scheme?.setKeyState(key, value, angle);\\n return this;\\n }\\n\\n public assignScheme(scheme: InputScheme): this {\\n this.scheme = scheme;\\n return this;\\n }\\n}\\n\",\"import { InputDevice } from \\\"../input-device\\\";\\n\\nexport class InputKeyboard extends InputDevice {\\n\\n static listenerInited = false;\\n\\n constructor(\\n name: string,\\n ) {\\n super(name, 'keyboard');\\n this.attachEvents();\\n }\\n\\n private attachEvents() {\\n if (InputKeyboard.listenerInited) {\\n return;\\n }\\n\\n window.addEventListener('keydown', e => this.catchKey(e, 1));\\n window.addEventListener('keyup', e => this.catchKey(e, 0));\\n InputKeyboard.listenerInited = true;\\n }\\n\\n private catchKey(event: KeyboardEvent, value: number = 1, angle: number = 0): boolean {\\n const key = event.key;\\n super.setKey(key, value, angle);\\n event.preventDefault();\\n return false;\\n }\\n}\\n\",\"import { EventEmitter } from \\\"@angular/core\\\";\\nimport { InputDevice } from \\\"../input-device\\\";\\n\\ninterface GamepadButtonState {\\n value: number;\\n angle?: number;\\n id: number;\\n}\\n\\nexport class InputGamepad extends InputDevice {\\n\\n static listenerInited = false;\\n public static DeviceConnected = new EventEmitter();\\n public static DeviceDisconnected = new EventEmitter();\\n public static DeviceListChanged = new EventEmitter();\\n private static gamepads: InputGamepad[] = [];\\n private stateUpdateAgent?: number;\\n private buttonState: GamepadButtonState[] = [];\\n public axesState: GamepadButtonState[] = [];\\n\\n constructor(\\n private gamepad: Gamepad\\n ) {\\n super(InputGamepad.GetName(gamepad), 'gamepad');\\n }\\n\\n public static GetName(gamepad: Gamepad) {\\n return `${gamepad.id} #${gamepad.index}`;\\n }\\n\\n public getMapping() {\\n return this.gamepad.mapping;\\n }\\n\\n private static attachEvents() {\\n if (InputGamepad.listenerInited) {\\n return;\\n }\\n\\n window.addEventListener('gamepadconnected', e => this.updateGamepadStates(e));\\n window.addEventListener('gamepaddisconnected', e => this.updateGamepadStates(e));\\n\\n InputGamepad.listenerInited = true;\\n }\\n\\n public connect() {\\n this.gamepad.buttons.forEach((button, index) => {\\n this.buttonState.push({\\n value: button.value,\\n angle: 0,\\n id: index,\\n });\\n });\\n\\n let axisIndex = 0;\\n\\n for (let i = 0; i < this.gamepad.axes.length; i+=2) {\\n const axis = {\\n value: 0,\\n angle: 0,\\n id: axisIndex++,\\n };\\n this.axesState.push(axis);\\n }\\n\\n this.stateUpdateAgent = setInterval(() => {\\n this.gamepad.buttons.forEach((button, index) => {\\n const state = this.buttonState.find(s => s.id === index);\\n if (!state) {\\n return;\\n }\\n const wasPressed = state.value > 0;\\n const isPressed = button.value > 0;\\n state.value = button.value;\\n if (isPressed !== wasPressed) {\\n this.setKey(`gamepad.button.${index}`, button.value);\\n }\\n });\\n\\n axisIndex = 0;\\n for (let i = 0; i < this.gamepad.axes.length; i+=2) {\\n const state = this.axesState.find(s => s.id === axisIndex);\\n if (!state) {\\n return;\\n }\\n\\n const left = Math.abs(Math.max(0, this.gamepad.axes[i]));\\n const right = Math.abs(0 - Math.min(0, this.gamepad.axes[i]));\\n const up = Math.abs(Math.max(0, this.gamepad.axes[i + 1]));\\n const down = Math.abs(0 - Math.min(0, this.gamepad.axes[i + 1]));\\n\\n const x = right - left;\\n const y = up - down;\\n\\n const value = Math.sqrt(x * x + y * y);\\n const angle = Math.atan2(x, y);\\n\\n if (value !== state.value || angle !== state.angle) {\\n this.setKey(`gamepad.axis.${state.id}`, value, angle);\\n }\\n\\n state.value = value;\\n state.angle = angle;\\n axisIndex++;\\n }\\n }, 50) as unknown as number;\\n }\\n\\n public disconnect() {\\n this.scheme?.unassignDevice(this);\\n this.scheme = undefined;\\n clearInterval(this.stateUpdateAgent);\\n }\\n\\n private static updateGamepadStates(event: GamepadEvent) {\\n\\n console.log({event});\\n\\n switch (event.type) {\\n case 'gamepadconnected':\\n const newGamepad = new InputGamepad(event.gamepad);\\n this.DeviceConnected.emit(newGamepad);\\n this.gamepads.push(newGamepad);\\n newGamepad.connect();\\n this.DeviceListChanged.emit(this.gamepads);\\n break;\\n\\n case 'gamepaddisconnected':\\n const gamepad = this.gamepads.find(g => g.name === event.gamepad.id);\\n if (gamepad) {\\n gamepad.disconnect();\\n this.DeviceDisconnected.emit(gamepad);\\n this.gamepads.splice(this.gamepads.indexOf(gamepad), 1);\\n this.DeviceListChanged.emit(this.gamepads);\\n }\\n break;\\n }\\n }\\n\\n public static Init() {\\n this.attachEvents();\\n }\\n}\\n\",\"import { Injectable } from \\\"@angular/core\\\";\\nimport { InputScheme } from \\\"../models/input-scheme\\\";\\nimport { InputAction } from \\\"../models/input-action\\\";\\nimport { InputDevice } from \\\"../models/input-device\\\";\\nimport { InputKeyboard } from \\\"../models/devices/input-keyboard\\\";\\nimport { InputGamepad } from \\\"../models/devices/input-gamepad\\\";\\nimport { BehaviorSubject } from \\\"rxjs\\\";\\n\\n@Injectable({\\n providedIn: 'root'\\n})\\nexport class InputService {\\n\\n public actions: InputAction[] = [];\\n public schemes: InputScheme[] = [];\\n public devices: InputDevice[] = [];\\n\\n public deviceListChanged = new BehaviorSubject([]);\\n\\n constructor() {\\n this.defineKeyboard();\\n this.defineGamepad();\\n }\\n\\n private defineKeyboard() {\\n const keyboard = new InputKeyboard('Keyboard');\\n this.devices.push(keyboard);\\n this.deviceListChanged.next(this.devices);\\n }\\n\\n private defineGamepad() {\\n InputGamepad.DeviceConnected.subscribe(gamepad => {\\n this.devices.push(gamepad);\\n this.deviceListChanged.next(this.devices);\\n });\\n InputGamepad.DeviceDisconnected.subscribe(gamepad => {\\n this.devices = this.devices.filter(d => d.name !== gamepad.name);\\n this.deviceListChanged.next(this.devices);\\n });\\n InputGamepad.Init();\\n }\\n\\n public defineAction(name: string): InputAction {\\n const action = new InputAction(name);\\n this.actions.push(action);\\n return action;\\n }\\n\\n public defineScheme(name: string): InputScheme {\\n const scheme = new InputScheme(name);\\n this.schemes.push(scheme);\\n return scheme;\\n }\\n\\n public getDevices(): InputDevice[] {\\n return this.devices;\\n }\\n}\\n\\n\",\"import { Directive, ElementRef, Input } from '@angular/core';\\n\\n@Directive({\\n selector: '[inputActionBinding]',\\n standalone: true\\n})\\nexport class ActionBindingDirective {\\n\\n @Input() inputActionBinding: string = '';\\n\\n private element: HTMLElement;\\n\\n constructor(\\n elementRef: ElementRef,\\n ) {\\n this.element = elementRef.nativeElement as HTMLElement;\\n }\\n\\n ngOnInit(): void {\\n this.element.setAttribute('action', this.inputActionBinding);\\n }\\n\\n}\\n\",\"import { Directive } from '@angular/core';\\nimport { KeyItemDirective, KeyItemEntry } from './key-item.directive';\\n\\n@Directive({\\n selector: '[inputKeyItemGroup]',\\n standalone: true\\n})\\nexport class KeyItemGroupDirective {\\n\\n static groups: KeyItemGroupDirective[] = [];\\n public items: KeyItemEntry[] = [];\\n\\n constructor() {\\n }\\n\\n ngOnInit() {\\n KeyItemDirective.SetCurrentItem();\\n KeyItemGroupDirective.groups.push(this);\\n }\\n\\n ngOnDestroy() {\\n const index = KeyItemGroupDirective.groups.findIndex(g => g === this);\\n if (index > -1) {\\n KeyItemGroupDirective.groups.splice(index, 1);\\n }\\n }\\n\\n}\\n\",\"import { Directive, ElementRef, HostListener, Input, OnDestroy, OnInit, Optional, Host } from '@angular/core';\\nimport { KeyItemGroupDirective } from './key-item-group.directive';\\n\\nexport interface ActionBindings {\\n [action: string]: () => undefined | boolean;\\n}\\n\\nexport interface KeyItemEntry {\\n element: HTMLKeyItemEntryElement;\\n top: number;\\n left: number;\\n}\\n\\ninterface HTMLKeyItemEntryElement extends HTMLElement {\\n keyId: number;\\n active: string;\\n actionBindings: ActionBindings;\\n activate: () => void;\\n deactivate: () => void;\\n focus: () => void;\\n blur: () => void;\\n}\\n\\n@Directive({\\n selector: '[inputKeyItem]',\\n standalone: true\\n})\\nexport class KeyItemDirective implements OnInit, OnDestroy {\\n\\n @Input() active = 'active';\\n @Input() activate: () => any = () => {};\\n @Input() deactivate: () => any = () => {};\\n @Input() focus: () => any = () => {};\\n @Input() blur: () => any = () => {};\\n @Input() actionBindings: ActionBindings = {};\\n private static allItems: KeyItemEntry[] = [];\\n private static current?: KeyItemEntry;\\n private element: HTMLKeyItemEntryElement;\\n private static NextId = 0;\\n private id = KeyItemDirective.NextId++;\\n\\n constructor(\\n @Optional() private group: KeyItemGroupDirective,\\n elementRef: ElementRef,\\n ) {\\n this.element = elementRef.nativeElement as HTMLKeyItemEntryElement;\\n }\\n\\n public static FireAction(action: string): boolean {\\n const item = KeyItemDirective.current;\\n if (item) {\\n return item.element.actionBindings?.[action]?.() ?? true;\\n }\\n\\n return true;\\n }\\n\\n ngOnInit() {\\n this.element.active = this.active;\\n this.element.activate = this.activate;\\n this.element.deactivate = this.deactivate;\\n this.element.keyId = this.id;\\n this.element.actionBindings = this.actionBindings;\\n this.element.focus = this.focus;\\n this.element.blur = this.blur;\\n const position = this.element.getBoundingClientRect();\\n const item = {\\n element: this.element,\\n top: position.top + position.height / 2,\\n left: position.left + position.width / 2,\\n };\\n KeyItemDirective.allItems.push(item);\\n this.group?.items.push(item);\\n if (this.group) {\\n this.group.items = this.group.items.sort((a, b) => {\\n const tabIndexA = a.element.tabIndex;\\n const tabIndexB = b.element.tabIndex;\\n return tabIndexA - tabIndexB;\\n });\\n }\\n }\\n\\n ngOnDestroy() {\\n const index = KeyItemDirective.allItems.findIndex(item => item.element.keyId === this.id);\\n if (index > -1) {\\n KeyItemDirective.allItems.splice(index, 1);\\n }\\n\\n if (this.group) {\\n const index = this.group.items.findIndex(item => item.element.keyId === this.id);\\n if (index > -1) {\\n this.group.items.splice(index, 1);\\n }\\n }\\n }\\n\\n @HostListener('mouseenter')\\n onHover() {\\n if (this.active && !this.element.classList.contains(this.active)) {\\n this.element.classList.add(this.active);\\n }\\n\\n this.focus();\\n\\n const item = KeyItemDirective.allItems.find(item => item.element.keyId === this.id);\\n KeyItemDirective.SetCurrentItem(item);\\n }\\n\\n @HostListener('mouseleave')\\n onLeave() {\\n if (this.active && this.element.classList.contains(this.active)) {\\n this.element.classList.remove(this.active);\\n }\\n\\n this.blur();\\n }\\n\\n static ActivateCurrentItem() {\\n this.current?.element.activate.bind(this.current?.element)();\\n }\\n\\n static getCurrentGroup() {\\n if (KeyItemGroupDirective.groups.length === 0) {\\n return null;\\n }\\n return KeyItemGroupDirective.groups[KeyItemGroupDirective.groups.length - 1];\\n }\\n\\n static SelectNexItem(fromAngleDeg: number, toAngleDeg: number) {\\n this.updateItems();\\n let current = this.current;\\n let allItems = this.allItems;\\n const currentGroup = this.getCurrentGroup();\\n if (currentGroup) {\\n const isCurrentInCurrentGroup = this.current && currentGroup.items.some(i => i.element.keyId === this.current!.element.keyId);\\n allItems = currentGroup.items;\\n if (!isCurrentInCurrentGroup) {\\n current = undefined;\\n }\\n }\\n if (current) {\\n const list = allItems.map(item => {\\n const distance = Math.sqrt(Math.pow(item.top - this.current!.top, 2) + Math.pow(item.left - this.current!.left, 2));\\n const angle = 90 + Math.atan2(item.top - this.current!.top, item.left - this.current!.left) * 180 / Math.PI;\\n return {\\n item,\\n distance,\\n angle,\\n };\\n })\\n .filter(item => {\\n const angle = item.angle;\\n const normalizedAngle = angle < 0 ? angle + 360 : angle;\\n return normalizedAngle >= fromAngleDeg && normalizedAngle <= toAngleDeg && item.distance > 0;\\n })\\n .sort((a, b) => a.distance - b.distance);\\n\\n if (list.length > 0) {\\n this.SetCurrentItem(list[0].item);\\n } else {\\n let index = allItems.findIndex(i => i.element.keyId === this.current!.element.keyId);\\n index = (index + 1) % allItems.length;\\n this.SetCurrentItem(allItems[index]);\\n }\\n } else {\\n this.SetCurrentItem(allItems[0]);\\n }\\n }\\n\\n static SetCurrentItem(item?: KeyItemEntry) {\\n if (this.current?.element.active && this.current.element.classList.contains(this.current.element.active)) {\\n this.current.element.classList.remove(this.current.element.active);\\n }\\n this.current?.element.blur();\\n this.current = item;\\n this.current?.element.focus();\\n if (this.current?.element.active && !this.current.element.classList.contains(this.current.element.active)) {\\n this.current.element.classList.add(this.current.element.active);\\n }\\n }\\n\\n static updateItems() {\\n this.allItems.forEach(item => {\\n const position = item.element.getBoundingClientRect();\\n item.top = position.top + position.height / 2;\\n item.left = position.left + position.width / 2;\\n });\\n }\\n}\\n\",\"import { NgModule } from '@angular/core';\\nimport { CommonModule } from '@angular/common';\\nimport { ActionBindingDirective } from './directives/action-binding.directive';\\nimport { KeyItemDirective } from './directives/key-item.directive';\\nimport { KeyItemGroupDirective } from './directives/key-item-group.directive';\\n\\n@NgModule({\\n declarations: [],\\n imports: [\\n CommonModule,\\n ActionBindingDirective,\\n KeyItemDirective,\\n KeyItemGroupDirective,\\n ],\\n exports: [\\n ActionBindingDirective,\\n KeyItemDirective,\\n KeyItemGroupDirective,\\n ],\\n})\\nexport class NavigationModule { }\\n\",\"/*\\n * Public API Surface of input\\n */\\n\\nexport * from './lib/modules/input/input-module';\\n\\nexport * from './lib/modules/input/services/input.service';\\nexport * from './lib/modules/input/models/input-action';\\nexport * from './lib/modules/input/models/input-device';\\nexport * from './lib/modules/input/models/input-scheme';\\nexport * from './lib/modules/input/models/devices/input-gamepad';\\nexport * from './lib/modules/input/models/devices/input-keyboard';\\n\\n\\n\\nexport * from './lib/modules/navigation/navigation-module';\\n\\nexport * from './lib/modules/navigation/directives/action-binding.directive';\\nexport * from './lib/modules/navigation/directives/key-item-group.directive';\\nexport * from './lib/modules/navigation/directives/key-item.directive';\\n\\n\",\"/**\\n * Generated bundle index. Do not edit.\\n */\\n\\nexport * from './public-api';\\n\"],\"names\":[\"i1.KeyItemGroupDirective\"],\"mappings\":\";;;;;MAWa,WAAW,CAAA;uGAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YALpB,YAAY,CAAA,EAAA,CAAA;AAKH,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,YALpB,YAAY,CAAA,EAAA,CAAA;;2FAKH,WAAW,EAAA,UAAA,EAAA,CAAA;kBARvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE;AAEV,iBAAA;;;MCDY,WAAW,CAAA;AAQA,IAAA,IAAA;AANZ,IAAA,IAAI;IACJ,OAAO,GAAsB,EAAE;IAC/B,OAAO,GAAkB,EAAE;AAC5B,IAAA,iBAAiB,GAAG,IAAI,eAAe,CAAgB,EAAE,CAAC;AAEjE,IAAA,WAAA,CACoB,IAAY,EAAA;QAAZ,IAAA,CAAA,IAAI,GAAJ,IAAI;AAEpB,QAAA,IAAI,CAAC,OAAO,GAAG,EAAE;;IAGd,gBAAgB,GAAA;AACnB,QAAA,IAAI,CAAC,OAAO,GAAG,EAAE;;IAId,sBAAsB,GAAA;AACzB,QAA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