Error
Call to undefined function mb_ord() Error thrown with message "Call to undefined function mb_ord()" Stacktrace: #74 Error in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Extension/CoreExtension.php:1240 #73 _twig_escape_js_callback in [internal]:0 #72 preg_replace_callback in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Extension/CoreExtension.php:1099 #71 twig_escape_filter in /home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/04/04c0e8b9c0ed9a638a36b68d5ab3fb3814845e4074dcfb66a5c5b8222af7c8ac.php:210 #70 __TwigTemplate_6858027efab566b63900e5cc02f02178094c427938a20ea8f522a28ed39f1d1c:block_javascript_footer in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:214 #69 Twig\Template:displayBlock in /home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/86/868a08f1ba6ab78ea65046b77482e6ab9a656354ce39bd5c8c4ac8bd01691755.php:69 #68 __TwigTemplate_5325f9e8a6308c003721e83f18e17e3137eb4b228dcdf5a3f1c9916182cc1125:doDisplay in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:453 #67 Twig\Template:displayWithErrorHandling in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:420 #66 Twig\Template:display in /home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/04/04c0e8b9c0ed9a638a36b68d5ab3fb3814845e4074dcfb66a5c5b8222af7c8ac.php:36 #65 __TwigTemplate_6858027efab566b63900e5cc02f02178094c427938a20ea8f522a28ed39f1d1c:doDisplay in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:453 #64 Twig\Template:displayWithErrorHandling in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:420 #63 Twig\Template:display in /home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/02/02fec483a25785cd1d61c099aecbb16dca59330cfaffa2a0f53e4a2849895c7d.php:85 #62 __TwigTemplate_3e8f9d4b32f9d95eae22352a56cb2f47866f772112ab696111c98c6f8ee638fc:doDisplay in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:453 #61 Twig\Template:displayWithErrorHandling in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:420 #60 Twig\Template:display in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:432 #59 Twig\Template:render in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/TemplateWrapper.php:47 #58 Twig\TemplateWrapper:render in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Environment.php:384 #57 Twig\Environment:render in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Component/Theme/AbstractTheme.php:176 #56 Gantry\Component\Theme\AbstractTheme:render in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:825 #55 Gantry\Framework\Theme:getContent in /home/ix22pcel/public_html/modules/mod_gantry5_particle/helper.php:141 #54 ModGantry5ParticleHelper:render in /home/ix22pcel/public_html/modules/mod_gantry5_particle/helper.php:158 #53 ModGantry5ParticleHelper:cache in /home/ix22pcel/public_html/libraries/src/Cache/Controller/CallbackController.php:173 #52 call_user_func_array in /home/ix22pcel/public_html/libraries/src/Cache/Controller/CallbackController.php:173 #51 Joomla\CMS\Cache\Controller\CallbackController:get in /home/ix22pcel/public_html/libraries/src/Helper/ModuleHelper.php:566 #50 Joomla\CMS\Helper\ModuleHelper:moduleCache in /home/ix22pcel/public_html/modules/mod_gantry5_particle/helper.php:169 #49 ModGantry5ParticleHelper:moduleCache in /home/ix22pcel/public_html/modules/mod_gantry5_particle/mod_gantry5_particle.php:53 #48 include in /home/ix22pcel/public_html/libraries/src/Helper/ModuleHelper.php:200 #47 Joomla\CMS\Helper\ModuleHelper:renderModule in /home/ix22pcel/public_html/libraries/src/Document/Renderer/Html/ModuleRenderer.php:98 #46 Joomla\CMS\Document\Renderer\Html\ModuleRenderer:render in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Framework/Platform.php:294 #45 Gantry\Framework\Platform:displayModule in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Framework/Platform.php:342 #44 Gantry\Framework\Platform:displayModules in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:702 #43 Twig\Template:getAttribute in /home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/6e/6e1ec8d44f5e425e01a281158b87a1f189ccefee356b44ad8e7b142af551cc8c.php:43 #42 __TwigTemplate_a171fb48cf22906d09fa66f4b1d3ca6945293f478b49720cf76f4bde2f5f8a4b:block_particle in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:214 #41 Twig\Template:displayBlock in /home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/86/868a08f1ba6ab78ea65046b77482e6ab9a656354ce39bd5c8c4ac8bd01691755.php:73 #40 __TwigTemplate_5325f9e8a6308c003721e83f18e17e3137eb4b228dcdf5a3f1c9916182cc1125:doDisplay in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:453 #39 Twig\Template:displayWithErrorHandling in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:420 #38 Twig\Template:display in /home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/6e/6e1ec8d44f5e425e01a281158b87a1f189ccefee356b44ad8e7b142af551cc8c.php:35 #37 __TwigTemplate_a171fb48cf22906d09fa66f4b1d3ca6945293f478b49720cf76f4bde2f5f8a4b:doDisplay in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:453 #36 Twig\Template:displayWithErrorHandling in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:420 #35 Twig\Template:display in /home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/99/99926549a28d8bfebd842f14e5a0609eea0cd205fe66582ca7baa40967bd5d8d.php:53 #34 __TwigTemplate_d8f3a01587c4bf1efa111d178f7fd3873c5be244eb8a8c83148d5b578d2ca2f8:doDisplay in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:453 #33 Twig\Template:displayWithErrorHandling in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:420 #32 Twig\Template:display in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:432 #31 Twig\Template:render in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/TemplateWrapper.php:47 #30 Twig\TemplateWrapper:render in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Environment.php:384 #29 Twig\Environment:render in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Component/Theme/AbstractTheme.php:176 #28 Gantry\Component\Theme\AbstractTheme:render in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:825 #27 Gantry\Framework\Theme:getContent in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:718 #26 Gantry\Framework\Theme:renderContent in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:643 #25 Gantry\Framework\Theme:prepareLayout in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:627 #24 Gantry\Framework\Theme:prepareLayout in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:627 #23 Gantry\Framework\Theme:prepareLayout in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:627 #22 Gantry\Framework\Theme:prepareLayout in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:468 #21 Gantry\Framework\Theme:segments in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:700 #20 Twig\Template:getAttribute in /home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/a8/a8db29e5fe41412946024c3453eb5971b470880e5b3a5f207f55b7542f78ce4b.php:47 #19 __TwigTemplate_84591cb8e49bc57cca27a12ed8ed0b8c985b1c4bd33f8cfe748eda593153f030:doDisplay in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:453 #18 Twig\Template:displayWithErrorHandling in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:420 #17 Twig\Template:display in /home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/98/984ffd473a9dad9725966609c1cd9d1ffbddfa9b80c7c7c21efed5c9ab59ca7e.php:35 #16 __TwigTemplate_79fb545c5f9cacdf5305b293d3c5073a3cc969f1e557ae2093fb9fbc9fa59ee6:doDisplay in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:453 #15 Twig\Template:displayWithErrorHandling in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:420 #14 Twig\Template:display in /home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/70/709e1f4986e1cb19f04225c78a3b222ed1173e426e94897c0d4fae0331380825.php:35 #13 __TwigTemplate_a3af996eca0dc5965d901949fbfb9833bc3776ee36062337f5f4fb3283afc4b0:doDisplay in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:453 #12 Twig\Template:displayWithErrorHandling in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:420 #11 Twig\Template:display in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Template.php:432 #10 Twig\Template:render in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/TemplateWrapper.php:47 #9 Twig\TemplateWrapper:render in /home/ix22pcel/public_html/libraries/gantry5/compat/vendor/twig/twig/src/Environment.php:384 #8 Twig\Environment:render in /home/ix22pcel/public_html/libraries/gantry5/src/classes/Gantry/Component/Theme/AbstractTheme.php:176 #7 Gantry\Component\Theme\AbstractTheme:render in /home/ix22pcel/public_html/templates/rt_galatea/index.php:23 #6 require in /home/ix22pcel/public_html/libraries/src/Document/HtmlDocument.php:678 #5 Joomla\CMS\Document\HtmlDocument:_loadTemplate in /home/ix22pcel/public_html/libraries/src/Document/HtmlDocument.php:740 #4 Joomla\CMS\Document\HtmlDocument:_fetchTemplate in /home/ix22pcel/public_html/libraries/src/Document/HtmlDocument.php:555 #3 Joomla\CMS\Document\HtmlDocument:parse in /home/ix22pcel/public_html/libraries/src/Application/CMSApplication.php:1098 #2 Joomla\CMS\Application\CMSApplication:render in /home/ix22pcel/public_html/libraries/src/Application/SiteApplication.php:778 #1 Joomla\CMS\Application\SiteApplication:render in /home/ix22pcel/public_html/libraries/src/Application/CMSApplication.php:231 #0 Joomla\CMS\Application\CMSApplication:execute in /home/ix22pcel/public_html/index.php:49
Stack frames (75)
74
Error
/compat/vendor/twig/twig/src/Extension/CoreExtension.php1240
73
_twig_escape_js_callback
[internal]0
72
preg_replace_callback
/compat/vendor/twig/twig/src/Extension/CoreExtension.php1099
71
twig_escape_filter
/home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/04/04c0e8b9c0ed9a638a36b68d5ab3fb3814845e4074dcfb66a5c5b8222af7c8ac.php210
70
__TwigTemplate_6858027efab566b63900e5cc02f02178094c427938a20ea8f522a28ed39f1d1c block_javascript_footer
/compat/vendor/twig/twig/src/Template.php214
69
Twig\Template displayBlock
/home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/86/868a08f1ba6ab78ea65046b77482e6ab9a656354ce39bd5c8c4ac8bd01691755.php69
68
__TwigTemplate_5325f9e8a6308c003721e83f18e17e3137eb4b228dcdf5a3f1c9916182cc1125 doDisplay
/compat/vendor/twig/twig/src/Template.php453
67
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
66
Twig\Template display
/home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/04/04c0e8b9c0ed9a638a36b68d5ab3fb3814845e4074dcfb66a5c5b8222af7c8ac.php36
65
__TwigTemplate_6858027efab566b63900e5cc02f02178094c427938a20ea8f522a28ed39f1d1c doDisplay
/compat/vendor/twig/twig/src/Template.php453
64
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
63
Twig\Template display
/home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/02/02fec483a25785cd1d61c099aecbb16dca59330cfaffa2a0f53e4a2849895c7d.php85
62
__TwigTemplate_3e8f9d4b32f9d95eae22352a56cb2f47866f772112ab696111c98c6f8ee638fc doDisplay
/compat/vendor/twig/twig/src/Template.php453
61
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
60
Twig\Template display
/compat/vendor/twig/twig/src/Template.php432
59
Twig\Template render
/compat/vendor/twig/twig/src/TemplateWrapper.php47
58
Twig\TemplateWrapper render
/compat/vendor/twig/twig/src/Environment.php384
57
Twig\Environment render
/src/classes/Gantry/Component/Theme/AbstractTheme.php176
56
Gantry\Component\Theme\AbstractTheme render
/src/classes/Gantry/Component/Theme/ThemeTrait.php825
55
Gantry\Framework\Theme getContent
/home/ix22pcel/public_html/modules/mod_gantry5_particle/helper.php141
54
ModGantry5ParticleHelper render
/home/ix22pcel/public_html/modules/mod_gantry5_particle/helper.php158
53
ModGantry5ParticleHelper cache
/home/ix22pcel/public_html/libraries/src/Cache/Controller/CallbackController.php173
52
call_user_func_array
/home/ix22pcel/public_html/libraries/src/Cache/Controller/CallbackController.php173
51
Joomla\CMS\Cache\Controller\CallbackController get
/home/ix22pcel/public_html/libraries/src/Helper/ModuleHelper.php566
50
Joomla\CMS\Helper\ModuleHelper moduleCache
/home/ix22pcel/public_html/modules/mod_gantry5_particle/helper.php169
49
ModGantry5ParticleHelper moduleCache
/home/ix22pcel/public_html/modules/mod_gantry5_particle/mod_gantry5_particle.php53
48
include
/home/ix22pcel/public_html/libraries/src/Helper/ModuleHelper.php200
47
Joomla\CMS\Helper\ModuleHelper renderModule
/home/ix22pcel/public_html/libraries/src/Document/Renderer/Html/ModuleRenderer.php98
46
Joomla\CMS\Document\Renderer\Html\ModuleRenderer render
/src/classes/Gantry/Framework/Platform.php294
45
Gantry\Framework\Platform displayModule
/src/classes/Gantry/Framework/Platform.php342
44
Gantry\Framework\Platform displayModules
/compat/vendor/twig/twig/src/Template.php702
43
Twig\Template getAttribute
/home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/6e/6e1ec8d44f5e425e01a281158b87a1f189ccefee356b44ad8e7b142af551cc8c.php43
42
__TwigTemplate_a171fb48cf22906d09fa66f4b1d3ca6945293f478b49720cf76f4bde2f5f8a4b block_particle
/compat/vendor/twig/twig/src/Template.php214
41
Twig\Template displayBlock
/home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/86/868a08f1ba6ab78ea65046b77482e6ab9a656354ce39bd5c8c4ac8bd01691755.php73
40
__TwigTemplate_5325f9e8a6308c003721e83f18e17e3137eb4b228dcdf5a3f1c9916182cc1125 doDisplay
/compat/vendor/twig/twig/src/Template.php453
39
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
38
Twig\Template display
/home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/6e/6e1ec8d44f5e425e01a281158b87a1f189ccefee356b44ad8e7b142af551cc8c.php35
37
__TwigTemplate_a171fb48cf22906d09fa66f4b1d3ca6945293f478b49720cf76f4bde2f5f8a4b doDisplay
/compat/vendor/twig/twig/src/Template.php453
36
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
35
Twig\Template display
/home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/99/99926549a28d8bfebd842f14e5a0609eea0cd205fe66582ca7baa40967bd5d8d.php53
34
__TwigTemplate_d8f3a01587c4bf1efa111d178f7fd3873c5be244eb8a8c83148d5b578d2ca2f8 doDisplay
/compat/vendor/twig/twig/src/Template.php453
33
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
32
Twig\Template display
/compat/vendor/twig/twig/src/Template.php432
31
Twig\Template render
/compat/vendor/twig/twig/src/TemplateWrapper.php47
30
Twig\TemplateWrapper render
/compat/vendor/twig/twig/src/Environment.php384
29
Twig\Environment render
/src/classes/Gantry/Component/Theme/AbstractTheme.php176
28
Gantry\Component\Theme\AbstractTheme render
/src/classes/Gantry/Component/Theme/ThemeTrait.php825
27
Gantry\Framework\Theme getContent
/src/classes/Gantry/Component/Theme/ThemeTrait.php718
26
Gantry\Framework\Theme renderContent
/src/classes/Gantry/Component/Theme/ThemeTrait.php643
25
Gantry\Framework\Theme prepareLayout
/src/classes/Gantry/Component/Theme/ThemeTrait.php627
24
Gantry\Framework\Theme prepareLayout
/src/classes/Gantry/Component/Theme/ThemeTrait.php627
23
Gantry\Framework\Theme prepareLayout
/src/classes/Gantry/Component/Theme/ThemeTrait.php627
22
Gantry\Framework\Theme prepareLayout
/src/classes/Gantry/Component/Theme/ThemeTrait.php468
21
Gantry\Framework\Theme segments
/compat/vendor/twig/twig/src/Template.php700
20
Twig\Template getAttribute
/home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/a8/a8db29e5fe41412946024c3453eb5971b470880e5b3a5f207f55b7542f78ce4b.php47
19
__TwigTemplate_84591cb8e49bc57cca27a12ed8ed0b8c985b1c4bd33f8cfe748eda593153f030 doDisplay
/compat/vendor/twig/twig/src/Template.php453
18
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
17
Twig\Template display
/home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/98/984ffd473a9dad9725966609c1cd9d1ffbddfa9b80c7c7c21efed5c9ab59ca7e.php35
16
__TwigTemplate_79fb545c5f9cacdf5305b293d3c5073a3cc969f1e557ae2093fb9fbc9fa59ee6 doDisplay
/compat/vendor/twig/twig/src/Template.php453
15
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
14
Twig\Template display
/home/ix22pcel/public_html/cache/gantry5/rt_galatea/twig/70/709e1f4986e1cb19f04225c78a3b222ed1173e426e94897c0d4fae0331380825.php35
13
__TwigTemplate_a3af996eca0dc5965d901949fbfb9833bc3776ee36062337f5f4fb3283afc4b0 doDisplay
/compat/vendor/twig/twig/src/Template.php453
12
Twig\Template displayWithErrorHandling
/compat/vendor/twig/twig/src/Template.php420
11
Twig\Template display
/compat/vendor/twig/twig/src/Template.php432
10
Twig\Template render
/compat/vendor/twig/twig/src/TemplateWrapper.php47
9
Twig\TemplateWrapper render
/compat/vendor/twig/twig/src/Environment.php384
8
Twig\Environment render
/src/classes/Gantry/Component/Theme/AbstractTheme.php176
7
Gantry\Component\Theme\AbstractTheme render
/home/ix22pcel/public_html/templates/rt_galatea/index.php23
6
require
/home/ix22pcel/public_html/libraries/src/Document/HtmlDocument.php678
5
Joomla\CMS\Document\HtmlDocument _loadTemplate
/home/ix22pcel/public_html/libraries/src/Document/HtmlDocument.php740
4
Joomla\CMS\Document\HtmlDocument _fetchTemplate
/home/ix22pcel/public_html/libraries/src/Document/HtmlDocument.php555
3
Joomla\CMS\Document\HtmlDocument parse
/home/ix22pcel/public_html/libraries/src/Application/CMSApplication.php1098
2
Joomla\CMS\Application\CMSApplication render
/home/ix22pcel/public_html/libraries/src/Application/SiteApplication.php778
1
Joomla\CMS\Application\SiteApplication render
/home/ix22pcel/public_html/libraries/src/Application/CMSApplication.php231
0
Joomla\CMS\Application\CMSApplication execute
/home/ix22pcel/public_html/index.php49
    /*
     * A few characters have short escape sequences in JSON and JavaScript.
     * Escape sequences supported only by JavaScript, not JSON, are omitted.
     * \" is also supported but omitted, because the resulting string is not HTML safe.
     */
    static $shortMap = [
        '\\' => '\\\\',
        '/' => '\\/',
        "\x08" => '\b',
        "\x0C" => '\f',
        "\x0A" => '\n',
        "\x0D" => '\r',
        "\x09" => '\t',
    ];
 
    if (isset($shortMap[$char])) {
        return $shortMap[$char];
    }
 
    $codepoint = mb_ord($char, 'UTF-8');
    if (0x10000 > $codepoint) {
        return sprintf('\u%04X', $codepoint);
    }
 
    // Split characters outside the BMP into surrogate pairs
    // https://tools.ietf.org/html/rfc2781.html#section-2.1
    $u = $codepoint - 0x10000;
    $high = 0xD800 | ($u >> 10);
    $low = 0xDC00 | ($u & 0x3FF);
 
    return sprintf('\u%04X\u%04X', $high, $low);
}
 
function _twig_escape_css_callback($matches)
{
    $char = $matches[0];
 
    return sprintf('\\%X ', 1 === \strlen($char) ? \ord($char) : twig_ord($char));
}
 
                return htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, $charset);
            }
 
            $string = twig_convert_encoding($string, 'UTF-8', $charset);
            $string = htmlspecialchars($string, \ENT_QUOTES | \ENT_SUBSTITUTE, 'UTF-8');
 
            return twig_convert_encoding($string, $charset, 'UTF-8');
 
        case 'js':
            // escape all non-alphanumeric characters
            // into their \x or \uHHHH representations
            if ('UTF-8' !== $charset) {
                $string = twig_convert_encoding($string, 'UTF-8', $charset);
            }
 
            if (!preg_match('//u', $string)) {
                throw new RuntimeError('The string to escape is not a valid UTF-8 string.');
            }
 
            $string = preg_replace_callback('#[^a-zA-Z0-9,\._]#Su', '_twig_escape_js_callback', $string);
 
            if ('UTF-8' !== $charset) {
                $string = twig_convert_encoding($string, $charset, 'UTF-8');
            }
 
            return $string;
 
        case 'css':
            if ('UTF-8' !== $charset) {
                $string = twig_convert_encoding($string, 'UTF-8', $charset);
            }
 
            if (!preg_match('//u', $string)) {
                throw new RuntimeError('The string to escape is not a valid UTF-8 string.');
            }
 
            $string = preg_replace_callback('#[^a-zA-Z0-9]#Su', '_twig_escape_css_callback', $string);
 
            if ('UTF-8' !== $charset) {
                $string = twig_convert_encoding($string, $charset, 'UTF-8');
        } else {
            echo "false";
        }
        echo ",
\t    animateOut: '";
        // line 55
        echo twig_escape_filter($this->env, (($this->getAttribute(($context["particle"] ?? null), "animateOut", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "animateOut", []), "fadeOut")) : ("fadeOut")));
        echo "',
\t    animateIn: '";
        // line 56
        echo twig_escape_filter($this->env, (($this->getAttribute(($context["particle"] ?? null), "animateIn", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "animateIn", []), "fadeIn")) : ("fadeIn")));
        echo "',
\t    ";
        // line 57
        if ($this->getAttribute(($context["particle"] ?? null), "nav", [])) {
            // line 58
            echo "\t\t\tnav: true,
\t\t\tnavText: ['";
            // line 59
            echo twig_escape_filter($this->env, twig_escape_filter($this->env, (($this->getAttribute(($context["particle"] ?? null), "prevText", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "prevText", []), "←")) : ("←")), "js"), "html", null, true);
            echo "', '";
            echo twig_escape_filter($this->env, twig_escape_filter($this->env, (($this->getAttribute(($context["particle"] ?? null), "nextText", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "nextText", []), "→")) : ("→")), "js"), "html", null, true);
            echo "'],
\t\t";
        } else {
            // line 61
            echo "\t\t\tnav: false,
\t\t";
        }
        // line 63
        echo "\t    ";
        if ($this->getAttribute(($context["particle"] ?? null), "dots", [])) {
            // line 64
            echo "\t\t\tdots: true,
\t\t";
        } else {
            // line 66
            echo "\t\t\tdots: false,
\t\t";
        }
 
        if ($useBlocks && isset($blocks[$name])) {
            $template = $blocks[$name][0];
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
        } else {
            $template = null;
            $block = null;
        }
 
        // avoid RCEs when sandbox is enabled
        if (null !== $template && !$template instanceof self) {
            throw new \LogicException('A block must be a method on a \Twig\Template instance.');
        }
 
        if (null !== $template) {
            try {
                $template->$block($context, $blocks);
            } catch (Error $e) {
                if (!$e->getSourceContext()) {
                    $e->setSourceContext($template->getSourceContext());
                }
 
                // this is mostly useful for \Twig\Error\LoaderError exceptions
                // see \Twig\Error\LoaderError
                if (-1 === $e->getTemplateLine()) {
                    $e->guess();
                }
 
                throw $e;
            } catch (\Exception $e) {
                $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
                $e->guess();
 
                throw $e;
            }
        } elseif (false !== $parent = $this->getParent($context)) {
            $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
    ";
        // line 5
        $this->displayBlock('javascript', $context, $blocks);
        $content = ob_get_clean();
        $assetFunction($content, $location, $priority);
        // line 9
        $assetFunction = $this->env->getFunction('parse_assets')->getCallable();
        $assetVariables = [];
        if ($assetVariables && !is_array($assetVariables)) {
            throw new UnexpectedValueException('{% scripts with x %}: x is not an array');
        }
        $location = "footer";
        if ($location && !is_string($location)) {
            throw new UnexpectedValueException('{% scripts in x %}: x is not a string');
        }
        $priority = isset($assetVariables['priority']) ? $assetVariables['priority'] : 0;
        ob_start();
        // line 10
        echo "    ";
        $this->displayBlock('javascript_footer', $context, $blocks);
        $content = ob_get_clean();
        $assetFunction($content, $location, $priority);
        // line 14
        $this->displayBlock('particle', $context, $blocks);
    }
 
    // line 2
    public function block_stylesheets($context, array $blocks = [])
    {
        // line 3
        echo "    ";
    }
 
    // line 5
    public function block_javascript($context, array $blocks = [])
    {
        // line 6
        echo "    ";
    }
 
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'particle' => [$this, 'block_particle'],
            'javascript_footer' => [$this, 'block_javascript_footer'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/partials/particle.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/partials/particle.html.twig", "@particles/owlcarousel.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_particle($context, array $blocks = [])
    {
        // line 4
        echo "
";
        // line 5
        if ($this->getAttribute(($context["particle"] ?? null), "footerShadow", [])) {
            // line 6
            $assetFunction = $this->env->getFunction('parse_assets')->getCallable();
            $assetVariables = ["priority" =>  -10];
            if ($assetVariables && !is_array($assetVariables)) {
                throw new UnexpectedValueException('{% scripts with x %}: x is not an array');
            }
            $location = "head";
            if ($location && !is_string($location)) {
                throw new UnexpectedValueException('{% scripts in x %}: x is not a string');
            }
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                    echo "            ";
                    $context["particle"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "getJoined", [0 => ("particles." . $this->getAttribute(($context["segment"] ?? null), "subtype", [])), 1 => $this->getAttribute(($context["segment"] ?? null), "attributes", [])], "method");
                    // line 15
                    echo "        ";
                }
                // line 16
                echo "    ";
            }
            // line 17
            echo "
    ";
            // line 18
            ob_start(function () { return ''; });
            // line 19
            echo "        ";
            if ((($context["enabled"] ?? null) && ((null === $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "enabled", [])) || $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "enabled", [])))) {
                // line 20
                echo "            ";
                $this->loadTemplate([0 => (("particles/" . $this->getAttribute(($context["segment"] ?? null), "subtype", [])) . ".html.twig"), 1 => (("@particles/" . $this->getAttribute(                // line 21
($context["segment"] ?? null), "subtype", [])) . ".html.twig"), 2 => "@nucleus/content/missing.html.twig"], "@nucleus/content/particle.html.twig", 20)->display($context);
                // line 23
                echo "        ";
            }
            // line 24
            echo "    ";
            $context["html"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
            // line 25
            echo "    ";
            $context["html"] = twig_trim_filter(($context["html"] ?? null));
            // line 26
            echo "
    ";
            // line 27
            $context["classes"] = twig_trim_filter(((( !($context["inContent"] ?? null)) ? ("g-content g-particle ") : ("g-particle ")) . twig_join_filter($this->getAttribute(($context["segment"] ?? null), "classes", []), " ")));
            // line 28
            if (($context["html"] ?? null)) {
                // line 29
                if ($this->getAttribute(($context["gantry"] ?? null), "debug", [])) {
                    echo "<!-- START PARTICLE ";
                    echo twig_escape_filter($this->env, ($context["id"] ?? null), "html", null, true);
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
     * @internal
     */
    public function __construct(Environment $env, Template $template)
    {
        $this->env = $env;
        $this->template = $template;
    }
 
    /**
     * Renders the template.
     *
     * @param array $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     */
    public function render($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Displays the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function display($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        $this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Checks if a block is defined.
     *
     * @param string $name    The block name
     * @param array  $context An array of parameters to pass to the template
     *
        @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED);
 
        return $this->templateClassPrefix;
    }
 
    /**
     * Renders a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function render($name, array $context = [])
    {
        return $this->load($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function display($name, array $context = [])
    {
        $this->load($name)->display($context);
    }
 
    /**
     * Loads a template.
     *
 
            $this->renderer = $this->extendTwig($twig, $loader);
        }
 
        return $this->renderer;
    }
 
    /**
     * Render a template file by using given context.
     *
     * @param string $file
     * @param array $context
     * @return string
     */
    public function render($file, array $context = [])
    {
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $this->renderer()->render($file, $context);
    }
 
    /**
     * Compile and render twig string.
     *
     * @param string $string
     * @param array $context
     * @return string
     */
    public function compile($string, array $context = [])
    {
        $renderer = $this->renderer();
        $template = $renderer->createTemplate($string);
 
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $template->render($context);
    }
 
            $file = PhpFile::instance($filename);
            if ($file->exists()) {
                try {
                    return ContentBlock::fromArray((array) $file->content());
                } catch (\Exception $e) {
                    // Invalid cache, continue to rendering.
                    if (\GANTRY_DEBUGGER) {
                        Debugger::addMessage(sprintf('Failed to load %s %s cache', $item->type, $item->id), 'debug');
                    }
                }
            }
        }
 
        // Create new document context for assets.
        $context = $this->getContext(['segment' => $item, 'enabled' => 1, 'particle' => $particle] + $options);
 
        /** @var Document $document */
        $document = $gantry['document'];
        $document::push();
        $html = trim($this->render("@nucleus/content/{$item->type}.html.twig", $context));
        $content = $document::pop()->setContent($html);
 
        if (isset($file)) {
            // Save HTML and assets into the cache.
            if (\GANTRY_DEBUGGER) {
                Debugger::addMessage(sprintf('Caching %s %s', $item->type, $item->id), 'debug');
            }
 
            $file->save($content->toArray());
        }
 
        return $content;
    }
}
 
            }
        }
 
        $id = static::getIdentifier($particle, $module->id);
        $object = (object) array(
            'id' => $id,
            'type' => $type,
            'subtype' => $particle,
            'attributes' => $data['options']['particle'],
        );
 
        $context = array(
            'gantry' => $gantry,
            'inContent' => true,
            'ajax' => $params->get('ajax'),
        );
 
        /** @var Theme $theme */
        $theme = $gantry['theme'];
        $block = $theme->getContent($object, $context);
 
        // Create outer block with the particle ID for AJAX calls.
        $outer = \Gantry\Component\Content\Block\HtmlBlock::create();
        $outer->setContent('<div id="' . $id . '-particle" class="g-particle">' . $block->getToken() . '</div>');
        $outer->addBlock($block);
 
        return $outer;
    }
 
    /**
     * @param $module
     * @param $params
     * @return array
     */
    public static function cache($module, $params)
    {
        return static::render($module, $params)->toArray();
    }
 
    /**
        /** @var Theme $theme */
        $theme = $gantry['theme'];
        $block = $theme->getContent($object, $context);
 
        // Create outer block with the particle ID for AJAX calls.
        $outer = \Gantry\Component\Content\Block\HtmlBlock::create();
        $outer->setContent('<div id="' . $id . '-particle" class="g-particle">' . $block->getToken() . '</div>');
        $outer->addBlock($block);
 
        return $outer;
    }
 
    /**
     * @param $module
     * @param $params
     * @return array
     */
    public static function cache($module, $params)
    {
        return static::render($module, $params)->toArray();
    }
 
    /**
     * @param $module
     * @param $params
     * @param $cacheparams
     * @return ContentBlockInterface|null
     */
    public static function moduleCache($module, $params, $cacheparams)
    {
        $block = (array) ModuleHelper::moduleCache($module, $params, $cacheparams);
        try {
            return $block ? HtmlBlock::fromArray($block) : null;
        } catch (Exception $e) {
            return null;
        }
    }
 
    /**
     * @param string $particle
            if (method_exists($document, 'getHeadData'))
            {
                $coptions['headerbefore'] = $document->getHeadData();
            }
 
            $coptions['modulemode'] = 1;
        }
        else
        {
            $coptions['modulemode'] = 0;
        }
 
        $coptions['nopathway'] = isset($woptions['nopathway']) ? $woptions['nopathway'] : 1;
        $coptions['nohead']    = isset($woptions['nohead'])    ? $woptions['nohead'] : 1;
        $coptions['nomodules'] = isset($woptions['nomodules']) ? $woptions['nomodules'] : 1;
 
        ob_start();
        ob_implicit_flush(false);
 
        $result = call_user_func_array($callback, $referenceArgs);
        $output = ob_get_clean();
 
        $data = array('result' => $result);
 
        if ($wrkarounds)
        {
            $data['output'] = Cache::setWorkarounds($output, $coptions);
        }
        else
        {
            $data['output'] = $output;
        }
 
        // Store the cache data
        $this->cache->store(serialize($data), $id);
 
        if ($locktest->locked === true)
        {
            $this->cache->unlock($id);
        }
            if (method_exists($document, 'getHeadData'))
            {
                $coptions['headerbefore'] = $document->getHeadData();
            }
 
            $coptions['modulemode'] = 1;
        }
        else
        {
            $coptions['modulemode'] = 0;
        }
 
        $coptions['nopathway'] = isset($woptions['nopathway']) ? $woptions['nopathway'] : 1;
        $coptions['nohead']    = isset($woptions['nohead'])    ? $woptions['nohead'] : 1;
        $coptions['nomodules'] = isset($woptions['nomodules']) ? $woptions['nomodules'] : 1;
 
        ob_start();
        ob_implicit_flush(false);
 
        $result = call_user_func_array($callback, $referenceArgs);
        $output = ob_get_clean();
 
        $data = array('result' => $result);
 
        if ($wrkarounds)
        {
            $data['output'] = Cache::setWorkarounds($output, $coptions);
        }
        else
        {
            $data['output'] = $output;
        }
 
        // Store the cache data
        $this->cache->store(serialize($data), $id);
 
        if ($locktest->locked === true)
        {
            $this->cache->unlock($id);
        }
        $cacheDisabled = $moduleparams->get('cache') === 0 || $moduleparams->get('cache') === '0';
 
        if ($ownCacheDisabled || $cacheDisabled || $conf->get('caching') == 0 || $user->get('id'))
        {
            $cache->setCaching(false);
        }
 
        // Module cache is set in seconds, global cache in minutes, setLifeTime works in minutes
        $cache->setLifeTime($moduleparams->get('cache_time', $conf->get('cachetime') * 60) / 60);
 
        $wrkaroundoptions = array('nopathway' => 1, 'nohead' => 0, 'nomodules' => 1, 'modulemode' => 1, 'mergehead' => 1);
 
        $wrkarounds = true;
        $view_levels = md5(serialize($user->getAuthorisedViewLevels()));
 
        switch ($cacheparams->cachemode)
        {
            case 'id':
                $ret = $cache->get(
                    array($cacheparams->class, $cacheparams->method),
                    $cacheparams->methodparams,
                    $cacheparams->modeparams,
                    $wrkarounds,
                    $wrkaroundoptions
                );
                break;
 
            case 'safeuri':
                $secureid = null;
 
                if (is_array($cacheparams->modeparams))
                {
                    $input   = \JFactory::getApplication()->input;
                    $uri     = $input->getArray();
                    $safeuri = new \stdClass;
                    $noHtmlFilter = \JFilterInput::getInstance();
 
                    foreach ($cacheparams->modeparams as $key => $value)
                    {
                        // Use int filter for id/catid to clean out spamy slugs
 
    /**
     * @param $module
     * @param $params
     * @return array
     */
    public static function cache($module, $params)
    {
        return static::render($module, $params)->toArray();
    }
 
    /**
     * @param $module
     * @param $params
     * @param $cacheparams
     * @return ContentBlockInterface|null
     */
    public static function moduleCache($module, $params, $cacheparams)
    {
        $block = (array) ModuleHelper::moduleCache($module, $params, $cacheparams);
        try {
            return $block ? HtmlBlock::fromArray($block) : null;
        } catch (Exception $e) {
            return null;
        }
    }
 
    /**
     * @param string $particle
     * @param string $id
     * @return string
     */
    public static function getIdentifier($particle, $id)
    {
        return "module-{$particle}-{$id}";
    }
}
 
 
$gantry = Gantry::instance();
 
if (\GANTRY_DEBUGGER) {
    Debugger::startTimer("module-{$module->id}", "Rendering Particle Module #{$module->id}");
}
 
// Set up caching.
$cacheid = md5($module->id);
 
$cacheparams = (object) [
    'cachemode'    => 'id',
    'class'        => 'ModGantry5ParticleHelper',
    'method'       => 'cache',
    'methodparams' => [$module, $params],
    'modeparams'   => $cacheid
];
 
/** @var HtmlBlock $block */
$block = ModGantry5ParticleHelper::moduleCache($module, $params, $cacheparams);
if (null === $block) {
    $block = ModGantry5ParticleHelper::render($module, $params);
}
 
/** @var Document $document */
$document = $gantry['document'];
$document->addBlock($block);
 
echo $block->toString();
 
if (\GANTRY_DEBUGGER) {
    Debugger::stopTimer("module-{$module->id}");
}
 
        if (file_exists($path))
        {
            $lang = \JFactory::getLanguage();
 
            $coreLanguageDirectory      = JPATH_BASE;
            $extensionLanguageDirectory = dirname($path);
 
            $langPaths = $lang->getPaths();
 
            // Only load the module's language file if it hasn't been already
            if (!$langPaths || (!isset($langPaths[$coreLanguageDirectory]) && !isset($langPaths[$extensionLanguageDirectory])))
            {
                // 1.5 or Core then 1.6 3PD
                $lang->load($module->module, $coreLanguageDirectory, null, false, true) ||
                    $lang->load($module->module, $extensionLanguageDirectory, null, false, true);
            }
 
            $content = '';
            ob_start();
            include $path;
            $module->content = ob_get_contents() . $content;
            ob_end_clean();
        }
 
        // Load the module chrome functions
        if (!$chrome)
        {
            $chrome = array();
        }
 
        include_once JPATH_THEMES . '/system/html/modules.php';
        $chromePath = JPATH_THEMES . '/' . $template . '/html/modules.php';
 
        if (!isset($chrome[$chromePath]))
        {
            if (file_exists($chromePath))
            {
                include_once $chromePath;
            }
 
            $module = clone $module;
            $module->params = (string) $params;
        }
 
        // Default for compatibility purposes. Set cachemode parameter or use JModuleHelper::moduleCache from within the module instead
        $cachemode = $params->get('cachemode', 'oldstatic');
 
        if ($params->get('cache', 0) == 1 && \JFactory::getConfig()->get('caching') >= 1 && $cachemode != 'id' && $cachemode != 'safeuri')
        {
            // Default to itemid creating method and workarounds on
            $cacheparams = new \stdClass;
            $cacheparams->cachemode = $cachemode;
            $cacheparams->class = 'JModuleHelper';
            $cacheparams->method = 'renderModule';
            $cacheparams->methodparams = array($module, $attribs);
 
            return ModuleHelper::ModuleCache($module, $params, $cacheparams);
        }
 
        return ModuleHelper::renderModule($module, $attribs);
    }
}
 
    {
        /** @var CMSApplication $application */
        $application = Factory::getApplication();
 
        $module = is_object($id) ? $id : $this->getModule($id);
 
        // Make sure that module really exists.
        if (!is_object($module)) {
            return '';
        }
 
        if (empty($module->contentRendered)) {
            $document = $application->getDocument();
            if (!$document instanceof HtmlDocument) {
                return '';
            }
 
            $renderer = $document->loadRenderer('module');
 
            $html = trim($renderer->render($module, $attribs));
        } else {
            $html = trim($module->content);
        }
 
        // Add frontend editing feature as it has only been defined for module positions.
        $user = $application->getIdentity();
 
        $frontEditing = ($application->isClient('site') && $application->get('frontediting', 1) && $user && !$user->guest);
        $menusEditing = ($application->get('frontediting', 1) == 2) && $user && $user->authorise('core.edit', 'com_menus');
 
        $isGantry = \strpos($module->module, 'gantry5') !== false;
        if (!$isGantry && $frontEditing && $html && $user && $user->authorise('module.edit.frontend', 'com_modules.module.' . $module->id)) {
            $displayData = [
                'moduleHtml' => &$html,
                'module' => $module,
                'position' => isset($attribs['position']) ? $attribs['position'] : $module->position,
                'menusediting' => $menusEditing
            ];
            LayoutHelper::render('joomla.edit.frontediting_modules', $displayData);
        }
        return $html;
    }
 
    /**
     * @param string $position
     * @param array $attribs
     * @return string
     */
    public function displayModules($position, $attribs = [])
    {
        /** @var CMSApplication $application */
        $application = Factory::getApplication();
        $document = $application->getDocument();
        if (!$document instanceof HtmlDocument) {
            return '';
        }
 
        $html = '';
        foreach (ModuleHelper::getModules($position) as $module) {
            $html .= $this->displayModule($module, $attribs);
        }
 
        return $html;
    }
 
    /**
     * @param array $params
     * @return string
     */
    public function displaySystemMessages($params = [])
    {
        // We cannot use DocumentHtml renderer here as it fires too early to display any messages.
        return '<jdoc:include type="message" />';
    }
 
    /**
     * @param string $content
     * @param array $params
     * @return string
     */
            }
 
            throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), -1, $this->getSourceContext());
        }
 
        if ($isDefinedTest) {
            return true;
        }
 
        if ($this->env->hasExtension('\Twig\Extension\SandboxExtension')) {
            $this->env->getExtension('\Twig\Extension\SandboxExtension')->checkMethodAllowed($object, $method);
        }
 
        // Some objects throw exceptions when they have __call, and the method we try
        // to call is not supported. If ignoreStrictCheck is true, we should return null.
        try {
            if (!$arguments) {
                $ret = $object->$method();
            } else {
                $ret = \call_user_func_array([$object, $method], $arguments);
            }
        } catch (\BadMethodCallException $e) {
            if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) {
                return;
            }
            throw $e;
        }
 
        // @deprecated in 1.28
        if ($object instanceof \Twig_TemplateInterface) {
            $self = $object->getTemplateName() === $this->getTemplateName();
            $message = sprintf('Calling "%s" on template "%s" from template "%s" is deprecated since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName(), $this->getTemplateName());
            if ('renderBlock' === $method || 'displayBlock' === $method) {
                $message .= sprintf(' Use block("%s"%s) instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('hasBlock' === $method) {
                $message .= sprintf(' Use "block("%s"%s) is defined" instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('render' === $method || 'display' === $method) {
                $message .= sprintf(' Use include("%s") instead).', $object->getTemplateName());
            }
            @trigger_error($message, \E_USER_DEPRECATED);
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/partials/particle.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/partials/particle.html.twig", "@particles/position.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_particle($context, array $blocks = [])
    {
        // line 4
        echo "    ";
        echo $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "platform", []), "displayModules", [0 => $this->getAttribute(($context["particle"] ?? null), "key", []), 1 => ["style" => (($this->getAttribute(($context["particle"] ?? null), "chrome", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "chrome", []), "gantry")) : ("gantry"))]], "method");
        echo "
";
    }
 
    public function getTemplateName()
    {
        return "@particles/position.html.twig";
    }
 
    public function isTraitable()
    {
        return false;
    }
 
    public function getDebugInfo()
    {
        return array (  42 => 4,  39 => 3,  29 => 1,);
    }
 
    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
 
        if ($useBlocks && isset($blocks[$name])) {
            $template = $blocks[$name][0];
            $block = $blocks[$name][1];
        } elseif (isset($this->blocks[$name])) {
            $template = $this->blocks[$name][0];
            $block = $this->blocks[$name][1];
        } else {
            $template = null;
            $block = null;
        }
 
        // avoid RCEs when sandbox is enabled
        if (null !== $template && !$template instanceof self) {
            throw new \LogicException('A block must be a method on a \Twig\Template instance.');
        }
 
        if (null !== $template) {
            try {
                $template->$block($context, $blocks);
            } catch (Error $e) {
                if (!$e->getSourceContext()) {
                    $e->setSourceContext($template->getSourceContext());
                }
 
                // this is mostly useful for \Twig\Error\LoaderError exceptions
                // see \Twig\Error\LoaderError
                if (-1 === $e->getTemplateLine()) {
                    $e->guess();
                }
 
                throw $e;
            } catch (\Exception $e) {
                $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
                $e->guess();
 
                throw $e;
            }
        } elseif (false !== $parent = $this->getParent($context)) {
            $parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
        $assetFunction($content, $location, $priority);
        // line 9
        $assetFunction = $this->env->getFunction('parse_assets')->getCallable();
        $assetVariables = [];
        if ($assetVariables && !is_array($assetVariables)) {
            throw new UnexpectedValueException('{% scripts with x %}: x is not an array');
        }
        $location = "footer";
        if ($location && !is_string($location)) {
            throw new UnexpectedValueException('{% scripts in x %}: x is not a string');
        }
        $priority = isset($assetVariables['priority']) ? $assetVariables['priority'] : 0;
        ob_start();
        // line 10
        echo "    ";
        $this->displayBlock('javascript_footer', $context, $blocks);
        $content = ob_get_clean();
        $assetFunction($content, $location, $priority);
        // line 14
        $this->displayBlock('particle', $context, $blocks);
    }
 
    // line 2
    public function block_stylesheets($context, array $blocks = [])
    {
        // line 3
        echo "    ";
    }
 
    // line 5
    public function block_javascript($context, array $blocks = [])
    {
        // line 6
        echo "    ";
    }
 
    // line 10
    public function block_javascript_footer($context, array $blocks = [])
    {
        // line 11
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'particle' => [$this, 'block_particle'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/partials/particle.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/partials/particle.html.twig", "@particles/position.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_particle($context, array $blocks = [])
    {
        // line 4
        echo "    ";
        echo $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "platform", []), "displayModules", [0 => $this->getAttribute(($context["particle"] ?? null), "key", []), 1 => ["style" => (($this->getAttribute(($context["particle"] ?? null), "chrome", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["particle"] ?? null), "chrome", []), "gantry")) : ("gantry"))]], "method");
        echo "
";
    }
 
    public function getTemplateName()
    {
        return "@particles/position.html.twig";
    }
 
    public function isTraitable()
    {
        return false;
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                echo "        ";
                $context["enabled"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "get", [0 => (("particles." . $this->getAttribute(($context["segment"] ?? null), "type", [])) . ".enabled"), 1 => 1], "method");
                // line 4
                echo "        ";
                $context["particle"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "getJoined", [0 => ("particles." . $this->getAttribute(($context["segment"] ?? null), "type", [])), 1 => $this->getAttribute(($context["segment"] ?? null), "attributes", [])], "method");
                // line 5
                echo "    ";
            }
            // line 6
            echo "
    ";
            // line 7
            ob_start(function () { return ''; });
            // line 8
            echo "        ";
            if ((($context["enabled"] ?? null) && ((null === $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "enabled", [])) || $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "enabled", [])))) {
                // line 9
                echo "            ";
                $this->loadTemplate([0 => (("particles/" . (($this->getAttribute(($context["segment"] ?? null), "subtype", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["segment"] ?? null), "subtype", []), "position")) : ("position"))) . ".html.twig"), 1 => (("@particles/" . (($this->getAttribute(                // line 10
($context["segment"] ?? null), "subtype", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute(($context["segment"] ?? null), "subtype", []), "position")) : ("position"))) . ".html.twig")], "@nucleus/content/position.html.twig", 9)->display($context);
                // line 11
                echo "        ";
            }
            // line 12
            echo "    ";
            $context["html"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
            // line 14
            if (twig_trim_filter(($context["html"] ?? null))) {
                // line 15
                echo "        ";
                if (($this->getAttribute(($context["gantry"] ?? null), "debug", []) && $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "key", []))) {
                    echo "<!-- START POSITION ";
                    echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "key", []), "html", null, true);
                    echo " -->";
                }
                // line 16
                echo "
        <div class=\"g-content";
                // line 17
                (($this->getAttribute(($context["segment"] ?? null), "classes", [])) ? (print (twig_escape_filter($this->env, (" " . twig_escape_filter($this->env, twig_join_filter($this->getAttribute(($context["segment"] ?? null), "classes", []), " "))), "html", null, true))) : (print ("")));
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
     * @internal
     */
    public function __construct(Environment $env, Template $template)
    {
        $this->env = $env;
        $this->template = $template;
    }
 
    /**
     * Renders the template.
     *
     * @param array $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     */
    public function render($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Displays the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function display($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        $this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Checks if a block is defined.
     *
     * @param string $name    The block name
     * @param array  $context An array of parameters to pass to the template
     *
        @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED);
 
        return $this->templateClassPrefix;
    }
 
    /**
     * Renders a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function render($name, array $context = [])
    {
        return $this->load($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function display($name, array $context = [])
    {
        $this->load($name)->display($context);
    }
 
    /**
     * Loads a template.
     *
 
            $this->renderer = $this->extendTwig($twig, $loader);
        }
 
        return $this->renderer;
    }
 
    /**
     * Render a template file by using given context.
     *
     * @param string $file
     * @param array $context
     * @return string
     */
    public function render($file, array $context = [])
    {
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $this->renderer()->render($file, $context);
    }
 
    /**
     * Compile and render twig string.
     *
     * @param string $string
     * @param array $context
     * @return string
     */
    public function compile($string, array $context = [])
    {
        $renderer = $this->renderer();
        $template = $renderer->createTemplate($string);
 
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $template->render($context);
    }
 
            $file = PhpFile::instance($filename);
            if ($file->exists()) {
                try {
                    return ContentBlock::fromArray((array) $file->content());
                } catch (\Exception $e) {
                    // Invalid cache, continue to rendering.
                    if (\GANTRY_DEBUGGER) {
                        Debugger::addMessage(sprintf('Failed to load %s %s cache', $item->type, $item->id), 'debug');
                    }
                }
            }
        }
 
        // Create new document context for assets.
        $context = $this->getContext(['segment' => $item, 'enabled' => 1, 'particle' => $particle] + $options);
 
        /** @var Document $document */
        $document = $gantry['document'];
        $document::push();
        $html = trim($this->render("@nucleus/content/{$item->type}.html.twig", $context));
        $content = $document::pop()->setContent($html);
 
        if (isset($file)) {
            // Save HTML and assets into the cache.
            if (\GANTRY_DEBUGGER) {
                Debugger::addMessage(sprintf('Caching %s %s', $item->type, $item->id), 'debug');
            }
 
            $file->save($content->toArray());
        }
 
        return $content;
    }
}
 
                        }
                    }
            }
        }
    }
 
    /**
     * Renders individual content block, like particle or position.
     *
     * Function is used to pre-render content.
     *
     * @param object|array $item
     * @param array $options
     * @return string|null
     */
    public function renderContent($item, $options = [])
    {
        $gantry = static::gantry();
 
        $content = $this->getContent($item, $options);
 
        /** @var Document $document */
        $document = $gantry['document'];
        $document->addBlock($content);
 
        $html = $content->toString();
 
        return false === strpos($html, '@@DEFERRED@@') ? $html : null;
    }
 
    /**
     * Renders individual content block, like particle or position.
     *
     * Function is used to pre-render content.
     *
     * @param object|array $item
     * @param array $options
     * @return ContentBlock|ContentBlockInterface
     * @since 5.4.3
     */
                    $fixed &= !empty($child->attributes->fixed);
                }
 
                $this->prepareLayout($item->children, $fixed, $temporary);
            }
 
            // TODO: remove hard coded types.
            switch ($item->type) {
                case 'system':
                    break;
 
                case 'atom':
                case 'particle':
                case 'position':
                case 'spacer':
                    if (\GANTRY_DEBUGGER) {
                        Debugger::startTimer($item->id, "Rendering {$item->id}");
                    }
 
                    $item->content = $this->renderContent($item, ['prepare_layout' => true]);
                    // Note that content can also be null (postpone rendering).
                    if ($item->content === '') {
                        unset($items[$i]);
                    }
 
                    if (\GANTRY_DEBUGGER) {
                        Debugger::stopTimer($item->id);
                    }
 
                    break;
 
                default:
                    if ($sticky) {
                        $item->attributes->sticky = 1;
                        break;
                    }
 
                    if (empty($item->children)) {
                        unset($items[$i]);
                        break;
     * @param array $items
     * @param bool  $temporary
     * @param bool  $sticky
     * @internal
     */
    protected function prepareLayout(array &$items, $temporary = false, $sticky = false)
    {
        foreach ($items as $i => &$item) {
            // Non-numeric items are meta-data which should be ignored.
            if (((string)(int) $i !== (string) $i) || !is_object($item)) {
                continue;
            }
 
            if (!empty($item->children)) {
                $fixed = true;
                foreach ($item->children as $child) {
                    $fixed &= !empty($child->attributes->fixed);
                }
 
                $this->prepareLayout($item->children, $fixed, $temporary);
            }
 
            // TODO: remove hard coded types.
            switch ($item->type) {
                case 'system':
                    break;
 
                case 'atom':
                case 'particle':
                case 'position':
                case 'spacer':
                    if (\GANTRY_DEBUGGER) {
                        Debugger::startTimer($item->id, "Rendering {$item->id}");
                    }
 
                    $item->content = $this->renderContent($item, ['prepare_layout' => true]);
                    // Note that content can also be null (postpone rendering).
                    if ($item->content === '') {
                        unset($items[$i]);
                    }
     * @param array $items
     * @param bool  $temporary
     * @param bool  $sticky
     * @internal
     */
    protected function prepareLayout(array &$items, $temporary = false, $sticky = false)
    {
        foreach ($items as $i => &$item) {
            // Non-numeric items are meta-data which should be ignored.
            if (((string)(int) $i !== (string) $i) || !is_object($item)) {
                continue;
            }
 
            if (!empty($item->children)) {
                $fixed = true;
                foreach ($item->children as $child) {
                    $fixed &= !empty($child->attributes->fixed);
                }
 
                $this->prepareLayout($item->children, $fixed, $temporary);
            }
 
            // TODO: remove hard coded types.
            switch ($item->type) {
                case 'system':
                    break;
 
                case 'atom':
                case 'particle':
                case 'position':
                case 'spacer':
                    if (\GANTRY_DEBUGGER) {
                        Debugger::startTimer($item->id, "Rendering {$item->id}");
                    }
 
                    $item->content = $this->renderContent($item, ['prepare_layout' => true]);
                    // Note that content can also be null (postpone rendering).
                    if ($item->content === '') {
                        unset($items[$i]);
                    }
     * @param array $items
     * @param bool  $temporary
     * @param bool  $sticky
     * @internal
     */
    protected function prepareLayout(array &$items, $temporary = false, $sticky = false)
    {
        foreach ($items as $i => &$item) {
            // Non-numeric items are meta-data which should be ignored.
            if (((string)(int) $i !== (string) $i) || !is_object($item)) {
                continue;
            }
 
            if (!empty($item->children)) {
                $fixed = true;
                foreach ($item->children as $child) {
                    $fixed &= !empty($child->attributes->fixed);
                }
 
                $this->prepareLayout($item->children, $fixed, $temporary);
            }
 
            // TODO: remove hard coded types.
            switch ($item->type) {
                case 'system':
                    break;
 
                case 'atom':
                case 'particle':
                case 'position':
                case 'spacer':
                    if (\GANTRY_DEBUGGER) {
                        Debugger::startTimer($item->id, "Rendering {$item->id}");
                    }
 
                    $item->content = $this->renderContent($item, ['prepare_layout' => true]);
                    // Note that content can also be null (postpone rendering).
                    if ($item->content === '') {
                        unset($items[$i]);
                    }
                Debugger::stopTimer('atoms');
            }
        }
    }
 
    /**
     * Returns all non-empty segments from the layout.
     *
     * @return array
     */
    public function segments()
    {
        if (!isset($this->segments)) {
            $this->segments = $this->loadLayout()->toArray();
 
            if (\GANTRY_DEBUGGER) {
                Debugger::startTimer('segments', 'Preparing layout');
            }
 
            $this->prepareLayout($this->segments);
 
            if (\GANTRY_DEBUGGER) {
                Debugger::stopTimer('segments');
            }
        }
 
        return $this->segments;
    }
 
    /**
     * Prepare layout for rendering. Initializes all CSS/JS in particles.
     */
    public function prepare()
    {
        $this->segments();
    }
 
    /**
     * Returns details of the theme.
     *
            if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
                return;
            }
 
            throw new RuntimeError(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), -1, $this->getSourceContext());
        }
 
        if ($isDefinedTest) {
            return true;
        }
 
        if ($this->env->hasExtension('\Twig\Extension\SandboxExtension')) {
            $this->env->getExtension('\Twig\Extension\SandboxExtension')->checkMethodAllowed($object, $method);
        }
 
        // Some objects throw exceptions when they have __call, and the method we try
        // to call is not supported. If ignoreStrictCheck is true, we should return null.
        try {
            if (!$arguments) {
                $ret = $object->$method();
            } else {
                $ret = \call_user_func_array([$object, $method], $arguments);
            }
        } catch (\BadMethodCallException $e) {
            if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) {
                return;
            }
            throw $e;
        }
 
        // @deprecated in 1.28
        if ($object instanceof \Twig_TemplateInterface) {
            $self = $object->getTemplateName() === $this->getTemplateName();
            $message = sprintf('Calling "%s" on template "%s" from template "%s" is deprecated since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName(), $this->getTemplateName());
            if ('renderBlock' === $method || 'displayBlock' === $method) {
                $message .= sprintf(' Use block("%s"%s) instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('hasBlock' === $method) {
                $message .= sprintf(' Use "block("%s"%s) is defined" instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('render' === $method || 'display' === $method) {
                $message .= sprintf(' Use include("%s") instead).', $object->getTemplateName());
            'page_bottom' => [$this, 'block_page_bottom'],
            'body_top' => [$this, 'block_body_top'],
            'body_bottom' => [$this, 'block_body_bottom'],
            'page_head' => [$this, 'block_page_head'],
            'page_footer' => [$this, 'block_page_footer'],
            'page' => [$this, 'block_page'],
            'page_body' => [$this, 'block_page_body'],
        ];
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "debugger", []), "startTimer", [0 => "render", 1 => "Rendering page"], "method");
        // line 2
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "setLayout", [], "method");
        // line 3
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "loadAtoms", [], "method");
        // line 4
        $context["segments"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "segments", [], "method");
        // line 6
        ob_start(function () { return ''; });
        // line 7
        echo "    ";
        if ($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", []), "hasContent", [], "method")) {
            // line 8
            echo "        ";
            $this->displayBlock('content', $context, $blocks);
            // line 10
            echo "    ";
        }
        $context["content"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
        // line 13
        $context["offcanvas"] = null;
        // line 14
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["segments"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["segment"]) {
            // line 15
            echo "    ";
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'page_footer' => [$this, 'block_page_footer'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/page.html.twig", "partials/page.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_page_footer($context, array $blocks = [])
    {
        // line 4
        echo "    ";
        $this->displayParentBlock("page_footer", $context, $blocks);
        echo "
    <jdoc:include type=\"modules\" name=\"debug\" />
";
    }
 
    public function getTemplateName()
    {
        return "partials/page.html.twig";
    }
 
    public function isTraitable()
    {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
{
    public function __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'content' => [$this, 'block_content'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "partials/page.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("partials/page.html.twig", "index.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_content($context, array $blocks = [])
    {
        // line 4
        echo "    ";
        echo $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "platform", []), "displayContent", [0 => ($context["content"] ?? null)], "method");
        echo "
";
    }
 
    public function getTemplateName()
    {
        return "index.html.twig";
    }
 
    public function isTraitable()
    {
        return false;
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for \Twig\Error\LoaderError exceptions
            // see \Twig\Error\LoaderError
            if (-1 === $e->getTemplateLine()) {
                $e->guess();
            }
 
            throw $e;
        } catch (\Exception $e) {
            $e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
            $e->guess();
 
            throw $e;
        }
    }
 
    {
        return $this;
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = [])
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        if ($this->env->isDebug()) {
            ob_start();
        } else {
            ob_start(function () { return ''; });
        }
        try {
            $this->display($context);
        } catch (\Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        } catch (\Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }
 
            throw $e;
        }
 
        return ob_get_clean();
    }
 
    protected function displayWithErrorHandling(array $context, array $blocks = [])
    {
        try {
     * @internal
     */
    public function __construct(Environment $env, Template $template)
    {
        $this->env = $env;
        $this->template = $template;
    }
 
    /**
     * Renders the template.
     *
     * @param array $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     */
    public function render($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Displays the template.
     *
     * @param array $context An array of parameters to pass to the template
     */
    public function display($context = [])
    {
        // using func_get_args() allows to not expose the blocks argument
        // as it should only be used by internal code
        $this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
    }
 
    /**
     * Checks if a block is defined.
     *
     * @param string $name    The block name
     * @param array  $context An array of parameters to pass to the template
     *
        @trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED);
 
        return $this->templateClassPrefix;
    }
 
    /**
     * Renders a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function render($name, array $context = [])
    {
        return $this->load($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string|TemplateWrapper $name    The template name
     * @param array                  $context An array of parameters to pass to the template
     *
     * @throws LoaderError  When the template cannot be found
     * @throws SyntaxError  When an error occurred during compilation
     * @throws RuntimeError When an error occurred during rendering
     */
    public function display($name, array $context = [])
    {
        $this->load($name)->display($context);
    }
 
    /**
     * Loads a template.
     *
 
            $this->renderer = $this->extendTwig($twig, $loader);
        }
 
        return $this->renderer;
    }
 
    /**
     * Render a template file by using given context.
     *
     * @param string $file
     * @param array $context
     * @return string
     */
    public function render($file, array $context = [])
    {
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $this->renderer()->render($file, $context);
    }
 
    /**
     * Compile and render twig string.
     *
     * @param string $string
     * @param array $context
     * @return string
     */
    public function compile($string, array $context = [])
    {
        $renderer = $this->renderer();
        $template = $renderer->createTemplate($string);
 
        // Include Gantry specific things to the context.
        $context = $this->getContext($context);
 
        return $template->render($context);
    }
 
 * @author    RocketTheme http://www.rockettheme.com
 * @copyright Copyright (C) 2007 - 2018 RocketTheme, LLC
 * @license   GNU/GPLv2 and later
 *
 * http://www.gnu.org/licenses/gpl-2.0.html
 */
 
defined('_JEXEC') or die;
 
// Bootstrap Gantry framework or fail gracefully (inside included file).
$gantry = include __DIR__ . '/includes/gantry.php';
 
/** @var \Gantry\Framework\Theme $theme */
$theme = $gantry['theme'];
 
// All the custom twig variables can be defined in here:
$context = array();
 
// Render the page.
echo $theme->render('index.html.twig', $context);
 
     * @param   string  $directory  The name of the template
     * @param   string  $filename   The actual filename
     *
     * @return  string  The contents of the template
     *
     * @since   1.7.0
     */
    protected function _loadTemplate($directory, $filename)
    {
        $contents = '';
 
        // Check to see if we have a valid template file
        if (file_exists($directory . '/' . $filename))
        {
            // Store the file path
            $this->_file = $directory . '/' . $filename;
 
            // Get the file content
            ob_start();
            require $directory . '/' . $filename;
            $contents = ob_get_contents();
            ob_end_clean();
        }
 
        // Try to find a favicon by checking the template and root folder
        $icon = '/favicon.ico';
 
        foreach (array($directory, JPATH_BASE) as $dir)
        {
            if (file_exists($dir . $icon))
            {
                $path = str_replace(JPATH_BASE, '', $dir);
                $path = str_replace('\\', '/', $path);
                $this->addFavicon(Uri::base(true) . $path . $icon);
                break;
            }
        }
 
        return $contents;
    }
 
        if (!file_exists($directory . '/' . $template . '/' . $file))
        {
            $file = 'index.php';
        }
 
        // Load the language file for the template
        $lang = \JFactory::getLanguage();
 
        // 1.5 or core then 1.6
        $lang->load('tpl_' . $template, JPATH_BASE, null, false, true)
        || $lang->load('tpl_' . $template, $directory . '/' . $template, null, false, true);
 
        // Assign the variables
        $this->template = $template;
        $this->baseurl = Uri::base(true);
        $this->params = isset($params['params']) ? $params['params'] : new Registry;
 
        // Load
        $this->_template = $this->_loadTemplate($directory . '/' . $template, $file);
 
        return $this;
    }
 
    /**
     * Parse a document template
     *
     * @return  HtmlDocument  instance of $this to allow chaining
     *
     * @since   1.7.0
     */
    protected function _parseTemplate()
    {
        $matches = array();
 
        if (preg_match_all('#<jdoc:include\ type="([^"]+)"(.*)\/>#iU', $this->_template, $matches))
        {
            $template_tags_first = array();
            $template_tags_last = array();
 
            $options['title'] = (isset($args[3])) ? $args[3] : null;
        }
 
        parent::$_buffer[$options['type']][$options['name']][$options['title']] = $content;
 
        return $this;
    }
 
    /**
     * Parses the template and populates the buffer
     *
     * @param   array  $params  Parameters for fetching the template
     *
     * @return  HtmlDocument instance of $this to allow chaining
     *
     * @since   1.7.0
     */
    public function parse($params = array())
    {
        return $this->_fetchTemplate($params)->_parseTemplate();
    }
 
    /**
     * Outputs the template to the browser.
     *
     * @param   boolean  $caching  If true, cache the output
     * @param   array    $params   Associative array of attributes
     *
     * @return  string The rendered data
     *
     * @since   1.7.0
     */
    public function render($caching = false, $params = array())
    {
        $this->_caching = $caching;
 
        if (empty($this->_template))
        {
            $this->parse($params);
        }
     */
    protected function render()
    {
        // Setup the document options.
        $this->docOptions['template'] = $this->get('theme');
        $this->docOptions['file']     = $this->get('themeFile', 'index.php');
        $this->docOptions['params']   = $this->get('themeParams');
 
        if ($this->get('themes.base'))
        {
            $this->docOptions['directory'] = $this->get('themes.base');
        }
        // Fall back to constants.
        else
        {
            $this->docOptions['directory'] = defined('JPATH_THEMES') ? JPATH_THEMES : (defined('JPATH_BASE') ? JPATH_BASE : __DIR__) . '/themes';
        }
 
        // Parse the document.
        $this->document->parse($this->docOptions);
 
        // Trigger the onBeforeRender event.
        \JPluginHelper::importPlugin('system');
        $this->triggerEvent('onBeforeRender');
 
        $caching = false;
 
        if ($this->isClient('site') && $this->get('caching') && $this->get('caching', 2) == 2 && !\JFactory::getUser()->get('id'))
        {
            $caching = true;
        }
 
        // Render the document.
        $data = $this->document->render($caching, $this->docOptions);
 
        // Set the application output data.
        $this->setBody($data);
 
        // Trigger the onAfterRender event.
        $this->triggerEvent('onAfterRender');
                    $this->setUserState('users.login.form.data', array('return' => \JUri::getInstance()->toString()));
                    $this->set('themeFile', 'offline.php');
                    $this->setHeader('Status', '503 Service Temporarily Unavailable', 'true');
                }
 
                if (!is_dir(JPATH_THEMES . '/' . $template->template) && !$this->get('offline'))
                {
                    $this->set('themeFile', 'component.php');
                }
 
                // Ensure themeFile is set by now
                if ($this->get('themeFile') == '')
                {
                    $this->set('themeFile', $file . '.php');
                }
 
                break;
        }
 
        parent::render();
    }
 
    /**
     * Route the application.
     *
     * Routing is the process of examining the request environment to determine which
     * component should receive the request. The component optional parameters
     * are then set in the request object to be processed when the application is being
     * dispatched.
     *
     * @return  void
     *
     * @since   3.2
     */
    protected function route()
    {
        // Execute the parent method
        parent::route();
 
        $Itemid = $this->input->getInt('Itemid', null);
        // Unset invalid system variables
        foreach ($invalidInputVariables as $systemVariable)
        {
            $input->set($systemVariable, null);
        }
 
        // Abort when there are invalid variables
        if ($invalidInputVariables)
        {
            throw new \RuntimeException('Invalid input, aborting application.');
        }
 
        // Perform application routines.
        $this->doExecute();
 
        // If we have an application document object, render it.
        if ($this->document instanceof \JDocument)
        {
            // Render the application output.
            $this->render();
        }
 
        // If gzip compression is enabled in configuration and the server is compliant, compress the output.
        if ($this->get('gzip') && !ini_get('zlib.output_compression') && ini_get('output_handler') !== 'ob_gzhandler')
        {
            $this->compress();
 
            // Trigger the onAfterCompress event.
            $this->triggerEvent('onAfterCompress');
        }
 
        // Send the application response.
        $this->respond();
 
        // Trigger the onAfterRespond event.
        $this->triggerEvent('onAfterRespond');
    }
 
    /**
     * Check if the user is required to reset their password.
{
    include_once __DIR__ . '/defines.php';
}
 
if (!defined('_JDEFINES'))
{
    define('JPATH_BASE', __DIR__);
    require_once JPATH_BASE . '/includes/defines.php';
}
 
require_once JPATH_BASE . '/includes/framework.php';
 
// Set profiler start time and memory usage and mark afterLoad in the profiler.
JDEBUG ? JProfiler::getInstance('Application')->setStart($startTime, $startMem)->mark('afterLoad') : null;
 
// Instantiate the application.
$app = JFactory::getApplication('site');
 
// Execute the application.
$app->execute();
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
PATH /usr/local/bin:/usr/bin:/bin
TEMP /tmp
TMP /tmp
TMPDIR /tmp
PWD /
HTTP_ACCEPT */*
CONTENT_LENGTH 0
HTTP_HOST www.samicofra.com
HTTP_REFERER http://www.samicofra.com/index.php/quem-somos
HTTP_USER_AGENT claudebot
HTTP_X_FORWARDED_PROTO https
UNIQUE_ID ZgaK18WTq6x6b9tHhntuhgAAiBk
SCRIPT_URL /index.php/quem-somos
SCRIPT_URI https://www.samicofra.com/index.php/quem-somos
PROTO https
HTTPS on
SSL_TLS_SNI www.samicofra.com
HTTP2 on
H2PUSH off
H2_PUSH off
H2_PUSHED
H2_PUSHED_ON
H2_STREAM_ID 1
H2_STREAM_TAG 136-1
SERVER_SIGNATURE
SERVER_SOFTWARE Apache
SERVER_NAME www.samicofra.com
SERVER_ADDR 81.88.52.185
SERVER_PORT 443
REMOTE_ADDR 52.23.203.254
DOCUMENT_ROOT /home/ix22pcel/public_html
REQUEST_SCHEME https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT /home/ix22pcel/public_html
SERVER_ADMIN webmaster@samicofra.com
SCRIPT_FILENAME /home/ix22pcel/public_html/index.php
REMOTE_PORT 37854
SERVER_PROTOCOL HTTP/2.0
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /index.php/quem-somos
SCRIPT_NAME /index.php
PATH_INFO /quem-somos
PATH_TRANSLATED /home/ix22pcel/public_html/quem-somos
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711704791.2998
REQUEST_TIME 1711704791
empty
0. Whoops\Handler\PrettyPageHandler