can share tactic to team (test)
continuous-integration/drone/push Build is failing Details

shareTactic
Vivien DUFOUR 1 year ago
parent fa81bd0702
commit 2beda1c7f5

@ -1,60 +0,0 @@
<?php
require "../../config.php";
require "../../vendor/autoload.php";
require "../../sql/database.php";
require "../../src/index-utils.php";
use IQBall\Api\API;
use IQBall\Api\Controller\APIAuthController;
use IQBall\Api\Controller\APITacticController;
use IQBall\App\Session\PhpSessionHandle;
use IQBall\Core\Action;
use IQBall\Core\Connection;
use IQBall\Core\Data\Account;
use IQBall\Core\Gateway\AccountGateway;
use IQBall\Core\Gateway\TacticInfoGateway;
use IQBall\Core\Model\AuthModel;
use IQBall\Core\Model\TacticModel;
function getTacticController(): APITacticController {
return new APITacticController(new TacticModel(new TacticInfoGateway(new Connection(get_database()))));
}
function getAuthController(): APIAuthController {
return new APIAuthController(new AuthModel(new AccountGateway(new Connection(get_database()))));
}
function getRoutes(): AltoRouter {
$router = new AltoRouter();
$router->setBasePath(get_public_path(__DIR__));
$router->map("POST", "/auth", Action::noAuth(fn() => getAuthController()->authorize()));
$router->map("POST", "/tactic/[i:id]/edit/name", Action::auth(fn(int $id, Account $acc) => getTacticController()->updateName($id, $acc)));
$router->map("POST", "/tactic/[i:id]/save", Action::auth(fn(int $id, Account $acc) => getTacticController()->saveContent($id, $acc)));
return $router;
}
/**
* Defines the way of being authorised through the API
* By checking if an Authorisation header is set, and by expecting its value to be a valid token of an account.
* If the header is not set, fallback to the App's PHP session system, and try to extract the account from it.
* @return Account|null
* @throws Exception
*/
function tryGetAuthorization(): ?Account {
$headers = getallheaders();
// If no authorization header is set, try fallback to php session.
if (!isset($headers['Authorization'])) {
$session = PhpSessionHandle::init();
return $session->getAccount();
}
$token = $headers['Authorization'];
$gateway = new AccountGateway(new Connection(get_database()));
return $gateway->getAccountFromToken($token);
}
Api::render(API::handleMatch(getRoutes()->match(), fn() => tryGetAuthorization()));

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" x="0" y="0" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""> <g transform="matrix(1.0899999999999992,0,0,1.0899999999999992,-23.040010986327673,-23.03998867034892)"> <path fill-rule="evenodd" d="M250.131 307.122 424.673 132.58v73.421c0 17.6 14.4 31.999 31.999 31.999 17.6 0 32-14.399 32-31.999V23.328H305.998c-17.6 0-31.999 14.4-31.999 31.999 0 17.6 14.399 32 31.999 32h73.421L204.935 261.81c-39.932 40.129-110.352 12.463-110.352-45.627 0-35.683 28.926-64.609 64.609-64.609 30.018 0 55.252 20.472 62.508 48.216l48.526-48.526c-22.324-38.099-63.688-63.689-111.034-63.689-71.028 0-128.608 57.58-128.608 128.608.001 115.408 139.655 170.832 219.547 90.939zm-149.25 58.743c25.733 10.037 53.881 13.203 81.205 9.303l-104.17 104.17c-12.445 12.445-32.809 12.445-45.254 0s-12.445-32.809 0-45.254z" clip-rule="evenodd" fill="#F00" opacity="1" data-original="#F00" class=""> </path> </g> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

@ -1,135 +0,0 @@
<svg width="567" height="269" viewBox="0 0 567 269" fill="none" xmlns="http://www.w3.org/2000/svg">
<line x1="73" y1="24" x2="495" y2="24" stroke="black" stroke-width="2"/>
<line x1="494" y1="23" x2="494" y2="247" stroke="black" stroke-width="2"/>
<line x1="495" y1="248" x2="73" y2="248" stroke="black" stroke-width="2"/>
<line x1="72" y1="249" x2="72" y2="23" stroke="black" stroke-width="2"/>
<line x1="283.5" y1="23" x2="283.5" y2="247" stroke="black"/>
<g filter="url(#filter0_i_3_2)">
<circle cx="283.5" cy="135.5" r="27" stroke="black"/>
</g>
<line x1="73" y1="99.5" x2="158" y2="99.5" stroke="black"/>
<line x1="73" y1="100.5" x2="158" y2="100.5" stroke="black"/>
<path d="M158.5 172V100" stroke="black"/>
<path d="M158 99.5H159" stroke="black"/>
<path d="M158 172.5H159" stroke="black"/>
<line x1="158" y1="172.5" x2="73" y2="172.5" stroke="black"/>
<line x1="158" y1="171.5" x2="73" y2="171.5" stroke="black"/>
<line x1="73" y1="37.5" x2="139" y2="37.5" stroke="black"/>
<line x1="73" y1="233.5" x2="139" y2="233.5" stroke="black"/>
<g filter="url(#filter1_i_3_2)">
<path d="M158.5 163C161.98 163 165.426 162.315 168.641 160.983C171.856 159.651 174.778 157.699 177.238 155.238C179.699 152.778 181.651 149.856 182.983 146.641C184.315 143.426 185 139.98 185 136.5C185 133.02 184.315 129.574 182.983 126.359C181.651 123.144 179.699 120.222 177.238 117.762C174.778 115.301 171.856 113.349 168.641 112.017C165.426 110.685 161.98 110 158.5 110L158.5 136.5L158.5 163Z" stroke="black"/>
</g>
<g filter="url(#filter2_i_3_2)">
<path d="M158.5 110C155.02 110 151.574 110.685 148.359 112.017C145.144 113.349 142.222 115.301 139.762 117.762C137.301 120.222 135.349 123.144 134.017 126.359C132.685 129.574 132 133.02 132 136.5C132 139.98 132.685 143.426 134.017 146.641C135.349 149.856 137.301 152.778 139.762 155.238C142.222 157.699 145.144 159.651 148.359 160.983C151.574 162.315 155.02 163 158.5 163" stroke="black" stroke-dasharray="4 4"/>
</g>
<line x1="135.5" y1="177" x2="135.5" y2="172" stroke="black"/>
<line x1="123.5" y1="177" x2="123.5" y2="172" stroke="black"/>
<line x1="111.5" y1="177" x2="111.5" y2="172" stroke="black"/>
<line x1="99.5" y1="177" x2="99.5" y2="172" stroke="black"/>
<line x1="135.5" y1="100" x2="135.5" y2="95" stroke="black"/>
<line x1="123.5" y1="100" x2="123.5" y2="95" stroke="black"/>
<line x1="111.5" y1="100" x2="111.5" y2="95" stroke="black"/>
<line x1="99.5" y1="100" x2="99.5" y2="95" stroke="black"/>
<path d="M140.212 233.607C159.054 225.612 175.149 211.967 186.427 194.431C197.705 176.895 203.649 156.271 203.497 135.213C203.345 114.155 197.104 93.6242 185.574 76.2645C174.045 58.9047 157.755 45.5096 138.799 37.8066" stroke="black"/>
<path d="M140 233.5H141" stroke="black"/>
<path d="M139 233.5H140" stroke="black"/>
<path d="M90.5 118.5C95.0041 118.5 99.3266 120.34 102.516 123.621C105.706 126.901 107.5 131.354 107.5 136C107.5 140.646 105.706 145.099 102.516 148.379C99.3266 151.66 95.0041 153.5 90.5 153.5" stroke="black"/>
<circle cx="87.5" cy="136.5" r="3" stroke="black"/>
<line x1="83.5" y1="149" x2="83.5" y2="123" stroke="black"/>
<line y1="-0.5" x2="85" y2="-0.5" transform="matrix(-1 0 0 1 494 100)" stroke="black"/>
<line y1="-0.5" x2="85" y2="-0.5" transform="matrix(-1 0 0 1 494 101)" stroke="black"/>
<path d="M408.5 172V100" stroke="black"/>
<path d="M409 99.5H408" stroke="black"/>
<path d="M409 172.5H408" stroke="black"/>
<line y1="-0.5" x2="85" y2="-0.5" transform="matrix(1 0 0 -1 409 172)" stroke="black"/>
<line y1="-0.5" x2="85" y2="-0.5" transform="matrix(1 0 0 -1 409 171)" stroke="black"/>
<line y1="-0.5" x2="66" y2="-0.5" transform="matrix(-1 0 0 1 494 38)" stroke="black"/>
<line y1="-0.5" x2="66" y2="-0.5" transform="matrix(-1 0 0 1 494 234)" stroke="black"/>
<g filter="url(#filter3_i_3_2)">
<path d="M408.5 163C405.02 163 401.574 162.315 398.359 160.983C395.144 159.651 392.222 157.699 389.762 155.238C387.301 152.778 385.349 149.856 384.017 146.641C382.685 143.426 382 139.98 382 136.5C382 133.02 382.685 129.574 384.017 126.359C385.349 123.144 387.301 120.222 389.762 117.762C392.222 115.301 395.144 113.349 398.359 112.017C401.574 110.685 405.02 110 408.5 110L408.5 136.5L408.5 163Z" stroke="black"/>
</g>
<g filter="url(#filter4_i_3_2)">
<path d="M408.5 110C411.98 110 415.426 110.685 418.641 112.017C421.856 113.349 424.778 115.301 427.238 117.762C429.699 120.222 431.651 123.144 432.983 126.359C434.315 129.574 435 133.02 435 136.5C435 139.98 434.315 143.426 432.983 146.641C431.651 149.856 429.699 152.778 427.238 155.238C424.778 157.699 421.856 159.651 418.641 160.983C415.426 162.315 411.98 163 408.5 163" stroke="black" stroke-dasharray="4 4"/>
</g>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 431 177)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 443 177)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 455 177)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 467 177)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 431 100)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 443 100)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 455 100)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 467 100)" stroke="black"/>
<path d="M426.788 233.607C407.946 225.612 391.851 211.967 380.573 194.431C369.295 176.895 363.351 156.271 363.503 135.213C363.655 114.155 369.896 93.6242 381.426 76.2645C392.955 58.9047 409.245 45.5096 428.201 37.8066" stroke="black"/>
<path d="M427 233.5H426" stroke="black"/>
<path d="M428 233.5H427" stroke="black"/>
<g filter="url(#filter5_i_3_2)">
<path d="M476.5 118.5C471.996 118.5 467.673 120.34 464.484 123.621C461.294 126.901 459.5 131.354 459.5 136C459.5 140.646 461.294 145.099 464.484 148.379C467.673 151.66 471.996 153.5 476.5 153.5" stroke="black"/>
</g>
<circle cx="3.5" cy="3.5" r="3" transform="matrix(-1 0 0 1 483 133)" stroke="black"/>
<line y1="-0.5" x2="26" y2="-0.5" transform="matrix(0 -1 -1 0 483 149)" stroke="black"/>
<path d="M138 37.5H139" stroke="black"/>
<path d="M139.225 38.1519C139.221 38.1187 139.099 38.1364 139.073 38.135C138.98 38.1302 138.889 38.0674 138.794 38.0674C138.755 38.0674 138.672 38.0388 138.633 38.0252C138.581 38.0065 138.52 37.9719 138.465 37.9661C138.4 37.9593 138.366 37.9109 138.312 37.8854C138.275 37.8677 138.202 37.8366 138.177 37.8056C138.161 37.7847 138.063 37.7566 138.033 37.7371C137.962 37.6922 137.879 37.6309 137.806 37.5944" stroke="black" stroke-width="0.5"/>
<path d="M139.926 37.9883C139.906 37.9888 139.887 37.9922 139.867 37.9922C139.838 37.9922 139.812 37.978 139.787 37.9622C139.682 37.8946 139.599 37.7958 139.504 37.7151C139.388 37.6172 139.275 37.5101 139.135 37.4512C139.051 37.4159 138.965 37.3877 138.879 37.3594C138.85 37.3498 138.785 37.3113 138.754 37.332" stroke="black" stroke-width="0.5"/>
<defs>
<filter id="filter0_i_3_2" x="256" y="108" width="55" height="59" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_2"/>
</filter>
<filter id="filter1_i_3_2" x="158" y="109.5" width="27.5" height="58" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_2"/>
</filter>
<filter id="filter2_i_3_2" x="131.5" y="109.5" width="27" height="58" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_2"/>
</filter>
<filter id="filter3_i_3_2" x="381.5" y="109.5" width="27.5" height="58" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_2"/>
</filter>
<filter id="filter4_i_3_2" x="408.5" y="109.5" width="27" height="58" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_2"/>
</filter>
<filter id="filter5_i_3_2" x="459" y="118" width="17.5" height="40" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_2"/>
</filter>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 11 KiB

@ -1,74 +0,0 @@
<svg width="269" height="309" viewBox="0 0 269 309" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect y="254" width="250" height="269" transform="rotate(-90 0 254)" fill="#D9D9D9"/>
<line x1="24" y1="236" x2="24" y2="26" stroke="black" stroke-width="2"/>
<line x1="248" y1="25" x2="248" y2="236" stroke="black" stroke-width="2"/>
<line x1="249" y1="237" x2="23" y2="237" stroke="black" stroke-width="2"/>
<line x1="23" y1="25.5" x2="247" y2="25.5" stroke="black"/>
<g filter="url(#filter0_i_3_4)">
<path d="M108.5 26C108.5 33.0313 111.347 39.7727 116.411 44.7417C121.476 49.7103 128.342 52.5 135.5 52.5C142.658 52.5 149.524 49.7103 154.588 44.7417C159.653 39.7727 162.5 33.0313 162.5 26" stroke="black"/>
</g>
<line x1="99.5" y1="236" x2="99.5" y2="151" stroke="black"/>
<line x1="100.5" y1="236" x2="100.5" y2="151" stroke="black"/>
<path d="M172 150.5H100" stroke="black"/>
<path d="M99.5 151V150" stroke="black"/>
<path d="M172.5 151V150" stroke="black"/>
<line x1="172.5" y1="151" x2="172.5" y2="236" stroke="black"/>
<line x1="171.5" y1="151" x2="171.5" y2="236" stroke="black"/>
<line x1="37.5" y1="236" x2="37.5" y2="170" stroke="black"/>
<line x1="233.5" y1="236" x2="233.5" y2="170" stroke="black"/>
<g filter="url(#filter1_i_3_4)">
<path d="M163 150.5C163 147.02 162.315 143.574 160.983 140.359C159.651 137.144 157.699 134.222 155.238 131.762C152.778 129.301 149.856 127.349 146.641 126.017C143.426 124.685 139.98 124 136.5 124C133.02 124 129.574 124.685 126.359 126.017C123.144 127.349 120.222 129.301 117.762 131.762C115.301 134.222 113.349 137.144 112.017 140.359C110.685 143.574 110 147.02 110 150.5L136.5 150.5L163 150.5Z" stroke="black"/>
</g>
<g filter="url(#filter2_i_3_4)">
<path d="M110 150.5C110 153.98 110.685 157.426 112.017 160.641C113.349 163.856 115.301 166.778 117.762 169.238C120.222 171.699 123.144 173.651 126.359 174.983C129.574 176.315 133.02 177 136.5 177C139.98 177 143.426 176.315 146.641 174.983C149.856 173.651 152.778 171.699 155.238 169.238C157.699 166.778 159.651 163.856 160.983 160.641C162.315 157.426 163 153.98 163 150.5" stroke="black" stroke-dasharray="4 4"/>
</g>
<line x1="177" y1="173.5" x2="172" y2="173.5" stroke="black"/>
<line x1="177" y1="185.5" x2="172" y2="185.5" stroke="black"/>
<line x1="177" y1="197.5" x2="172" y2="197.5" stroke="black"/>
<line x1="177" y1="209.5" x2="172" y2="209.5" stroke="black"/>
<line x1="100" y1="173.5" x2="95" y2="173.5" stroke="black"/>
<line x1="100" y1="185.5" x2="95" y2="185.5" stroke="black"/>
<line x1="100" y1="197.5" x2="95" y2="197.5" stroke="black"/>
<line x1="100" y1="209.5" x2="95" y2="209.5" stroke="black"/>
<path d="M233.607 168.788C225.612 149.946 211.967 133.851 194.431 122.573C176.895 111.295 156.271 105.351 135.213 105.503C114.155 105.655 93.6242 111.896 76.2645 123.426C58.9047 134.955 45.5096 151.245 37.8066 170.201" stroke="black"/>
<path d="M233.5 169V168" stroke="black"/>
<path d="M233.5 170V169" stroke="black"/>
<path d="M118.5 218.5C118.5 213.996 120.34 209.673 123.621 206.484C126.901 203.294 131.354 201.5 136 201.5C140.646 201.5 145.099 203.294 148.379 206.484C151.66 209.673 153.5 213.996 153.5 218.5" stroke="black"/>
<circle cx="136.5" cy="221.5" r="3" transform="rotate(-90 136.5 221.5)" stroke="black"/>
<line x1="149" y1="225.5" x2="123" y2="225.5" stroke="black"/>
<path d="M37.5 171V170" stroke="black"/>
<path d="M38.1519 169.775C38.1187 169.779 38.1364 169.901 38.135 169.927C38.1302 170.02 38.0674 170.111 38.0674 170.206C38.0674 170.245 38.0388 170.328 38.0252 170.367C38.0065 170.419 37.9719 170.48 37.9661 170.535C37.9593 170.6 37.9109 170.634 37.8854 170.688C37.8677 170.725 37.8366 170.798 37.8056 170.823C37.7847 170.839 37.7566 170.937 37.7371 170.967C37.6922 171.038 37.6309 171.121 37.5944 171.194" stroke="black" stroke-width="0.5"/>
<path d="M37.9883 169.074C37.9888 169.094 37.9922 169.113 37.9922 169.133C37.9922 169.162 37.978 169.188 37.9622 169.213C37.8946 169.318 37.7958 169.401 37.7151 169.496C37.6172 169.612 37.5101 169.725 37.4512 169.865C37.4159 169.949 37.3877 170.035 37.3594 170.121C37.3498 170.15 37.3113 170.215 37.332 170.246" stroke="black" stroke-width="0.5"/>
<defs>
<filter id="filter0_i_3_4" x="108" y="26" width="55" height="31" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_4"/>
</filter>
<filter id="filter1_i_3_4" x="109.5" y="123.5" width="54" height="31.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_4"/>
</filter>
<filter id="filter2_i_3_4" x="109.5" y="150.5" width="54" height="31" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_4"/>
</filter>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 B

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M234-276q51-39 114-61.5T480-360q69 0 132 22.5T726-276q35-41 54.5-93T800-480q0-133-93.5-226.5T480-800q-133 0-226.5 93.5T160-480q0 59 19.5 111t54.5 93Zm246-164q-59 0-99.5-40.5T340-580q0-59 40.5-99.5T480-720q59 0 99.5 40.5T620-580q0 59-40.5 99.5T480-440Zm0 360q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q53 0 100-15.5t86-44.5q-39-29-86-44.5T480-280q-53 0-100 15.5T294-220q39 29 86 44.5T480-160Zm0-360q26 0 43-17t17-43q0-26-17-43t-43-17q-26 0-43 17t-17 43q0 26 17 43t43 17Zm0-60Zm0 360Z"/></svg>

Before

Width:  |  Height:  |  Size: 732 B

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="512" height="512" x="0" y="0" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512" xml:space="preserve" class=""> <g transform="matrix(1.0899999999999992,0,0,1.0899999999999992,-23.040010986327673,-23.03998867034892)"> <path fill-rule="evenodd" d="M250.131 307.122 424.673 132.58v73.421c0 17.6 14.4 31.999 31.999 31.999 17.6 0 32-14.399 32-31.999V23.328H305.998c-17.6 0-31.999 14.4-31.999 31.999 0 17.6 14.399 32 31.999 32h73.421L204.935 261.81c-39.932 40.129-110.352 12.463-110.352-45.627 0-35.683 28.926-64.609 64.609-64.609 30.018 0 55.252 20.472 62.508 48.216l48.526-48.526c-22.324-38.099-63.688-63.689-111.034-63.689-71.028 0-128.608 57.58-128.608 128.608.001 115.408 139.655 170.832 219.547 90.939zm-149.25 58.743c25.733 10.037 53.881 13.203 81.205 9.303l-104.17 104.17c-12.445 12.445-32.809 12.445-45.254 0s-12.445-32.809 0-45.254z" clip-rule="evenodd" fill="#F00" opacity="1" data-original="#F00" class=""> </path> </g> </svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

@ -1,62 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="1280.000000pt" height="1276.000000pt" viewBox="0 0 1280.000000 1276.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.15, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,1276.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M6085 12754 c-1124 -66 -2124 -378 -3055 -952 -113 -70 -150 -98
-115 -88 50 14 350 37 555 43 925 24 1755 -198 2573 -691 95 -56 321 -202 502
-322 511 -340 600 -373 753 -280 281 170 481 457 559 800 24 105 24 393 -1
506 -59 277 -202 557 -417 813 -45 54 -91 102 -103 106 -19 8 -160 25 -411 51
-99 11 -724 21 -840 14z"/>
<path d="M7630 12635 c0 -2 28 -48 63 -102 210 -324 335 -626 378 -913 16
-112 14 -310 -6 -424 -56 -328 -245 -651 -591 -1014 -79 -83 -105 -117 -98
-127 11 -17 953 -895 959 -895 3 0 136 105 297 233 1085 863 1485 1140 2065
1431 94 47 173 91 175 98 7 20 -232 240 -467 429 -766 616 -1654 1043 -2622
1259 -135 31 -153 33 -153 25z"/>
<path d="M3055 11615 c-127 -13 -262 -36 -359 -61 -69 -18 -157 -81 -397 -280
-984 -823 -1695 -1909 -2049 -3135 -84 -291 -140 -550 -185 -854 -19 -130 -29
-231 -23 -225 3 3 16 34 28 70 36 103 124 267 195 363 386 518 1151 901 2475
1238 291 74 553 134 910 209 107 23 236 50 285 60 50 11 158 33 240 50 83 17
191 39 240 50 50 10 133 28 185 39 1079 228 1599 392 1915 604 96 64 205 181
244 262 28 57 35 82 35 135 1 62 -2 70 -44 135 -142 218 -526 495 -1019 737
-920 449 -1941 680 -2676 603z"/>
<path d="M10940 10674 c-63 -41 -176 -114 -250 -162 -299 -193 -798 -547
-1215 -861 -423 -318 -899 -711 -893 -736 2 -6 189 -246 417 -532 l414 -520
171 82 c528 255 975 375 1398 375 574 0 1060 -239 1464 -720 85 -101 219 -286
264 -365 18 -31 34 -54 36 -52 11 11 -69 456 -120 671 -235 976 -692 1875
-1347 2646 -54 63 -126 145 -161 182 l-63 66 -115 -74z"/>
<path d="M7125 9833 c-70 -62 -231 -181 -327 -242 -491 -308 -1120 -531 -2106
-746 -90 -20 -452 -94 -804 -165 -1128 -228 -1491 -317 -1978 -485 -936 -323
-1527 -761 -1860 -1378 l-42 -78 -5 -252 c-31 -1503 472 -2974 1415 -4137 47
-58 87 -107 88 -108 8 -11 50 35 210 233 1067 1318 2042 2408 3174 3549 953
960 1908 1846 2933 2721 135 116 246 215 247 220 0 10 -890 905 -900 905 -3
-1 -23 -17 -45 -37z"/>
<path d="M8255 8618 c-886 -668 -1534 -1216 -2370 -2004 -1028 -969 -2125
-2136 -3299 -3509 -132 -154 -265 -309 -296 -345 -142 -164 -592 -703 -596
-715 -7 -16 300 -326 466 -471 678 -593 1425 -1020 2260 -1294 231 -75 490
-143 730 -190 207 -40 413 -72 560 -85 62 -6 69 -4 155 38 192 94 346 209 515
383 351 363 601 854 839 1649 58 192 158 587 211 835 40 185 114 541 190 920
98 486 168 825 200 965 5 22 16 69 24 105 8 36 36 151 61 255 40 164 59 235
115 435 52 187 169 532 242 715 232 582 562 1062 911 1325 25 19 45 38 44 42
-2 8 -838 1039 -840 1037 -1 0 -56 -41 -122 -91z"/>
<path d="M10570 8093 c-358 -54 -579 -149 -741 -319 -84 -89 -93 -106 -86
-168 10 -100 65 -199 397 -721 368 -578 508 -818 691 -1185 379 -760 567
-1413 611 -2132 24 -392 -30 -863 -142 -1243 -16 -54 -28 -100 -27 -102 8 -8
297 369 419 547 722 1055 1109 2313 1108 3600 0 294 -15 490 -40 547 -30 68
-127 228 -194 318 -240 326 -590 581 -999 729 -271 98 -498 137 -791 135 -100
-1 -192 -3 -206 -6z"/>
<path d="M9265 7317 c-292 -97 -541 -403 -744 -914 -174 -439 -312 -964 -521
-1975 -16 -82 -44 -214 -60 -295 -17 -82 -39 -188 -50 -238 -11 -49 -33 -157
-50 -240 -389 -1893 -798 -2915 -1390 -3478 -57 -54 -123 -112 -147 -130 l-45
-32 203 -3 c568 -9 1247 95 1844 283 928 292 1741 765 2451 1423 179 166 216
207 253 281 96 190 163 413 202 676 20 128 23 192 23 430 0 344 -22 560 -95
927 -191 959 -696 2109 -1249 2843 -175 231 -351 410 -428 433 -64 19 -153 23
-197 9z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.7 KiB

@ -1,5 +0,0 @@
<svg viewBox="0 0 80 49" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24.5 4.5H55.5C66.5457 4.5 75.5 13.4543 75.5 24.5C75.5 35.5457 66.5457 44.5 55.5 44.5H24.5C13.4543 44.5 4.5 35.5457 4.5 24.5C4.5 13.4543 13.4543 4.5 24.5 4.5Z"
stroke="black" stroke-width="9"/>
<line x1="24.5" y1="24.5" x2="55.5" y2="24.5" stroke="black" stroke-width="9" stroke-linecap="round"/>
</svg>

Before

Width:  |  Height:  |  Size: 405 B

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
const o="/api",t="";export{o as API,t as BASE};

@ -1 +0,0 @@
import{API as e}from"./Constants.ts-0288c91b.js";function p(t,n,o="POST"){return fetch(`${e}/${t}`,{method:o,headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(n)})}export{p as fetchAPI};

@ -1 +0,0 @@
import{j as o,R as c}from"../jsx-runtime-2e2d9038.js";import{r as n}from"../index-ca121481.js";var t={},r=n;t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot;function i(e,a){t.createRoot(document.getElementById("root")).render(o.jsx(c.StrictMode,{children:o.jsx(e,{...a})}))}export{i as renderView};

@ -1 +0,0 @@
import{j as e,r as f}from"../../jsx-runtime-2e2d9038.js";import{D as u}from"../../cjs-ff7eb0e1.js";import"../../index-ca121481.js";function k({id:i,objects:r,onChange:t,canDetach:n,onElementDetached:x,render:a}){return e.jsx("div",{id:i,style:{display:"flex"},children:r.map(o=>e.jsx(l,{item:o,render:a,onTryDetach:(s,d)=>{if(!n(s))return;const c=r.findIndex(p=>p.key===d.key);t(r.toSpliced(c,1)),x(s,d)}},o.key))})}function l({item:i,onTryDetach:r,render:t}){const n=f.useRef(null);return e.jsx(u,{position:{x:0,y:0},nodeRef:n,onStop:()=>r(n.current,i),children:e.jsx("div",{ref:n,children:t(i)})})}export{k as Rack};

@ -1,2 +0,0 @@
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".title-input{background:transparent;border-top:none;border-right:none;border-left:none;text-align:center;border-bottom-width:2px;border-bottom-color:transparent}.title-input:focus{outline:none;border-bottom-color:#8a2be2}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
import{r as u,j as o}from"../../jsx-runtime-2e2d9038.js";function p({style:r,default_value:s,on_validated:a}){const[e,l]=u.useState(s),n=u.useRef(null);return o.jsx("input",{className:"title-input",ref:n,style:r,type:"text",value:e,onChange:t=>l(t.target.value),onBlur:t=>a(e),onKeyUp:t=>{t.key=="Enter"&&n.current?.blur()}})}export{p as default};

@ -1,2 +0,0 @@
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".arrow-action{height:50%}.arrow-action-icon{user-select:none;-moz-user-select:none;max-width:17px;max-height:17px}.arrow-head-pick{position:absolute;cursor:grab;top:0;left:0;min-width:17px;min-height:17px}.arrow-head-pick:active{cursor:crosshair}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
import{r as s,j as o}from"../../../jsx-runtime-2e2d9038.js";import{D as i}from"../../../cjs-ff7eb0e1.js";import"../../../index-ca121481.js";const c="/IQBall/public/arrow-73d7c199.svg";function g({onHeadDropped:t,onHeadPicked:e,onHeadMoved:a}){const r=s.useRef(null);return o.jsxs("div",{className:"arrow-action",children:[o.jsx("img",{className:"arrow-action-icon",src:c,alt:"add arrow"}),o.jsx(i,{nodeRef:r,onStart:()=>{const n=r.current.getBoundingClientRect();e(n)},onStop:()=>{const n=r.current.getBoundingClientRect();t(n)},onDrag:()=>{const n=r.current.getBoundingClientRect();a(n)},position:{x:0,y:0},children:o.jsx("div",{ref:r,className:"arrow-head-pick"})})]})}function x(){return o.jsx("div",{style:{backgroundColor:"black",height:"5px",width:"25px"}})}function p(){return o.jsx("svg",{viewBox:"0 0 50 50",width:20,height:20,children:o.jsx("polygon",{points:"50 0, 0 0, 25 40",fill:"#000"})})}export{p as MoveToHead,x as ScreenHead,g as default};

@ -1 +0,0 @@
import{r as t,j as e}from"../../../jsx-runtime-2e2d9038.js";import{BallPiece as n}from"../editor/BallPiece.tsx-1b2eb023.js";import{D as s}from"../../../cjs-ff7eb0e1.js";import"../../../index-ca121481.js";function f({onDrop:o}){const r=t.useRef(null);return e.jsx(s,{onStop:()=>o(r.current),nodeRef:r,children:e.jsx("div",{ref:r,children:e.jsx(n,{})})})}export{f as default};

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
function i(...n){const t=n.map(c=>c.x),a=n.map(c=>c.y),r=Math.min(...t),u=Math.min(...a),y=Math.max(...t)-r,h=Math.max(...a)-u;return{x:r,y:u,width:y,height:h}}function m(n,t,a){return{x:n.x+t/2,y:n.y+a/2,width:t,height:a}}function s(n,t){return t.x>=n.x&&t.x<=n.x+n.width&&t.y>=n.y&&t.y<=n.y+n.height}export{i as boundsOf,s as contains,m as surrounds};

@ -1 +0,0 @@
const x={x:0,y:0};function y(n,t){return{x:n.x-t.x,y:n.y-t.y}}function r(n){return{x:n.x+n.width/2,y:n.y+n.height/2}}function o(n,t){return{x:n.x+t.x,y:n.y+t.y}}function h(n,t){return{x:n.x-t.x,y:n.y-t.y}}function e(n,t){return{x:n.x*t,y:n.y*t}}function u(n,t){return Math.sqrt((n.x-t.x)**2+(n.y-t.y)**2)}function f(n){return u(x,n)}function c(n,t){const i=y(n,t);return Math.atan2(i.x,i.y)}function s(n,t){return{x:(n.x-t.x)/t.width,y:(n.y-t.y)/t.height}}function d(n,t){return{x:n.x*t.width,y:n.y*t.height}}function M(n,t){return{x:n.x/2+t.x/2,y:n.y/2+t.y/2}}function l(n,t){return{x:Math.cos(t)*n.x-Math.sin(t)*n.y,y:Math.sin(t)*n.x+Math.cos(t)*n.y}}export{x as NULL_POS,o as add,c as angle,u as distance,M as middle,r as middlePos,h as minus,e as mul,f as norm,d as posWithinBase,s as ratioWithinBase,y as relativeTo,l as rotate};

@ -1,4 +0,0 @@
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ball *{fill:#c5520d}.ball-div,.ball{pointer-events:all;width:20px;height:20px;cursor:pointer}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
import{r as e,j as a}from"../../../jsx-runtime-2e2d9038.js";const l=t=>e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1280.000000pt",height:"1276.000000pt",viewBox:"0 0 1280.000000 1276.000000",preserveAspectRatio:"xMidYMid meet",...t},e.createElement("metadata",null,`
Created by potrace 1.15, written by Peter Selinger 2001-2017
`),e.createElement("g",{transform:"translate(0.000000,1276.000000) scale(0.100000,-0.100000)",fill:"#000000",stroke:"none"},e.createElement("path",{d:"M6085 12754 c-1124 -66 -2124 -378 -3055 -952 -113 -70 -150 -98 -115 -88 50 14 350 37 555 43 925 24 1755 -198 2573 -691 95 -56 321 -202 502 -322 511 -340 600 -373 753 -280 281 170 481 457 559 800 24 105 24 393 -1 506 -59 277 -202 557 -417 813 -45 54 -91 102 -103 106 -19 8 -160 25 -411 51 -99 11 -724 21 -840 14z"}),e.createElement("path",{d:"M7630 12635 c0 -2 28 -48 63 -102 210 -324 335 -626 378 -913 16 -112 14 -310 -6 -424 -56 -328 -245 -651 -591 -1014 -79 -83 -105 -117 -98 -127 11 -17 953 -895 959 -895 3 0 136 105 297 233 1085 863 1485 1140 2065 1431 94 47 173 91 175 98 7 20 -232 240 -467 429 -766 616 -1654 1043 -2622 1259 -135 31 -153 33 -153 25z"}),e.createElement("path",{d:"M3055 11615 c-127 -13 -262 -36 -359 -61 -69 -18 -157 -81 -397 -280 -984 -823 -1695 -1909 -2049 -3135 -84 -291 -140 -550 -185 -854 -19 -130 -29 -231 -23 -225 3 3 16 34 28 70 36 103 124 267 195 363 386 518 1151 901 2475 1238 291 74 553 134 910 209 107 23 236 50 285 60 50 11 158 33 240 50 83 17 191 39 240 50 50 10 133 28 185 39 1079 228 1599 392 1915 604 96 64 205 181 244 262 28 57 35 82 35 135 1 62 -2 70 -44 135 -142 218 -526 495 -1019 737 -920 449 -1941 680 -2676 603z"}),e.createElement("path",{d:"M10940 10674 c-63 -41 -176 -114 -250 -162 -299 -193 -798 -547 -1215 -861 -423 -318 -899 -711 -893 -736 2 -6 189 -246 417 -532 l414 -520 171 82 c528 255 975 375 1398 375 574 0 1060 -239 1464 -720 85 -101 219 -286 264 -365 18 -31 34 -54 36 -52 11 11 -69 456 -120 671 -235 976 -692 1875 -1347 2646 -54 63 -126 145 -161 182 l-63 66 -115 -74z"}),e.createElement("path",{d:"M7125 9833 c-70 -62 -231 -181 -327 -242 -491 -308 -1120 -531 -2106 -746 -90 -20 -452 -94 -804 -165 -1128 -228 -1491 -317 -1978 -485 -936 -323 -1527 -761 -1860 -1378 l-42 -78 -5 -252 c-31 -1503 472 -2974 1415 -4137 47 -58 87 -107 88 -108 8 -11 50 35 210 233 1067 1318 2042 2408 3174 3549 953 960 1908 1846 2933 2721 135 116 246 215 247 220 0 10 -890 905 -900 905 -3 -1 -23 -17 -45 -37z"}),e.createElement("path",{d:"M8255 8618 c-886 -668 -1534 -1216 -2370 -2004 -1028 -969 -2125 -2136 -3299 -3509 -132 -154 -265 -309 -296 -345 -142 -164 -592 -703 -596 -715 -7 -16 300 -326 466 -471 678 -593 1425 -1020 2260 -1294 231 -75 490 -143 730 -190 207 -40 413 -72 560 -85 62 -6 69 -4 155 38 192 94 346 209 515 383 351 363 601 854 839 1649 58 192 158 587 211 835 40 185 114 541 190 920 98 486 168 825 200 965 5 22 16 69 24 105 8 36 36 151 61 255 40 164 59 235 115 435 52 187 169 532 242 715 232 582 562 1062 911 1325 25 19 45 38 44 42 -2 8 -838 1039 -840 1037 -1 0 -56 -41 -122 -91z"}),e.createElement("path",{d:"M10570 8093 c-358 -54 -579 -149 -741 -319 -84 -89 -93 -106 -86 -168 10 -100 65 -199 397 -721 368 -578 508 -818 691 -1185 379 -760 567 -1413 611 -2132 24 -392 -30 -863 -142 -1243 -16 -54 -28 -100 -27 -102 8 -8 297 369 419 547 722 1055 1109 2313 1108 3600 0 294 -15 490 -40 547 -30 68 -127 228 -194 318 -240 326 -590 581 -999 729 -271 98 -498 137 -791 135 -100 -1 -192 -3 -206 -6z"}),e.createElement("path",{d:"M9265 7317 c-292 -97 -541 -403 -744 -914 -174 -439 -312 -964 -521 -1975 -16 -82 -44 -214 -60 -295 -17 -82 -39 -188 -50 -238 -11 -49 -33 -157 -50 -240 -389 -1893 -798 -2915 -1390 -3478 -57 -54 -123 -112 -147 -130 l-45 -32 203 -3 c568 -9 1247 95 1844 283 928 292 1741 765 2451 1423 179 166 216 207 253 281 96 190 163 413 202 676 20 128 23 192 23 430 0 344 -22 560 -95 927 -191 959 -696 2109 -1249 2843 -175 231 -351 410 -428 433 -64 19 -153 23 -197 9z"})));function c(){return a.jsx(l,{className:"ball"})}export{c as BallPiece};

@ -1 +0,0 @@
import{r as a,j as l}from"../../../jsx-runtime-2e2d9038.js";import{CourtBall as F}from"./CourtBall.tsx-df87788c.js";import L from"./CourtPlayer.tsx-3da10617.js";import{ActionKind as s}from"../../tactic/Action.ts-d727cf33.js";import M from"../actions/ArrowAction.tsx-b082b6c9.js";import{ratioWithinBase as r,middlePos as m}from"../arrows/Pos.ts-9fe07952.js";import N from"../actions/BallAction.tsx-c8825b1d.js";import{contains as T}from"../arrows/Box.ts-eca59774.js";import{CourtAction as V}from"../../views/editor/CourtAction.tsx-15785ac7.js";import"../../../cjs-ff7eb0e1.js";import"../../../index-ca121481.js";import"./BallPiece.tsx-1b2eb023.js";import"./PlayerPiece.tsx-964e2db3.js";import"../arrows/BendableArrow.tsx-f8a85d9b.js";function tt({players:B,actions:C,objects:R,renderAction:x,setActions:p,onPlayerRemove:h,onPlayerChange:v,onBallMoved:E,onBallRemove:P,courtImage:A,courtRef:d}){function y(t,o){const n=document.getElementById(t.id),e=d.current.getBoundingClientRect(),c=r(m(n.getBoundingClientRect()),e);for(const i of B){if(i.id==t.id)continue;const g=document.getElementById(i.id).getBoundingClientRect();if(!(g.top>o.bottom||g.right<o.left||g.bottom<o.top||g.left>o.right)){const O=document.getElementById(i.id).getBoundingClientRect(),S=r(m(O),e),w={fromPlayerId:n.id,toPlayerId:i.id,type:t.hasBall?s.SHOOT:s.SCREEN,moveFrom:c,segments:[{next:S}]};p(k=>[...k,w]);return}}const u={fromPlayerId:n.id,type:t.hasBall?s.DRIBBLE:s.MOVE,moveFrom:r(m(n.getBoundingClientRect()),e),segments:[{next:r(m(o),e)}]};p(i=>[...i,u])}const[I,f]=a.useState(null),b=a.useCallback(t=>{const o=r(m(document.getElementById(t.id).getBoundingClientRect()),d.current.getBoundingClientRect());p(n=>n.map(e=>{if(e.fromPlayerId==t.id)return{...e,moveFrom:o};if(e.toPlayerId==t.id){const c=e.segments.toSpliced(e.segments.length-1,1,{...e.segments[e.segments.length-1],next:o});return{...e,segments:c}}return e}))},[]),[j,D]=a.useState([]);return a.useLayoutEffect(()=>D(C),[C]),l.jsxs("div",{className:"court-container",ref:d,style:{position:"relative"},children:[A,B.map(t=>l.jsx(L,{player:t,onDrag:()=>b(t),onChange:v,onRemove:()=>h(t),courtRef:d,availableActions:o=>[l.jsx(M,{onHeadMoved:n=>{const e=d.current.getBoundingClientRect(),c=m(n),u=B.find(i=>i!=t&&T(document.getElementById(i.id).getBoundingClientRect(),c));f(i=>({...i,segments:[{next:r(c,e)}],type:t.hasBall?u?s.SHOOT:s.DRIBBLE:u?s.SCREEN:s.MOVE}))},onHeadPicked:n=>{document.activeElement.blur();const e=d.current.getBoundingClientRect();f({type:t.hasBall?s.DRIBBLE:s.MOVE,fromPlayerId:t.id,toPlayerId:void 0,moveFrom:r(m(o.getBoundingClientRect()),e),segments:[{next:r(m(n),e)}]})},onHeadDropped:n=>{y(t,n),f(null)}},1),t.hasBall&&l.jsx(N,{onDrop:n=>E(n.getBoundingClientRect())},2)]},t.id)),j.map((t,o)=>x(t,o)),R.map(t=>{if(t.type=="ball")return l.jsx(F,{onMoved:E,ball:t,onRemove:P},"ball");throw new Error("unknown court object",t.type)}),I&&l.jsx(V,{courtRef:d,action:I,onActionDeleted:()=>{},onActionChanges:()=>{}})]})}export{tt as BasketCourt};

@ -1 +0,0 @@
import{r as a,j as e}from"../../../jsx-runtime-2e2d9038.js";import{D as c}from"../../../cjs-ff7eb0e1.js";import{BallPiece as p}from"./BallPiece.tsx-1b2eb023.js";import"../../../index-ca121481.js";function d({onMoved:r,ball:o,onRemove:i}){const t=a.useRef(null),n=o.rightRatio,s=o.bottomRatio;return e.jsx(c,{onStop:()=>r(t.current.getBoundingClientRect()),nodeRef:t,children:e.jsx("div",{className:"ball-div",ref:t,tabIndex:0,onKeyUp:l=>{l.key=="Delete"&&i()},style:{position:"absolute",left:`${n*100}%`,top:`${s*100}%`},children:e.jsx(p,{})})})}export{d as CourtBall};

@ -1 +0,0 @@
import{r as h,j as e}from"../../../jsx-runtime-2e2d9038.js";import{PlayerPiece as p}from"./PlayerPiece.tsx-964e2db3.js";import{D as R}from"../../../cjs-ff7eb0e1.js";import{NULL_POS as B,ratioWithinBase as g}from"../arrows/Pos.ts-9fe07952.js";import"../../../index-ca121481.js";function y({player:t,onDrag:n,onChange:s,onRemove:a,courtRef:r,availableActions:c}){const l=t.hasBall,d=t.rightRatio,m=t.bottomRatio,o=h.useRef(null);return e.jsx(R,{handle:".player-piece",nodeRef:o,onDrag:n,position:B,onStop:()=>{const i=o.current.getBoundingClientRect(),u=r.current.getBoundingClientRect(),{x,y:f}=g(i,u);s({id:t.id,rightRatio:x,bottomRatio:f,team:t.team,role:t.role,hasBall:t.hasBall})},children:e.jsx("div",{id:t.id,ref:o,className:"player",style:{position:"absolute",left:`${d*100}%`,top:`${m*100}%`},children:e.jsxs("div",{tabIndex:0,className:"player-content",onKeyUp:i=>{i.key=="Delete"&&a()},children:[e.jsx("div",{className:"player-actions",children:c(o.current)}),e.jsx(p,{team:t.team,text:t.role,hasBall:l})]})})})}export{y as default};

@ -1,2 +0,0 @@
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".player{pointer-events:none}.player-content{display:flex;flex-direction:column;align-content:center;align-items:center;outline:none}.player-piece{font-family:monospace;pointer-events:all;background-color:var(--selected-team-primarycolor);color:var(--selected-team-secondarycolor);border-radius:100px;width:20px;height:20px;display:flex;align-items:center;justify-content:center;user-select:none}.player-piece-has-ball{border-width:2px;border-style:solid;border-color:var(--player-piece-ball-border-color)}.player-actions{display:flex;position:absolute;flex-direction:row;justify-content:space-evenly;align-content:space-between;align-items:center;visibility:hidden;transform:translateY(-25px);height:20px;width:150%;gap:25%}.player:focus-within .player-actions{visibility:visible;pointer-events:all}.player:focus-within .player-piece{color:var(--selection-color)}.player:focus-within{z-index:1000}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
import{j as r}from"../../../jsx-runtime-2e2d9038.js";function s({team:i,text:l,hasBall:a}){let e=`player-piece ${i}`;return a&&(e+=" player-piece-has-ball"),r.jsx("div",{className:e,children:r.jsx("p",{children:l})})}export{s as PlayerPiece};

@ -1 +0,0 @@
import{j as a}from"../../../jsx-runtime-2e2d9038.js";class s{}s.Guest={className:"save-state-guest",message:"you are not connected, your changes will not be saved."};s.Ok={className:"save-state-ok",message:"saved"};s.Saving={className:"save-state-saving",message:"saving..."};s.Err={className:"save-state-error",message:"could not save tactic."};function c({state:e}){return a.jsx("div",{className:"save-state",children:a.jsx("div",{className:e.className,children:e.message})})}export{s as SaveStates,c as default};

@ -1 +0,0 @@
var O=(E=>(E.SCREEN="SCREEN",E.DRIBBLE="DRIBBLE",E.MOVE="MOVE",E.SHOOT="SHOOT",E))(O||{});export{O as ActionKind};

@ -1 +0,0 @@
var n=(e=>(e.Allies="allies",e.Opponents="opponents",e))(n||{});export{n as Team};

File diff suppressed because one or more lines are too long

@ -1,2 +0,0 @@
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap";:root{--main-color: #ffffff;--second-color: #e8e8e8;--background-color: #d2cdd3;--selected-team-primarycolor: #ffffff;--selected-team-secondarycolor: #000000;--player-allies-color: #64e4f5;--player-opponents-color: #f59264;--buttons-shadow-color: #a8a8a8;--selection-color: #3f7fc4;--border-color: #ffffff;--editor-court-selection-background: #5f8fee;--editor-court-selection-buttons: #acc4f3;--player-piece-ball-border-color: #000000;--text-main-font: "Roboto", sans-serif}#panel-root{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;align-content:center}#panel-top{font-family:var(--text-main-font)}#panel-choices{width:100%;height:100%;display:flex;justify-content:center;align-items:center;align-content:center;background-color:var(--editor-court-selection-background)}#panel-buttons{width:75%;height:20%;display:flex;justify-content:space-evenly;align-items:stretch;align-content:center}.court-kind-button{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;align-content:center;cursor:pointer;transition:scale .5s ease-out;width:auto}.court-kind-button-bottom,.court-kind-button-top{border:solid;border-color:var(--border-color)}.court-kind-button-bottom{display:flex;justify-content:center;align-items:center;align-content:center;height:25%;width:100%;background-color:var(--editor-court-selection-buttons);border-radius:0 0 20px 20px;border-width:3px}.court-kind-button-top{height:30%;background-color:var(--main-color);border-radius:20px 20px 0 0;border-width:3px 3px 0 3px}.court-kind-button:hover{scale:1.1}.court-kind-button-top,.court-kind-button-image-div{overflow:hidden;display:flex;height:100%;width:100%;justify-content:center;align-items:center;align-content:center}.court-kind-button-image{height:100%;width:150px;user-select:none;-webkit-user-drag:none}.court-kind-button-image-div{height:100%;padding:0 10px;background-color:var(--second-color)}.court-kind-button-name,.court-kind-button-details{user-select:none;font-family:var(--text-main-font)}.court-kind-button-details{position:absolute;z-index:-1;top:0;transition:top 1s}.court-kind-button:hover .court-kind-button-details{top:-20px}')),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
import{j as t}from"../../jsx-runtime-2e2d9038.js";import{C as l}from"../../full_court-1739e2e0.js";import{BASE as s}from"../Constants.ts-0288c91b.js";const o="/IQBall/public/half_court-eb16117a.svg";function m(){return t.jsxs("div",{id:"panel-root",children:[t.jsx("div",{id:"panel-top",children:t.jsx("p",{children:"Select a basket court"})}),t.jsx("div",{id:"panel-choices",children:t.jsxs("div",{id:"panel-buttons",children:[t.jsx(e,{name:"Plain",details:"Select a plain basketball court",image:l,redirect:"/tactic/new/plain"}),t.jsx(e,{name:"Half",details:"Select half a basketball court",image:o,redirect:"/tactic/new/half"})]})})]})}function e({name:i,image:a,details:n,redirect:c}){return t.jsxs("div",{className:"court-kind-button",onClick:()=>location.href=s+c,children:[t.jsx("div",{className:"court-kind-button-details",children:n}),t.jsx("div",{className:"court-kind-button-top",children:t.jsx("div",{className:"court-kind-button-image-div",children:t.jsx("img",{src:a,alt:i,className:"court-kind-button-image"})})}),t.jsx("div",{className:"court-kind-button-bottom",children:t.jsx("p",{className:"court-kind-button-name",children:i})})]})}export{m as default};

@ -1,2 +0,0 @@
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("#main{height:100vh;width:100%;display:flex;flex-direction:column}#topbar{display:flex;background-color:var(--main-color);justify-content:center;align-items:center}h1{text-align:center;margin-top:0}#court-container{flex:1;display:flex;justify-content:center;background-color:var(--main-color)}#court{max-width:80%;max-height:80%}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
import{r as s,j as t}from"../../jsx-runtime-2e2d9038.js";import{C as e}from"../../full_court-1739e2e0.js";function c({id:o,name:r}){const[i,a]=s.useState({});return t.jsxs("div",{id:"main",children:[t.jsx("div",{id:"topbar",children:t.jsx("h1",{children:r})}),t.jsx("div",{id:"court-container",children:t.jsx("img",{id:"court",src:e,style:i,alt:"Basketball Court"})})]})}export{c as default};

@ -1 +0,0 @@
import{j as s}from"../../../jsx-runtime-2e2d9038.js";import{ActionKind as r}from"../../tactic/Action.ts-d727cf33.js";import i from"../../components/arrows/BendableArrow.tsx-f8a85d9b.js";import{ScreenHead as n,MoveToHead as y}from"../../components/actions/ArrowAction.tsx-b082b6c9.js";import"../../components/arrows/Pos.ts-9fe07952.js";import"../../../cjs-ff7eb0e1.js";import"../../../index-ca121481.js";function l({action:e,onActionChanges:a,onActionDeleted:m,courtRef:p}){let t;switch(e.type){case r.DRIBBLE:case r.MOVE:case r.SHOOT:t=()=>s.jsx(y,{});break;case r.SCREEN:t=()=>s.jsx(n,{});break}let o;switch(e.type){case r.SHOOT:o="10 5";break}return s.jsx(i,{forceStraight:e.type==r.SHOOT,area:p,startPos:e.moveFrom,segments:e.segments,onSegmentsChanges:d=>{a({...e,segments:d})},wavy:e.type==r.DRIBBLE,endRadius:e.toPlayerId?26:17,startRadius:0,onDeleteRequested:m,style:{head:t,dashArray:o}})}export{l as CourtAction};

@ -1 +0,0 @@
const l="/IQBall/public/full_court-939d8e82.svg";export{l as C};

@ -1,135 +0,0 @@
<svg width="567" height="269" viewBox="0 0 567 269" fill="none" xmlns="http://www.w3.org/2000/svg">
<line x1="73" y1="24" x2="495" y2="24" stroke="black" stroke-width="2"/>
<line x1="494" y1="23" x2="494" y2="247" stroke="black" stroke-width="2"/>
<line x1="495" y1="248" x2="73" y2="248" stroke="black" stroke-width="2"/>
<line x1="72" y1="249" x2="72" y2="23" stroke="black" stroke-width="2"/>
<line x1="283.5" y1="23" x2="283.5" y2="247" stroke="black"/>
<g filter="url(#filter0_i_3_2)">
<circle cx="283.5" cy="135.5" r="27" stroke="black"/>
</g>
<line x1="73" y1="99.5" x2="158" y2="99.5" stroke="black"/>
<line x1="73" y1="100.5" x2="158" y2="100.5" stroke="black"/>
<path d="M158.5 172V100" stroke="black"/>
<path d="M158 99.5H159" stroke="black"/>
<path d="M158 172.5H159" stroke="black"/>
<line x1="158" y1="172.5" x2="73" y2="172.5" stroke="black"/>
<line x1="158" y1="171.5" x2="73" y2="171.5" stroke="black"/>
<line x1="73" y1="37.5" x2="139" y2="37.5" stroke="black"/>
<line x1="73" y1="233.5" x2="139" y2="233.5" stroke="black"/>
<g filter="url(#filter1_i_3_2)">
<path d="M158.5 163C161.98 163 165.426 162.315 168.641 160.983C171.856 159.651 174.778 157.699 177.238 155.238C179.699 152.778 181.651 149.856 182.983 146.641C184.315 143.426 185 139.98 185 136.5C185 133.02 184.315 129.574 182.983 126.359C181.651 123.144 179.699 120.222 177.238 117.762C174.778 115.301 171.856 113.349 168.641 112.017C165.426 110.685 161.98 110 158.5 110L158.5 136.5L158.5 163Z" stroke="black"/>
</g>
<g filter="url(#filter2_i_3_2)">
<path d="M158.5 110C155.02 110 151.574 110.685 148.359 112.017C145.144 113.349 142.222 115.301 139.762 117.762C137.301 120.222 135.349 123.144 134.017 126.359C132.685 129.574 132 133.02 132 136.5C132 139.98 132.685 143.426 134.017 146.641C135.349 149.856 137.301 152.778 139.762 155.238C142.222 157.699 145.144 159.651 148.359 160.983C151.574 162.315 155.02 163 158.5 163" stroke="black" stroke-dasharray="4 4"/>
</g>
<line x1="135.5" y1="177" x2="135.5" y2="172" stroke="black"/>
<line x1="123.5" y1="177" x2="123.5" y2="172" stroke="black"/>
<line x1="111.5" y1="177" x2="111.5" y2="172" stroke="black"/>
<line x1="99.5" y1="177" x2="99.5" y2="172" stroke="black"/>
<line x1="135.5" y1="100" x2="135.5" y2="95" stroke="black"/>
<line x1="123.5" y1="100" x2="123.5" y2="95" stroke="black"/>
<line x1="111.5" y1="100" x2="111.5" y2="95" stroke="black"/>
<line x1="99.5" y1="100" x2="99.5" y2="95" stroke="black"/>
<path d="M140.212 233.607C159.054 225.612 175.149 211.967 186.427 194.431C197.705 176.895 203.649 156.271 203.497 135.213C203.345 114.155 197.104 93.6242 185.574 76.2645C174.045 58.9047 157.755 45.5096 138.799 37.8066" stroke="black"/>
<path d="M140 233.5H141" stroke="black"/>
<path d="M139 233.5H140" stroke="black"/>
<path d="M90.5 118.5C95.0041 118.5 99.3266 120.34 102.516 123.621C105.706 126.901 107.5 131.354 107.5 136C107.5 140.646 105.706 145.099 102.516 148.379C99.3266 151.66 95.0041 153.5 90.5 153.5" stroke="black"/>
<circle cx="87.5" cy="136.5" r="3" stroke="black"/>
<line x1="83.5" y1="149" x2="83.5" y2="123" stroke="black"/>
<line y1="-0.5" x2="85" y2="-0.5" transform="matrix(-1 0 0 1 494 100)" stroke="black"/>
<line y1="-0.5" x2="85" y2="-0.5" transform="matrix(-1 0 0 1 494 101)" stroke="black"/>
<path d="M408.5 172V100" stroke="black"/>
<path d="M409 99.5H408" stroke="black"/>
<path d="M409 172.5H408" stroke="black"/>
<line y1="-0.5" x2="85" y2="-0.5" transform="matrix(1 0 0 -1 409 172)" stroke="black"/>
<line y1="-0.5" x2="85" y2="-0.5" transform="matrix(1 0 0 -1 409 171)" stroke="black"/>
<line y1="-0.5" x2="66" y2="-0.5" transform="matrix(-1 0 0 1 494 38)" stroke="black"/>
<line y1="-0.5" x2="66" y2="-0.5" transform="matrix(-1 0 0 1 494 234)" stroke="black"/>
<g filter="url(#filter3_i_3_2)">
<path d="M408.5 163C405.02 163 401.574 162.315 398.359 160.983C395.144 159.651 392.222 157.699 389.762 155.238C387.301 152.778 385.349 149.856 384.017 146.641C382.685 143.426 382 139.98 382 136.5C382 133.02 382.685 129.574 384.017 126.359C385.349 123.144 387.301 120.222 389.762 117.762C392.222 115.301 395.144 113.349 398.359 112.017C401.574 110.685 405.02 110 408.5 110L408.5 136.5L408.5 163Z" stroke="black"/>
</g>
<g filter="url(#filter4_i_3_2)">
<path d="M408.5 110C411.98 110 415.426 110.685 418.641 112.017C421.856 113.349 424.778 115.301 427.238 117.762C429.699 120.222 431.651 123.144 432.983 126.359C434.315 129.574 435 133.02 435 136.5C435 139.98 434.315 143.426 432.983 146.641C431.651 149.856 429.699 152.778 427.238 155.238C424.778 157.699 421.856 159.651 418.641 160.983C415.426 162.315 411.98 163 408.5 163" stroke="black" stroke-dasharray="4 4"/>
</g>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 431 177)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 443 177)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 455 177)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 467 177)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 431 100)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 443 100)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 455 100)" stroke="black"/>
<line y1="-0.5" x2="5" y2="-0.5" transform="matrix(4.37114e-08 -1 -1 -4.37114e-08 467 100)" stroke="black"/>
<path d="M426.788 233.607C407.946 225.612 391.851 211.967 380.573 194.431C369.295 176.895 363.351 156.271 363.503 135.213C363.655 114.155 369.896 93.6242 381.426 76.2645C392.955 58.9047 409.245 45.5096 428.201 37.8066" stroke="black"/>
<path d="M427 233.5H426" stroke="black"/>
<path d="M428 233.5H427" stroke="black"/>
<g filter="url(#filter5_i_3_2)">
<path d="M476.5 118.5C471.996 118.5 467.673 120.34 464.484 123.621C461.294 126.901 459.5 131.354 459.5 136C459.5 140.646 461.294 145.099 464.484 148.379C467.673 151.66 471.996 153.5 476.5 153.5" stroke="black"/>
</g>
<circle cx="3.5" cy="3.5" r="3" transform="matrix(-1 0 0 1 483 133)" stroke="black"/>
<line y1="-0.5" x2="26" y2="-0.5" transform="matrix(0 -1 -1 0 483 149)" stroke="black"/>
<path d="M138 37.5H139" stroke="black"/>
<path d="M139.225 38.1519C139.221 38.1187 139.099 38.1364 139.073 38.135C138.98 38.1302 138.889 38.0674 138.794 38.0674C138.755 38.0674 138.672 38.0388 138.633 38.0252C138.581 38.0065 138.52 37.9719 138.465 37.9661C138.4 37.9593 138.366 37.9109 138.312 37.8854C138.275 37.8677 138.202 37.8366 138.177 37.8056C138.161 37.7847 138.063 37.7566 138.033 37.7371C137.962 37.6922 137.879 37.6309 137.806 37.5944" stroke="black" stroke-width="0.5"/>
<path d="M139.926 37.9883C139.906 37.9888 139.887 37.9922 139.867 37.9922C139.838 37.9922 139.812 37.978 139.787 37.9622C139.682 37.8946 139.599 37.7958 139.504 37.7151C139.388 37.6172 139.275 37.5101 139.135 37.4512C139.051 37.4159 138.965 37.3877 138.879 37.3594C138.85 37.3498 138.785 37.3113 138.754 37.332" stroke="black" stroke-width="0.5"/>
<defs>
<filter id="filter0_i_3_2" x="256" y="108" width="55" height="59" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_2"/>
</filter>
<filter id="filter1_i_3_2" x="158" y="109.5" width="27.5" height="58" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_2"/>
</filter>
<filter id="filter2_i_3_2" x="131.5" y="109.5" width="27" height="58" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_2"/>
</filter>
<filter id="filter3_i_3_2" x="381.5" y="109.5" width="27.5" height="58" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_2"/>
</filter>
<filter id="filter4_i_3_2" x="408.5" y="109.5" width="27" height="58" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_2"/>
</filter>
<filter id="filter5_i_3_2" x="459" y="118" width="17.5" height="40" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_2"/>
</filter>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 11 KiB

@ -1,74 +0,0 @@
<svg width="269" height="309" viewBox="0 0 269 309" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect y="254" width="250" height="269" transform="rotate(-90 0 254)" fill="#D9D9D9"/>
<line x1="24" y1="236" x2="24" y2="26" stroke="black" stroke-width="2"/>
<line x1="248" y1="25" x2="248" y2="236" stroke="black" stroke-width="2"/>
<line x1="249" y1="237" x2="23" y2="237" stroke="black" stroke-width="2"/>
<line x1="23" y1="25.5" x2="247" y2="25.5" stroke="black"/>
<g filter="url(#filter0_i_3_4)">
<path d="M108.5 26C108.5 33.0313 111.347 39.7727 116.411 44.7417C121.476 49.7103 128.342 52.5 135.5 52.5C142.658 52.5 149.524 49.7103 154.588 44.7417C159.653 39.7727 162.5 33.0313 162.5 26" stroke="black"/>
</g>
<line x1="99.5" y1="236" x2="99.5" y2="151" stroke="black"/>
<line x1="100.5" y1="236" x2="100.5" y2="151" stroke="black"/>
<path d="M172 150.5H100" stroke="black"/>
<path d="M99.5 151V150" stroke="black"/>
<path d="M172.5 151V150" stroke="black"/>
<line x1="172.5" y1="151" x2="172.5" y2="236" stroke="black"/>
<line x1="171.5" y1="151" x2="171.5" y2="236" stroke="black"/>
<line x1="37.5" y1="236" x2="37.5" y2="170" stroke="black"/>
<line x1="233.5" y1="236" x2="233.5" y2="170" stroke="black"/>
<g filter="url(#filter1_i_3_4)">
<path d="M163 150.5C163 147.02 162.315 143.574 160.983 140.359C159.651 137.144 157.699 134.222 155.238 131.762C152.778 129.301 149.856 127.349 146.641 126.017C143.426 124.685 139.98 124 136.5 124C133.02 124 129.574 124.685 126.359 126.017C123.144 127.349 120.222 129.301 117.762 131.762C115.301 134.222 113.349 137.144 112.017 140.359C110.685 143.574 110 147.02 110 150.5L136.5 150.5L163 150.5Z" stroke="black"/>
</g>
<g filter="url(#filter2_i_3_4)">
<path d="M110 150.5C110 153.98 110.685 157.426 112.017 160.641C113.349 163.856 115.301 166.778 117.762 169.238C120.222 171.699 123.144 173.651 126.359 174.983C129.574 176.315 133.02 177 136.5 177C139.98 177 143.426 176.315 146.641 174.983C149.856 173.651 152.778 171.699 155.238 169.238C157.699 166.778 159.651 163.856 160.983 160.641C162.315 157.426 163 153.98 163 150.5" stroke="black" stroke-dasharray="4 4"/>
</g>
<line x1="177" y1="173.5" x2="172" y2="173.5" stroke="black"/>
<line x1="177" y1="185.5" x2="172" y2="185.5" stroke="black"/>
<line x1="177" y1="197.5" x2="172" y2="197.5" stroke="black"/>
<line x1="177" y1="209.5" x2="172" y2="209.5" stroke="black"/>
<line x1="100" y1="173.5" x2="95" y2="173.5" stroke="black"/>
<line x1="100" y1="185.5" x2="95" y2="185.5" stroke="black"/>
<line x1="100" y1="197.5" x2="95" y2="197.5" stroke="black"/>
<line x1="100" y1="209.5" x2="95" y2="209.5" stroke="black"/>
<path d="M233.607 168.788C225.612 149.946 211.967 133.851 194.431 122.573C176.895 111.295 156.271 105.351 135.213 105.503C114.155 105.655 93.6242 111.896 76.2645 123.426C58.9047 134.955 45.5096 151.245 37.8066 170.201" stroke="black"/>
<path d="M233.5 169V168" stroke="black"/>
<path d="M233.5 170V169" stroke="black"/>
<path d="M118.5 218.5C118.5 213.996 120.34 209.673 123.621 206.484C126.901 203.294 131.354 201.5 136 201.5C140.646 201.5 145.099 203.294 148.379 206.484C151.66 209.673 153.5 213.996 153.5 218.5" stroke="black"/>
<circle cx="136.5" cy="221.5" r="3" transform="rotate(-90 136.5 221.5)" stroke="black"/>
<line x1="149" y1="225.5" x2="123" y2="225.5" stroke="black"/>
<path d="M37.5 171V170" stroke="black"/>
<path d="M38.1519 169.775C38.1187 169.779 38.1364 169.901 38.135 169.927C38.1302 170.02 38.0674 170.111 38.0674 170.206C38.0674 170.245 38.0388 170.328 38.0252 170.367C38.0065 170.419 37.9719 170.48 37.9661 170.535C37.9593 170.6 37.9109 170.634 37.8854 170.688C37.8677 170.725 37.8366 170.798 37.8056 170.823C37.7847 170.839 37.7566 170.937 37.7371 170.967C37.6922 171.038 37.6309 171.121 37.5944 171.194" stroke="black" stroke-width="0.5"/>
<path d="M37.9883 169.074C37.9888 169.094 37.9922 169.113 37.9922 169.133C37.9922 169.162 37.978 169.188 37.9622 169.213C37.8946 169.318 37.7958 169.401 37.7151 169.496C37.6172 169.612 37.5101 169.725 37.4512 169.865C37.4159 169.949 37.3877 170.035 37.3594 170.121C37.3498 170.15 37.3113 170.215 37.332 170.246" stroke="black" stroke-width="0.5"/>
<defs>
<filter id="filter0_i_3_4" x="108" y="26" width="55" height="31" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_4"/>
</filter>
<filter id="filter1_i_3_4" x="109.5" y="123.5" width="54" height="31.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_4"/>
</filter>
<filter id="filter2_i_3_4" x="109.5" y="150.5" width="54" height="31" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="4"/>
<feGaussianBlur stdDeviation="2"/>
<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="shape" result="effect1_innerShadow_3_4"/>
</filter>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 6.0 KiB

File diff suppressed because one or more lines are too long

@ -1,129 +0,0 @@
<?php
require "../vendor/autoload.php";
require "../config.php";
require "../sql/database.php";
require "../src/App/react-display.php";
require "../src/index-utils.php";
use IQBall\App\App;
use IQBall\App\Controller\AuthController;
use IQBall\App\Controller\EditorController;
use IQBall\App\Controller\TeamController;
use IQBall\App\Controller\UserController;
use IQBall\App\Controller\VisualizerController;
use IQBall\App\Session\MutableSessionHandle;
use IQBall\App\Session\PhpSessionHandle;
use IQBall\App\Session\SessionHandle;
use IQBall\App\ViewHttpResponse;
use IQBall\Core\Action;
use IQBall\Core\Connection;
use IQBall\Core\Data\CourtType;
use IQBall\Core\Gateway\AccountGateway;
use IQBall\Core\Gateway\MemberGateway;
use IQBall\Core\Gateway\TacticInfoGateway;
use IQBall\Core\Gateway\TeamGateway;
use IQBall\Core\Http\HttpCodes;
use IQBall\Core\Http\HttpResponse;
use IQBall\Core\Model\AuthModel;
use IQBall\Core\Model\TacticModel;
use IQBall\Core\Model\TeamModel;
use IQBall\Core\Validation\ValidationFail;
use Twig\Environment;
use Twig\Loader\FilesystemLoader;
use Twig\TwigFunction;
function getConnection(): Connection {
return new Connection(get_database());
}
function getUserController(): UserController {
return new UserController(new TacticModel(new TacticInfoGateway(getConnection())));
}
function getVisualizerController(): VisualizerController {
return new VisualizerController(new TacticModel(new TacticInfoGateway(getConnection())));
}
function getEditorController(): EditorController {
return new EditorController(new TacticModel(new TacticInfoGateway(getConnection())));
}
function getTeamController(): TeamController {
$con = getConnection();
return new TeamController(new TeamModel(new TeamGateway($con), new MemberGateway($con), new AccountGateway($con)));
}
function getAuthController(): AuthController {
return new AuthController(new AuthModel(new AccountGateway(getConnection())));
}
function getTwig(): Environment {
global $basePath;
$fl = new FilesystemLoader("../src/App/Views");
$twig = new Environment($fl);
$twig->addFunction(new TwigFunction('path', fn(string $str) => "$basePath$str"));
return $twig;
}
function getRoutes(): AltoRouter {
global $basePath;
$ar = new AltoRouter();
$ar->setBasePath($basePath);
//authentication
$ar->map("GET", "/login", Action::noAuth(fn() => getAuthController()->displayLogin()));
$ar->map("GET", "/register", Action::noAuth(fn() => getAuthController()->displayRegister()));
$ar->map("POST", "/login", Action::noAuth(fn(SessionHandle $s) => getAuthController()->login($_POST, $s)));
$ar->map("POST", "/register", Action::noAuth(fn(SessionHandle $s) => getAuthController()->register($_POST, $s)));
//user-related
$ar->map("GET", "/", Action::auth(fn(SessionHandle $s) => getUserController()->home($s)));
$ar->map("GET", "/home", Action::auth(fn(SessionHandle $s) => getUserController()->home($s)));
$ar->map("GET", "/settings", Action::auth(fn(SessionHandle $s) => getUserController()->settings($s)));
$ar->map("GET", "/disconnect", Action::auth(fn(MutableSessionHandle $s) => getUserController()->disconnect($s)));
//tactic-related
$ar->map("GET", "/tactic/[i:id]/view", Action::auth(fn(int $id, SessionHandle $s) => getVisualizerController()->openVisualizer($id, $s)));
$ar->map("GET", "/tactic/[i:id]/edit", Action::auth(fn(int $id, SessionHandle $s) => getEditorController()->openEditor($id, $s)));
// don't require an authentication to run this action.
// If the user is not connected, the tactic will never save.
$ar->map("GET", "/tactic/new", Action::noAuth(fn() => getEditorController()->createNew()));
$ar->map("GET", "/tactic/new/plain", Action::noAuth(fn(SessionHandle $s) => getEditorController()->createNewOfKind(CourtType::plain(), $s)));
$ar->map("GET", "/tactic/new/half", Action::noAuth(fn(SessionHandle $s) => getEditorController()->createNewOfKind(CourtType::half(), $s)));
//team-related
$ar->map("GET", "/team/new", Action::auth(fn(SessionHandle $s) => getTeamController()->displayCreateTeam($s)));
$ar->map("POST", "/team/new", Action::auth(fn(SessionHandle $s) => getTeamController()->submitTeam($_POST, $s)));
$ar->map("GET", "/team/search", Action::auth(fn(SessionHandle $s) => getTeamController()->displayListTeamByName($s)));
$ar->map("POST", "/team/search", Action::auth(fn(SessionHandle $s) => getTeamController()->listTeamByName($_POST, $s)));
$ar->map("GET", "/team/[i:id]", Action::auth(fn(int $id, SessionHandle $s) => getTeamController()->displayTeam($id, $s)));
$ar->map("GET", "/team/members/add", Action::auth(fn(SessionHandle $s) => getTeamController()->displayAddMember($s)));
$ar->map("POST", "/team/members/add", Action::auth(fn(SessionHandle $s) => getTeamController()->addMember($_POST, $s)));
$ar->map("GET", "/team/members/remove", Action::auth(fn(SessionHandle $s) => getTeamController()->displayDeleteMember($s)));
$ar->map("POST", "/team/members/remove", Action::auth(fn(SessionHandle $s) => getTeamController()->deleteMember($_POST, $s)));
return $ar;
}
function runMatch($match, MutableSessionHandle $session): HttpResponse {
global $basePath;
if (!$match) {
return ViewHttpResponse::twig("error.html.twig", [
'failures' => [ValidationFail::notFound("Could not find page {$_SERVER['REQUEST_URI']}.")],
], HttpCodes::NOT_FOUND);
}
return App::runAction($basePath . '/login', $match['target'], $match['params'], $session);
}
//this is a global variable
$basePath = get_public_path(__DIR__);
App::render(runMatch(getRoutes()->match(), PhpSessionHandle::init()), fn() => getTwig());

File diff suppressed because one or more lines are too long

@ -1,278 +0,0 @@
{
"Constants.ts": {
"file": "front/Constants.ts-0288c91b.js",
"isEntry": true,
"src": "Constants.ts"
},
"Fetcher.ts": {
"file": "front/Fetcher.ts-06285d09.js",
"imports": [
"Constants.ts"
],
"isEntry": true,
"src": "Fetcher.ts"
},
"ViewRenderer.tsx": {
"file": "front/ViewRenderer.tsx-10ef55f2.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"_index-ca121481.js"
],
"isEntry": true,
"src": "ViewRenderer.tsx"
},
"_cjs-ff7eb0e1.js": {
"file": "cjs-ff7eb0e1.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"_index-ca121481.js"
]
},
"_full_court-1739e2e0.js": {
"assets": [
"full_court-939d8e82.svg"
],
"file": "full_court-1739e2e0.js"
},
"_index-ca121481.js": {
"file": "index-ca121481.js",
"imports": [
"_jsx-runtime-2e2d9038.js"
]
},
"_jsx-runtime-2e2d9038.js": {
"file": "jsx-runtime-2e2d9038.js"
},
"assets/court/full_court.svg": {
"file": "full_court-939d8e82.svg",
"src": "assets/court/full_court.svg"
},
"assets/court/half_court.svg": {
"file": "half_court-eb16117a.svg",
"src": "assets/court/half_court.svg"
},
"assets/icon/arrow.svg": {
"file": "arrow-73d7c199.svg",
"src": "assets/icon/arrow.svg"
},
"components/Rack.tsx": {
"file": "front/components/Rack.tsx-02c40791.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"_cjs-ff7eb0e1.js",
"_index-ca121481.js"
],
"isEntry": true,
"src": "components/Rack.tsx"
},
"components/TitleInput.tsx": {
"file": "front/components/TitleInput.tsx-b871e858.js",
"imports": [
"_jsx-runtime-2e2d9038.js"
],
"isEntry": true,
"src": "components/TitleInput.tsx"
},
"components/actions/ArrowAction.tsx": {
"assets": [
"arrow-73d7c199.svg"
],
"file": "front/components/actions/ArrowAction.tsx-b082b6c9.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"_cjs-ff7eb0e1.js",
"_index-ca121481.js"
],
"isEntry": true,
"src": "components/actions/ArrowAction.tsx"
},
"components/actions/BallAction.tsx": {
"file": "front/components/actions/BallAction.tsx-c8825b1d.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"components/editor/BallPiece.tsx",
"_cjs-ff7eb0e1.js",
"_index-ca121481.js"
],
"isEntry": true,
"src": "components/actions/BallAction.tsx"
},
"components/arrows/BendableArrow.tsx": {
"file": "front/components/arrows/BendableArrow.tsx-f8a85d9b.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"components/arrows/Pos.ts",
"_cjs-ff7eb0e1.js",
"_index-ca121481.js"
],
"isEntry": true,
"src": "components/arrows/BendableArrow.tsx"
},
"components/arrows/Box.ts": {
"file": "front/components/arrows/Box.ts-eca59774.js",
"isEntry": true,
"src": "components/arrows/Box.ts"
},
"components/arrows/Pos.ts": {
"file": "front/components/arrows/Pos.ts-9fe07952.js",
"isEntry": true,
"src": "components/arrows/Pos.ts"
},
"components/editor/BallPiece.tsx": {
"file": "front/components/editor/BallPiece.tsx-1b2eb023.js",
"imports": [
"_jsx-runtime-2e2d9038.js"
],
"isEntry": true,
"src": "components/editor/BallPiece.tsx"
},
"components/editor/BasketCourt.tsx": {
"file": "front/components/editor/BasketCourt.tsx-f01fc52b.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"components/editor/CourtBall.tsx",
"components/editor/CourtPlayer.tsx",
"tactic/Action.ts",
"components/actions/ArrowAction.tsx",
"components/arrows/Pos.ts",
"components/actions/BallAction.tsx",
"components/arrows/Box.ts",
"views/editor/CourtAction.tsx",
"_cjs-ff7eb0e1.js",
"_index-ca121481.js",
"components/editor/BallPiece.tsx",
"components/editor/PlayerPiece.tsx",
"components/arrows/BendableArrow.tsx"
],
"isEntry": true,
"src": "components/editor/BasketCourt.tsx"
},
"components/editor/CourtBall.tsx": {
"file": "front/components/editor/CourtBall.tsx-df87788c.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"_cjs-ff7eb0e1.js",
"components/editor/BallPiece.tsx",
"_index-ca121481.js"
],
"isEntry": true,
"src": "components/editor/CourtBall.tsx"
},
"components/editor/CourtPlayer.tsx": {
"file": "front/components/editor/CourtPlayer.tsx-3da10617.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"components/editor/PlayerPiece.tsx",
"_cjs-ff7eb0e1.js",
"components/arrows/Pos.ts",
"_index-ca121481.js"
],
"isEntry": true,
"src": "components/editor/CourtPlayer.tsx"
},
"components/editor/PlayerPiece.tsx": {
"file": "front/components/editor/PlayerPiece.tsx-964e2db3.js",
"imports": [
"_jsx-runtime-2e2d9038.js"
],
"isEntry": true,
"src": "components/editor/PlayerPiece.tsx"
},
"components/editor/SavingState.tsx": {
"file": "front/components/editor/SavingState.tsx-72e513fc.js",
"imports": [
"_jsx-runtime-2e2d9038.js"
],
"isEntry": true,
"src": "components/editor/SavingState.tsx"
},
"tactic/Action.ts": {
"file": "front/tactic/Action.ts-d727cf33.js",
"isEntry": true,
"src": "tactic/Action.ts"
},
"tactic/CourtObjects.ts": {
"file": "front/tactic/CourtObjects.ts-4ed993c7.js",
"isEntry": true,
"src": "tactic/CourtObjects.ts"
},
"tactic/Player.ts": {
"file": "front/tactic/Player.ts-4ed993c7.js",
"isEntry": true,
"src": "tactic/Player.ts"
},
"tactic/Tactic.ts": {
"file": "front/tactic/Tactic.ts-4ed993c7.js",
"isEntry": true,
"src": "tactic/Tactic.ts"
},
"tactic/Team.ts": {
"file": "front/tactic/Team.ts-1737253d.js",
"isEntry": true,
"src": "tactic/Team.ts"
},
"views/Editor.tsx": {
"file": "front/views/Editor.tsx-951e52fa.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"components/TitleInput.tsx",
"components/editor/BallPiece.tsx",
"components/Rack.tsx",
"components/editor/PlayerPiece.tsx",
"Fetcher.ts",
"tactic/Team.ts",
"components/editor/SavingState.tsx",
"views/editor/CourtAction.tsx",
"components/editor/BasketCourt.tsx",
"components/arrows/Pos.ts",
"tactic/Action.ts",
"_cjs-ff7eb0e1.js",
"_index-ca121481.js",
"Constants.ts",
"components/arrows/BendableArrow.tsx",
"components/actions/ArrowAction.tsx",
"components/editor/CourtBall.tsx",
"components/editor/CourtPlayer.tsx",
"components/actions/BallAction.tsx",
"components/arrows/Box.ts"
],
"isEntry": true,
"src": "views/Editor.tsx"
},
"views/NewTacticPanel.tsx": {
"assets": [
"half_court-eb16117a.svg"
],
"file": "front/views/NewTacticPanel.tsx-64bf0fca.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"_full_court-1739e2e0.js",
"Constants.ts"
],
"isEntry": true,
"src": "views/NewTacticPanel.tsx"
},
"views/Visualizer.tsx": {
"file": "front/views/Visualizer.tsx-a2e9b703.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"_full_court-1739e2e0.js"
],
"isEntry": true,
"src": "views/Visualizer.tsx"
},
"views/editor/CourtAction.tsx": {
"file": "front/views/editor/CourtAction.tsx-15785ac7.js",
"imports": [
"_jsx-runtime-2e2d9038.js",
"tactic/Action.ts",
"components/arrows/BendableArrow.tsx",
"components/actions/ArrowAction.tsx",
"components/arrows/Pos.ts",
"_cjs-ff7eb0e1.js",
"_index-ca121481.js"
],
"isEntry": true,
"src": "views/editor/CourtAction.tsx"
}
}

@ -1,23 +0,0 @@
.arrow-action {
height: 50%;
}
.arrow-action-icon {
user-select: none;
-moz-user-select: none;
max-width: 17px;
max-height: 17px;
}
.arrow-head-pick {
position: absolute;
cursor: grab;
top: 0;
left: 0;
min-width: 17px;
min-height: 17px;
}
.arrow-head-pick:active {
cursor: crosshair;
}

@ -1,14 +0,0 @@
.remove-action {
height: 100%;
}
.remove-action * {
stroke: red;
fill: white;
}
.remove-action:hover * {
fill: #f1dbdb;
stroke: #ff331a;
cursor: pointer;
}

@ -1,11 +0,0 @@
.ball * {
fill: #c5520d;
}
.ball-div,
.ball {
pointer-events: all;
width: 20px;
height: 20px;
cursor: pointer;
}

@ -1,22 +0,0 @@
.arrow-point {
cursor: pointer;
border-radius: 100px;
background-color: black;
outline: none;
}
.arrow-point:hover {
background-color: var(--selection-color);
}
.arrow-path {
pointer-events: stroke;
cursor: pointer;
outline: none;
}
.arrow-path:hover,
.arrow-path:active {
stroke: var(--selection-color);
}

@ -1,13 +0,0 @@
:root {
--main-color: #ffffff;
--second-color: #ccde54;
--background-color: #d2cdd3;
--selected-team-primarycolor: #ffffff;
--selected-team-secondarycolor: #000000;
--selection-color: #3f7fc4;
--arrows-color: #676767;
}

@ -1,144 +0,0 @@
@import "theme/default.css";
#main-div {
display: flex;
height: 100%;
width: 100%;
background-color: var(--background-color);
flex-direction: column;
overflow: hidden;
}
#topbar-left {
width: 100%;
display: flex;
}
#topbar-right {
width: 100%;
display: flex;
flex-direction: row-reverse;
}
#topbar-div {
display: flex;
background-color: var(--main-color);
margin-bottom: 3px;
justify-content: space-between;
align-items: stretch;
}
#racks {
display: flex;
justify-content: space-between;
align-items: center;
height: 25px;
}
.title-input {
width: 25ch;
align-self: center;
}
#edit-div {
height: 100%;
}
#allies-rack,
#opponent-rack {
width: 125px;
min-width: 125px;
display: flex;
flex-direction: row;
align-items: flex-end;
}
#allies-rack {
justify-content: flex-start;
}
#opponent-rack {
justify-content: flex-end;
}
#opponent-rack .player-piece {
margin-right: 5px;
}
#allies-rack .player-piece {
margin-left: 5px;
}
.player-piece.opponents {
background-color: var(--player-opponents-color);
}
.player-piece.allies {
background-color: var(--player-allies-color);
}
#court-div {
background-color: var(--background-color);
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
align-content: center;
}
#court-image-div {
position: relative;
background-color: white;
height: 100%;
width: 100%;
}
.court-container {
display: flex;
align-content: center;
align-items: center;
justify-content: center;
height: 75%;
}
#court-image {
height: 100%;
width: 100%;
user-select: none;
-webkit-user-drag: none;
}
#court-image * {
stroke: var(--selected-team-secondarycolor);
}
.react-draggable {
z-index: 2;
}
.save-state {
display: flex;
align-items: center;
margin-left: 20%;
font-family: monospace;
}
.save-state-error {
color: red;
}
.save-state-ok {
color: green;
}
.save-state-saving,
.save-state-guest {
color: gray;
}

@ -1,122 +0,0 @@
#panel-root {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
align-content: center;
}
#panel-top {
font-family: var(--text-main-font);
}
#panel-choices {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
align-content: center;
background-color: var(--editor-court-selection-background);
}
#panel-buttons {
width: 75%;
height: 20%;
display: flex;
justify-content: space-evenly;
align-items: stretch;
align-content: center;
}
.court-kind-button {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
align-content: center;
cursor: pointer;
transition: scale 0.5s ease-out;
width: auto;
}
.court-kind-button-bottom,
.court-kind-button-top {
border: solid;
border-color: var(--border-color);
}
.court-kind-button-bottom {
display: flex;
justify-content: center;
align-items: center;
align-content: center;
height: 25%;
width: 100%;
background-color: var(--editor-court-selection-buttons);
border-radius: 0 0 20px 20px;
border-width: 3px;
}
.court-kind-button-top {
height: 30%;
background-color: var(--main-color);
border-radius: 20px 20px 0 0;
border-width: 3px 3px 0 3px;
}
.court-kind-button:hover {
scale: 1.1;
}
.court-kind-button-top,
.court-kind-button-image-div {
overflow: hidden;
display: flex;
height: 100%;
width: 100%;
justify-content: center;
align-items: center;
align-content: center;
}
.court-kind-button-image {
height: 100%;
width: 150px;
user-select: none;
-webkit-user-drag: none;
}
.court-kind-button-image-div {
height: 100%;
padding: 0 10px 0 10px;
background-color: var(--second-color);
}
.court-kind-button-name,
.court-kind-button-details {
user-select: none;
font-family: var(--text-main-font);
}
.court-kind-button-details {
position: absolute;
z-index: -1;
top: 0;
transition: top 1s;
}
.court-kind-button:hover .court-kind-button-details {
top: -20px;
}

@ -1,68 +0,0 @@
.player {
pointer-events: none;
}
.player-content {
display: flex;
flex-direction: column;
align-content: center;
align-items: center;
outline: none;
}
.player-piece {
font-family: monospace;
pointer-events: all;
background-color: var(--selected-team-primarycolor);
color: var(--selected-team-secondarycolor);
border-radius: 100px;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
user-select: none;
}
.player-piece-has-ball {
border-width: 2px;
border-style: solid;
border-color: var(--player-piece-ball-border-color);
}
.player-actions {
display: flex;
position: absolute;
flex-direction: row;
justify-content: space-evenly;
align-content: space-between;
align-items: center;
visibility: hidden;
transform: translateY(-25px);
height: 20px;
width: 150%;
gap: 25%;
}
.player:focus-within .player-actions {
visibility: visible;
pointer-events: all;
}
.player:focus-within .player-piece {
color: var(--selection-color);
}
.player:focus-within {
z-index: 1000;
}

@ -1,24 +0,0 @@
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap");
:root {
--main-color: #ffffff;
--second-color: #e8e8e8;
--background-color: #d2cdd3;
--selected-team-primarycolor: #ffffff;
--selected-team-secondarycolor: #000000;
--player-allies-color: #64e4f5;
--player-opponents-color: #f59264;
--buttons-shadow-color: #a8a8a8;
--selection-color: #3f7fc4;
--border-color: #ffffff;
--editor-court-selection-background: #5f8fee;
--editor-court-selection-buttons: #acc4f3;
--player-piece-ball-border-color: #000000;
--text-main-font: "Roboto", sans-serif;
}

@ -1,16 +0,0 @@
.title-input {
background: transparent;
border-top: none;
border-right: none;
border-left: none;
text-align: center;
border-bottom-width: 2px;
border-bottom-color: transparent;
}
.title-input:focus {
outline: none;
border-bottom-color: blueviolet;
}

@ -1,30 +0,0 @@
#main {
height: 100vh;
width: 100%;
display: flex;
flex-direction: column;
}
#topbar {
display: flex;
background-color: var(--main-color);
justify-content: center;
align-items: center;
}
h1 {
text-align: center;
margin-top: 0;
}
#court-container {
flex: 1;
display: flex;
justify-content: center;
background-color: var(--main-color);
}
#court {
max-width: 80%;
max-height: 80%;
}

@ -4,6 +4,9 @@ DROP TABLE IF EXISTS Tactic;
DROP TABLE IF EXISTS Team;
DROP TABLE IF EXISTS User;
DROP TABLE IF EXISTS Member;
DROP TABLE IF EXISTS TacticSharedTeam;
DROP TABLE IF EXISTS TacticSharedAccount;
CREATE TABLE Account
(
id integer PRIMARY KEY AUTOINCREMENT,

@ -6,6 +6,7 @@ use IQBall\App\Session\SessionHandle;
use IQBall\App\ViewHttpResponse;
use IQBall\Core\Model\TacticModel;
use IQBall\Core\Model\TeamModel;
use \IQBall\Core\Http\HttpResponse;
class TacticController
{
@ -18,27 +19,24 @@ class TacticController
}
public function displayTactic(SessionHandle $session): ViewHttpResponse {
$results = $this->tactics->getAll($session->getAccount()->getId());
$results = $this->tactics->getAll($session->getAccount()->getUser()->getId());
return ViewHttpResponse::twig("display_tactic.html.twig", ['tactics' => $results]);
}
public function displayTeam(int $tacticId, SessionHandle $session): ViewHttpResponse {
$results = $this->teams->getAll($session->getAccount()->getId());
$results = $this->teams->getAll($session->getAccount()->getUser()->getId());
return ViewHttpResponse::twig("display_user_teams.html.twig", ['teams' => $results, 'tactic' => $tacticId]);
}
public function displayShareConfirmation(int $tacticId, int $teamId, SessionHandle $session) : ViewHttpResponse {
$team = $this->teams->getTeam($teamId);
$tactic = $this->tactics->get($tacticId);
return ViewHttpResponse::twig("display_share_confirmation.html.twig", ['team' => $teamId, 'tactic' => $tacticId]);
}
public function shareTacticToTeam(array $confirmation, int $tacticId, int $teamId, SessionHandle $session) : \IQBall\Core\Http\HttpResponse
public function shareTacticToTeam(array $confirmation, int $tacticId, int $teamId, SessionHandle $session) : HttpResponse
{
if($confirmation['confirmation'] == "no") {
return ViewHttpResponse::redirect("/");
}
if($confirmation['confirmation'] == "yes") {
$this->teams->shareTacticToTeam($teamId, $tacticId);
}
return ViewHttpResponse::redirect("/");
}
}

@ -38,6 +38,16 @@ class UserController {
if ($this->teams != null) {
$teams = $this->teams->getAll($user->getId());
$allTacticsSharedTeam = $this->tactics->getAllTacticSharedTeam($user->getId());
if(isset($allTacticsSharedTeam)) {
foreach ($allTacticsSharedTeam as $tactic) {
if(!in_array($tactic, $allTactics)) {
array_push($allTactics, $tactic);
}
}
}
var_dump($allTactics);
} else {
$teams = [];
}

@ -43,9 +43,9 @@ class TacticInfoGateway {
* Return the nb last tactics created
*
* @param integer $nb
* @return array<array<string,mixed>>
* @return TacticInfo[] | null
*/
public function getLast(int $nb, int $ownerId): ?array {
public function getLastOwnedBy(int $nb, int $ownerId): ?array {
$res = $this->con->fetch(
"SELECT *
FROM Tactic
@ -59,15 +59,15 @@ class TacticInfoGateway {
if (count($res) == 0) {
return [];
}
return $res;
return array_map(fn(array $row) => $this->rowToTacticInfo($row), $res);
}
/**
* Get all the tactics of the owner
*
* @return array<array<string,mixed>>
* @return TacticInfo[] | null
*/
public function getAll(int $ownerId): ?array {
public function getAllOwnedBy(int $ownerId): ?array {
$res = $this->con->fetch(
"SELECT *
FROM Tactic
@ -80,13 +80,18 @@ class TacticInfoGateway {
if (count($res) == 0) {
return [];
}
return $res;
return array_map(fn(array $row) => $this->rowToTacticInfo($row), $res);
}
/**
* @param int $ownerId
* @return TacticInfo[]|null
*/
public function getAllTacticSharedTeam(int $ownerId): ?array {
$res = $this->con->fetch(
"SELECT * FROM TacticSharedTeam
WHERE id_team = :ownerId",
"SELECT t.* FROM Tactic t, TacticSharedTeam ts, Member m
WHERE ts.id_team = m.id_team AND ts.id_tactic = t.id
AND m.id_user = :ownerId",
[
":ownerId" => [$ownerId, PDO::PARAM_INT]
]
@ -94,12 +99,16 @@ class TacticInfoGateway {
if (count($res) == 0) {
return [];
}
return $res;
return array_map(fn(array $row) => $this->rowToTacticInfo($row), $res);
}
/**
* @param int $ownerId
* @return TacticInfo[]|null
*/
public function getAllTacticSharedAccount(int $ownerId): ?array {
$res = $this->con->fetch(
"SELECT * FROM TacticSharedTeam
"SELECT * FROM TacticSharedAccount
WHERE id_account = :ownerId",
[
":ownerId" => [$ownerId, PDO::PARAM_INT]
@ -108,7 +117,7 @@ class TacticInfoGateway {
if (count($res) == 0) {
return [];
}
return $res;
return array_map(fn(array $row) => $this->rowToTacticInfo($row), $res);
}
/**
@ -158,4 +167,9 @@ class TacticInfoGateway {
]);
return $stmnt->rowCount() == 1;
}
private function rowToTacticInfo(array $row) : TacticInfo {
$type = CourtType::fromName($row['court_type']);
return new TacticInfo($row['id'], $row["name"], strtotime($row["creation_date"]), $row["owner"], $type, $row['content']);
}
}

@ -37,8 +37,8 @@ class TeamGateway {
$this->con->exec(
"INSERT INTO TacticSharedTeam(id_team, id_tactic) VALUES(:teamId, :tacticId)",
[
":id_team" => [$teamId, PDO::PARAM_INT],
":id_tactic" => [$tacticId, PDO::PARAM_INT],
":teamId" => [$teamId, PDO::PARAM_INT],
":tacticId" => [$tacticId, PDO::PARAM_INT],
]
);
return intval($this->con->lastInsertId());

@ -67,7 +67,7 @@ class TacticModel {
* @return array<array<string,mixed>>
*/
public function getLast(int $nb, int $ownerId): array {
return $this->tactics->getLast($nb, $ownerId);
return $this->tactics->getLastOwnedBy($nb, $ownerId);
}
/**
@ -77,10 +77,11 @@ class TacticModel {
* @return array<array<string,mixed>>
*/
public function getAll(int $ownerId): ?array {
return $this->tactics->getAll($ownerId);
return $this->tactics->getAllOwnedBy($ownerId);
}
public function getAllTacticSharedTeam(int $ownerId) : ?array {
public function getAllTacticSharedTeam(int $ownerId) : ?array
{
return $this->tactics->getAllTacticSharedTeam($ownerId);
}
@ -88,10 +89,6 @@ class TacticModel {
return $this->tactics->getAllTacticSharedAccount($ownerId);
}
public function shareTacticToAccount(int $accountId, int $tacticId) {
return $this->tactics->shareTacticToAccount($accountId, $tacticId);
}
/**
* Update the name of a tactic
* @param int $id the tactic identifier

Loading…
Cancel
Save