bfg-common 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +21 -0
- package/.idea/inspectionProfiles/Project_Default.xml +49 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/uikit.iml +12 -0
- package/.idea/vcs.xml +6 -0
- package/.prettierrc +5 -0
- package/PROJECT_STRUCTURE.md +42 -0
- package/README.md +42 -0
- package/assets/img/bg1.jpeg +0 -0
- package/assets/img/bg2.jpeg +0 -0
- package/assets/img/icons/icon-cps-dark-mode.png +0 -0
- package/assets/img/icons/icon-cps.png +0 -0
- package/assets/img/icons/icon-datastore.svg +1 -0
- package/assets/img/icons/icon-hcs.svg +4 -0
- package/assets/img/icons/icon-life-m-dark.svg +4 -0
- package/assets/img/icons/icon-life-m-light.svg +4 -0
- package/assets/img/icons/icon-ro-dark.svg +2 -0
- package/assets/img/icons/icon-ro-light.svg +3 -0
- package/assets/img/icons/icons-sprite-dark-1.svg +1 -0
- package/assets/img/icons/icons-sprite-dark-2.svg +1 -0
- package/assets/img/icons/icons-sprite-dark-3.svg +1 -0
- package/assets/img/icons/icons-sprite-dark-4.svg +1 -0
- package/assets/img/icons/icons-sprite-dark-5.svg +1 -0
- package/assets/img/icons/icons-sprite-light-1.svg +1 -0
- package/assets/img/icons/icons-sprite-light-2.svg +1 -0
- package/assets/img/icons/icons-sprite-light-3.svg +1 -0
- package/assets/img/icons/icons-sprite-light-4.svg +1 -0
- package/assets/img/icons/icons-sprite-light-5.svg +1 -0
- package/assets/img/icons/info.svg +8 -0
- package/assets/img/icons/sprite.png +0 -0
- package/assets/img/icons/summary-cluster.svg +1 -0
- package/assets/img/icons/vc.svg +53 -0
- package/assets/img/icons/vm-ui-icons.png +0 -0
- package/assets/img/logo copy.svg +50 -0
- package/assets/img/logo.png +0 -0
- package/assets/img/logo.svg +51 -0
- package/assets/localization/local_be.json +1851 -0
- package/assets/localization/local_en.json +1851 -0
- package/assets/localization/local_hy.json +1851 -0
- package/assets/localization/local_kk.json +1851 -0
- package/assets/localization/local_ru.json +1851 -0
- package/assets/localization/local_zh.json +1851 -0
- package/assets/scss/clarity/clr-ui.min.css +8 -0
- package/assets/scss/common/animations.scss +28 -0
- package/assets/scss/common/global.scss +178 -0
- package/assets/scss/common/icons/icons-1.scss +188 -0
- package/assets/scss/common/icons/icons-2.scss +208 -0
- package/assets/scss/common/icons/icons-3.scss +176 -0
- package/assets/scss/common/icons/icons-4.scss +179 -0
- package/assets/scss/common/icons/icons-5.scss +53 -0
- package/assets/scss/common/icons/icons.scss +14 -0
- package/assets/scss/common/mixins.scss +39 -0
- package/assets/scss/common/normalize.scss +320 -0
- package/assets/scss/common/theme.scss +230 -0
- package/assets/scss/common/utilities.scss +18 -0
- package/assets/scss/common/variables.scss +43 -0
- package/assets/scss/main.scss +13 -0
- package/components/atoms/DiagramIcon.vue +287 -0
- package/components/atoms/TheIcon.vue +1687 -0
- package/components/atoms/TheIcon2.vue +318 -0
- package/components/atoms/alert/Alert.spec.ts +38 -0
- package/components/atoms/alert/Alert.vue +84 -0
- package/components/atoms/alert/Notification.spec.ts +34 -0
- package/components/atoms/alert/Notification.vue +167 -0
- package/components/atoms/alert/models/enums.ts +12 -0
- package/components/atoms/alert/models/interfaces.ts +27 -0
- package/components/atoms/alert/models/types.ts +7 -0
- package/components/atoms/autocomplete/Autocomplete.vue +236 -0
- package/components/atoms/collapse/CollapseNav.vue +153 -0
- package/components/atoms/collapse/CollapseNavItem.vue +190 -0
- package/components/atoms/collapse/models/interfaces.ts +9 -0
- package/components/atoms/combobox/Combobox.vue +131 -0
- package/components/atoms/datepicker/Datepicker.vue +612 -0
- package/components/atoms/datepicker/config/allShortMonths.ts +103 -0
- package/components/atoms/datepicker/config/datapicker.ts +43 -0
- package/components/atoms/datepicker/models/interfaces.ts +8 -0
- package/components/atoms/dropdown/Portlet.spec.ts +26 -0
- package/components/atoms/dropdown/Portlet.vue +111 -0
- package/components/atoms/dropdown/dropdown/Dropdown.vue +148 -0
- package/components/atoms/dropdown/dropdown/models/interfaces.ts +8 -0
- package/components/atoms/dropdown/tree/Tree.vue +134 -0
- package/components/atoms/dropdown/tree/models/interfaces.ts +9 -0
- package/components/atoms/input/Search.vue +16 -0
- package/components/atoms/list/SelectList.vue +62 -0
- package/components/atoms/list/SimpleList.vue +29 -0
- package/components/atoms/list/dragDropList/DragDropList.vue +139 -0
- package/components/atoms/list/dragDropList/config/events.ts +4 -0
- package/components/atoms/loader/BarLoader.vue +21 -0
- package/components/atoms/loader/Loader.vue +26 -0
- package/components/atoms/loader/PreLoader.vue +34 -0
- package/components/atoms/loader/Preloader.spec.ts +24 -0
- package/components/atoms/modal/Modal.spec.ts +55 -0
- package/components/atoms/modal/Modal.vue +241 -0
- package/components/atoms/modal/bySteps/BySteps.spec.ts +66 -0
- package/components/atoms/modal/bySteps/BySteps.vue +234 -0
- package/components/atoms/modal/byStepsSecond/ByStepsSecond.vue +174 -0
- package/components/atoms/models/interfaces.ts +11 -0
- package/components/atoms/nav/NavBar.spec.ts +34 -0
- package/components/atoms/nav/NavBar.vue +116 -0
- package/components/atoms/nav/VerticalNavBar.vue +89 -0
- package/components/atoms/nav/models/interfaces.ts +5 -0
- package/components/atoms/notificationBar/NotificationBar.vue +175 -0
- package/components/atoms/notificationBar/models/enums.ts +27 -0
- package/components/atoms/notificationBar/models/interfaces.ts +6 -0
- package/components/atoms/notificationBar/models/types.ts +1 -0
- package/components/atoms/perPage/PerPage.vue +52 -0
- package/components/atoms/popover/Popover.vue +48 -0
- package/components/atoms/popup/SimplePopup.vue +90 -0
- package/components/atoms/select/TheSelect.vue +175 -0
- package/components/atoms/select/models/interfaces.ts +4 -0
- package/components/atoms/stack/StackBlock.vue +171 -0
- package/components/atoms/stack/StackContent.vue +60 -0
- package/components/atoms/step/VerticalStep.spec.ts +68 -0
- package/components/atoms/step/VerticalStep.vue +104 -0
- package/components/atoms/step/models/verticalStepItem.ts +7 -0
- package/components/atoms/switch/Switch.vue +107 -0
- package/components/atoms/table/compact/Compact.vue +526 -0
- package/components/atoms/table/compact/models/interfaces.ts +11 -0
- package/components/atoms/table/dataGrid/DataGrid.spec.ts +61 -0
- package/components/atoms/table/dataGrid/DataGrid.vue +1283 -0
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +204 -0
- package/components/atoms/table/dataGrid/DataGridPage.vue +189 -0
- package/components/atoms/table/dataGrid/DataGridPagination.vue +83 -0
- package/components/atoms/table/dataGrid/config/itemsPerPage.ts +20 -0
- package/components/atoms/table/dataGrid/models/interfaces.ts +24 -0
- package/components/atoms/table/dataGrid/models/types.ts +5 -0
- package/components/atoms/table/dataGrid/utils/constructDataTable.ts +33 -0
- package/components/atoms/table/info/Info.vue +60 -0
- package/components/atoms/table/info/models/interfaces.ts +6 -0
- package/components/atoms/table/simpleEvent/SimpleEvent.vue +98 -0
- package/components/atoms/table/simpleEvent/models/interfaces.ts +9 -0
- package/components/atoms/table/simpleInfo/SimpleInfo.vue +68 -0
- package/components/atoms/table/simpleInfo/models/interfaces.ts +4 -0
- package/components/atoms/table/simpleTable/SimpleTable.vue +291 -0
- package/components/atoms/table/simpleTable/models/interfaces.ts +10 -0
- package/components/atoms/tabs/Tabs.vue +189 -0
- package/components/atoms/tabs/VerticalTabs.vue +81 -0
- package/components/atoms/tabs/models/interfaces.ts +4 -0
- package/components/atoms/tabs/models/types.ts +1 -0
- package/components/atoms/tooltip/Models/interfaces.ts +4 -0
- package/components/atoms/tooltip/Signpost.vue +224 -0
- package/components/atoms/tooltip/Text.vue +39 -0
- package/components/atoms/tooltip/Tooltip.vue +57 -0
- package/components/atoms/tooltip/TooltipError.vue +113 -0
- package/components/common/accordion/Accordion.vue +176 -0
- package/components/common/accordion/Recursion.vue +195 -0
- package/components/common/accordion/models/interfaces.ts +14 -0
- package/components/common/adapterManager/AdapterManager.vue +715 -0
- package/components/common/adapterManager/AddAdapterModal.vue +464 -0
- package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -0
- package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -0
- package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -0
- package/components/common/adapterManager/config/index.ts +19 -0
- package/components/common/adapterManager/ui/NoSelectedAdapter.vue +39 -0
- package/components/common/adapterManager/ui/SecondTitle.vue +37 -0
- package/components/common/adapterManager/ui/actions/ActionsBar.vue +93 -0
- package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +28 -0
- package/components/common/adapterManager/ui/actions/MoveDownAdapterButton.vue +33 -0
- package/components/common/adapterManager/ui/actions/MoveUpAdapterButton.vue +33 -0
- package/components/common/adapterManager/ui/actions/RemoveAdapterButton.vue +34 -0
- package/components/common/adapterManager/ui/actions/VerticalSeparator.vue +11 -0
- package/components/common/adapterManager/ui/table/Adapters.vue +91 -0
- package/components/common/adapterManager/ui/table/Header.vue +89 -0
- package/components/common/adapterManager/ui/table/Table.vue +167 -0
- package/components/common/addNetworking/AddNetworking.vue +982 -0
- package/components/common/addNetworking/Wizard.vue +286 -0
- package/components/common/addNetworking/config/addNetworkingSteps.ts +404 -0
- package/components/common/addNetworking/config/index.ts +46 -0
- package/components/common/addNetworking/config/initialData.ts +78 -0
- package/components/common/addNetworking/config/portPropertiesStep.ts +19 -0
- package/components/common/addNetworking/config/selectSwitch.ts +19 -0
- package/components/common/addNetworking/config/sendData.ts +87 -0
- package/components/common/addNetworking/config/temporaryData.ts +8 -0
- package/components/common/addNetworking/config/validation.ts +23 -0
- package/components/common/addNetworking/mappers/mappers.ts +166 -0
- package/components/common/addNetworking/modals/SelectNetwork.vue +149 -0
- package/components/common/addNetworking/modals/SelectStandardSwitch.vue +125 -0
- package/components/common/addNetworking/modals/SelectSwitch.vue +114 -0
- package/components/common/addNetworking/models/enums.ts +7 -0
- package/components/common/addNetworking/models/interfaces.ts +207 -0
- package/components/common/addNetworking/models/types.ts +5 -0
- package/components/common/addNetworking/steps/ConnectionSettings.vue +269 -0
- package/components/common/addNetworking/steps/CreateStandardSwitch.vue +91 -0
- package/components/common/addNetworking/steps/Header.vue +53 -0
- package/components/common/addNetworking/steps/IpFourSettings.vue +361 -0
- package/components/common/addNetworking/steps/PhysicalAdapter.vue +24 -0
- package/components/common/addNetworking/steps/PortProperties.vue +481 -0
- package/components/common/addNetworking/steps/ReadyComplete.vue +29 -0
- package/components/common/addNetworking/steps/SelectConnectionType.vue +106 -0
- package/components/common/addNetworking/steps/SelectedTargetDevice.vue +563 -0
- package/components/common/addNetworking/utils/index.ts +212 -0
- package/components/common/browse/Browse.vue +182 -0
- package/components/common/browse/blocks/Container.vue +102 -0
- package/components/common/browse/blocks/Title.vue +66 -0
- package/components/common/browse/blocks/contents/Files.vue +68 -0
- package/components/common/browse/blocks/info/Date.vue +21 -0
- package/components/common/browse/blocks/info/Size.vue +17 -0
- package/components/common/browse/blocks/info/Text.vue +17 -0
- package/components/common/browse/blocks/models/types.ts +1 -0
- package/components/common/browse/models/interfaces.ts +5 -0
- package/components/common/context/Context.spec.ts +20 -0
- package/components/common/context/Context.vue +97 -0
- package/components/common/context/ContextRecursion.spec.ts +55 -0
- package/components/common/context/ContextRecursion.vue +251 -0
- package/components/common/context/models/interfaces.ts +26 -0
- package/components/common/details/DetailsItem.vue +106 -0
- package/components/common/details/DetailsList.vue +23 -0
- package/components/common/details/model/interfaces.ts +9 -0
- package/components/common/diagramMain/Diagram.vue +186 -0
- package/components/common/diagramMain/DiagramMain.vue +979 -0
- package/components/common/diagramMain/Header.vue +160 -0
- package/components/common/diagramMain/Highlights.vue +102 -0
- package/components/common/diagramMain/adapter/Adapter.vue +105 -0
- package/components/common/diagramMain/adapter/AdapterItem.vue +227 -0
- package/components/common/diagramMain/adapter/AdapterItems.vue +57 -0
- package/components/common/diagramMain/adapter/Block.vue +41 -0
- package/components/common/diagramMain/adapter/Contents.vue +96 -0
- package/components/common/diagramMain/adapter/Lines.vue +52 -0
- package/components/common/diagramMain/adapter/SecondBlock.vue +42 -0
- package/components/common/diagramMain/config/index.ts +51 -0
- package/components/common/diagramMain/config/initial.ts +38 -0
- package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +236 -0
- package/components/common/diagramMain/modals/MigrateVmkernelAdapter.vue +535 -0
- package/components/common/diagramMain/modals/config/adapterModal.ts +110 -0
- package/components/common/diagramMain/modals/config/diagramConfig.ts +17 -0
- package/components/common/diagramMain/modals/config/index.ts +57 -0
- package/components/common/diagramMain/modals/config/initial.ts +195 -0
- package/components/common/diagramMain/modals/config/migrateVmkernelAdapterSteps.ts +81 -0
- package/components/common/diagramMain/modals/config/networkModal.ts +337 -0
- package/components/common/diagramMain/modals/config/portModal.ts +201 -0
- package/components/common/diagramMain/modals/config/switchModal.ts +172 -0
- package/components/common/diagramMain/modals/config/vCenterModal.ts +30 -0
- package/components/common/diagramMain/modals/config/validation.ts +3 -0
- package/components/common/diagramMain/modals/config/vmKernelAdapter.ts +90 -0
- package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +41 -0
- package/components/common/diagramMain/modals/editSettings/EditSettings.vue +490 -0
- package/components/common/diagramMain/modals/editSettings/EditSettingsModal.vue +714 -0
- package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +211 -0
- package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +178 -0
- package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +161 -0
- package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +165 -0
- package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +392 -0
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -0
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -0
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -0
- package/components/common/diagramMain/modals/steps/ConnectionSettings.vue +206 -0
- package/components/common/diagramMain/modals/steps/SelectVmkernelAdapter.vue +221 -0
- package/components/common/diagramMain/modals/steps/VmkernelAdapterReadyComplete.vue +50 -0
- package/components/common/diagramMain/modals/utils/index.ts +9 -0
- package/components/common/diagramMain/modals/viewSettings/Info.vue +94 -0
- package/components/common/diagramMain/modals/viewSettings/ViewSettings.vue +171 -0
- package/components/common/diagramMain/modals/viewSettings/ViewSettingsModal.vue +93 -0
- package/components/common/diagramMain/models/enums.ts +27 -0
- package/components/common/diagramMain/models/interfaces.ts +586 -0
- package/components/common/diagramMain/models/types.ts +9 -0
- package/components/common/diagramMain/network/Block.vue +55 -0
- package/components/common/diagramMain/network/Contents.vue +238 -0
- package/components/common/diagramMain/network/Lines.vue +65 -0
- package/components/common/diagramMain/network/Network.vue +117 -0
- package/components/common/diagramMain/network/NoNetwork.vue +47 -0
- package/components/common/diagramMain/network/SecondBlock.vue +51 -0
- package/components/common/diagramMain/port/Port.vue +301 -0
- package/components/common/diagramMain/port/Ports.vue +41 -0
- package/components/common/diagramMain/switch/Switch.vue +71 -0
- package/components/common/diagramMain/switch/SwitchSelected.vue +29 -0
- package/components/common/diagramMain/utils/utils.ts +218 -0
- package/components/common/feedback/Buttons.vue +232 -0
- package/components/common/feedback/Feedback.vue +236 -0
- package/components/common/feedback/Message.vue +468 -0
- package/components/common/feedback/VisitPortal.vue +54 -0
- package/components/common/feedback/config/drawingPanel.ts +31 -0
- package/components/common/feedback/config/feedbackTabs.ts +24 -0
- package/components/common/feedback/models/interfaces.ts +15 -0
- package/components/common/graph/Graph.vue +107 -0
- package/components/common/graph/utils/renderGraph.ts +389 -0
- package/components/common/headline/Headline.vue +32 -0
- package/components/common/mainNavigationPanel/MainNavigationPanel.vue +343 -0
- package/components/common/mainNavigationPanel/models/interfaces.ts +6 -0
- package/components/common/mainNavigationPanel/models/types.ts +1 -0
- package/components/common/modals/Rename.vue +165 -0
- package/components/common/modals/config/defaultForm.ts +18 -0
- package/components/common/modals/config/renameLabelWidth.ts +3 -0
- package/components/common/modals/models/interfaces.ts +5 -0
- package/components/common/monitor/advanced/Advanced.vue +149 -0
- package/components/common/monitor/advanced/GraphView.vue +200 -0
- package/components/common/monitor/advanced/models/interfaces.ts +6 -0
- package/components/common/monitor/advanced/models/types.ts +1 -0
- package/components/common/monitor/advanced/table/Table.vue +90 -0
- package/components/common/monitor/advanced/table/config/performanceDatatable.ts +116 -0
- package/components/common/monitor/advanced/table/models/interfaces.ts +12 -0
- package/components/common/monitor/advanced/table/models/types.ts +10 -0
- package/components/common/monitor/advanced/tools/Tools.vue +281 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +109 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/Notification.vue +33 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/Actions.vue +79 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/config/optionsActions.ts +13 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/saveOptionsModal/SaveOptionsModal.vue +53 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +47 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/Table.vue +104 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/config/tableConfig.ts +73 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/interfaces.ts +15 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/models/types.ts +7 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +18 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/Form.vue +388 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/form/config/dateForm.ts +59 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +107 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/config/objectTable.ts +54 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/models/interfaces.ts +4 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/models/types.ts +1 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/Metrics.vue +32 -0
- package/components/common/monitor/advanced/tools/chartOptionsModal/metrics/config/optionsMetrics.ts +104 -0
- package/components/common/monitor/advanced/tools/config/advancedToolbar.ts +73 -0
- package/components/common/monitor/advanced/tools/models/interfaces.ts +4 -0
- package/components/common/monitor/config/getValidDateByOption.ts +14 -0
- package/components/common/monitor/models/interfaces.ts +16 -0
- package/components/common/monitor/overview/Overview.vue +412 -0
- package/components/common/monitor/overview/filters/Filters.vue +210 -0
- package/components/common/monitor/overview/filters/config/filterOptions.ts +56 -0
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModal.vue +220 -0
- package/components/common/monitor/overview/filters/customIntervalModal/config/dateChecker.ts +35 -0
- package/components/common/monitor/overview/filters/models/interfaces.ts +6 -0
- package/components/common/monitor/overview/filters/models/types.ts +3 -0
- package/components/common/perPage/PerPage.vue +51 -0
- package/components/common/recursionTree/RecursionTree.vue +201 -0
- package/components/common/recursionTree/models/interfaces.ts +19 -0
- package/components/common/resource/models/interfaces.ts +9 -0
- package/components/common/resource/models/types.ts +1 -0
- package/components/common/resource/progressBlock/ProgressBlock.vue +105 -0
- package/components/common/resource/simple/Simple.vue +58 -0
- package/components/common/resource/simple/models/enums.ts +5 -0
- package/components/common/resource/utils.ts +33 -0
- package/components/common/select/button/ButtonDropdown.vue +100 -0
- package/components/common/select/button/models/interfaces.ts +6 -0
- package/components/common/select/radio/RadioGroup.vue +71 -0
- package/components/common/select/radio/models/interfaces.ts +10 -0
- package/components/common/spiceConsole/Drawer.vue +233 -0
- package/components/common/spiceConsole/SpiceConsole.vue +87 -0
- package/components/common/spiceConsole/keyboard/Keyboard.vue +402 -0
- package/components/common/spiceConsole/keyboard/config/keyboardRows.ts +891 -0
- package/components/common/spiceConsole/keyboard/models/interfaces.ts +17 -0
- package/components/common/spiceConsole/models/types.ts +1 -0
- package/components/common/split/horizontal/Horizontal.vue +306 -0
- package/components/common/split/horizontal/models/interfaces.ts +5 -0
- package/components/common/split/vertical/Vertical.vue +213 -0
- package/components/common/split/vertical/models/interfaces.ts +3 -0
- package/components/common/tools/Actions.vue +141 -0
- package/components/common/tools/models/interfaces.ts +6 -0
- package/components/common/vm/actions/add/Add.vue +654 -0
- package/components/common/vm/actions/add/FolderTreeView.vue +83 -0
- package/components/common/vm/actions/add/config/capabilities.ts +670 -0
- package/components/common/vm/actions/add/customizeHardware/CustomizeHardware.vue +236 -0
- package/components/common/vm/actions/add/customizeHardware/config/navItems.ts +19 -0
- package/components/common/vm/actions/add/customizeHardware/models/interfaces.ts +7 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/VirtualHardware.vue +611 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/browseView/BrowseView.vue +203 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/browseView/models/interfaces.ts +8 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/bus/Bus.vue +86 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/bus/config/options.ts +13 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +223 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/config/fileTypes.ts +9 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/config/options.ts +11 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +55 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cdDvdDrive/models/types.ts +1 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/config/binaryOptions.ts +12 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/config/dropdownItems.ts +52 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/CoresPerSocket.vue +97 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Cpu.vue +368 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/CpuHotPlug.vue +49 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/CpuModel.vue +220 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Hv.vue +93 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Iommu.vue +52 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/MaxCpu.vue +99 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Pc.vue +54 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/Sa.vue +102 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/config/cpuOptions.ts +19 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/shares/Shares.vue +151 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/shares/config/options.ts +28 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/cpu/tooltip/Tooltip.vue +58 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/Limit.vue +210 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/limit/config/options.ts +28 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/Memory.vue +278 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/MemoryHotPlug.vue +53 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/memory/config/memoryOptions.ts +23 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/models/interfaces.ts +125 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/models/types.ts +4 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/DiskFile.vue +24 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/Location.vue +171 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/MaximumSize.vue +27 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +447 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/cache/Cache.vue +80 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/cache/config/options.ts +7 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/limitIops/LimitIops.vue +147 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/limitIops/config/options.ts +28 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/mode/Mode.vue +87 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/mode/config/options.ts +18 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/provisioning/Provisioning.vue +87 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/provisioning/config/options.ts +15 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/sharing/Sharing.vue +85 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newHardDisk/sharing/config/options.ts +12 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/Location.vue +141 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +252 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/adapterType/AdapterType.vue +86 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/adapterType/config/options.ts +9 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +140 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newNetwork/macAddress/config/options.ts +11 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +157 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/config/options.ts +7 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIo.vue +44 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +49 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/config/options.ts +10 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/note/Note.vue +27 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGrid.vue +41 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelection.vue +56 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +65 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/newUsbController/config/options.ts +6 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/other/InputDevices.vue +21 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/other/Other.vue +27 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/reservation/Reservation.vue +228 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/reservation/config/options.ts +33 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/Graphics.vue +45 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/TotalVideoMemory.vue +120 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/VideoCard.vue +169 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/config/options.ts +11 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/model/Model.vue +57 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/model/config/options.ts +10 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +82 -0
- package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/numberDisplays/config/options.ts +14 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/Vmoptions.vue +141 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/BootOptions.vue +110 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/Menu.vue +45 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/Secure.vue +45 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +50 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/delay/config/config.ts +14 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +83 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/firmware/config/config.ts +11 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/order/Order.vue +195 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/order/models/interfaces.ts +8 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +114 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/models/interfaces.ts +34 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/CopyPaste.vue +45 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/FileTransfer.vue +49 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/FolderSharing.vue +50 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/PlaybackCompression.vue +49 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/PowerControl.vue +49 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +226 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/imgCompression/ImgCompression.vue +82 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/imgCompression/config/config.ts +14 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/jpegCompression/JpegCompression.vue +82 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/jpegCompression/config/config.ts +12 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +50 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/keymap/config/config.ts +6 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/mouseMode/MouseMode.vue +52 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/mouseMode/config/config.ts +11 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +134 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/password/models/interfaces.ts +5 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/password/utils.ts +12 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/sharePolicy/SharePolicy.vue +52 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/sharePolicy/config/config.ts +11 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +82 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/config/config.ts +12 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/type/Type.vue +82 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/type/config/config.ts +7 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +56 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/config/config.ts +14 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/zlibCompression/ZlibCompression.vue +82 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/zlibCompression/config/config.ts +12 -0
- package/components/common/vm/actions/add/customizeHardware/vmoptions/tools/Tools.vue +63 -0
- package/components/common/vm/actions/add/models/enums.ts +89 -0
- package/components/common/vm/actions/add/models/interfaces.ts +125 -0
- package/components/common/vm/actions/add/models/types.ts +63 -0
- package/components/common/vm/actions/add/readyToComplete/ReadyToComplete.vue +15 -0
- package/components/common/vm/actions/add/select/compatibility/Compatibility.vue +151 -0
- package/components/common/vm/actions/add/select/computeResource/ComputeResource.spec.ts +479 -0
- package/components/common/vm/actions/add/select/computeResource/ComputeResource.vue +158 -0
- package/components/common/vm/actions/add/select/computeResource/TreeView.vue +126 -0
- package/components/common/vm/actions/add/select/createType/CreateType.vue +61 -0
- package/components/common/vm/actions/add/select/createType/config/items.ts +26 -0
- package/components/common/vm/actions/add/select/models/interfaces.ts +32 -0
- package/components/common/vm/actions/add/select/models/types.ts +44 -0
- package/components/common/vm/actions/add/select/name/Name.vue +163 -0
- package/components/common/vm/actions/add/select/os/os.vue +221 -0
- package/components/common/vm/actions/add/select/storage/Storage.vue +176 -0
- package/components/common/vm/actions/add/select/storage/config/config.ts +148 -0
- package/components/common/vm/actions/add/select/storage/models/types.ts +15 -0
- package/components/common/vm/actions/add/utils.ts +118 -0
- package/components/common/vm/actions/editSettings/EditSettings.vue +312 -0
- package/components/common/vm/actions/editSettings/models/types.ts +23 -0
- package/components/common/vm/actions/editSettings/utils.ts +48 -0
- package/components/common/vm/actions/models/interfaces.ts +6 -0
- package/components/common/vm/actions/models/types.ts +11 -0
- package/components/common/vm/actions/utils.ts +221 -0
- package/components/common/wizards/datastore/add/Add.vue +382 -0
- package/components/common/wizards/datastore/add/config/stepItems.ts +160 -0
- package/components/common/wizards/datastore/add/local/Local.vue +67 -0
- package/components/common/wizards/datastore/add/local/createName/CreateName.vue +159 -0
- package/components/common/wizards/datastore/add/local/createName/config/defaultForm.ts +15 -0
- package/components/common/wizards/datastore/add/models/interfaces.ts +35 -0
- package/components/common/wizards/datastore/add/models/types.ts +14 -0
- package/components/common/wizards/datastore/add/nfs/Nfs.vue +91 -0
- package/components/common/wizards/datastore/add/nfs/accessibility/Accessibility.vue +95 -0
- package/components/common/wizards/datastore/add/nfs/accessibility/config/tabsPannel.ts +24 -0
- package/components/common/wizards/datastore/add/nfs/accessibility/models/interfaces.ts +9 -0
- package/components/common/wizards/datastore/add/nfs/accessibility/models/types.ts +5 -0
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/TablesView.vue +141 -0
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/config/compatibleTable.ts +54 -0
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/config/hostsTableItems.ts +75 -0
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/config/incompatibleTable.ts +68 -0
- package/components/common/wizards/datastore/add/nfs/accessibility/tablesView/config/tableKeys.ts +15 -0
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +373 -0
- package/components/common/wizards/datastore/add/nfs/configuration/config/defaultForm.ts +33 -0
- package/components/common/wizards/datastore/add/nfs/configuration/models/interfaces.ts +12 -0
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/DeletePopover.vue +97 -0
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -0
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/config/serversListConfig.ts +41 -0
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/config/tableKeys.ts +3 -0
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/models/interfaces.ts +11 -0
- package/components/common/wizards/datastore/add/nfs/configuration/serversList/models/types.ts +1 -0
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -0
- package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/config/radioOptions.ts +24 -0
- package/components/common/wizards/datastore/add/nfs/version/Version.vue +70 -0
- package/components/common/wizards/datastore/add/nfs/version/config/versionOptions.ts +20 -0
- package/components/common/wizards/datastore/add/readyComplete/ReadyComplete.vue +77 -0
- package/components/common/wizards/datastore/add/readyComplete/config/propertiesDetails.ts +165 -0
- package/components/common/wizards/datastore/add/readyComplete/models/interfaces.ts +4 -0
- package/components/common/wizards/datastore/add/sharedStorm/SharedStorm.vue +85 -0
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/DeviceSelection.vue +447 -0
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/config/defaultForm.ts +18 -0
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/config/selectOptions.ts +14 -0
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -0
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/config/hostsTable.ts +87 -0
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/config/tableKeys.ts +11 -0
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/models/interfaces.ts +55 -0
- package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/models/types.ts +14 -0
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -0
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/config/selectOptions.ts +46 -0
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/graphicTooltip/graphicTooltip.vue +64 -0
- package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/sizeGraphic/sizeGraphic.vue +225 -0
- package/components/common/wizards/datastore/add/sharedStorm/version/Version.vue +70 -0
- package/components/common/wizards/datastore/add/sharedStorm/version/config/versionOptions.ts +19 -0
- package/components/common/wizards/datastore/add/types/Types.vue +79 -0
- package/components/common/wizards/datastore/add/types/config/typeOptions.ts +31 -0
- package/components/common/wizards/datastore/add/utils.ts +69 -0
- package/components/models/interfaces.ts +14 -0
- package/composables/deepCopy.ts +21 -0
- package/composables/useDiff.ts +15 -0
- package/composables/useLocal.ts +36 -0
- package/composables/useLocalStorage.ts +45 -0
- package/composables/useThrottle.ts +32 -0
- package/composables/useUniqueId.ts +5 -0
- package/config/regExp.ts +13 -0
- package/eslint/index.js +15 -0
- package/eslint/no-import-type.js +17 -0
- package/eslint/no-invalid-type-prefix.js +32 -0
- package/minify.js +51 -0
- package/models/composables/useMyFetch/interfaces.ts +4 -0
- package/models/composables/useMyFetch/types.ts +1 -0
- package/models/enums.ts +21 -0
- package/models/interfaces.ts +29 -0
- package/models/plugins/date/interfaces.ts +5 -0
- package/models/plugins/date/types.ts +1 -0
- package/models/plugins/validation/interfaces.ts +21 -0
- package/models/plugins/validation/types.ts +1 -0
- package/models/store/host/interfaces.ts +38 -0
- package/models/store/interfaces.ts +47 -0
- package/models/store/network/interfaces.ts +13 -0
- package/models/store/storage/interfaces.ts +32 -0
- package/models/store/vm/interfaces.ts +87 -0
- package/models/types.ts +6 -0
- package/nuxt.config.ts +8 -0
- package/package.json +39 -0
- package/plugins/binary.ts +122 -0
- package/plugins/date.ts +179 -0
- package/plugins/recursion.ts +199 -0
- package/plugins/spice-console/spice.console.ts +128 -0
- package/plugins/text.ts +48 -0
- package/plugins/validation.ts +172 -0
- package/public/favicon.ico +0 -0
- package/public/spice-console/application/WorkerProcess.js +3350 -0
- package/public/spice-console/application/WorkerProcess_back.js +3144 -0
- package/public/spice-console/application/WorkerProcess_meta.js +3103 -0
- package/public/spice-console/application/WorkerProcess_reverse.js +3214 -0
- package/public/spice-console/application/agent.js +175 -0
- package/public/spice-console/application/application.js +641 -0
- package/public/spice-console/application/checkActivity.js +50 -0
- package/public/spice-console/application/clientgui.js +842 -0
- package/public/spice-console/application/clipboard/clipboarddataparser.js +92 -0
- package/public/spice-console/application/clipboard/local/localClipboard.js +110 -0
- package/public/spice-console/application/clipboard.js +82 -0
- package/public/spice-console/application/codec.js +257 -0
- package/public/spice-console/application/imagecache.js +81 -0
- package/public/spice-console/application/inputmanager.js +270 -0
- package/public/spice-console/application/packetfactory.js +202 -0
- package/public/spice-console/application/packetfilter.js +103 -0
- package/public/spice-console/application/packetprocess.js +75 -0
- package/public/spice-console/application/rasteroperation.js +118 -0
- package/public/spice-console/application/spiceconnection.js +197 -0
- package/public/spice-console/application/stream.js +67 -0
- package/public/spice-console/application/virtualmouse.js +109 -0
- package/public/spice-console/keymaps/keyevent.js +36 -0
- package/public/spice-console/keymaps/keymap.js +229 -0
- package/public/spice-console/keymaps/keymapes.js +375 -0
- package/public/spice-console/keymaps/keymapesObj.js +317 -0
- package/public/spice-console/keymaps/keymapus.js +317 -0
- package/public/spice-console/keymaps/scanCodeObjModifier.js +65 -0
- package/public/spice-console/keymaps/scanCodeObjProvider.js +60 -0
- package/public/spice-console/lib/AsyncConsumer.js +204 -0
- package/public/spice-console/lib/AsyncWorker.js +60 -0
- package/public/spice-console/lib/CollisionDetector.js +27 -0
- package/public/spice-console/lib/DataLogger.js +197 -0
- package/public/spice-console/lib/GenericObjectPool.js +152 -0
- package/public/spice-console/lib/GlobalPool.js +114 -0
- package/public/spice-console/lib/ImageUncompressor.js +138 -0
- package/public/spice-console/lib/IntegrationBenchmark.js +64 -0
- package/public/spice-console/lib/PacketWorkerIdentifier.js +107 -0
- package/public/spice-console/lib/SyncAsyncHandler.js +46 -0
- package/public/spice-console/lib/base64.js +298 -0
- package/public/spice-console/lib/biginteger.js +1640 -0
- package/public/spice-console/lib/bowser.js +276 -0
- package/public/spice-console/lib/decoder/dixie.js +7930 -0
- package/public/spice-console/lib/decoder/jmuxer.js +2815 -0
- package/public/spice-console/lib/displayRouter.js +83 -0
- package/public/spice-console/lib/encrypt.js +191 -0
- package/public/spice-console/lib/flipper.js +39 -0
- package/public/spice-console/lib/graphic.js +1230 -0
- package/public/spice-console/lib/graphicdebug.js +223 -0
- package/public/spice-console/lib/images/bitmap.js +194 -0
- package/public/spice-console/lib/images/jsquic_family.js +84 -0
- package/public/spice-console/lib/images/jsquic_rgba.js +343 -0
- package/public/spice-console/lib/images/jsquic_uncompress.js +530 -0
- package/public/spice-console/lib/images/lz.js +717 -0
- package/public/spice-console/lib/images/png.js +275 -0
- package/public/spice-console/lib/jgestures.min.js +44 -0
- package/public/spice-console/lib/jquery-2.0.3.js +8829 -0
- package/public/spice-console/lib/jquery-mousewheel.js +84 -0
- package/public/spice-console/lib/jquery-visibility.min.js +2 -0
- package/public/spice-console/lib/jsbn.js +578 -0
- package/public/spice-console/lib/jsbn2.js +675 -0
- package/public/spice-console/lib/lodash.4.0.0.min.js +136 -0
- package/public/spice-console/lib/modernizr.js +39 -0
- package/public/spice-console/lib/pixastic.js +3244 -0
- package/public/spice-console/lib/prettyprint.js +794 -0
- package/public/spice-console/lib/prng4.js +64 -0
- package/public/spice-console/lib/queue.js +259 -0
- package/public/spice-console/lib/rasterEngine.js +907 -0
- package/public/spice-console/lib/rng.js +87 -0
- package/public/spice-console/lib/runqueue.js +103 -0
- package/public/spice-console/lib/sha1.js +124 -0
- package/public/spice-console/lib/stuckkeyshandler.js +122 -0
- package/public/spice-console/lib/timelapsedetector.js +62 -0
- package/public/spice-console/lib/utils.js +327 -0
- package/public/spice-console/lib/virtualjoystick.js +370 -0
- package/public/spice-console/network/busconnection.js +195 -0
- package/public/spice-console/network/clusternodechooser.js +49 -0
- package/public/spice-console/network/connectioncontrol.js +60 -0
- package/public/spice-console/network/packetcontroller.js +62 -0
- package/public/spice-console/network/packetextractor.js +73 -0
- package/public/spice-console/network/packetlinkfactory.js +64 -0
- package/public/spice-console/network/packetreassembler.js +77 -0
- package/public/spice-console/network/reassemblerfactory.js +39 -0
- package/public/spice-console/network/sizedefiner.js +86 -0
- package/public/spice-console/network/socket.js +120 -0
- package/public/spice-console/network/socketqueue.js +95 -0
- package/public/spice-console/network/spicechannel.js +310 -0
- package/public/spice-console/network/websocketwrapper.js +75 -0
- package/public/spice-console/process/busprocess.js +309 -0
- package/public/spice-console/process/cursorprocess.js +110 -0
- package/public/spice-console/process/displaypreprocess.js +152 -0
- package/public/spice-console/process/displayprocess.js +210 -0
- package/public/spice-console/process/inputprocess.js +204 -0
- package/public/spice-console/process/mainprocess.js +78 -0
- package/public/spice-console/process/playbackprocess.js +233 -0
- package/public/spice-console/resources/magnifier.png +0 -0
- package/public/spice-console/resources/mouse.png +0 -0
- package/public/spice-console/resources/mouse_cursor.gif +0 -0
- package/public/spice-console/resources/mouse_cursor.png +0 -0
- package/public/spice-console/run.js +181 -0
- package/public/spice-console/spiceobjects/generated/protocol.js +537 -0
- package/public/spice-console/spiceobjects/spiceobjects.js +3474 -0
- package/public/spice-console/swcanvas/swcanvas.js +82 -0
- package/public/spice-console/tools/generate.php +269 -0
- package/public/spice-console/tools/generateKeyboardLayout.php +63 -0
- package/public/spice-console/tools/generateSpiceObject.php +81 -0
- package/public/spice-console-minify/application/WorkerProcess.min.js +1 -0
- package/public/spice-console-minify/application/WorkerProcess_back.min.js +1 -0
- package/public/spice-console-minify/application/WorkerProcess_meta.min.js +1 -0
- package/public/spice-console-minify/application/WorkerProcess_reverse.min.js +1 -0
- package/public/spice-console-minify/application/agent.min.js +1 -0
- package/public/spice-console-minify/application/application.min.js +1 -0
- package/public/spice-console-minify/application/checkActivity.min.js +1 -0
- package/public/spice-console-minify/application/clientgui.min.js +1 -0
- package/public/spice-console-minify/application/clipboard/clipboarddataparser.min.js +1 -0
- package/public/spice-console-minify/application/clipboard/local/localClipboard.min.js +1 -0
- package/public/spice-console-minify/application/clipboard.min.js +1 -0
- package/public/spice-console-minify/application/codec.min.js +1 -0
- package/public/spice-console-minify/application/imagecache.min.js +1 -0
- package/public/spice-console-minify/application/inputmanager.min.js +1 -0
- package/public/spice-console-minify/application/packetfactory.min.js +1 -0
- package/public/spice-console-minify/application/packetfilter.min.js +1 -0
- package/public/spice-console-minify/application/packetprocess.min.js +1 -0
- package/public/spice-console-minify/application/rasteroperation.min.js +1 -0
- package/public/spice-console-minify/application/spiceconnection.min.js +1 -0
- package/public/spice-console-minify/application/stream.min.js +1 -0
- package/public/spice-console-minify/application/virtualmouse.min.js +1 -0
- package/public/spice-console-minify/keymaps/keyevent.min.js +1 -0
- package/public/spice-console-minify/keymaps/keymap.min.js +1 -0
- package/public/spice-console-minify/keymaps/keymapes.min.js +1 -0
- package/public/spice-console-minify/keymaps/keymapesObj.min.js +1 -0
- package/public/spice-console-minify/keymaps/keymapus.min.js +1 -0
- package/public/spice-console-minify/keymaps/scanCodeObjModifier.min.js +1 -0
- package/public/spice-console-minify/keymaps/scanCodeObjProvider.min.js +1 -0
- package/public/spice-console-minify/lib/AsyncConsumer.min.js +1 -0
- package/public/spice-console-minify/lib/AsyncWorker.min.js +1 -0
- package/public/spice-console-minify/lib/CollisionDetector.min.js +1 -0
- package/public/spice-console-minify/lib/DataLogger.min.js +1 -0
- package/public/spice-console-minify/lib/GenericObjectPool.min.js +1 -0
- package/public/spice-console-minify/lib/GlobalPool.min.js +1 -0
- package/public/spice-console-minify/lib/ImageUncompressor.min.js +1 -0
- package/public/spice-console-minify/lib/IntegrationBenchmark.min.js +1 -0
- package/public/spice-console-minify/lib/PacketWorkerIdentifier.min.js +1 -0
- package/public/spice-console-minify/lib/SyncAsyncHandler.min.js +1 -0
- package/public/spice-console-minify/lib/base64.min.js +1 -0
- package/public/spice-console-minify/lib/biginteger.min.js +1 -0
- package/public/spice-console-minify/lib/bowser.min.js +1 -0
- package/public/spice-console-minify/lib/decoder/dixie.min.js +5 -0
- package/public/spice-console-minify/lib/decoder/jmuxer.min.js +1 -0
- package/public/spice-console-minify/lib/displayRouter.min.js +1 -0
- package/public/spice-console-minify/lib/encrypt.min.js +1 -0
- package/public/spice-console-minify/lib/flipper.min.js +1 -0
- package/public/spice-console-minify/lib/graphic.min.js +1 -0
- package/public/spice-console-minify/lib/graphicdebug.min.js +1 -0
- package/public/spice-console-minify/lib/images/bitmap.min.js +1 -0
- package/public/spice-console-minify/lib/images/jsquic_family.min.js +1 -0
- package/public/spice-console-minify/lib/images/jsquic_rgba.min.js +1 -0
- package/public/spice-console-minify/lib/images/jsquic_uncompress.min.js +1 -0
- package/public/spice-console-minify/lib/images/lz.min.js +1 -0
- package/public/spice-console-minify/lib/images/png.min.js +1 -0
- package/public/spice-console-minify/lib/jgestures.min.js +25 -0
- package/public/spice-console-minify/lib/jquery-2.0.3.min.js +25 -0
- package/public/spice-console-minify/lib/jquery-mousewheel.min.js +12 -0
- package/public/spice-console-minify/lib/jquery-visibility.min.js +2 -0
- package/public/spice-console-minify/lib/jsbn.min.js +1 -0
- package/public/spice-console-minify/lib/jsbn2.min.js +1 -0
- package/public/spice-console-minify/lib/lodash.4.0.0.min.js +6 -0
- package/public/spice-console-minify/lib/modernizr.min.js +1 -0
- package/public/spice-console-minify/lib/pixastic.min.js +1 -0
- package/public/spice-console-minify/lib/prettyprint.min.js +1 -0
- package/public/spice-console-minify/lib/prng4.min.js +1 -0
- package/public/spice-console-minify/lib/queue.min.js +1 -0
- package/public/spice-console-minify/lib/rasterEngine.min.js +1 -0
- package/public/spice-console-minify/lib/rng.min.js +1 -0
- package/public/spice-console-minify/lib/runqueue.min.js +1 -0
- package/public/spice-console-minify/lib/sha1.min.js +1 -0
- package/public/spice-console-minify/lib/stuckkeyshandler.min.js +1 -0
- package/public/spice-console-minify/lib/timelapsedetector.min.js +1 -0
- package/public/spice-console-minify/lib/utils.min.js +1 -0
- package/public/spice-console-minify/lib/virtualjoystick.min.js +1 -0
- package/public/spice-console-minify/network/busconnection.min.js +1 -0
- package/public/spice-console-minify/network/clusternodechooser.min.js +1 -0
- package/public/spice-console-minify/network/connectioncontrol.min.js +1 -0
- package/public/spice-console-minify/network/packetcontroller.min.js +1 -0
- package/public/spice-console-minify/network/packetextractor.min.js +1 -0
- package/public/spice-console-minify/network/packetlinkfactory.min.js +1 -0
- package/public/spice-console-minify/network/packetreassembler.min.js +1 -0
- package/public/spice-console-minify/network/reassemblerfactory.min.js +1 -0
- package/public/spice-console-minify/network/sizedefiner.min.js +1 -0
- package/public/spice-console-minify/network/socket.min.js +1 -0
- package/public/spice-console-minify/network/socketqueue.min.js +1 -0
- package/public/spice-console-minify/network/spicechannel.min.js +1 -0
- package/public/spice-console-minify/network/websocketwrapper.min.js +1 -0
- package/public/spice-console-minify/process/busprocess.min.js +1 -0
- package/public/spice-console-minify/process/cursorprocess.min.js +1 -0
- package/public/spice-console-minify/process/displaypreprocess.min.js +1 -0
- package/public/spice-console-minify/process/displayprocess.min.js +1 -0
- package/public/spice-console-minify/process/inputprocess.min.js +1 -0
- package/public/spice-console-minify/process/mainprocess.min.js +1 -0
- package/public/spice-console-minify/process/playbackprocess.min.js +1 -0
- package/public/spice-console-minify/run.min.js +1 -0
- package/public/spice-console-minify/spiceobjects/generated/protocol.min.js +1 -0
- package/public/spice-console-minify/spiceobjects/spiceobjects.min.js +1 -0
- package/public/spice-console-minify/swcanvas/swcanvas.min.js +1 -0
- package/tsconfig.json +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Pixastic=function(){function t(t,a,e){var r=new Array;null==a&&(a=document),null==e&&(e="*");var n=a.getElementsByTagName(e),s=n.length,o=new RegExp("(^|\\s)"+t+"(\\s|$)");for(i=0,j=0;i<s;i++)o.test(n[i].className)&&(r[j]=n[i],j++);return r}function a(t,a){if(Pixastic.debug){try{switch(a){case"warn":console.warn("Pixastic:",t);break;case"error":console.error("Pixastic:",t);break;default:console.log("Pixastic:",t)}}catch(t){}1}}"undefined"!=typeof pixastic_parseonload&&pixastic_parseonload&&function(t){var a=!1,e=function(){a||(a=!0,t())};document.write('<script defer src="//:" id="__onload_ie_pixastic__"><\/script>');var i=document.getElementById("__onload_ie_pixastic__");i.onreadystatechange=function(){"complete"==i.readyState&&(i.parentNode.removeChild(i),e())},document.addEventListener&&document.addEventListener("DOMContentLoaded",e,!1),function(t,a,e){t.addEventListener?t.addEventListener(a,e,!1):t.attachEvent&&t.attachEvent("on"+a,e)}(window,"load",e)}((function(){for(var a=t("pixastic",null,"img"),e=t("pixastic",null,"canvas"),i=a.concat(e),r=0;r<i.length;r++)!function(){for(var t=i[r],a=[],e=t.className.split(" "),n=0;n<e.length;n++){var s=e[n];if("pixastic-"==s.substring(0,9)){var o=s.substring(9);""!=o&&a.push(o)}}if(a.length)if("img"==t.tagName.toLowerCase()){var c=new Image;if(c.src=t.src,c.complete)for(var h=0;h<a.length;h++){var l=Pixastic.applyAction(t,t,a[h],null);l&&(t=l)}else c.onload=function(){for(var e=0;e<a.length;e++){var i=Pixastic.applyAction(t,t,a[e],null);i&&(t=i)}}}else setTimeout((function(){for(var e=0;e<a.length;e++){var i=Pixastic.applyAction(t,t,a[e],null);i&&(t=i)}}),1)}()}));var e=function(){var t=document.createElement("canvas"),a=!1;try{a=!("function"!=typeof t.getContext||!t.getContext("2d"))}catch(t){}return function(){return a}}(),r=function(){var t,a=document.createElement("canvas"),e=!1;try{"function"==typeof a.getContext&&(t=a.getContext("2d"))&&(e="function"==typeof t.getImageData)}catch(t){}return function(){return e}}(),n=function(){var t=!1,a=document.createElement("canvas");if(e()&&r()){a.width=a.height=1;var i=a.getContext("2d");i.fillStyle="rgb(255,0,0)",i.fillRect(0,0,1,1);var n=document.createElement("canvas");n.width=n.height=1;var s=n.getContext("2d");s.fillStyle="rgb(0,0,255)",s.fillRect(0,0,1,1),i.globalAlpha=.5,i.drawImage(n,0,0);var o=i.getImageData(0,0,1,1).data;t=255!=o[2]}return function(){return t}}();return{parseOnLoad:!1,debug:!1,applyAction:function(t,e,i,r){r=r||{};var n,s,o="canvas"==t.tagName.toLowerCase();if(o&&Pixastic.Client.isIE())return Pixastic.debug&&a("Tried to process a canvas element but browser is IE."),!1;var c=!1;Pixastic.Client.hasCanvas()&&(c=!!r.resultCanvas,s=(n=r.resultCanvas||document.createElement("canvas")).getContext("2d"));var h=t.offsetWidth,l=t.offsetHeight;if(o&&(h=t.width,l=t.height),0==h||0==l){if(null!=t.parentNode)return void(Pixastic.debug&&a("Image has 0 width and/or height."));var p=t.style.position,g=t.style.left;t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),h=t.offsetWidth,l=t.offsetHeight,document.body.removeChild(t),t.style.position=p,t.style.left=g}if(i.indexOf("(")>-1){var v=i;i=v.substr(0,v.indexOf("("));var d=v.match(/\((.*?)\)/);if(d[1]){d=d[1].split(";");for(var u=0;u<d.length;u++)if(thisArg=d[u].split("="),2==thisArg.length)if("rect"==thisArg[0]){var f=thisArg[1].split(",");r[thisArg[0]]={left:parseInt(f[0],10)||0,top:parseInt(f[1],10)||0,width:parseInt(f[2],10)||0,height:parseInt(f[3],10)||0}}else r[thisArg[0]]=thisArg[1]}}r.rect?(r.rect.left=Math.round(r.rect.left),r.rect.top=Math.round(r.rect.top),r.rect.width=Math.round(r.rect.width),r.rect.height=Math.round(r.rect.height)):r.rect={left:0,top:0,width:h,height:l};var m=!1;if(Pixastic.Actions[i]&&"function"==typeof Pixastic.Actions[i].process&&(m=!0),!m)return Pixastic.debug&&a('Invalid action "'+i+'". Maybe file not included?'),!1;if(!Pixastic.Actions[i].checkSupport())return Pixastic.debug&&a('Action "'+i+'" not supported by this browser.'),!1;Pixastic.Client.hasCanvas()?(n!==t&&(n.width=h,n.height=l),c||(n.style.width=h+"px",n.style.height=l+"px"),s.drawImage(e,0,0,h,l),t.__pixastic_org_image?(n.__pixastic_org_image=t.__pixastic_org_image,n.__pixastic_org_width=t.__pixastic_org_width,n.__pixastic_org_height=t.__pixastic_org_height):(n.__pixastic_org_image=t,n.__pixastic_org_width=h,n.__pixastic_org_height=l)):Pixastic.Client.isIE()&&void 0===t.__pixastic_org_style&&(t.__pixastic_org_style=t.style.cssText);var x={image:t,canvas:n,width:h,height:l,useData:!0,options:r};return!!Pixastic.Actions[i].process(x)&&(Pixastic.Client.hasCanvas()?(x.useData&&Pixastic.Client.hasCanvasImageData()&&(n.getContext("2d").putImageData(x.canvasData,r.rect.left,r.rect.top),n.getContext("2d").fillRect(0,0,0,0)),r.leaveDOM||(n.title=t.title,n.imgsrc=t.imgsrc,o||(n.alt=t.alt),o||(n.imgsrc=t.src),n.className=t.className,n.style.cssText=t.style.cssText,n.name=t.name,n.tabIndex=t.tabIndex,n.id=t.id,t.parentNode&&t.parentNode.replaceChild&&t.parentNode.replaceChild(n,t)),r.resultCanvas=n,n):t)},prepareData:function(t,a){var e=t.canvas.getContext("2d"),i=t.options.rect,r=e.getImageData(i.left,i.top,i.width,i.height),n=r.data;return a||(t.canvasData=r),n},process:function(t,a,e,i){if("img"==t.tagName.toLowerCase()){var r=new Image;if(r.src=t.src,r.complete){var n=Pixastic.applyAction(t,r,a,e);return i&&i(n),n}r.onload=function(){var n=Pixastic.applyAction(t,r,a,e);i&&i(n)}}if("canvas"==t.tagName.toLowerCase()){n=Pixastic.applyAction(t,t,a,e);return i&&i(n),n}},revert:function(t){if(Pixastic.Client.hasCanvas()){if("canvas"==t.tagName.toLowerCase()&&t.__pixastic_org_image)return t.width=t.__pixastic_org_width,t.height=t.__pixastic_org_height,t.getContext("2d").drawImage(t.__pixastic_org_image,0,0),t.parentNode&&t.parentNode.replaceChild&&t.parentNode.replaceChild(t.__pixastic_org_image,t),t}else Pixastic.Client.isIE()&&void 0!==t.__pixastic_org_style&&(t.style.cssText=t.__pixastic_org_style)},Client:{hasCanvas:e,hasCanvasImageData:r,hasGlobalAlpha:n,isIE:function(){return!!document.all&&!!window.attachEvent&&!window.opera}},Actions:{}}}();"undefined"!=typeof jQuery&&jQuery&&jQuery.fn&&(jQuery.fn.pixastic=function(t,a){var e=[];return this.each((function(){if("img"!=this.tagName.toLowerCase()||this.complete){var i=Pixastic.process(this,t,a);i&&e.push(i)}})),e.length>0?jQuery(e):this}),Pixastic.Actions.blend={process:function(t){var a=parseFloat(t.options.amount),e=(t.options.mode||"normal").toLowerCase(),i=t.options.image;if(a=Math.max(0,Math.min(1,a)),!i)return!1;if(Pixastic.Client.hasCanvasImageData()){var r=t.options.rect,n=Pixastic.prepareData(t),s=r.width,o=r.height;t.useData=!1;var c=document.createElement("canvas");c.width=t.canvas.width,c.height=t.canvas.height;var h=c.getContext("2d");h.drawImage(i,0,0);var l,p,g,v,d,u,f,m,x,C,w,P,I,D,M={canvas:c,options:t.options},b=Pixastic.prepareData(M),y=M.canvasData,_=4*(S=s*o),k=!1;switch(e){case"normal":break;case"multiply":for(;S--;)b[_-=4]=n[_]*b[_]/255,b[l=_+1]=n[l]*b[l]/255,b[p=_+2]=n[p]*b[p]/255;k=!0;break;case"lighten":for(;S--;)(g=n[_-=4])>b[_]&&(b[_]=g),(v=n[l=_+1])>b[l]&&(b[l]=v),(d=n[p=_+2])>b[p]&&(b[p]=d);k=!0;break;case"darken":for(;S--;)(g=n[_-=4])<b[_]&&(b[_]=g),(v=n[l=_+1])<b[l]&&(b[l]=v),(d=n[p=_+2])<b[p]&&(b[p]=d);k=!0;break;case"darkercolor":for(;S--;).3*(g=n[_-=4])+.59*(v=n[l=_+1])+.11*(d=n[p=_+2])<=.3*b[_]+.59*b[l]+.11*b[p]&&(b[_]=g,b[l]=v,b[p]=d);k=!0;break;case"lightercolor":for(;S--;).3*(g=n[_-=4])+.59*(v=n[l=_+1])+.11*(d=n[p=_+2])>.3*b[_]+.59*b[l]+.11*b[p]&&(b[_]=g,b[l]=v,b[p]=d);k=!0;break;case"lineardodge":for(;S--;)(x=n[_-=4]+b[_])>255?b[_]=255:b[_]=x,(C=n[l=_+1]+b[l])>255?b[l]=255:b[l]=C,(w=n[p=_+2]+b[p])>255?b[p]=255:b[p]=w;k=!0;break;case"linearburn":for(;S--;)(x=n[_-=4]+b[_])<255?b[_]=0:b[_]=x-255,(C=n[l=_+1]+b[l])<255?b[l]=0:b[l]=C-255,(w=n[p=_+2]+b[p])<255?b[p]=0:b[p]=w-255;k=!0;break;case"difference":for(;S--;)(x=n[_-=4]-b[_])<0?b[_]=-x:b[_]=x,(C=n[l=_+1]-b[l])<0?b[l]=-C:b[l]=C,(w=n[p=_+2]-b[p])<0?b[p]=-w:b[p]=w;k=!0;break;case"screen":for(;S--;)b[_-=4]=255-((255-b[_])*(255-n[_])>>8),b[l=_+1]=255-((255-b[l])*(255-n[l])>>8),b[p=_+2]=255-((255-b[p])*(255-n[p])>>8);k=!0;break;case"exclusion":for(var A=2/255;S--;)b[_-=4]=(g=n[_])-(g*A-1)*b[_],b[l=_+1]=(v=n[l])-(v*A-1)*b[l],b[p=_+2]=(d=n[p])-(d*A-1)*b[p];k=!0;break;case"overlay":for(A=2/255;S--;)(g=n[_-=4])<128?b[_]=b[_]*g*A:b[_]=255-(255-b[_])*(255-g)*A,(v=n[l=_+1])<128?b[l]=b[l]*v*A:b[l]=255-(255-b[l])*(255-v)*A,(d=n[p=_+2])<128?b[p]=b[p]*d*A:b[p]=255-(255-b[p])*(255-d)*A;k=!0;break;case"softlight":for(A=2/255;S--;)(g=n[_-=4])<128?b[_]=(64+(b[_]>>1))*g*A:b[_]=255-(191-(b[_]>>1))*(255-g)*A,(v=n[l=_+1])<128?b[l]=(64+(b[l]>>1))*v*A:b[l]=255-(191-(b[l]>>1))*(255-v)*A,(d=n[p=_+2])<128?b[p]=(64+(b[p]>>1))*d*A:b[p]=255-(191-(b[p]>>1))*(255-d)*A;k=!0;break;case"hardlight":for(A=2/255;S--;)(u=b[_-=4])<128?b[_]=n[_]*u*A:b[_]=255-(255-n[_])*(255-u)*A,(f=b[l=_+1])<128?b[l]=n[l]*f*A:b[l]=255-(255-n[l])*(255-f)*A,(m=b[p=_+2])<128?b[p]=n[p]*m*A:b[p]=255-(255-n[p])*(255-m)*A;k=!0;break;case"colordodge":for(;S--;)(x=(n[_-=4]<<8)/(255-(u=b[_])))>255||255==u?b[_]=255:b[_]=x,(C=(n[l=_+1]<<8)/(255-(f=b[l])))>255||255==f?b[l]=255:b[l]=C,(w=(n[p=_+2]<<8)/(255-(m=b[p])))>255||255==m?b[p]=255:b[p]=w;k=!0;break;case"colorburn":for(;S--;)(x=255-(255-n[_-=4]<<8)/b[_])<0||0==b[_]?b[_]=0:b[_]=x,(C=255-(255-n[l=_+1]<<8)/b[l])<0||0==b[l]?b[l]=0:b[l]=C,(w=255-(255-n[p=_+2]<<8)/b[p])<0||0==b[p]?b[p]=0:b[p]=w;k=!0;break;case"linearlight":for(;S--;)(x=2*(u=b[_-=4])+n[_]-256)<0||u<128&&x<0?b[_]=0:b[_]=x>255?255:x,(C=2*(f=b[l=_+1])+n[l]-256)<0||f<128&&C<0?b[l]=0:b[l]=C>255?255:C,(w=2*(m=b[p=_+2])+n[p]-256)<0||m<128&&w<0?b[p]=0:b[p]=w>255?255:w;k=!0;break;case"vividlight":for(;S--;)(u=b[_-=4])<128?u?(x=255-(255-n[_]<<8)/(2*u))<0?b[_]=0:b[_]=x:b[_]=0:(x=P=2*u-256)<255?(x=(n[_]<<8)/(255-P))>255?b[_]=255:b[_]=x:b[_]=x<0?0:x,(f=b[l=_+1])<128?f?(C=255-(255-n[l]<<8)/(2*f))<0?b[l]=0:b[l]=C:b[l]=0:(C=I=2*f-256)<255?(C=(n[l]<<8)/(255-I))>255?b[l]=255:b[l]=C:b[l]=C<0?0:C,(m=b[p=_+2])<128?m?(w=255-(255-n[p]<<8)/(2*m))<0?b[p]=0:b[p]=w:b[p]=0:(w=D=2*m-256)<255?(w=(n[p]<<8)/(255-D))>255?b[p]=255:b[p]=w:b[p]=w<0?0:w;k=!0;break;case"pinlight":for(;S--;)(u=b[_-=4])<128?(g=n[_])<(P=2*u)?b[_]=g:b[_]=P:(g=n[_])>(P=2*u-256)?b[_]=g:b[_]=P,(f=b[l=_+1])<128?(v=n[l])<(I=2*f)?b[l]=v:b[l]=I:(v=n[l])>(I=2*f-256)?b[l]=v:b[l]=I,(u=b[p=_+2])<128?(g=n[p])<(P=2*u)?b[p]=g:b[p]=P:(g=n[p])>(P=2*u-256)?b[p]=g:b[p]=P;k=!0;break;case"hardmix":for(;S--;)(u=b[_-=4])<128?255-(255-n[_]<<8)/(2*u)<128||0==u?b[_]=0:b[_]=255:(P=2*u-256)<255&&(n[_]<<8)/(255-P)<128?b[_]=0:b[_]=255,(f=b[l=_+1])<128?255-(255-n[l]<<8)/(2*f)<128||0==f?b[l]=0:b[l]=255:(I=2*f-256)<255&&(n[l]<<8)/(255-I)<128?b[l]=0:b[l]=255,(m=b[p=_+2])<128?255-(255-n[p]<<8)/(2*m)<128||0==m?b[p]=0:b[p]=255:(D=2*m-256)<255&&(n[p]<<8)/(255-D)<128?b[p]=0:b[p]=255;k=!0}if(k&&h.putImageData(y,0,0),1==a||Pixastic.Client.hasGlobalAlpha()){var E=t.canvas.getContext("2d");E.save(),E.globalAlpha=a,E.drawImage(c,0,0,r.width,r.height,r.left,r.top,r.width,r.height),E.globalAlpha=1,E.restore()}else{for(var S=s*o,F=a,L=1-a;S--;){var N=n[_=4*S]*L+b[_]*F>>0,R=n[_+1]*L+b[_+1]*F>>0,T=n[_+2]*L+b[_+2]*F>>0;n[_]=N,n[_+1]=R,n[_+2]=T}t.useData=!0}return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.blur={process:function(t){if(void 0===t.options.fixMargin&&(t.options.fixMargin=!0),Pixastic.Client.hasCanvasImageData()){for(var a=Pixastic.prepareData(t),e=Pixastic.prepareData(t,!0),i=[[0,1,0],[1,2,1],[0,1,0]],r=0,n=0;n<3;n++)for(var s=0;s<3;s++)r+=i[n][s];r=1/(2*r);var o=t.options.rect,c=o.width,h=o.height,l=4*c,p=h;do{var g=(p-1)*l,v=(1==p?0:p-2)*c*4,d=(p==h?p-1:p)*c*4,u=c;do{var f=g+(4*u-4),m=v+4*(1==u?0:u-2),x=d+4*(u==c?u-1:u);a[f]=(2*(e[m]+e[f-4]+e[f+4]+e[x])+4*e[f])*r,a[f+1]=(2*(e[m+1]+e[f-3]+e[f+5]+e[x+1])+4*e[f+1])*r,a[f+2]=(2*(e[m+2]+e[f-2]+e[f+6]+e[x+2])+4*e[f+2])*r}while(--u)}while(--p);return!0}if(Pixastic.Client.isIE())return t.image.style.filter+=" progid:DXImageTransform.Microsoft.Blur(pixelradius=1.5)",t.options.fixMargin&&(t.image.style.marginLeft=(parseInt(t.image.style.marginLeft,10)||0)-2+"px",t.image.style.marginTop=(parseInt(t.image.style.marginTop,10)||0)-2+"px"),!0},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()||Pixastic.Client.isIE()}},Pixastic.Actions.blurfast={process:function(t){var a=parseFloat(t.options.amount)||0,e=!(!t.options.clear||"false"==t.options.clear);if(a=Math.max(0,Math.min(5,a)),Pixastic.Client.hasCanvas()){var i=t.options.rect,r=t.canvas.getContext("2d");r.save(),r.beginPath(),r.rect(i.left,i.top,i.width,i.height),r.clip();var n=Math.round(t.width/2),s=Math.round(t.height/2),o=document.createElement("canvas");o.width=n,o.height=s;e=!1;for(var c=Math.round(20*a),h=o.getContext("2d"),l=0;l<c;l++){var p=Math.max(1,Math.round(n-l)),g=Math.max(1,Math.round(s-l));h.clearRect(0,0,n,s),h.drawImage(t.canvas,0,0,t.width,t.height,0,0,p,g),e&&r.clearRect(i.left,i.top,i.width,i.height),r.drawImage(o,0,0,p,g,0,0,t.width,t.height)}return r.restore(),t.useData=!1,!0}if(Pixastic.Client.isIE()){var v=10*a;return t.image.style.filter+=" progid:DXImageTransform.Microsoft.Blur(pixelradius="+v+")",t.options.fixMargin,t.image.style.marginLeft=(parseInt(t.image.style.marginLeft,10)||0)-Math.round(v)+"px",t.image.style.marginTop=(parseInt(t.image.style.marginTop,10)||0)-Math.round(v)+"px",!0}},checkSupport:function(){return Pixastic.Client.hasCanvas()||Pixastic.Client.isIE()}},Pixastic.Actions.brightness={process:function(t){var a=parseInt(t.options.brightness,10)||0,e=parseFloat(t.options.contrast)||0,i=!(!t.options.legacy||"false"==t.options.legacy);if(i)a=Math.min(150,Math.max(-150,a));else var r=1+Math.min(150,Math.max(-150,a))/150;if(e=Math.max(0,e+1),Pixastic.Client.hasCanvasImageData()){var n,s,o,c,h,l,p,g=Pixastic.prepareData(t),v=t.options.rect,d=v.width*v.height,u=4*d;for(1!=e?i?(o=e,c=(a-128)*e+128):(o=r*e,c=128*-e+128):i?(o=1,c=a):(o=r,c=0);d--;)(h=g[u-=4]*o+c)>255?g[u]=255:g[u]=h<0?0:h,(l=g[n=u+1]*o+c)>255?g[n]=255:g[n]=l<0?0:l,(p=g[s=u+2]*o+c)>255?g[s]=255:g[s]=p<0?0:p;return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.coloradjust={process:function(t){var a=parseFloat(t.options.red)||0,e=parseFloat(t.options.green)||0,i=parseFloat(t.options.blue)||0;if(a=Math.round(255*a),e=Math.round(255*e),i=Math.round(255*i),Pixastic.Client.hasCanvasImageData()){for(var r,n,s,o,c,h=Pixastic.prepareData(t),l=t.options.rect,p=l.width*l.height,g=4*p;p--;)g-=4,a&&((s=h[g]+a)<0?h[g]=0:h[g]=s>255?255:s),e&&((o=h[r=g+1]+e)<0?h[r]=0:h[r]=o>255?255:o),i&&((c=h[n=g+2]+i)<0?h[n]=0:h[n]=c>255?255:c);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.colorhistogram={array256:function(t){arr=[];for(var a=0;a<256;a++)arr[a]=t;return arr},process:function(t){"object"!=typeof t.options.returnValue&&(t.options.returnValue={rvals:[],gvals:[],bvals:[]});var a=!!t.options.paint,e=t.options.returnValue;if("array"!=typeof e.values&&(e.rvals=[],e.gvals=[],e.bvals=[]),Pixastic.Client.hasCanvasImageData()){var i=Pixastic.prepareData(t);t.useData=!1;for(var r=this.array256(0),n=this.array256(0),s=this.array256(0),o=t.options.rect,c=o.width*o.height,h=4*c;c--;)r[i[h-=4]]++,n[i[h+1]]++,s[i[h+2]]++;if(e.rvals=r,e.gvals=n,e.bvals=s,a)for(var l=t.canvas.getContext("2d"),p=[r,n,s],g=0;g<3;g++){for(var v=(g+1)*t.height/3,d=0,u=0;u<256;u++)p[g][u]>d&&(d=p[g][u]);var f=t.height/3/d,m=t.width/256;0==g?l.fillStyle="rgba(255,0,0,0.5)":1==g?l.fillStyle="rgba(0,255,0,0.5)":2==g&&(l.fillStyle="rgba(0,0,255,0.5)");for(u=0;u<256;u++)l.fillRect(u*m,t.height-f*p[g][u]-t.height+v,m,p[g][u]*f)}return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.crop={process:function(t){if(Pixastic.Client.hasCanvas()){var a=t.options.rect,e=a.width,i=a.height,r=a.top,n=a.left;void 0!==t.options.left&&(n=parseInt(t.options.left,10)),void 0!==t.options.top&&(r=parseInt(t.options.top,10)),void 0!==t.options.height&&(e=parseInt(t.options.width,10)),void 0!==t.options.height&&(i=parseInt(t.options.height,10)),n<0&&(n=0),n>t.width-1&&(n=t.width-1),r<0&&(r=0),r>t.height-1&&(r=t.height-1),e<1&&(e=1),n+e>t.width&&(e=t.width-n),i<1&&(i=1),r+i>t.height&&(i=t.height-r);var s=document.createElement("canvas");return s.width=t.width,s.height=t.height,s.getContext("2d").drawImage(t.canvas,0,0),t.canvas.width=e,t.canvas.height=i,t.canvas.getContext("2d").clearRect(0,0,e,i),t.canvas.getContext("2d").drawImage(s,n,r,e,i,0,0,e,i),t.useData=!1,!0}},checkSupport:function(){return Pixastic.Client.hasCanvas()}},Pixastic.Actions.desaturate={process:function(t){var a=!(!t.options.average||"false"==t.options.average);if(Pixastic.Client.hasCanvasImageData()){var e,i,r=Pixastic.prepareData(t),n=t.options.rect,s=n.width*n.height,o=4*s;if(a)for(;s--;)r[o-=4]=r[e=o+1]=r[i=o+2]=(r[o]+r[e]+r[i])/3;else for(;s--;)r[o-=4]=r[e=o+1]=r[i=o+2]=.3*r[o]+.59*r[e]+.11*r[i];return!0}if(Pixastic.Client.isIE())return t.image.style.filter+=" gray",!0},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()||Pixastic.Client.isIE()}},Pixastic.Actions.edges={process:function(t){var a=!(!t.options.mono||"false"==t.options.mono),e=!(!t.options.invert||"false"==t.options.invert);if(Pixastic.Client.hasCanvasImageData()){var i=Pixastic.prepareData(t),r=Pixastic.prepareData(t,!0),n=-1/8;weight=-8;var s=t.options.rect,o=s.width,c=s.height,h=4*o,l=c;do{var p=(l-1)*h,g=(1==l?0:l-2)*o*4,v=(l==c?l-1:l)*o*4,d=o;do{var u=p+(4*d-4),f=g+4*(1==d?0:d-2),m=v+4*(d==o?d-1:d),x=((r[f-4]+r[f]+r[f+4]+r[u-4]+r[u+4]+r[m-4]+r[m]+r[m+4])*n+r[u])*weight,C=((r[f-3]+r[f+1]+r[f+5]+r[u-3]+r[u+5]+r[m-3]+r[m+1]+r[m+5])*n+r[u+1])*weight,w=((r[f-2]+r[f+2]+r[f+6]+r[u-2]+r[u+6]+r[m-2]+r[m+2]+r[m+6])*n+r[u+2])*weight;if(a){var P=.3*x+.59*C+.11*w||0;e&&(P=255-P),P<0&&(P=0),P>255&&(P=255),x=C=w=P}else e&&(x=255-x,C=255-C,w=255-w),x<0&&(x=0),C<0&&(C=0),w<0&&(w=0),x>255&&(x=255),C>255&&(C=255),w>255&&(w=255);i[u]=x,i[u+1]=C,i[u+2]=w}while(--d)}while(--l);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.edges2={process:function(t){if(Pixastic.Client.hasCanvasImageData()){for(var a=Pixastic.prepareData(t),e=Pixastic.prepareData(t,!0),i=t.options.rect,r=i.width,n=4*r,s=n+4,o=i.height-1,c=r-1,h=1;h<o;++h){for(var l=s-4,p=l-n,g=l+n,v=-e[p]-e[l]-e[g],d=-e[++p]-e[++l]-e[++g],u=-e[++p]-e[++l]-e[++g],f=e[p+=2],m=e[++p],x=e[++p],C=e[l+=2],w=e[++l],P=e[++l],I=e[g+=2],D=e[++g],M=e[++g],b=-f-C-I,y=-m-w-D,_=-x-P-M,k=1;k<c;++k){g=(l=s+4)+n;var A=127+v-f- -8*C-I,E=127+d-m- -8*w-D,S=127+u-x- -8*P-M;v=b,d=y,u=_,f=e[p=l-n],m=e[++p],x=e[++p],C=e[l],w=e[++l],P=e[++l],(A+=b=-f-C-(I=e[g]))>255&&(A=255),(E+=y=-m-w-(D=e[++g]))>255&&(E=255),(S+=_=-x-P-(M=e[++g]))>255&&(S=255),A<0&&(A=0),E<0&&(E=0),S<0&&(S=0),a[s]=A,a[++s]=E,a[++s]=S,s+=2}s+=8}return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.emboss={process:function(t){var a=parseFloat(t.options.strength)||1,e=void 0!==t.options.greyLevel?parseInt(t.options.greyLevel):180,i=t.options.direction||"topleft",r=!(!t.options.blend||"false"==t.options.blend),n=0,s=0;switch(i){case"topleft":n=-1,s=-1;break;case"top":n=-1,s=0;break;case"topright":n=-1,s=1;break;case"right":n=0,s=1;break;case"bottomright":n=1,s=1;break;case"bottom":n=1,s=0;break;case"bottomleft":n=1,s=-1;break;case"left":n=0,s=-1}if(Pixastic.Client.hasCanvasImageData()){var o=Pixastic.prepareData(t),c=Pixastic.prepareData(t,!0),h=(t.options.invertAlpha,t.options.rect),l=h.width,p=h.height,g=4*l,v=p;do{var d=(v-1)*g,u=n;v+u<1&&(u=0),v+u>p&&(u=0);var f=(v-1+u)*l*4,m=l;do{var x=d+4*(m-1),C=s;m+C<1&&(C=0),m+C>l&&(C=0);var w=f+4*(m-1+C),P=c[x]-c[w],I=c[x+1]-c[w+1],D=c[x+2]-c[w+2],M=P,b=M>0?M:-M;if((I>0?I:-I)>b&&(M=I),(D>0?D:-D)>b&&(M=D),M*=a,r){var y=o[x]+M,_=o[x+1]+M,k=o[x+2]+M;o[x]=y>255?255:y<0?0:y,o[x+1]=_>255?255:_<0?0:_,o[x+2]=k>255?255:k<0?0:k}else{var A=e-M;A<0?A=0:A>255&&(A=255),o[x]=o[x+1]=o[x+2]=A}}while(--m)}while(--v);return!0}if(Pixastic.Client.isIE())return t.image.style.filter+=" progid:DXImageTransform.Microsoft.emboss()",!0},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()||Pixastic.Client.isIE()}},Pixastic.Actions.flip={process:function(t){var a=t.options.rect,e=document.createElement("canvas");e.width=a.width,e.height=a.height,e.getContext("2d").drawImage(t.image,a.left,a.top,a.width,a.height,0,0,a.width,a.height);var i=t.canvas.getContext("2d");return i.clearRect(a.left,a.top,a.width,a.height),"horizontal"==t.options.axis?(i.scale(-1,1),i.drawImage(e,-a.left-a.width,a.top,a.width,a.height)):(i.scale(1,-1),i.drawImage(e,a.left,-a.top-a.height,a.width,a.height)),t.useData=!1,!0},checkSupport:function(){return Pixastic.Client.hasCanvas()}},Pixastic.Actions.fliph={process:function(t){if(Pixastic.Client.hasCanvas()){var a=t.options.rect,e=document.createElement("canvas");e.width=a.width,e.height=a.height,e.getContext("2d").drawImage(t.image,a.left,a.top,a.width,a.height,0,0,a.width,a.height);var i=t.canvas.getContext("2d");return i.clearRect(a.left,a.top,a.width,a.height),i.scale(-1,1),i.drawImage(e,-a.left-a.width,a.top,a.width,a.height),t.useData=!1,!0}if(Pixastic.Client.isIE())return t.image.style.filter+=" fliph",!0},checkSupport:function(){return Pixastic.Client.hasCanvas()||Pixastic.Client.isIE()}},Pixastic.Actions.flipv={process:function(t){if(Pixastic.Client.hasCanvas()){var a=t.options.rect,e=document.createElement("canvas");e.width=a.width,e.height=a.height,e.getContext("2d").drawImage(t.image,a.left,a.top,a.width,a.height,0,0,a.width,a.height);var i=t.canvas.getContext("2d");return i.clearRect(a.left,a.top,a.width,a.height),i.scale(1,-1),i.drawImage(e,a.left,-a.top-a.height,a.width,a.height),t.useData=!1,!0}if(Pixastic.Client.isIE())return t.image.style.filter+=" flipv",!0},checkSupport:function(){return Pixastic.Client.hasCanvas()||Pixastic.Client.isIE()}},Pixastic.Actions.glow={process:function(t){var a=parseFloat(t.options.amount)||0,e=parseFloat(t.options.radius)||0;if(a=Math.min(1,Math.max(0,a)),e=Math.min(5,Math.max(0,e)),Pixastic.Client.hasCanvasImageData()){var i=t.options.rect,r=document.createElement("canvas");r.width=t.width,r.height=t.height;var n=r.getContext("2d");n.drawImage(t.canvas,0,0);var s=Math.round(t.width/2),o=Math.round(t.height/2),c=document.createElement("canvas");c.width=s,c.height=o;for(var h=Math.round(20*e),l=c.getContext("2d"),p=0;p<h;p++){var g=Math.max(1,Math.round(s-p)),v=Math.max(1,Math.round(o-p));l.clearRect(0,0,s,o),l.drawImage(r,0,0,t.width,t.height,0,0,g,v),n.clearRect(0,0,t.width,t.height),n.drawImage(c,0,0,g,v,0,0,t.width,t.height)}for(var d=Pixastic.prepareData(t),u=Pixastic.prepareData({canvas:r,options:t.options}),f=i.width*i.height,m=4*f,x=m+1,C=m+2;f--;)(d[m-=4]+=a*u[m])>255&&(d[m]=255),(d[x-=4]+=a*u[x])>255&&(d[x]=255),(d[C-=4]+=a*u[C])>255&&(d[C]=255);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.histogram={process:function(t){var a=!(!t.options.average||"false"==t.options.average),e=!(!t.options.paint||"false"==t.options.paint),i=t.options.color||"rgba(255,255,255,0.5)",r=[];"object"!=typeof t.options.returnValue&&(t.options.returnValue={values:[]});var n=t.options.returnValue;if("array"!=typeof n.values&&(n.values=[]),r=n.values,Pixastic.Client.hasCanvasImageData()){var s=Pixastic.prepareData(t);t.useData=!1;for(var o=0;o<256;o++)r[o]=0;var c=t.options.rect,h=c.width*c.height,l=4*h,p=Math.round;if(a)for(;h--;)r[p((s[l-=4]+s[l+1]+s[l+2])/3)]++;else for(;h--;)r[p(.3*s[l-=4]+.59*s[l+1]+.11*s[l+2])]++;if(e){var g=0;for(o=0;o<256;o++)r[o]>g&&(g=r[o]);var v=t.height/g,d=t.width/256,u=t.canvas.getContext("2d");u.fillStyle=i;for(o=0;o<256;o++)u.fillRect(o*d,t.height-v*r[o],d,r[o]*v)}return n.values=r,!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.hsl={process:function(t){var a=parseInt(t.options.hue,10)||0,e=(parseInt(t.options.saturation,10)||0)/100,i=(parseInt(t.options.lightness,10)||0)/100;if(e<0)var r=1+e;else r=1+2*e;var n=6*(a=a%360/360),s=255*i,o=1+i,c=1-i;if(Pixastic.Client.hasCanvasImageData()){for(var h=Pixastic.prepareData(t),l=t.options.rect,p=l.width*l.height,g=4*p,v=g+1,d=g+2;p--;){var u=h[g-=4],f=h[v=g+1],m=h[d=g+2];if(0!=a||0!=e){var x=u;f>x&&(x=f),m>x&&(x=m);var C=u;f<C&&(C=f),m<C&&(C=m);var w=x-C,P=(C+x)/510;if(P>0&&w>0){if(P<=.5){(D=w/(x+C)*r)>1&&(D=1);var I=P*(1+D)}else{var D;(D=w/(510-x-C)*r)>1&&(D=1);I=P+D-P*D}if(u==x)if(f==C)var M=5+(x-m)/w+n;else M=1-(x-f)/w+n;else if(f==x)if(m==C)M=1+(x-u)/w+n;else M=3-(x-m)/w+n;else if(u==C)M=3+(x-f)/w+n;else M=5-(x-u)/w+n;M<0&&(M+=6),M>=6&&(M-=6);var b=P+P-I,y=M>>0;0==y?(u=255*I,f=255*(b+(I-b)*(M-y)),m=255*b):1==y?(u=255*(I-(I-b)*(M-y)),f=255*I,m=255*b):2==y?(u=255*b,f=255*I,m=255*(b+(I-b)*(M-y))):3==y?(u=255*b,f=255*(I-(I-b)*(M-y)),m=255*I):4==y?(u=255*(b+(I-b)*(M-y)),f=255*b,m=255*I):5==y&&(u=255*I,f=255*b,m=255*(I-(I-b)*(M-y)))}}i<0?(u*=o,f*=o,m*=o):i>0&&(u=u*c+s,f=f*c+s,m=m*c+s),h[g]=u<0?0:u>255?255:u,h[v]=f<0?0:f>255?255:f,h[d]=m<0?0:m>255?255:m}return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.invert={process:function(t){if(Pixastic.Client.hasCanvasImageData()){for(var a=Pixastic.prepareData(t),e=!!t.options.invertAlpha,i=t.options.rect,r=i.width*i.height,n=4*r,s=n+1,o=n+2,c=n+3;r--;)a[n-=4]=255-a[n],a[s-=4]=255-a[s],a[o-=4]=255-a[o],e&&(a[c-=4]=255-a[c]);return!0}if(Pixastic.Client.isIE())return t.image.style.filter+=" invert",!0},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()||Pixastic.Client.isIE()}},Pixastic.Actions.laplace={process:function(t){var a=!(!t.options.invert||"false"==t.options.invert),e=parseFloat(t.options.edgeStrength)||0,i=parseInt(t.options.greyLevel)||0;if(e=-e,Pixastic.Client.hasCanvasImageData()){var r=Pixastic.prepareData(t),n=Pixastic.prepareData(t,!0),s=1/8,o=t.options.rect,c=o.width,h=o.height,l=4*c,p=h;do{var g=(p-1)*l,v=(1==p?0:p-2)*c*4,d=(p==h?p-1:p)*c*4,u=c;do{var f=g+(4*u-4),m=v+4*(1==u?0:u-2),x=d+4*(u==c?u-1:u),C=((-n[m-4]-n[m]-n[m+4]-n[f-4]-n[f+4]-n[x-4]-n[x]-n[x+4]+8*n[f])*s+(-n[m-3]-n[m+1]-n[m+5]-n[f-3]-n[f+5]-n[x-3]-n[x+1]-n[x+5]+8*n[f+1])*s+(-n[m-2]-n[m+2]-n[m+6]-n[f-2]-n[f+6]-n[x-2]-n[x+2]-n[x+6]+8*n[f+2])*s)/3+i;0!=e&&(C>127?C+=(C+1-128)*e:C<127&&(C-=(C+1)*e)),a&&(C=255-C),C<0&&(C=0),C>255&&(C=255),r[f]=r[f+1]=r[f+2]=C}while(--u)}while(--p);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.lighten={process:function(t){var a=parseFloat(t.options.amount)||0;if(a=Math.max(-1,Math.min(1,a)),Pixastic.Client.hasCanvasImageData()){for(var e=Pixastic.prepareData(t),i=t.options.rect,r=i.width*i.height,n=4*r,s=n+1,o=n+2,c=a+1;r--;)(e[n-=4]=e[n]*c)>255&&(e[n]=255),(e[s-=4]=e[s]*c)>255&&(e[s]=255),(e[o-=4]=e[o]*c)>255&&(e[o]=255);return!0}if(Pixastic.Client.isIE()){var h=t.image;return a<0?(h.style.filter+=" light()",h.filters[h.filters.length-1].addAmbient(255,255,255,100*-a)):a>0&&(h.style.filter+=" light()",h.filters[h.filters.length-1].addAmbient(255,255,255,100),h.filters[h.filters.length-1].addAmbient(255,255,255,100*a)),!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()||Pixastic.Client.isIE()}},Pixastic.Actions.mosaic={process:function(t){var a=Math.max(1,parseInt(t.options.blockSize,10));if(Pixastic.Client.hasCanvasImageData()){var e=t.options.rect,i=e.width,r=e.height,n=r,s=t.canvas.getContext("2d"),o=document.createElement("canvas");o.width=o.height=1;var c=o.getContext("2d"),h=document.createElement("canvas");h.width=i,h.height=r,h.getContext("2d").drawImage(t.canvas,e.left,e.top,i,r,0,0,i,r);for(n=0;n<r;n+=a)for(var l=0;l<i;l+=a){var p=a,g=a;p+l>i&&(p=i-l),g+n>r&&(g=r-n),c.drawImage(h,l,n,p,g,0,0,1,1);var v=c.getImageData(0,0,1,1).data;s.fillStyle="rgb("+v[0]+","+v[1]+","+v[2]+")",s.fillRect(e.left+l,e.top+n,a,a)}return t.useData=!1,!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.noise={process:function(t){var a=0,e=0,i=!1;void 0!==t.options.amount&&(a=parseFloat(t.options.amount)||0),void 0!==t.options.strength&&(e=parseFloat(t.options.strength)||0),void 0!==t.options.mono&&(i=!(!t.options.mono||"false"==t.options.mono)),a=Math.max(0,Math.min(1,a));var r=128*(e=Math.max(0,Math.min(1,e))),n=r/2;if(Pixastic.Client.hasCanvasImageData()){var s=Pixastic.prepareData(t),o=t.options.rect,c=o.width,h=4*c,l=o.height,p=Math.random;do{var g=(l-1)*h,v=c;do{var d=g+4*(v-1);if(p()<a){if(i)var u=-n+p()*r,f=s[d]+u,m=s[d+1]+u,x=s[d+2]+u;else f=s[d]-n+p()*r,m=s[d+1]-n+p()*r,x=s[d+2]-n+p()*r;f<0&&(f=0),m<0&&(m=0),x<0&&(x=0),f>255&&(f=255),m>255&&(m=255),x>255&&(x=255),s[d]=f,s[d+1]=m,s[d+2]=x}}while(--v)}while(--l);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.posterize={process:function(t){var a=256;if(void 0!==t.options.levels&&(a=parseInt(t.options.levels,10)||1),Pixastic.Client.hasCanvasImageData()){var e=Pixastic.prepareData(t),i=256/(a=Math.max(2,Math.min(256,a))),r=256/(a-1),n=t.options.rect,s=n.width,o=4*s,c=n.height;do{var h=(c-1)*o,l=s;do{var p=h+4*(l-1),g=r*(e[p]/i>>0),v=r*(e[p+1]/i>>0),d=r*(e[p+2]/i>>0);g>255&&(g=255),v>255&&(v=255),d>255&&(d=255),e[p]=g,e[p+1]=v,e[p+2]=d}while(--l)}while(--c);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.pointillize={process:function(t){var a=Math.max(1,parseInt(t.options.radius,10)),e=Math.min(5,Math.max(0,parseFloat(t.options.density)||0)),i=Math.max(0,parseFloat(t.options.noise)||0),r=!(!t.options.transparent||"false"==t.options.transparent);if(Pixastic.Client.hasCanvasImageData()){var n=t.options.rect,s=n.width,o=n.height,c=o,h=t.canvas.getContext("2d"),l=t.canvas.width,p=t.canvas.height,g=document.createElement("canvas");g.width=g.height=1;var v=g.getContext("2d"),d=document.createElement("canvas");d.width=s,d.height=o,d.getContext("2d").drawImage(t.canvas,n.left,n.top,s,o,0,0,s,o);var u=2*a;r&&h.clearRect(n.left,n.top,n.width,n.height);var f=a*i,m=1/e;for(c=0;c<o+a;c+=u*m)for(var x=0;x<s+a;x+=u*m){rndX=i?x+(2*Math.random()-1)*f>>0:x,rndY=i?c+(2*Math.random()-1)*f>>0:c;var C=rndX-a,w=rndY-a;C<0&&(C=0),w<0&&(w=0);var P=rndX+n.left,I=rndY+n.top;P<0&&(P=0),P>l&&(P=l),I<0&&(I=0),I>p&&(I=p);var D=u,M=u;D+C>s&&(D=s-C),M+w>o&&(M=o-w),D<1&&(D=1),M<1&&(M=1),v.drawImage(d,C,w,D,M,0,0,1,1);var b=v.getImageData(0,0,1,1).data;h.fillStyle="rgb("+b[0]+","+b[1]+","+b[2]+")",h.beginPath(),h.arc(P,I,a,0,2*Math.PI,!0),h.closePath(),h.fill()}return t.useData=!1,!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.removenoise={process:function(t){if(Pixastic.Client.hasCanvasImageData()){var a=Pixastic.prepareData(t),e=t.options.rect,i=e.width,r=e.height,n=4*i,s=r;do{var o=(s-1)*n,c=(1==s?0:s-2)*i*4,h=(s==r?s-1:s)*i*4,l=i;do{var p,g,v,d,u,f,m=o+(4*l-4),x=c+4*(1==l?0:l-2),C=h+4*(l==i?l-1:l);p=g=a[x];var w=a[m-4],P=a[m+4],I=a[C];w<p&&(p=w),P<p&&(p=P),I<p&&(p=I),w>g&&(g=w),P>g&&(g=P),I>g&&(g=I),v=d=a[x+1];var D=a[m-3],M=a[m+5],b=a[C+1];D<v&&(v=D),M<v&&(v=M),b<v&&(v=b),D>d&&(d=D),M>d&&(d=M),b>d&&(d=b),u=f=a[x+2];var y=a[m-2],_=a[m+6],k=a[C+2];y<u&&(u=y),_<u&&(u=_),k<u&&(u=k),y>f&&(f=y),_>f&&(f=_),k>f&&(f=k),a[m]>g?a[m]=g:a[m]<p&&(a[m]=p),a[m+1]>d?a[m+1]=d:a[m+1]<v&&(a[m+1]=v),a[m+2]>f?a[m+2]=f:a[m+2]<u&&(a[m+2]=u)}while(--l)}while(--s);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.resize={process:function(t){if(Pixastic.Client.hasCanvas()){var a=parseInt(t.options.width,10),e=parseInt(t.options.height,10),i=t.canvas;a<1&&(a=1),a<2&&(a=2);var r=document.createElement("canvas");return r.width=a,r.height=e,r.getContext("2d").drawImage(i,0,0,a,e),i.width=a,i.height=e,i.getContext("2d").drawImage(r,0,0),t.useData=!1,!0}},checkSupport:function(){return Pixastic.Client.hasCanvas()}},Pixastic.Actions.rotate={process:function(t){if(Pixastic.Client.hasCanvas()){var a=t.canvas,e=t.width,i=t.height,r=document.createElement("canvas");r.width=e,r.height=i,r.getContext("2d").drawImage(a,0,0,e,i);var n=-parseFloat(t.options.angle)*Math.PI/180,s=n;s>.5*Math.PI&&(s=Math.PI-s),s<.5*-Math.PI&&(s=-Math.PI-s);var o=Math.sqrt(e*e+i*i),c=Math.abs(s)-Math.abs(Math.atan2(i,e)),h=Math.abs(s)+Math.abs(Math.atan2(i,e)),l=Math.abs(Math.cos(c)*o),p=Math.abs(Math.sin(h)*o);a.width=l,a.height=p;var g=a.getContext("2d");return g.translate(l/2,p/2),g.rotate(n),g.drawImage(r,-e/2,-i/2),t.useData=!1,!0}},checkSupport:function(){return Pixastic.Client.hasCanvas()}},Pixastic.Actions.sepia={process:function(t){var a=parseInt(t.options.mode,10)||0;if(a<0&&(a=0),a>1&&(a=1),Pixastic.Client.hasCanvasImageData()){var e=Pixastic.prepareData(t),i=t.options.rect,r=i.width,n=4*r,s=i.height;do{var o=(s-1)*n,c=r;do{var h=o+4*(c-1);if(a)var l=.299*e[h]+.587*e[h+1]+.114*e[h+2],p=l+39,g=l+14,v=l-36;else{var d=e[h],u=e[h+1],f=e[h+2];p=.393*d+.769*u+.189*f,g=.349*d+.686*u+.168*f,v=.272*d+.534*u+.131*f}p<0&&(p=0),p>255&&(p=255),g<0&&(g=0),g>255&&(g=255),v<0&&(v=0),v>255&&(v=255),e[h]=p,e[h+1]=g,e[h+2]=v}while(--c)}while(--s);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.sharpen={process:function(t){var a=0;if(void 0!==t.options.amount&&(a=parseFloat(t.options.amount)||0),a<0&&(a=0),a>1&&(a=1),Pixastic.Client.hasCanvasImageData()){for(var e=Pixastic.prepareData(t),i=Pixastic.prepareData(t,!0),r=15,n=1+3*a,s=[[0,-n,0],[-n,r,-n],[0,-n,0]],o=0,c=0;c<3;c++)for(var h=0;h<3;h++)o+=s[c][h];o=1/o;var l=t.options.rect,p=l.width,g=l.height;r*=o,n*=o;var v=4*p,d=g;do{var u=(d-1)*v,f=(1==d?0:d-2)*v,m=(d==g?d-1:d)*v,x=p;do{var C=u+(4*x-4),w=f+4*(1==x?0:x-2),P=m+4*(x==p?x-1:x),I=(-i[w]-i[C-4]-i[C+4]-i[P])*n+i[C]*r,D=(-i[w+1]-i[C-3]-i[C+5]-i[P+1])*n+i[C+1]*r,M=(-i[w+2]-i[C-2]-i[C+6]-i[P+2])*n+i[C+2]*r;I<0&&(I=0),D<0&&(D=0),M<0&&(M=0),I>255&&(I=255),D>255&&(D=255),M>255&&(M=255),e[C]=I,e[C+1]=D,e[C+2]=M}while(--x)}while(--d);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.solarize={process:function(t){!t.options.average||t.options.average;if(Pixastic.Client.hasCanvasImageData()){var a=Pixastic.prepareData(t),e=t.options.rect,i=e.width,r=4*i,n=e.height;do{var s=(n-1)*r,o=i;do{var c=s+4*(o-1),h=a[c],l=a[c+1],p=a[c+2];h>127&&(h=255-h),l>127&&(l=255-l),p>127&&(p=255-p),a[c]=h,a[c+1]=l,a[c+2]=p}while(--o)}while(--n);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}},Pixastic.Actions.unsharpmask={process:function(t){var a=parseFloat(t.options.amount)||0,e=parseFloat(t.options.radius)||0,i=parseFloat(t.options.threshold)||0;a=Math.min(500,Math.max(0,a))/2,e=Math.min(5,Math.max(0,e))/10,i=Math.min(255,Math.max(0,i));var r=- --i;if(a*=.016,a++,Pixastic.Client.hasCanvasImageData()){var n=t.options.rect,s=document.createElement("canvas");s.width=t.width,s.height=t.height;var o=s.getContext("2d");o.drawImage(t.canvas,0,0);var c=Math.round(t.width/2),h=Math.round(t.height/2),l=document.createElement("canvas");l.width=c,l.height=h;for(var p=Math.round(20*e),g=l.getContext("2d"),v=0;v<p;v++){var d=Math.max(1,Math.round(c-v)),u=Math.max(1,Math.round(h-v));g.clearRect(0,0,c,h),g.drawImage(s,0,0,t.width,t.height,0,0,d,u),o.clearRect(0,0,t.width,t.height),o.drawImage(l,0,0,d,u,0,0,t.width,t.height)}var f=Pixastic.prepareData(t),m=Pixastic.prepareData({canvas:s,options:t.options}),x=n.width,C=4*x,w=n.height;do{var P=(w-1)*C,I=x;do{var D=P+(4*I-4),M=f[D]-m[D];if(M>i||M<r){var b=m[D];b=a*M+b,f[D]=b>255?255:b<0?0:b}var y=f[D+1]-m[D+1];if(y>i||y<r){var _=m[D+1];_=a*y+_,f[D+1]=_>255?255:_<0?0:_}var k=f[D+2]-m[D+2];if(k>i||k<r){var A=m[D+2];A=a*k+A,f[D+2]=A>255?255:A<0?0:A}}while(--I)}while(--w);return!0}},checkSupport:function(){return Pixastic.Client.hasCanvasImageData()}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var prettyPrint=function(){var e={el:function(t,n){var o,r=document.createElement(t);if((n=e.merge({},n))&&n.style){n.style;e.applyCSS(r,n.style),delete n.style}for(o in n)n.hasOwnProperty(o)&&(r[o]=n[o]);return r},applyCSS:function(e,t){for(var n in t)if(t.hasOwnProperty(n))try{e.style[n]=t[n]}catch(e){}},txt:function(e){return document.createTextNode(e)},row:function(t,n,o){o=o||"td";var r,a=e.count(t,null)+1,d=e.el("tr"),i={style:e.getStyles(o,n),colSpan:a,onmouseover:function(){var t=this.parentNode.childNodes;e.forEach(t,(function(t){"td"===t.nodeName.toLowerCase()&&e.applyCSS(t,e.getStyles("td_hover",n))}))},onmouseout:function(){var t=this.parentNode.childNodes;e.forEach(t,(function(t){"td"===t.nodeName.toLowerCase()&&e.applyCSS(t,e.getStyles("td",n))}))}};return e.forEach(t,(function(t){null!==t&&(r=e.el(o,i),t.nodeType?r.appendChild(t):r.innerHTML=e.shorten(t.toString()),d.appendChild(r))})),d},hRow:function(t,n){return e.row(t,n,"th")},table:function(t,n){t=t||[];var o={thead:{style:e.getStyles("thead",n)},tbody:{style:e.getStyles("tbody",n)},table:{style:e.getStyles("table",n)}},r=e.el("table",o.table),a=e.el("thead",o.thead),d=e.el("tbody",o.tbody);return t.length&&(r.appendChild(a),a.appendChild(e.hRow(t,n))),r.appendChild(d),{node:r,tbody:d,thead:a,appendChild:function(e){this.tbody.appendChild(e)},addRow:function(t,o,r){return this.appendChild(e.row.call(e,t,o||n,r)),this}}},shorten:function(e){return(e=e.replace(/^\s\s*|\s\s*$|\n/g,"")).length>40?e.substring(0,39)+"...":e},htmlentities:function(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},merge:function(t,n){for(var o in"object"!=typeof t&&(t={}),n)if(n.hasOwnProperty(o)){var r=n[o];if("object"==typeof r){t[o]=e.merge(t[o],r);continue}t[o]=r}for(var a=2,d=arguments.length;a<d;a++)e.merge(t,arguments[a]);return t},count:function(e,t){for(var n=0,o=0,r=e.length;o<r;o++)e[o]===t&&n++;return n},thead:function(e){return e.getElementsByTagName("thead")[0]},forEach:function(e,t,n){n||(n=t);for(var o=e.length,r=-1;++r<o&&!1!==n(e[r],r,e););return!0},type:function(e){try{if(null===e)return"null";if(void 0===e)return"undefined";var t=Object.prototype.toString.call(e).match(/\s(.+?)\]/)[1].toLowerCase();return e.nodeType?1===e.nodeType?"domelement":"domnode":/^(string|number|array|regexp|function|date|boolean)$/.test(t)?t:"object"==typeof e?e.jquery&&"string"==typeof e.jquery?"jquery":"object":e===window||e===document?"object":"default"}catch(e){return"default"}},within:function(e){return{is:function(t){for(var n in e)if(e[n]===t)return n;return""}}},common:{circRef:function(n,o,r){return e.expander("[POINTS BACK TO <strong>"+o+"</strong>]","Click to show this item anyway",(function(){this.parentNode.appendChild(t(n,{maxDepth:1}))}))},depthReached:function(n,o){return e.expander("[DEPTH REACHED]","Click to show this item anyway",(function(){try{this.parentNode.appendChild(t(n,{maxDepth:1}))}catch(t){this.parentNode.appendChild(e.table(["ERROR OCCURED DURING OBJECT RETRIEVAL"],"error").addRow([t.message]).node)}}))}},getStyles:function(n,o){return o=t.settings.styles[o]||{},e.merge({},t.settings.styles.default[n],o[n])},expander:function(t,n,o){return e.el("a",{innerHTML:e.shorten(t)+' <b style="visibility:hidden;">[+]</b>',title:n,onmouseover:function(){this.getElementsByTagName("b")[0].style.visibility="visible"},onmouseout:function(){this.getElementsByTagName("b")[0].style.visibility="hidden"},onclick:function(){return this.style.display="none",o.call(this),!1},style:{cursor:"pointer"}})},stringify:function(t){var n,o=e.type(t),r=!0;if("array"===o)return n="[",e.forEach(t,(function(t,o){n+=(0===o?"":", ")+e.stringify(t)})),n+"]";if("object"==typeof t){for(var a in n="{",t)t.hasOwnProperty(a)&&(n+=(r?"":", ")+a+":"+e.stringify(t[a]),r=!1);return n+"}"}return"regexp"===o?"/"+t.source+"/":"string"===o?'"'+t.replace(/"/g,'\\"')+'"':t.toString()},headerGradient:function(){var e=document.createElement("canvas");if(!e.getContext)return"";var t=e.getContext("2d");e.height=30,e.width=1;var n=t.createLinearGradient(0,0,0,30);return n.addColorStop(0,"rgba(0,0,0,0)"),n.addColorStop(1,"rgba(0,0,0,0.25)"),t.fillStyle=n,t.fillRect(0,0,1,30),"url("+(e.toDataURL&&e.toDataURL()||"")+")"}()},t=function(n,o){o=o||{};var r=e.merge({},t.config,o),a=e.el("div"),d=(t.config,{}),i=!1;t.settings=r;var l={string:function(t){return e.txt('"'+e.shorten(t.replace(/"/g,'\\"'))+'"')},number:function(t){return e.txt(t)},regexp:function(t){var n=e.table(["RegExp",null],"regexp"),o=e.table(),a=e.expander("/"+t.source+"/","Click to show more",(function(){this.parentNode.appendChild(n.node)}));return o.addRow(["g",t.global]).addRow(["i",t.ignoreCase]).addRow(["m",t.multiline]),n.addRow(["source","/"+t.source+"/"]).addRow(["flags",o.node]).addRow(["lastIndex",t.lastIndex]),r.expanded?n.node:a},domelement:function(t,n){var o=e.table(["DOMElement",null],"domelement"),a=t.nodeName||"";return o.addRow(["tag","<"+a.toLowerCase()+">"]),e.forEach(["id","className","innerHTML","src","href"],(function(n){t[n]&&o.addRow([n,e.htmlentities(t[n])])})),r.expanded?o.node:e.expander("DOMElement ("+a.toLowerCase()+")","Click to show more",(function(){this.parentNode.appendChild(o.node)}))},domnode:function(t){var n=e.table(["DOMNode",null],"domelement"),o=e.htmlentities((t.data||"UNDEFINED").replace(/\n/g,"\\n"));return n.addRow(["nodeType",t.nodeType+" ("+t.nodeName+")"]).addRow(["data",o]),r.expanded?n.node:e.expander("DOMNode","Click to show more",(function(){this.parentNode.appendChild(n.node)}))},jquery:function(e,t,n){return l.array(e,t,n,!0)},object:function(t,n,o){var a=e.within(d).is(t);if(a)return e.common.circRef(t,a,r);if(d[o||"TOP"]=t,n===r.maxDepth)return e.common.depthReached(t,r);var c=e.table(["Object",null],"object"),u=!0;for(var s in t)if(!t.hasOwnProperty||t.hasOwnProperty(s)){var p=t[s],h=e.type(p);u=!1;try{c.addRow([s,l[h](p,n+1,s)],h)}catch(e){window.console&&window.console.log&&console.log(e.message)}}u?c.addRow(["<small>[empty]</small>"]):c.thead.appendChild(e.hRow(["key","value"],"colHeader"));var f=r.expanded||i?c.node:e.expander(e.stringify(t),"Click to show more",(function(){this.parentNode.appendChild(c.node)}));return i=!0,f},array:function(t,n,o,a){var i=e.within(d).is(t);if(i)return e.common.circRef(t,i);if(d[o||"TOP"]=t,n===r.maxDepth)return e.common.depthReached(t);var c=a?"jQuery":"Array",u=e.table([c+"("+t.length+")",null],a?"jquery":c.toLowerCase()),s=!0,p=0;return a&&u.addRow(["selector",t.selector]),e.forEach(t,(function(o,a){if(r.maxArray>=0&&++p>r.maxArray)return u.addRow([a+".."+(t.length-1),l[e.type(o)]("...",n+1,a)]),!1;s=!1,u.addRow([a,l[e.type(o)](o,n+1,a)])})),a||(s?u.addRow(["<small>[empty]</small>"]):u.thead.appendChild(e.hRow(["index","value"],"colHeader"))),r.expanded?u.node:e.expander(e.stringify(t),"Click to show more",(function(){this.parentNode.appendChild(u.node)}))},function:function(t,n,o){var a=e.within(d).is(t);if(a)return e.common.circRef(t,a);d[o||"TOP"]=t;var i=e.table(["Function",null],"function"),l=(e.table(["Arguments"]),t.toString().match(/\((.+?)\)/)),c=t.toString().match(/\(.*?\)\s+?\{?([\S\s]+)/)[1].replace(/\}?$/,"");return i.addRow(["arguments",l?l[1].replace(/[^\w_,\s]/g,""):"<small>[none/native]</small>"]).addRow(["body",c]),r.expanded?i.node:e.expander("function(){...}","Click to see more about this function.",(function(){this.parentNode.appendChild(i.node)}))},date:function(t){var n=e.table(["Date",null],"date"),o=t.toString().split(/\s/);return n.addRow(["Time",o[4]]).addRow(["Date",o.slice(0,4).join("-")]),r.expanded?n.node:e.expander("Date (timestamp): "+ +t,"Click to see a little more info about this date",(function(){this.parentNode.appendChild(n.node)}))},boolean:function(t){return e.txt(t.toString().toUpperCase())},undefined:function(){return e.txt("UNDEFINED")},null:function(){return e.txt("NULL")},default:function(){return e.txt("prettyPrint: TypeNotFound Error")}};return a.appendChild(l[r.forceObject?"object":e.type(n)](n,0)),a};return t.config={expanded:!0,forceObject:!1,maxDepth:3,maxArray:-1,styles:{array:{th:{backgroundColor:"#6DBD2A",color:"white"}},function:{th:{backgroundColor:"#D82525"}},regexp:{th:{backgroundColor:"#E2F3FB",color:"#000"}},object:{th:{backgroundColor:"#1F96CF"}},jquery:{th:{backgroundColor:"#FBF315"}},error:{th:{backgroundColor:"red",color:"yellow"}},domelement:{th:{backgroundColor:"#F3801E"}},date:{th:{backgroundColor:"#A725D8"}},colHeader:{th:{backgroundColor:"#EEE",color:"#000",textTransform:"uppercase"}},default:{table:{borderCollapse:"collapse",width:"100%"},td:{padding:"5px",fontSize:"12px",backgroundColor:"#FFF",color:"#222",border:"1px solid #000",verticalAlign:"top",fontFamily:'"Consolas","Lucida Console",Courier,mono',whiteSpace:"nowrap"},td_hover:{},th:{padding:"5px",fontSize:"12px",backgroundColor:"#222",color:"#EEE",textAlign:"left",border:"1px solid #000",verticalAlign:"top",fontFamily:'"Consolas","Lucida Console",Courier,mono',backgroundImage:e.headerGradient,backgroundRepeat:"repeat-x"}}}},t}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function Arcfour(){this.i=0,this.j=0,this.S=new Array}function ARC4init(i){var t,s,h;for(t=0;t<256;++t)this.S[t]=t;for(s=0,t=0;t<256;++t)s=s+this.S[t]+i[t%i.length]&255,h=this.S[t],this.S[t]=this.S[s],this.S[s]=h;this.i=0,this.j=0}function ARC4next(){var i;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,i=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=i,this.S[i+this.S[this.i]&255]}function prng_newstate(){return new Arcfour}Arcfour.prototype.init=ARC4init,Arcfour.prototype.next=ARC4next;var rng_psize=256;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Uint8Array.prototype.toJSArray=function(){if(1==this.length)return[this[0]];for(var t=this.length,i=new Array(t),s=0;s<t;s++)i[s]=this[s];return i},wdi.FixedQueue=$.spcExtend(wdi.DomainObject,{q:null,size:10485760,grow:10485760,woffset:0,roffset:0,init:function(t){this.q=new Uint8Array(this.size)},setData:function(t){this.woffset=t.length,this.roffset=0,this.q.set(t)},shift:function(t){if(this.roffset+t>this.woffset)throw"Not enough queue to read";var i=this.q.subarray(this.roffset,this.roffset+t);return this.roffset=this.roffset+t,this.woffset==this.roffset&&(this.woffset=0,this.roffset=0),i},push:function(t){if(this.woffset+t.byteLength>this.size){var i=this.q;this.size+=this.grow,this.q=new Uint8Array(this.size),this.q.set(i)}this.q.set(t,this.woffset),this.woffset+=t.byteLength},getLength:function(){return this.woffset-this.roffset}}),wdi.Queue=$.spcExtend(wdi.DomainObject,{q:null,raw:!1,init:function(t){t.raw&&(this.raw=t.raw),this.q=new Uint8Array(0)},getData:function(){return this.toJSArray(this.q)},setData:function(t){this.q=new Uint8Array(t.length),this.q.set(t)},shift:function(){var t=arguments[0]||this.getLength();if(t===this.q.length){var i=this.q;this.q=new Uint8Array(0)}else{i=this.q.subarray(0,t);this.q=this.q.subarray(t)}return this.toJSArray(i)},peek:function(t,i){var s=null;return s=0!=t||i?this.q.subarray(t,i):this.q,this.toJSArray(s)},push:function(t){if("string"==typeof t){var i=t.length;(e=new Uint8Array(this.q.length+i)).set(this.q);for(var s=0;s<i;s++)e[s+this.q.length]=t[s];this.q=e}else{var e;if(0===this.getLength())this.q=new Uint8Array(t.length),this.q.set(t);else(e=new Uint8Array(t.length+this.q.length)).set(this.q),e.set(t,this.q.length),this.q=e}},getLength:function(){return this.q.length},toJSArray:function(t){return this.raw?t:t.toJSArray()}}),wdi.ViewQueue=$.spcExtend(wdi.DomainObject,{q:null,at:null,init:function(){this.q=new Uint8Array,this.at=0},getData:function(){return this.toJSArray(this.q.subarray(this.at))},getDataOffset:function(t){return this.toJSArray(this.q.subarray(t))},getRawData:function(){return this.q.subarray(this.at)},getRawDataOffset:function(t){return this.q.subarray(t)},setData:function(t){this.q=new Uint8Array(t.length),this.q.set(t),this.at=0},shift:function(t){var i=t||this.getLength();i>this.getLength()&&(i=this.getLength());var s=this.q.subarray(0+this.at,i+this.at);return this.at+=i,this.toJSArray(s)},eatBytes:function(t){this.at+=t},getByte:function(t){return this.q[t+this.at]},peek:function(t,i){var s=null;return 0!=t||i?(i&&(i+=this.at),s=this.q.subarray(t+this.at,i)):s=this.q,this.toJSArray(s)},push:function(t){if("string"==typeof t){var i=t.length;(e=new Uint8Array(this.q.length+i)).set(this.q);for(var s=0;s<i;s++)e[s+this.q.length]=t[s];this.q=e}else{var e;if(0===this.getLength())this.q=new Uint8Array(t.length),this.q.set(t);else(e=new Uint8Array(t.length+this.q.length)).set(this.q),e.set(t,this.q.length),this.q=e}},getLength:function(){return this.q.length-this.at},getPosition:function(){return this.at},toJSArray:function(t){return 1==t.length?[t[0]]:t.toJSArray()}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.RasterEngine=$.spcExtend(wdi.EventObject.prototype,{init:function(e){this.time=Date.now(),this.clientGui=e.clientGui,this.codecH264=wdi.CodecH264,this.codecVp8=wdi.CodecVp8,this.codecH265=wdi.CodecH265},dispose:function(){this.clientGui=null},drawCanvas:function(e){return wdi.Debug.log("rasterEngine",this.time),this.clientGui.drawCanvas(e)},removeCanvas:function(e){return this.clientGui.removeCanvas(e)},invalList:function(e){var t=e.args.items,i=null;for(var a in t)i=t[a],wdi.ImageCache.delImage(i.id)},handleStreamCreate:function(e){var t=e.args;switch(t.computedBox=wdi.graphics.getBoxFromSrcArea(t.rect),wdi.Stream.addStream(e.args.id,t),console.log("%chandleStreamCreate","color:rgb(100,255,100)"),t.codec){case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_H264:this.handleH264StreamCreate(t.id);break;case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_VP8:this.handleVp8StreamCreate(t.id);break;case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_VP9:break;case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_H265:this.handleH265StreamCreate(t.id)}wdi.graphicDebug&&wdi.graphicDebug.handleStreamInfo()},handleVp8StreamCreate:function(e){this.codecVp8.create(e)},handleH265StreamCreate:async function(e){const t=wdi.Stream.getStream(e),i=this.clientGui.getContext(t.surface_id),a=t.computedBox;this.codecH265.create(e,i,a)},handleH264StreamCreate:function(e){this.codecH264.create(e)},handleStreamData:function(e){switch(wdi.Stream.getStream(e.args.id).codec){case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_H264:this.handleH264Stream(e);break;case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_VP8:this.handleVp8Stream(e);break;case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_VP9:break;case wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_H265:this.handleH265Stream(e);break;default:this.handleMjpegStream(e)}},handleStreamClip:function(e){wdi.Stream.clip(e.args.id,e.args.clip),wdi.Stream.startTransition(e.args.id),console.log("%chandleStreamClip","color:rgb(100,100,255)")},handleStreamDataSized:function(e){},handleStreamActiveReport:function(e){},handleStreamDestroy:function(e){wdi.Stream.deleteStream(e.args.surface_id),this.codecH264.destroy(e.args.surface_id),this.codecVp8.destroy(),this.codecH265.destroy(),wdi.graphicDebug&&wdi.graphicDebug.handleStreamInfo(),console.log("%chandleStreamDestroy","color:rgb(255,100,100)")},handleMjpegStream:function(e){var t,i=e.args.data,a=wdi.Stream.getStream(e.args.id),r=this.clientGui.getContext(a.surface_id),d=wdi.GlobalPool.create("Image");wdi.ExecutionControl.sync=!0,d.onload=function(){URL.revokeObjectURL(t);var e=a.computedBox;if(!a.flags&wdi.SpiceStreamFlags.SPICE_STREAM_FLAGS_TOP_DOWN){var i=e.x+this.width/2,d=e.y+this.height/2;r.save(),r.translate(i,d),r.rotate(Math.PI),r.scale(-1,1),r.drawImage(this,e.x-i,e.y-d,e.width,e.height),r.restore()}else r.drawImage(this,e.x,e.y,e.width,e.height)},d.onerror=function(){URL.revokeObjectURL(t)},t=wdi.SpiceObject.bytesToURI(i),d.src=t},handleH264Stream:function(e){var t=e.args.data,i=wdi.Stream.getStream(e.args.id);if(this.codecH264.isReady[i.id]){var a=this.clientGui.getContext(i.surface_id);wdi.ExecutionControl.sync=!0,wdi.Stream.endTransition(e.args.id),this.codecH264.loadedVideo[i.id]=()=>{var e=i.computedBox;if(!i.flags&wdi.SpiceStreamFlags.SPICE_STREAM_FLAGS_TOP_DOWN){var t=e.x+this.codecH264.video[i.id].width/2,r=e.y+this.codecH264.video[i.id].height/2;a.save(),a.translate(t,r),a.rotate(Math.PI),a.scale(-1,1),a.drawImage(this.codecH264.video[i.id],e.x-t,e.y-r,e.width,e.height),a.restore()}else{if(!this.codecH264.video[i.id]||!this.codecH264.loadedVideo[i.id])return;if(i.transiting)return void requestAnimationFrame(this.codecH264.loadedVideo[i.id]);a.drawImage(this.codecH264.video[i.id],e.x,e.y,e.width,e.height),requestAnimationFrame(this.codecH264.loadedVideo[i.id])}},this.codecH264.feed(i.id,t)}else this.codecH264.addQueue(i.id,t)},handleH265Stream:function(e){const t=e.args.data,i=wdi.Stream.getStream(e.args.id),a=i.computedBox;this.codecH265.isReady[i.id]?(this.codecH265.configed[i.id]||this.codecH265.setConfig(i.id,a),this.codecH265.decode(i.id,t)):this.codecH265.addQueue(i.id,t)},handleVp8Stream:function(e){var t=e.args.data,i=wdi.Stream.getStream(e.args.id),a=this.clientGui.getContext(i.surface_id),r=i.computedBox;this.codecVp8.feed(i.id,t,a,r)},drawRop3:function(e){var t=wdi.graphics.getBoxFromSrcArea(e.args.base.box),i=this.clientGui.getContext(e.args.base.surface_id),a=i.getImageData(t.x,t.y,t.width,t.height),r=this.clientGui,d=e.args.brush,s=e.args.rop_descriptor,g=wdi.graphics.getBoxFromSrcArea(e.args.src_area);wdi.graphics.getImageFromSpice(e.args.src_image.imageDescriptor,e.args.src_image.data,this.clientGui,(function(e){if(e){var c=e.getContext("2d").getImageData(g.x,g.y,g.width,g.height),o=c.data,h=wdi.graphics.getNewTmpCanvas(t.width,t.height),n=h.getContext("2d"),w={width:t.width,height:t.height,x:0,y:0};wdi.graphics.setBrush(r,n,d,w,wdi.SpiceRopd.SPICE_ROPD_OP_PUT);var l=n.getImageData(0,0,t.width,t.height),p=l.data,m=a.data,u=(n=(h=wdi.graphics.getNewTmpCanvas(t.width,t.height)).getContext("2d")).createImageData(t.width,t.height),S=u.data;c.width!=l.width||c.width!=a.width||c.height!=l.height||(c.height,a.height);for(var f=m.length,C=wdi.Rop3[s],_=0;_<f;_+=4)S[_]=255&C(p[_],o[_],m[_]),S[_+1]=255&C(p[_+1],o[_+1],m[_+1]),S[_+2]=255&C(p[_+2],o[_+2],m[_+2]),S[_+3]=255;n.putImageData(u,0,0),this.drawClip(h,t,i)}else wdi.Debug.log("Unable to get image!")}),this)},drawInvers:function(e){var t=e.args.base,i=wdi.graphics.getBoxFromSrcArea(t.box),a=t.surface_id,r=this.clientGui.getContext(a),d=wdi.graphics.getRect(i,r.canvas),s=wdi.RasterOperation.process(wdi.SpiceRopd.SPICE_ROPD_OP_INVERS,null,d);r.drawImage(s,i.x,i.y,i.width,i.height)},drawStroke:function(e){var t,i,a,r,d=e.args,s=this.clientGui.getContext(e.args.base.surface_id),g=d.brush.color.html_color,c=d.path.num_segments;d.attr.flags&wdi.SpiceLineFlags.SPICE_LINE_FLAGS_STYLED&&wdi.Debug.log("SPICE_LINE_FLAGS_STYLED");for(var o=0;o<c;o++){if((r=d.path.segments[o]).flags&wdi.SpicePathFlags.SPICE_PATH_BEGIN&&(s.beginPath(),s.moveTo(r.points[0].x,r.points[0].y),s.strokeStyle=g,s.lineWidth=1),r.flags&wdi.SpicePathFlags.SPICE_PATH_BEZIER){if((t=r.points.length)%3==0)for(a=0;a<t;a+=3)s.bezierCurveTo(r.points[a].x,r.points[a].y,r.points[a+1].x,r.points[a+1].y,r.points[a+2].x,r.points[a+2].y)}else for(t=r.points.length,a=0;a<t;a++)0==a&&(i=r.points[a]),s.lineTo(r.points[a].x+.5,r.points[a].y+.5);r.flags&wdi.SpicePathFlags.SPICE_PATH_END&&(r.flags&wdi.SpicePathFlags.SPICE_PATH_CLOSE&&s.lineTo(i.x+.5,i.y+.5),s.stroke(),s.closePath())}},drawImage:function(e){var t=e.args,i=t.base,a=i.surface_id,r=t.rop_descriptor,d=(t.scale_mode,wdi.graphics.getBoxFromSrcArea(t.src_area)),s=wdi.graphics.getBoxFromSrcArea(i.box);window.vdiLoadTest&&void 0===window.firstImage&&(window.firstImage=!0),wdi.graphics.getImageFromSpice(t.image.imageDescriptor,t.image.data,this.clientGui,(function(e){if(e){var t;if(window.firstImage)t=e.getContext?e.getContext("2d").getImageData(0,0,e.width,e.height).data.buffer.slice(0):e.data.buffer.slice(0),window.firstImageData=t,window.firstImage=!1;var i=!1;if(d.width!==s.width&&d.height!==s.height){i=!0,e=wdi.graphics.getRect(d,e),e=wdi.graphics.getImageFromData(e);var g=wdi.graphics.getNewTmpCanvas(s.width,s.height);g.getContext("2d").drawImage(e,0,0,d.width,d.height,0,0,s.width,s.height),e=g}if(r!==wdi.SpiceRopd.SPICE_ROPD_OP_PUT){i||(e=wdi.graphics.getRect(d,e));var c=wdi.graphics.getRect(s,this.clientGui.getCanvas(a));e=wdi.RasterOperation.process(r,e,c)}var o=this.clientGui.getContext(a);e instanceof ImageData?i?o.putImageData(e,s.x,s.y,0,0,s.width,s.height):o.putImageData(e,s.x,s.y,d.x,d.y,d.width,d.height):i?o.drawImage(e,s.x,s.y,s.width,s.height):o.drawImage(e,d.x,d.y,d.width,d.height,s.x,s.y,s.width,s.height)}else wdi.Debug.log("Unable to get image!")}),this,{opaque:!0,brush:t.brush,raw:!1})},drawClip:function(e,t,i){i.drawImage(e,t.x,t.y,t.width,t.height)},drawFill:function(e){var t=e.args,i=this.clientGui.getContext(t.base.surface_id),a=wdi.graphics.getBoxFromSrcArea(t.base.box),r=t.brush,d=t.rop_descriptor;wdi.graphics.setBrush(this.clientGui,i,r,a,d)},drawCopyBits:function(e){var t=e.args.base,i=t.surface_id,a=e.args.src_position,r=this.clientGui.getContext(i),d=t.box,s=d.right-d.left,g=d.bottom-d.top;r.drawImage(r.canvas,a.x,a.y,s,g,t.box.left,t.box.top,s,g)},drawBlend:function(e){var t=e.args.image.imageDescriptor,i=e.args.base,a=e.args.image.data,r=e.args.base.surface_id,d=e.args.rop_descriptor;e.args.flags;wdi.graphics.getImageFromSpice(t,a,this.clientGui,(function(t){if(t){var a=wdi.graphics.getBoxFromSrcArea(e.args.src_area);t=wdi.graphics.getRect(a,t);var s=wdi.graphics.getBoxFromSrcArea(i.box),g=wdi.graphics.getRect(s,this.clientGui.getCanvas(r)),c=wdi.RasterOperation.process(d,t,g);this.clientGui.getCanvas(r).getContext("2d").drawImage(c,s.x,s.y,s.width,s.height)}else wdi.Debug.log("There is no image on Blend")}),this)},drawAlphaBlend:function(e){var t=e.args.image.imageDescriptor,i=e.args.base,a=e.args.image.data,r=e.args.base.surface_id,d=e.args.alpha_flags,s=e.args.alpha;wdi.graphics.getImageFromSpice(t,a,this.clientGui,(function(t){t||wdi.Debug.log("There is no image on drawAlphaBlend");var a=wdi.graphics.getBoxFromSrcArea(e.args.src_area);t=wdi.graphics.getRect(a,t);var g=wdi.graphics.getBoxFromSrcArea(i.box),c=wdi.graphics.getRect(g,this.clientGui.getCanvas(r));if(a.width!==g.width&&a.height!==g.height){var o=wdi.graphics.getNewTmpCanvas(g.width,g.height);o.getContext("2d").drawImage(t,0,0,a.width,a.height,0,0,g.width,g.height),t=o}for(var h,n,w,l,p,m,u,S=wdi.graphics.getDataFromImage(t).data,f=wdi.graphics.getDataFromImage(c).data,C=S.length-1,_=wdi.graphics.getNewTmpCanvas(g.width,g.height),x=_.getContext("2d").createImageData(g.width,g.height),I=x.data,v=0;v<C;v+=4)h=S[v],w=S[v+1],p=S[v+2],u=d||255===s?S[v+3]:s,n=f[v],l=f[v+1],m=f[v+2],u>30&&255===s?(I[v]=n*(255-u)/255+h&255,I[v+1]=l*(255-u)/255+w&255,I[v+2]=m*(255-u)/255+p&255):(I[v]=(h*u+n*(255-u))/255&255,I[v+1]=(w*u+l*(255-u))/255&255,I[v+2]=(p*u+m*(255-u))/255&255),I[v+3]=255;_.getContext("2d").putImageData(x,0,0),this.drawClip(_,g,this.clientGui.getContext(r))}),this)},drawWhiteness:function(e){var t=e.args.base,i=this.clientGui.getContext(t.surface_id),a=wdi.graphics.getBoxFromSrcArea(t.box);i.fillStyle="white",i.fillRect(a.x,a.y,a.width,a.height)},drawBlackness:function(e){var t=e.args.base,i=this.clientGui.getContext(t.surface_id),a=wdi.graphics.getBoxFromSrcArea(t.box);i.fillStyle="black",i.fillRect(a.x,a.y,a.width,a.height)},drawTransparent:function(e){var t=e.args.base,i=t.surface_id,a=wdi.graphics.getBoxFromSrcArea(e.args.src_area),r=wdi.graphics.getBoxFromSrcArea(t.box),d=this.clientGui.getContext(i).getImageData(r.x,r.y,r.width,r.height);wdi.graphics.getImageFromSpice(e.args.image.imageDescriptor,e.args.image.data,this.clientGui,(function(t){if(t){t=wdi.graphics.getRect(a,t);for(var s=wdi.graphics.getDataFromImage(t).data,g=d.data,c=s.length-1,o=this.clientGui.getContext(i).createImageData(r.width,r.height),h=e.args.transparent_true_color;c>0;)o.data[c]=255,s[c-1]===h.b&&s[c-2]===h.g&&s[c-3]===h.r?(o.data[c-1]=g[c-1],o.data[c-2]=g[c-2],o.data[c-3]=g[c-3]):(o.data[c-1]=s[c-1],o.data[c-2]=s[c-2],o.data[c-3]=s[c-3]),c-=4;var n=wdi.graphics.getImageFromData(o);this.drawClip(n,r,this.clientGui.getContext(i))}else wdi.Debug.log("Unable to get image!")}),this)},drawText:function(e){var t=this.clientGui.getContext(e.args.base.surface_id),i=(e.args.base.box,e.args.base.clip),a=e.args,r=a.glyph_string,d=1===r.flags?1:2*r.flags;0!==a.back_mode&&wdi.graphics.drawBackText(this.clientGui,t,a),wdi.graphics.drawString(t,r,d,a.fore_brush,i.type,this)},invalPalettes:function(e){wdi.ImageCache.clearPalettes()},handleReset:function(e){}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var rng_state,rng_pool,rng_pptr;function rng_seed_int(r){rng_pool[rng_pptr++]^=255&r,rng_pool[rng_pptr++]^=r>>8&255,rng_pool[rng_pptr++]^=r>>16&255,rng_pool[rng_pptr++]^=r>>24&255,rng_pptr>=rng_psize&&(rng_pptr-=rng_psize)}function rng_seed_time(){rng_seed_int((new Date).getTime())}if(null==rng_pool){var t;if(rng_pool=new Array,rng_pptr=0,"Netscape"==navigator.appName&&navigator.appVersion<"5"&&window.crypto){var z=window.crypto.random(32);for(t=0;t<z.length;++t)rng_pool[rng_pptr++]=255&z.charCodeAt(t)}for(;rng_pptr<rng_psize;)t=Math.floor(65536*Math.random()),rng_pool[rng_pptr++]=t>>>8,rng_pool[rng_pptr++]=255&t;rng_pptr=0,rng_seed_time()}function rng_get_byte(){if(null==rng_state){for(rng_seed_time(),(rng_state=prng_newstate()).init(rng_pool),rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}function rng_get_bytes(r){var n;for(n=0;n<r.length;++n)r[n]=rng_get_byte()}function SecureRandom(){}SecureRandom.prototype.nextBytes=rng_get_bytes;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.RunQueue=$.spcExtend(wdi.DomainObject,{tasks:null,isRunning:!1,init:function(){this.tasks=[]},getTasksLength:function(){return this.tasks.length},add:function(n,s,i,t){return this.tasks.push({fn:n,scope:s,fnFinish:i,params:t}),this},clear:function(){return wdi.Debug.log("runqueue clear"),this.tasks=[],this},_process:function(){wdi.ExecutionControl.sync=!0;var n,s=this;this.isRunning=!0;var i=this.tasks.shift();if(i){n={end:function(){i.fnFinish&&i.fnFinish.call(i.scope),s._process()}};try{i.fn.call(i.scope,n,i.params)}catch(s){wdi.Debug.error(s.message),n.end()}return this}this.isRunning=!1},process:function(){this.isRunning||this._process()}}),wdi.ExecutionControl={currentProxy:null,sync:!0,runQ:new wdi.RunQueue};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function sha1Hash(r){for(var t=[1518500249,1859775393,2400959708,3395469782],o=(r+=String.fromCharCode(128)).length/4+2,e=Math.ceil(o/16),a=new Array(e),n=0;n<e;n++){a[n]=new Array(16);for(var h=0;h<16;h++)a[n][h]=r.charCodeAt(64*n+4*h)<<24|r.charCodeAt(64*n+4*h+1)<<16|r.charCodeAt(64*n+4*h+2)<<8|r.charCodeAt(64*n+4*h+3)}a[e-1][14]=8*(r.length-1)/Math.pow(2,32),a[e-1][14]=Math.floor(a[e-1][14]),a[e-1][15]=8*(r.length-1)&4294967295;var c,u,i,s,S,A=1732584193,H=4023233417,l=2562383102,v=271733878,x=3285377520,C=new Array(80);for(n=0;n<e;n++){for(var d=0;d<16;d++)C[d]=a[n][d];for(d=16;d<80;d++)C[d]=ROTL(C[d-3]^C[d-8]^C[d-14]^C[d-16],1);c=A,u=H,i=l,s=v,S=x;for(d=0;d<80;d++){var g=Math.floor(d/20),w=ROTL(c,5)+f(g,u,i,s)+S+t[g]+C[d]&4294967295;S=s,s=i,i=ROTL(u,30),u=c,c=w}A=A+c&4294967295,H=H+u&4294967295,l=l+i&4294967295,v=v+s&4294967295,x=x+S&4294967295}return A.toHexStr()+H.toHexStr()+l.toHexStr()+v.toHexStr()+x.toHexStr()}function f(r,t,o,e){switch(r){case 0:return t&o^~t&e;case 1:case 3:return t^o^e;case 2:return t&o^t&e^o&e}}function ROTL(r,t){return r<<t|r>>>32-t}Number.prototype.toHexStr=function(){for(var r="",t=7;t>=0;t--)r+=(this>>>4*t&15).toString(16);return r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.StuckKeysHandler=$.spcExtend(wdi.EventObject.prototype,{ctrlTimeoutId:null,altTimeoutId:null,shiftTimeoutId:null,shiftKeyPressed:!1,ctrlKeyPressed:!1,altKeyPressed:!1,dispose:function(){wdi.Debug.log("Disposing StuckKeysHandler"),clearTimeout(this.ctrlTimeoutId),clearTimeout(this.altTimeoutId),clearTimeout(this.shiftTimeoutId),this.ctrlTimeoutId=null,this.altTimeoutId=null,this.shiftTimeoutId=null,this.shiftKeyPressed=!1,this.ctrlKeyPressed=!1,this.altKeyPressed=!1},handleStuckKeys:function(e){if(e)switch(e.keyCode){case 16:this._handleKey("shiftTimeoutId",e.type,16);break;case 17:this._handleKey("ctrlTimeoutId",e.type,17);break;case 18:this._handleKey("altTimeoutId",e.type,18)}},releaseAllKeys:function(){var e;for(e=0;e<300;e++)this.releaseKeyPressed(e)},_handleKey:function(e,s,t){"keydown"===s?this[e]=this._configureTimeout(t):"keyup"===s&&clearTimeout(this[e])},_configureTimeout:function(e){var s=this;return setTimeout((function(){s.releaseKeyPressed(e)}),wdi.StuckKeysHandler.defaultTimeout)},releaseKeyPressed:function(e){var s=window.jQuery.Event("keyup");s.which=e,s.keyCode=e,s.charCode=0,s.generated=!0,this.fire("inputStuck",["keyup",[s]])},checkSpecialKey:function(e,s){switch(s){case 16:this.shiftKeyPressed="keydown"===e;break;case 17:this.ctrlKeyPressed="keydown"===e;break;case 18:this.altKeyPressed="keydown"===e}},releaseSpecialKeysPressed:function(){this.shiftKeyPressed&&(this.releaseKeyPressed(16),this.shiftKeyPressed=!1),this.ctrlKeyPressed&&(this.releaseKeyPressed(17),this.ctrlKeyPressed=!1),this.altKeyPressed&&(this.releaseKeyPressed(18),this.altKeyPressed=!1)}}),wdi.StuckKeysHandler.defaultTimeout=2e3;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.TimeLapseDetector=$.spcExtend(wdi.EventObject.prototype,{lastTime:null,init:function(t){this.superInit()},dispose:function(){this.lastTime=null},startTimer:function(){var t=this;this.lastTime=Date.now(),window.setInterval((function(){var e=Date.now(),i=e-t.lastTime;i>=t.constructor.maxIntervalAllowed&&t.fire("timeLapseDetected",i),t.lastTime=e}),wdi.TimeLapseDetector.defaultInterval)},getLastTime:function(){return this.lastTime},setLastTime:function(t){return this.lastTime=t,this}}),wdi.TimeLapseDetector.defaultInterval=5e3,wdi.TimeLapseDetector.maxIntervalAllowed=3*wdi.TimeLapseDetector.defaultInterval;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"undefined"!=typeof module&&module.exports&&(jQuery=$={isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isPlainObject:function(e){var t;if(!e||"object"!==jQuery.type(e)||e.nodeType||jQuery.isWindow(e))return!1;if(e.constructor&&!core_hasOwn.call(e,"constructor")&&!core_hasOwn.call(e.constructor.prototype,"isPrototypeOf"))return!1;for(t in e);return void 0===t||core_hasOwn.call(e,t)},extend:function(){var e,t,n,i,s,o,r=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[1]||{},a=2),l===a&&(r=this,--a);a<l;a++)if(null!=(e=arguments[a]))for(t in e)n=r[t],r!==(i=e[t])&&(c&&i&&(this.isPlainObject(i)||(s=this.isArray(i)))?(s?(s=!1,o=n&&this.isArray(n)?n:[]):o=n&&this.isPlainObject(n)?n:{},r[t]=this.extend(c,o,i)):void 0!==i&&(r[t]=i));return r}}),$.extend({spcExtend:function(e){var t=function(e){void 0!==this.init&&this.init(e||{})};t.prototype.superInit=e.init;var n=[];n.push(t.prototype);for(var i=arguments.length,s=0;s<i;s++)n.push(arguments[s]);return $.extend.apply($,n),t}}),$.extend(String.prototype,{lpad:function(e,t){for(var n=this;n.length<t;)n=e+n;return n},rpad:function(e,t){for(var n=this;n.length<t;)n+=e;return n}}),wdi={},wdi.DomainObject={},wdi.RawMessage=$.spcExtend(wdi.DomainObject,{status:null,data:null,init:function(e){this.status=e.status,this.data=e.data}}),wdi.RawSpiceMessage=$.spcExtend(wdi.DomainObject,{header:null,body:null,channel:null,set:function(e,t,n){this.header=e,this.body=t,this.channel=n}}),wdi.SpiceMessage=$.spcExtend(wdi.DomainObject,{messageType:null,args:null,channel:null,init:function(e){this.channel=e.channel,this.messageType=e.messageType,this.args=e.args}}),wdi.EventObject=$.spcExtend(wdi.DomainObject,{events:null,init:function(){this.eyeEvents={}},getListenersLength:function(e){return null==this.eyeEvents[e]&&(this.eyeEvents[e]=[]),this.eyeEvents[e].length},addListener:function(e,t,n){n=n||this,null==this.eyeEvents[e]&&(this.eyeEvents[e]=[]),this.eyeEvents[e].push({fn:t,scope:n})},removeEvent:function(e){this.eyeEvents[e]=void 0},clearEvents:function(){this.eyeEvents={}},fire:function(e,t){var n=this.eyeEvents[e];if(n)for(var i=n.length;i--;)n[i].fn.call(n[i].scope,t)}}),wdi.CHANNEL_STATUS={disconnected:-1,idle:0,establishing:1,established:2},wdi.Debug={debug:!0,log:function(e){this.debug&&console.log.apply(console,Array.prototype.slice.call(arguments))},warn:function(e){console.warn.apply(console,Array.prototype.slice.call(arguments))},info:function(e){this.debug&&console.info.apply(console,Array.prototype.slice.call(arguments))},error:function(e){console.error.apply(console,Array.prototype.slice.call(arguments))}},wdi.Utils={generateWebSocketUrl:function(e,t,n,i,s,o,r,a){return url=i&&s?CONSOLE.wsUrl:e+"://"+t+":"+n+"/websockify/destInfoToken/"+r+"/type/"+o,url}},wdi.postMessageW3CCompilant="undefined"!=typeof window&&window.bowser&&!(window.bowser.msie&&window.bowser.version>=10),wdi.Exception=$.spcExtend(wdi.DomainObject,{errorCode:null,message:null,init:function(e){this.message=e.message||"",this.errorCode=e.errorCode||0}});try{new ImageData(1,1)}catch(e){"undefined"!=typeof window&&(window.ImageData=function(e,t,n){var i=document.createElement("canvas").getContext("2d").createImageData(t,n);return i.data.set(e),i})}wdi.bppMask=[],wdi.bppMask[1]=[128,64,32,16,8,4,2,1],wdi.bppMask[4]=[240,15],wdi.bppMask[8]=[255],wdi.SeamlessIntegration=!0,wdi.Debug.debug=!1,wdi.exceptionHandling=!0,wdi.IntegrationBenchmarkEnabled=!1,wdi.useWorkers=!0,wdi.logOperations=!1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var VirtualJoystick=function(t){t=t||{},this._container=t.container||document.body,this._stickEl=t.stickElement||this._buildJoystickStick(),this._baseEl=t.baseElement||this._buildJoystickBase(),this._mouseLeft=t.mouseLeft||this._buildJoystickButton(),this._mouseSupport="mouseSupport"in t&&t.mouseSupport,this._range=t.range||60,this._timer=null,this._callback="callback"in t&&t.callback,this._callbackcontext="callbackcontext"in t?t.callbackcontext:this,this._callbackButton="callbackbutton"in t&&t.callbackbutton,this._referenceItem=t.referenceItem,this._container.style.position="relative",this._container.appendChild(this._baseEl),this._container.appendChild(this._mouseLeft),this._baseEl.style.position="absolute",this._baseEl.style.display="block",this._mouseLeft.style.position="absolute",this._mouseLeft.style.display="block";var e=$(this._referenceItem),s=e.height()-e.offset().top-130;this._baseEl.style.top=s+"px",this._baseEl.style.left="20px",this._container.appendChild(this._stickEl),this._stickEl.style.position="absolute",this._stickEl.style.display="none",this._mouseLeft.style.top=s+20+"px",this._mouseLeft.style.right="20px",this._pressed=!1,this._baseX=0,this._baseY=0,this._stickX=0,this._stickY=0,__bind=function(t,e){return function(){return t.apply(e,arguments)}},this._$onTouchStart=__bind(this._onTouchStart,this),this._$onTouchEnd=__bind(this._onTouchEnd,this),this._$onTouchMove=__bind(this._onTouchMove,this),this._$onTouchStartButton=__bind(this._onTouchStartButton,this),this._$onTouchEndButton=__bind(this._onTouchEndButton,this),this._baseEl.addEventListener("touchstart",this._$onTouchStart,!1),this._mouseLeft.addEventListener("touchstart",this._$onTouchStartButton,!1),this._mouseLeft.addEventListener("touchend",this._$onTouchEndButton,!1),this._container.addEventListener("touchend",this._$onTouchEnd,!1),this._container.addEventListener("touchmove",this._$onTouchMove,!1),this._mouseSupport&&(this._$onMouseDown=__bind(this._onMouseDown,this),this._$onMouseUp=__bind(this._onMouseUp,this),this._$onMouseMove=__bind(this._onMouseMove,this),this._$onMouseDownButton=__bind(this._onMouseDownButton,this),this._$onMouseUpButton=__bind(this._onMouseUpButton,this),this._baseEl.addEventListener("mousedown",this._$onMouseDown,!1),this._container.addEventListener("mouseup",this._$onMouseUp,!1),this._mouseLeft.addEventListener("mousedown",this._$onTouchStartButton,!1),this._mouseLeft.addEventListener("mouseup",this._$onTouchEndButton,!1),this._container.addEventListener("mousemove",this._$onMouseMove,!1))};VirtualJoystick.prototype.destroy=function(){this._container.removeChild(this._baseEl),this._container.removeChild(this._stickEl),this._mouseLeft.removeEventListener("touchstart",this._$onTouchStartButton,!1),this._mouseLeft.removeEventListener("touchend",this._$onTouchEndButton,!1),this._container.removeChild(this._mouseLeft),this._container.removeEventListener("touchstart",this._$onTouchStart,!1),this._container.removeEventListener("touchend",this._$onTouchEnd,!1),this._container.removeEventListener("touchmove",this._$onTouchMove,!1),this._mouseSupport&&(this._container.removeEventListener("mouseup",this._$onMouseUp,!1),this._container.removeEventListener("mousedown",this._$onMouseDown,!1),this._container.removeEventListener("mousemove",this._$onMouseMove,!1))},VirtualJoystick.touchScreenAvailable=function(){return"createTouch"in document},VirtualJoystick.prototype.deltaX=function(){return this._stickX-this._baseX},VirtualJoystick.prototype.deltaY=function(){return this._stickY-this._baseY},VirtualJoystick.prototype.up=function(){if(!1===this._pressed)return!1;var t=this.deltaX(),e=this.deltaY();return!(e>=0)&&!(Math.abs(e)<this._range&&Math.abs(e)<Math.abs(t))},VirtualJoystick.prototype.down=function(){if(!1===this._pressed)return!1;var t=this.deltaX(),e=this.deltaY();return!(e<=0)&&!(Math.abs(e)<this._range&&Math.abs(e)<Math.abs(t))},VirtualJoystick.prototype.right=function(){if(!1===this._pressed)return!1;var t=this.deltaX(),e=this.deltaY();return!(t<=0)&&!(Math.abs(t)<this._range&&Math.abs(e)>Math.abs(t))},VirtualJoystick.prototype.left=function(){if(!1===this._pressed)return!1;var t=this.deltaX(),e=this.deltaY();return!(t>=0)&&!(Math.abs(t)<this._range&&Math.abs(e)>Math.abs(t))},VirtualJoystick.prototype._onUp=function(){this._pressed=!1,this._stickEl.style.display="none",this._baseX=this._baseY=0,this._stickX=this._stickY=0,this._eraseInterval()},VirtualJoystick.prototype._onDown=function(t,e){this._pressed=!0,this._stickX=t,this._stickY=e,this._stickEl.style.display="",this._stickEl.style.left=this._stickX-this._stickEl.width/2+"px",this._stickEl.style.top=this._stickY-this._stickEl.height/2+"px",this._startInterval()},VirtualJoystick.prototype._onMove=function(t,e){!0===this._pressed&&(this._stickX=t,this._stickY=e,this._stickEl.style.left=t-this._stickEl.width/2+"px",this._stickEl.style.top=e-this._stickEl.height/2+"px",this._startInterval())},VirtualJoystick.prototype._startInterval=function(t,e){this._eraseInterval();var s=$(this._baseEl).offset().left+$(this._baseEl).width()/2,i=$(this._stickEl).offset().left+$(this._stickEl).width()/2;this.offsetX=parseInt((i-s)/5);var o=$(this._baseEl).offset().top+$(this._baseEl).height()/2,n=$(this._stickEl).offset().top+$(this._stickEl).height()/2;this.offsetY=parseInt((n-o)/5),this.offsetX>15&&(this.offsetX=15),this.offsetY>15&&(this.offsetY=15);var h=this;this._timer=setInterval((function(){h._callback&&h._callback.call(h._callbackcontext,[h.offsetX,h.offsetY])}),10)},VirtualJoystick.prototype._eraseInterval=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},VirtualJoystick.prototype._onMouseUp=function(t){return this._onUp()},VirtualJoystick.prototype._onMouseDown=function(t){var e=t.pageX,s=t.pageY;return this._onDown(e,s)},VirtualJoystick.prototype._onMouseMove=function(t){var e=t.pageX,s=t.pageY;return this._onMove(e,s)},VirtualJoystick.prototype._onTouchStart=function(t){if(1==t.touches.length){t.preventDefault();var e=t.touches[0].pageX,s=t.touches[0].pageY;return this._onDown(e,s)}},VirtualJoystick.prototype._onTouchEnd=function(t){return t.preventDefault(),this._onUp()},VirtualJoystick.prototype._onTouchMove=function(t){if(!t.touches||1==t.touches.length){t.preventDefault();var e=t.touches[0].pageX,s=t.touches[0].pageY;return this._onMove(e,s)}},VirtualJoystick.prototype._onTouchStartButton=function(t){t.touches&&1!=t.touches.length||(t.preventDefault(),this._callbackButton.call(this._callbackcontext,["down"]))},VirtualJoystick.prototype._onTouchEndButton=function(t){t.preventDefault(),this._callbackButton.call(this._callbackcontext,["up"])},VirtualJoystick.prototype._buildJoystickBase=function(){var t=document.createElement("canvas");t.style.zIndex=2,t.width=126,t.height=126;var e=t.getContext("2d");return e.beginPath(),e.strokeStyle="cyan",e.lineWidth=6,e.arc(t.width/2,t.width/2,40,0,2*Math.PI,!0),e.stroke(),e.beginPath(),e.strokeStyle="cyan",e.lineWidth=2,e.arc(t.width/2,t.width/2,60,0,2*Math.PI,!0),e.stroke(),t},VirtualJoystick.prototype._buildJoystickStick=function(){var t=document.createElement("canvas");t.style.zIndex=2,t.width=86,t.height=86;var e=t.getContext("2d");return e.beginPath(),e.strokeStyle="cyan",e.lineWidth=6,e.arc(t.width/2,t.width/2,40,0,2*Math.PI,!0),e.stroke(),t},VirtualJoystick.prototype._buildJoystickButton=function(){var t=document.createElement("canvas");t.style.zIndex=2,t.width=86,t.height=86;var e=t.getContext("2d");return e.beginPath(),e.strokeStyle="green",e.lineWidth=6,e.arc(t.width/2,t.width/2,40,0,2*Math.PI,!0),e.stroke(),t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.BusConnection=$.spcExtend(wdi.EventObject.prototype,{ws:null,subscriptions:[],_busUser:null,_busPass:null,queue:"",binary:!1,init:function(s){this.superInit(),this.ws=s.websocket||new wdi.WebSocketWrapper,this.clusterNodeChooser=s.clusterNodeChooser||new wdi.ClusterNodeChooser,this.binary=s.binary||!1},connect:function(s){s.useBus?(this._vdiBusToken=s.vdiBusToken,s.busHostList||(wdi.Debug.warn("Deprecated: using old busHost & busPort params"),s.busHostList=[{host:s.busHost,port:s.busPort}]),this.clusterNodeChooser.setNodeList(s.busHostList),Modernizr.websocketsbinary&&(this.binary=!0),this._busUser=s.busUser,this._busPass=s.busPass,this._websockifyProtocol=s.protocol,this._websockifyHost=s.host,this._websockifyPort=s.port,this.subscriptions=s.busSubscriptions,this._connectToNextHost()):wdi.Debug.warn("Not using the bus")},_connectToNextHost:function(){var s=this.clusterNodeChooser.getAnother(),t=wdi.Utils.generateWebSocketUrl(this._websockifyProtocol,this._websockifyHost,this._websockifyPort,s.host,s.port,"raw",this._vdiBusToken),e="base64";this.binary&&(e="binary"),this.ws.connect(t,e),wdi.Debug.log("BusConnection: using protocol: "+e),this.binary&&this.ws.setBinaryType("arraybuffer"),this.setListeners()},disconnect:function(){this.ws.close(),this.queue="",this.subscriptions=[]},setListeners:function(){var s=this;this.ws.onOpen((function(t){s._send("CONNECT\nlogin:"+s._busUser+"\npasscode:"+s._busPass+"\n\n\0")})),this.ws.onMessage((function(t){var e,n;s.binary?(e=String.fromCharCode.apply(null,new Uint8Array(t.data)),e=decodeURIComponent(escape(e))):e=Base64.decodeStr(t.data);var i=e.split("\0");if(1==i.length)s.queue+=i[0];else{for(var o=0;o<i.length-1;o++)e=s.queue+i[o],n=s.parseMessage(e),s.fire("busMessage",n),s.queue="";s.queue=i[i.length-1]}})),this.ws.onClose((function(t){wdi.Debug.log("BusConnection CLOSED! connecting again in 1 second"),s.fire("error",t)})),this.ws.onError((function(s){wdi.Debug.error("BusConnection ERROR:",s)}))},parseMessage:function(s){try{var t=s.split("\n\n"),e=t[0].trim(),n=t[1].replace(/\x00/,"").trim();n=0!=n.length?JSON.parse(n):null;var i=(t=e.split("\n")).shift();e="{";for(var o=t.length,r=0;r<o;r++){var u=t[r].split(":")[0];e+='"'+u+'":"'+t[r].replace(u+":","")+'"',r!=o-1&&(e+=",")}return e+="}",{verb:i,header:JSON.parse(e),body:n}}catch(s){return wdi.Debug.error("Error parsing Bus Info: ",s),{verb:"ERROR"}}},setSubscriptions:function(){for(var s=this.subscriptions.length,t=0;t<s;t++)this.subscribe(this.subscriptions[t])},send:function(s){var t=this.subscriptions[0];this._send("SEND\ndestination:"+t+"\ncontent-type:text/plain\n\n"+JSON.stringify(s)+"\0")},subscribe:function(s){this._send("SUBSCRIBE\ndestination:"+s+"\n\n\0")},_send:function(s){this.binary?this.ws.send(s):this.ws.send(Base64.encodeStr(s))}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.ClusterNodeChooser=$.spcExtend(wdi.EventObject.prototype,{init:function(t){},setNodeList:function(t){this._nodeList=this._shuffle(t),this._nodeListLength=this._nodeList.length,this._currentIndex=0},getAnother:function(){return this._nodeList[this._currentIndex++%this._nodeListLength]},_shuffle:function(t){for(var e,n,i=t.length;i>0;)n=Math.floor(Math.random()*i),e=t[--i],t[i]=t[n],t[n]=e;return t}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.ConnectionControl=$.spcExtend(wdi.EventObject.prototype,{socket:null,pendingTimeToConnectionLost:null,previousTimeOut:null,init:function(t){this.superInit(),this.socket=t.socket||new wdi.Socket},connect:function(t){var n=wdi.Utils.generateWebSocketUrl(t.protocol,t.host,t.port,null,null,"raw",t.heartbeatToken);this.socket.connect(n),this.pendingTimeToConnectionLost=t.heartbeatTimeout,wdi.Debug.log("ConnectionControl: connected"),this.setListeners()},disconnect:function(){wdi.Debug.log("Connection Control disconnect"),this.previousTimeOut&&clearTimeout(this.previousTimeOut),this.socket.disconnect(),this.socket=null,this.pendingTimeToConnectionLost=null,this.previousTimeOut=null},setListeners:function(){var t=this;this.socket.setOnMessageCallback((function(n){wdi.Debug.log("ConectionControl: beat"),clearTimeout(t.previousTimeOut),t.previousTimeOut=setTimeout((function(){wdi.Debug.log("ConnectionControl: firing connectionLost event"),t.fire("connectionLost",n)}),t.pendingTimeToConnectionLost)}))}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.PacketController=$.spcExtend(wdi.EventObject.prototype,{sizeDefiner:null,packetExtractor:null,init:function(t){this.superInit(),this.sizeDefiner=t.sizeDefiner,this.packetExtractor=t.packetExtractor},dispose:function(){wdi.Debug.log("PacketTroller dispose"),this.clearEvents(),this.packetExtractor.dispose(),this.packetExtractor=null,this.sizeDefiner=null},getNextPacket:function(t){var e=this;wdi.logOperations&&wdi.DataLogger.setNetworkTimeStart();var i=this.sizeDefiner.getSize(t);this.packetExtractor.getBytes(i,(function(t){var i=this.sizeDefiner.getStatus();this.execute(new wdi.RawMessage({status:i,data:t})),e.getNextPacket(t)}),this)},execute:function(t){try{this.fire("chunkComplete",t)}catch(t){console.error("PacketTroller: ",t)}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.PacketExtractor=$.spcExtend(wdi.EventObject.prototype,{socketQ:null,numBytes:null,callback:null,scope:null,init:function(t){this.superInit(),this.socketQ=t.socketQ,this.setListener()},dispose:function(){this.clearEvents(),this.socketQ.disconnect(),this.socketQ=null,this.numBytes=null,this.callback=null,this.scope=null},setListener:function(){this.socketQ.addListener("message",(function(){wdi.logOperations&&wdi.DataLogger.setNetworkTimeStart(),this.getBytes(this.numBytes,this.callback,this.scope)}),this)},getBytes:function(t,s,e){var i,n=this.socketQ.rQ.getLength();(this.numBytes=t,this.callback=s,this.scope=e,null!==t&&n>=t)?(i=t?this.socketQ.rQ.shift(t):new Uint8Array(0),this.numBytes=null,this.callback=null,this.scope=null,s.call(e,i)):wdi.logOperations&&wdi.DataLogger.logNetworkTime()}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.PacketLinkFactory={extract:function(e,i){switch(e.type){case wdi.SpiceVars.SPICE_MSG_SET_ACK:return(new wdi.RedSetAck).demarshall(i);case wdi.SpiceVars.SPICE_MSG_PING:return(new wdi.RedPing).demarshall(i,e.size);case wdi.SpiceVars.SPICE_MSG_MIGRATE:return(new wdi.RedMigrate).demarshall(i);case wdi.SpiceVars.SPICE_MSG_MIGRATE_DATA:return(new wdi.RedMigrateData).demarshall(i,e.size);case wdi.SpiceVars.SPICE_MSG_WAIT_FOR_CHANNELS:return(new wdi.RedWaitForChannels).demarshall(i);case wdi.SpiceVars.SPICE_MSG_DISCONNECTING:return(new wdi.RedDisconnect).demarshall(i);case wdi.SpiceVars.SPICE_MSG_NOTIFY:return(new wdi.RedNotify).demarshall(i);case wdi.SpiceVars.SPICE_MSG_MAIN_MOUSE_MODE:return(new wdi.SpiceMouseMode).demarshall(i)}}},wdi.PacketLinkProcess={process:function(e,i,a){switch(e.type){case wdi.SpiceVars.SPICE_MSG_SET_ACK:var r=wdi.SpiceObject.numberTo32(i.generation);a.setAckWindow(i.window),a.sendObject(r,wdi.SpiceVars.SPICE_MSGC_ACK_SYNC);break;case wdi.SpiceVars.SPICE_MSG_PING:r=new wdi.RedPing({id:i.id,time:i.time}).marshall();a.sendObject(r,wdi.SpiceVars.SPICE_MSGC_PONG);break;case wdi.SpiceVars.SPICE_MSG_MAIN_MOUSE_MODE:a.fire("mouseMode",i.current_mode);break;case wdi.SpiceVars.SPICE_MSG_NOTIFY:a.fire("notify")}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.PacketReassembler=$.spcExtend(wdi.EventObject.prototype,{packetController:null,currentHeader:null,statusToString:null,sizeDefinerConstant:null,init:function(t){this.superInit(),this.packetController=t.packetController,this.sizeDefinerConstant=wdi.SizeDefiner.prototype,this.statusToString=[],this.statusToString[this.sizeDefinerConstant.STATUS_REPLY_BODY]="reply",this.statusToString[this.sizeDefinerConstant.STATUS_ERROR_CODE]="errorCode",this.statusToString[this.sizeDefinerConstant.STATUS_BODY]="spicePacket",this.setListeners()},dispose:function(){wdi.Debug.log("packetReassembler dispose"),this.clearEvents(),this.packetController.dispose(),this.packetController=null,this.currentHeader=null,this.statusToString=null,this.sizeDefinerConstant=null},start:function(){this.packetController.getNextPacket()},setListeners:function(){this.packetController.addListener("chunkComplete",(function(t){var e=t,s=e.status;switch(s){case this.sizeDefinerConstant.STATUS_HEADER:case this.sizeDefinerConstant.STATUS_REPLY:this.currentHeader=e;break;case this.sizeDefinerConstant.STATUS_REPLY_BODY:case this.sizeDefinerConstant.STATUS_BODY:var i=new Uint8Array(e.data.length+this.currentHeader.data.length);i.set(this.currentHeader.data),i.set(e.data,this.currentHeader.data.length),e.data=i,e.status=this.statusToString[s],this.fire("packetComplete",e);break;default:e.status=this.statusToString[s],this.fire("packetComplete",e)}}),this)}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.ReassemblerFactory={getPacketReassembler:function(e){var t=this.getPacketExtractor(e),r=this.getSizeDefiner(),n=this.getPacketController(t,r);return new wdi.PacketReassembler({packetController:n})},getPacketExtractor:function(e){return new wdi.PacketExtractor({socketQ:e})},getSizeDefiner:function(){return new wdi.SizeDefiner},getPacketController:function(e,t){return new wdi.PacketController({packetExtractor:e,sizeDefiner:t})}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.SizeDefiner=$.spcExtend(wdi.DomainObject,{ERROR_CODE_SIZE:4,status:null,STATUS_READY:0,STATUS_REPLY:1,STATUS_REPLY_BODY:2,STATUS_ERROR_CODE:3,STATUS_MESSAGE:4,STATUS_HEADER:5,STATUS_BODY:6,isHeader:!1,init:function(t){this.status=this.STATUS_READY},getSize:function(t){return this.STATUS_READY===this.status?(this.status++,wdi.SpiceLinkHeader.prototype.objectSize):this.STATUS_REPLY===this.status?(this.status++,this.getReplyBodySize(t)):this.STATUS_REPLY_BODY===this.status?(this.status++,this.ERROR_CODE_SIZE):this.STATUS_ERROR_CODE===this.status?(this.status++,this.isHeader=!0,6):this.isHeader?(this.isHeader=!1,this.getBodySizeFromArrayHeader(t)):(this.isHeader=!0,6)},getReplyBodySize:function(t){var e=wdi.GlobalPool.create("ViewQueue");e.setData(t);var i=(new wdi.SpiceLinkHeader).demarshall(e);return wdi.GlobalPool.discard("ViewQueue",e),i.size},getBodySizeFromArrayHeader:function(t){var e=wdi.GlobalPool.create("ViewQueue");e.setData(t);var i=(new wdi.SpiceDataHeader).demarshall(e);return wdi.GlobalPool.discard("ViewQueue",e),i.size},getStatus:function(){return this.status===this.STATUS_MESSAGE&&this.isHeader?this.STATUS_HEADER:this.status!==this.STATUS_MESSAGE||this.isHeader?this.status:this.STATUS_BODY}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.socketStatus={idle:0,prepared:1,connected:2,disconnected:3,failed:4},wdi.Socket=$.spcExtend(wdi.EventObject.prototype,{websocket:null,status:wdi.socketStatus.idle,binary:!1,connect:function(t){var e=this,s="base64";Modernizr.websocketsbinary&&(s="binary",this.binary=!0),this.websocket=new WebSocket(t,s),wdi.Debug.log("Socket: using protocol: "+s),this.binary&&(this.websocket.binaryType="arraybuffer"),this.status=wdi.socketStatus.prepared,this.websocket.onopen=function(){e.status=wdi.socketStatus.connected,e.fire("open")},this.websocket.onmessage=function(t){e.fire("message",t.data)},this.websocket.onclose=function(t){e.status=wdi.socketStatus.disconnected,console.warn("Spice Web Client: ",t.code,t.reason),e.disconnect(),e.fire("close",t)},this.websocket.onerror=function(t){e.status=wdi.socketStatus.failed,e.fire("error",t)}},setOnMessageCallback:function(t){this.websocket.onmessage=t},send:function(t){try{this.websocket.send(this.encode_message(t))}catch(t){this.status=wdi.socketStatus.failed,this.fire("error",t)}},disconnect:function(){this.websocket&&(this.websocket.onopen=function(){},this.websocket.onmessage=function(){},this.websocket.onclose=function(){},this.websocket.onerror=function(){},this.websocket.close(),this.status=wdi.socketStatus.idle,this.binary=!1,this.websocket=null)},setStatus:function(t){this.status=t,this.fire("status",t)},getStatus:function(){return this.status},encode_message:function(t){if(!this.binary)return Base64.encode(t);var e=t.length,s=new ArrayBuffer(e),n=new Uint8Array(s);return n.set(t),n}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.SocketQueue=$.spcExtend(wdi.EventObject.prototype,{rQ:null,sQ:null,socket:null,init:function(t){this.superInit(),this.socket=t.socket||new wdi.Socket,this.rQ=t.rQ||new wdi.FixedQueue,this.sQ=t.sQ||new wdi.Queue,this.setup()},setup:function(){this.socket.addListener("open",(function(){this.fire("open")}),this),this.socket.addListener("message",(function(t){this.rQ.push(new Uint8Array(t)),this.fire("message")}),this),this.socket.addListener("close",(function(t){this.fire("close",t)}),this),this.socket.addListener("error",(function(t){this.fire("error",t)}),this)},getStatus:function(){return this.socket.getStatus()},connect:function(t){this.socket.connect(t)},disconnect:function(){wdi.Debug.log("socket Queue disconnect"),this.socket&&(this.socket.clearEvents(),this.socket.disconnect()),this.rQ=null,this.sQ=null,this.socket=null},send:function(t,s){if(void 0===s)var e=!0;else e=s;this.sQ&&0===this.sQ.getLength()&&e?this.socket.send(t):this.sQ&&(this.sQ.push(t),e&&this.flush())},flush:function(){var t=this.sQ.shift();this.socket.send(t)}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.SpiceChannel=$.spcExtend(wdi.EventObject.prototype,{counter:0,ackWindow:0,connectionId:0,socketQ:null,packetReassembler:null,channel:1,codec:wdi.SpiceVideoCodecType.SPICE_VIDEO_CODEC_TYPE_H264,proxy:null,token:null,init:function(e){this.superInit(),this.socketQ=e.socketQ||new wdi.SocketQueue,this.packetReassembler=e.packetReassembler||wdi.ReassemblerFactory.getPacketReassembler(this.socketQ),this.setListeners(),this.ackWindow=0},startHandshakeTimeout:function(){var e=this;this.handshakeTimeout=window.setTimeout((function(){var i=new Error("Handshake timeout");i.code=4200,wdi.Debug.error("Handshake timeout reached, raising error"),e.fire("error",i)}),5e3)},cancelHandshakeTimeout:function(){clearTimeout(this.handshakeTimeout)},setListeners:function(){var e,i=this;this.packetReassembler.addListener("packetComplete",(function(t){var s=t;if("spicePacket"===s.status){wdi.Debug.log("packetComplete spicePacket"),i.cancelHandshakeTimeout(),wdi.logOperations&&(wdi.DataLogger.logNetworkTime(),e=Date.now());var a=this.getRawSpiceMessage(s.data);a&&(wdi.logOperations&&a.channel===wdi.SpiceVars.SPICE_CHANNEL_DISPLAY&&wdi.DataLogger.setStartTime(e),this.fire("message",a))}else if("reply"===s.status){wdi.Debug.log("packetComplete reply");var n=this.getRedLinkReplyBytes(s.data);this.send(n)}else if("errorCode"===s.status){wdi.Debug.log("packetComplete errorCode"),(n=this.getErrorCodeBytes(s.data))&&(this.send(n),this.channel===wdi.SpiceVars.SPICE_CHANNEL_DISPLAY&&this.changeCodec(this.codec)),this.fire("channelConnected")}}),this),this.socketQ.addListener("open",(function(){var e=this.getRedLinkMessBytes();this.send(e),this.proxy&&this.proxy.end()}),this),this.socketQ.addListener("close",(function(e){1===this.channel&&this.fire("error",e),this.socketQ.disconnect()}),this),this.socketQ.addListener("error",(function(e){this.fire("error",e),this.socketQ.disconnect()}),this)},changeCodec:function(e){this.sendObject([...wdi.SpiceObject.numberTo16(2),...wdi.SpiceObject.numberTo16(e),...wdi.SpiceObject.numberTo16(3)],wdi.SpiceVars.SPICE_MSGC_DISPLAY_PREFERRED_VIDEO_CODEC_TYPE),wdi.currentCodec=e,console.log(`codec changed: ${e}`)},connect:function(e,i,t,s){var a=wdi.Utils.generateWebSocketUrl(e.protocol,e.host,e.port,e.vmHost,e.vmPort,"spice",e.vmInfoToken,e.vmid);this.channel=i,this.connectionId=t||0,this.socketQ.connect(a),this.startHandshakeTimeout(),this.proxy=s,this.token=e.token,this.packetReassembler.start()},disconnect:function(){wdi.Debug.log("spicechannel disconnect"),this.counter=0,this.ackWindow=0,this.connectionId=0,this.socketQ.disconnect(),this.socketQ=null,this.packetReassembler.dispose(),this.packetReassembler=null,this.channel=1,this.proxy=null,this.token=null},send:function(e,i){this.socketQ.send(e,i)},sendObject:function(e,i,t){for(var s=0;s<e.length;s+=2048){var a=e.slice(s,s+2048),n=new wdi.SpiceDataHeader({type:i,size:a.length}).marshall();n=n.concat(a),this.send(n,t)}},arrayOfNumberToUint32:function(e){let i=0;for(let t of e)i|=1<<t;return i},setAckWindow:function(e){this.ackWindow=e,this.counter=0},getRawSpiceMessage:function(e){var i=wdi.GlobalPool.create("ViewQueue"),t=wdi.GlobalPool.create("ViewQueue"),s=new Uint8Array(e,0,wdi.SpiceDataHeader.prototype.objectSize);i.setData(s);var a=(new wdi.SpiceDataHeader).demarshall(i);wdi.GlobalPool.discard("ViewQueue",i);var n=e.subarray(wdi.SpiceDataHeader.prototype.objectSize);if(t.setData(n),this.counter++,this.ackWindow&&this.counter===this.ackWindow){this.counter=0;var c=new wdi.SpiceDataHeader({type:wdi.SpiceVars.SPICE_MSGC_ACK,size:0}).marshall();this.send(c)}var o=wdi.PacketLinkFactory.extract(a,t)||!1;if(o)return wdi.PacketLinkProcess.process(a,o,this),wdi.GlobalPool.discard("ViewQueue",t),!1;var r=wdi.GlobalPool.create("RawSpiceMessage");return r.set(a,t,this.channel),r},getRedLinkReplyBytes:function(e){if(this.token){var i=new wdi.ViewQueue;i.setData(e),i.eatBytes(wdi.SpiceLinkHeader.prototype.objectSize);var t=(new wdi.SpiceLinkReply).demarshall(i);return wdi.SpiceObject.stringHexToBytes(RSA_public_encrypt(this.token,t.pub_key))}return wdi.SpiceObject.stringToBytesPadding("",128)},getRedLinkMessBytes:function(){var e=new wdi.SpiceLinkHeader({magic:1363428690,major_version:2,minor_version:2,size:26}).marshall(),i=new wdi.SpiceLinkMess({connection_id:this.connectionId,channel_type:this.channel,caps_offset:18,num_common_caps:1,num_channel_caps:1,common_caps:1<<wdi.SpiceVars.SPICE_COMMON_CAP_MINI_HEADER,channel_caps:this.arrayOfNumberToUint32([wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_SIZED_STREAM,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_STREAM_REPORT,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_MONITORS_CONFIG,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_MULTI_CODEC,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_CODEC_MJPEG,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_CODEC_VP8,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_CODEC_H264,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_CODEC_VP9,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_CODEC_H265,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_LZ4_COMPRESSION,wdi.SpiceDisplayCaps.SPICE_DISPLAY_CAP_PREF_COMPRESSION])}).marshall();return e.concat(i)},getErrorCodeBytes:function(e){var i=wdi.GlobalPool.create("ViewQueue");i.setData(e);var t=wdi.SpiceObject.bytesToInt32NoAllocate(i);if(wdi.GlobalPool.discard("ViewQueue",i),0!==t)throw new wdi.Exception({message:"Server refused client",errorCode:2});if(this.channel===wdi.SpiceVars.SPICE_CHANNEL_DISPLAY){var s=new wdi.SpiceDataHeader({type:wdi.SpiceVars.SPICE_MSGC_DISPLAY_INIT,size:14}).marshall(),a=new wdi.SpiceCDisplayInit({pixmap_cache_id:1,pixmap_cache_size:1,glz_dictionary_id:0,glz_dictionary_window_size:0}).marshall();return s.concat(a)}if(this.channel==wdi.SpiceVars.SPICE_CHANNEL_MAIN)return new wdi.SpiceDataHeader({type:wdi.SpiceVars.SPICE_MSGC_MAIN_ATTACH_CHANNELS,size:0}).marshall()}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.WebSocketWrapper=$.spcExtend({},{ws:{},onopen:null,onmessage:null,onclose:null,onerror:null,init:function(){},connect:function(n,o){this.ws=new WebSocket(n,o)},onOpen:function(n){this.ws.onopen=n},onMessage:function(n){this.ws.onmessage=n},onClose:function(n){this.ws.onclose=n},onError:function(n){this.ws.onerror=n},setBinaryType:function(n){this.ws.binaryType=n},close:function(){this.ws&&this.ws.close&&(this.ws.close(),this.ws.onopen=function(){},this.ws.onmessage=function(){},this.ws.onclose=function(){},this.ws.onerror=function(){},this.onopen=function(){},this.onmessage=function(){},this.onclose=function(){},this.onerror=function(){})},send:function(n){this.ws.send(n)}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.BUS_TYPES={file:0,print:1,launchApplication:2,windowManagement:3,menu:5,networkDriveManagement:6,clipboard:9,generic:99,killApplicationDoNotUseInProductionEver:34423423},wdi.BusProcess=$.spcExtend(wdi.EventObject.prototype,{busConnection:null,clientGui:null,init:function(e){this.superInit(),this.clientGui=e.clientGui,this.busConnection=e.busConnection},dispose:function(){this.clientGui=null,this.busConnection=null},process:function(e){switch(e.verb){case"CONNECTED":this.busConnection.setSubscriptions(),this.fire("busConnected");break;case"MESSAGE":this.parseMessage(e.body);break;case"ERROR":console.error("Bus error");break;default:wdi.Debug.warn("Not implemented Stomp Verb: "+e.verb)}},parseMessage:function(e){switch(parseInt(e.type)){case wdi.BUS_TYPES.launchApplication:this.parseLaunchApplicationMessage(e);break;case wdi.BUS_TYPES.killApplicationDoNotUseInProductionEver:break;case wdi.BUS_TYPES.windowManagement:this.parseWindowManagementMessage(e);break;case wdi.BUS_TYPES.menu:this.handleMenuMessage(e);break;case wdi.BUS_TYPES.networkDriveManagement:this._handleNetworkDriveMessage(e);break;case wdi.BUS_TYPES.clipboard:this.handleClipboardMessage(e);break;default:this.fire("defaultTypeEvent",e)}},_handleNetworkDriveMessage:function(e){"reMountNetworkDrive"!=e.event&&this.fire("networkDriveResponse",e)},getMenu:function(){this.busConnection.send({type:wdi.BUS_TYPES.menu,value:!1,event:"request"})},handleMenuMessage:function(e){"response"==e.event&&this.fire("menuResponse",e)},handleClipboardMessage:function(e){"selectedText"!==e.event&&"copiedText"!==e.event||this.fire(e.event,e)},parseWindowManagementMessage:function(e){switch(e.event){case"windowList":case"windowCreated":case"windowClosed":case"windowMoved":case"windowResized":case"windowFocused":case"windowMinimized":case"windowRestored":case"windowMaximized":this.fire(e.event,e.value);break;default:wdi.Debug.info("Event '"+e.event+"' not implemented.")}},closeWindow:function(e){this.busConnection.send(this._constructWindowManagementMessage({event:"closeWindow",hwnd:e}))},moveWindow:function(e,n,t){this.busConnection.send(this._constructWindowManagementMessage({event:"moveWindow",hwnd:e,left:n,top:t}))},minimizeWindow:function(e){this.busConnection.send(this._constructWindowManagementMessage({event:"minimizeWindow",hwnd:e}))},maximizeWindow:function(e){this.busConnection.send(this._constructWindowManagementMessage({event:"maximizeWindow",hwnd:e}))},restoreWindow:function(e){this.busConnection.send(this._constructWindowManagementMessage({event:"restoreWindow",hwnd:e}))},focusWindow:function(e){this.busConnection.send(this._constructWindowManagementMessage({event:"focusWindow",hwnd:e}))},resizeWindow:function(e,n,t){this.busConnection.send(this._constructWindowManagementMessage({event:"resizeWindow",hwnd:e,width:n,height:t}))},requestWindowList:function(){this.busConnection.send(this._constructWindowManagementMessage({event:"getWindowList"}))},executeCommand:function(e){this.busConnection.send({type:wdi.BUS_TYPES.launchApplication,application:e})},refreshFileSystem:function(e){this.busConnection.send({type:wdi.BUS_TYPES.file,event:"refreshFileSystem",value:{}})},_constructGenericMessage:function(e,n){return{type:wdi.BUS_TYPES.generic,event:e,value:n||{}}},_constructWindowManagementMessage:function(e){if(void 0===e.event)throw new Error("You should pass an 'event' attribute in the object");var n={type:wdi.BUS_TYPES.windowManagement,event:e.event,value:{}};for(var t in e)"event"!=t&&e.hasOwnProperty(t)&&(n.value[t]=e[t]);return n},reMountNetworkDrive:function(e,n,t){this.busConnection.send({type:wdi.BUS_TYPES.networkDriveManagement,event:"reMountNetworkDrive",host:e,username:n,password:t})},parseLaunchApplicationMessage:function(e){switch(e.event){case"applicationLauncherWrongAppPathError":this.fire("wrongPathError",e);break;case"applicationLaunchedSuccessfully":this.fire("applicationLaunchedSuccessfully",e);break;default:wdi.Debug.info("Event '"+e.event+"' not implemented.")}},sendGenericMessage:function(e,n){this.busConnection.send(this._constructGenericMessage(e,n))}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.CursorProcess=$.spcExtend(wdi.EventObject.prototype,{imageData:null,process:function(r){switch(r.messageType){case wdi.SpiceVars.SPICE_MSG_CURSOR_INIT:case wdi.SpiceVars.SPICE_MSG_CURSOR_SET:var e=this.extractCursor(r);e&&(wdi.VirtualMouse.setHotspot(0,0),wdi.VirtualMouse.setMouse(e.data,e.header.hot_spot_x,e.header.hot_spot_y));break;case wdi.SpiceVars.SPICE_MSG_CURSOR_HIDE:wdi.VirtualMouse.hideMouse()}},dispose:function(){this.clearEvents(),this.imageData=null},_toUrl:function(r){var e=$("<canvas/>").attr({width:r.width,height:r.height})[0];return e.getContext("2d").putImageData(r,0,0),e.toDataURL("image/png")},extractCursor:function(r){var e=r.args.cursor.flags,s=r.args.position,a=r.args.visible;if(1&e)return null;var i=null;if(e&wdi.SpiceCursorFlags.SPICE_CURSOR_FLAGS_FROM_CACHE)i=wdi.ImageCache.getCursorFrom(r.args.cursor);else switch(r.args.cursor.header.type){case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_ALPHA:i=this._toUrl(wdi.graphics.argbToImageData(r.args.cursor.data,r.args.cursor.header.width,r.args.cursor.header.height));break;case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_MONO:i=this._toUrl(wdi.graphics.monoToImageData(r.args.cursor.data,r.args.cursor.header.width,r.args.cursor.header.height));break;case 8:i=wdi.SpiceObject.bytesToString(r.args.cursor.data);case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_COLOR4:case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_COLOR8:case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_COLOR16:case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_COLOR24:case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_COLOR32:case wdi.SpiceCursorType.SPICE_CURSOR_TYPE_ENUM_END:}return i?(e&wdi.SpiceCursorFlags.SPICE_CURSOR_FLAGS_CACHE_ME&&wdi.ImageCache.addCursor(r.args.cursor,i),{data:i,position:s,visible:a,header:r.args.cursor.header}):null}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.DisplayPreProcess=$.spcExtend(wdi.EventObject.prototype,{displayProcess:null,queued:[],inProcess:[],idleConsumers:[],consumers:[],init:function(s){this.idleConsumers=[],this.superInit(),this.displayProcess=s.displayProcess||new wdi.DisplayProcess({clientGui:s.clientGui,disableMessageBuffering:s.disableMessageBuffering}),this.clientGui=s.clientGui,null!=s.numConsumers&&null!=s.numConsumers||(s.numConsumers=4);for(var e=s.numConsumers,i=0;i<e;i++){var n=new wdi.AsyncConsumer;this.consumers.push(n),this.idleConsumers.push(n),n.addListener("done",this.onConsumerDone,this)}},onConsumerDone:function(s){for(var e=this.inProcess[0],i=null;e&&1===e.state;){i=this.inProcess.shift();try{this.displayProcess.process(i.message)}catch(s){wdi.Debug.error("DisplayPreProcess error: ",s)}e=this.inProcess[0]}this.idleConsumers.push(s),this.queued.length>0&&this.executeConsumer()},process:function(s){this.addTask(s),this.executeConsumer()},addTask:function(s){this.queued.push({message:s,clientGui:this.clientGui})},getNextTask:function(){for(var s=this.queued.shift();void 0===s&&0!=this.queued.length;)s=this.queued.shift();return void 0!==s&&(s.state=0,this.inProcess.push(s),s)},executeConsumer:function(){if(this.idleConsumers.length>0){wdi.Debug.log("DisplayPreProcess: available workers: "+this.idleConsumers.length),wdi.Debug.log("DisplaypreProcess: pending tasks: "+this.queued.length);var s=this.idleConsumers.shift(),e=this.getNextTask();e&&s.consume(e)}},dispose:function(){wdi.Debug.log("displaypreprocess dispose ################ idleConsumers: ",this.idleConsumers.length),this.clearEvents(),this.clientGui=null,this.queued=[],this.inProcess=[],this.idleConsumers=[],this.displayProcess.dispose(),this.displayProcess=null,this.consumers.forEach((function(s){s.clearEvents(),s.dispose()})),this.consumers=[]}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.DisplayProcess=$.spcExtend(wdi.EventObject.prototype,{runQ:null,packetFilter:null,init:function(i){this.runQ=i.runQ||wdi.ExecutionControl.runQ,this.packetFilter=i.packetFilter||wdi.PacketFilter,this.clientGui=i.clientGui,this.displayRouter=i.displayRouter||new wdi.DisplayRouter({clientGui:this.clientGui}),this.started=!1,this.waitingMessages=[],this.packetWorkerIdentifier=i.packetWorkerIdentifier||new wdi.PacketWorkerIdentifier,this.disableMessageBuffering=i.disableMessageBuffering},dispose:function(){wdi.Debug.log("Disposing DisplayProcess"),clearInterval(this.timer),this.timer=null,this.runQ=null,this.packetFilter.dispose(),this.packetFilter=null,this.clientGui=null,this.displayRouter.dispose(),this.displayRouter=null,this.packetWorkerIdentifier.dispose(),this.packetWorkerIdentifier=null,this.started=!1,this.waitingMessages=[]},process:function(i){if(this.disableMessageBuffering)this._process(i);else{var e=this;this.waitingMessages.push(i),this.started||(this.timer=setInterval((function(){e.flush()}),50),this.started=!0)}},flush:function(){if(0!==this.waitingMessages.length){var i,e=0;this.removeRedundantDraws();for(var t=this.waitingMessages.length;e<t;)i=this.waitingMessages[e],this._process(i),e++;this.waitingMessages=[]}},removeRedundantDraws:function(){if(!(this.waitingMessages.length<2)){for(var i,e,t,s,r,n,a,o,l,c,h=this.waitingMessages.length,u={},p=[],d=!1;h--;)if(r=(e=(i=this.waitingMessages[h]).args).base,s=e.rop_descriptor,d=!1,r){if(r.surface_id,a=r.box,n=r.surface_id,t=this.packetWorkerIdentifier.getImageProperties(i),u[n]||(u[n]=[]),(!t||t&&!(t.descriptor.flags&wdi.SpiceImageFlags.SPICE_IMAGE_FLAGS_CACHE_ME))&&0===n)for(l=0;l<u[n].length;l++)if((o=u[n][l]).bottom>=a.bottom&&o.top<=a.top&&o.left<=a.left&&o.right>=a.right){d=!0,p.push(h);break}if(!d&&i.messageType===wdi.SpiceVars.SPICE_MSG_DISPLAY_COPY_BITS)break;!d&&e.getMessageProperty("overWriteScreenArea",!1)&&0==r.clip.type&&s==wdi.SpiceRopd.SPICE_ROPD_OP_PUT&&u[n].push(r.box)}for(c=0;c<p.length;c++)this.waitingMessages.splice(p[c],1)}},_process:function(i){wdi.logOperations&&wdi.DataLogger.log(i,0,null,!0,"","_decode"),this.runQ.add((function(e){this.packetFilter.filter(i,(function(i){wdi.ExecutionControl.currentProxy=e,this.displayRouter.processPacket(i),this.postProcess()}),this,this.clientGui),wdi.ExecutionControl.sync&&e.end()}),this,(function(){this.processEnd(i,this.clientGui)})),this.runQ.process()},processEnd:function(i,e){this.packetFilter.notifyEnd(i,e)},postProcess:function(){}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.InputProcess=$.spcExtend(wdi.EventObject.prototype,{clientGui:null,spiceConnection:null,capsLockPressed:!1,numLockPressed:!1,shiftPressed:!1,init:function(e){this.superInit(),this.clientGui=e.clientGui,this.spiceConnection=e.spiceConnection},dispose:function(){this.clearEvents(),this.clientGui=null,this.spiceConnection=null},process:function(e){if(e.messageType===wdi.SpiceVars.SPICE_MSG_INPUTS_MOUSE_MOTION_ACK)this.clientGui.motion_ack()},send:function(e,s){var i,n,c;if("mousemove"==s)i=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_MOUSE_POSITION,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.RedcMousePosition({x:e[1][0]+wdi.VirtualMouse.hotspot.x,y:e[1][1]+wdi.VirtualMouse.hotspot.y,buttons_state:e[1][2],display_id:0})}),this.spiceConnection.send(i);else if("mousedown"==s)i=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_MOUSE_PRESS,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.RedcMousePress({button_id:e[1]+1,buttons_state:1<<e[1]})}),this.spiceConnection.send(i);else if("mouseup"==s)i=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_MOUSE_RELEASE,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.RedcMousePress({button_id:e[1]+1,buttons_state:0})}),this.spiceConnection.send(i);else if("keydown"==s||"keypress"==s){n=wdi.Keymap.getScanCodes(e[1][0]);const t=e[1][0].originalEvent;if("keydown"==s&&20!==e[1][0].keyCode&&(!wdi.Keymap.isVirtualKeyboard&&t&&t.getModifierState&&wdi.Keymap.capsLock!==t.getModifierState("CapsLock")||wdi.Keymap.isVirtualKeyboard&&wdi.Keymap.isVirtualCapsLockOn!==wdi.Keymap.capsLock)){const e=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_KEY_DOWN,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.SpiceScanCode([58,0,0])});this.capsLockPressed=!0,this.spiceConnection.send(e)}if("keydown"==s&&t&&t.getModifierState&&144!==e[1][0].keyCode&&wdi.Keymap.numLock!==t.getModifierState("NumLock")){const e=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_KEY_DOWN,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.SpiceScanCode([69,0,0])});this.numLockPressed=!0,this.spiceConnection.send(e)}for(console.log(1),c=0;c<n.length;c++)i=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_KEY_DOWN,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.SpiceScanCode(n[c])}),n[0]&&42===n[0][0]&&(this.shiftPressed=!0),this.spiceConnection.send(i)}else if("keyup"==s){if((n=wdi.Keymap.getScanCodes(e[1][0]))&&n[0]&&199===n[0][0]&&0===n[0][1]&&0===n[0][2]&&(n=[[224,199,0,0]]),this.capsLockPressed){const e=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_KEY_UP,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.SpiceScanCode([186,0,0])});this.spiceConnection.send(e),this.capsLockPressed=!1}if(this.numLockPressed){const e=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_KEY_UP,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.SpiceScanCode([197,0,0])});this.spiceConnection.send(e),this.numLockPressed=!1}for(n[0]&&142===n[0][0]&&(this.shiftPressed=!1),console.log(3),c=0;c<n.length;c++)i=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_KEY_UP,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.SpiceScanCode(n[c])}),this.spiceConnection.send(i);this.clientGui.inputManager.input.val("_")}else"joystick"==s&&(i=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_INPUTS_MOUSE_MOTION,channel:wdi.SpiceVars.SPICE_CHANNEL_INPUTS,args:new wdi.RedcMouseMotion({x:e[1][0],y:e[1][1],buttons_state:0})}),this.spiceConnection.send(i))},isKeyboardShortcut:function(e,s){if("keydown"===e){var i=s.keyCode;return wdi.Keymap.controlPressed(i,e,s),wdi.Keymap.handledByCtrlKeyCode(e,i,!0)}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.MainProcess=$.spcExtend(wdi.EventObject.prototype,{init:function(e){this.superInit(),this.app=e.app,this.spiceConnection=e.app.spiceConnection,this.agent=e.app.agent},dispose:function(){this.clearEvents(),this.app=null,this.spiceConnection=null,this.agent=null},process:function(e){var i=this.spiceConnection.channels[wdi.SpiceVars.SPICE_CHANNEL_MAIN];switch(e.messageType){case wdi.SpiceVars.SPICE_MSG_MAIN_INIT:i.connectionId=e.args.session_id,i.fire("connectionId",i.connectionId),1==e.args.agent_connected&&i.fire("initAgent",e.args.agent_tokens),1==e.args.current_mouse_mode&&i.fire("mouseMode",e.args.current_mouse_mode),this.changeMouseMode();break;case wdi.SpiceVars.SPICE_MSG_MAIN_AGENT_DATA:var s=e.args;this.agent.onAgentData(s);break;case wdi.SpiceVars.SPICE_MSG_MAIN_AGENT_CONNECTED:i.fire("initAgent",e.args.agent_tokens),this.changeMouseMode();break;case wdi.SpiceVars.SPICE_MSG_MAIN_MULTI_MEDIA_TIME:this.app.multimediaTime=e.args.multimedia_time;break;case wdi.SpiceVars.SPICE_MSG_MAIN_CHANNELS_LIST:i.fire("channelListAvailable",e.args.channels)}},changeMouseMode:function(){var e=new wdi.SpiceMessage({messageType:wdi.SpiceVars.SPICE_MSGC_MAIN_MOUSE_MODE_REQUEST,channel:wdi.SpiceVars.SPICE_CHANNEL_MAIN,args:new wdi.SpiceMouseModeRequest({request_mode:2})});this.spiceConnection.send(e)}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.PlaybackProcess=$.spcExtend(wdi.EventObject.prototype,{_lastApp:null,started:!1,minBuffSize:32768,frequency:null,channels:null,audioContext:null,startTime:null,hasAudioSupport:!0,typedBuffer:null,position:null,init:function(t){this.app=t.app,this.audioContext=this.getAudioContext(),this.audioContext?this.hasAudioSupport=!0:(this.hasAudioSupport=!1,wdi.Debug.warn("The client browser does not support Web Audio API")),this.startTime=0,this.typedBuffer=new ArrayBuffer(34688),this.position=0},dispose:function(){this.clearEvents(),this._lastApp=null,this.started=!1,this.frequency=null,this.channels=null,this.audioContext=null,this.startTime=null,this.hasAudioSupport=!0,this.typedBuffer=null,this.position=null},getAudioContext:function(){try{return new AudioContext}catch(t){}try{return new webkitAudioContext}catch(t){}return!1},process:function(t){if(this.hasAudioSupport)switch(t.messageType){case wdi.SpiceVars.SPICE_MSG_PLAYBACK_MODE:break;case wdi.SpiceVars.SPICE_MSG_PLAYBACK_START:var e=t.args;this.channels=e.channels,this.frequency=e.frequency;break;case wdi.SpiceVars.SPICE_MSG_PLAYBACK_STOP:this.startTime=0;e=t.args;this.flush();break;case wdi.SpiceVars.SPICE_MSG_PLAYBACK_DATA:e=t.args;var i=t.args.multimedia_time;new Uint8Array(this.typedBuffer).set(e.data,this.position),this.position+=e.data.length,this._lastApp=this.app,this.position>=this.minBuffSize&&this.flush(i)}},flush:function(t){this.position>0&&(this.started&&this.playSound(this.typedBuffer,t),this.position=0,this.typedBuffer=new ArrayBuffer(34688))},playSound:function(t,e){if(2==this.channels)return this.playSoundStereo(t,e);for(var i=new Int16Array(t),s=new Array(this.channels),n=0;n<this.channels;n++)s[n]=new Float32Array(i.length/2);var a=0;for(n=0;n<i.length;){for(var r=0;r<this.channels;r++)s[r][a]=i[n++]/32768;a++}var h=this.audioContext.createBufferSource(),o=this.audioContext.createBuffer(this.channels,a,this.frequency);for(n=0;n<this.channels;n++)o.getChannelData(n).set(s[n]);this._play(h,o,e)},playSoundStereo:function(t,e){for(var i=new Int16Array(t),s=new Float32Array(i.length/2),n=new Float32Array(i.length/2),a=0,r=this.audioContext,h=i.length,o=0;o<h;)s[a]=i[o++]/32768,n[a]=i[o++]/32768,a++;var u=r.createBufferSource(),l=r.createBuffer(2,a,this.frequency);l.getChannelData(0).set(s),l.getChannelData(1).set(n),this._play(u,l,e)},_play:function(t,e,i){var s=0;i&&((s=i-(Date.now()-this.app.lastMultimediaTime+this.app.multimediaTime))<0&&(s=0));t.buffer=e,t.connect(this.audioContext.destination),t.start(this.startTime+s),this.startTime+=e.duration},startAudio:function(){this.started=!0,this.flush()}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const getURLParameter=e=>{const o=new RegExp(`${e}=([^&]+)`).exec(window.location.pathname);return o&&o[1]};let vmHost=window.location.hostname;"localhost"===vmHost&&(vmHost="10.10.101.107");const vmId=getURLParameter("id"),vmPort=window.config.public.PORT;function start(){wdi.graphicDebug=new wdi.GraphicDebug({debugMode:!1});let e,o,t=!1;$(window).resize((function(){app.sendCommand("setResolution",app.toSpiceResolution({width:$(window).width(),height:$(window).height()}))}));const n={callback:function(n,i){if("windowClosed"===n)$(i.canvas).remove(),$(i.eventLayer).remove();else if("windowMoved"===n)$(i.canvas).css({top:i.info.top+"px",left:i.info.left+"px"}),$(i.eventLayer).css({top:i.info.top+"px",left:i.info.left+"px"});else if("init"===n||"windowCreated"===n){let e=null,o=null,t=null;const n=$("body");for(let s in i){e=i[s];const a=2*e.position;o=$(e.canvas).css({zIndex:1e4-a-1,position:"absolute",top:e.info.top+"px",left:e.info.left+"px"}),t=$(e.eventLayer).css({top:e.info.top+"px",left:e.info.left+"px",zIndex:1e4-a}),n.append(o),n.append(t)}}else if("ready"===n){app.setReconnecting(!1),o?.clearTimeout&&(o(),o=!1);const e=$(window).width(),t=$(window).height();app.sendCommand("setResolution",app.toSpiceResolution({width:e,height:t})),wdi.IntegrationBenchmarkEnabled&&($("#integrationBenchmark").css({display:"inline"}),$("#launchWordButton").prop("disabled",!1))}else"resolution"===n||("windowMinimized"===n?($(i.canvas).css({display:"none"}),$(i.eventLayer).css({display:"none"})):"windowMaximized"===n?($(i.canvas).css({top:i.info.top+"px",left:i.info.left+"px"}),$(i.eventLayer).css({top:i.info.top+"px",left:i.info.left+"px"})):"windowRestored"===n?($(i.canvas).css({display:"block"}),$(i.eventLayer).css({display:"block"}),$(i.canvas).css({top:i.info.top+"px",left:i.info.left+"px"}),$(i.eventLayer).css({top:i.info.top+"px",left:i.info.left+"px"})):"windowFocused"===n||("timeLapseDetected"===n?wdi.Debug.log("Detected time lapse of ",i,"seconds"):"error"===n&&(app.getReconnecting()||(e||(e=setTimeout((function(){console.log("cancelFreeze"),app.cancelFreeze()}),1e4)),o||(o=setTimeout((function(){console.log("cancel reconnection"),t=!0}),6e4))),setTimeout((function(){t||(console.log("Trying reconnect ",Date.now()),app.reconnect({freeze:!0}))}),1e3))))},context:this,host:vmHost,port:vmPort,protocol:"wss",token:"password",vmHost:vmHost,vmPort:vmPort,vmid:vmId,useBus:!1,busHost:"localhost",busPort:61613,busSubscriptions:["/topic/00000000-0000-0000-0000-000000000000"],busUser:"00000000-0000-0000-0000-000000000000",busPass:"potato",layout:"es",useWorkers:!0,seamlessDesktopIntegration:!1,connectionControl:!1,heartbeatToken:"heartbeat",heartbeatTimeout:4e3,externalClipboardHandling:!1,disableClipboard:!1,layer:document.getElementById("vmw"),disableMessageBuffering:!0,clientOffset:{x:0,y:0}};app.run(n)}window.app=new Application({supportHighDPI:!1}),$(document).ready(start);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.SpicePubkeyType={SPICE_PUBKEY_TYPE_INVALID:0,SPICE_PUBKEY_TYPE_RSA:1,SPICE_PUBKEY_TYPE_RSA2:2,SPICE_PUBKEY_TYPE_DSA:3,SPICE_PUBKEY_TYPE_DSA1:4,SPICE_PUBKEY_TYPE_DSA2:5,SPICE_PUBKEY_TYPE_DSA3:6,SPICE_PUBKEY_TYPE_DSA4:7,SPICE_PUBKEY_TYPE_DH:8,SPICE_PUBKEY_TYPE_EC:9,SPICE_PUBKEY_TYPE_ENUM_END:10},wdi.SpiceWarnCode={SPICE_WARN_GENERAL:0,SPICE_WARN_CODE_ENUM_END:1},wdi.SpiceLineFlags={SPICE_LINE_FLAGS_START_WITH_GAP:4,SPICE_LINE_FLAGS_STYLED:8,SPICE_LINE_FLAGS_MASK:12},wdi.SpiceNotifyVisibility={SPICE_NOTIFY_VISIBILITY_LOW:0,SPICE_NOTIFY_VISIBILITY_MEDIUM:1,SPICE_NOTIFY_VISIBILITY_HIGH:2,SPICE_NOTIFY_VISIBILITY_ENUM_END:3},wdi.SpiceVars={SPICE_MSGC_ACK_SYNC:1,SPICE_MSGC_ACK:2,SPICE_MSGC_PONG:3,SPICE_MSGC_MIGRATE_FLUSH_MARK:4,SPICE_MSGC_MIGRATE_DATA:5,SPICE_MSGC_DISCONNECTING:6,SPICE_MSGC_DISPLAY_PREFERRED_VIDEO_CODEC_TYPE:105,SPICE_MSGC_DISPLAY_INIT:101,SPICE_MSGC_END_DISPLAY:102,SPICE_CHANNEL_MAIN:1,SPICE_CHANNEL_DISPLAY:2,SPICE_CHANNEL_INPUTS:3,SPICE_CHANNEL_CURSOR:4,SPICE_CHANNEL_PLAYBACK:5,SPICE_CHANNEL_RECORD:6,SPICE_CHANNEL_TUNNEL:7,SPICE_CHANNEL_SMARTCARD:8,SPICE_CHANNEL_USBREDIR:9,SPICE_END_CHANNEL:10,SPICE_MSG_MIGRATE:1,SPICE_MSG_MIGRATE_DATA:2,SPICE_MSG_SET_ACK:3,SPICE_MSG_PING:4,SPICE_MSG_WAIT_FOR_CHANNELS:5,SPICE_MSG_DISCONNECTING:6,SPICE_MSG_NOTIFY:7,SPICE_MSG_LIST:8,SPICE_MSGC_MAIN_CLIENT_INFO:101,SPICE_MSGC_MAIN_MIGRATE_CONNECTED:102,SPICE_MSGC_MAIN_MIGRATE_CONNECT_ERROR:103,SPICE_MSGC_MAIN_ATTACH_CHANNELS:104,SPICE_MSGC_MAIN_MOUSE_MODE_REQUEST:105,SPICE_MSGC_MAIN_AGENT_START:106,SPICE_MSGC_MAIN_AGENT_DATA:107,SPICE_MSGC_MAIN_AGENT_TOKEN:108,SPICE_MSGC_MAIN_MIGRATE_END:109,SPICE_MSGC_END_MAIN:110,SPICE_MSG_DISPLAY_MODE:101,SPICE_MSG_DISPLAY_MARK:102,SPICE_MSG_DISPLAY_RESET:103,SPICE_MSG_DISPLAY_COPY_BITS:104,SPICE_MSG_DISPLAY_INVAL_LIST:105,SPICE_MSG_DISPLAY_INVAL_ALL_PIXMAPS:106,SPICE_MSG_DISPLAY_INVAL_PALETTE:107,SPICE_MSG_DISPLAY_INVAL_ALL_PALETTES:108,SPICE_MSG_DISPLAY_STREAM_CREATE:122,SPICE_MSG_DISPLAY_STREAM_DATA:123,SPICE_MSG_DISPLAY_STREAM_CLIP:124,SPICE_MSG_DISPLAY_STREAM_DESTROY:125,SPICE_MSG_DISPLAY_STREAM_DESTROY_ALL:126,SPICE_MSG_DISPLAY_STREAM_DATA_SIZED:316,SPICE_MSG_DISPLAY_STREAM_ACTIVATE_REPORT:319,SPICE_MSG_DISPLAY_DRAW_FILL:302,SPICE_MSG_DISPLAY_DRAW_OPAQUE:303,SPICE_MSG_DISPLAY_DRAW_COPY:304,SPICE_MSG_DISPLAY_DRAW_BLEND:305,SPICE_MSG_DISPLAY_DRAW_BLACKNESS:306,SPICE_MSG_DISPLAY_DRAW_WHITENESS:307,SPICE_MSG_DISPLAY_DRAW_INVERS:308,SPICE_MSG_DISPLAY_DRAW_ROP3:309,SPICE_MSG_DISPLAY_DRAW_STROKE:310,SPICE_MSG_DISPLAY_DRAW_TEXT:311,SPICE_MSG_DISPLAY_DRAW_TRANSPARENT:312,SPICE_MSG_DISPLAY_DRAW_ALPHA_BLEND:313,SPICE_MSG_DISPLAY_SURFACE_CREATE:314,SPICE_MSG_DISPLAY_SURFACE_DESTROY:315,SPICE_MSG_END_DISPLAY:316,SPICE_MSG_INPUTS_INIT:101,SPICE_MSG_INPUTS_KEY_MODIFIERS:102,SPICE_MSG_INPUTS_MOUSE_MOTION_ACK:111,SPICE_MSG_END_INPUTS:112,SPICE_MSGC_INPUTS_KEY_DOWN:101,SPICE_MSGC_INPUTS_KEY_UP:102,SPICE_MSGC_INPUTS_KEY_MODIFIERS:103,SPICE_MSGC_INPUTS_MOUSE_MOTION:111,SPICE_MSGC_INPUTS_MOUSE_POSITION:112,SPICE_MSGC_INPUTS_MOUSE_PRESS:113,SPICE_MSGC_INPUTS_MOUSE_RELEASE:114,SPICE_MSGC_END_INPUTS:115,SPICE_MSG_CURSOR_INIT:101,SPICE_MSG_CURSOR_RESET:102,SPICE_MSG_CURSOR_SET:103,SPICE_MSG_CURSOR_MOVE:104,SPICE_MSG_CURSOR_HIDE:105,SPICE_MSG_CURSOR_TRAIL:106,SPICE_MSG_CURSOR_INVAL_ONE:107,SPICE_MSG_CURSOR_INVAL_ALL:108,SPICE_MSG_END_CURSOR:109,SPICE_MSG_RECORD_START:101,SPICE_MSG_RECORD_STOP:102,SPICE_MSG_RECORD_VOLUME:103,SPICE_MSG_RECORD_MUTE:104,SPICE_MSG_END_RECORD:105,SPICE_MSGC_SMARTCARD_DATA:101,SPICE_MSGC_END_SMARTCARD:102,SPICE_MSGC_SPICEVMC_DATA:101,SPICE_MSGC_END_SPICEVMC:102,SPICE_MSG_MAIN_MIGRATE_BEGIN:101,SPICE_MSG_MAIN_MIGRATE_CANCEL:102,SPICE_MSG_MAIN_INIT:103,SPICE_MSG_MAIN_CHANNELS_LIST:104,SPICE_MSG_MAIN_MOUSE_MODE:105,SPICE_MSG_MAIN_MULTI_MEDIA_TIME:106,SPICE_MSG_MAIN_AGENT_CONNECTED:107,SPICE_MSG_MAIN_AGENT_DISCONNECTED:108,SPICE_MSG_MAIN_AGENT_DATA:109,SPICE_MSG_MAIN_AGENT_TOKEN:110,SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST:111,SPICE_MSG_MAIN_MIGRATE_END:112,SPICE_MSG_END_MAIN:113,SPICE_MSG_PLAYBACK_DATA:101,SPICE_MSG_PLAYBACK_MODE:102,SPICE_MSG_PLAYBACK_START:103,SPICE_MSG_PLAYBACK_STOP:104,SPICE_MSG_PLAYBACK_VOLUME:105,SPICE_MSG_PLAYBACK_MUTE:106,SPICE_MSG_END_PLAYBACK:107,SPICE_MSGC_RECORD_DATA:101,SPICE_MSGC_RECORD_MODE:102,SPICE_MSGC_RECORD_START_MARK:103,SPICE_MSGC_END_RECORD:104,SPICE_MSG_TUNNEL_INIT:101,SPICE_MSG_TUNNEL_SERVICE_IP_MAP:102,SPICE_MSG_TUNNEL_SOCKET_OPEN:103,SPICE_MSG_TUNNEL_SOCKET_FIN:104,SPICE_MSG_TUNNEL_SOCKET_CLOSE:105,SPICE_MSG_TUNNEL_SOCKET_DATA:106,SPICE_MSG_TUNNEL_SOCKET_CLOSED_ACK:107,SPICE_MSG_TUNNEL_SOCKET_TOKEN:108,SPICE_MSG_END_TUNNEL:109,SPICE_MSGC_TUNNEL_SERVICE_ADD:101,SPICE_MSGC_TUNNEL_SERVICE_REMOVE:102,SPICE_MSGC_TUNNEL_SOCKET_OPEN_ACK:103,SPICE_MSGC_TUNNEL_SOCKET_OPEN_NACK:104,SPICE_MSGC_TUNNEL_SOCKET_FIN:105,SPICE_MSGC_TUNNEL_SOCKET_CLOSED:106,SPICE_MSGC_TUNNEL_SOCKET_CLOSED_ACK:107,SPICE_MSGC_TUNNEL_SOCKET_DATA:108,SPICE_MSGC_TUNNEL_SOCKET_TOKEN:109,SPICE_MSGC_END_TUNNEL:110,SPICE_MSG_SMARTCARD_DATA:101,SPICE_MSG_END_SMARTCARD:102,SPICE_MSG_SPICEVMC_DATA:101,SPICE_MSG_END_SPICEVMC:102,SPICE_COMMON_CAP_PROTOCOL_AUTH_SELECTION:0,SPICE_COMMON_CAP_AUTH_SPICE:1,SPICE_COMMON_CAP_AUTH_SASL:2,SPICE_COMMON_CAP_MINI_HEADER:3,SPICE_PLAYBACK_CAP_CELT_0_5_1:0,SPICE_PLAYBACK_CAP_VOLUME:1,SPICE_RECORD_CAP_CELT_0_5_1:0,SPICE_RECORD_CAP_VOLUME:1,SPICE_MAIN_CAP_SEMI_SEAMLESS_MIGRATE:0},wdi.SpiceTunnelServiceType={SPICE_TUNNEL_SERVICE_TYPE_INVALID:0,SPICE_TUNNEL_SERVICE_TYPE_GENERIC:1,SPICE_TUNNEL_SERVICE_TYPE_IPP:2,SPICE_TUNNEL_SERVICE_TYPE_ENUM_END:3},wdi.SpiceJpegAlphaFlags={SPICE_JPEG_ALPHA_FLAGS_TOP_DOWN:1,SPICE_JPEG_ALPHA_FLAGS_MASK:1},wdi.SpiceMaskFlags={SPICE_MASK_FLAGS_INVERS:1,SPICE_MASK_FLAGS_MASK:1},wdi.SpiceCursorType={SPICE_CURSOR_TYPE_ALPHA:0,SPICE_CURSOR_TYPE_MONO:1,SPICE_CURSOR_TYPE_COLOR4:2,SPICE_CURSOR_TYPE_COLOR8:3,SPICE_CURSOR_TYPE_COLOR16:4,SPICE_CURSOR_TYPE_COLOR24:5,SPICE_CURSOR_TYPE_COLOR32:6,SPICE_CURSOR_TYPE_ENUM_END:7,SPICE_CURSOR_TYPE_URL:8},wdi.SpiceImageFlags={SPICE_IMAGE_FLAGS_CACHE_ME:1,SPICE_IMAGE_FLAGS_HIGH_BITS_SET:2,SPICE_IMAGE_FLAGS_CACHE_REPLACE_ME:4,SPICE_IMAGE_FLAGS_MASK:7},wdi.SpiceAudioDataMode={SPICE_AUDIO_DATA_MODE_INVALID:0,SPICE_AUDIO_DATA_MODE_RAW:1,SPICE_AUDIO_DATA_MODE_CELT_0_5_1:2,SPICE_AUDIO_DATA_MODE_ENUM_END:3},wdi.SpiceAudioFmt={SPICE_AUDIO_FMT_INVALID:0,SPICE_AUDIO_FMT_S16:1,SPICE_AUDIO_FMT_ENUM_END:2},wdi.SpiceBitmapFmt={SPICE_BITMAP_FMT_INVALID:0,SPICE_BITMAP_FMT_1BIT_LE:1,SPICE_BITMAP_FMT_1BIT_BE:2,SPICE_BITMAP_FMT_4BIT_LE:3,SPICE_BITMAP_FMT_4BIT_BE:4,SPICE_BITMAP_FMT_8BIT:5,SPICE_BITMAP_FMT_16BIT:6,SPICE_BITMAP_FMT_24BIT:7,SPICE_BITMAP_FMT_32BIT:8,SPICE_BITMAP_FMT_RGBA:9,SPICE_BITMAP_FMT_ENUM_END:10},wdi.SpiceStreamFlags={SPICE_STREAM_FLAGS_TOP_DOWN:1,SPICE_STREAM_FLAGS_MASK:1},wdi.SpiceTunnelIpType={SPICE_TUNNEL_IP_TYPE_INVALID:0,SPICE_TUNNEL_IP_TYPE_IPv4:1,SPICE_TUNNEL_IP_TYPE_ENUM_END:2},wdi.SpiceBitmapFlags={SPICE_BITMAP_FLAGS_PAL_CACHE_ME:1,SPICE_BITMAP_FLAGS_PAL_FROM_CACHE:2,SPICE_BITMAP_FLAGS_TOP_DOWN:4,SPICE_BITMAP_FLAGS_MASK:7},wdi.SpiceStringFlags={SPICE_STRING_FLAGS_RASTER_A1:1,SPICE_STRING_FLAGS_RASTER_A4:2,SPICE_STRING_FLAGS_RASTER_A8:4,SPICE_STRING_FLAGS_RASTER_TOP_DOWN:8,SPICE_STRING_FLAGS_MASK:15},wdi.SpiceSurfaceFmt={SPICE_SURFACE_FMT_INVALID:0,SPICE_SURFACE_FMT_1_A:1,SPICE_SURFACE_FMT_8_A:8,SPICE_SURFACE_FMT_16_555:16,SPICE_SURFACE_FMT_32_xRGB:32,SPICE_SURFACE_FMT_16_565:80,SPICE_SURFACE_FMT_32_ARGB:96,SPICE_SURFACE_FMT_ENUM_END:97},wdi.SpiceCursorFlags={SPICE_CURSOR_FLAGS_NONE:1,SPICE_CURSOR_FLAGS_CACHE_ME:2,SPICE_CURSOR_FLAGS_FROM_CACHE:4,SPICE_CURSOR_FLAGS_MASK:7},wdi.SpiceLinkErr={SPICE_LINK_ERR_OK:0,SPICE_LINK_ERR_ERROR:1,SPICE_LINK_ERR_INVALID_MAGIC:2,SPICE_LINK_ERR_INVALID_DATA:3,SPICE_LINK_ERR_VERSION_MISMATCH:4,SPICE_LINK_ERR_NEED_SECURED:5,SPICE_LINK_ERR_NEED_UNSECURED:6,SPICE_LINK_ERR_PERMISSION_DENIED:7,SPICE_LINK_ERR_BAD_CONNECTION_ID:8,SPICE_LINK_ERR_CHANNEL_NOT_AVAILABLE:9,SPICE_LINK_ERR_ENUM_END:10},wdi.SpiceNotifySeverity={SPICE_NOTIFY_SEVERITY_INFO:0,SPICE_NOTIFY_SEVERITY_WARN:1,SPICE_NOTIFY_SEVERITY_ERROR:2,SPICE_NOTIFY_SEVERITY_ENUM_END:3},wdi.SpiceBrushType={SPICE_BRUSH_TYPE_NONE:0,SPICE_BRUSH_TYPE_SOLID:1,SPICE_BRUSH_TYPE_PATTERN:2,SPICE_BRUSH_TYPE_ENUM_END:3},wdi.SpiceAlphaFlags={SPICE_ALPHA_FLAGS_DEST_HAS_ALPHA:1,SPICE_ALPHA_FLAGS_SRC_SURFACE_HAS_ALPHA:2,SPICE_ALPHA_FLAGS_MASK:3},wdi.SpiceSurfaceFlags={SPICE_SURFACE_FLAGS_PRIMARY:1,SPICE_SURFACE_FLAGS_MASK:1},wdi.QuicImageType={QUIC_IMAGE_TYPE_INVALID:0,QUIC_IMAGE_TYPE_GRAY:1,QUIC_IMAGE_TYPE_RGB16:2,QUIC_IMAGE_TYPE_RGB24:3,QUIC_IMAGE_TYPE_RGB32:4,QUIC_IMAGE_TYPE_RGBA:5},wdi.SpiceImageType={SPICE_IMAGE_TYPE_BITMAP:0,SPICE_IMAGE_TYPE_QUIC:1,SPICE_IMAGE_TYPE_RESERVED:2,SPICE_IMAGE_TYPE_LZ_PLT:100,SPICE_IMAGE_TYPE_LZ_RGB:101,SPICE_IMAGE_TYPE_GLZ_RGB:102,SPICE_IMAGE_TYPE_FROM_CACHE:103,SPICE_IMAGE_TYPE_SURFACE:104,SPICE_IMAGE_TYPE_JPEG:105,SPICE_IMAGE_TYPE_FROM_CACHE_LOSSLESS:106,SPICE_IMAGE_TYPE_ZLIB_GLZ_RGB:107,SPICE_IMAGE_TYPE_JPEG_ALPHA:108,SPICE_IMAGE_TYPE_CANVAS:109,SPICE_IMAGE_TYPE_PNG:110,SPICE_IMAGE_TYPE_ENUM_END:111},wdi.SpiceImageScaleMode={SPICE_IMAGE_SCALE_MODE_INTERPOLATE:0,SPICE_IMAGE_SCALE_MODE_NEAREST:1,SPICE_IMAGE_SCALE_MODE_ENUM_END:2},wdi.SpiceResourceType={SPICE_RES_TYPE_INVALID:0,SPICE_RES_TYPE_PIXMAP:1,SPICE_RESOURCE_TYPE_ENUM_END:2},wdi.SpicePathFlags={SPICE_PATH_BEGIN:1,SPICE_PATH_END:2,SPICE_PATH_CLOSE:8,SPICE_PATH_BEZIER:16,SPICE_PATH_FLAGS_MASK:27},wdi.SpiceVideoCodecType={SPICE_VIDEO_CODEC_TYPE_MJPEG:1,SPICE_VIDEO_CODEC_TYPE_VP8:2,SPICE_VIDEO_CODEC_TYPE_H264:3,SPICE_VIDEO_CODEC_TYPE_VP9:4,SPICE_VIDEO_CODEC_TYPE_H265:5,SPICE_VIDEO_CODEC_TYPE_ENUM_END:2},wdi.SpiceVideoCodecValue={1:"",2:"vp8",3:"avc1.64001f",4:"vp09.00.31.08",5:"hvc1.1.6.L93.90"},wdi.SpiceRopd={SPICE_ROPD_INVERS_SRC:1,SPICE_ROPD_INVERS_BRUSH:2,SPICE_ROPD_INVERS_DEST:4,SPICE_ROPD_OP_PUT:8,SPICE_ROPD_OP_OR:16,SPICE_ROPD_OP_AND:32,SPICE_ROPD_OP_XOR:64,SPICE_ROPD_OP_BLACKNESS:128,SPICE_ROPD_OP_WHITENESS:256,SPICE_ROPD_OP_INVERS:512,SPICE_ROPD_INVERS_RES:1024,SPICE_ROPD_MASK:2047},wdi.SpiceMigrateFlags={SPICE_MIGRATE_NEED_FLUSH:1,SPICE_MIGRATE_NEED_DATA_TRANSFER:2,SPICE_MIGRATE_FLAGS_MASK:3},wdi.SpiceKeyboardModifierFlags={SPICE_KEYBOARD_MODIFIER_FLAGS_SCROLL_LOCK:1,SPICE_KEYBOARD_MODIFIER_FLAGS_NUM_LOCK:2,SPICE_KEYBOARD_MODIFIER_FLAGS_CAPS_LOCK:4,SPICE_KEYBOARD_MODIFIER_FLAGS_MASK:7},wdi.SpiceInfoCode={SPICE_INFO_GENERAL:0,SPICE_INFO_CODE_ENUM_END:1},wdi.SpiceMouseButton={SPICE_MOUSE_BUTTON_INVALID:0,SPICE_MOUSE_BUTTON_LEFT:1,SPICE_MOUSE_BUTTON_MIDDLE:2,SPICE_MOUSE_BUTTON_RIGHT:3,SPICE_MOUSE_BUTTON_UP:4,SPICE_MOUSE_BUTTON_DOWN:5,SPICE_MOUSE_BUTTON_ENUM_END:6},wdi.SpiceClipType={SPICE_CLIP_TYPE_NONE:0,SPICE_CLIP_TYPE_RECTS:1,SPICE_CLIP_TYPE_ENUM_END:2},wdi.SpiceMouseButtonMask={SPICE_MOUSE_BUTTON_MASK_LEFT:1,SPICE_MOUSE_BUTTON_MASK_MIDDLE:2,SPICE_MOUSE_BUTTON_MASK_RIGHT:4,SPICE_MOUSE_BUTTON_MASK_MASK:7},wdi.SpiceMouseModeTypes={SPICE_MOUSE_MODE_SERVER:1,SPICE_MOUSE_MODE_CLIENT:2,SPICE_MOUSE_MODE_MASK:3},wdi.SpiceDisplayCaps={SPICE_DISPLAY_CAP_SIZED_STREAM:0,SPICE_DISPLAY_CAP_MONITORS_CONFIG:1,SPICE_DISPLAY_CAP_COMPOSITE:2,SPICE_DISPLAY_CAP_A8_SURFACE:3,SPICE_DISPLAY_CAP_STREAM_REPORT:4,SPICE_DISPLAY_CAP_LZ4_COMPRESSION:5,SPICE_DISPLAY_CAP_PREF_COMPRESSION:6,SPICE_DISPLAY_CAP_GL_SCANOUT:7,SPICE_DISPLAY_CAP_MULTI_CODEC:8,SPICE_DISPLAY_CAP_CODEC_MJPEG:9,SPICE_DISPLAY_CAP_CODEC_VP8:10,SPICE_DISPLAY_CAP_CODEC_H264:11,SPICE_DISPLAY_CAP_PREF_VIDEO_CODEC_TYPE:12,SPICE_DISPLAY_CAP_CODEC_VP9:13,SPICE_DISPLAY_CAP_CODEC_H265:14},wdi.AgentCaps={VD_AGENT_CAP_MOUSE_STATE:0,VD_AGENT_CAP_MONITORS_CONFIG:1,VD_AGENT_CAP_REPLY:2,VD_AGENT_CAP_CLIPBOARD:3,VD_AGENT_CAP_DISPLAY_CONFIG:4,VD_AGENT_CAP_CLIPBOARD_BY_DEMAND:5,VD_AGENT_CAP_CLIPBOARD_SELECTION:6},wdi.AgentMessageTypes={VD_AGENT_MOUSE_STATE:1,VD_AGENT_MONITORS_CONFIG:2,VD_AGENT_REPLY:3,VD_AGENT_CLIPBOARD:4,VD_AGENT_DISPLAY_CONFIG:5,VD_AGENT_ANNOUNCE_CAPABILITIES:6,VD_AGENT_CLIPBOARD_GRAB:7,VD_AGENT_CLIPBOARD_REQUEST:8,VD_AGENT_CLIPBOARD_RELEASE:9,VD_AGENT_GET_WINDOWS_LIST:10,VD_AGENT_CLOSE_WINDOW:11,VD_AGENT_MOVE_WINDOW:12,VD_AGENT_RESIZE_WINDOW:13,VD_AGENT_MINIMIZE_WINDOW:14,VD_AGENT_RESTORE_WINDOW:15,VD_AGENT_MAXIMIZE_WINDOW:16,VD_AGENT_FOCUS_WINDOW:17,VD_AGENT_EXECUTE_COMMAND:18},wdi.ClipBoardTypes={VD_AGENT_CLIPBOARD_NONE:0,VD_AGENT_CLIPBOARD_UTF8_TEXT:1,VD_AGENT_CLIPBOARD_IMAGE_PNG:2,VD_AGENT_CLIPBOARD_IMAGE_BMP:3,VD_AGENT_CLIPBOARD_IMAGE_TIFF:4,VD_AGENT_CLIPBOARD_IMAGE_JPG:5};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
wdi.SpiceObject={properties:{},bytesToString:function(t){const e=new Uint8Array(t);return new TextDecoder("utf-8").decode(e)},bytesToURI:function(t){var e=new Blob([t],{type:"image/jpeg"});return URL.createObjectURL(e)},bytesToStringBE:function(t,e){for(var i="",s=e||t.length;s>=0;s--)i+=String.fromCharCode(t[s]);return i},bytesToInt8:function(t){return t.shift()},bytesToInt8NoAllocate:function(t){var e=t.getByte(0);return t.eatBytes(1),e},bytesToInt16:function(t){var e=t.shift();return t.shift()*Math.pow(16,2)+e},bytesToInt16BE:function(t){var e=t.shift(),i=t.shift();return e*Math.pow(16,2)+i},bytesToInt32:function(t){var e=wdi.SpiceObject.bytesToInt16(t);return wdi.SpiceObject.bytesToInt16(t)*Math.pow(16,4)+e},bytesToInt16NoAllocate:function(t){var e=t.getByte(0),i=t.getByte(1);return t.eatBytes(2),i*Math.pow(16,2)+e},bytesToInt32NoAllocate:function(t){var e=wdi.SpiceObject.bytesToInt16NoAllocate(t);return wdi.SpiceObject.bytesToInt16NoAllocate(t)*Math.pow(16,4)+e},bytesToInt32BE:function(t){var e=wdi.SpiceObject.bytesToInt16BE(t),i=wdi.SpiceObject.bytesToInt16BE(t);return e*Math.pow(16,4)+i},bytesToInt64:function(t){var e=wdi.SpiceObject.bytesToInt32(t).toString(2).lpad("0",32),i=wdi.SpiceObject.bytesToInt32(t).toString(2).lpad("0",32);return BigInteger.parse(i+e,2)},bytesToInt64NoAllocate:function(t){var e=wdi.SpiceObject.bytesToInt32NoAllocate(t).toString(2).lpad("0",32),i=wdi.SpiceObject.bytesToInt32NoAllocate(t).toString(2).lpad("0",32);return BigInteger.parse(i+e,2)},bytesToInt64BE:function(t){var e=wdi.SpiceObject.bytesToInt32BE(t).toString(2).lpad("0",32),i=wdi.SpiceObject.bytesToInt32BE(t).toString(2).lpad("0",32);return BigInteger.parse(e+i,2)},bytesToArray:function(t,e,i,s){var n=t.length,o=i||n,h=s||"LE",a=[],r=null;switch(e){case 8:r=wdi.SpiceObject.bytesToInt8;break;case 16:r="LE"==h?wdi.SpiceObject.bytesToInt16:wdi.SpiceObject.bytesToInt16BE;break;case 32:r="LE"==h?wdi.SpiceObject.bytesToInt32:wdi.SpiceObject.bytesToInt32BE;break;case 64:r="LE"==h?wdi.SpiceObject.bytesToInt64:wdi.SpiceObject.bytesToInt64BE;break;default:throw new Exception("Not supported number of bits",1)}for(var c=0;c<o;c++)a=a.concat(r(t));return a},int32ToDouble:function(t){return(15&t)/15+wdi.SpiceObject.unsignedToSigned(t>>4)},unsignedToSigned:function(t,e){var i=Math.pow(2,e)-1;return t&Math.pow(2,e-1)&&(t=-1*(i-t)),t},arrayToBytes:function(t,e,i){var s=t.length,n=i||s,o=null,h=[];switch(e){case 8:o=wdi.SpiceObject.numberTo8;break;case 16:o=wdi.SpiceObject.numberTo16;break;case 32:o=wdi.SpiceObject.numberTo32;break;case 64:o=wdi.SpiceObject.numberTo64;break;default:throw new Exception("Not supported number of bits",1)}for(var a=0;a<n;a++)a<=s?h=h.concat(o(t[a])):h.push(0);return h},stringToBytes:function(t){for(var e=[],i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?e.push(s):s<2048?e.push(192|s>>6,128|63&s):s<55296||s>=57344?e.push(224|s>>12,128|s>>6&63,128|63&s):(i++,s=65536+((1023&s)<<10|1023&t.charCodeAt(i)),e.push(240|s>>18,128|s>>12&63,128|s>>6&63,128|63&s))}return e},arrayBufferToBytes:function(t){return new Uint8Array(t).toJSArray()},stringHexToBytes:function(t){for(var e=t.length,i=[],s=0;s<e;s+=2)i.push(parseInt(t[s]+t[s+1],16));return i},stringBinaryToBytes:function(t,e){t=t.lpad("0",e);for(var i=[],s=e;s>=8;s-=8)i=i.concat(parseInt(t.substr(s-8,8),2));return i},stringToBytesPadding:function(t,e){for(var i=[],s=t.length,n=0;n<e;n++)e>s-1?i.push(0):i.push(t.charCodeAt(n));return i},numberTo64:function(t){var e=this.numberTo32((0x10000000000000000&t)>>32);return this.numberTo32(4294967295&t).concat(e)},numberTo32:function(t){for(var e=new Array(3),i=0;i<4;i++)e[i]=255&t,t>>=8;return e},numberTo16:function(t){for(var e=new Array(1),i=0;i<2;i++)e[i]=255&t,t>>=8;return e},numberTo8:function(t){return[255&t]},getMessageProperties:function(){return this.properties},getMessageProperty:function(t,e){return this.properties.hasOwnProperty(t)?this.properties[t]:e}},wdi.SpiceDataHeader=$.spcExtend(wdi.SpiceObject,{objectSize:6,init:function(t){t&&this.setContent(t)},setContent:function(t){this.type=t.type,this.size=t.size},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo16(this.type),this.numberTo32(this.size)),this.rawData},demarshall:function(t){return this.type=this.bytesToInt16NoAllocate(t),this.size=this.bytesToInt32NoAllocate(t),this}}),wdi.SpiceCompatibility=$.spcExtend(wdi.SpiceObject,{init:function(t){t&&this.setContent(t)},setContent:function(t){this.channel_type=t.channel_type,this.caps=t.caps},marshall:function(){return this.rawData=[],this.rawData=[this.numberTo8(this.channel_type),...this.caps.map((t=>this.numberTo32(t)))],this.rawData},demarshall:function(t){}}),wdi.SpiceLinkAuthMechanism=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.auth_mechanism=t.auth_mechanism},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.auth_mechanism)),this.rawData},demarshall:function(t){if(this.expectedSize=arguments[1]||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.auth_mechanism=this.bytesToInt32NoAllocate(t),"customDemarshall"in this&&this.customDemarshall(t),this}}),wdi.SpiceLinkReply=$.spcExtend(wdi.SpiceObject,{objectSize:178,init:function(t){t&&this.setContent(t)},setContent:function(t){this.error=t.error,this.pub_key=t.pub_key,this.num_common_caps=t.num_common_caps,this.num_channel_caps=t.num_channel_caps,this.caps_offset=t.caps_offset},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.error),this.arrayToBytes(this.pub_key,8),this.numberTo32(this.num_common_caps),this.numberTo32(this.num_channel_caps),this.numberTo32(this.caps_offset)),this.rawData},demarshall:function(t){if(this.expectedSize=arguments[1]||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.error=this.bytesToInt32NoAllocate(t),this.pub_key=this.bytesToArray(t.shift(this.expectedSize),8),this.num_common_caps=this.bytesToInt32NoAllocate(t),this.num_channel_caps=this.bytesToInt32NoAllocate(t),this.caps_offset=this.bytesToInt32NoAllocate(t),"customDemarshall"in this&&this.customDemarshall(t),this}}),wdi.SpiceLinkEncryptedTicket=$.spcExtend(wdi.SpiceObject,{objectSize:128,init:function(t){t&&this.setContent(t)},setContent:function(t){this.encrypted_data=t.encrypted_data},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.stringToBytes(this.encrypted_data,8)),this.rawData},demarshall:function(t){if(this.expectedSize=arguments[1]||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.encrypted_data=this.bytesToArray(t.shift(this.expectedSize),8),"customDemarshall"in this&&this.customDemarshall(t),this}}),wdi.SpiceLinkMess=$.spcExtend(wdi.SpiceObject,{objectSize:18,init:function(t){t&&this.setContent(t)},setContent:function(t){this.connection_id=t.connection_id,this.channel_type=t.channel_type,this.channel_id=t.channel_id,this.num_common_caps=t.num_common_caps,this.num_channel_caps=t.num_channel_caps,this.caps_offset=t.caps_offset,this.common_caps=t.common_caps,this.channel_caps=t.channel_caps},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.connection_id),this.numberTo8(this.channel_type),this.numberTo8(this.channel_id),this.numberTo32(this.num_common_caps),this.numberTo32(this.num_channel_caps),this.numberTo32(this.caps_offset)),this.num_common_caps>0&&(this.rawData=this.rawData.concat(this.numberTo32(this.common_caps))),this.num_channel_caps>0&&(this.rawData=this.rawData.concat(this.numberTo32(this.channel_caps))),this.rawData},demarshall:function(t){if(this.expectedSize=arguments[1]||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.connection_id=this.bytesToInt32NoAllocate(t),this.channel_type=this.bytesToInt8NoAllocate(t),this.channel_id=this.bytesToInt8NoAllocate(t),this.num_common_caps=this.bytesToInt32NoAllocate(t),this.num_channel_caps=this.bytesToInt32NoAllocate(t),this.caps_offset=this.bytesToInt32NoAllocate(t),"customDemarshall"in this&&this.customDemarshall(t),this}}),wdi.SpiceLinkHeader=$.spcExtend(wdi.SpiceObject,{objectSize:16,init:function(t){t&&this.setContent(t)},setContent:function(t){this.magic=t.magic,this.major_version=t.major_version,this.minor_version=t.minor_version,this.size=t.size},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.magic),this.numberTo32(this.major_version),this.numberTo32(this.minor_version),this.numberTo32(this.size)),this.rawData},demarshall:function(t){if(this.expectedSize=arguments[1]||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.magic=this.bytesToInt32NoAllocate(t),this.major_version=this.bytesToInt32NoAllocate(t),this.minor_version=this.bytesToInt32NoAllocate(t),this.size=this.bytesToInt32NoAllocate(t),"customDemarshall"in this&&this.customDemarshall(t),this}}),wdi.RedMigrateData=$.spcExtend(wdi.SpiceObject,{objectSize:0,init:function(t){t&&this.setContent(t)},setContent:function(t){this.vector=t.vector},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.arrayToBytes(this.vector,8)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.vector=this.bytesToArray(t.shift(this.expectedSize),8),this}}),wdi.RedMainInit=$.spcExtend(wdi.SpiceObject,{objectSize:32,init:function(t){t&&this.setContent(t)},setContent:function(t){this.session_id=t.session_id,this.display_channels_hint=t.display_channels_hint,this.supported_mouse_modes=t.supported_mouse_modes,this.current_mouse_mode=t.current_mouse_mode,this.agent_connected=t.agent_connected,this.agent_tokens=t.agent_tokens,this.multi_media_time=t.multi_media_time,this.ram_hint=t.ram_hint},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.session_id),this.numberTo32(this.display_channels_hint),this.numberTo32(this.supported_mouse_modes),this.numberTo32(this.current_mouse_mode),this.numberTo32(this.agent_connected),this.numberTo32(this.agent_tokens),this.numberTo32(this.multi_media_time),this.numberTo32(this.ram_hint)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.session_id=this.bytesToInt32NoAllocate(t),this.display_channels_hint=this.bytesToInt32NoAllocate(t),this.supported_mouse_modes=this.bytesToInt32NoAllocate(t),this.current_mouse_mode=this.bytesToInt32NoAllocate(t),this.agent_connected=this.bytesToInt32NoAllocate(t),this.agent_tokens=this.bytesToInt32NoAllocate(t),this.multi_media_time=this.bytesToInt32NoAllocate(t),this.ram_hint=this.bytesToInt32NoAllocate(t),this}}),wdi.SpiceMsgMainAgentConnected=$.spcExtend(wdi.SpiceObject,{objectSize:0,init:function(t){t&&this.setContent(t)},setContent:function(t){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this}}),wdi.SpiceChannelsList=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.num_of_channels=t.num_of_channels,this.channels=t.channels},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.num_of_channels),this.arrayToBytes(this.channels,16)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.num_of_channels=this.bytesToInt32NoAllocate(t),this.channels=this.bytesToArray(t.shift(this.expectedSize),16),this}}),wdi.RedSetAck=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){this.generation=t.generation,this.window=t.window},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.generation),this.numberTo32(this.window)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.generation=this.bytesToInt32NoAllocate(t),this.window=this.bytesToInt32NoAllocate(t),this}}),wdi.RedPing=$.spcExtend(wdi.SpiceObject,{objectSize:12,init:function(t){t&&this.setContent(t)},setContent:function(t){this.id=t.id,this.time=t.time},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.id),this.numberTo64(this.time)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.id=this.bytesToInt32NoAllocate(t),this.time=this.bytesToInt64NoAllocate(t),this.expectedSize>12&&t.shift(this.expectedSize-12),this}}),wdi.RedMigrate=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.flags=t.flags},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.flags)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.flags=this.bytesToInt32NoAllocate(t),this}}),wdi.RedWaitForChannel=$.spcExtend(wdi.SpiceObject,{objectSize:10,init:function(t){t&&this.setContent(t)},setContent:function(t){this.type=t.type,this.id=t.id,this.serial=t.serial},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo8(this.type),this.numberTo8(this.id),this.numberTo64(this.serial)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.type=this.bytesToInt8NoAllocate(t),this.id=this.bytesToInt8NoAllocate(t),this.serial=this.bytesToInt64NoAllocate(t),this}}),wdi.RedWaitForChannels=$.spcExtend(wdi.SpiceObject,{objectSize:1,init:function(t){t&&this.setContent(t)},setContent:function(t){this.wait_count=t.wait_count,this.wait_list=t.wait_list},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo8(this.wait_count),this.arrayToBytes(this.wait_list,8)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.wait_count=this.bytesToInt8NoAllocate(t),this.wait_list=this.bytesToArray(t.shift(this.expectedSize),8),this}}),wdi.RedDisconnect=$.spcExtend(wdi.SpiceObject,{objectSize:12,init:function(t){t&&this.setContent(t)},setContent:function(t){this.time_stamp=t.time_stamp,this.reason=t.reason},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo64(this.time_stamp),this.numberTo32(this.reason)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.time_stamp=this.bytesToInt64NoAllocate(t),this.reason=this.bytesToInt32NoAllocate(t),this}}),wdi.RedMigrationBegin=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.port=t.port,this.sport=t.sport,this.host_name=t.host_name},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo16(this.port),this.numberTo16(this.sport),this.arrayToBytes(this.host_name,8)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.port=this.bytesToInt16NoAllocate(t),this.sport=this.bytesToInt16NoAllocate(t),this.host_name=this.bytesToArray(t.shift(this.expectedSize),8),this}}),wdi.RedNotify=$.spcExtend(wdi.SpiceObject,{objectSize:25,init:function(t){t&&this.setContent(t)},setContent:function(t){this.time_stamp=t.time_stamp,this.severity=t.severity,this.visibility=t.visibility,this.what=t.what,this.message_len=t.message_len,this.message=t.message,this.zero=t.zero},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo64(this.time_stamp),this.numberTo32(this.severity),this.numberTo32(this.visibility),this.numberTo32(this.what),this.numberTo32(this.message_len),this.arrayToBytes(this.message,8),this.numberTo8(this.zero)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.time_stamp=this.bytesToInt64NoAllocate(t),this.severity=this.bytesToInt32NoAllocate(t),this.visibility=this.bytesToInt32NoAllocate(t),this.what=this.bytesToInt32NoAllocate(t),this.message_len=this.bytesToInt32NoAllocate(t),this.message=this.bytesToString(t.shift(this.message_len)),this.zero=this.bytesToInt8NoAllocate(t),this}}),wdi.RedMode=$.spcExtend(wdi.SpiceObject,{objectSize:12,init:function(t){t&&this.setContent(t)},setContent:function(t){this.width=t.width,this.height=t.height,this.depth=t.depth},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.width),this.numberTo32(this.height),this.numberTo32(this.depth)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.width=this.bytesToInt32NoAllocate(t),this.height=this.bytesToInt32NoAllocate(t),this.depth=this.bytesToInt32NoAllocate(t),this}}),wdi.SpiceCDisplayInit=$.spcExtend(wdi.SpiceObject,{objectSize:14,init:function(t){t&&this.setContent(t)},setContent:function(t){this.pixmap_cache_id=t.pixmap_cache_id,this.pixmap_cache_size=t.pixmap_cache_size,this.glz_dictionary_id=t.glz_dictionary_id,this.glz_dictionary_window_size=t.glz_dictionary_window_size},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo8(this.pixmap_cache_id),this.numberTo8(0),this.numberTo8(127),this.numberTo8(0),this.numberTo8(0),this.numberTo8(0),this.numberTo8(0),this.numberTo8(0),this.numberTo8(0),this.numberTo8(this.glz_dictionary_id),this.numberTo32(this.glz_dictionary_window_size)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.pixmap_cache_id=this.bytesToInt8NoAllocate(t),this.pixmap_cache_size=this.bytesToInt64NoAllocate(t),this.glz_dictionary_id=this.bytesToInt8NoAllocate(t),this.glz_dictionary_window_size=this.bytesToInt32NoAllocate(t),this}}),wdi.SpiceSurfaceDestroy=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.surface_id=t.surface_id},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.surface_id)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.surface_id=this.bytesToInt32NoAllocate(t),this}}),wdi.SpiceSurface=$.spcExtend(wdi.SpiceObject,{objectSize:20,init:function(t){t&&this.setContent(t)},setContent:function(t){this.surface_id=t.surface_id,this.width=t.width,this.height=t.height,this.format=t.format,this.flags=t.flags},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.surface_id),this.numberTo32(this.width),this.numberTo32(this.height),this.numberTo32(this.format),this.numberTo32(this.flags)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.surface_id=this.bytesToInt32NoAllocate(t),this.width=this.bytesToInt32NoAllocate(t),this.height=this.bytesToInt32NoAllocate(t),this.format=this.bytesToInt32NoAllocate(t),this.flags=this.bytesToInt32NoAllocate(t),this}}),wdi.SpicePath=$.spcExtend(wdi.SpiceObject,{objectSize:4,marshall:function(){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});var i=this.num_segments=this.bytesToInt32NoAllocate(t);this.segments=[];for(var s=0;s<i;s++)this.segments[s]=(new wdi.SpicePathSeg).demarshall(t);return this}}),wdi.SpicePathSeg=$.spcExtend(wdi.SpiceObject,{objectSize:8,marshall:function(){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});this.flags=this.bytesToInt8NoAllocate(t);var i=this.count=this.bytesToInt32NoAllocate(t);this.points=[];for(var s=0;s<i;s++)this.points[s]=(new wdi.SpicePointFix).demarshall(t);return this}}),wdi.SpicePoint=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){this.x=t.x,this.y=t.y},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.x),this.numberTo32(this.y)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.x=this.unsignedToSigned(this.bytesToInt32(t.shift(4)),32),this.y=this.unsignedToSigned(this.bytesToInt32(t.shift(4)),32),this}}),wdi.SpicePoint16=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.x=t.x,this.y=t.y},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo16(this.x),this.numberTo16(this.y)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.x=this.bytesToInt16NoAllocate(t),this.y=this.bytesToInt16NoAllocate(t),this}}),wdi.SpicePointFix=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){this.x=t.hasOwnProperty("x")?t.x:0,this.y=t.hasOwnProperty("y")?t.y:0},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.x),this.numberTo32(this.y)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.x=this.int32ToDouble(this.bytesToInt32(t.shift(4)),32),this.y=this.int32ToDouble(this.bytesToInt32(t.shift(4)),32),this}}),wdi.SpiceRect=$.spcExtend(wdi.SpiceObject,{objectSize:16,init:function(t){t&&this.setContent(t)},setContent:function(t){this.top=t.top,this.left=t.left,this.bottom=t.bottom,this.right=t.right},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.top),this.numberTo32(this.left),this.numberTo32(this.bottom),this.numberTo32(this.right)),this.rawData},demarshall:function(t,e){return this.top=this.bytesToInt32NoAllocate(t),this.left=this.bytesToInt32NoAllocate(t),this.bottom=this.bytesToInt32NoAllocate(t),this.right=this.bytesToInt32NoAllocate(t),this}}),wdi.SpiceClipRects=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.num_rects=t.num_rects},marshall:function(){this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.num_rects));for(var t=0;t<this.num_rects;t++)this.rawData=this.rawData.concat(this.rects[t].marshall());return this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});if(this.num_rects=this.bytesToInt32NoAllocate(t),this.num_rects>0){this.rects=[];for(var i=0;i<this.num_rects;i++)this.rects[i]=(new wdi.SpiceRect).demarshall(t)}return this}}),wdi.SpiceClip=$.spcExtend(wdi.SpiceObject,{objectSize:1,init:function(t){t&&this.setContent(t)},setContent:function(t){this.type=t.type},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo8(this.type)),this.type==wdi.SpiceClipType.SPICE_CLIP_TYPE_RECTS&&(this.rawData=this.rawData.concat(this.rects.marshall())),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.type=this.bytesToInt8NoAllocate(t),this.type==wdi.SpiceClipType.SPICE_CLIP_TYPE_RECTS&&(this.rects=(new wdi.SpiceClipRects).demarshall(t)),this}}),wdi.SpiceDisplayBase=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.surface_id=t.surface_id},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.surface_id),this.box.marshall(),this.clip.marshall()),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.surface_id=this.bytesToInt32NoAllocate(t),this.box=(new wdi.SpiceRect).demarshall(t),this.clip=(new wdi.SpiceClip).demarshall(t),this}}),wdi.SpiceQMask=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){var t=[];return t=t.concat(this.numberTo8(this.flags),this.pos.marshall(),this.numberTo32(this.offset)),this.offset&&(t=t.concat(this.image.marshall())),t},demarshall:function(t,e){t.eatBytes(13)}}),wdi.SpiceImageDescriptor=$.spcExtend(wdi.SpiceObject,{objectSize:18,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){var t=[];return t=t.concat(this.numberTo64(this.id),this.numberTo8(this.type),this.numberTo8(this.flags),this.numberTo32(this.width),this.numberTo32(this.height))},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});var i=this.bytesToInt32NoAllocate(t);return this.id=i.toString(16)+this.bytesToInt32NoAllocate(t).toString(16),this.type=this.bytesToInt8NoAllocate(t),this.flags=this.bytesToInt8NoAllocate(t),this.width=this.bytesToInt32NoAllocate(t),this.height=this.bytesToInt32NoAllocate(t),this.offset=t.getPosition(),this}}),wdi.SpiceImage=$.spcExtend(wdi.SpiceObject,{objectSize:1,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){var t=[];return t=t.concat(this.imageDescriptor.marshall(),this.data)},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.imageDescriptor=(new wdi.SpiceImageDescriptor).demarshall(t),this.data=t.getRawData(),this}}),wdi.SpiceDrawCopy=$.spcExtend(wdi.SpiceObject,{objectSize:4,properties:{overWriteScreenArea:!0},init:function(t){t&&this.setContent(t)},setContent:function(t){this.offset=t.offset},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.base.marshall(),this.numberTo32(this.offset),this.src_area.marshall(),this.numberTo16(this.rop_descriptor),this.numberTo8(this.scale_mode),this.mask.marshall(),this.image.marshall()),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});if(this.base=(new wdi.SpiceDisplayBase).demarshall(t),this.offset=this.bytesToInt32NoAllocate(t),this.src_area=(new wdi.SpiceRect).demarshall(t),this.rop_descriptor=this.bytesToInt16NoAllocate(t),this.scale_mode=this.bytesToInt8NoAllocate(t),this.mask=(new wdi.SpiceQMask).demarshall(t),t.getPosition()==this.offset)this.image=(new wdi.SpiceImage).demarshall(t);else{var i=new wdi.ViewQueue;i.setData(t.getDataOffset(this.offset)),this.image=(new wdi.SpiceImage).demarshall(i)}return this}}),wdi.drawBlend=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.base=t.base,this.alpha_flags=t.alpha_flags,this.alpha=t.alpha,this.offset=t.offset,this.src_area=t.src_area},marshall:function(){var t=[];return t=t.concat(this.base.marshall(),this.numberTo32(this.offset),this.src_area.marshall(),this.numberTo16(this.rop_descriptor),this.numberTo8(this.flags),this.mask.marshall(),this.image.marshall())},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.base=(new wdi.SpiceDisplayBase).demarshall(t),this.offset=this.bytesToInt32NoAllocate(t),this.src_area=(new wdi.SpiceRect).demarshall(t),this.rop_descriptor=this.bytesToInt16NoAllocate(t),this.flags=this.bytesToInt8NoAllocate(t),this.mask=(new wdi.SpiceQMask).demarshall(t),this.image=(new wdi.SpiceImage).demarshall(t),this}}),wdi.drawAlphaBlend=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.base=t.base,this.alpha_flags=t.alpha_flags,this.alpha=t.alpha,this.offset=t.offset,this.src_area=t.src_area},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.base=(new wdi.SpiceDisplayBase).demarshall(t),this.alpha_flags=this.bytesToInt8NoAllocate(t),this.alpha=this.bytesToInt8NoAllocate(t),this.offset=this.bytesToInt32NoAllocate(t),this.src_area=(new wdi.SpiceRect).demarshall(t),this.image=(new wdi.SpiceImage).demarshall(t),this}}),wdi.drawTransparent=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.base=(new wdi.SpiceDisplayBase).demarshall(t),this.offset=this.bytesToInt32NoAllocate(t),this.src_area=(new wdi.SpiceRect).demarshall(t),this.transparent_color=(new wdi.SpiceColor).demarshall(t),this.transparent_true_color=(new wdi.SpiceColor).demarshall(t),this.image=(new wdi.SpiceImage).demarshall(t),this}}),wdi.SpiceCopyBits=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.offset=t.offset},marshall:function(){var t=[];return t=t.concat(this.base.marshall(),this.src_position.marshall())},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.base=(new wdi.SpiceDisplayBase).demarshall(t),this.src_position=(new wdi.SpicePoint).demarshall(t),this}}),wdi.SpiceImageLZRGB=$.spcExtend(wdi.SpiceObject,{objectSize:32,init:function(t){t&&this.setContent(t)},setContent:function(t){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.length=this.bytesToInt32BE(t.shift(4)),this.magic=this.bytesToStringBE(t.shift(4)),this.version=this.bytesToInt32BE(t.shift(4)),this.type=this.bytesToInt32BE(t.shift(4)),this.width=this.bytesToInt32BE(t.shift(4)),this.height=this.bytesToInt32BE(t.shift(4)),this.stride=this.bytesToInt32BE(t.shift(4)),this.top_down=this.bytesToInt32BE(t.shift(4)),this.data=t.shift(this.length),this}}),wdi.SpiceMouseModeRequest=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.request_mode=t.request_mode},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.request_mode)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.request_mode=this.bytesToInt32NoAllocate(t),this}}),wdi.SpiceMouseMode=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.supported_modes=t.supported_modes,this.current_mode=t.current_mode},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.supported_modes),this.numberTo32(this.current_mode)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,!(t.getLength()<this.expectedSize))return this.supported_modes=this.bytesToInt16NoAllocate(t),this.current_mode=this.bytesToInt16NoAllocate(t),this}}),wdi.RedcMousePress=$.spcExtend(wdi.SpiceObject,{objectSize:3,init:function(t){t&&this.setContent(t)},setContent:function(t){this.button_id=t.button_id,this.buttons_state=t.buttons_state},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo8(this.button_id),this.numberTo16(this.buttons_state)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.button_id=this.bytesToInt8NoAllocate(t),this.buttons_state=this.bytesToInt16NoAllocate(t),this}}),wdi.RedcMousePosition=$.spcExtend(wdi.SpiceObject,{objectSize:11,init:function(t){t&&this.setContent(t)},setContent:function(t){this.x=t.x,this.y=t.y,this.buttons_state=t.buttons_state,this.display_id=t.display_id},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.x),this.numberTo32(this.y),this.numberTo16(this.buttons_state),this.numberTo8(this.display_id)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.x=this.bytesToInt32NoAllocate(t),this.y=this.bytesToInt32NoAllocate(t),this.buttons_state=this.bytesToInt16NoAllocate(t),this.display_id=this.bytesToInt8NoAllocate(t),this}}),wdi.RedcMouseMotion=$.spcExtend(wdi.SpiceObject,{objectSize:10,init:function(t){t&&this.setContent(t)},setContent:function(t){this.x=t.x,this.y=t.y,this.buttons_state=t.buttons_state},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.x),this.numberTo32(this.y),this.numberTo16(this.buttons_state)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.x=this.bytesToInt32NoAllocate(t),this.y=this.bytesToInt32NoAllocate(t),this.buttons_state=this.bytesToInt16NoAllocate(t),this}}),wdi.SpiceBrush=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){this.type=t.type,this.color=t.color},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.type=this.bytesToInt8NoAllocate(t),this.type==wdi.SpiceBrushType.SPICE_BRUSH_TYPE_PATTERN?this.pattern=(new wdi.SpicePattern).demarshall(t):this.type==wdi.SpiceBrushType.SPICE_BRUSH_TYPE_SOLID&&(this.color=(new wdi.SpiceColor).demarshall(t)),this}}),wdi.SpiceColor=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){return[this.r,this.g,this.b]},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});this.data=16777215&this.bytesToInt32(t.shift(4)),this.r=this.data>>16,this.g=this.data>>8&255,this.b=255&this.data,this.html_color="rgb("+this.r+", "+this.g+", "+this.b+")";var i=this.r.toString(16),s=this.g.toString(16),n=this.b.toString(16);return i.length<2&&(i="0"+i),s.length<2&&(s="0"+s),n.length<2&&(n="0"+n),this.simple_html_color="#"+i+s+n,this}}),wdi.RgbaColor=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.data=4294967295&this.bytesToInt32(t.shift(4)),this.a=this.data>>>24,this.r=this.data>>>16&255,this.g=this.data>>>8&255,this.b=255&this.data,this.html_color="rgb("+this.r+", "+this.g+", "+this.b+")",this}}),wdi.SpicePattern=$.spcExtend(wdi.SpiceObject,{objectSize:12,init:function(t){t&&this.setContent(t)},setContent:function(t){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});this.offset=this.bytesToInt32NoAllocate(t),this.point=(new wdi.SpicePoint).demarshall(t);var i=new wdi.ViewQueue;return i.setData(t.getDataOffset(this.offset)),this.image=(new wdi.SpiceImage).demarshall(i),this}}),wdi.SpiceDrawFill=$.spcExtend(wdi.SpiceObject,{objectSize:4,properties:{overWriteScreenArea:!0},init:function(t){t&&this.setContent(t)},setContent:function(t){this.offset=t.offset},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.offset)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.base=(new wdi.SpiceDisplayBase).demarshall(t),this.brush=(new wdi.SpiceBrush).demarshall(t),this.rop_descriptor=this.bytesToInt16NoAllocate(t),this.mask=(new wdi.SpiceQMask).demarshall(t),this.brush.type==wdi.SpiceBrushType.SPICE_BRUSH_TYPE_PATTERN&&(this.brush.pattern.image=(new wdi.SpiceImageDescriptor).demarshall(t),this.brush.pattern.imageData=t.getData()),this}}),wdi.SpiceDrawRop3=$.spcExtend(wdi.SpiceObject,{objectSize:4,marshall:function(){var t=[];return t=t.concat(this.base.marshall(),this.numberTo32(this.offset),this.src_area.marshall(),this.brush.marshall(),this.numberTo8(this.rop_descriptor),this.numberTo8(this.scale_mode),this.mask.marshall(),this.src_image.marshall()),this.brush.type==wdi.SpiceBrushType.SPICE_BRUSH_TYPE_PATTERN&&(t=t.concat(this.brush.pattern.image.marshall(),this.brush.pattern.imageData)),t},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.base=(new wdi.SpiceDisplayBase).demarshall(t),this.offset=this.bytesToInt32NoAllocate(t),this.src_area=(new wdi.SpiceRect).demarshall(t),this.brush=(new wdi.SpiceBrush).demarshall(t),this.rop_descriptor=this.bytesToInt8NoAllocate(t),this.scale_mode=this.bytesToInt8NoAllocate(t),this.mask=(new wdi.SpiceQMask).demarshall(t),this.src_image=(new wdi.SpiceImage).demarshall(t),this.brush.type==wdi.SpiceBrushType.SPICE_BRUSH_TYPE_PATTERN&&(this.brush.pattern.image=(new wdi.SpiceImageDescriptor).demarshall(t),this.brush.pattern.imageData=t.getData()),this}}),wdi.SpiceDrawBlackness=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.offset=t.offset},marshall:function(){var t=[];return t=t.concat(this.base.marshall(),this.mask.marshall())},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.base=(new wdi.SpiceDisplayBase).demarshall(t),this.mask=(new wdi.SpiceQMask).demarshall(t),this}}),wdi.SpiceDrawWhiteness=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.offset=t.offset},marshall:function(){var t=[];return t=t.concat(this.base.marshall(),this.mask.marshall())},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.base=(new wdi.SpiceDisplayBase).demarshall(t),this.mask=(new wdi.SpiceQMask).demarshall(t),this}}),wdi.SpiceScanCode=$.spcExtend(wdi.SpiceObject,{objectSize:1,init:function(t){t&&this.setContent(t)},setContent:function(t){this.code=t||0,this.zero=0},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.arrayToBytes(this.code,8),this.numberTo8(this.zero)),this.rawData},demarshall:function(t,e){return this},getCode:function(){return this.code}}),wdi.RedCursorInit=$.spcExtend(wdi.SpiceObject,{objectSize:9,marshall:function(){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.position=(new wdi.SpicePoint16).demarshall(t),this.trail_length=this.bytesToInt16NoAllocate(t),this.trail_frequency=this.bytesToInt16NoAllocate(t),this.visible=this.bytesToInt8NoAllocate(t),this.cursor=(new wdi.RedCursor).demarshall(t),this}}),wdi.RedCursor=$.spcExtend(wdi.SpiceObject,{objectSize:2,marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo16(this.flags)),1&this.flags||(this.rawData=this.rawData.concat(this.header.marshall(),this.data)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.flags=this.bytesToInt16NoAllocate(t),this.header=null,this.data=null,1&this.flags||(this.header=(new wdi.RedCursorHeader).demarshall(t),this.data=t.getData()),this}}),wdi.RedCursorHeader=$.spcExtend(wdi.SpiceObject,{objectSize:17,marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo64(this.unique),this.numberTo8(this.type),this.numberTo16(this.width),this.numberTo16(this.height),this.numberTo16(this.hot_spot_x),this.numberTo16(this.hot_spot_y)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.unique=this.bytesToInt64NoAllocate(t),this.type=this.bytesToInt8NoAllocate(t),this.width=this.bytesToInt16NoAllocate(t),this.height=this.bytesToInt16NoAllocate(t),this.hot_spot_x=this.bytesToInt16NoAllocate(t),this.hot_spot_y=this.bytesToInt16NoAllocate(t),this}}),wdi.RedCursorSet=$.spcExtend(wdi.SpiceObject,{objectSize:5,marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.position.marshall(),this.numberTo8(this.visible),this.cursor.marshall()),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.position=(new wdi.SpicePoint16).demarshall(t),this.visible=this.bytesToInt8NoAllocate(t),this.cursor=(new wdi.RedCursor).demarshall(t),this}}),wdi.RedCursorHide=$.spcExtend(wdi.SpiceObject,{objectSize:5,marshall:function(){},demarshall:function(){return this}}),wdi.RasterGlyph=$.spcExtend(wdi.SpiceObject,{objectSize:20,marshall:function(){},demarshall:function(t,e,i){for(var s=1==e?1:2*e,n=[],o=0;o<i;o++)n[o]={},n[o].render_pos=(new wdi.SpicePoint).demarshall(t),n[o].glyph_origin=(new wdi.SpicePoint).demarshall(t),n[o].width=this.bytesToInt16NoAllocate(t),n[o].height=this.bytesToInt16NoAllocate(t),n[o].data=t.shift(n[o].height*Math.ceil(n[o].width*s/8));return n}}),wdi.GlyphString=$.spcExtend(wdi.SpiceObject,{objectSize:3,marshall:function(){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.len=this.bytesToInt16NoAllocate(t),this.flags=this.bytesToInt8NoAllocate(t),this.raster_glyph=(new wdi.RasterGlyph).demarshall(t,this.flags,this.len),this}}),wdi.SpiceDrawText=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.base=(new wdi.SpiceDisplayBase).demarshall(t),this.offset=this.bytesToInt32NoAllocate(t),this.back_area=(new wdi.SpiceRect).demarshall(t),this.fore_brush=(new wdi.SpiceBrush).demarshall(t),this.back_brush=(new wdi.SpiceBrush).demarshall(t),this.fore_mode=this.bytesToInt16NoAllocate(t),this.back_mode=this.bytesToInt16NoAllocate(t),this.glyph_string=(new wdi.GlyphString).demarshall(t),this}}),wdi.SpiceLineAttr=$.spcExtend(wdi.SpiceObject,{objectSize:8,marshall:function(){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.flags=this.bytesToInt8NoAllocate(t),this.flags&&(this.style_nseg=this.bytesToInt8NoAllocate(t),this.style=this.int32ToDouble(this.bytesToInt32(t.shift(4)))),this}}),wdi.SpiceStroke=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.base=(new wdi.SpiceDisplayBase).demarshall(t),this.offset=this.bytesToInt32NoAllocate(t),this.attr=(new wdi.SpiceLineAttr).demarshall(t),this.brush=(new wdi.SpiceBrush).demarshall(t),this.fore_mode=this.bytesToInt16NoAllocate(t),this.back_mode=this.bytesToInt16NoAllocate(t),this.path=(new wdi.SpicePath).demarshall(t),this}}),wdi.SpiceDrawInvers=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){var t=[];return t=t.concat(this.base.marshall(),this.mask.marshall())},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.base=(new wdi.SpiceDisplayBase).demarshall(t),this.mask=(new wdi.SpiceQMask).demarshall(t),this}}),wdi.SpiceStreamCreate=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){var t=[];return t.concat(this.numberTo32(this.surface_id),this.numberTo32(this.id),this.numberTo8(this.flags),this.numberTo8(this.codec),this.numberTo64(this.stamp),this.numberTo32(this.stream_width),this.numberTo32(this.stream_height),this.numberTo32(this.src_width),this.numberTo32(this.src_height),this.rect.marshall(),this.clip.marshall()),t},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.surface_id=this.bytesToInt32NoAllocate(t),this.id=this.bytesToInt32NoAllocate(t),this.flags=this.bytesToInt8NoAllocate(t),this.codec=this.bytesToInt8NoAllocate(t),this.stamp=this.bytesToInt64NoAllocate(t),this.stream_width=this.bytesToInt32NoAllocate(t),this.stream_height=this.bytesToInt32NoAllocate(t),this.src_width=this.bytesToInt32NoAllocate(t),this.src_height=this.bytesToInt32NoAllocate(t),this.rect=(new wdi.SpiceRect).demarshall(t),this.clip=(new wdi.SpiceClip).demarshall(t),this}}),wdi.SpiceStreamDestroy=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){var t=[];return t=t.concat(this.numberTo32(this.surface_id),this.numberTo32(this.id))},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.surface_id=this.bytesToInt32NoAllocate(t),this.id=this.bytesToInt32NoAllocate(t),this}}),wdi.SpiceStreamData=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){var t=[];return t=t.concat(this.numberTo32(this.id),this.numberTo32(this.multi_media_type),this.numberTo32(this.data_size),this.data)},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.id=this.bytesToInt32NoAllocate(t),this.multi_media_type=this.bytesToInt32NoAllocate(t),this.data_size=this.bytesToInt32NoAllocate(t),this.data=t.getRawData(),this}}),wdi.SpiceStreamClip=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){var t=[];return t=t.concat(this.numberTo32(this.id),this.clip.marshall())},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.id=this.bytesToInt32NoAllocate(t),this.clip=(new wdi.SpiceClip).demarshall(t),this}}),wdi.SpiceStreamDataSized=$.spcExtend(wdi.SpiceObject,{objectSize:12,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){var t=[];return t=t.concat(this.numberTo32(this.id),this.numberTo32(this.width),this.numberTo32(this.height))},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.id=this.bytesToInt32NoAllocate(t),this.width=this.bytesToInt32NoAllocate(t),this.height=this.bytesToInt32NoAllocate(t),this}}),wdi.SpiceStreamActiveReport=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){},demarshall:function(t,e){}}),wdi.SpiceModifierData=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){},setModifierData:function(t){6===t?(wdi.Keymap.capsLock=!0,wdi.Keymap.numLock=!0):4===t?(wdi.Keymap.capsLock=!0,wdi.Keymap.numLock=!1):2===t?(wdi.Keymap.capsLock=!1,wdi.Keymap.numLock=!0):0===t&&(wdi.Keymap.capsLock=!1,wdi.Keymap.numLock=!1)},marshall:function(){var t=[];return t=t.concat(this.numberTo16(this.data))},demarshall:function(t,e){return this.expectedSize=e||this.objectSize,this.data=this.bytesToInt16NoAllocate(t),this}}),wdi.SpiceResourceList=$.spcExtend(wdi.SpiceObject,{objectSize:2,init:function(t){t&&this.setContent(t)},setContent:function(t){},marshall:function(){for(var t=[],e=0;e<this.num_items;e++)t=t.concat(this.numberTo8(this.items[e].type),this.numberTo64(this.items[e].id));return t},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});this.num_items=this.bytesToInt16NoAllocate(t),this.items=[];for(var i=0;i<this.num_items;i++)this.items[i]={type:this.bytesToInt8(t.shift(1)),id:this.bytesToInt64(t.shift(8))};return this}}),wdi.SpiceMsgMainAgentTokens=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.num_tokens=t.num_tokens},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.num_tokens)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.num_tokens=this.bytesToInt32NoAllocate(t),this}}),wdi.SpiceMsgMainAgentDisconnected=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.error=t.error},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.error)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.error=this.bytesToInt32NoAllocate(t),this}}),wdi.SpiceMsgMainAgentData=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.agentMessage=t.agentMessage},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.agentMessage.marshall()),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.agentMessage=(new wdi.VDAgentMessage).demarshall(t),this}}),wdi.VDIChunkHeader=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){this.port=t.port,this.size=t.size,this.packet=t.packet},marshall:function(){this.rawData=[];var t=this.packet.marshall();return this.rawData=this.rawData.concat(this.numberTo32(this.port),this.numberTo32(t.length),t),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this}}),wdi.VDAgentMessage=$.spcExtend(wdi.SpiceObject,{objectSize:20,init:function(t){t&&this.setContent(t)},setContent:function(t){this.protocol=t.protocol,this.type=t.type,this.opaque=t.opaque,this.size=t.size,this.data=t.data},marshall:function(){this.rawData=[];var t=this.data.marshall();return this.rawData=this.rawData.concat(this.numberTo32(this.protocol),this.numberTo32(this.type),this.numberTo64(this.opaque),this.numberTo32(t.length),t),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});if(this.protocol=this.bytesToInt32NoAllocate(t),this.type=this.bytesToInt32NoAllocate(t),this.opaque=this.bytesToInt64NoAllocate(t),this.size=this.bytesToInt32NoAllocate(t),this.type==wdi.AgentMessageTypes.VD_AGENT_GET_WINDOWS_LIST){var i=this.bytesToString(t.shift(t.length));this.window_list="change"==i?i:jQuery.parseJSON(i)}else this.type==wdi.AgentMessageTypes.VD_AGENT_ANNOUNCE_CAPABILITIES?this.caps=(new wdi.VDAgentAnnounceCapabilities).demarshall(t):this.type==wdi.AgentMessageTypes.VD_AGENT_CLIPBOARD_GRAB?0==t.getLength()?this.clipboardType=wdi.ClipBoardTypes.VD_AGENT_CLIPBOARD_NONE:this.clipboardType=this.bytesToInt32NoAllocate(t):this.type==wdi.AgentMessageTypes.VD_AGENT_CLIPBOARD_REQUEST?this.clipboardType=this.bytesToInt32NoAllocate(t):this.type==wdi.AgentMessageTypes.VD_AGENT_CLIPBOARD&&(this.clipboardType=this.bytesToInt32NoAllocate(t),this.clipboardData=this.bytesToString(t.shift(t.length)));return this}}),wdi.VDAgentHwndWindow=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.hwnd=t.hwnd},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.hwnd)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this}}),wdi.VDAgentMoveWindow=$.spcExtend(wdi.SpiceObject,{objectSize:12,init:function(t){t&&this.setContent(t)},setContent:function(t){this.hwnd=t.hwnd,this.x=t.x,this.y=t.y},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.hwnd),this.numberTo32(this.x),this.numberTo32(this.y)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this}}),wdi.VDAgentResizeWindow=$.spcExtend(wdi.SpiceObject,{objectSize:12,init:function(t){t&&this.setContent(t)},setContent:function(t){this.hwnd=t.hwnd,this.width=t.width,this.height=t.height},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.hwnd),this.numberTo32(this.width),this.numberTo32(this.height)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this}}),wdi.VDAgentMonitorsConfig=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){this.num_of_monitors=t.num_of_monitors,this.flags=t.flags,this.data=t.data},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.num_of_monitors),this.numberTo32(this.flags),this.data.marshall()),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this}}),wdi.VDAgentMonConfig=$.spcExtend(wdi.SpiceObject,{objectSize:20,init:function(t){t&&this.setContent(t)},setContent:function(t){this.height=t.height,this.width=t.width,this.depth=t.depth,this.x=t.x,this.y=t.y},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.height),this.numberTo32(this.width),this.numberTo32(this.depth),this.numberTo32(this.x),this.numberTo32(this.y)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this}}),wdi.VDAgentAnnounceCapabilities=$.spcExtend(wdi.SpiceObject,{objectSize:8,init:function(t){t&&this.setContent(t)},setContent:function(t){this.request=t.request,this.caps=t.caps},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.request),this.numberTo32(this.caps)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.request=this.bytesToInt32NoAllocate(t),this.caps=this.bytesToInt32NoAllocate(t),this}}),wdi.VDAgentExecuteCommand=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.size=t.size,this.data=t.data},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.size),this.stringToBytes(this.data)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this}}),wdi.VDAgentClipboardRequest=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.type=t.type},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.type)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.type=this.bytesToInt32NoAllocate(t),this}}),wdi.VDAgentClipboardGrab=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.types=t.types},marshall:function(){return this.rawData=[],this.rawData=this.rawData.concat(this.numberTo32(this.types)),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.types=this.bytesToInt32NoAllocate(t),this}}),wdi.VDAgentClipboard=$.spcExtend(wdi.SpiceObject,{objectSize:6,init:function(t){t&&this.setContent(t)},setContent:function(t){this.type=t.type,this.data=t.data},marshall:function(){var t;return this.rawData=[],t=this.type===wdi.ClipBoardTypes.VD_AGENT_CLIPBOARD_UTF8_TEXT?this.stringToBytes(this.data):this.arrayBufferToBytes(this.data),this.rawData=this.rawData.concat(this.numberTo32(this.type),t),this.rawData},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.type=this.bytesToInt32NoAllocate(t),this.data=t.getData(),this}}),wdi.PlaybackMode=$.spcExtend(wdi.SpiceObject,{objectSize:6,init:function(t){t&&this.setContent(t)},setContent:function(t){this.multimedia_time=t.multimedia_time,this.audio_data_mode=t.audio_data_mode,this.data=t.data},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.multimedia_time=this.bytesToInt32NoAllocate(t),this.audio_data_mode=this.bytesToInt16NoAllocate(t),this.data=t.getData(),this}}),wdi.PlaybackStart=$.spcExtend(wdi.SpiceObject,{objectSize:14,init:function(t){t&&this.setContent(t)},setContent:function(t){this.channels=t.channels,this.format=t.format,this.frequency=t.frequency,this.time=t.time},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.channels=this.bytesToInt32NoAllocate(t),this.format=this.bytesToInt16NoAllocate(t),this.frequency=this.bytesToInt32NoAllocate(t),this.time=this.bytesToInt32NoAllocate(t),this}}),wdi.PlaybackData=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.multimedia_time=t.multimedia_time,this.data=t.data},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.multimedia_time=this.bytesToInt32NoAllocate(t),this.data=t.getData(),this}}),wdi.MainMultiMediaTime=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.multimedia_time=t.multimedia_time},marshall:function(){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this.multimedia_time=this.bytesToInt32NoAllocate(t),this}}),wdi.PlaybackStop=$.spcExtend(wdi.SpiceObject,{objectSize:0,demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this}}),wdi.MainMChannelsList=$.spcExtend(wdi.SpiceObject,{objectSize:4,init:function(t){t&&this.setContent(t)},setContent:function(t){this.num_of_channels=t.num_of_channels},marshall:function(){},demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});this.num_of_channels=this.bytesToInt32NoAllocate(t),this.channels=[];for(var i=null,s=0;s<this.num_of_channels;s++)i=this.bytesToInt8NoAllocate(t),this.bytesToInt8NoAllocate(t),this.channels.push(i);return this}}),wdi.SpiceDisplayInvalidAllPalettes=$.spcExtend(wdi.SpiceObject,{objectSize:0,demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this}}),wdi.SpiceDisplayMark=$.spcExtend(wdi.SpiceObject,{objectSize:0,demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this}}),wdi.SpiceDisplayReset=$.spcExtend(wdi.SpiceObject,{objectSize:0,demarshall:function(t,e){if(this.expectedSize=e||this.objectSize,t.getLength()<this.expectedSize)throw new wdi.Exception({message:"Not enough queue to read",errorCode:3});return this}});
|