<?php
namespace Claromentis\Core\TextUtil\JBBCode;

$GLOBALS["__65da1b1ec2d6" . "653e8a0ab7848e" . "536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e536" . "215"] ?: array()) + array("_0f7321019339a" . "ce6ad2e176353d" . "6bf0b" => base64_decode("YXJyYXlfd2F" . "saw=="), "_7f628626dd1d55c" . "71b1fc0932ffd1d2" . "c" => base64_decode("aXNf" . "YXJy" . "YXk="));
use Claromentis\Core\TextUtil\ClaText;






class HTMLSafeVisitor implements \JBBCode\NodeVisitor
{
    protected $cla_text;
    function __construct(ClaText $cla_text)
    {
        $this->cla_text = $cla_text;
    }
    function visitDocumentElement(\JBBCode\DocumentElement $_d132f6bc4a336c5bb52dc5648a5693f0)
    {
        foreach ($_d132f6bc4a336c5bb52dc5648a5693f0->getChildren() as $_1bd6e5a007d5639e67837f0567493081) {
            $_1bd6e5a007d5639e67837f0567493081->accept($this);
        }
    }
    function visitTextNode(\JBBCode\TextNode $_61f33b6db779a1b966e121dc5605306e)
    {
        
        
        $_61f33b6db779a1b966e121dc5605306e->setValue($this->cla_text->HtmlSafe($_61f33b6db779a1b966e121dc5605306e->getValue()));
    }
    function visitElementNode(\JBBCode\ElementNode $_b8b6707212db450b2647d7d5649478b2)
    {
        $attrs = $_b8b6707212db450b2647d7d5649478b2->getAttribute();
        if ($GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_7f628626dd1d" . "55c71b1fc0932" . "ffd1d2c"]($attrs)) {
            $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_0f7321019339ace6" . "ad2e176353d6bf0b"]($attrs, function (&$_ee62014f4ef50dbe8eb79b2406d87bc7) {
                $_ee62014f4ef50dbe8eb79b2406d87bc7 = $this->cla_text->HtmlSafe($_ee62014f4ef50dbe8eb79b2406d87bc7);
            });
            $_b8b6707212db450b2647d7d5649478b2->setAttribute($attrs);
        }
        
        
        
        
        
        foreach ($_b8b6707212db450b2647d7d5649478b2->getChildren() as $_1bd6e5a007d5639e67837f0567493081) {
            $_1bd6e5a007d5639e67837f0567493081->accept($this);
        }
    }
}