﻿﻿???????????????????????????????   >>>>>>>>>>>>>/>>>>>>>>>>>>>>>>><
>>>>>>>>>>>>>/>>>>>>>>>>>>>>>>><
?????????????????
?????????????????////////
>>>>>>>>>>>>>/>>>>>>>>>>>>>>>>><
.........................../...
>>>>>>>>>>>>>/>>>>>>>>>>>>>>>>><

???????????????????????????????!!!!!!
>>>>>>>>>>/>>>>>>>>>>>>>>>>><
>>>>>>>>>>>>>/>>>>>>>>>>>>>>>>><

///---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ 
1!%)+//
ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+
+//.383,7(-.+
                  Øÿà JFIF      ÿÛ                                                                                  

-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú383,7(-.+
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV  +//.383,7(-.+
?>
                                              
???????????????????????????????!!!!!!

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

>>>>>>>>>>>>>/>>>>>>>>>>>>>>>>>>

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
# Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license

# Copyright (C) 2006-2017 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND NOMINUM DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL NOMINUM BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

"""TXT-like base class."""

from typing import Any, Dict, Iterable, Optional, Tuple, Union

import dns.exception
import dns.immutable
import dns.rdata
import dns.renderer
import dns.tokenizer


@dns.immutable.immutable
class TXTBase(dns.rdata.Rdata):
    """Base class for rdata that is like a TXT record (see RFC 1035)."""

    __slots__ = ["strings"]

    def __init__(
        self,
        rdclass: dns.rdataclass.RdataClass,
        rdtype: dns.rdatatype.RdataType,
        strings: Iterable[Union[bytes, str]],
    ):
        """Initialize a TXT-like rdata.

        *rdclass*, an ``int`` is the rdataclass of the Rdata.

        *rdtype*, an ``int`` is the rdatatype of the Rdata.

        *strings*, a tuple of ``bytes``
        """
        super().__init__(rdclass, rdtype)
        self.strings: Tuple[bytes] = self._as_tuple(
            strings, lambda x: self._as_bytes(x, True, 255)
        )
        if len(self.strings) == 0:
            raise ValueError("the list of strings must not be empty")

    def to_text(
        self,
        origin: Optional[dns.name.Name] = None,
        relativize: bool = True,
        **kw: Dict[str, Any],
    ) -> str:
    