├── yts
├── .DS_Store
└── imgbin
│ ├── new.gif
│ ├── rss.gif
│ ├── pixel.gif
│ ├── star.gif
│ ├── favicon.ico
│ ├── logo_sm.gif
│ ├── star_half.gif
│ ├── box_login_bl.gif
│ ├── box_login_br.gif
│ ├── box_login_tl.gif
│ ├── box_login_tr.gif
│ └── player
│ ├── muted.png
│ ├── pause.png
│ ├── play.png
│ └── unmuted.png
├── composer.json
├── includes
├── .DS_Store
├── html
│ ├── ._footer.php
│ ├── ._header.php
│ ├── ._novideo.php
│ ├── ._noresults.php
│ ├── noquery.php
│ └── footer.php
├── config.inc.php
└── youtubei
│ ├── details.php
│ ├── initial.php
│ └── search.php
├── robots.txt
├── templates
├── browse.html.twig
├── ._index.html.twig
├── privacy.html.twig
├── footer.twig
├── base.html.twig
└── noquery.html.twig
├── vendor
├── twig
│ └── twig
│ │ ├── .gitignore
│ │ ├── .gitattributes
│ │ ├── .editorconfig
│ │ ├── src
│ │ ├── Extension
│ │ │ ├── RuntimeExtensionInterface.php
│ │ │ ├── GlobalsInterface.php
│ │ │ ├── OptimizerExtension.php
│ │ │ ├── AbstractExtension.php
│ │ │ ├── StringLoaderExtension.php
│ │ │ ├── ProfilerExtension.php
│ │ │ ├── ExtensionInterface.php
│ │ │ └── DebugExtension.php
│ │ ├── Node
│ │ │ ├── BodyNode.php
│ │ │ ├── NodeOutputInterface.php
│ │ │ ├── NodeCaptureInterface.php
│ │ │ ├── Expression
│ │ │ │ ├── Binary
│ │ │ │ │ ├── PowerBinary.php
│ │ │ │ │ ├── SpaceshipBinary.php
│ │ │ │ │ ├── AddBinary.php
│ │ │ │ │ ├── AndBinary.php
│ │ │ │ │ ├── DivBinary.php
│ │ │ │ │ ├── ModBinary.php
│ │ │ │ │ ├── MulBinary.php
│ │ │ │ │ ├── OrBinary.php
│ │ │ │ │ ├── SubBinary.php
│ │ │ │ │ ├── ConcatBinary.php
│ │ │ │ │ ├── BitwiseAndBinary.php
│ │ │ │ │ ├── BitwiseOrBinary.php
│ │ │ │ │ ├── BitwiseXorBinary.php
│ │ │ │ │ ├── FloorDivBinary.php
│ │ │ │ │ ├── InBinary.php
│ │ │ │ │ ├── RangeBinary.php
│ │ │ │ │ ├── MatchesBinary.php
│ │ │ │ │ ├── NotInBinary.php
│ │ │ │ │ ├── EqualBinary.php
│ │ │ │ │ ├── LessBinary.php
│ │ │ │ │ ├── GreaterBinary.php
│ │ │ │ │ ├── LessEqualBinary.php
│ │ │ │ │ ├── NotEqualBinary.php
│ │ │ │ │ ├── GreaterEqualBinary.php
│ │ │ │ │ ├── StartsWithBinary.php
│ │ │ │ │ ├── EndsWithBinary.php
│ │ │ │ │ └── AbstractBinary.php
│ │ │ │ ├── Unary
│ │ │ │ │ ├── NegUnary.php
│ │ │ │ │ ├── NotUnary.php
│ │ │ │ │ ├── PosUnary.php
│ │ │ │ │ └── AbstractUnary.php
│ │ │ │ ├── VariadicExpression.php
│ │ │ │ ├── AbstractExpression.php
│ │ │ │ ├── AssignNameExpression.php
│ │ │ │ ├── ConstantExpression.php
│ │ │ │ ├── TempNameExpression.php
│ │ │ │ ├── Test
│ │ │ │ │ ├── NullTest.php
│ │ │ │ │ ├── OddTest.php
│ │ │ │ │ ├── EvenTest.php
│ │ │ │ │ ├── SameasTest.php
│ │ │ │ │ ├── DivisiblebyTest.php
│ │ │ │ │ └── ConstantTest.php
│ │ │ │ ├── InlinePrint.php
│ │ │ │ ├── ConditionalExpression.php
│ │ │ │ ├── TestExpression.php
│ │ │ │ ├── ParentExpression.php
│ │ │ │ ├── FilterExpression.php
│ │ │ │ ├── FunctionExpression.php
│ │ │ │ ├── ArrowFunctionExpression.php
│ │ │ │ ├── Filter
│ │ │ │ │ └── DefaultFilter.php
│ │ │ │ ├── MethodCallExpression.php
│ │ │ │ └── NullCoalesceExpression.php
│ │ │ ├── CheckSecurityCallNode.php
│ │ │ ├── FlushNode.php
│ │ │ ├── TextNode.php
│ │ │ ├── DoNode.php
│ │ │ ├── BlockReferenceNode.php
│ │ │ ├── AutoEscapeNode.php
│ │ │ ├── PrintNode.php
│ │ │ ├── BlockNode.php
│ │ │ ├── CheckToStringNode.php
│ │ │ ├── SandboxNode.php
│ │ │ ├── EmbedNode.php
│ │ │ ├── ForLoopNode.php
│ │ │ ├── DeprecatedNode.php
│ │ │ ├── IfNode.php
│ │ │ ├── ImportNode.php
│ │ │ └── WithNode.php
│ │ ├── Error
│ │ │ ├── LoaderError.php
│ │ │ ├── RuntimeError.php
│ │ │ └── SyntaxError.php
│ │ ├── Sandbox
│ │ │ ├── SecurityError.php
│ │ │ ├── SecurityNotAllowedTagError.php
│ │ │ ├── SecurityNotAllowedFilterError.php
│ │ │ ├── SecurityNotAllowedFunctionError.php
│ │ │ ├── SecurityNotAllowedMethodError.php
│ │ │ ├── SecurityNotAllowedPropertyError.php
│ │ │ └── SecurityPolicyInterface.php
│ │ ├── TokenParser
│ │ │ ├── AbstractTokenParser.php
│ │ │ ├── FlushTokenParser.php
│ │ │ ├── DoTokenParser.php
│ │ │ ├── TokenParserInterface.php
│ │ │ ├── DeprecatedTokenParser.php
│ │ │ ├── ImportTokenParser.php
│ │ │ ├── WithTokenParser.php
│ │ │ ├── ExtendsTokenParser.php
│ │ │ ├── ApplyTokenParser.php
│ │ │ ├── AutoEscapeTokenParser.php
│ │ │ ├── IncludeTokenParser.php
│ │ │ ├── FromTokenParser.php
│ │ │ ├── SandboxTokenParser.php
│ │ │ ├── MacroTokenParser.php
│ │ │ ├── UseTokenParser.php
│ │ │ ├── SetTokenParser.php
│ │ │ ├── EmbedTokenParser.php
│ │ │ └── ForTokenParser.php
│ │ ├── Util
│ │ │ ├── TemplateDirIterator.php
│ │ │ └── DeprecationCollector.php
│ │ ├── RuntimeLoader
│ │ │ ├── RuntimeLoaderInterface.php
│ │ │ ├── FactoryRuntimeLoader.php
│ │ │ └── ContainerRuntimeLoader.php
│ │ ├── Cache
│ │ │ ├── NullCache.php
│ │ │ └── CacheInterface.php
│ │ ├── Profiler
│ │ │ ├── Node
│ │ │ │ ├── LeaveProfileNode.php
│ │ │ │ └── EnterProfileNode.php
│ │ │ ├── Dumper
│ │ │ │ ├── TextDumper.php
│ │ │ │ ├── HtmlDumper.php
│ │ │ │ ├── BaseDumper.php
│ │ │ │ └── BlackfireDumper.php
│ │ │ └── NodeVisitor
│ │ │ │ └── ProfilerNodeVisitor.php
│ │ ├── Markup.php
│ │ ├── NodeVisitor
│ │ │ ├── NodeVisitorInterface.php
│ │ │ ├── AbstractNodeVisitor.php
│ │ │ └── MacroAutoImportNodeVisitor.php
│ │ ├── Source.php
│ │ ├── Loader
│ │ │ ├── LoaderInterface.php
│ │ │ └── ArrayLoader.php
│ │ ├── FileExtensionEscapingStrategy.php
│ │ ├── Test
│ │ │ └── NodeTestCase.php
│ │ └── NodeTraverser.php
│ │ ├── README.rst
│ │ ├── .php-cs-fixer.dist.php
│ │ ├── composer.json
│ │ ├── LICENSE
│ │ └── .github
│ │ └── workflows
│ │ └── documentation.yml
├── autoload.php
├── composer
│ ├── autoload_namespaces.php
│ ├── autoload_classmap.php
│ ├── autoload_files.php
│ ├── autoload_psr4.php
│ ├── platform_check.php
│ ├── LICENSE
│ ├── autoload_static.php
│ └── installed.php
└── symfony
│ ├── polyfill-ctype
│ ├── README.md
│ ├── LICENSE
│ ├── composer.json
│ ├── bootstrap.php
│ └── bootstrap80.php
│ └── polyfill-mbstring
│ ├── README.md
│ ├── LICENSE
│ └── composer.json
├── humans.txt
├── browse.php
├── privacy.php
├── .gitignore
├── styling.txt
├── readme.md
└── profile.php
/yts/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/.DS_Store
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "require": {
3 | "twig/twig": "^3.4"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/includes/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/includes/.DS_Store
--------------------------------------------------------------------------------
/robots.txt:
--------------------------------------------------------------------------------
1 | # spider man mad when i spray water on his hands
2 | User-agent: *
3 | Allow: *
--------------------------------------------------------------------------------
/yts/imgbin/new.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/new.gif
--------------------------------------------------------------------------------
/yts/imgbin/rss.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/rss.gif
--------------------------------------------------------------------------------
/yts/imgbin/pixel.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/pixel.gif
--------------------------------------------------------------------------------
/yts/imgbin/star.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/star.gif
--------------------------------------------------------------------------------
/templates/browse.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "base.html.twig" %}
2 | {% block pageContent %}{% endblock %}
3 |
--------------------------------------------------------------------------------
/vendor/twig/twig/.gitignore:
--------------------------------------------------------------------------------
1 | /composer.lock
2 | /phpunit.xml
3 | /vendor
4 | .phpunit.result.cache
5 |
--------------------------------------------------------------------------------
/yts/imgbin/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/favicon.ico
--------------------------------------------------------------------------------
/yts/imgbin/logo_sm.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/logo_sm.gif
--------------------------------------------------------------------------------
/yts/imgbin/star_half.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/star_half.gif
--------------------------------------------------------------------------------
/includes/html/._footer.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/includes/html/._footer.php
--------------------------------------------------------------------------------
/includes/html/._header.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/includes/html/._header.php
--------------------------------------------------------------------------------
/includes/html/._novideo.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/includes/html/._novideo.php
--------------------------------------------------------------------------------
/templates/._index.html.twig:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/templates/._index.html.twig
--------------------------------------------------------------------------------
/yts/imgbin/box_login_bl.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/box_login_bl.gif
--------------------------------------------------------------------------------
/yts/imgbin/box_login_br.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/box_login_br.gif
--------------------------------------------------------------------------------
/yts/imgbin/box_login_tl.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/box_login_tl.gif
--------------------------------------------------------------------------------
/yts/imgbin/box_login_tr.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/box_login_tr.gif
--------------------------------------------------------------------------------
/yts/imgbin/player/muted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/player/muted.png
--------------------------------------------------------------------------------
/yts/imgbin/player/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/player/pause.png
--------------------------------------------------------------------------------
/yts/imgbin/player/play.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/player/play.png
--------------------------------------------------------------------------------
/includes/html/._noresults.php:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/includes/html/._noresults.php
--------------------------------------------------------------------------------
/yts/imgbin/player/unmuted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/pixdoet/yt-2005-watch/HEAD/yts/imgbin/player/unmuted.png
--------------------------------------------------------------------------------
/vendor/twig/twig/.gitattributes:
--------------------------------------------------------------------------------
1 | /doc/** export-ignore
2 | /extra/** export-ignore
3 | /tests export-ignore
4 | /phpunit.xml.dist export-ignore
5 |
--------------------------------------------------------------------------------
/humans.txt:
--------------------------------------------------------------------------------
1 | Build by Ian Hiew and the yt-2005-watch maintainers, yall are awesome X)
2 |
3 | No career page but visit us at https://github.com/pixdoet/yt-2005-watch
--------------------------------------------------------------------------------
/vendor/autoload.php:
--------------------------------------------------------------------------------
1 | $vendorDir . '/composer/InstalledVersions.php',
10 | );
11 |
--------------------------------------------------------------------------------
/includes/html/noquery.php:
--------------------------------------------------------------------------------
1 | render(
11 | "noquery.html.twig",
12 | );
13 |
--------------------------------------------------------------------------------
/vendor/twig/twig/.editorconfig:
--------------------------------------------------------------------------------
1 | ; top-most EditorConfig file
2 | root = true
3 |
4 | ; Unix-style newlines
5 | [*]
6 | end_of_line = LF
7 |
8 | [*.php]
9 | indent_style = space
10 | indent_size = 4
11 |
12 | [*.test]
13 | indent_style = space
14 | indent_size = 4
15 |
16 | [*.rst]
17 | indent_style = space
18 | indent_size = 4
19 |
--------------------------------------------------------------------------------
/privacy.php:
--------------------------------------------------------------------------------
1 | render(
13 | "privacy.html.twig",
14 | );
15 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_files.php:
--------------------------------------------------------------------------------
1 | $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
10 | '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
11 | );
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # STOP. ADDING. .DS_STORE. FILES.
2 | *.DS_STORE
3 | *.DS_Store
4 |
5 | cookies.txt
6 | cookies_old.txt
7 |
8 | # ignore responses used for dev
9 | responses/*
10 | *_raw*
11 |
12 | # ignore top secret project
13 | dynamicpages/*
14 |
15 | *secret.php
16 |
17 | # tests for upcoming features
18 | tests/*
19 |
20 | # rehike redirect for rehike.hiew.me
21 | rehike/*
22 |
23 | # youtubei dev tools
24 | tools/*
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-ctype/README.md:
--------------------------------------------------------------------------------
1 | Symfony Polyfill / Ctype
2 | ========================
3 |
4 | This component provides `ctype_*` functions to users who run php versions without the ctype extension.
5 |
6 | More information can be found in the
7 | [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
8 |
9 | License
10 | =======
11 |
12 | This library is released under the [MIT license](LICENSE).
13 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_psr4.php:
--------------------------------------------------------------------------------
1 | array($vendorDir . '/twig/twig/src'),
10 | 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'),
11 | 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'),
12 | );
13 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-mbstring/README.md:
--------------------------------------------------------------------------------
1 | Symfony Polyfill / Mbstring
2 | ===========================
3 |
4 | This component provides a partial, native PHP implementation for the
5 | [Mbstring](https://php.net/mbstring) extension.
6 |
7 | More information can be found in the
8 | [main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
9 |
10 | License
11 | =======
12 |
13 | This library is released under the [MIT license](LICENSE).
14 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/RuntimeExtensionInterface.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | interface RuntimeExtensionInterface
18 | {
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/BodyNode.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | class BodyNode extends Node
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/NodeOutputInterface.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | interface NodeOutputInterface
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Error/LoaderError.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | class LoaderError extends Error
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/NodeCaptureInterface.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | interface NodeCaptureInterface
20 | {
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Error/RuntimeError.php:
--------------------------------------------------------------------------------
1 |
19 | */
20 | class RuntimeError extends Error
21 | {
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityError.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 | class SecurityError extends Error
22 | {
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/PowerBinary.php:
--------------------------------------------------------------------------------
1 | raw('**');
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/SpaceshipBinary.php:
--------------------------------------------------------------------------------
1 | raw('<=>');
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Unary/NegUnary.php:
--------------------------------------------------------------------------------
1 | raw('-');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Unary/NotUnary.php:
--------------------------------------------------------------------------------
1 | raw('!');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Unary/PosUnary.php:
--------------------------------------------------------------------------------
1 | raw('+');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/AddBinary.php:
--------------------------------------------------------------------------------
1 | raw('+');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/AndBinary.php:
--------------------------------------------------------------------------------
1 | raw('&&');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/DivBinary.php:
--------------------------------------------------------------------------------
1 | raw('/');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/ModBinary.php:
--------------------------------------------------------------------------------
1 | raw('%');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/MulBinary.php:
--------------------------------------------------------------------------------
1 | raw('*');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php:
--------------------------------------------------------------------------------
1 | raw('||');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/SubBinary.php:
--------------------------------------------------------------------------------
1 | raw('-');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/ConcatBinary.php:
--------------------------------------------------------------------------------
1 | raw('.');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/BitwiseAndBinary.php:
--------------------------------------------------------------------------------
1 | raw('&');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/BitwiseOrBinary.php:
--------------------------------------------------------------------------------
1 | raw('|');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/BitwiseXorBinary.php:
--------------------------------------------------------------------------------
1 | raw('^');
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/VariadicExpression.php:
--------------------------------------------------------------------------------
1 | raw('...');
21 |
22 | parent::compile($compiler);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/AbstractExpression.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | abstract class AbstractExpression extends Node
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/styling.txt:
--------------------------------------------------------------------------------
1 | No specific code guidelines, except for this:
2 | When handling long YouTubei strings, use objects with the following format(excerpt from /includes/youtubei/comments.php):
3 | $continuation = $mainResponseContext
4 | ->contents
5 | ->twoColumnWatchNextResults
6 | ->results
7 | ->results
8 | ->contents[3]
9 | ->itemSectionRenderer
10 | ->contents[0]
11 | ->continuationItemRenderer
12 | ->continuationEndpoint
13 | ->continuationCommand
14 | ->token;
15 | Where the arrow is at the beginning on the new line.
16 |
17 |
--------------------------------------------------------------------------------
/includes/html/footer.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/AssignNameExpression.php:
--------------------------------------------------------------------------------
1 | raw('$context[')
23 | ->string($this->getAttribute('name'))
24 | ->raw(']')
25 | ;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/GlobalsInterface.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | interface GlobalsInterface
23 | {
24 | public function getGlobals(): array;
25 | }
26 |
--------------------------------------------------------------------------------
/templates/privacy.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "base.html.twig" %}
2 | {% block pageContent %}
3 |
4 |
Privacy Policy
5 |
Users of the frontend is subject to the privacy policies declared in this document.
6 |
Cookies
7 |
This site does not use any cookies.
8 |
Data we collect
9 |
We do not collect any form of data from the end user that can be used for malicious purposes or used as a "fingerprint" to identify users.
10 |
Content loaded from other sites
11 |
This site loads video content from googlevideo.com. Usage of the watch page is subject to googlevideo's terms and conditions.
12 |
13 | {% endblock %}
14 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/CheckSecurityCallNode.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | class CheckSecurityCallNode extends Node
20 | {
21 | public function compile(Compiler $compiler)
22 | {
23 | $compiler
24 | ->write("\$this->sandbox = \$this->env->getExtension('\Twig\Extension\SandboxExtension');\n")
25 | ->write("\$this->checkSecurity();\n")
26 | ;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/ConstantExpression.php:
--------------------------------------------------------------------------------
1 | $value], $lineno);
22 | }
23 |
24 | public function compile(Compiler $compiler): void
25 | {
26 | $compiler->repr($this->getAttribute('value'));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/OptimizerExtension.php:
--------------------------------------------------------------------------------
1 | optimizers = $optimizers;
23 | }
24 |
25 | public function getNodeVisitors(): array
26 | {
27 | return [new OptimizerNodeVisitor($this->optimizers)];
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/AbstractTokenParser.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 | abstract class AbstractTokenParser implements TokenParserInterface
22 | {
23 | /**
24 | * @var Parser
25 | */
26 | protected $parser;
27 |
28 | public function setParser(Parser $parser): void
29 | {
30 | $this->parser = $parser;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/FloorDivBinary.php:
--------------------------------------------------------------------------------
1 | raw('(int) floor(');
21 | parent::compile($compiler);
22 | $compiler->raw(')');
23 | }
24 |
25 | public function operator(Compiler $compiler): Compiler
26 | {
27 | return $compiler->raw('/');
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/TempNameExpression.php:
--------------------------------------------------------------------------------
1 | $name], $lineno);
21 | }
22 |
23 | public function compile(Compiler $compiler): void
24 | {
25 | $compiler
26 | ->raw('$_')
27 | ->raw($this->getAttribute('name'))
28 | ->raw('_')
29 | ;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/templates/footer.twig:
--------------------------------------------------------------------------------
1 |
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/FlushNode.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 | class FlushNode extends Node
22 | {
23 | public function __construct(int $lineno, string $tag)
24 | {
25 | parent::__construct([], [], $lineno, $tag);
26 | }
27 |
28 | public function compile(Compiler $compiler): void
29 | {
30 | $compiler
31 | ->addDebugInfo($this)
32 | ->write("flush();\n")
33 | ;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Util/TemplateDirIterator.php:
--------------------------------------------------------------------------------
1 |
16 | */
17 | class TemplateDirIterator extends \IteratorIterator
18 | {
19 | /**
20 | * @return mixed
21 | */
22 | #[\ReturnTypeWillChange]
23 | public function current()
24 | {
25 | return file_get_contents(parent::current());
26 | }
27 |
28 | /**
29 | * @return mixed
30 | */
31 | #[\ReturnTypeWillChange]
32 | public function key()
33 | {
34 | return (string) parent::key();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/RuntimeLoader/RuntimeLoaderInterface.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | interface RuntimeLoaderInterface
20 | {
21 | /**
22 | * Creates the runtime implementation of a Twig element (filter/function/test).
23 | *
24 | * @return object|null The runtime instance or null if the loader does not know how to create the runtime for this class
25 | */
26 | public function load(string $class);
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/twig/twig/README.rst:
--------------------------------------------------------------------------------
1 | Twig, the flexible, fast, and secure template language for PHP
2 | ==============================================================
3 |
4 | Twig is a template language for PHP.
5 |
6 | Twig uses a syntax similar to the Django and Jinja template languages which
7 | inspired the Twig runtime environment.
8 |
9 | Sponsors
10 | --------
11 |
12 | .. raw:: html
13 |
14 |
15 |
16 |
17 |
18 | More Information
19 | ----------------
20 |
21 | Read the `documentation`_ for more information.
22 |
23 | .. _documentation: https://twig.symfony.com/documentation
24 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Test/NullTest.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | class NullTest extends TestExpression
25 | {
26 | public function compile(Compiler $compiler): void
27 | {
28 | $compiler
29 | ->raw('(null === ')
30 | ->subcompile($this->getNode('node'))
31 | ->raw(')')
32 | ;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityNotAllowedTagError.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class SecurityNotAllowedTagError extends SecurityError
20 | {
21 | private $tagName;
22 |
23 | public function __construct(string $message, string $tagName)
24 | {
25 | parent::__construct($message);
26 | $this->tagName = $tagName;
27 | }
28 |
29 | public function getTagName(): string
30 | {
31 | return $this->tagName;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/InlinePrint.php:
--------------------------------------------------------------------------------
1 | $node], [], $lineno);
25 | }
26 |
27 | public function compile(Compiler $compiler): void
28 | {
29 | $compiler
30 | ->raw('print (')
31 | ->subcompile($this->getNode('node'))
32 | ->raw(')')
33 | ;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Test/OddTest.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | class OddTest extends TestExpression
25 | {
26 | public function compile(Compiler $compiler): void
27 | {
28 | $compiler
29 | ->raw('(')
30 | ->subcompile($this->getNode('node'))
31 | ->raw(' % 2 != 0')
32 | ->raw(')')
33 | ;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/InBinary.php:
--------------------------------------------------------------------------------
1 | raw('twig_in_filter(')
22 | ->subcompile($this->getNode('left'))
23 | ->raw(', ')
24 | ->subcompile($this->getNode('right'))
25 | ->raw(')')
26 | ;
27 | }
28 |
29 | public function operator(Compiler $compiler): Compiler
30 | {
31 | return $compiler->raw('in');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/RangeBinary.php:
--------------------------------------------------------------------------------
1 | raw('range(')
22 | ->subcompile($this->getNode('left'))
23 | ->raw(', ')
24 | ->subcompile($this->getNode('right'))
25 | ->raw(')')
26 | ;
27 | }
28 |
29 | public function operator(Compiler $compiler): Compiler
30 | {
31 | return $compiler->raw('..');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Test/EvenTest.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | class EvenTest extends TestExpression
25 | {
26 | public function compile(Compiler $compiler): void
27 | {
28 | $compiler
29 | ->raw('(')
30 | ->subcompile($this->getNode('node'))
31 | ->raw(' % 2 == 0')
32 | ->raw(')')
33 | ;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/MatchesBinary.php:
--------------------------------------------------------------------------------
1 | raw('preg_match(')
22 | ->subcompile($this->getNode('right'))
23 | ->raw(', ')
24 | ->subcompile($this->getNode('left'))
25 | ->raw(')')
26 | ;
27 | }
28 |
29 | public function operator(Compiler $compiler): Compiler
30 | {
31 | return $compiler->raw('');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Cache/NullCache.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class NullCache implements CacheInterface
20 | {
21 | public function generateKey(string $name, string $className): string
22 | {
23 | return '';
24 | }
25 |
26 | public function write(string $key, string $content): void
27 | {
28 | }
29 |
30 | public function load(string $key): void
31 | {
32 | }
33 |
34 | public function getTimestamp(string $key): int
35 | {
36 | return 0;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/NotInBinary.php:
--------------------------------------------------------------------------------
1 | raw('!twig_in_filter(')
22 | ->subcompile($this->getNode('left'))
23 | ->raw(', ')
24 | ->subcompile($this->getNode('right'))
25 | ->raw(')')
26 | ;
27 | }
28 |
29 | public function operator(Compiler $compiler): Compiler
30 | {
31 | return $compiler->raw('not in');
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/.php-cs-fixer.dist.php:
--------------------------------------------------------------------------------
1 | setRules([
5 | '@Symfony' => true,
6 | '@Symfony:risky' => true,
7 | '@PHPUnit75Migration:risky' => true,
8 | 'php_unit_dedicate_assert' => ['target' => '5.6'],
9 | 'array_syntax' => ['syntax' => 'short'],
10 | 'php_unit_fqcn_annotation' => true,
11 | 'no_unreachable_default_argument_value' => false,
12 | 'braces' => ['allow_single_line_closure' => true],
13 | 'heredoc_to_nowdoc' => false,
14 | 'ordered_imports' => true,
15 | 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
16 | 'native_function_invocation' => ['include' => ['@compiler_optimized'], 'scope' => 'all'],
17 | ])
18 | ->setRiskyAllowed(true)
19 | ->setFinder((new PhpCsFixer\Finder())->in(__DIR__))
20 | ;
21 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFilterError.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class SecurityNotAllowedFilterError extends SecurityError
20 | {
21 | private $filterName;
22 |
23 | public function __construct(string $message, string $functionName)
24 | {
25 | parent::__construct($message);
26 | $this->filterName = $functionName;
27 | }
28 |
29 | public function getFilterName(): string
30 | {
31 | return $this->filterName;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityNotAllowedFunctionError.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class SecurityNotAllowedFunctionError extends SecurityError
20 | {
21 | private $functionName;
22 |
23 | public function __construct(string $message, string $functionName)
24 | {
25 | parent::__construct($message);
26 | $this->functionName = $functionName;
27 | }
28 |
29 | public function getFunctionName(): string
30 | {
31 | return $this->functionName;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/FlushTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3);
30 |
31 | return new FlushNode($token->getLine(), $this->getTag());
32 | }
33 |
34 | public function getTag(): string
35 | {
36 | return 'flush';
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/AbstractExtension.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class SameasTest extends TestExpression
23 | {
24 | public function compile(Compiler $compiler): void
25 | {
26 | $compiler
27 | ->raw('(')
28 | ->subcompile($this->getNode('node'))
29 | ->raw(' === ')
30 | ->subcompile($this->getNode('arguments')->getNode(0))
31 | ->raw(')')
32 | ;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/TextNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class TextNode extends Node implements NodeOutputInterface
23 | {
24 | public function __construct(string $data, int $lineno)
25 | {
26 | parent::__construct([], ['data' => $data], $lineno);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->addDebugInfo($this)
33 | ->write('echo ')
34 | ->string($this->getAttribute('data'))
35 | ->raw(";\n")
36 | ;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Profiler/Node/LeaveProfileNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class LeaveProfileNode extends Node
23 | {
24 | public function __construct(string $varName)
25 | {
26 | parent::__construct([], ['var_name' => $varName]);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->write("\n")
33 | ->write(sprintf("\$%s->leave(\$%s);\n\n", $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
34 | ;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/DoTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getExpressionParser()->parseExpression();
28 |
29 | $this->parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3);
30 |
31 | return new DoNode($expr, $token->getLine(), $this->getTag());
32 | }
33 |
34 | public function getTag(): string
35 | {
36 | return 'do';
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/DoNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class DoNode extends Node
23 | {
24 | public function __construct(AbstractExpression $expr, int $lineno, string $tag = null)
25 | {
26 | parent::__construct(['expr' => $expr], [], $lineno, $tag);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->addDebugInfo($this)
33 | ->write('')
34 | ->subcompile($this->getNode('expr'))
35 | ->raw(";\n")
36 | ;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php:
--------------------------------------------------------------------------------
1 | $node], [], $lineno);
24 | }
25 |
26 | public function compile(Compiler $compiler): void
27 | {
28 | $compiler->raw(' ');
29 | $this->operator($compiler);
30 | $compiler->subcompile($this->getNode('node'));
31 | }
32 |
33 | abstract public function operator(Compiler $compiler): Compiler;
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Test/DivisiblebyTest.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | class DivisiblebyTest extends TestExpression
25 | {
26 | public function compile(Compiler $compiler): void
27 | {
28 | $compiler
29 | ->raw('(0 == ')
30 | ->subcompile($this->getNode('node'))
31 | ->raw(' % ')
32 | ->subcompile($this->getNode('arguments')->getNode(0))
33 | ->raw(')')
34 | ;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/BlockReferenceNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class BlockReferenceNode extends Node implements NodeOutputInterface
23 | {
24 | public function __construct(string $name, int $lineno, string $tag = null)
25 | {
26 | parent::__construct([], ['name' => $name], $lineno, $tag);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->addDebugInfo($this)
33 | ->write(sprintf("\$this->displayBlock('%s', \$context, \$blocks);\n", $this->getAttribute('name')))
34 | ;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/EqualBinary.php:
--------------------------------------------------------------------------------
1 | = 80000) {
21 | parent::compile($compiler);
22 |
23 | return;
24 | }
25 |
26 | $compiler
27 | ->raw('(0 === twig_compare(')
28 | ->subcompile($this->getNode('left'))
29 | ->raw(', ')
30 | ->subcompile($this->getNode('right'))
31 | ->raw('))')
32 | ;
33 | }
34 |
35 | public function operator(Compiler $compiler): Compiler
36 | {
37 | return $compiler->raw('==');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/LessBinary.php:
--------------------------------------------------------------------------------
1 | = 80000) {
21 | parent::compile($compiler);
22 |
23 | return;
24 | }
25 |
26 | $compiler
27 | ->raw('(-1 === twig_compare(')
28 | ->subcompile($this->getNode('left'))
29 | ->raw(', ')
30 | ->subcompile($this->getNode('right'))
31 | ->raw('))')
32 | ;
33 | }
34 |
35 | public function operator(Compiler $compiler): Compiler
36 | {
37 | return $compiler->raw('<');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/GreaterBinary.php:
--------------------------------------------------------------------------------
1 | = 80000) {
21 | parent::compile($compiler);
22 |
23 | return;
24 | }
25 |
26 | $compiler
27 | ->raw('(1 === twig_compare(')
28 | ->subcompile($this->getNode('left'))
29 | ->raw(', ')
30 | ->subcompile($this->getNode('right'))
31 | ->raw('))')
32 | ;
33 | }
34 |
35 | public function operator(Compiler $compiler): Compiler
36 | {
37 | return $compiler->raw('>');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/LessEqualBinary.php:
--------------------------------------------------------------------------------
1 | = 80000) {
21 | parent::compile($compiler);
22 |
23 | return;
24 | }
25 |
26 | $compiler
27 | ->raw('(0 >= twig_compare(')
28 | ->subcompile($this->getNode('left'))
29 | ->raw(', ')
30 | ->subcompile($this->getNode('right'))
31 | ->raw('))')
32 | ;
33 | }
34 |
35 | public function operator(Compiler $compiler): Compiler
36 | {
37 | return $compiler->raw('<=');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php:
--------------------------------------------------------------------------------
1 | = 80000) {
21 | parent::compile($compiler);
22 |
23 | return;
24 | }
25 |
26 | $compiler
27 | ->raw('(0 !== twig_compare(')
28 | ->subcompile($this->getNode('left'))
29 | ->raw(', ')
30 | ->subcompile($this->getNode('right'))
31 | ->raw('))')
32 | ;
33 | }
34 |
35 | public function operator(Compiler $compiler): Compiler
36 | {
37 | return $compiler->raw('!=');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php:
--------------------------------------------------------------------------------
1 | = 80000) {
21 | parent::compile($compiler);
22 |
23 | return;
24 | }
25 |
26 | $compiler
27 | ->raw('(0 <= twig_compare(')
28 | ->subcompile($this->getNode('left'))
29 | ->raw(', ')
30 | ->subcompile($this->getNode('right'))
31 | ->raw('))')
32 | ;
33 | }
34 |
35 | public function operator(Compiler $compiler): Compiler
36 | {
37 | return $compiler->raw('>=');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/composer/platform_check.php:
--------------------------------------------------------------------------------
1 | = 70205)) {
8 | $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.5". You are running ' . PHP_VERSION . '.';
9 | }
10 |
11 | if ($issues) {
12 | if (!headers_sent()) {
13 | header('HTTP/1.1 500 Internal Server Error');
14 | }
15 | if (!ini_get('display_errors')) {
16 | if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
17 | fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
18 | } elseif (!headers_sent()) {
19 | echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
20 | }
21 | }
22 | trigger_error(
23 | 'Composer detected issues in your platform: ' . implode(' ', $issues),
24 | E_USER_ERROR
25 | );
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/AutoEscapeNode.php:
--------------------------------------------------------------------------------
1 |
26 | */
27 | class AutoEscapeNode extends Node
28 | {
29 | public function __construct($value, Node $body, int $lineno, string $tag = 'autoescape')
30 | {
31 | parent::__construct(['body' => $body], ['value' => $value], $lineno, $tag);
32 | }
33 |
34 | public function compile(Compiler $compiler): void
35 | {
36 | $compiler->subcompile($this->getNode('body'));
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | class FactoryRuntimeLoader implements RuntimeLoaderInterface
20 | {
21 | private $map;
22 |
23 | /**
24 | * @param array $map An array where keys are class names and values factory callables
25 | */
26 | public function __construct(array $map = [])
27 | {
28 | $this->map = $map;
29 | }
30 |
31 | public function load(string $class)
32 | {
33 | if (!isset($this->map[$class])) {
34 | return null;
35 | }
36 |
37 | $runtimeFactory = $this->map[$class];
38 |
39 | return $runtimeFactory();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/PrintNode.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | class PrintNode extends Node implements NodeOutputInterface
24 | {
25 | public function __construct(AbstractExpression $expr, int $lineno, string $tag = null)
26 | {
27 | parent::__construct(['expr' => $expr], [], $lineno, $tag);
28 | }
29 |
30 | public function compile(Compiler $compiler): void
31 | {
32 | $compiler
33 | ->addDebugInfo($this)
34 | ->write('echo ')
35 | ->subcompile($this->getNode('expr'))
36 | ->raw(";\n")
37 | ;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Profiler/Dumper/TextDumper.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class TextDumper extends BaseDumper
20 | {
21 | protected function formatTemplate(Profile $profile, $prefix): string
22 | {
23 | return sprintf('%s└ %s', $prefix, $profile->getTemplate());
24 | }
25 |
26 | protected function formatNonTemplate(Profile $profile, $prefix): string
27 | {
28 | return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), $profile->getName());
29 | }
30 |
31 | protected function formatTime(Profile $profile, $percent): string
32 | {
33 | return sprintf('%.2fms/%.0f%%', $profile->getDuration() * 1000, $percent);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php:
--------------------------------------------------------------------------------
1 |
22 | * @author Robin Chalas
23 | */
24 | class ContainerRuntimeLoader implements RuntimeLoaderInterface
25 | {
26 | private $container;
27 |
28 | public function __construct(ContainerInterface $container)
29 | {
30 | $this->container = $container;
31 | }
32 |
33 | public function load(string $class)
34 | {
35 | return $this->container->has($class) ? $this->container->get($class) : null;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityNotAllowedMethodError.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class SecurityNotAllowedMethodError extends SecurityError
20 | {
21 | private $className;
22 | private $methodName;
23 |
24 | public function __construct(string $message, string $className, string $methodName)
25 | {
26 | parent::__construct($message);
27 | $this->className = $className;
28 | $this->methodName = $methodName;
29 | }
30 |
31 | public function getClassName(): string
32 | {
33 | return $this->className;
34 | }
35 |
36 | public function getMethodName()
37 | {
38 | return $this->methodName;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/StartsWithBinary.php:
--------------------------------------------------------------------------------
1 | getVarName();
21 | $right = $compiler->getVarName();
22 | $compiler
23 | ->raw(sprintf('(is_string($%s = ', $left))
24 | ->subcompile($this->getNode('left'))
25 | ->raw(sprintf(') && is_string($%s = ', $right))
26 | ->subcompile($this->getNode('right'))
27 | ->raw(sprintf(') && (\'\' === $%2$s || 0 === strpos($%1$s, $%2$s)))', $left, $right))
28 | ;
29 | }
30 |
31 | public function operator(Compiler $compiler): Compiler
32 | {
33 | return $compiler->raw('');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityNotAllowedPropertyError.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class SecurityNotAllowedPropertyError extends SecurityError
20 | {
21 | private $className;
22 | private $propertyName;
23 |
24 | public function __construct(string $message, string $className, string $propertyName)
25 | {
26 | parent::__construct($message);
27 | $this->className = $className;
28 | $this->propertyName = $propertyName;
29 | }
30 |
31 | public function getClassName(): string
32 | {
33 | return $this->className;
34 | }
35 |
36 | public function getPropertyName()
37 | {
38 | return $this->propertyName;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php:
--------------------------------------------------------------------------------
1 | getVarName();
21 | $right = $compiler->getVarName();
22 | $compiler
23 | ->raw(sprintf('(is_string($%s = ', $left))
24 | ->subcompile($this->getNode('left'))
25 | ->raw(sprintf(') && is_string($%s = ', $right))
26 | ->subcompile($this->getNode('right'))
27 | ->raw(sprintf(') && (\'\' === $%2$s || $%2$s === substr($%1$s, -strlen($%2$s))))', $left, $right))
28 | ;
29 | }
30 |
31 | public function operator(Compiler $compiler): Compiler
32 | {
33 | return $compiler->raw('');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/TokenParserInterface.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | interface TokenParserInterface
25 | {
26 | /**
27 | * Sets the parser associated with this token parser.
28 | */
29 | public function setParser(Parser $parser): void;
30 |
31 | /**
32 | * Parses a token and returns a node.
33 | *
34 | * @return Node
35 | *
36 | * @throws SyntaxError
37 | */
38 | public function parse(Token $token);
39 |
40 | /**
41 | * Gets the tag name associated with this token parser.
42 | *
43 | * @return string
44 | */
45 | public function getTag();
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php:
--------------------------------------------------------------------------------
1 | $expr1, 'expr2' => $expr2, 'expr3' => $expr3], [], $lineno);
22 | }
23 |
24 | public function compile(Compiler $compiler): void
25 | {
26 | $compiler
27 | ->raw('((')
28 | ->subcompile($this->getNode('expr1'))
29 | ->raw(') ? (')
30 | ->subcompile($this->getNode('expr2'))
31 | ->raw(') : (')
32 | ->subcompile($this->getNode('expr3'))
33 | ->raw('))')
34 | ;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-ctype/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018-2019 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/composer/LICENSE:
--------------------------------------------------------------------------------
1 |
2 | Copyright (c) Nils Adermann, Jordi Boggiano
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining a copy
5 | of this software and associated documentation files (the "Software"), to deal
6 | in the Software without restriction, including without limitation the rights
7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | copies of the Software, and to permit persons to whom the Software is furnished
9 | to do so, subject to the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be included in all
12 | copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | THE SOFTWARE.
21 |
22 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-mbstring/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015-2019 Fabien Potencier
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is furnished
8 | to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Markup.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | class Markup implements \Countable, \JsonSerializable
20 | {
21 | private $content;
22 | private $charset;
23 |
24 | public function __construct($content, $charset)
25 | {
26 | $this->content = (string) $content;
27 | $this->charset = $charset;
28 | }
29 |
30 | public function __toString()
31 | {
32 | return $this->content;
33 | }
34 |
35 | /**
36 | * @return int
37 | */
38 | #[\ReturnTypeWillChange]
39 | public function count()
40 | {
41 | return mb_strlen($this->content, $this->charset);
42 | }
43 |
44 | /**
45 | * @return mixed
46 | */
47 | #[\ReturnTypeWillChange]
48 | public function jsonSerialize()
49 | {
50 | return $this->content;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/includes/config.inc.php:
--------------------------------------------------------------------------------
1 |
25 | *
26 | * @internal
27 | */
28 | final class DeprecatedTokenParser extends AbstractTokenParser
29 | {
30 | public function parse(Token $token): Node
31 | {
32 | $expr = $this->parser->getExpressionParser()->parseExpression();
33 |
34 | $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
35 |
36 | return new DeprecatedNode($expr, $token->getLine(), $this->getTag());
37 | }
38 |
39 | public function getTag(): string
40 | {
41 | return 'deprecated';
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Binary/AbstractBinary.php:
--------------------------------------------------------------------------------
1 | $left, 'right' => $right], [], $lineno);
24 | }
25 |
26 | public function compile(Compiler $compiler): void
27 | {
28 | $compiler
29 | ->raw('(')
30 | ->subcompile($this->getNode('left'))
31 | ->raw(' ')
32 | ;
33 | $this->operator($compiler);
34 | $compiler
35 | ->raw(' ')
36 | ->subcompile($this->getNode('right'))
37 | ->raw(')')
38 | ;
39 | }
40 |
41 | abstract public function operator(Compiler $compiler): Compiler;
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Sandbox/SecurityPolicyInterface.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | interface SecurityPolicyInterface
20 | {
21 | /**
22 | * @param string[] $tags
23 | * @param string[] $filters
24 | * @param string[] $functions
25 | *
26 | * @throws SecurityError
27 | */
28 | public function checkSecurity($tags, $filters, $functions): void;
29 |
30 | /**
31 | * @param object $obj
32 | * @param string $method
33 | *
34 | * @throws SecurityNotAllowedMethodError
35 | */
36 | public function checkMethodAllowed($obj, $method): void;
37 |
38 | /**
39 | * @param object $obj
40 | * @param string $property
41 | *
42 | * @throws SecurityNotAllowedPropertyError
43 | */
44 | public function checkPropertyAllowed($obj, $property): void;
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-ctype/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/polyfill-ctype",
3 | "type": "library",
4 | "description": "Symfony polyfill for ctype functions",
5 | "keywords": ["polyfill", "compatibility", "portable", "ctype"],
6 | "homepage": "https://symfony.com",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Gert de Pagter",
11 | "email": "BackEndTea@gmail.com"
12 | },
13 | {
14 | "name": "Symfony Community",
15 | "homepage": "https://symfony.com/contributors"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=7.1"
20 | },
21 | "provide": {
22 | "ext-ctype": "*"
23 | },
24 | "autoload": {
25 | "psr-4": { "Symfony\\Polyfill\\Ctype\\": "" },
26 | "files": [ "bootstrap.php" ]
27 | },
28 | "suggest": {
29 | "ext-ctype": "For best performance"
30 | },
31 | "minimum-stability": "dev",
32 | "extra": {
33 | "branch-alias": {
34 | "dev-main": "1.23-dev"
35 | },
36 | "thanks": {
37 | "name": "symfony/polyfill",
38 | "url": "https://github.com/symfony/polyfill"
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/BlockNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class BlockNode extends Node
23 | {
24 | public function __construct(string $name, Node $body, int $lineno, string $tag = null)
25 | {
26 | parent::__construct(['body' => $body], ['name' => $name], $lineno, $tag);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->addDebugInfo($this)
33 | ->write(sprintf("public function block_%s(\$context, array \$blocks = [])\n", $this->getAttribute('name')), "{\n")
34 | ->indent()
35 | ->write("\$macros = \$this->macros;\n")
36 | ;
37 |
38 | $compiler
39 | ->subcompile($this->getNode('body'))
40 | ->outdent()
41 | ->write("}\n\n")
42 | ;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/StringLoaderExtension.php:
--------------------------------------------------------------------------------
1 | true]),
21 | ];
22 | }
23 | }
24 | }
25 |
26 | namespace {
27 | use Twig\Environment;
28 | use Twig\TemplateWrapper;
29 |
30 | /**
31 | * Loads a template from a string.
32 | *
33 | * {{ include(template_from_string("Hello {{ name }}")) }}
34 | *
35 | * @param string $template A template as a string or object implementing __toString()
36 | * @param string $name An optional name of the template to be used in error messages
37 | */
38 | function twig_template_from_string(Environment $env, $template, string $name = null): TemplateWrapper
39 | {
40 | return $env->createTemplate((string) $template, $name);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/NodeVisitor/NodeVisitorInterface.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | interface NodeVisitorInterface
23 | {
24 | /**
25 | * Called before child nodes are visited.
26 | *
27 | * @return Node The modified node
28 | */
29 | public function enterNode(Node $node, Environment $env): Node;
30 |
31 | /**
32 | * Called after child nodes are visited.
33 | *
34 | * @return Node|null The modified node or null if the node must be removed
35 | */
36 | public function leaveNode(Node $node, Environment $env): ?Node;
37 |
38 | /**
39 | * Returns the priority for this visitor.
40 | *
41 | * Priority should be between -10 and 10 (0 is the default).
42 | *
43 | * @return int The priority level
44 | */
45 | public function getPriority();
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-mbstring/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "symfony/polyfill-mbstring",
3 | "type": "library",
4 | "description": "Symfony polyfill for the Mbstring extension",
5 | "keywords": ["polyfill", "shim", "compatibility", "portable", "mbstring"],
6 | "homepage": "https://symfony.com",
7 | "license": "MIT",
8 | "authors": [
9 | {
10 | "name": "Nicolas Grekas",
11 | "email": "p@tchwork.com"
12 | },
13 | {
14 | "name": "Symfony Community",
15 | "homepage": "https://symfony.com/contributors"
16 | }
17 | ],
18 | "require": {
19 | "php": ">=7.1"
20 | },
21 | "provide": {
22 | "ext-mbstring": "*"
23 | },
24 | "autoload": {
25 | "psr-4": { "Symfony\\Polyfill\\Mbstring\\": "" },
26 | "files": [ "bootstrap.php" ]
27 | },
28 | "suggest": {
29 | "ext-mbstring": "For best performance"
30 | },
31 | "minimum-stability": "dev",
32 | "extra": {
33 | "branch-alias": {
34 | "dev-main": "1.23-dev"
35 | },
36 | "thanks": {
37 | "name": "symfony/polyfill",
38 | "url": "https://github.com/symfony/polyfill"
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Source.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class Source
20 | {
21 | private $code;
22 | private $name;
23 | private $path;
24 |
25 | /**
26 | * @param string $code The template source code
27 | * @param string $name The template logical name
28 | * @param string $path The filesystem path of the template if any
29 | */
30 | public function __construct(string $code, string $name, string $path = '')
31 | {
32 | $this->code = $code;
33 | $this->name = $name;
34 | $this->path = $path;
35 | }
36 |
37 | public function getCode(): string
38 | {
39 | return $this->code;
40 | }
41 |
42 | public function getName(): string
43 | {
44 | return $this->name;
45 | }
46 |
47 | public function getPath(): string
48 | {
49 | return $this->path;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/ProfilerExtension.php:
--------------------------------------------------------------------------------
1 | actives[] = $profile;
24 | }
25 |
26 | /**
27 | * @return void
28 | */
29 | public function enter(Profile $profile)
30 | {
31 | $this->actives[0]->addProfile($profile);
32 | array_unshift($this->actives, $profile);
33 | }
34 |
35 | /**
36 | * @return void
37 | */
38 | public function leave(Profile $profile)
39 | {
40 | $profile->leave();
41 | array_shift($this->actives);
42 |
43 | if (1 === \count($this->actives)) {
44 | $this->actives[0]->leave();
45 | }
46 | }
47 |
48 | public function getNodeVisitors(): array
49 | {
50 | return [new ProfilerNodeVisitor(static::class)];
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/TestExpression.php:
--------------------------------------------------------------------------------
1 | $node];
22 | if (null !== $arguments) {
23 | $nodes['arguments'] = $arguments;
24 | }
25 |
26 | parent::__construct($nodes, ['name' => $name], $lineno);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $name = $this->getAttribute('name');
32 | $test = $compiler->getEnvironment()->getTest($name);
33 |
34 | $this->setAttribute('name', $name);
35 | $this->setAttribute('type', 'test');
36 | $this->setAttribute('arguments', $test->getArguments());
37 | $this->setAttribute('callable', $test->getCallable());
38 | $this->setAttribute('is_variadic', $test->isVariadic());
39 |
40 | $this->compileCallable($compiler);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Loader/LoaderInterface.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | interface LoaderInterface
23 | {
24 | /**
25 | * Returns the source context for a given template logical name.
26 | *
27 | * @throws LoaderError When $name is not found
28 | */
29 | public function getSourceContext(string $name): Source;
30 |
31 | /**
32 | * Gets the cache key to use for the cache for a given template name.
33 | *
34 | * @throws LoaderError When $name is not found
35 | */
36 | public function getCacheKey(string $name): string;
37 |
38 | /**
39 | * @param int $time Timestamp of the last modification time of the cached template
40 | *
41 | * @throws LoaderError When $name is not found
42 | */
43 | public function isFresh(string $name, int $time): bool;
44 |
45 | /**
46 | * @return bool
47 | */
48 | public function exists(string $name);
49 | }
50 |
--------------------------------------------------------------------------------
/templates/base.html.twig:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | YouTube - Broadcast Yourself.
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | |
25 | {% include("header.twig") %}
26 | |
27 |
28 |
29 | {% block pageContent %}{% endblock %}
30 |
31 | {% include("footer.twig") %}
32 |
33 |
34 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Cache/CacheInterface.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | interface CacheInterface
24 | {
25 | /**
26 | * Generates a cache key for the given template class name.
27 | */
28 | public function generateKey(string $name, string $className): string;
29 |
30 | /**
31 | * Writes the compiled template to cache.
32 | *
33 | * @param string $content The template representation as a PHP class
34 | */
35 | public function write(string $key, string $content): void;
36 |
37 | /**
38 | * Loads a template from the cache.
39 | */
40 | public function load(string $key): void;
41 |
42 | /**
43 | * Returns the modification timestamp of a key.
44 | */
45 | public function getTimestamp(string $key): int;
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/ParentExpression.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class ParentExpression extends AbstractExpression
23 | {
24 | public function __construct(string $name, int $lineno, string $tag = null)
25 | {
26 | parent::__construct([], ['output' => false, 'name' => $name], $lineno, $tag);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | if ($this->getAttribute('output')) {
32 | $compiler
33 | ->addDebugInfo($this)
34 | ->write('$this->displayParentBlock(')
35 | ->string($this->getAttribute('name'))
36 | ->raw(", \$context, \$blocks);\n")
37 | ;
38 | } else {
39 | $compiler
40 | ->raw('$this->renderParentBlock(')
41 | ->string($this->getAttribute('name'))
42 | ->raw(', $context, $blocks)')
43 | ;
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/ImportTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getExpressionParser()->parseExpression();
31 | $this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5, 'as');
32 | $var = new AssignNameExpression($this->parser->getStream()->expect(/* Token::NAME_TYPE */ 5)->getValue(), $token->getLine());
33 | $this->parser->getStream()->expect(/* Token::BLOCK_END_TYPE */ 3);
34 |
35 | $this->parser->addImportedSymbol('template', $var->getAttribute('name'));
36 |
37 | return new ImportNode($macro, $var, $token->getLine(), $this->getTag(), $this->parser->isMainScope());
38 | }
39 |
40 | public function getTag(): string
41 | {
42 | return 'import';
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Error/SyntaxError.php:
--------------------------------------------------------------------------------
1 |
19 | */
20 | class SyntaxError extends Error
21 | {
22 | /**
23 | * Tweaks the error message to include suggestions.
24 | *
25 | * @param string $name The original name of the item that does not exist
26 | * @param array $items An array of possible items
27 | */
28 | public function addSuggestions(string $name, array $items): void
29 | {
30 | $alternatives = [];
31 | foreach ($items as $item) {
32 | $lev = levenshtein($name, $item);
33 | if ($lev <= \strlen($name) / 3 || false !== strpos($item, $name)) {
34 | $alternatives[$item] = $lev;
35 | }
36 | }
37 |
38 | if (!$alternatives) {
39 | return;
40 | }
41 |
42 | asort($alternatives);
43 |
44 | $this->appendMessage(sprintf(' Did you mean "%s"?', implode('", "', array_keys($alternatives))));
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | abstract class AbstractNodeVisitor implements NodeVisitorInterface
25 | {
26 | final public function enterNode(Node $node, Environment $env): Node
27 | {
28 | return $this->doEnterNode($node, $env);
29 | }
30 |
31 | final public function leaveNode(Node $node, Environment $env): ?Node
32 | {
33 | return $this->doLeaveNode($node, $env);
34 | }
35 |
36 | /**
37 | * Called before child nodes are visited.
38 | *
39 | * @return Node The modified node
40 | */
41 | abstract protected function doEnterNode(Node $node, Environment $env);
42 |
43 | /**
44 | * Called after child nodes are visited.
45 | *
46 | * @return Node|null The modified node or null if the node must be removed
47 | */
48 | abstract protected function doLeaveNode(Node $node, Environment $env);
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Test/ConstantTest.php:
--------------------------------------------------------------------------------
1 |
25 | */
26 | class ConstantTest extends TestExpression
27 | {
28 | public function compile(Compiler $compiler): void
29 | {
30 | $compiler
31 | ->raw('(')
32 | ->subcompile($this->getNode('node'))
33 | ->raw(' === constant(')
34 | ;
35 |
36 | if ($this->getNode('arguments')->hasNode(1)) {
37 | $compiler
38 | ->raw('get_class(')
39 | ->subcompile($this->getNode('arguments')->getNode(1))
40 | ->raw(')."::".')
41 | ;
42 | }
43 |
44 | $compiler
45 | ->subcompile($this->getNode('arguments')->getNode(0))
46 | ->raw('))')
47 | ;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class EnterProfileNode extends Node
23 | {
24 | public function __construct(string $extensionName, string $type, string $name, string $varName)
25 | {
26 | parent::__construct([], ['extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName]);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->write(sprintf('$%s = $this->extensions[', $this->getAttribute('var_name')))
33 | ->repr($this->getAttribute('extension_name'))
34 | ->raw("];\n")
35 | ->write(sprintf('$%s->enter($%s = new \Twig\Profiler\Profile($this->getTemplateName(), ', $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
36 | ->repr($this->getAttribute('type'))
37 | ->raw(', ')
38 | ->repr($this->getAttribute('name'))
39 | ->raw("));\n\n")
40 | ;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/CheckToStringNode.php:
--------------------------------------------------------------------------------
1 |
26 | */
27 | class CheckToStringNode extends AbstractExpression
28 | {
29 | public function __construct(AbstractExpression $expr)
30 | {
31 | parent::__construct(['expr' => $expr], [], $expr->getTemplateLine(), $expr->getNodeTag());
32 | }
33 |
34 | public function compile(Compiler $compiler): void
35 | {
36 | $expr = $this->getNode('expr');
37 | $compiler
38 | ->raw('$this->sandbox->ensureToStringAllowed(')
39 | ->subcompile($expr)
40 | ->raw(', ')
41 | ->repr($expr->getTemplateLine())
42 | ->raw(', $this->source)')
43 | ;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/twig/twig/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "twig/twig",
3 | "type": "library",
4 | "description": "Twig, the flexible, fast, and secure template language for PHP",
5 | "keywords": ["templating"],
6 | "homepage": "https://twig.symfony.com",
7 | "license": "BSD-3-Clause",
8 | "minimum-stability": "dev",
9 | "authors": [
10 | {
11 | "name": "Fabien Potencier",
12 | "email": "fabien@symfony.com",
13 | "homepage": "http://fabien.potencier.org",
14 | "role": "Lead Developer"
15 | },
16 | {
17 | "name": "Twig Team",
18 | "role": "Contributors"
19 | },
20 | {
21 | "name": "Armin Ronacher",
22 | "email": "armin.ronacher@active-4.com",
23 | "role": "Project Founder"
24 | }
25 | ],
26 | "require": {
27 | "php": ">=7.2.5",
28 | "symfony/polyfill-mbstring": "^1.3",
29 | "symfony/polyfill-ctype": "^1.8"
30 | },
31 | "require-dev": {
32 | "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0",
33 | "psr/container": "^1.0"
34 | },
35 | "autoload": {
36 | "psr-4" : {
37 | "Twig\\" : "src/"
38 | }
39 | },
40 | "autoload-dev": {
41 | "psr-4" : {
42 | "Twig\\Tests\\" : "tests/"
43 | }
44 | },
45 | "extra": {
46 | "branch-alias": {
47 | "dev-master": "3.4-dev"
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/FilterExpression.php:
--------------------------------------------------------------------------------
1 | $node, 'filter' => $filterName, 'arguments' => $arguments], [], $lineno, $tag);
23 | }
24 |
25 | public function compile(Compiler $compiler): void
26 | {
27 | $name = $this->getNode('filter')->getAttribute('value');
28 | $filter = $compiler->getEnvironment()->getFilter($name);
29 |
30 | $this->setAttribute('name', $name);
31 | $this->setAttribute('type', 'filter');
32 | $this->setAttribute('needs_environment', $filter->needsEnvironment());
33 | $this->setAttribute('needs_context', $filter->needsContext());
34 | $this->setAttribute('arguments', $filter->getArguments());
35 | $this->setAttribute('callable', $filter->getCallable());
36 | $this->setAttribute('is_variadic', $filter->isVariadic());
37 |
38 | $this->compileCallable($compiler);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # ARCHIVING ON 1 DEC 2023 - SEE BELOW
2 |
3 | # yt-2005-watch
4 | A YouTube frontend written with the YouTubeI api, otherwise more commonly known as the InnerTube API.
5 |
6 | ## Requirements
7 | - Webserver (preferably, Apache)
8 | - PHP ≥ 7.2.5 (Minimum Twig requirement)
9 | - cURL extension for PHP
10 |
11 | ## Setup
12 | 1. Go to your webserver's documentroot, then do `git clone https://github.com/pixdoet/yt-2005-watch.git` on the directory.
13 | 2. You're done! If you wanna configure stuff, edit `includes/config.inc.php`, where the values are clearly marked in the comments.
14 |
15 | ## Directory structure
16 | - `/includes/`: Contains include files for the PHP code
17 | - `/includes/html/`: Contains HTML files used for includes (no results, header etc)
18 | - `/templates/`: HTML templates for Twig
19 | - `/yts/`: Contains static files (YouTube Static)
20 |
21 |
22 | ## License
23 | Apache 2.0
24 |
25 | ---
26 |
27 | ### Publicly maintained instances
28 | Stable: http://cleantalk.great-site.net (shutting down 31 Dec 2023)
29 |
30 | ## The future of yt-2005-watch
31 | Really? It's been 2 years since this project has started. Unfortunately, it's also time for the project to come to a rest, as it existed in an abandoned state since 2023. I just don't have the time and energy to commit to a project like this anymore, sorry :(
32 |
33 | Maybe time will come when I inevitably start to create projects for the Old YouTube Community again? Dunno. Until then, I wish the best for y'all, and goodbye.
34 |
--------------------------------------------------------------------------------
/templates/noquery.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "base.html.twig" %}
2 | {% block pageContent %}
3 |
8 |
9 |
38 | {% endblock %}
39 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/SandboxNode.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 | class SandboxNode extends Node
22 | {
23 | public function __construct(Node $body, int $lineno, string $tag = null)
24 | {
25 | parent::__construct(['body' => $body], [], $lineno, $tag);
26 | }
27 |
28 | public function compile(Compiler $compiler): void
29 | {
30 | $compiler
31 | ->addDebugInfo($this)
32 | ->write("if (!\$alreadySandboxed = \$this->sandbox->isSandboxed()) {\n")
33 | ->indent()
34 | ->write("\$this->sandbox->enableSandbox();\n")
35 | ->outdent()
36 | ->write("}\n")
37 | ->write("try {\n")
38 | ->indent()
39 | ->subcompile($this->getNode('body'))
40 | ->outdent()
41 | ->write("} finally {\n")
42 | ->indent()
43 | ->write("if (!\$alreadySandboxed) {\n")
44 | ->indent()
45 | ->write("\$this->sandbox->disableSandbox();\n")
46 | ->outdent()
47 | ->write("}\n")
48 | ->outdent()
49 | ->write("}\n")
50 | ;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/WithTokenParser.php:
--------------------------------------------------------------------------------
1 |
22 | *
23 | * @internal
24 | */
25 | final class WithTokenParser extends AbstractTokenParser
26 | {
27 | public function parse(Token $token): Node
28 | {
29 | $stream = $this->parser->getStream();
30 |
31 | $variables = null;
32 | $only = false;
33 | if (!$stream->test(/* Token::BLOCK_END_TYPE */ 3)) {
34 | $variables = $this->parser->getExpressionParser()->parseExpression();
35 | $only = (bool) $stream->nextIf(/* Token::NAME_TYPE */ 5, 'only');
36 | }
37 |
38 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
39 |
40 | $body = $this->parser->subparse([$this, 'decideWithEnd'], true);
41 |
42 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
43 |
44 | return new WithNode($body, $variables, $only, $token->getLine(), $this->getTag());
45 | }
46 |
47 | public function decideWithEnd(Token $token): bool
48 | {
49 | return $token->test('endwith');
50 | }
51 |
52 | public function getTag(): string
53 | {
54 | return 'with';
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/FunctionExpression.php:
--------------------------------------------------------------------------------
1 | $arguments], ['name' => $name, 'is_defined_test' => false], $lineno);
22 | }
23 |
24 | public function compile(Compiler $compiler)
25 | {
26 | $name = $this->getAttribute('name');
27 | $function = $compiler->getEnvironment()->getFunction($name);
28 |
29 | $this->setAttribute('name', $name);
30 | $this->setAttribute('type', 'function');
31 | $this->setAttribute('needs_environment', $function->needsEnvironment());
32 | $this->setAttribute('needs_context', $function->needsContext());
33 | $this->setAttribute('arguments', $function->getArguments());
34 | $callable = $function->getCallable();
35 | if ('constant' === $name && $this->getAttribute('is_defined_test')) {
36 | $callable = 'twig_constant_is_defined';
37 | }
38 | $this->setAttribute('callable', $callable);
39 | $this->setAttribute('is_variadic', $function->isVariadic());
40 |
41 | $this->compileCallable($compiler);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/includes/youtubei/details.php:
--------------------------------------------------------------------------------
1 |
16 | array(
17 | 'client' =>
18 | array(
19 | 'hl' => 'en',
20 | 'clientName' => 'WEB',
21 | 'clientVersion' => '2.20231026.03.01',
22 | 'originalUrl' => 'https://www.youtube.com/watch?v=' . $videoId,
23 | )
24 | ),
25 | 'videoId' => $videoId,
26 | 'racyCheckOk' => true,
27 | )
28 | );
29 | $ch = curl_init();
30 | // otherwise unsupported browser
31 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // so that the 1 doesnt show
32 | curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");
33 | curl_setopt($ch, CURLOPT_HTTPHEADER, array(
34 | "Authorization: ", //sapisidhash,
35 | "Content-Type: application/json",
36 | "X-Goog-AuthUser: 0",
37 | "X-Origin: https://www.youtube.com",
38 | ));
39 | curl_setopt($ch, CURLOPT_POSTFIELDS, $req_arr);
40 | curl_setopt($ch, CURLOPT_USERAGENT, INNERTUBE_REQUEST_USER_AGENT);
41 | curl_setopt($ch, CURLOPT_POST, true);
42 | curl_setopt($ch, CURLOPT_URL, "https://www.youtube.com/youtubei/v1/next?key=" . INNERTUBE_REQUEST_API_KEY);
43 |
44 | $result = curl_exec($ch);
45 | return $result;
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2022 by the Twig Team.
2 |
3 | All rights reserved.
4 |
5 | Redistribution and use in source and binary forms, with or without modification,
6 | are permitted provided that the following conditions are met:
7 |
8 | * Redistributions of source code must retain the above copyright notice,
9 | this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above copyright notice,
11 | this list of conditions and the following disclaimer in the documentation
12 | and/or other materials provided with the distribution.
13 | * Neither the name of Twig nor the names of its contributors
14 | may be used to endorse or promote products derived from this software
15 | without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/ExtendsTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getStream();
31 |
32 | if ($this->parser->peekBlockStack()) {
33 | throw new SyntaxError('Cannot use "extend" in a block.', $token->getLine(), $stream->getSourceContext());
34 | } elseif (!$this->parser->isMainScope()) {
35 | throw new SyntaxError('Cannot use "extend" in a macro.', $token->getLine(), $stream->getSourceContext());
36 | }
37 |
38 | if (null !== $this->parser->getParent()) {
39 | throw new SyntaxError('Multiple extends tags are forbidden.', $token->getLine(), $stream->getSourceContext());
40 | }
41 | $this->parser->setParent($this->parser->getExpressionParser()->parseExpression());
42 |
43 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
44 |
45 | return new Node();
46 | }
47 |
48 | public function getTag(): string
49 | {
50 | return 'extends';
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/EmbedNode.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | class EmbedNode extends IncludeNode
24 | {
25 | // we don't inject the module to avoid node visitors to traverse it twice (as it will be already visited in the main module)
26 | public function __construct(string $name, int $index, ?AbstractExpression $variables, bool $only, bool $ignoreMissing, int $lineno, string $tag = null)
27 | {
28 | parent::__construct(new ConstantExpression('not_used', $lineno), $variables, $only, $ignoreMissing, $lineno, $tag);
29 |
30 | $this->setAttribute('name', $name);
31 | $this->setAttribute('index', $index);
32 | }
33 |
34 | protected function addGetTemplate(Compiler $compiler): void
35 | {
36 | $compiler
37 | ->write('$this->loadTemplate(')
38 | ->string($this->getAttribute('name'))
39 | ->raw(', ')
40 | ->repr($this->getTemplateName())
41 | ->raw(', ')
42 | ->repr($this->getTemplateLine())
43 | ->raw(', ')
44 | ->string($this->getAttribute('index'))
45 | ->raw(')')
46 | ;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/ForLoopNode.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 | class ForLoopNode extends Node
22 | {
23 | public function __construct(int $lineno, string $tag = null)
24 | {
25 | parent::__construct([], ['with_loop' => false, 'ifexpr' => false, 'else' => false], $lineno, $tag);
26 | }
27 |
28 | public function compile(Compiler $compiler): void
29 | {
30 | if ($this->getAttribute('else')) {
31 | $compiler->write("\$context['_iterated'] = true;\n");
32 | }
33 |
34 | if ($this->getAttribute('with_loop')) {
35 | $compiler
36 | ->write("++\$context['loop']['index0'];\n")
37 | ->write("++\$context['loop']['index'];\n")
38 | ->write("\$context['loop']['first'] = false;\n")
39 | ->write("if (isset(\$context['loop']['length'])) {\n")
40 | ->indent()
41 | ->write("--\$context['loop']['revindex0'];\n")
42 | ->write("--\$context['loop']['revindex'];\n")
43 | ->write("\$context['loop']['last'] = 0 === \$context['loop']['revindex0'];\n")
44 | ->outdent()
45 | ->write("}\n")
46 | ;
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/DeprecatedNode.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | class DeprecatedNode extends Node
24 | {
25 | public function __construct(AbstractExpression $expr, int $lineno, string $tag = null)
26 | {
27 | parent::__construct(['expr' => $expr], [], $lineno, $tag);
28 | }
29 |
30 | public function compile(Compiler $compiler): void
31 | {
32 | $compiler->addDebugInfo($this);
33 |
34 | $expr = $this->getNode('expr');
35 |
36 | if ($expr instanceof ConstantExpression) {
37 | $compiler->write('@trigger_error(')
38 | ->subcompile($expr);
39 | } else {
40 | $varName = $compiler->getVarName();
41 | $compiler->write(sprintf('$%s = ', $varName))
42 | ->subcompile($expr)
43 | ->raw(";\n")
44 | ->write(sprintf('@trigger_error($%s', $varName));
45 | }
46 |
47 | $compiler
48 | ->raw('.')
49 | ->string(sprintf(' ("%s" at line %d).', $this->getTemplateName(), $this->getTemplateLine()))
50 | ->raw(", E_USER_DEPRECATED);\n")
51 | ;
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Profiler/Dumper/HtmlDumper.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class HtmlDumper extends BaseDumper
20 | {
21 | private static $colors = [
22 | 'block' => '#dfd',
23 | 'macro' => '#ddf',
24 | 'template' => '#ffd',
25 | 'big' => '#d44',
26 | ];
27 |
28 | public function dump(Profile $profile): string
29 | {
30 | return ''.parent::dump($profile).'
';
31 | }
32 |
33 | protected function formatTemplate(Profile $profile, $prefix): string
34 | {
35 | return sprintf('%s└ %s', $prefix, self::$colors['template'], $profile->getTemplate());
36 | }
37 |
38 | protected function formatNonTemplate(Profile $profile, $prefix): string
39 | {
40 | return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), isset(self::$colors[$profile->getType()]) ? self::$colors[$profile->getType()] : 'auto', $profile->getName());
41 | }
42 |
43 | protected function formatTime(Profile $profile, $percent): string
44 | {
45 | return sprintf('%.2fms/%.0f%%', $percent > 20 ? self::$colors['big'] : 'auto', $profile->getDuration() * 1000, $percent);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/FileExtensionEscapingStrategy.php:
--------------------------------------------------------------------------------
1 |
24 | */
25 | class FileExtensionEscapingStrategy
26 | {
27 | /**
28 | * Guesses the best autoescaping strategy based on the file name.
29 | *
30 | * @param string $name The template name
31 | *
32 | * @return string|false The escaping strategy name to use or false to disable
33 | */
34 | public static function guess(string $name)
35 | {
36 | if (\in_array(substr($name, -1), ['/', '\\'])) {
37 | return 'html'; // return html for directories
38 | }
39 |
40 | if ('.twig' === substr($name, -5)) {
41 | $name = substr($name, 0, -5);
42 | }
43 |
44 | $extension = pathinfo($name, \PATHINFO_EXTENSION);
45 |
46 | switch ($extension) {
47 | case 'js':
48 | return 'js';
49 |
50 | case 'css':
51 | return 'css';
52 |
53 | case 'txt':
54 | return false;
55 |
56 | default:
57 | return 'html';
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/ApplyTokenParser.php:
--------------------------------------------------------------------------------
1 | getLine();
34 | $name = $this->parser->getVarName();
35 |
36 | $ref = new TempNameExpression($name, $lineno);
37 | $ref->setAttribute('always_defined', true);
38 |
39 | $filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag());
40 |
41 | $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
42 | $body = $this->parser->subparse([$this, 'decideApplyEnd'], true);
43 | $this->parser->getStream()->expect(Token::BLOCK_END_TYPE);
44 |
45 | return new Node([
46 | new SetNode(true, $ref, $body, $lineno, $this->getTag()),
47 | new PrintNode($filter, $lineno, $this->getTag()),
48 | ]);
49 | }
50 |
51 | public function decideApplyEnd(Token $token): bool
52 | {
53 | return $token->test('endapply');
54 | }
55 |
56 | public function getTag(): string
57 | {
58 | return 'apply';
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/includes/youtubei/initial.php:
--------------------------------------------------------------------------------
1 |
18 | array(
19 | 'client' =>
20 | array(
21 | 'hl' => 'en',
22 | 'userAgent' => INNERTUBE_REQUEST_USER_AGENT,
23 | 'clientName' => 'WEB',
24 | 'clientVersion' => INNERTUBE_CONTEXT_CLIENT_VERSION,
25 | 'mainAppWebInfo' =>
26 | array(
27 | 'graftUrl' => '/watch?v=' . $videoId,
28 | ),
29 | ),
30 | ),
31 | 'videoId' => $videoId,
32 | 'captionsRequested' => true,
33 | ));
34 | $ch = curl_init();
35 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // so that the 1 doesnt show
36 | curl_setopt($ch, CURLOPT_COOKIEFILE, "cookies.txt");
37 | curl_setopt($ch, CURLOPT_HTTPHEADER, array(
38 | "Content-Type: application/json",
39 | "X-Goog-AuthUser: 0",
40 | "X-Origin: https://www.youtube.com",
41 | ));
42 | curl_setopt($ch, CURLOPT_POSTFIELDS, $req_arr);
43 | curl_setopt($ch, CURLOPT_USERAGENT, INNERTUBE_REQUEST_USER_AGENT);
44 | curl_setopt($ch, CURLOPT_POST, true);
45 | curl_setopt($ch, CURLOPT_URL, "https://www.youtube.com/youtubei/v1/next?key=" . INNERTUBE_REQUEST_API_KEY);
46 |
47 | $result = curl_exec($ch);
48 | return $result;
49 | }
50 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-ctype/bootstrap.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | use Symfony\Polyfill\Ctype as p;
13 |
14 | if (\PHP_VERSION_ID >= 80000) {
15 | return require __DIR__.'/bootstrap80.php';
16 | }
17 |
18 | if (!function_exists('ctype_alnum')) {
19 | function ctype_alnum($text) { return p\Ctype::ctype_alnum($text); }
20 | }
21 | if (!function_exists('ctype_alpha')) {
22 | function ctype_alpha($text) { return p\Ctype::ctype_alpha($text); }
23 | }
24 | if (!function_exists('ctype_cntrl')) {
25 | function ctype_cntrl($text) { return p\Ctype::ctype_cntrl($text); }
26 | }
27 | if (!function_exists('ctype_digit')) {
28 | function ctype_digit($text) { return p\Ctype::ctype_digit($text); }
29 | }
30 | if (!function_exists('ctype_graph')) {
31 | function ctype_graph($text) { return p\Ctype::ctype_graph($text); }
32 | }
33 | if (!function_exists('ctype_lower')) {
34 | function ctype_lower($text) { return p\Ctype::ctype_lower($text); }
35 | }
36 | if (!function_exists('ctype_print')) {
37 | function ctype_print($text) { return p\Ctype::ctype_print($text); }
38 | }
39 | if (!function_exists('ctype_punct')) {
40 | function ctype_punct($text) { return p\Ctype::ctype_punct($text); }
41 | }
42 | if (!function_exists('ctype_space')) {
43 | function ctype_space($text) { return p\Ctype::ctype_space($text); }
44 | }
45 | if (!function_exists('ctype_upper')) {
46 | function ctype_upper($text) { return p\Ctype::ctype_upper($text); }
47 | }
48 | if (!function_exists('ctype_xdigit')) {
49 | function ctype_xdigit($text) { return p\Ctype::ctype_xdigit($text); }
50 | }
51 |
--------------------------------------------------------------------------------
/includes/youtubei/search.php:
--------------------------------------------------------------------------------
1 |
16 | array(
17 | 'client' =>
18 | array(
19 | 'visitorData' => 'Cgtjc1hsUzJrS2tlWSj0752NBg%3D%3D',
20 | 'clientName' => 'WEB',
21 | 'clientVersion' => INNERTUBE_CONTEXT_CLIENT_VERSION,
22 | 'originalUrl' => 'https://www.youtube.com/results?search_query=' . $query,
23 | 'mainAppWebInfo' =>
24 | array(
25 | 'graftUrl' => '/results?search_query=' . $query,
26 | ),
27 | ),
28 | ),
29 | 'query' => $query,
30 | 'webSearchboxStatsUrl' => '/search?oq=' . $query . '&gs_l=youtube.3...533.1044.0.1153.7.5.0.0.0.0.0.0..0.0....0...1ac.1.64.youtube..7.0.0....0.',
31 | ));
32 | $ch = curl_init();
33 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
34 | curl_setopt($ch, CURLOPT_HTTPHEADER, array(
35 | "Content-Type: application/json",
36 | "X-Goog-AuthUser: 0",
37 | "X-Origin: https://www.youtube.com"
38 | ));
39 | curl_setopt($ch, CURLOPT_POSTFIELDS, $req_arr);
40 | curl_setopt($ch, CURLOPT_USERAGENT, INNERTUBE_REQUEST_USER_AGENT);
41 | curl_setopt($ch, CURLOPT_POST, true);
42 | curl_setopt($ch, CURLOPT_URL, "https://www.youtube.com/youtubei/v1/search?key=" . INNERTUBE_REQUEST_API_KEY);
43 |
44 | $result = curl_exec($ch);
45 | return $result;
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/ExtensionInterface.php:
--------------------------------------------------------------------------------
1 |
24 | */
25 | interface ExtensionInterface
26 | {
27 | /**
28 | * Returns the token parser instances to add to the existing list.
29 | *
30 | * @return TokenParserInterface[]
31 | */
32 | public function getTokenParsers();
33 |
34 | /**
35 | * Returns the node visitor instances to add to the existing list.
36 | *
37 | * @return NodeVisitorInterface[]
38 | */
39 | public function getNodeVisitors();
40 |
41 | /**
42 | * Returns a list of filters to add to the existing list.
43 | *
44 | * @return TwigFilter[]
45 | */
46 | public function getFilters();
47 |
48 | /**
49 | * Returns a list of tests to add to the existing list.
50 | *
51 | * @return TwigTest[]
52 | */
53 | public function getTests();
54 |
55 | /**
56 | * Returns a list of functions to add to the existing list.
57 | *
58 | * @return TwigFunction[]
59 | */
60 | public function getFunctions();
61 |
62 | /**
63 | * Returns a list of operators to add to the existing list.
64 | *
65 | * @return array First array of unary operators, second array of binary operators
66 | */
67 | public function getOperators();
68 | }
69 |
--------------------------------------------------------------------------------
/vendor/symfony/polyfill-ctype/bootstrap80.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | use Symfony\Polyfill\Ctype as p;
13 |
14 | if (!function_exists('ctype_alnum')) {
15 | function ctype_alnum(mixed $text): bool { return p\Ctype::ctype_alnum($text); }
16 | }
17 | if (!function_exists('ctype_alpha')) {
18 | function ctype_alpha(mixed $text): bool { return p\Ctype::ctype_alpha($text); }
19 | }
20 | if (!function_exists('ctype_cntrl')) {
21 | function ctype_cntrl(mixed $text): bool { return p\Ctype::ctype_cntrl($text); }
22 | }
23 | if (!function_exists('ctype_digit')) {
24 | function ctype_digit(mixed $text): bool { return p\Ctype::ctype_digit($text); }
25 | }
26 | if (!function_exists('ctype_graph')) {
27 | function ctype_graph(mixed $text): bool { return p\Ctype::ctype_graph($text); }
28 | }
29 | if (!function_exists('ctype_lower')) {
30 | function ctype_lower(mixed $text): bool { return p\Ctype::ctype_lower($text); }
31 | }
32 | if (!function_exists('ctype_print')) {
33 | function ctype_print(mixed $text): bool { return p\Ctype::ctype_print($text); }
34 | }
35 | if (!function_exists('ctype_punct')) {
36 | function ctype_punct(mixed $text): bool { return p\Ctype::ctype_punct($text); }
37 | }
38 | if (!function_exists('ctype_space')) {
39 | function ctype_space(mixed $text): bool { return p\Ctype::ctype_space($text); }
40 | }
41 | if (!function_exists('ctype_upper')) {
42 | function ctype_upper(mixed $text): bool { return p\Ctype::ctype_upper($text); }
43 | }
44 | if (!function_exists('ctype_xdigit')) {
45 | function ctype_xdigit(mixed $text): bool { return p\Ctype::ctype_xdigit($text); }
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php:
--------------------------------------------------------------------------------
1 | getLine();
30 | $stream = $this->parser->getStream();
31 |
32 | if ($stream->test(/* Token::BLOCK_END_TYPE */ 3)) {
33 | $value = 'html';
34 | } else {
35 | $expr = $this->parser->getExpressionParser()->parseExpression();
36 | if (!$expr instanceof ConstantExpression) {
37 | throw new SyntaxError('An escaping strategy must be a string or false.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
38 | }
39 | $value = $expr->getAttribute('value');
40 | }
41 |
42 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
43 | $body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
44 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
45 |
46 | return new AutoEscapeNode($value, $body, $lineno, $this->getTag());
47 | }
48 |
49 | public function decideBlockEnd(Token $token): bool
50 | {
51 | return $token->test('endautoescape');
52 | }
53 |
54 | public function getTag(): string
55 | {
56 | return 'autoescape';
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/ArrowFunctionExpression.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class ArrowFunctionExpression extends AbstractExpression
23 | {
24 | public function __construct(AbstractExpression $expr, Node $names, $lineno, $tag = null)
25 | {
26 | parent::__construct(['expr' => $expr, 'names' => $names], [], $lineno, $tag);
27 | }
28 |
29 | public function compile(Compiler $compiler): void
30 | {
31 | $compiler
32 | ->addDebugInfo($this)
33 | ->raw('function (')
34 | ;
35 | foreach ($this->getNode('names') as $i => $name) {
36 | if ($i) {
37 | $compiler->raw(', ');
38 | }
39 |
40 | $compiler
41 | ->raw('$__')
42 | ->raw($name->getAttribute('name'))
43 | ->raw('__')
44 | ;
45 | }
46 | $compiler
47 | ->raw(') use ($context, $macros) { ')
48 | ;
49 | foreach ($this->getNode('names') as $name) {
50 | $compiler
51 | ->raw('$context["')
52 | ->raw($name->getAttribute('name'))
53 | ->raw('"] = $__')
54 | ->raw($name->getAttribute('name'))
55 | ->raw('__; ')
56 | ;
57 | }
58 | $compiler
59 | ->raw('return ')
60 | ->subcompile($this->getNode('expr'))
61 | ->raw('; }')
62 | ;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/vendor/composer/autoload_static.php:
--------------------------------------------------------------------------------
1 | __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
11 | '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
12 | );
13 |
14 | public static $prefixLengthsPsr4 = array (
15 | 'T' =>
16 | array (
17 | 'Twig\\' => 5,
18 | ),
19 | 'S' =>
20 | array (
21 | 'Symfony\\Polyfill\\Mbstring\\' => 26,
22 | 'Symfony\\Polyfill\\Ctype\\' => 23,
23 | ),
24 | );
25 |
26 | public static $prefixDirsPsr4 = array (
27 | 'Twig\\' =>
28 | array (
29 | 0 => __DIR__ . '/..' . '/twig/twig/src',
30 | ),
31 | 'Symfony\\Polyfill\\Mbstring\\' =>
32 | array (
33 | 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring',
34 | ),
35 | 'Symfony\\Polyfill\\Ctype\\' =>
36 | array (
37 | 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype',
38 | ),
39 | );
40 |
41 | public static $classMap = array (
42 | 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
43 | );
44 |
45 | public static function getInitializer(ClassLoader $loader)
46 | {
47 | return \Closure::bind(function () use ($loader) {
48 | $loader->prefixLengthsPsr4 = ComposerStaticInitfb1225d34066ee97d56bf0628c8d1270::$prefixLengthsPsr4;
49 | $loader->prefixDirsPsr4 = ComposerStaticInitfb1225d34066ee97d56bf0628c8d1270::$prefixDirsPsr4;
50 | $loader->classMap = ComposerStaticInitfb1225d34066ee97d56bf0628c8d1270::$classMap;
51 |
52 | }, null, ClassLoader::class);
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/IncludeTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getExpressionParser()->parseExpression();
33 |
34 | list($variables, $only, $ignoreMissing) = $this->parseArguments();
35 |
36 | return new IncludeNode($expr, $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag());
37 | }
38 |
39 | protected function parseArguments()
40 | {
41 | $stream = $this->parser->getStream();
42 |
43 | $ignoreMissing = false;
44 | if ($stream->nextIf(/* Token::NAME_TYPE */ 5, 'ignore')) {
45 | $stream->expect(/* Token::NAME_TYPE */ 5, 'missing');
46 |
47 | $ignoreMissing = true;
48 | }
49 |
50 | $variables = null;
51 | if ($stream->nextIf(/* Token::NAME_TYPE */ 5, 'with')) {
52 | $variables = $this->parser->getExpressionParser()->parseExpression();
53 | }
54 |
55 | $only = false;
56 | if ($stream->nextIf(/* Token::NAME_TYPE */ 5, 'only')) {
57 | $only = true;
58 | }
59 |
60 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
61 |
62 | return [$variables, $only, $ignoreMissing];
63 | }
64 |
65 | public function getTag(): string
66 | {
67 | return 'include';
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/IfNode.php:
--------------------------------------------------------------------------------
1 |
21 | */
22 | class IfNode extends Node
23 | {
24 | public function __construct(Node $tests, ?Node $else, int $lineno, string $tag = null)
25 | {
26 | $nodes = ['tests' => $tests];
27 | if (null !== $else) {
28 | $nodes['else'] = $else;
29 | }
30 |
31 | parent::__construct($nodes, [], $lineno, $tag);
32 | }
33 |
34 | public function compile(Compiler $compiler): void
35 | {
36 | $compiler->addDebugInfo($this);
37 | for ($i = 0, $count = \count($this->getNode('tests')); $i < $count; $i += 2) {
38 | if ($i > 0) {
39 | $compiler
40 | ->outdent()
41 | ->write('} elseif (')
42 | ;
43 | } else {
44 | $compiler
45 | ->write('if (')
46 | ;
47 | }
48 |
49 | $compiler
50 | ->subcompile($this->getNode('tests')->getNode($i))
51 | ->raw(") {\n")
52 | ->indent()
53 | ->subcompile($this->getNode('tests')->getNode($i + 1))
54 | ;
55 | }
56 |
57 | if ($this->hasNode('else')) {
58 | $compiler
59 | ->outdent()
60 | ->write("} else {\n")
61 | ->indent()
62 | ->subcompile($this->getNode('else'))
63 | ;
64 | }
65 |
66 | $compiler
67 | ->outdent()
68 | ->write("}\n");
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/vendor/twig/twig/.github/workflows/documentation.yml:
--------------------------------------------------------------------------------
1 | name: "Documentation"
2 |
3 | on:
4 | pull_request:
5 | push:
6 | branches:
7 | - '3.x'
8 |
9 | jobs:
10 | build:
11 | name: "Build"
12 |
13 | runs-on: ubuntu-latest
14 |
15 | steps:
16 | - name: "Checkout code"
17 | uses: actions/checkout@v2
18 |
19 | - name: "Set up Python 3.7"
20 | uses: actions/setup-python@v1
21 | with:
22 | python-version: '3.7' # Semantic version range syntax or exact version of a Python version
23 |
24 | - name: "Display Python version"
25 | run: python -c "import sys; print(sys.version)"
26 |
27 | - name: "Install Sphinx dependencies"
28 | run: sudo apt-get install python-dev build-essential
29 |
30 | - name: "Cache pip"
31 | uses: actions/cache@v2
32 | with:
33 | path: ~/.cache/pip
34 | key: ${{ runner.os }}-pip-${{ hashFiles('_build/.requirements.txt') }}
35 | restore-keys: |
36 | ${{ runner.os }}-pip-
37 |
38 | - name: "Install Sphinx + requirements via pip"
39 | working-directory: "doc"
40 | run: pip install -r _build/.requirements.txt
41 |
42 | - name: "Build documentation"
43 | working-directory: "doc"
44 | run: make -C _build SPHINXOPTS="-nqW -j auto" html
45 |
46 | doctor-rst:
47 | name: "DOCtor-RST"
48 |
49 | runs-on: ubuntu-latest
50 |
51 | steps:
52 | - name: "Checkout code"
53 | uses: actions/checkout@v2
54 |
55 | - name: "Run DOCtor-RST"
56 | uses: docker://oskarstark/doctor-rst
57 | with:
58 | args: --short
59 | env:
60 | DOCS_DIR: 'doc/'
61 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Test/NodeTestCase.php:
--------------------------------------------------------------------------------
1 | assertNodeCompilation($source, $node, $environment, $isPattern);
30 | }
31 |
32 | public function assertNodeCompilation($source, Node $node, Environment $environment = null, $isPattern = false)
33 | {
34 | $compiler = $this->getCompiler($environment);
35 | $compiler->compile($node);
36 |
37 | if ($isPattern) {
38 | $this->assertStringMatchesFormat($source, trim($compiler->getSource()));
39 | } else {
40 | $this->assertEquals($source, trim($compiler->getSource()));
41 | }
42 | }
43 |
44 | protected function getCompiler(Environment $environment = null)
45 | {
46 | return new Compiler(null === $environment ? $this->getEnvironment() : $environment);
47 | }
48 |
49 | protected function getEnvironment()
50 | {
51 | return new Environment(new ArrayLoader([]));
52 | }
53 |
54 | protected function getVariableGetter($name, $line = false)
55 | {
56 | $line = $line > 0 ? "// line $line\n" : '';
57 |
58 | return sprintf('%s($context["%s"] ?? null)', $line, $name);
59 | }
60 |
61 | protected function getAttributeGetter()
62 | {
63 | return 'twig_get_attribute($this->env, $this->source, ';
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/FromTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getExpressionParser()->parseExpression();
31 | $stream = $this->parser->getStream();
32 | $stream->expect(/* Token::NAME_TYPE */ 5, 'import');
33 |
34 | $targets = [];
35 | do {
36 | $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
37 |
38 | $alias = $name;
39 | if ($stream->nextIf('as')) {
40 | $alias = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
41 | }
42 |
43 | $targets[$name] = $alias;
44 |
45 | if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) {
46 | break;
47 | }
48 | } while (true);
49 |
50 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
51 |
52 | $var = new AssignNameExpression($this->parser->getVarName(), $token->getLine());
53 | $node = new ImportNode($macro, $var, $token->getLine(), $this->getTag(), $this->parser->isMainScope());
54 |
55 | foreach ($targets as $name => $alias) {
56 | $this->parser->addImportedSymbol('function', $alias, 'macro_'.$name, $var);
57 | }
58 |
59 | return $node;
60 | }
61 |
62 | public function getTag(): string
63 | {
64 | return 'from';
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/ImportNode.php:
--------------------------------------------------------------------------------
1 |
22 | */
23 | class ImportNode extends Node
24 | {
25 | public function __construct(AbstractExpression $expr, AbstractExpression $var, int $lineno, string $tag = null, bool $global = true)
26 | {
27 | parent::__construct(['expr' => $expr, 'var' => $var], ['global' => $global], $lineno, $tag);
28 | }
29 |
30 | public function compile(Compiler $compiler): void
31 | {
32 | $compiler
33 | ->addDebugInfo($this)
34 | ->write('$macros[')
35 | ->repr($this->getNode('var')->getAttribute('name'))
36 | ->raw('] = ')
37 | ;
38 |
39 | if ($this->getAttribute('global')) {
40 | $compiler
41 | ->raw('$this->macros[')
42 | ->repr($this->getNode('var')->getAttribute('name'))
43 | ->raw('] = ')
44 | ;
45 | }
46 |
47 | if ($this->getNode('expr') instanceof NameExpression && '_self' === $this->getNode('expr')->getAttribute('name')) {
48 | $compiler->raw('$this');
49 | } else {
50 | $compiler
51 | ->raw('$this->loadTemplate(')
52 | ->subcompile($this->getNode('expr'))
53 | ->raw(', ')
54 | ->repr($this->getTemplateName())
55 | ->raw(', ')
56 | ->repr($this->getTemplateLine())
57 | ->raw(')->unwrap()')
58 | ;
59 | }
60 |
61 | $compiler->raw(";\n");
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Profiler/Dumper/BaseDumper.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | abstract class BaseDumper
20 | {
21 | private $root;
22 |
23 | public function dump(Profile $profile): string
24 | {
25 | return $this->dumpProfile($profile);
26 | }
27 |
28 | abstract protected function formatTemplate(Profile $profile, $prefix): string;
29 |
30 | abstract protected function formatNonTemplate(Profile $profile, $prefix): string;
31 |
32 | abstract protected function formatTime(Profile $profile, $percent): string;
33 |
34 | private function dumpProfile(Profile $profile, $prefix = '', $sibling = false): string
35 | {
36 | if ($profile->isRoot()) {
37 | $this->root = $profile->getDuration();
38 | $start = $profile->getName();
39 | } else {
40 | if ($profile->isTemplate()) {
41 | $start = $this->formatTemplate($profile, $prefix);
42 | } else {
43 | $start = $this->formatNonTemplate($profile, $prefix);
44 | }
45 | $prefix .= $sibling ? '│ ' : ' ';
46 | }
47 |
48 | $percent = $this->root ? $profile->getDuration() / $this->root * 100 : 0;
49 |
50 | if ($profile->getDuration() * 1000 < 1) {
51 | $str = $start."\n";
52 | } else {
53 | $str = sprintf("%s %s\n", $start, $this->formatTime($profile, $percent));
54 | }
55 |
56 | $nCount = \count($profile->getProfiles());
57 | foreach ($profile as $i => $p) {
58 | $str .= $this->dumpProfile($p, $prefix, $i + 1 !== $nCount);
59 | }
60 |
61 | return $str;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/Filter/DefaultFilter.php:
--------------------------------------------------------------------------------
1 |
29 | */
30 | class DefaultFilter extends FilterExpression
31 | {
32 | public function __construct(Node $node, ConstantExpression $filterName, Node $arguments, int $lineno, string $tag = null)
33 | {
34 | $default = new FilterExpression($node, new ConstantExpression('default', $node->getTemplateLine()), $arguments, $node->getTemplateLine());
35 |
36 | if ('default' === $filterName->getAttribute('value') && ($node instanceof NameExpression || $node instanceof GetAttrExpression)) {
37 | $test = new DefinedTest(clone $node, 'defined', new Node(), $node->getTemplateLine());
38 | $false = \count($arguments) ? $arguments->getNode(0) : new ConstantExpression('', $node->getTemplateLine());
39 |
40 | $node = new ConditionalExpression($test, $default, $false, $node->getTemplateLine());
41 | } else {
42 | $node = $default;
43 | }
44 |
45 | parent::__construct($node, $filterName, $arguments, $lineno, $tag);
46 | }
47 |
48 | public function compile(Compiler $compiler): void
49 | {
50 | $compiler->subcompile($this->getNode('node'));
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Extension/DebugExtension.php:
--------------------------------------------------------------------------------
1 | $isDumpOutputHtmlSafe ? ['html'] : [], 'needs_context' => true, 'needs_environment' => true, 'is_variadic' => true]),
31 | ];
32 | }
33 | }
34 | }
35 |
36 | namespace {
37 | use Twig\Environment;
38 | use Twig\Template;
39 | use Twig\TemplateWrapper;
40 |
41 | function twig_var_dump(Environment $env, $context, ...$vars)
42 | {
43 | if (!$env->isDebug()) {
44 | return;
45 | }
46 |
47 | ob_start();
48 |
49 | if (!$vars) {
50 | $vars = [];
51 | foreach ($context as $key => $value) {
52 | if (!$value instanceof Template && !$value instanceof TemplateWrapper) {
53 | $vars[$key] = $value;
54 | }
55 | }
56 |
57 | var_dump($vars);
58 | } else {
59 | var_dump(...$vars);
60 | }
61 |
62 | return ob_get_clean();
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/vendor/composer/installed.php:
--------------------------------------------------------------------------------
1 | array(
3 | 'pretty_version' => 'dev-main',
4 | 'version' => 'dev-main',
5 | 'type' => 'library',
6 | 'install_path' => __DIR__ . '/../../',
7 | 'aliases' => array(),
8 | 'reference' => '1dfd1b837c1363ca6c07fbad7e75e96b8f81160b',
9 | 'name' => '__root__',
10 | 'dev' => true,
11 | ),
12 | 'versions' => array(
13 | '__root__' => array(
14 | 'pretty_version' => 'dev-main',
15 | 'version' => 'dev-main',
16 | 'type' => 'library',
17 | 'install_path' => __DIR__ . '/../../',
18 | 'aliases' => array(),
19 | 'reference' => '1dfd1b837c1363ca6c07fbad7e75e96b8f81160b',
20 | 'dev_requirement' => false,
21 | ),
22 | 'symfony/polyfill-ctype' => array(
23 | 'pretty_version' => 'v1.25.0',
24 | 'version' => '1.25.0.0',
25 | 'type' => 'library',
26 | 'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
27 | 'aliases' => array(),
28 | 'reference' => '30885182c981ab175d4d034db0f6f469898070ab',
29 | 'dev_requirement' => false,
30 | ),
31 | 'symfony/polyfill-mbstring' => array(
32 | 'pretty_version' => 'v1.25.0',
33 | 'version' => '1.25.0.0',
34 | 'type' => 'library',
35 | 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
36 | 'aliases' => array(),
37 | 'reference' => '0abb51d2f102e00a4eefcf46ba7fec406d245825',
38 | 'dev_requirement' => false,
39 | ),
40 | 'twig/twig' => array(
41 | 'pretty_version' => 'v3.4.1',
42 | 'version' => '3.4.1.0',
43 | 'type' => 'library',
44 | 'install_path' => __DIR__ . '/../twig/twig',
45 | 'aliases' => array(),
46 | 'reference' => 'e939eae92386b69b49cfa4599dd9bead6bf4a342',
47 | 'dev_requirement' => false,
48 | ),
49 | ),
50 | );
51 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/MethodCallExpression.php:
--------------------------------------------------------------------------------
1 | $node, 'arguments' => $arguments], ['method' => $method, 'safe' => false, 'is_defined_test' => false], $lineno);
21 |
22 | if ($node instanceof NameExpression) {
23 | $node->setAttribute('always_defined', true);
24 | }
25 | }
26 |
27 | public function compile(Compiler $compiler): void
28 | {
29 | if ($this->getAttribute('is_defined_test')) {
30 | $compiler
31 | ->raw('method_exists($macros[')
32 | ->repr($this->getNode('node')->getAttribute('name'))
33 | ->raw('], ')
34 | ->repr($this->getAttribute('method'))
35 | ->raw(')')
36 | ;
37 |
38 | return;
39 | }
40 |
41 | $compiler
42 | ->raw('twig_call_macro($macros[')
43 | ->repr($this->getNode('node')->getAttribute('name'))
44 | ->raw('], ')
45 | ->repr($this->getAttribute('method'))
46 | ->raw(', [')
47 | ;
48 | $first = true;
49 | foreach ($this->getNode('arguments')->getKeyValuePairs() as $pair) {
50 | if (!$first) {
51 | $compiler->raw(', ');
52 | }
53 | $first = false;
54 |
55 | $compiler->subcompile($pair['value']);
56 | }
57 | $compiler
58 | ->raw('], ')
59 | ->repr($this->getTemplateLine())
60 | ->raw(', $context, $this->getSourceContext())');
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/SandboxTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getStream();
37 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
38 | $body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
39 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
40 |
41 | // in a sandbox tag, only include tags are allowed
42 | if (!$body instanceof IncludeNode) {
43 | foreach ($body as $node) {
44 | if ($node instanceof TextNode && ctype_space($node->getAttribute('data'))) {
45 | continue;
46 | }
47 |
48 | if (!$node instanceof IncludeNode) {
49 | throw new SyntaxError('Only "include" tags are allowed within a "sandbox" section.', $node->getTemplateLine(), $stream->getSourceContext());
50 | }
51 | }
52 | }
53 |
54 | return new SandboxNode($body, $token->getLine(), $this->getTag());
55 | }
56 |
57 | public function decideBlockEnd(Token $token): bool
58 | {
59 | return $token->test('endsandbox');
60 | }
61 |
62 | public function getTag(): string
63 | {
64 | return 'sandbox';
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/NodeTraverser.php:
--------------------------------------------------------------------------------
1 |
23 | */
24 | final class NodeTraverser
25 | {
26 | private $env;
27 | private $visitors = [];
28 |
29 | /**
30 | * @param NodeVisitorInterface[] $visitors
31 | */
32 | public function __construct(Environment $env, array $visitors = [])
33 | {
34 | $this->env = $env;
35 | foreach ($visitors as $visitor) {
36 | $this->addVisitor($visitor);
37 | }
38 | }
39 |
40 | public function addVisitor(NodeVisitorInterface $visitor): void
41 | {
42 | $this->visitors[$visitor->getPriority()][] = $visitor;
43 | }
44 |
45 | /**
46 | * Traverses a node and calls the registered visitors.
47 | */
48 | public function traverse(Node $node): Node
49 | {
50 | ksort($this->visitors);
51 | foreach ($this->visitors as $visitors) {
52 | foreach ($visitors as $visitor) {
53 | $node = $this->traverseForVisitor($visitor, $node);
54 | }
55 | }
56 |
57 | return $node;
58 | }
59 |
60 | private function traverseForVisitor(NodeVisitorInterface $visitor, Node $node): ?Node
61 | {
62 | $node = $visitor->enterNode($node, $this->env);
63 |
64 | foreach ($node as $k => $n) {
65 | if (null !== $m = $this->traverseForVisitor($visitor, $n)) {
66 | if ($m !== $n) {
67 | $node->setNode($k, $m);
68 | }
69 | } else {
70 | $node->removeNode($k);
71 | }
72 | }
73 |
74 | return $visitor->leaveNode($node, $this->env);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/MacroTokenParser.php:
--------------------------------------------------------------------------------
1 |
25 | * {% endmacro %}
26 | *
27 | * @internal
28 | */
29 | final class MacroTokenParser extends AbstractTokenParser
30 | {
31 | public function parse(Token $token): Node
32 | {
33 | $lineno = $token->getLine();
34 | $stream = $this->parser->getStream();
35 | $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
36 |
37 | $arguments = $this->parser->getExpressionParser()->parseArguments(true, true);
38 |
39 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
40 | $this->parser->pushLocalScope();
41 | $body = $this->parser->subparse([$this, 'decideBlockEnd'], true);
42 | if ($token = $stream->nextIf(/* Token::NAME_TYPE */ 5)) {
43 | $value = $token->getValue();
44 |
45 | if ($value != $name) {
46 | throw new SyntaxError(sprintf('Expected endmacro for macro "%s" (but "%s" given).', $name, $value), $stream->getCurrent()->getLine(), $stream->getSourceContext());
47 | }
48 | }
49 | $this->parser->popLocalScope();
50 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
51 |
52 | $this->parser->setMacro($name, new MacroNode($name, new BodyNode([$body]), $arguments, $lineno, $this->getTag()));
53 |
54 | return new Node();
55 | }
56 |
57 | public function decideBlockEnd(Token $token): bool
58 | {
59 | return $token->test('endmacro');
60 | }
61 |
62 | public function getTag(): string
63 | {
64 | return 'macro';
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/UseTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getExpressionParser()->parseExpression();
38 | $stream = $this->parser->getStream();
39 |
40 | if (!$template instanceof ConstantExpression) {
41 | throw new SyntaxError('The template references in a "use" statement must be a string.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
42 | }
43 |
44 | $targets = [];
45 | if ($stream->nextIf('with')) {
46 | do {
47 | $name = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
48 |
49 | $alias = $name;
50 | if ($stream->nextIf('as')) {
51 | $alias = $stream->expect(/* Token::NAME_TYPE */ 5)->getValue();
52 | }
53 |
54 | $targets[$name] = new ConstantExpression($alias, -1);
55 |
56 | if (!$stream->nextIf(/* Token::PUNCTUATION_TYPE */ 9, ',')) {
57 | break;
58 | }
59 | } while (true);
60 | }
61 |
62 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
63 |
64 | $this->parser->addTrait(new Node(['template' => $template, 'targets' => new Node($targets)]));
65 |
66 | return new Node();
67 | }
68 |
69 | public function getTag(): string
70 | {
71 | return 'use';
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Profiler/Dumper/BlackfireDumper.php:
--------------------------------------------------------------------------------
1 |
18 | */
19 | final class BlackfireDumper
20 | {
21 | public function dump(Profile $profile): string
22 | {
23 | $data = [];
24 | $this->dumpProfile('main()', $profile, $data);
25 | $this->dumpChildren('main()', $profile, $data);
26 |
27 | $start = sprintf('%f', microtime(true));
28 | $str = << $values) {
37 | $str .= "$name//{$values['ct']} {$values['wt']} {$values['mu']} {$values['pmu']}\n";
38 | }
39 |
40 | return $str;
41 | }
42 |
43 | private function dumpChildren(string $parent, Profile $profile, &$data)
44 | {
45 | foreach ($profile as $p) {
46 | if ($p->isTemplate()) {
47 | $name = $p->getTemplate();
48 | } else {
49 | $name = sprintf('%s::%s(%s)', $p->getTemplate(), $p->getType(), $p->getName());
50 | }
51 | $this->dumpProfile(sprintf('%s==>%s', $parent, $name), $p, $data);
52 | $this->dumpChildren($name, $p, $data);
53 | }
54 | }
55 |
56 | private function dumpProfile(string $edge, Profile $profile, &$data)
57 | {
58 | if (isset($data[$edge])) {
59 | ++$data[$edge]['ct'];
60 | $data[$edge]['wt'] += floor($profile->getDuration() * 1000000);
61 | $data[$edge]['mu'] += $profile->getMemoryUsage();
62 | $data[$edge]['pmu'] += $profile->getPeakMemoryUsage();
63 | } else {
64 | $data[$edge] = [
65 | 'ct' => 1,
66 | 'wt' => floor($profile->getDuration() * 1000000),
67 | 'mu' => $profile->getMemoryUsage(),
68 | 'pmu' => $profile->getPeakMemoryUsage(),
69 | ];
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/Expression/NullCoalesceExpression.php:
--------------------------------------------------------------------------------
1 | getTemplateLine());
26 | // for "block()", we don't need the null test as the return value is always a string
27 | if (!$left instanceof BlockReferenceExpression) {
28 | $test = new AndBinary(
29 | $test,
30 | new NotUnary(new NullTest($left, 'null', new Node(), $left->getTemplateLine()), $left->getTemplateLine()),
31 | $left->getTemplateLine()
32 | );
33 | }
34 |
35 | parent::__construct($test, $left, $right, $lineno);
36 | }
37 |
38 | public function compile(Compiler $compiler): void
39 | {
40 | /*
41 | * This optimizes only one case. PHP 7 also supports more complex expressions
42 | * that can return null. So, for instance, if log is defined, log("foo") ?? "..." works,
43 | * but log($a["foo"]) ?? "..." does not if $a["foo"] is not defined. More advanced
44 | * cases might be implemented as an optimizer node visitor, but has not been done
45 | * as benefits are probably not worth the added complexity.
46 | */
47 | if ($this->getNode('expr2') instanceof NameExpression) {
48 | $this->getNode('expr2')->setAttribute('always_defined', true);
49 | $compiler
50 | ->raw('((')
51 | ->subcompile($this->getNode('expr2'))
52 | ->raw(') ?? (')
53 | ->subcompile($this->getNode('expr3'))
54 | ->raw('))')
55 | ;
56 | } else {
57 | parent::compile($compiler);
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Node/WithNode.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 | class WithNode extends Node
22 | {
23 | public function __construct(Node $body, ?Node $variables, bool $only, int $lineno, string $tag = null)
24 | {
25 | $nodes = ['body' => $body];
26 | if (null !== $variables) {
27 | $nodes['variables'] = $variables;
28 | }
29 |
30 | parent::__construct($nodes, ['only' => $only], $lineno, $tag);
31 | }
32 |
33 | public function compile(Compiler $compiler): void
34 | {
35 | $compiler->addDebugInfo($this);
36 |
37 | $parentContextName = $compiler->getVarName();
38 |
39 | $compiler->write(sprintf("\$%s = \$context;\n", $parentContextName));
40 |
41 | if ($this->hasNode('variables')) {
42 | $node = $this->getNode('variables');
43 | $varsName = $compiler->getVarName();
44 | $compiler
45 | ->write(sprintf('$%s = ', $varsName))
46 | ->subcompile($node)
47 | ->raw(";\n")
48 | ->write(sprintf("if (!twig_test_iterable(\$%s)) {\n", $varsName))
49 | ->indent()
50 | ->write("throw new RuntimeError('Variables passed to the \"with\" tag must be a hash.', ")
51 | ->repr($node->getTemplateLine())
52 | ->raw(", \$this->getSourceContext());\n")
53 | ->outdent()
54 | ->write("}\n")
55 | ->write(sprintf("\$%s = twig_to_array(\$%s);\n", $varsName, $varsName))
56 | ;
57 |
58 | if ($this->getAttribute('only')) {
59 | $compiler->write("\$context = [];\n");
60 | }
61 |
62 | $compiler->write(sprintf("\$context = \$this->env->mergeGlobals(array_merge(\$context, \$%s));\n", $varsName));
63 | }
64 |
65 | $compiler
66 | ->subcompile($this->getNode('body'))
67 | ->write(sprintf("\$context = \$%s;\n", $parentContextName))
68 | ;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Util/DeprecationCollector.php:
--------------------------------------------------------------------------------
1 |
20 | */
21 | final class DeprecationCollector
22 | {
23 | private $twig;
24 |
25 | public function __construct(Environment $twig)
26 | {
27 | $this->twig = $twig;
28 | }
29 |
30 | /**
31 | * Returns deprecations for templates contained in a directory.
32 | *
33 | * @param string $dir A directory where templates are stored
34 | * @param string $ext Limit the loaded templates by extension
35 | *
36 | * @return array An array of deprecations
37 | */
38 | public function collectDir(string $dir, string $ext = '.twig'): array
39 | {
40 | $iterator = new \RegexIterator(
41 | new \RecursiveIteratorIterator(
42 | new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::LEAVES_ONLY
43 | ), '{'.preg_quote($ext).'$}'
44 | );
45 |
46 | return $this->collect(new TemplateDirIterator($iterator));
47 | }
48 |
49 | /**
50 | * Returns deprecations for passed templates.
51 | *
52 | * @param \Traversable $iterator An iterator of templates (where keys are template names and values the contents of the template)
53 | *
54 | * @return array An array of deprecations
55 | */
56 | public function collect(\Traversable $iterator): array
57 | {
58 | $deprecations = [];
59 | set_error_handler(function ($type, $msg) use (&$deprecations) {
60 | if (\E_USER_DEPRECATED === $type) {
61 | $deprecations[] = $msg;
62 | }
63 | });
64 |
65 | foreach ($iterator as $name => $contents) {
66 | try {
67 | $this->twig->parse($this->twig->tokenize(new Source($contents, $name)));
68 | } catch (SyntaxError $e) {
69 | // ignore templates containing syntax errors
70 | }
71 | }
72 |
73 | restore_error_handler();
74 |
75 | return $deprecations;
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Loader/ArrayLoader.php:
--------------------------------------------------------------------------------
1 |
28 | */
29 | final class ArrayLoader implements LoaderInterface
30 | {
31 | private $templates = [];
32 |
33 | /**
34 | * @param array $templates An array of templates (keys are the names, and values are the source code)
35 | */
36 | public function __construct(array $templates = [])
37 | {
38 | $this->templates = $templates;
39 | }
40 |
41 | public function setTemplate(string $name, string $template): void
42 | {
43 | $this->templates[$name] = $template;
44 | }
45 |
46 | public function getSourceContext(string $name): Source
47 | {
48 | if (!isset($this->templates[$name])) {
49 | throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
50 | }
51 |
52 | return new Source($this->templates[$name], $name);
53 | }
54 |
55 | public function exists(string $name): bool
56 | {
57 | return isset($this->templates[$name]);
58 | }
59 |
60 | public function getCacheKey(string $name): string
61 | {
62 | if (!isset($this->templates[$name])) {
63 | throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
64 | }
65 |
66 | return $name.':'.$this->templates[$name];
67 | }
68 |
69 | public function isFresh(string $name, int $time): bool
70 | {
71 | if (!isset($this->templates[$name])) {
72 | throw new LoaderError(sprintf('Template "%s" is not defined.', $name));
73 | }
74 |
75 | return true;
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/SetTokenParser.php:
--------------------------------------------------------------------------------
1 | getLine();
36 | $stream = $this->parser->getStream();
37 | $names = $this->parser->getExpressionParser()->parseAssignmentExpression();
38 |
39 | $capture = false;
40 | if ($stream->nextIf(/* Token::OPERATOR_TYPE */ 8, '=')) {
41 | $values = $this->parser->getExpressionParser()->parseMultitargetExpression();
42 |
43 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
44 |
45 | if (\count($names) !== \count($values)) {
46 | throw new SyntaxError('When using set, you must have the same number of variables and assignments.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
47 | }
48 | } else {
49 | $capture = true;
50 |
51 | if (\count($names) > 1) {
52 | throw new SyntaxError('When using set with a block, you cannot have a multi-target.', $stream->getCurrent()->getLine(), $stream->getSourceContext());
53 | }
54 |
55 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
56 |
57 | $values = $this->parser->subparse([$this, 'decideBlockEnd'], true);
58 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
59 | }
60 |
61 | return new SetNode($capture, $names, $values, $lineno, $this->getTag());
62 | }
63 |
64 | public function decideBlockEnd(Token $token): bool
65 | {
66 | return $token->test('endset');
67 | }
68 |
69 | public function getTag(): string
70 | {
71 | return 'set';
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/profile.php:
--------------------------------------------------------------------------------
1 | contents->twoColumnBrowseResultsRenderer->tabs[4]->tabRenderer->content->sectionListRenderer->contents[0]->itemSectionRenderer->contents[0]->channelAboutFullMetadataRenderer)) {
20 | $metadata = $mainResponseObject->contents->twoColumnBrowseResultsRenderer->tabs[4]->tabRenderer->content->sectionListRenderer->contents[0]->itemSectionRenderer->contents[0]->channelAboutFullMetadataRenderer;
21 | $cDetails = array(
22 | "name" => $metadata->title->simpleText,
23 | "description" => "N/A",
24 | "thumbnail" => $metadata->avatar->thumbnails[0]->url,
25 | "joined" => $metadata->joinedDateText->runs[1]->text, // currently not implemented, will find some way to add in this shit
26 | "rss" => "https://www.youtube.com/feeds/videos.xml?channel_id=" . $id,
27 | );
28 |
29 | if (isset($metadata->description->simpleText)) {
30 | $cDetails["description"] = $metadata->description->simpleText;
31 | }
32 | } else {
33 | $metadata = $mainResponseObject->metadata->channelMetadataRenderer;
34 | $cDetails = array(
35 | "name" => $metadata->title,
36 | "description" => $metadata->description,
37 | "thumbnail" => $metadata->avatar->thumbnails[0]->url,
38 | "joined" => "N/A", //$metadata->joinedDateText->runs[1]->text,
39 | "rss" => "https://www.youtube.com/feeds/videos.xml?channel_id=" . $id,
40 | );
41 | }
42 |
43 | echo $twig->render(
44 | "profile.html.twig",
45 | [
46 | "id" => $id,
47 | "name" => $cDetails['name'],
48 | "description" => $cDetails['description'],
49 | "rss" => $cDetails['rss']
50 | ]
51 | );
52 | }
53 | // ok now go to the HTML section below........
54 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/NodeVisitor/MacroAutoImportNodeVisitor.php:
--------------------------------------------------------------------------------
1 |
26 | *
27 | * @internal
28 | */
29 | final class MacroAutoImportNodeVisitor implements NodeVisitorInterface
30 | {
31 | private $inAModule = false;
32 | private $hasMacroCalls = false;
33 |
34 | public function enterNode(Node $node, Environment $env): Node
35 | {
36 | if ($node instanceof ModuleNode) {
37 | $this->inAModule = true;
38 | $this->hasMacroCalls = false;
39 | }
40 |
41 | return $node;
42 | }
43 |
44 | public function leaveNode(Node $node, Environment $env): Node
45 | {
46 | if ($node instanceof ModuleNode) {
47 | $this->inAModule = false;
48 | if ($this->hasMacroCalls) {
49 | $node->getNode('constructor_end')->setNode('_auto_macro_import', new ImportNode(new NameExpression('_self', 0), new AssignNameExpression('_self', 0), 0, 'import', true));
50 | }
51 | } elseif ($this->inAModule) {
52 | if (
53 | $node instanceof GetAttrExpression &&
54 | $node->getNode('node') instanceof NameExpression &&
55 | '_self' === $node->getNode('node')->getAttribute('name') &&
56 | $node->getNode('attribute') instanceof ConstantExpression
57 | ) {
58 | $this->hasMacroCalls = true;
59 |
60 | $name = $node->getNode('attribute')->getAttribute('value');
61 | $node = new MethodCallExpression($node->getNode('node'), 'macro_'.$name, $node->getNode('arguments'), $node->getTemplateLine());
62 | $node->setAttribute('safe', true);
63 | }
64 | }
65 |
66 | return $node;
67 | }
68 |
69 | public function getPriority(): int
70 | {
71 | // we must be ran before auto-escaping
72 | return -10;
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/Profiler/NodeVisitor/ProfilerNodeVisitor.php:
--------------------------------------------------------------------------------
1 |
27 | */
28 | final class ProfilerNodeVisitor implements NodeVisitorInterface
29 | {
30 | private $extensionName;
31 | private $varName;
32 |
33 | public function __construct(string $extensionName)
34 | {
35 | $this->extensionName = $extensionName;
36 | $this->varName = sprintf('__internal_%s', hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $extensionName));
37 | }
38 |
39 | public function enterNode(Node $node, Environment $env): Node
40 | {
41 | return $node;
42 | }
43 |
44 | public function leaveNode(Node $node, Environment $env): ?Node
45 | {
46 | if ($node instanceof ModuleNode) {
47 | $node->setNode('display_start', new Node([new EnterProfileNode($this->extensionName, Profile::TEMPLATE, $node->getTemplateName(), $this->varName), $node->getNode('display_start')]));
48 | $node->setNode('display_end', new Node([new LeaveProfileNode($this->varName), $node->getNode('display_end')]));
49 | } elseif ($node instanceof BlockNode) {
50 | $node->setNode('body', new BodyNode([
51 | new EnterProfileNode($this->extensionName, Profile::BLOCK, $node->getAttribute('name'), $this->varName),
52 | $node->getNode('body'),
53 | new LeaveProfileNode($this->varName),
54 | ]));
55 | } elseif ($node instanceof MacroNode) {
56 | $node->setNode('body', new BodyNode([
57 | new EnterProfileNode($this->extensionName, Profile::MACRO, $node->getAttribute('name'), $this->varName),
58 | $node->getNode('body'),
59 | new LeaveProfileNode($this->varName),
60 | ]));
61 | }
62 |
63 | return $node;
64 | }
65 |
66 | public function getPriority(): int
67 | {
68 | return 0;
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/EmbedTokenParser.php:
--------------------------------------------------------------------------------
1 | parser->getStream();
30 |
31 | $parent = $this->parser->getExpressionParser()->parseExpression();
32 |
33 | list($variables, $only, $ignoreMissing) = $this->parseArguments();
34 |
35 | $parentToken = $fakeParentToken = new Token(/* Token::STRING_TYPE */ 7, '__parent__', $token->getLine());
36 | if ($parent instanceof ConstantExpression) {
37 | $parentToken = new Token(/* Token::STRING_TYPE */ 7, $parent->getAttribute('value'), $token->getLine());
38 | } elseif ($parent instanceof NameExpression) {
39 | $parentToken = new Token(/* Token::NAME_TYPE */ 5, $parent->getAttribute('name'), $token->getLine());
40 | }
41 |
42 | // inject a fake parent to make the parent() function work
43 | $stream->injectTokens([
44 | new Token(/* Token::BLOCK_START_TYPE */ 1, '', $token->getLine()),
45 | new Token(/* Token::NAME_TYPE */ 5, 'extends', $token->getLine()),
46 | $parentToken,
47 | new Token(/* Token::BLOCK_END_TYPE */ 3, '', $token->getLine()),
48 | ]);
49 |
50 | $module = $this->parser->parse($stream, [$this, 'decideBlockEnd'], true);
51 |
52 | // override the parent with the correct one
53 | if ($fakeParentToken === $parentToken) {
54 | $module->setNode('parent', $parent);
55 | }
56 |
57 | $this->parser->embedTemplate($module);
58 |
59 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
60 |
61 | return new EmbedNode($module->getTemplateName(), $module->getAttribute('index'), $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag());
62 | }
63 |
64 | public function decideBlockEnd(Token $token): bool
65 | {
66 | return $token->test('endembed');
67 | }
68 |
69 | public function getTag(): string
70 | {
71 | return 'embed';
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/vendor/twig/twig/src/TokenParser/ForTokenParser.php:
--------------------------------------------------------------------------------
1 |
24 | * {% for user in users %}
25 | * {{ user.username|e }}
26 | * {% endfor %}
27 | *
28 | *
29 | * @internal
30 | */
31 | final class ForTokenParser extends AbstractTokenParser
32 | {
33 | public function parse(Token $token): Node
34 | {
35 | $lineno = $token->getLine();
36 | $stream = $this->parser->getStream();
37 | $targets = $this->parser->getExpressionParser()->parseAssignmentExpression();
38 | $stream->expect(/* Token::OPERATOR_TYPE */ 8, 'in');
39 | $seq = $this->parser->getExpressionParser()->parseExpression();
40 |
41 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
42 | $body = $this->parser->subparse([$this, 'decideForFork']);
43 | if ('else' == $stream->next()->getValue()) {
44 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
45 | $else = $this->parser->subparse([$this, 'decideForEnd'], true);
46 | } else {
47 | $else = null;
48 | }
49 | $stream->expect(/* Token::BLOCK_END_TYPE */ 3);
50 |
51 | if (\count($targets) > 1) {
52 | $keyTarget = $targets->getNode(0);
53 | $keyTarget = new AssignNameExpression($keyTarget->getAttribute('name'), $keyTarget->getTemplateLine());
54 | $valueTarget = $targets->getNode(1);
55 | } else {
56 | $keyTarget = new AssignNameExpression('_key', $lineno);
57 | $valueTarget = $targets->getNode(0);
58 | }
59 | $valueTarget = new AssignNameExpression($valueTarget->getAttribute('name'), $valueTarget->getTemplateLine());
60 |
61 | return new ForNode($keyTarget, $valueTarget, $seq, null, $body, $else, $lineno, $this->getTag());
62 | }
63 |
64 | public function decideForFork(Token $token): bool
65 | {
66 | return $token->test(['else', 'endfor']);
67 | }
68 |
69 | public function decideForEnd(Token $token): bool
70 | {
71 | return $token->test('endfor');
72 | }
73 |
74 | public function getTag(): string
75 | {
76 | return 'for';
77 | }
78 | }
79 |
--------------------------------------------------------------------------------