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

$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"] ?: array()) + array("_7f628626dd1d55" . "c71b1fc0932ffd1" . "d2c" => base64_decode("aXNfYXJyYX" . "k="), "_0f7321019339ace6ad" . "2e176353d6bf0b" => base64_decode("YXJyYXl" . "fd2Fsaw" . "=="));
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["__65da1b1ec2d6653e8" . "a0ab7848e536215"]["_7f628626dd1d55c71b1fc09" . "32ffd1d2c"]($attrs)) {
            $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_0f7321019339ace6" . "ad2e176353d6bf0b"]($attrs, function (&$_ee62014f4ef50dbe8eb79b2406d87bc7) {
                $_ee62014f4ef50dbe8eb79b2406d87bc7 = $this->cla_text->HtmlSafe($_ee62014f4ef50dbe8eb79b2406d87bc7);
            });
            $_b8b6707212db450b2647d7d5649478b2->setAttribute($attrs);
        }
        
        
        
        
        
        foreach ($_b8b6707212db450b2647d7d5649478b2->getChildren() as $_1bd6e5a007d5639e67837f0567493081) {
            $_1bd6e5a007d5639e67837f0567493081->accept($this);
        }
    }
}