//go:build !no_gotd_slices
// +build !no_gotd_slices

// Code generated by gotdgen, DO NOT EDIT.

package tg

import (
	
	
	
	
	

	

	
	
	
	
)

// No-op definition for keeping imports.
var (
	_ = bin.Buffer{}
	_ = context.Background()
	_ = fmt.Stringer(nil)
	_ = strings.Builder{}
	_ = errors.Is
	_ = multierr.AppendInto
	_ = sort.Ints
	_ = tdp.Format
	_ = tgerr.Error{}
	_ = tdjson.Encoder{}
)

// RichTextClassArray is adapter for slice of RichTextClass.
type RichTextClassArray []RichTextClass

// Sort sorts slice of RichTextClass.
func ( RichTextClassArray) ( func(,  RichTextClass) bool) RichTextClassArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of RichTextClass.
func ( RichTextClassArray) ( func(,  RichTextClass) bool) RichTextClassArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of RichTextClass.
func ( RichTextClassArray) ( func( RichTextClass) bool) RichTextClassArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( RichTextClassArray) () ( RichTextClass,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( RichTextClassArray) () ( RichTextClass,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *RichTextClassArray) () ( RichTextClass,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  RichTextClass
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *RichTextClassArray) () ( RichTextClass,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// AsTextPlain returns copy with only TextPlain constructors.
func ( RichTextClassArray) () ( TextPlainArray) {
	for ,  := range  {
		,  := .(*TextPlain)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextBold returns copy with only TextBold constructors.
func ( RichTextClassArray) () ( TextBoldArray) {
	for ,  := range  {
		,  := .(*TextBold)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextItalic returns copy with only TextItalic constructors.
func ( RichTextClassArray) () ( TextItalicArray) {
	for ,  := range  {
		,  := .(*TextItalic)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextUnderline returns copy with only TextUnderline constructors.
func ( RichTextClassArray) () ( TextUnderlineArray) {
	for ,  := range  {
		,  := .(*TextUnderline)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextStrike returns copy with only TextStrike constructors.
func ( RichTextClassArray) () ( TextStrikeArray) {
	for ,  := range  {
		,  := .(*TextStrike)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextFixed returns copy with only TextFixed constructors.
func ( RichTextClassArray) () ( TextFixedArray) {
	for ,  := range  {
		,  := .(*TextFixed)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextURL returns copy with only TextURL constructors.
func ( RichTextClassArray) () ( TextURLArray) {
	for ,  := range  {
		,  := .(*TextURL)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextEmail returns copy with only TextEmail constructors.
func ( RichTextClassArray) () ( TextEmailArray) {
	for ,  := range  {
		,  := .(*TextEmail)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextConcat returns copy with only TextConcat constructors.
func ( RichTextClassArray) () ( TextConcatArray) {
	for ,  := range  {
		,  := .(*TextConcat)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextSubscript returns copy with only TextSubscript constructors.
func ( RichTextClassArray) () ( TextSubscriptArray) {
	for ,  := range  {
		,  := .(*TextSubscript)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextSuperscript returns copy with only TextSuperscript constructors.
func ( RichTextClassArray) () ( TextSuperscriptArray) {
	for ,  := range  {
		,  := .(*TextSuperscript)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextMarked returns copy with only TextMarked constructors.
func ( RichTextClassArray) () ( TextMarkedArray) {
	for ,  := range  {
		,  := .(*TextMarked)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextPhone returns copy with only TextPhone constructors.
func ( RichTextClassArray) () ( TextPhoneArray) {
	for ,  := range  {
		,  := .(*TextPhone)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextImage returns copy with only TextImage constructors.
func ( RichTextClassArray) () ( TextImageArray) {
	for ,  := range  {
		,  := .(*TextImage)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// AsTextAnchor returns copy with only TextAnchor constructors.
func ( RichTextClassArray) () ( TextAnchorArray) {
	for ,  := range  {
		,  := .(*TextAnchor)
		if ! {
			continue
		}
		 = append(, *)
	}

	return 
}

// TextPlainArray is adapter for slice of TextPlain.
type TextPlainArray []TextPlain

// Sort sorts slice of TextPlain.
func ( TextPlainArray) ( func(,  TextPlain) bool) TextPlainArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextPlain.
func ( TextPlainArray) ( func(,  TextPlain) bool) TextPlainArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextPlain.
func ( TextPlainArray) ( func( TextPlain) bool) TextPlainArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextPlainArray) () ( TextPlain,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextPlainArray) () ( TextPlain,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextPlainArray) () ( TextPlain,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextPlain
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextPlainArray) () ( TextPlain,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextBoldArray is adapter for slice of TextBold.
type TextBoldArray []TextBold

// Sort sorts slice of TextBold.
func ( TextBoldArray) ( func(,  TextBold) bool) TextBoldArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextBold.
func ( TextBoldArray) ( func(,  TextBold) bool) TextBoldArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextBold.
func ( TextBoldArray) ( func( TextBold) bool) TextBoldArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextBoldArray) () ( TextBold,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextBoldArray) () ( TextBold,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextBoldArray) () ( TextBold,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextBold
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextBoldArray) () ( TextBold,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextItalicArray is adapter for slice of TextItalic.
type TextItalicArray []TextItalic

// Sort sorts slice of TextItalic.
func ( TextItalicArray) ( func(,  TextItalic) bool) TextItalicArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextItalic.
func ( TextItalicArray) ( func(,  TextItalic) bool) TextItalicArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextItalic.
func ( TextItalicArray) ( func( TextItalic) bool) TextItalicArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextItalicArray) () ( TextItalic,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextItalicArray) () ( TextItalic,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextItalicArray) () ( TextItalic,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextItalic
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextItalicArray) () ( TextItalic,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextUnderlineArray is adapter for slice of TextUnderline.
type TextUnderlineArray []TextUnderline

// Sort sorts slice of TextUnderline.
func ( TextUnderlineArray) ( func(,  TextUnderline) bool) TextUnderlineArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextUnderline.
func ( TextUnderlineArray) ( func(,  TextUnderline) bool) TextUnderlineArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextUnderline.
func ( TextUnderlineArray) ( func( TextUnderline) bool) TextUnderlineArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextUnderlineArray) () ( TextUnderline,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextUnderlineArray) () ( TextUnderline,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextUnderlineArray) () ( TextUnderline,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextUnderline
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextUnderlineArray) () ( TextUnderline,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextStrikeArray is adapter for slice of TextStrike.
type TextStrikeArray []TextStrike

// Sort sorts slice of TextStrike.
func ( TextStrikeArray) ( func(,  TextStrike) bool) TextStrikeArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextStrike.
func ( TextStrikeArray) ( func(,  TextStrike) bool) TextStrikeArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextStrike.
func ( TextStrikeArray) ( func( TextStrike) bool) TextStrikeArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextStrikeArray) () ( TextStrike,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextStrikeArray) () ( TextStrike,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextStrikeArray) () ( TextStrike,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextStrike
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextStrikeArray) () ( TextStrike,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextFixedArray is adapter for slice of TextFixed.
type TextFixedArray []TextFixed

// Sort sorts slice of TextFixed.
func ( TextFixedArray) ( func(,  TextFixed) bool) TextFixedArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextFixed.
func ( TextFixedArray) ( func(,  TextFixed) bool) TextFixedArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextFixed.
func ( TextFixedArray) ( func( TextFixed) bool) TextFixedArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextFixedArray) () ( TextFixed,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextFixedArray) () ( TextFixed,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextFixedArray) () ( TextFixed,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextFixed
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextFixedArray) () ( TextFixed,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextURLArray is adapter for slice of TextURL.
type TextURLArray []TextURL

// Sort sorts slice of TextURL.
func ( TextURLArray) ( func(,  TextURL) bool) TextURLArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextURL.
func ( TextURLArray) ( func(,  TextURL) bool) TextURLArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextURL.
func ( TextURLArray) ( func( TextURL) bool) TextURLArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextURLArray) () ( TextURL,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextURLArray) () ( TextURL,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextURLArray) () ( TextURL,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextURL
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextURLArray) () ( TextURL,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextEmailArray is adapter for slice of TextEmail.
type TextEmailArray []TextEmail

// Sort sorts slice of TextEmail.
func ( TextEmailArray) ( func(,  TextEmail) bool) TextEmailArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextEmail.
func ( TextEmailArray) ( func(,  TextEmail) bool) TextEmailArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextEmail.
func ( TextEmailArray) ( func( TextEmail) bool) TextEmailArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextEmailArray) () ( TextEmail,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextEmailArray) () ( TextEmail,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextEmailArray) () ( TextEmail,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextEmail
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextEmailArray) () ( TextEmail,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextConcatArray is adapter for slice of TextConcat.
type TextConcatArray []TextConcat

// Sort sorts slice of TextConcat.
func ( TextConcatArray) ( func(,  TextConcat) bool) TextConcatArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextConcat.
func ( TextConcatArray) ( func(,  TextConcat) bool) TextConcatArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextConcat.
func ( TextConcatArray) ( func( TextConcat) bool) TextConcatArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextConcatArray) () ( TextConcat,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextConcatArray) () ( TextConcat,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextConcatArray) () ( TextConcat,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextConcat
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextConcatArray) () ( TextConcat,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextSubscriptArray is adapter for slice of TextSubscript.
type TextSubscriptArray []TextSubscript

// Sort sorts slice of TextSubscript.
func ( TextSubscriptArray) ( func(,  TextSubscript) bool) TextSubscriptArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextSubscript.
func ( TextSubscriptArray) ( func(,  TextSubscript) bool) TextSubscriptArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextSubscript.
func ( TextSubscriptArray) ( func( TextSubscript) bool) TextSubscriptArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextSubscriptArray) () ( TextSubscript,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextSubscriptArray) () ( TextSubscript,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextSubscriptArray) () ( TextSubscript,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextSubscript
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextSubscriptArray) () ( TextSubscript,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextSuperscriptArray is adapter for slice of TextSuperscript.
type TextSuperscriptArray []TextSuperscript

// Sort sorts slice of TextSuperscript.
func ( TextSuperscriptArray) ( func(,  TextSuperscript) bool) TextSuperscriptArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextSuperscript.
func ( TextSuperscriptArray) ( func(,  TextSuperscript) bool) TextSuperscriptArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextSuperscript.
func ( TextSuperscriptArray) ( func( TextSuperscript) bool) TextSuperscriptArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextSuperscriptArray) () ( TextSuperscript,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextSuperscriptArray) () ( TextSuperscript,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextSuperscriptArray) () ( TextSuperscript,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextSuperscript
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextSuperscriptArray) () ( TextSuperscript,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextMarkedArray is adapter for slice of TextMarked.
type TextMarkedArray []TextMarked

// Sort sorts slice of TextMarked.
func ( TextMarkedArray) ( func(,  TextMarked) bool) TextMarkedArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextMarked.
func ( TextMarkedArray) ( func(,  TextMarked) bool) TextMarkedArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextMarked.
func ( TextMarkedArray) ( func( TextMarked) bool) TextMarkedArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextMarkedArray) () ( TextMarked,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextMarkedArray) () ( TextMarked,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextMarkedArray) () ( TextMarked,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextMarked
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextMarkedArray) () ( TextMarked,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextPhoneArray is adapter for slice of TextPhone.
type TextPhoneArray []TextPhone

// Sort sorts slice of TextPhone.
func ( TextPhoneArray) ( func(,  TextPhone) bool) TextPhoneArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextPhone.
func ( TextPhoneArray) ( func(,  TextPhone) bool) TextPhoneArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextPhone.
func ( TextPhoneArray) ( func( TextPhone) bool) TextPhoneArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextPhoneArray) () ( TextPhone,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextPhoneArray) () ( TextPhone,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextPhoneArray) () ( TextPhone,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextPhone
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextPhoneArray) () ( TextPhone,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextImageArray is adapter for slice of TextImage.
type TextImageArray []TextImage

// Sort sorts slice of TextImage.
func ( TextImageArray) ( func(,  TextImage) bool) TextImageArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextImage.
func ( TextImageArray) ( func(,  TextImage) bool) TextImageArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextImage.
func ( TextImageArray) ( func( TextImage) bool) TextImageArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextImageArray) () ( TextImage,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextImageArray) () ( TextImage,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextImageArray) () ( TextImage,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextImage
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextImageArray) () ( TextImage,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}

// TextAnchorArray is adapter for slice of TextAnchor.
type TextAnchorArray []TextAnchor

// Sort sorts slice of TextAnchor.
func ( TextAnchorArray) ( func(,  TextAnchor) bool) TextAnchorArray {
	sort.Slice(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// SortStable sorts slice of TextAnchor.
func ( TextAnchorArray) ( func(,  TextAnchor) bool) TextAnchorArray {
	sort.SliceStable(, func(,  int) bool {
		return ([], [])
	})
	return 
}

// Retain filters in-place slice of TextAnchor.
func ( TextAnchorArray) ( func( TextAnchor) bool) TextAnchorArray {
	 := 0
	for ,  := range  {
		if () {
			[] = 
			++
		}
	}
	 = [:]

	return 
}

// First returns first element of slice (if exists).
func ( TextAnchorArray) () ( TextAnchor,  bool) {
	if len() < 1 {
		return
	}
	return [0], true
}

// Last returns last element of slice (if exists).
func ( TextAnchorArray) () ( TextAnchor,  bool) {
	if len() < 1 {
		return
	}
	return [len()-1], true
}

// PopFirst returns first element of slice (if exists) and deletes it.
func ( *TextAnchorArray) () ( TextAnchor,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [0]

	// Delete by index from SliceTricks.
	copy([0:], [1:])
	var  TextAnchor
	[len()-1] = 
	 = [:len()-1]
	* = 

	return , true
}

// Pop returns last element of slice (if exists) and deletes it.
func ( *TextAnchorArray) () ( TextAnchor,  bool) {
	if  == nil || len(*) < 1 {
		return
	}

	 := *
	 = [len()-1]
	 = [:len()-1]
	* = 

	return , true
}