cyberia 2.8.885
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/.dockerignore +15 -0
- package/.env.development +45 -0
- package/.env.production +50 -0
- package/.env.test +45 -0
- package/.github/workflows/engine-cyberia.cd.yml +31 -0
- package/.github/workflows/engine-cyberia.ci.yml +60 -0
- package/.github/workflows/ghpkg.ci.yml +87 -0
- package/.github/workflows/npmpkg.ci.yml +72 -0
- package/.github/workflows/publish.ci.yml +84 -0
- package/.github/workflows/publish.cyberia.ci.yml +84 -0
- package/.github/workflows/pwa-microservices-template-page.cd.yml +72 -0
- package/.github/workflows/pwa-microservices-template-test.ci.yml +33 -0
- package/.github/workflows/release.cd.yml +37 -0
- package/.nycrc +9 -0
- package/.prettierignore +13 -0
- package/.prettierrc +9 -0
- package/.vscode/extensions.json +51 -0
- package/.vscode/settings.json +87 -0
- package/AUTHORS.md +21 -0
- package/CHANGELOG.md +205 -0
- package/Dockerfile +28 -0
- package/LICENSE +21 -0
- package/README.md +85 -0
- package/bin/build.js +209 -0
- package/bin/cron.js +47 -0
- package/bin/cyberia.js +145 -0
- package/bin/db.js +199 -0
- package/bin/deploy.js +1293 -0
- package/bin/file.js +197 -0
- package/bin/hwt.js +49 -0
- package/bin/index.js +145 -0
- package/bin/ssl.js +63 -0
- package/bin/util.js +80 -0
- package/bin/vs.js +74 -0
- package/cli.md +714 -0
- package/conf.js +204 -0
- package/deployment.yaml +138 -0
- package/jsconfig.json +7 -0
- package/jsdoc.json +32 -0
- package/manifests/deployment/adminer/deployment.yaml +32 -0
- package/manifests/deployment/adminer/kustomization.yaml +7 -0
- package/manifests/deployment/adminer/service.yaml +13 -0
- package/manifests/deployment/dd-default-development/deployment.yaml +167 -0
- package/manifests/deployment/dd-default-development/proxy.yaml +46 -0
- package/manifests/deployment/dd-test-development/deployment.yaml +174 -0
- package/manifests/deployment/dd-test-development/proxy.yaml +51 -0
- package/manifests/deployment/fastapi/backend-deployment.yml +120 -0
- package/manifests/deployment/fastapi/backend-service.yml +19 -0
- package/manifests/deployment/fastapi/frontend-deployment.yml +54 -0
- package/manifests/deployment/fastapi/frontend-service.yml +15 -0
- package/manifests/deployment/fastapi/initial_data.sh +56 -0
- package/manifests/deployment/kafka/deployment.yaml +69 -0
- package/manifests/deployment/mongo-express/deployment.yaml +60 -0
- package/manifests/deployment/phpmyadmin/deployment.yaml +54 -0
- package/manifests/deployment/spark/spark-pi-py.yaml +21 -0
- package/manifests/deployment/tensorflow/tf-gpu-test.yaml +65 -0
- package/manifests/envoy-service-nodeport.yaml +23 -0
- package/manifests/grafana/deployment.yaml +57 -0
- package/manifests/grafana/kustomization.yaml +7 -0
- package/manifests/grafana/pvc.yaml +12 -0
- package/manifests/grafana/service.yaml +14 -0
- package/manifests/kind-config-dev.yaml +12 -0
- package/manifests/kind-config.yaml +12 -0
- package/manifests/kubeadm-calico-config.yaml +119 -0
- package/manifests/kubelet-config.yaml +65 -0
- package/manifests/letsencrypt-prod.yaml +15 -0
- package/manifests/lxd/lxd-admin-profile.yaml +17 -0
- package/manifests/lxd/lxd-preseed.yaml +30 -0
- package/manifests/lxd/underpost-setup.sh +163 -0
- package/manifests/mariadb/config.yaml +10 -0
- package/manifests/mariadb/kustomization.yaml +9 -0
- package/manifests/mariadb/pv.yaml +12 -0
- package/manifests/mariadb/pvc.yaml +10 -0
- package/manifests/mariadb/secret.yaml +8 -0
- package/manifests/mariadb/service.yaml +10 -0
- package/manifests/mariadb/statefulset.yaml +56 -0
- package/manifests/mariadb/storage-class.yaml +10 -0
- package/manifests/mongodb/backup-access.yaml +16 -0
- package/manifests/mongodb/backup-cronjob.yaml +42 -0
- package/manifests/mongodb/backup-pv-pvc.yaml +22 -0
- package/manifests/mongodb/configmap.yaml +26 -0
- package/manifests/mongodb/headless-service.yaml +10 -0
- package/manifests/mongodb/kustomization.yaml +11 -0
- package/manifests/mongodb/pv-pvc.yaml +23 -0
- package/manifests/mongodb/statefulset.yaml +126 -0
- package/manifests/mongodb/storage-class.yaml +9 -0
- package/manifests/mongodb-4.4/kustomization.yaml +7 -0
- package/manifests/mongodb-4.4/pv-pvc.yaml +23 -0
- package/manifests/mongodb-4.4/service-deployment.yaml +63 -0
- package/manifests/mysql/kustomization.yaml +7 -0
- package/manifests/mysql/pv-pvc.yaml +27 -0
- package/manifests/mysql/statefulset.yaml +55 -0
- package/manifests/postgresql/configmap.yaml +9 -0
- package/manifests/postgresql/kustomization.yaml +10 -0
- package/manifests/postgresql/pv.yaml +15 -0
- package/manifests/postgresql/pvc.yaml +13 -0
- package/manifests/postgresql/service.yaml +10 -0
- package/manifests/postgresql/statefulset.yaml +37 -0
- package/manifests/prometheus/deployment.yaml +82 -0
- package/manifests/valkey/kustomization.yaml +7 -0
- package/manifests/valkey/service.yaml +11 -0
- package/manifests/valkey/statefulset.yaml +38 -0
- package/nodemon.json +6 -0
- package/package.json +118 -0
- package/proxy.yaml +35 -0
- package/scripts/device-scan.sh +43 -0
- package/scripts/gpu-diag.sh +19 -0
- package/scripts/maas-setup.sh +120 -0
- package/scripts/nat-iptables.sh +26 -0
- package/scripts/nvim.sh +91 -0
- package/scripts/snap-clean.sh +26 -0
- package/scripts/ssh-cluster-info.sh +14 -0
- package/scripts/ssl.sh +164 -0
- package/src/api/blockchain/blockchain.controller.js +51 -0
- package/src/api/blockchain/blockchain.model.js +90 -0
- package/src/api/blockchain/blockchain.router.js +21 -0
- package/src/api/blockchain/blockchain.service.js +24 -0
- package/src/api/core/core.controller.js +69 -0
- package/src/api/core/core.model.js +11 -0
- package/src/api/core/core.router.js +24 -0
- package/src/api/core/core.service.js +35 -0
- package/src/api/crypto/crypto.controller.js +51 -0
- package/src/api/crypto/crypto.model.js +23 -0
- package/src/api/crypto/crypto.router.js +20 -0
- package/src/api/crypto/crypto.service.js +64 -0
- package/src/api/default/default.controller.js +74 -0
- package/src/api/default/default.model.js +20 -0
- package/src/api/default/default.router.js +27 -0
- package/src/api/default/default.service.js +40 -0
- package/src/api/document/document.controller.js +66 -0
- package/src/api/document/document.model.js +51 -0
- package/src/api/document/document.router.js +24 -0
- package/src/api/document/document.service.js +133 -0
- package/src/api/file/file.controller.js +67 -0
- package/src/api/file/file.model.js +19 -0
- package/src/api/file/file.router.js +22 -0
- package/src/api/file/file.service.js +100 -0
- package/src/api/instance/instance.controller.js +69 -0
- package/src/api/instance/instance.model.js +40 -0
- package/src/api/instance/instance.router.js +34 -0
- package/src/api/instance/instance.service.js +70 -0
- package/src/api/ipfs/ipfs.controller.js +51 -0
- package/src/api/ipfs/ipfs.model.js +17 -0
- package/src/api/ipfs/ipfs.router.js +20 -0
- package/src/api/ipfs/ipfs.service.js +25 -0
- package/src/api/object-layer/README.md +85 -0
- package/src/api/object-layer/object-layer.controller.js +69 -0
- package/src/api/object-layer/object-layer.model.js +181 -0
- package/src/api/object-layer/object-layer.router.js +29 -0
- package/src/api/object-layer/object-layer.service.js +49 -0
- package/src/api/test/test.controller.js +59 -0
- package/src/api/test/test.model.js +14 -0
- package/src/api/test/test.router.js +21 -0
- package/src/api/test/test.service.js +35 -0
- package/src/api/user/postman_collection.json +216 -0
- package/src/api/user/user.build.js +16 -0
- package/src/api/user/user.controller.js +35 -0
- package/src/api/user/user.model.js +100 -0
- package/src/api/user/user.router.js +400 -0
- package/src/api/user/user.service.js +500 -0
- package/src/api.js +23 -0
- package/src/cli/baremetal.js +1310 -0
- package/src/cli/cloud-init.js +548 -0
- package/src/cli/cluster.js +834 -0
- package/src/cli/cron.js +95 -0
- package/src/cli/db.js +414 -0
- package/src/cli/deploy.js +661 -0
- package/src/cli/env.js +101 -0
- package/src/cli/fs.js +256 -0
- package/src/cli/image.js +156 -0
- package/src/cli/index.js +436 -0
- package/src/cli/lxd.js +402 -0
- package/src/cli/monitor.js +260 -0
- package/src/cli/repository.js +274 -0
- package/src/cli/run.js +728 -0
- package/src/cli/script.js +85 -0
- package/src/cli/secrets.js +71 -0
- package/src/cli/ssh.js +46 -0
- package/src/cli/test.js +159 -0
- package/src/client/Cyberia.index.js +50 -0
- package/src/client/CyberiaAdmin.index.js +34 -0
- package/src/client/CyberiaPortal.index.js +36 -0
- package/src/client/Default.index.js +84 -0
- package/src/client/components/core/404.js +20 -0
- package/src/client/components/core/500.js +20 -0
- package/src/client/components/core/Account.js +326 -0
- package/src/client/components/core/AgGrid.js +191 -0
- package/src/client/components/core/Alert.js +77 -0
- package/src/client/components/core/Auth.js +342 -0
- package/src/client/components/core/Badge.js +32 -0
- package/src/client/components/core/Blockchain.js +41 -0
- package/src/client/components/core/Blog.js +9 -0
- package/src/client/components/core/BtnIcon.js +111 -0
- package/src/client/components/core/CalendarCore.js +464 -0
- package/src/client/components/core/Chat.js +64 -0
- package/src/client/components/core/ColorPalette.js +5267 -0
- package/src/client/components/core/CommonJs.js +1010 -0
- package/src/client/components/core/Content.js +196 -0
- package/src/client/components/core/Css.js +1099 -0
- package/src/client/components/core/CssCore.js +882 -0
- package/src/client/components/core/D3Chart.js +44 -0
- package/src/client/components/core/Docs.js +376 -0
- package/src/client/components/core/DropDown.js +223 -0
- package/src/client/components/core/EventsUI.js +133 -0
- package/src/client/components/core/FileExplorer.js +707 -0
- package/src/client/components/core/FullScreen.js +36 -0
- package/src/client/components/core/Input.js +383 -0
- package/src/client/components/core/JoyStick.js +80 -0
- package/src/client/components/core/Keyboard.js +73 -0
- package/src/client/components/core/LoadingAnimation.js +159 -0
- package/src/client/components/core/LogIn.js +190 -0
- package/src/client/components/core/LogOut.js +63 -0
- package/src/client/components/core/Logger.js +29 -0
- package/src/client/components/core/Modal.js +2494 -0
- package/src/client/components/core/NotificationManager.js +84 -0
- package/src/client/components/core/ObjectLayerEngine.js +1229 -0
- package/src/client/components/core/ObjectLayerEngineModal.js +443 -0
- package/src/client/components/core/Pagination.js +207 -0
- package/src/client/components/core/Panel.js +772 -0
- package/src/client/components/core/PanelForm.js +627 -0
- package/src/client/components/core/Polyhedron.js +162 -0
- package/src/client/components/core/Recover.js +207 -0
- package/src/client/components/core/Responsive.js +82 -0
- package/src/client/components/core/RichText.js +43 -0
- package/src/client/components/core/Router.js +317 -0
- package/src/client/components/core/Scroll.js +76 -0
- package/src/client/components/core/SignUp.js +125 -0
- package/src/client/components/core/SocketIo.js +74 -0
- package/src/client/components/core/Stream.js +113 -0
- package/src/client/components/core/ToggleSwitch.js +101 -0
- package/src/client/components/core/ToolTip.js +90 -0
- package/src/client/components/core/Translate.js +522 -0
- package/src/client/components/core/Validator.js +115 -0
- package/src/client/components/core/VanillaJs.js +423 -0
- package/src/client/components/core/Wallet.js +106 -0
- package/src/client/components/core/WebComponent.js +44 -0
- package/src/client/components/core/Webhook.js +25 -0
- package/src/client/components/core/Worker.js +371 -0
- package/src/client/components/core/windowGetDimensions.js +269 -0
- package/src/client/components/cyberia/BagCyberia.js +1253 -0
- package/src/client/components/cyberia/BiomeCyberia.js +130 -0
- package/src/client/components/cyberia/CharacterCyberia.js +321 -0
- package/src/client/components/cyberia/CommonCyberia.js +1834 -0
- package/src/client/components/cyberia/CssCyberia.js +816 -0
- package/src/client/components/cyberia/ElementPreviewCyberia.js +183 -0
- package/src/client/components/cyberia/ElementsCyberia.js +146 -0
- package/src/client/components/cyberia/InteractionPanelCyberia.js +1043 -0
- package/src/client/components/cyberia/JoyStickCyberia.js +53 -0
- package/src/client/components/cyberia/LogInCyberia.js +68 -0
- package/src/client/components/cyberia/LogOutCyberia.js +24 -0
- package/src/client/components/cyberia/MainUserCyberia.js +424 -0
- package/src/client/components/cyberia/MapCyberia.js +160 -0
- package/src/client/components/cyberia/MatrixCyberia.js +147 -0
- package/src/client/components/cyberia/MenuCyberia.js +575 -0
- package/src/client/components/cyberia/PixiCyberia.js +1639 -0
- package/src/client/components/cyberia/PointAndClickMovementCyberia.js +146 -0
- package/src/client/components/cyberia/QuestCyberia.js +1420 -0
- package/src/client/components/cyberia/RoutesCyberia.js +47 -0
- package/src/client/components/cyberia/SettingsCyberia.js +16 -0
- package/src/client/components/cyberia/SignUpCyberia.js +14 -0
- package/src/client/components/cyberia/SkillCyberia.js +124 -0
- package/src/client/components/cyberia/SocketIoCyberia.js +211 -0
- package/src/client/components/cyberia/TileCyberia.js +685 -0
- package/src/client/components/cyberia/TranslateCyberia.js +96 -0
- package/src/client/components/cyberia/UniverseCyberia.js +14 -0
- package/src/client/components/cyberia/WebhookCyberia.js +13 -0
- package/src/client/components/cyberia/WikiCyberia.js +144 -0
- package/src/client/components/cyberia/WorldCyberia.js +680 -0
- package/src/client/components/cyberia-admin/BiomeCyberiaAdmin.js +978 -0
- package/src/client/components/cyberia-admin/CommonCyberiaAdmin.js +29 -0
- package/src/client/components/cyberia-admin/CssCyberiaAdmin.js +15 -0
- package/src/client/components/cyberia-admin/ElementsCyberiaAdmin.js +38 -0
- package/src/client/components/cyberia-admin/InstanceEngineCyberiaAdmin.js +180 -0
- package/src/client/components/cyberia-admin/LogInCyberiaAdmin.js +34 -0
- package/src/client/components/cyberia-admin/LogOutCyberiaAdmin.js +24 -0
- package/src/client/components/cyberia-admin/MenuCyberiaAdmin.js +660 -0
- package/src/client/components/cyberia-admin/RoutesCyberiaAdmin.js +57 -0
- package/src/client/components/cyberia-admin/ServerCyberiaAdmin.js +129 -0
- package/src/client/components/cyberia-admin/SettingsCyberiaAdmin.js +16 -0
- package/src/client/components/cyberia-admin/SignUpCyberiaAdmin.js +11 -0
- package/src/client/components/cyberia-admin/SocketIoCyberiaAdmin.js +53 -0
- package/src/client/components/cyberia-admin/TranslateCyberiaAdmin.js +7 -0
- package/src/client/components/cyberia-biome/CityCyberiaBiome.js +209 -0
- package/src/client/components/cyberia-biome/CityInteriorCyberiaBiome.js +253 -0
- package/src/client/components/cyberia-biome/ColorChaosCyberiaBiome.js +26 -0
- package/src/client/components/cyberia-biome/ForestCyberiaBiome.js +191 -0
- package/src/client/components/cyberia-biome/GridBaseCyberiaBiome.js +364 -0
- package/src/client/components/cyberia-biome/SeedCityCyberiaBiome.js +347 -0
- package/src/client/components/cyberia-biome/ShopCyberiaBiome.js +12 -0
- package/src/client/components/cyberia-biome/SpaceCyberiaBiome.js +58 -0
- package/src/client/components/cyberia-portal/CommonCyberiaPortal.js +29 -0
- package/src/client/components/cyberia-portal/CssCyberiaPortal.js +132 -0
- package/src/client/components/cyberia-portal/ElementsCyberiaPortal.js +38 -0
- package/src/client/components/cyberia-portal/LogInCyberiaPortal.js +18 -0
- package/src/client/components/cyberia-portal/LogOutCyberiaPortal.js +12 -0
- package/src/client/components/cyberia-portal/MenuCyberiaPortal.js +487 -0
- package/src/client/components/cyberia-portal/RoutesCyberiaPortal.js +45 -0
- package/src/client/components/cyberia-portal/ServerCyberiaPortal.js +136 -0
- package/src/client/components/cyberia-portal/SettingsCyberiaPortal.js +16 -0
- package/src/client/components/cyberia-portal/SignUpCyberiaPortal.js +11 -0
- package/src/client/components/cyberia-portal/SocketIoCyberiaPortal.js +52 -0
- package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +12 -0
- package/src/client/components/default/CommonDefault.js +29 -0
- package/src/client/components/default/CssDefault.js +27 -0
- package/src/client/components/default/ElementsDefault.js +38 -0
- package/src/client/components/default/LogInDefault.js +14 -0
- package/src/client/components/default/LogOutDefault.js +10 -0
- package/src/client/components/default/MenuDefault.js +743 -0
- package/src/client/components/default/RoutesDefault.js +48 -0
- package/src/client/components/default/SettingsDefault.js +16 -0
- package/src/client/components/default/SignUpDefault.js +9 -0
- package/src/client/components/default/SocketIoDefault.js +54 -0
- package/src/client/components/default/TranslateDefault.js +7 -0
- package/src/client/public/default/android-chrome-144x144.png +0 -0
- package/src/client/public/default/android-chrome-192x192.png +0 -0
- package/src/client/public/default/android-chrome-256x256.png +0 -0
- package/src/client/public/default/android-chrome-36x36.png +0 -0
- package/src/client/public/default/android-chrome-384x384.png +0 -0
- package/src/client/public/default/android-chrome-48x48.png +0 -0
- package/src/client/public/default/android-chrome-512x512.png +0 -0
- package/src/client/public/default/android-chrome-72x72.png +0 -0
- package/src/client/public/default/android-chrome-96x96.png +0 -0
- package/src/client/public/default/apple-touch-icon-1024x1024.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/default/apple-touch-icon-167x167.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/default/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1125x2436.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1136x640.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1170x2532.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1179x2556.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1242x2208.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1242x2688.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1284x2778.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1290x2796.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1334x750.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1488x2266.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1536x2048.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1620x2160.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1640x2160.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1668x2224.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1668x2388.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1792x828.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2048x1536.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2048x2732.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2160x1620.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2160x1640.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2208x1242.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2224x1668.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2266x1488.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2388x1668.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2436x1125.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2532x1170.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2556x1179.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2688x1242.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2732x2048.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2778x1284.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2796x1290.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-640x1136.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-750x1334.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-828x1792.png +0 -0
- package/src/client/public/default/assets/background/dark.jpg +0 -0
- package/src/client/public/default/assets/background/dark.svg +557 -0
- package/src/client/public/default/assets/background/white.jpg +0 -0
- package/src/client/public/default/assets/background/white0-min.jpg +0 -0
- package/src/client/public/default/assets/background/white0.jpg +0 -0
- package/src/client/public/default/assets/logo/base-icon.png +0 -0
- package/src/client/public/default/assets/logo/underpost.gif +0 -0
- package/src/client/public/default/assets/mailer/api-user-check.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-default-avatar.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-invalid-token.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-recover.png +0 -0
- package/src/client/public/default/browserconfig.xml +12 -0
- package/src/client/public/default/favicon-16x16.png +0 -0
- package/src/client/public/default/favicon-32x32.png +0 -0
- package/src/client/public/default/favicon-48x48.png +0 -0
- package/src/client/public/default/favicon.ico +0 -0
- package/src/client/public/default/manifest.webmanifest +69 -0
- package/src/client/public/default/mstile-144x144.png +0 -0
- package/src/client/public/default/mstile-150x150.png +0 -0
- package/src/client/public/default/mstile-310x150.png +0 -0
- package/src/client/public/default/mstile-310x310.png +0 -0
- package/src/client/public/default/mstile-70x70.png +0 -0
- package/src/client/public/default/plantuml/client-conf.svg +1 -0
- package/src/client/public/default/plantuml/client-schema.svg +1 -0
- package/src/client/public/default/plantuml/cron-conf.svg +1 -0
- package/src/client/public/default/plantuml/cron-schema.svg +1 -0
- package/src/client/public/default/plantuml/server-conf.svg +1 -0
- package/src/client/public/default/plantuml/server-schema.svg +1 -0
- package/src/client/public/default/plantuml/ssr-conf.svg +1 -0
- package/src/client/public/default/plantuml/ssr-schema.svg +1 -0
- package/src/client/public/default/safari-pinned-tab.svg +24 -0
- package/src/client/public/default/site.webmanifest +69 -0
- package/src/client/public/default/sitemap +148 -0
- package/src/client/public/default/yandex-browser-50x50.png +0 -0
- package/src/client/public/default/yandex-browser-manifest.json +9 -0
- package/src/client/public/doc/favicon.ico +0 -0
- package/src/client/public/doc/sitemap +148 -0
- package/src/client/public/test/favicon.ico +0 -0
- package/src/client/public/test/sitemap +148 -0
- package/src/client/services/blockchain/blockchain.service.js +73 -0
- package/src/client/services/core/core.service.js +165 -0
- package/src/client/services/crypto/crypto.service.js +73 -0
- package/src/client/services/default/default.management.js +450 -0
- package/src/client/services/default/default.service.js +98 -0
- package/src/client/services/document/document.service.js +97 -0
- package/src/client/services/file/file.service.js +72 -0
- package/src/client/services/instance/instance.management.js +78 -0
- package/src/client/services/instance/instance.service.js +97 -0
- package/src/client/services/ipfs/ipfs.service.js +73 -0
- package/src/client/services/object-layer/object-layer.service.js +93 -0
- package/src/client/services/test/test.service.js +73 -0
- package/src/client/services/user/user.management.js +56 -0
- package/src/client/services/user/user.service.js +108 -0
- package/src/client/ssr/Render.js +237 -0
- package/src/client/ssr/body/404.js +73 -0
- package/src/client/ssr/body/500.js +72 -0
- package/src/client/ssr/body/CacheControl.js +114 -0
- package/src/client/ssr/body/CyberiaDefaultSplashScreen.js +90 -0
- package/src/client/ssr/body/CyberiaSplashScreenLore.js +424 -0
- package/src/client/ssr/body/DefaultSplashScreen.js +90 -0
- package/src/client/ssr/email/DefaultRecoverEmail.js +21 -0
- package/src/client/ssr/email/DefaultVerifyEmail.js +17 -0
- package/src/client/ssr/head/Css.js +241 -0
- package/src/client/ssr/head/CyberiaAdminScripts.js +6 -0
- package/src/client/ssr/head/CyberiaPortalScripts.js +6 -0
- package/src/client/ssr/head/CyberiaScripts.js +6 -0
- package/src/client/ssr/head/DefaultScripts.js +6 -0
- package/src/client/ssr/head/Microdata.js +11 -0
- package/src/client/ssr/head/Production.js +1 -0
- package/src/client/ssr/head/Pwa.js +146 -0
- package/src/client/ssr/head/Seo.js +15 -0
- package/src/client/ssr/mailer/DefaultRecoverEmail.js +21 -0
- package/src/client/ssr/mailer/DefaultVerifyEmail.js +17 -0
- package/src/client/ssr/offline/Maintenance.js +63 -0
- package/src/client/ssr/offline/NoNetworkConnection.js +67 -0
- package/src/client/ssr/pages/404.js +12 -0
- package/src/client/ssr/pages/500.js +12 -0
- package/src/client/ssr/pages/Test.js +198 -0
- package/src/client/ssr/pages/maintenance.js +14 -0
- package/src/client/ssr/pages/offline.js +21 -0
- package/src/client/sw/default.sw.js +108 -0
- package/src/client/sw/template.sw.js +84 -0
- package/src/client.build.js +22 -0
- package/src/client.dev.js +24 -0
- package/src/db/DataBaseProvider.js +98 -0
- package/src/db/mariadb/MariaDB.js +66 -0
- package/src/db/mongo/MongooseDB.js +70 -0
- package/src/index.js +198 -0
- package/src/mailer/EmailRender.js +116 -0
- package/src/mailer/MailerProvider.js +213 -0
- package/src/monitor.js +24 -0
- package/src/proxy.js +22 -0
- package/src/runtime/express/Express.js +256 -0
- package/src/runtime/lampp/Dockerfile +50 -0
- package/src/runtime/lampp/Lampp.js +343 -0
- package/src/server/auth.js +689 -0
- package/src/server/backup.js +96 -0
- package/src/server/client-build-docs.js +205 -0
- package/src/server/client-build-live.js +109 -0
- package/src/server/client-build.js +690 -0
- package/src/server/client-dev-server.js +87 -0
- package/src/server/client-formatted.js +87 -0
- package/src/server/client-icons.js +108 -0
- package/src/server/conf.js +1071 -0
- package/src/server/crypto.js +210 -0
- package/src/server/dns.js +276 -0
- package/src/server/downloader.js +74 -0
- package/src/server/json-schema.js +77 -0
- package/src/server/logger.js +197 -0
- package/src/server/network.js +72 -0
- package/src/server/object-layer.js +294 -0
- package/src/server/peer.js +69 -0
- package/src/server/process.js +171 -0
- package/src/server/proxy.js +110 -0
- package/src/server/runtime.js +170 -0
- package/src/server/ssr.js +127 -0
- package/src/server/start.js +161 -0
- package/src/server/tls.js +251 -0
- package/src/server/valkey.js +293 -0
- package/src/server.js +25 -0
- package/src/ws/IoInterface.js +139 -0
- package/src/ws/IoServer.js +88 -0
- package/src/ws/core/channels/core.ws.chat.js +23 -0
- package/src/ws/core/channels/core.ws.mailer.js +35 -0
- package/src/ws/core/channels/core.ws.stream.js +31 -0
- package/src/ws/core/core.ws.connection.js +62 -0
- package/src/ws/core/core.ws.emit.js +53 -0
- package/src/ws/core/core.ws.server.js +76 -0
- package/src/ws/core/management/core.ws.chat.js +8 -0
- package/src/ws/core/management/core.ws.mailer.js +16 -0
- package/src/ws/core/management/core.ws.stream.js +8 -0
- package/src/ws/cyberia/channels/cyberia.ws.bot.js +56 -0
- package/src/ws/cyberia/channels/cyberia.ws.skill.js +51 -0
- package/src/ws/cyberia/channels/cyberia.ws.user.js +437 -0
- package/src/ws/cyberia/cyberia.ws.connection.js +36 -0
- package/src/ws/cyberia/cyberia.ws.emit.js +14 -0
- package/src/ws/cyberia/cyberia.ws.server.js +67 -0
- package/src/ws/cyberia/management/cyberia.ws.bot.js +669 -0
- package/src/ws/cyberia/management/cyberia.ws.skill.js +441 -0
- package/src/ws/cyberia/management/cyberia.ws.user.js +188 -0
- package/src/ws/default/channels/default.ws.main.js +16 -0
- package/src/ws/default/default.ws.connection.js +22 -0
- package/src/ws/default/default.ws.emit.js +14 -0
- package/src/ws/default/default.ws.server.js +20 -0
- package/src/ws/default/management/default.ws.main.js +8 -0
- package/test/api.test.js +53 -0
- package/test/crypto.test.js +117 -0
|
@@ -0,0 +1,1043 @@
|
|
|
1
|
+
import { BtnIcon } from '../core/BtnIcon.js';
|
|
2
|
+
import { getId, newInstance, objectEquals, range, timer } from '../core/CommonJs.js';
|
|
3
|
+
import {
|
|
4
|
+
Css,
|
|
5
|
+
Themes,
|
|
6
|
+
borderChar,
|
|
7
|
+
dashRange,
|
|
8
|
+
getTranslate3d,
|
|
9
|
+
renderBubbleDialog,
|
|
10
|
+
renderCssAttr,
|
|
11
|
+
typeWriter,
|
|
12
|
+
} from '../core/Css.js';
|
|
13
|
+
import { LoadingAnimation } from '../core/LoadingAnimation.js';
|
|
14
|
+
import { Modal, renderViewTitle } from '../core/Modal.js';
|
|
15
|
+
import { Responsive } from '../core/Responsive.js';
|
|
16
|
+
import { Translate } from '../core/Translate.js';
|
|
17
|
+
import { append, htmls, prepend, s } from '../core/VanillaJs.js';
|
|
18
|
+
import { BiomeCyberiaScope } from './BiomeCyberia.js';
|
|
19
|
+
import { CharacterCyberia } from './CharacterCyberia.js';
|
|
20
|
+
import { QuestComponent, WorldCyberiaType, isElementCollision } from './CommonCyberia.js';
|
|
21
|
+
import { ElementsCyberia } from './ElementsCyberia.js';
|
|
22
|
+
import { MatrixCyberia } from './MatrixCyberia.js';
|
|
23
|
+
import { PixiCyberia } from './PixiCyberia.js';
|
|
24
|
+
import { PointAndClickMovementCyberia } from './PointAndClickMovementCyberia.js';
|
|
25
|
+
import { QuestManagementCyberia } from './QuestCyberia.js';
|
|
26
|
+
import { WorldCyberiaManagement } from './WorldCyberia.js';
|
|
27
|
+
import { getProxyPath } from '../core/Router.js';
|
|
28
|
+
import { windowGetW } from '../core/windowGetDimensions.js';
|
|
29
|
+
|
|
30
|
+
const InteractionPanelCyberia = {
|
|
31
|
+
Data: {},
|
|
32
|
+
restorePanel: function (id) {
|
|
33
|
+
const transition = s(`.${id}`).style.transition;
|
|
34
|
+
s(`.${id}`).style.transition = '0.3s';
|
|
35
|
+
this.Data[`${id}`].restorePosition(s(`.${id}`).style);
|
|
36
|
+
s(`.${id}`).style.transform = '';
|
|
37
|
+
Modal.Data[`${id}`].setDragInstance({
|
|
38
|
+
defaultPosition: {
|
|
39
|
+
x: 0,
|
|
40
|
+
y: 0,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
Modal.Data[`${id}`].onDragEndListener[`${id}`](); // save storage
|
|
44
|
+
setTimeout(() => {
|
|
45
|
+
s(`.${id}`).style.transition = transition;
|
|
46
|
+
}, 400);
|
|
47
|
+
},
|
|
48
|
+
PanelRender: {
|
|
49
|
+
actionPanelTokens: {},
|
|
50
|
+
removeAllActionPanel: async function () {
|
|
51
|
+
for (const idPanel of Object.keys(InteractionPanelCyberia.PanelRender.actionPanelTokens))
|
|
52
|
+
await InteractionPanelCyberia.PanelRender.removeActionPanel(idPanel);
|
|
53
|
+
QuestManagementCyberia.questClosePanels = [];
|
|
54
|
+
},
|
|
55
|
+
removeActionPanel: async function (idPanel) {
|
|
56
|
+
if (s(`.${idPanel}`)) s(`.${idPanel}`).remove();
|
|
57
|
+
delete InteractionPanelCyberia.PanelRender.actionPanelTokens[idPanel];
|
|
58
|
+
},
|
|
59
|
+
action: async function ({ idPanel, type, id, html }) {
|
|
60
|
+
const maxHeight = 110;
|
|
61
|
+
const ResponsiveDataAmplitude = Responsive.getResponsiveDataAmplitude({
|
|
62
|
+
dimAmplitude: MatrixCyberia.Data.dimAmplitude,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
this.actionPanelTokens[idPanel] = {};
|
|
66
|
+
|
|
67
|
+
const top = `${
|
|
68
|
+
(ResponsiveDataAmplitude.minValue / MatrixCyberia.Data.dim) * ElementsCyberia.Data[type][id].y * 1 - maxHeight
|
|
69
|
+
}px`;
|
|
70
|
+
const left = `${
|
|
71
|
+
(ResponsiveDataAmplitude.minValue / MatrixCyberia.Data.dim) * ElementsCyberia.Data[type][id].x * 1
|
|
72
|
+
}px`;
|
|
73
|
+
|
|
74
|
+
const height = `${maxHeight}px`;
|
|
75
|
+
|
|
76
|
+
if (s(`.${idPanel}`)) {
|
|
77
|
+
s(`.${idPanel}`).style.left = left;
|
|
78
|
+
s(`.${idPanel}`).style.top = top;
|
|
79
|
+
} else
|
|
80
|
+
append(
|
|
81
|
+
`.PointAndClickMovementCyberia-container`,
|
|
82
|
+
html`
|
|
83
|
+
<div class="abs action-game-panel ${idPanel}" style="top: ${top}; left: ${left}; height: ${height};">
|
|
84
|
+
${await html()}
|
|
85
|
+
</div>
|
|
86
|
+
`,
|
|
87
|
+
);
|
|
88
|
+
},
|
|
89
|
+
element: async function ({ type, id }) {
|
|
90
|
+
if (!s(`.element-interaction-panel`)) return;
|
|
91
|
+
htmls(
|
|
92
|
+
'.element-interaction-panel-preview',
|
|
93
|
+
html`<div class="abs center element-interaction-panel-preview-loading"></div>`,
|
|
94
|
+
);
|
|
95
|
+
LoadingAnimation.img.play(`.element-interaction-panel-preview-loading`, 'points');
|
|
96
|
+
{
|
|
97
|
+
const container = 'element-interaction-panel-preview';
|
|
98
|
+
await CharacterCyberia.renderCharacterCyberiaPreView({
|
|
99
|
+
type,
|
|
100
|
+
id,
|
|
101
|
+
container,
|
|
102
|
+
customStyle: html`<style>
|
|
103
|
+
.${container}-header {
|
|
104
|
+
height: 100%;
|
|
105
|
+
width: 50%;
|
|
106
|
+
float: left;
|
|
107
|
+
}
|
|
108
|
+
.${container}-body {
|
|
109
|
+
height: 100%;
|
|
110
|
+
width: 50%;
|
|
111
|
+
float: left;
|
|
112
|
+
}
|
|
113
|
+
.${container}-img {
|
|
114
|
+
width: 100%;
|
|
115
|
+
height: auto;
|
|
116
|
+
}
|
|
117
|
+
</style>`,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
map: function ({ face }) {
|
|
122
|
+
if (!s(`.map-interaction-panel`)) return;
|
|
123
|
+
const displaySymbol = ['༺', 'Ⓐ', '⌘', 'Ξ', '†', '⨁', '◶', '✪', '◍', '⚉', '⨂'];
|
|
124
|
+
const zoneNames = ['vlit6', 'ubrig', 'df23', 'ecc0'];
|
|
125
|
+
|
|
126
|
+
htmls(
|
|
127
|
+
`.map-interaction-panel-cell-0`,
|
|
128
|
+
html` <div class="abs center map-face-slot-center-container">
|
|
129
|
+
${(WorldCyberiaManagement.Data['user']['main'].model.world.type === 'width' ? range(0, 3) : range(3, 0))
|
|
130
|
+
.map(
|
|
131
|
+
(v, i) =>
|
|
132
|
+
html` <div class="in fll map-face-slot-container map-face-slot-container-${v}">
|
|
133
|
+
<img class="abs center map-face-slot-img map-face-slot-img-${v}" />
|
|
134
|
+
<img class="abs center map-face-slot-img map-face-slot-img-toplevel-${v}" />
|
|
135
|
+
<div class="abs center map-face-slot-dash map-face-slot-dash-${v}"></div>
|
|
136
|
+
<div class="abs center map-face-slot map-face-slot-${v}">
|
|
137
|
+
<div class="abs center map-face-symbol-text map-face-symbol-text-${v}"></div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>`,
|
|
140
|
+
)
|
|
141
|
+
.join('')}
|
|
142
|
+
</div>`,
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
const indexFace = WorldCyberiaType[
|
|
146
|
+
WorldCyberiaManagement.Data['user']['main'].model.world.type
|
|
147
|
+
].worldFaces.findIndex((f) => f === face);
|
|
148
|
+
range(
|
|
149
|
+
0,
|
|
150
|
+
WorldCyberiaType[WorldCyberiaManagement.Data['user']['main'].model.world.type].worldFaces.length - 1,
|
|
151
|
+
).map((i) => {
|
|
152
|
+
htmls(
|
|
153
|
+
`.map-face-symbol-text-${i}`,
|
|
154
|
+
html`
|
|
155
|
+
${WorldCyberiaManagement.Data['user']['main'].model.world.instance[
|
|
156
|
+
WorldCyberiaType[WorldCyberiaManagement.Data['user']['main'].model.world.type].worldFaces[i] - 1
|
|
157
|
+
].type}<br />
|
|
158
|
+
${WorldCyberiaType[WorldCyberiaManagement.Data['user']['main'].model.world.type].worldFaces[i]}
|
|
159
|
+
`,
|
|
160
|
+
);
|
|
161
|
+
s(`.map-face-slot-${i}`).style.background = `#80751980`;
|
|
162
|
+
});
|
|
163
|
+
s(`.map-face-slot-${indexFace}`).style.background = `#f5dd11d9`;
|
|
164
|
+
s(`.interaction-panel-zone-img-background`).src = BiomeCyberiaScope.Data[MatrixCyberia.Data.biomeDataId].imageSrc;
|
|
165
|
+
|
|
166
|
+
let index = -1;
|
|
167
|
+
for (const indexFace of WorldCyberiaType[WorldCyberiaManagement.Data['user']['main'].model.world.type]
|
|
168
|
+
.worldFaces) {
|
|
169
|
+
index++;
|
|
170
|
+
s(`.map-face-slot-img-${index}`).src =
|
|
171
|
+
BiomeCyberiaScope.Data[
|
|
172
|
+
`biome-${WorldCyberiaManagement.Data['user']['main'].model.world.face[indexFace - 1]}`
|
|
173
|
+
].imageSrc;
|
|
174
|
+
s(`.map-face-slot-img-toplevel-${index}`).src =
|
|
175
|
+
BiomeCyberiaScope.Data[
|
|
176
|
+
`biome-${WorldCyberiaManagement.Data['user']['main'].model.world.face[indexFace - 1]}`
|
|
177
|
+
].imageTopLevelColorSrc;
|
|
178
|
+
if (indexFace === face) s(`.map-face-slot-dash-${index}`).classList.remove('hide');
|
|
179
|
+
else s(`.map-face-slot-dash-${index}`).classList.add('hide');
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
Responsive.Event[`map-interaction-panel`]();
|
|
183
|
+
},
|
|
184
|
+
questTokens: {},
|
|
185
|
+
questTokensPaginationFrom: 0,
|
|
186
|
+
questTokensPaginationRange: 2,
|
|
187
|
+
callBackQuestPanelRender: async () => {
|
|
188
|
+
for (const panelQuestId of Object.keys(InteractionPanelCyberia.PanelRender.questTokens).reverse())
|
|
189
|
+
if (s(`.quest-interaction-panel-${panelQuestId}`)) s(`.quest-interaction-panel-${panelQuestId}`).remove();
|
|
190
|
+
|
|
191
|
+
let index = -1;
|
|
192
|
+
for (const panelQuestId of Object.keys(InteractionPanelCyberia.PanelRender.questTokens).reverse()) {
|
|
193
|
+
index++;
|
|
194
|
+
if (
|
|
195
|
+
index >= InteractionPanelCyberia.PanelRender.questTokensPaginationFrom &&
|
|
196
|
+
index <=
|
|
197
|
+
InteractionPanelCyberia.PanelRender.questTokensPaginationFrom +
|
|
198
|
+
InteractionPanelCyberia.PanelRender.questTokensPaginationRange
|
|
199
|
+
) {
|
|
200
|
+
if (!s(`.quest-interaction-panel-${panelQuestId}`))
|
|
201
|
+
await InteractionPanelCyberia.PanelRender.quest(
|
|
202
|
+
InteractionPanelCyberia.PanelRender.questTokens[panelQuestId],
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
restoreQuestPanelRender: function () {
|
|
208
|
+
InteractionPanelCyberia.PanelRender.questTokensPaginationFrom = 1;
|
|
209
|
+
if (s(`.quest-interaction-panel-footer-btn-arrow-up`)) s(`.quest-interaction-panel-footer-btn-arrow-up`).click();
|
|
210
|
+
},
|
|
211
|
+
quest: async function ({ id, questData, disabledRender }) {
|
|
212
|
+
if (!s(`.quest-interaction-panel`)) return;
|
|
213
|
+
|
|
214
|
+
questData = {
|
|
215
|
+
...QuestComponent.Data[questData.id](),
|
|
216
|
+
...questData,
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
if (!(id in this.questTokens)) {
|
|
220
|
+
this.questTokens[id] = { questData, id };
|
|
221
|
+
this.restoreQuestPanelRender();
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
if (disabledRender) return;
|
|
226
|
+
|
|
227
|
+
const currentQuestData = ElementsCyberia.Data.user['main'].model.quests.find((q) => q.id === questData.id);
|
|
228
|
+
|
|
229
|
+
if (!currentQuestData) {
|
|
230
|
+
delete this.questTokens[id];
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
const providerQuestSpriteData = QuestComponent.components.find(
|
|
235
|
+
(s) => s.displayId === questData.provide.displayIds[0].id,
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
const { currentStep } = currentQuestData;
|
|
239
|
+
|
|
240
|
+
if (!s(`.quest-interaction-panel-${id}`))
|
|
241
|
+
append(
|
|
242
|
+
`.quest-interaction-panel-body`,
|
|
243
|
+
html`<div class="fl quest-interaction-panel-${id}">
|
|
244
|
+
<div class="in quest-interaction-panel-section">
|
|
245
|
+
<div class="in quest-interaction-panel-row quest-interaction-panel-row-title-${id}">
|
|
246
|
+
<div class="in fll quest-interaction-panel-search-object-container" style="background: none">
|
|
247
|
+
<div class="in fll quest-interaction-panel-containers-quest-img">
|
|
248
|
+
<img class="abs center quest-step-background-img" src="${getProxyPath()}assets/util/step.png" />
|
|
249
|
+
<div class="abs center quest-interaction-panel-current-step-${questData.id}">
|
|
250
|
+
${currentStep + 1}
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="in fll quest-interaction-panel-containers-quest-img">
|
|
254
|
+
<img
|
|
255
|
+
class="in quest-interaction-panel-icon-img"
|
|
256
|
+
src="${getProxyPath()}assets/${providerQuestSpriteData.assetFolder}/${providerQuestSpriteData.displayId}/${providerQuestSpriteData.position}/0.${providerQuestSpriteData.extension}"
|
|
257
|
+
/>
|
|
258
|
+
</div>
|
|
259
|
+
|
|
260
|
+
<span class="quest-interaction-panel-text" style="color: #ffcc00">
|
|
261
|
+
${Translate.Render(`${questData.id}-title`)}
|
|
262
|
+
</span>
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
<div class="in quest-interaction-panel-row quest-interaction-panel-row-info-${id}"></div>
|
|
266
|
+
</div>
|
|
267
|
+
</div>`,
|
|
268
|
+
);
|
|
269
|
+
|
|
270
|
+
htmls(
|
|
271
|
+
`.quest-interaction-panel-row-info-${id}`,
|
|
272
|
+
html` ${range(0, questData.maxStep)
|
|
273
|
+
.map(
|
|
274
|
+
(i) =>
|
|
275
|
+
html`${questData.displaySearchObjects
|
|
276
|
+
.map((q) => {
|
|
277
|
+
if (q.step !== i) return '';
|
|
278
|
+
if (currentQuestData) {
|
|
279
|
+
const searchItemData = currentQuestData.displaySearchObjects.find(
|
|
280
|
+
(s) => s.id === q.id && s.step === i,
|
|
281
|
+
);
|
|
282
|
+
if (searchItemData) q.current = searchItemData.current;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
const searchObjectQuestSpriteData = QuestComponent.components.find((s) => s.displayId === q.id);
|
|
286
|
+
|
|
287
|
+
return html`<div
|
|
288
|
+
class="inl quest-panel-step-${questData.id}-${q.step} ${q.step !== currentStep ? 'hide' : ''}"
|
|
289
|
+
>
|
|
290
|
+
<div class="in fll quest-interaction-panel-search-object-container">
|
|
291
|
+
${q.panelQuestIcons && q.panelQuestIcons.length > 0
|
|
292
|
+
? html`${q.panelQuestIcons
|
|
293
|
+
.map(
|
|
294
|
+
(srcIcon) => html`<div class="in fll quest-interaction-panel-containers-quest-img">
|
|
295
|
+
<img class="in quest-interaction-panel-icon-img" src="${getProxyPath()}${srcIcon}" />
|
|
296
|
+
</div>`,
|
|
297
|
+
)
|
|
298
|
+
.join('')}`
|
|
299
|
+
: html`<div class="in fll quest-interaction-panel-containers-quest-img">
|
|
300
|
+
<img
|
|
301
|
+
class="in quest-interaction-panel-icon-img"
|
|
302
|
+
src="${getProxyPath()}assets/${searchObjectQuestSpriteData.assetFolder}/${searchObjectQuestSpriteData.displayId}/${searchObjectQuestSpriteData.position}/0.${searchObjectQuestSpriteData.extension}"
|
|
303
|
+
/>
|
|
304
|
+
</div>`}
|
|
305
|
+
|
|
306
|
+
<span class="quest-interaction-panel-text"
|
|
307
|
+
><span class="${questData.id}-${q.id}-${q.step}-current">${q.current}</span> /
|
|
308
|
+
<span> ${q.quantity}</span>
|
|
309
|
+
</span>
|
|
310
|
+
</div>
|
|
311
|
+
</div>`;
|
|
312
|
+
})
|
|
313
|
+
.join('')}`,
|
|
314
|
+
)
|
|
315
|
+
.join('')}`,
|
|
316
|
+
);
|
|
317
|
+
|
|
318
|
+
s(`.quest-interaction-panel-${id}`).onclick = async () => {
|
|
319
|
+
const interactionPanelQuestId = questData ? `interaction-panel-${questData.id}` : undefined;
|
|
320
|
+
await QuestManagementCyberia.RenderModal({ questData, interactionPanelQuestId });
|
|
321
|
+
};
|
|
322
|
+
},
|
|
323
|
+
AllQuest: async function ({ type, id }) {
|
|
324
|
+
if (!s(`.quest-interaction-panel`)) return;
|
|
325
|
+
|
|
326
|
+
htmls(`.quest-interaction-panel-body`, html``);
|
|
327
|
+
|
|
328
|
+
for (const currentQuestData of ElementsCyberia.Data[type][id].model.quests) {
|
|
329
|
+
await this.quest({
|
|
330
|
+
questData: currentQuestData,
|
|
331
|
+
id: `interaction-panel-${currentQuestData.id}`,
|
|
332
|
+
disabledRender: true,
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
this.restoreQuestPanelRender();
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
Render: async function (options = { id: 'interaction-panel' }) {
|
|
340
|
+
const id = options?.id ? options.id : getId(this.Data, 'interaction-panel-');
|
|
341
|
+
if (!this.Data[id])
|
|
342
|
+
this.Data[id] = {
|
|
343
|
+
element: {
|
|
344
|
+
current: {
|
|
345
|
+
type: 'user',
|
|
346
|
+
id: 'main',
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
};
|
|
350
|
+
const style = {
|
|
351
|
+
// height: '40px',
|
|
352
|
+
// width: '180px',
|
|
353
|
+
// 'z-index': 3,
|
|
354
|
+
'font-size': '18px',
|
|
355
|
+
overflow: 'hidden',
|
|
356
|
+
resize: 'none',
|
|
357
|
+
color: `#ffcc00`,
|
|
358
|
+
// border: '1px solid red',
|
|
359
|
+
'box-sizing': 'border-box',
|
|
360
|
+
};
|
|
361
|
+
let containerClass;
|
|
362
|
+
let render = async () => html`${id}`;
|
|
363
|
+
let restorePosition = () => null;
|
|
364
|
+
switch (id) {
|
|
365
|
+
case 'menu-interaction-panel':
|
|
366
|
+
{
|
|
367
|
+
style.left = `0px`;
|
|
368
|
+
style.top = `0px`;
|
|
369
|
+
style.height = `${100}px`;
|
|
370
|
+
// style.background = 'none';
|
|
371
|
+
// style['z-index'] = 7;
|
|
372
|
+
Responsive.Event[id] = () => {
|
|
373
|
+
s(`.${id}`).style.width = `${windowGetW()}px`;
|
|
374
|
+
};
|
|
375
|
+
setTimeout(Responsive.Event[id]);
|
|
376
|
+
render = async () => {
|
|
377
|
+
setTimeout(() => {
|
|
378
|
+
Modal.Data['modal-menu'].onCloseListener['cy-int-btn-menu'] = () => {
|
|
379
|
+
s(`.img-btn-square-menu-close`).classList.add('hide');
|
|
380
|
+
s(`.img-btn-square-menu-open`).classList.remove('hide');
|
|
381
|
+
};
|
|
382
|
+
Modal.Data['modal-menu'].onMenuListener['cy-int-btn-menu'] = () => {
|
|
383
|
+
s(`.img-btn-square-menu-open`).classList.add('hide');
|
|
384
|
+
s(`.img-btn-square-menu-close`).classList.remove('hide');
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
s(`.cy-int-btn-menu`).onclick = () => {
|
|
388
|
+
if (s(`.img-btn-square-menu-close`).classList.contains('hide')) {
|
|
389
|
+
s(`.btn-menu-modal-menu`).click();
|
|
390
|
+
} else {
|
|
391
|
+
s(`.btn-close-modal-menu`).click();
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
s(`.cy-int-btn-logo`).onclick = () => {
|
|
395
|
+
Modal.onHomeRouterEvent();
|
|
396
|
+
};
|
|
397
|
+
s(`.cy-int-btn-map`).onclick = async () => {
|
|
398
|
+
Modal.onHomeRouterEvent();
|
|
399
|
+
if (!s(`.map-interaction-panel`)) {
|
|
400
|
+
await this.Render({ id: 'map-interaction-panel' });
|
|
401
|
+
await this.PanelRender.map({ face: ElementsCyberia.Data.user.main.model.world.face });
|
|
402
|
+
} else {
|
|
403
|
+
this.restorePanel('map-interaction-panel');
|
|
404
|
+
{
|
|
405
|
+
const idModal = 'map-interaction-panel';
|
|
406
|
+
Modal.zIndexSync({ idModal });
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
s(`.cy-int-btn-target`).onclick = async () => {
|
|
411
|
+
Modal.onHomeRouterEvent();
|
|
412
|
+
if (!s(`.element-interaction-panel`)) {
|
|
413
|
+
await this.Render({ id: 'element-interaction-panel' });
|
|
414
|
+
await this.PanelRender.element(
|
|
415
|
+
InteractionPanelCyberia.Data['element-interaction-panel'].element.current,
|
|
416
|
+
);
|
|
417
|
+
} else {
|
|
418
|
+
this.restorePanel('element-interaction-panel');
|
|
419
|
+
{
|
|
420
|
+
const idModal = 'element-interaction-panel';
|
|
421
|
+
Modal.zIndexSync({ idModal });
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
s(`.cy-int-btn-quest`).onclick = () => {
|
|
426
|
+
Modal.onHomeRouterEvent();
|
|
427
|
+
if (!s(`.quest-interaction-panel`)) this.Render({ id: 'quest-interaction-panel' });
|
|
428
|
+
else {
|
|
429
|
+
this.restorePanel('quest-interaction-panel');
|
|
430
|
+
{
|
|
431
|
+
const idModal = 'quest-interaction-panel';
|
|
432
|
+
Modal.zIndexSync({ idModal });
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
s(`.cy-int-btn-character`).onclick = () => {
|
|
438
|
+
s(`.main-btn-character`).click();
|
|
439
|
+
};
|
|
440
|
+
s(`.cy-int-btn-bag`).onclick = () => {
|
|
441
|
+
s(`.main-btn-bag`).click();
|
|
442
|
+
};
|
|
443
|
+
s(`.cy-int-btn-chat`).onclick = () => {
|
|
444
|
+
s(`.main-btn-chat`).click();
|
|
445
|
+
};
|
|
446
|
+
s(`.cy-int-btn-wallet`).onclick = () => {
|
|
447
|
+
s(`.main-btn-wallet`).click();
|
|
448
|
+
};
|
|
449
|
+
});
|
|
450
|
+
return html`
|
|
451
|
+
<div class="in">
|
|
452
|
+
${await BtnIcon.Render({
|
|
453
|
+
class: `inl action-bar-box cy-int-btn-logo`,
|
|
454
|
+
label: html`<img
|
|
455
|
+
class="abs center img-btn-square-menu"
|
|
456
|
+
src="${getProxyPath()}assets/ui-icons/cyberia-white.png"
|
|
457
|
+
/>`,
|
|
458
|
+
})}
|
|
459
|
+
${await BtnIcon.Render({
|
|
460
|
+
class: `inl action-bar-box cy-int-btn-character`,
|
|
461
|
+
label: html`<img
|
|
462
|
+
class="abs center img-btn-square-menu"
|
|
463
|
+
src="${getProxyPath()}assets/ui-icons/anon.png"
|
|
464
|
+
/>`,
|
|
465
|
+
})}
|
|
466
|
+
${await BtnIcon.Render({
|
|
467
|
+
class: `inl action-bar-box cy-int-btn-bag`,
|
|
468
|
+
label: html`<img
|
|
469
|
+
class="abs center img-btn-square-menu"
|
|
470
|
+
src="${getProxyPath()}assets/ui-icons/bag.png"
|
|
471
|
+
/>`,
|
|
472
|
+
})}
|
|
473
|
+
${await BtnIcon.Render({
|
|
474
|
+
class: `inl action-bar-box cy-int-btn-map`,
|
|
475
|
+
label: html`<img
|
|
476
|
+
class="abs center img-btn-square-menu"
|
|
477
|
+
src="${getProxyPath()}assets/ui-icons/map.png"
|
|
478
|
+
/>`,
|
|
479
|
+
})}
|
|
480
|
+
${await BtnIcon.Render({
|
|
481
|
+
class: `inl action-bar-box cy-int-btn-target`,
|
|
482
|
+
label: html`<img
|
|
483
|
+
class="abs center img-btn-square-menu"
|
|
484
|
+
src="${getProxyPath()}assets/ui-icons/target.png"
|
|
485
|
+
/>`,
|
|
486
|
+
})}
|
|
487
|
+
${await BtnIcon.Render({
|
|
488
|
+
class: `inl action-bar-box cy-int-btn-quest`,
|
|
489
|
+
label: html`<img
|
|
490
|
+
class="abs center img-btn-square-menu"
|
|
491
|
+
src="${getProxyPath()}assets/ui-icons/quest.png"
|
|
492
|
+
/>`,
|
|
493
|
+
})}
|
|
494
|
+
</div>
|
|
495
|
+
<div class="in">
|
|
496
|
+
${await BtnIcon.Render({
|
|
497
|
+
class: `inl action-bar-box cy-int-btn-menu`,
|
|
498
|
+
label: html`<img
|
|
499
|
+
class="abs center img-btn-square-menu img-btn-square-menu-open"
|
|
500
|
+
src="${getProxyPath()}assets/ui-icons/points.png"
|
|
501
|
+
style="${renderCssAttr({ style: { transform: 'translate(-50%, -50%) rotate(90deg)' } })}"
|
|
502
|
+
/><img
|
|
503
|
+
class="abs center img-btn-square-menu img-btn-square-menu-close hide"
|
|
504
|
+
src="${getProxyPath()}assets/ui-icons/close-yellow.png"
|
|
505
|
+
/>`,
|
|
506
|
+
})}
|
|
507
|
+
${await BtnIcon.Render({
|
|
508
|
+
class: `inl action-bar-box cy-int-btn-chat`,
|
|
509
|
+
label: html`<img
|
|
510
|
+
class="abs center img-btn-square-menu"
|
|
511
|
+
src="${getProxyPath()}assets/ui-icons/chat.png"
|
|
512
|
+
/>`,
|
|
513
|
+
})}
|
|
514
|
+
${await BtnIcon.Render({
|
|
515
|
+
class: `inl action-bar-box cy-int-btn-wallet`,
|
|
516
|
+
label: html`<img
|
|
517
|
+
class="abs center img-btn-square-menu"
|
|
518
|
+
src="${getProxyPath()}assets/ui-icons/wallet.png"
|
|
519
|
+
/>`,
|
|
520
|
+
})}
|
|
521
|
+
</div>
|
|
522
|
+
<style>
|
|
523
|
+
.btn-modal-default-${'menu-interaction-panel'} {
|
|
524
|
+
min-width: 24px;
|
|
525
|
+
min-height: 24px;
|
|
526
|
+
margin: 3px;
|
|
527
|
+
padding: 0;
|
|
528
|
+
}
|
|
529
|
+
.btn-modal-default-${'element-interaction-panel'} {
|
|
530
|
+
min-width: 24px;
|
|
531
|
+
min-height: 24px;
|
|
532
|
+
margin: 3px;
|
|
533
|
+
padding: 0;
|
|
534
|
+
}
|
|
535
|
+
.btn-modal-default-${'map-interaction-panel'} {
|
|
536
|
+
min-width: 24px;
|
|
537
|
+
min-height: 24px;
|
|
538
|
+
margin: 3px;
|
|
539
|
+
padding: 0;
|
|
540
|
+
}
|
|
541
|
+
.btn-modal-default-${'quest-interaction-panel'} {
|
|
542
|
+
min-width: 24px;
|
|
543
|
+
min-height: 24px;
|
|
544
|
+
margin: 3px;
|
|
545
|
+
padding: 0;
|
|
546
|
+
}
|
|
547
|
+
.interaction-panel-bar-default-icon {
|
|
548
|
+
top: 2px;
|
|
549
|
+
}
|
|
550
|
+
.interaction-panel-container-title {
|
|
551
|
+
top: 5px;
|
|
552
|
+
left: 5px;
|
|
553
|
+
}
|
|
554
|
+
.interaction-panel-container-title-icon {
|
|
555
|
+
width: 20px;
|
|
556
|
+
height: 20px;
|
|
557
|
+
}
|
|
558
|
+
.interaction-panel-container-text {
|
|
559
|
+
font-size: 12px;
|
|
560
|
+
font-family: 'retro-font-title';
|
|
561
|
+
color: #ffcc00;
|
|
562
|
+
top: -3px;
|
|
563
|
+
}
|
|
564
|
+
.element-interaction-panel-preview {
|
|
565
|
+
overflow: hidden;
|
|
566
|
+
}
|
|
567
|
+
.map-face-slot-container {
|
|
568
|
+
/* border: 2px solid red; */
|
|
569
|
+
box-sizing: border-box;
|
|
570
|
+
}
|
|
571
|
+
.map-face-slot-img {
|
|
572
|
+
width: 100%;
|
|
573
|
+
height: auto;
|
|
574
|
+
}
|
|
575
|
+
.map-face-slot-img-toplevel {
|
|
576
|
+
width: 100%;
|
|
577
|
+
height: auto;
|
|
578
|
+
}
|
|
579
|
+
.map-face-slot-dash {
|
|
580
|
+
width: 50%;
|
|
581
|
+
height: 50%;
|
|
582
|
+
}
|
|
583
|
+
.quest-interaction-panel-container {
|
|
584
|
+
}
|
|
585
|
+
.quest-interaction-panel-section {
|
|
586
|
+
margin: 6px;
|
|
587
|
+
padding: 3px;
|
|
588
|
+
background: #7d796b33;
|
|
589
|
+
cursor: pointer;
|
|
590
|
+
}
|
|
591
|
+
.quest-interaction-panel-section:hover {
|
|
592
|
+
background: #b6af9b33;
|
|
593
|
+
}
|
|
594
|
+
.quest-interaction-panel-body {
|
|
595
|
+
overflow: hidden;
|
|
596
|
+
}
|
|
597
|
+
.quest-interaction-panel-footer {
|
|
598
|
+
height: 50px;
|
|
599
|
+
overflow: hidden;
|
|
600
|
+
}
|
|
601
|
+
.quest-interaction-panel-row {
|
|
602
|
+
height: 25px;
|
|
603
|
+
overflow: hidden;
|
|
604
|
+
}
|
|
605
|
+
.quest-interaction-panel-search-object-container {
|
|
606
|
+
color: white;
|
|
607
|
+
font-size: 15px;
|
|
608
|
+
box-sizing: border-box;
|
|
609
|
+
background: #0000004a;
|
|
610
|
+
margin: 2px;
|
|
611
|
+
padding: 3px;
|
|
612
|
+
}
|
|
613
|
+
.quest-interaction-panel-text {
|
|
614
|
+
top: 3px;
|
|
615
|
+
position: relative;
|
|
616
|
+
}
|
|
617
|
+
.quest-interaction-panel-icon-img {
|
|
618
|
+
width: 100%;
|
|
619
|
+
height: 100%;
|
|
620
|
+
}
|
|
621
|
+
.quest-interaction-panel-pagination-display {
|
|
622
|
+
padding: 10px;
|
|
623
|
+
}
|
|
624
|
+
</style>
|
|
625
|
+
${borderChar(1, 'black', ['.quest-interaction-panel-search-object-container'])}
|
|
626
|
+
${dashRange({ selector: 'map-face-slot-dash', color: `#ffcc00` })}
|
|
627
|
+
`;
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
break;
|
|
631
|
+
|
|
632
|
+
case 'element-interaction-panel':
|
|
633
|
+
restorePosition = (style = {}) => {
|
|
634
|
+
style.top = `${110}px`;
|
|
635
|
+
style.height = `${100}px`;
|
|
636
|
+
if (Modal.mobileModal()) {
|
|
637
|
+
style.left = `10px`;
|
|
638
|
+
style.width = `${windowGetW() - 20}px`;
|
|
639
|
+
} else {
|
|
640
|
+
style.left = `${windowGetW() - 210}px`;
|
|
641
|
+
style.width = `${200}px`;
|
|
642
|
+
}
|
|
643
|
+
return style;
|
|
644
|
+
};
|
|
645
|
+
render = async () => html` <div class="fl element-interaction-panel-preview"></div> `;
|
|
646
|
+
PointAndClickMovementCyberia.TargetEvent[id] = async ({ type, id }) =>
|
|
647
|
+
await this.PanelRender.element({ type, id });
|
|
648
|
+
break;
|
|
649
|
+
case 'map-interaction-panel':
|
|
650
|
+
restorePosition = (style = {}) => {
|
|
651
|
+
style.height = `${300}px`;
|
|
652
|
+
if (Modal.mobileModal()) {
|
|
653
|
+
style.left = `10px`;
|
|
654
|
+
style.width = `${windowGetW() - 20}px`;
|
|
655
|
+
style.top = `${110}px`;
|
|
656
|
+
} else {
|
|
657
|
+
style.left = `${windowGetW() - 210}px`;
|
|
658
|
+
style.width = `${200}px`;
|
|
659
|
+
style.top = `${220}px`;
|
|
660
|
+
}
|
|
661
|
+
return style;
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
render = async () => html`
|
|
665
|
+
<div class="map-interaction-panel-style"></div>
|
|
666
|
+
<div class="fl">
|
|
667
|
+
<div class="in fll map-interaction-panel-cell map-interaction-panel-cell-0"></div>
|
|
668
|
+
<div class="in fll map-interaction-panel-cell map-interaction-panel-cell-1 hide">
|
|
669
|
+
<img class="abs center interaction-panel-zone-img-background" style="width: 100%; height: auto" />
|
|
670
|
+
</div>
|
|
671
|
+
</div>
|
|
672
|
+
`;
|
|
673
|
+
break;
|
|
674
|
+
case 'quest-interaction-panel':
|
|
675
|
+
restorePosition = (style = {}) => {
|
|
676
|
+
style.top = `${110}px`;
|
|
677
|
+
style.height = `${300}px`;
|
|
678
|
+
if (Modal.mobileModal()) {
|
|
679
|
+
style.left = `10px`;
|
|
680
|
+
style.width = `${windowGetW() - 20}px`;
|
|
681
|
+
} else {
|
|
682
|
+
style.left = `${10}px`;
|
|
683
|
+
style.width = `${200}px`;
|
|
684
|
+
}
|
|
685
|
+
return style;
|
|
686
|
+
};
|
|
687
|
+
style['min-height'] = `200px`;
|
|
688
|
+
|
|
689
|
+
setTimeout(() => {
|
|
690
|
+
const displayArrowCallback = () => {
|
|
691
|
+
if (
|
|
692
|
+
Object.keys(InteractionPanelCyberia.PanelRender.questTokens).length <=
|
|
693
|
+
InteractionPanelCyberia.PanelRender.questTokensPaginationFrom +
|
|
694
|
+
InteractionPanelCyberia.PanelRender.questTokensPaginationRange +
|
|
695
|
+
1
|
|
696
|
+
) {
|
|
697
|
+
s(`.quest-interaction-panel-footer-btn-arrow-down`).classList.add('gray');
|
|
698
|
+
} else s(`.quest-interaction-panel-footer-btn-arrow-down`).classList.remove('gray');
|
|
699
|
+
|
|
700
|
+
if (InteractionPanelCyberia.PanelRender.questTokensPaginationFrom === 0) {
|
|
701
|
+
s(`.quest-interaction-panel-footer-btn-arrow-up`).classList.add('gray');
|
|
702
|
+
} else s(`.quest-interaction-panel-footer-btn-arrow-up`).classList.remove('gray');
|
|
703
|
+
htmls(
|
|
704
|
+
`.quest-interaction-panel-pagination-display`,
|
|
705
|
+
html`
|
|
706
|
+
${InteractionPanelCyberia.PanelRender.questTokensPaginationFrom + 1} -
|
|
707
|
+
${InteractionPanelCyberia.PanelRender.questTokensPaginationFrom +
|
|
708
|
+
InteractionPanelCyberia.PanelRender.questTokensPaginationRange +
|
|
709
|
+
1}
|
|
710
|
+
/ ${Object.keys(InteractionPanelCyberia.PanelRender.questTokens).length}
|
|
711
|
+
`,
|
|
712
|
+
);
|
|
713
|
+
};
|
|
714
|
+
s(`.quest-interaction-panel-footer-btn-arrow-down`).onclick = () => {
|
|
715
|
+
if (
|
|
716
|
+
InteractionPanelCyberia.PanelRender.questTokensPaginationFrom +
|
|
717
|
+
InteractionPanelCyberia.PanelRender.questTokensPaginationRange >=
|
|
718
|
+
Object.keys(InteractionPanelCyberia.PanelRender.questTokens).length - 1
|
|
719
|
+
)
|
|
720
|
+
return;
|
|
721
|
+
InteractionPanelCyberia.PanelRender.questTokensPaginationFrom++;
|
|
722
|
+
displayArrowCallback();
|
|
723
|
+
InteractionPanelCyberia.PanelRender.callBackQuestPanelRender();
|
|
724
|
+
};
|
|
725
|
+
s(`.quest-interaction-panel-footer-btn-arrow-up`).onclick = () => {
|
|
726
|
+
if (InteractionPanelCyberia.PanelRender.questTokensPaginationFrom === 0) return;
|
|
727
|
+
InteractionPanelCyberia.PanelRender.questTokensPaginationFrom--;
|
|
728
|
+
displayArrowCallback();
|
|
729
|
+
InteractionPanelCyberia.PanelRender.callBackQuestPanelRender();
|
|
730
|
+
};
|
|
731
|
+
InteractionPanelCyberia.PanelRender.restoreQuestPanelRender();
|
|
732
|
+
});
|
|
733
|
+
|
|
734
|
+
render = async () => html`
|
|
735
|
+
<div class="in quest-interaction-panel-container quest-interaction-panel-body"></div>
|
|
736
|
+
<div class="in quest-interaction-panel-container quest-interaction-panel-footer">
|
|
737
|
+
<div class="fl quest-interaction-panel-footer-arrows-btn">
|
|
738
|
+
${await BtnIcon.Render({
|
|
739
|
+
label: html`<img
|
|
740
|
+
class="abs center quest-interaction-panel-footer-btn-img"
|
|
741
|
+
src="${getProxyPath()}assets/ui-icons/arrow-up.png"
|
|
742
|
+
/>`,
|
|
743
|
+
class: 'in fll quest-interaction-panel-footer-btn quest-interaction-panel-footer-btn-arrow-up',
|
|
744
|
+
})}
|
|
745
|
+
${await BtnIcon.Render({
|
|
746
|
+
label: html`<img
|
|
747
|
+
class="abs center quest-interaction-panel-footer-btn-img"
|
|
748
|
+
src="${getProxyPath()}assets/ui-icons/arrow-down.png"
|
|
749
|
+
/>`,
|
|
750
|
+
class: 'in fll quest-interaction-panel-footer-btn quest-interaction-panel-footer-btn-arrow-down',
|
|
751
|
+
})}
|
|
752
|
+
<div class="in flr quest-interaction-panel-pagination-display"></div>
|
|
753
|
+
</div>
|
|
754
|
+
</div>
|
|
755
|
+
`;
|
|
756
|
+
break;
|
|
757
|
+
default:
|
|
758
|
+
break;
|
|
759
|
+
}
|
|
760
|
+
this.Data[id].restorePosition = restorePosition;
|
|
761
|
+
this.Data[id].restorePosition(style);
|
|
762
|
+
const { barConfig } = await Themes[Css.currentTheme]({ iconClass: 'interaction-panel-bar-default-icon' });
|
|
763
|
+
barConfig.buttons.maximize.disabled = true;
|
|
764
|
+
barConfig.buttons.minimize.disabled = true;
|
|
765
|
+
barConfig.buttons.restore.disabled = true;
|
|
766
|
+
barConfig.buttons.menu.disabled = true;
|
|
767
|
+
barConfig.buttons.close.disabled = false;
|
|
768
|
+
let dragDisabled, observer;
|
|
769
|
+
if (id === 'menu-interaction-panel') {
|
|
770
|
+
dragDisabled = true;
|
|
771
|
+
barConfig.buttons.close.disabled = true;
|
|
772
|
+
} else {
|
|
773
|
+
observer = true;
|
|
774
|
+
style.resize = 'auto';
|
|
775
|
+
style.overflow = 'auto';
|
|
776
|
+
}
|
|
777
|
+
if (Modal.mobileModal()) dragDisabled = true;
|
|
778
|
+
await Modal.Render({
|
|
779
|
+
id,
|
|
780
|
+
barConfig,
|
|
781
|
+
html: render,
|
|
782
|
+
titleClass: 'hide',
|
|
783
|
+
style,
|
|
784
|
+
dragDisabled,
|
|
785
|
+
observer,
|
|
786
|
+
btnContainerClass: 'inl',
|
|
787
|
+
btnIconContainerClass: 'abs center',
|
|
788
|
+
zIndexSync: true,
|
|
789
|
+
class: containerClass,
|
|
790
|
+
});
|
|
791
|
+
|
|
792
|
+
if (id !== 'menu-interaction-panel') {
|
|
793
|
+
if (Modal.mobileModal()) {
|
|
794
|
+
s(`.${id}`).style.transition = '.3s';
|
|
795
|
+
}
|
|
796
|
+
switch (id) {
|
|
797
|
+
case 'element-interaction-panel':
|
|
798
|
+
prepend(
|
|
799
|
+
`.btn-bar-modal-container-${id}`,
|
|
800
|
+
html`
|
|
801
|
+
<div class="abs interaction-panel-container-title">
|
|
802
|
+
<img
|
|
803
|
+
class="inl interaction-panel-container-title-icon"
|
|
804
|
+
src="${getProxyPath()}assets/ui-icons/target.png"
|
|
805
|
+
/>
|
|
806
|
+
<div class="inl interaction-panel-container-text">Target</div>
|
|
807
|
+
</div>
|
|
808
|
+
`,
|
|
809
|
+
);
|
|
810
|
+
break;
|
|
811
|
+
case 'map-interaction-panel':
|
|
812
|
+
prepend(
|
|
813
|
+
`.btn-bar-modal-container-${id}`,
|
|
814
|
+
html`
|
|
815
|
+
<div class="abs interaction-panel-container-title">
|
|
816
|
+
<img
|
|
817
|
+
class="inl interaction-panel-container-title-icon"
|
|
818
|
+
src="${getProxyPath()}assets/ui-icons/map.png"
|
|
819
|
+
/>
|
|
820
|
+
<div class="inl interaction-panel-container-text">Map</div>
|
|
821
|
+
</div>
|
|
822
|
+
`,
|
|
823
|
+
);
|
|
824
|
+
break;
|
|
825
|
+
case 'quest-interaction-panel':
|
|
826
|
+
prepend(
|
|
827
|
+
`.btn-bar-modal-container-${id}`,
|
|
828
|
+
html`
|
|
829
|
+
<div class="abs interaction-panel-container-title">
|
|
830
|
+
<img
|
|
831
|
+
class="inl interaction-panel-container-title-icon"
|
|
832
|
+
src="${getProxyPath()}assets/ui-icons/quest.png"
|
|
833
|
+
/>
|
|
834
|
+
<div class="inl interaction-panel-container-text">Quest</div>
|
|
835
|
+
</div>
|
|
836
|
+
`,
|
|
837
|
+
);
|
|
838
|
+
await this.PanelRender.AllQuest({ type: 'user', id: 'main' });
|
|
839
|
+
break;
|
|
840
|
+
default:
|
|
841
|
+
break;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
Modal.Data[id].onCloseListener[id] = () => {
|
|
845
|
+
const interactionPanelStorage = localStorage.getItem('modal') ? JSON.parse(localStorage.getItem('modal')) : {};
|
|
846
|
+
delete interactionPanelStorage[id];
|
|
847
|
+
delete Modal.Data['modal-menu'].onBarUiOpen[id];
|
|
848
|
+
delete Modal.Data['modal-menu'].onBarUiClose[id];
|
|
849
|
+
localStorage.setItem('modal', JSON.stringify(interactionPanelStorage));
|
|
850
|
+
};
|
|
851
|
+
|
|
852
|
+
Modal.Data[id].onDragEndListener[id] = () => {
|
|
853
|
+
const interactionPanelStorage = localStorage.getItem('modal') ? JSON.parse(localStorage.getItem('modal')) : {};
|
|
854
|
+
if (!interactionPanelStorage[id]) interactionPanelStorage[id] = {};
|
|
855
|
+
const transformValues = getTranslate3d(s(`.${id}`)).map((v) => parseFloat(v.split('px')[0]));
|
|
856
|
+
interactionPanelStorage[id].x = transformValues[0];
|
|
857
|
+
interactionPanelStorage[id].y = transformValues[1];
|
|
858
|
+
localStorage.setItem('modal', JSON.stringify(interactionPanelStorage));
|
|
859
|
+
};
|
|
860
|
+
|
|
861
|
+
Modal.Data['modal-menu'].onBarUiOpen[id] = () => {
|
|
862
|
+
if (Modal.mobileModal() && s(`.${id}`)) {
|
|
863
|
+
s(`.${id}`).style.top = `110px`;
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
Modal.Data['modal-menu'].onBarUiClose[id] = () => {
|
|
867
|
+
if (Modal.mobileModal() && s(`.${id}`)) {
|
|
868
|
+
s(`.${id}`).style.top = `10px`;
|
|
869
|
+
}
|
|
870
|
+
};
|
|
871
|
+
let lastMobileStatus = newInstance(Modal.mobileModal());
|
|
872
|
+
Responsive.Event[id] = () => {
|
|
873
|
+
if (!s(`.${id}`)) return;
|
|
874
|
+
if (lastMobileStatus !== Modal.mobileModal()) {
|
|
875
|
+
lastMobileStatus = newInstance(Modal.mobileModal());
|
|
876
|
+
return s(`.btn-close-${id}`).click();
|
|
877
|
+
}
|
|
878
|
+
const height = s(`.${id}`).offsetHeight - 30;
|
|
879
|
+
const width = s(`.${id}`).offsetWidth;
|
|
880
|
+
|
|
881
|
+
switch (id) {
|
|
882
|
+
case 'quest-interaction-panel':
|
|
883
|
+
s(`.quest-interaction-panel-body`).style.height = `${height - 50}px`;
|
|
884
|
+
break;
|
|
885
|
+
case 'element-interaction-panel':
|
|
886
|
+
s(`.element-interaction-panel-preview`).style.height = `${height}px`;
|
|
887
|
+
break;
|
|
888
|
+
case 'map-interaction-panel':
|
|
889
|
+
if (WorldCyberiaManagement.Data['user'] && WorldCyberiaManagement.Data['user']['main']) {
|
|
890
|
+
if (WorldCyberiaManagement.Data['user']['main'].model.world.type === 'width') {
|
|
891
|
+
if (width / 4 > height) {
|
|
892
|
+
htmls(
|
|
893
|
+
`.map-interaction-panel-style`,
|
|
894
|
+
html`<style>
|
|
895
|
+
.map-face-slot-container {
|
|
896
|
+
width: ${height}px;
|
|
897
|
+
height: ${height}px;
|
|
898
|
+
}
|
|
899
|
+
.map-face-slot-center-container {
|
|
900
|
+
width: ${height * 4}px;
|
|
901
|
+
}
|
|
902
|
+
</style>`,
|
|
903
|
+
);
|
|
904
|
+
} else {
|
|
905
|
+
htmls(
|
|
906
|
+
`.map-interaction-panel-style`,
|
|
907
|
+
html`<style>
|
|
908
|
+
.map-face-slot-container {
|
|
909
|
+
width: ${width / 4}px;
|
|
910
|
+
height: ${width / 4}px;
|
|
911
|
+
}
|
|
912
|
+
.map-face-slot-center-container {
|
|
913
|
+
width: ${width}px;
|
|
914
|
+
}
|
|
915
|
+
</style>`,
|
|
916
|
+
);
|
|
917
|
+
}
|
|
918
|
+
} else {
|
|
919
|
+
if (height / 4 > width) {
|
|
920
|
+
htmls(
|
|
921
|
+
`.map-interaction-panel-style`,
|
|
922
|
+
html`<style>
|
|
923
|
+
.map-face-slot-container {
|
|
924
|
+
width: ${width}px;
|
|
925
|
+
height: ${width}px;
|
|
926
|
+
}
|
|
927
|
+
.map-face-slot-center-container {
|
|
928
|
+
width: ${width / 4}px;
|
|
929
|
+
}
|
|
930
|
+
</style>`,
|
|
931
|
+
);
|
|
932
|
+
} else {
|
|
933
|
+
htmls(
|
|
934
|
+
`.map-interaction-panel-style`,
|
|
935
|
+
html`<style>
|
|
936
|
+
.map-face-slot-container {
|
|
937
|
+
width: ${height / 4}px;
|
|
938
|
+
height: ${height / 4}px;
|
|
939
|
+
}
|
|
940
|
+
.map-face-slot-center-container {
|
|
941
|
+
width: ${height / 4}px;
|
|
942
|
+
}
|
|
943
|
+
</style>`,
|
|
944
|
+
);
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
s(`.map-interaction-panel-cell-0`).style.width = `100%`;
|
|
949
|
+
s(`.map-interaction-panel-cell-1`).style.width = `100%`;
|
|
950
|
+
s(`.map-interaction-panel-cell-0`).style.height = `${height}px`;
|
|
951
|
+
s(`.map-interaction-panel-cell-1`).style.height = `${height}px`;
|
|
952
|
+
}
|
|
953
|
+
break;
|
|
954
|
+
default:
|
|
955
|
+
break;
|
|
956
|
+
}
|
|
957
|
+
};
|
|
958
|
+
|
|
959
|
+
Responsive.DelayEvent[id] = () => {
|
|
960
|
+
if (
|
|
961
|
+
s(`.${id}`) &&
|
|
962
|
+
(!s(`.${id}`).style.transform || s(`.${id}`).style.transform === 'translate3d(0px, 0px, 0px)')
|
|
963
|
+
) {
|
|
964
|
+
switch (id) {
|
|
965
|
+
case 'quest-interaction-panel':
|
|
966
|
+
if (s(`.cy-int-btn-quest`)) s(`.cy-int-btn-quest`).click();
|
|
967
|
+
break;
|
|
968
|
+
case 'map-interaction-panel':
|
|
969
|
+
if (s(`.cy-int-btn-map`)) s(`.cy-int-btn-map`).click();
|
|
970
|
+
break;
|
|
971
|
+
case 'element-interaction-panel':
|
|
972
|
+
if (s(`.cy-int-btn-target`)) s(`.cy-int-btn-target`).click();
|
|
973
|
+
break;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
};
|
|
977
|
+
|
|
978
|
+
Responsive.Event[id]();
|
|
979
|
+
|
|
980
|
+
Modal.Data[id].onObserverListener[id] = ({ width, height }) => {
|
|
981
|
+
const interactionPanelStorage = localStorage.getItem('modal') ? JSON.parse(localStorage.getItem('modal')) : {};
|
|
982
|
+
interactionPanelStorage[id].width = width;
|
|
983
|
+
interactionPanelStorage[id].height = height;
|
|
984
|
+
localStorage.setItem('modal', JSON.stringify(interactionPanelStorage));
|
|
985
|
+
Responsive.Event[id]();
|
|
986
|
+
};
|
|
987
|
+
|
|
988
|
+
const interactionPanelStorage = localStorage.getItem('modal') ? JSON.parse(localStorage.getItem('modal')) : {};
|
|
989
|
+
|
|
990
|
+
if (!interactionPanelStorage[id]) {
|
|
991
|
+
interactionPanelStorage[id] = {};
|
|
992
|
+
localStorage.setItem('modal', JSON.stringify(interactionPanelStorage));
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
if (!Modal.mobileModal()) {
|
|
996
|
+
if (interactionPanelStorage[id].width) {
|
|
997
|
+
s(`.${id}`).style.width = interactionPanelStorage[id].width + 'px';
|
|
998
|
+
}
|
|
999
|
+
if (interactionPanelStorage[id].height) {
|
|
1000
|
+
s(`.${id}`).style.height = interactionPanelStorage[id].height + 'px';
|
|
1001
|
+
}
|
|
1002
|
+
if (interactionPanelStorage[id].x !== undefined && interactionPanelStorage[id].y !== undefined)
|
|
1003
|
+
Modal.Data[id].setDragInstance({
|
|
1004
|
+
defaultPosition: {
|
|
1005
|
+
x: interactionPanelStorage[id].x !== undefined ? interactionPanelStorage[id].x : 0,
|
|
1006
|
+
y: interactionPanelStorage[id].y !== undefined ? interactionPanelStorage[id].y : 0,
|
|
1007
|
+
},
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
if (Modal.mobileModal()) this.mobileSingleInstance(id);
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
if (id === 'menu-interaction-panel') {
|
|
1015
|
+
if (!Modal.mobileModal()) {
|
|
1016
|
+
const interactionPanelStorage = localStorage.getItem('modal') ? JSON.parse(localStorage.getItem('modal')) : {};
|
|
1017
|
+
for (const idPanel of Object.keys(interactionPanelStorage)) {
|
|
1018
|
+
await InteractionPanelCyberia.Render({ id: idPanel });
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
Modal.Data['modal-menu'].onExpandUiListener[id] = (expand) =>
|
|
1022
|
+
setTimeout(() => {
|
|
1023
|
+
s(`.top-bar`).classList.add('hide');
|
|
1024
|
+
s(`.bottom-bar`).classList.add('hide');
|
|
1025
|
+
s(`.slide-menu-top-bar`).classList.add('hide');
|
|
1026
|
+
if (expand) s(`.menu-interaction-panel`).classList.add('hide');
|
|
1027
|
+
else s(`.menu-interaction-panel`).classList.remove('hide');
|
|
1028
|
+
});
|
|
1029
|
+
setTimeout(() => {
|
|
1030
|
+
Modal.Data['modal-menu'].onExpandUiListener[id]();
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
mobileSingleInstance: function (id) {
|
|
1035
|
+
for (const idModal of ['map-interaction-panel', 'quest-interaction-panel', 'element-interaction-panel']) {
|
|
1036
|
+
if (idModal !== id && s(`.${idModal}`)) {
|
|
1037
|
+
s(`.btn-close-${idModal}`).click();
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
},
|
|
1041
|
+
};
|
|
1042
|
+
|
|
1043
|
+
export { InteractionPanelCyberia };
|