
    q	h                     b   S r SrSSKrSSKJr  SSKJr  SrS\-  S-
  rSrSr	Sr
SrS	rS
rS
r\" S5      r\" S5      rSrSrSrSrSrSrSrSr\R4                  " \5      S	:w  a  \" S5      e\R4                  " \5      S:w  a  \" S5      eS rS rS rS rS r S r!S r"S r#S  r$S! r%S" r&S# r'S$ r(S% r)S& r*S' r+S( r,S) r-S* r.S+ r/S, r0S- r1S. r2S/ r3S0 r4S1 r5\Rl                  Rn                  \Rl                  Rp                  \Rl                  Rr                  \Rl                  Rt                  4r;S2 r<g)3zFConstants and static functions to support protocol buffer wire format.z#robinson@google.com (Will Robinson)    N)
descriptor)message               ii   l        l             z<Iz<Qz<fz<dz"Format "I" is not a 32-bit number.   z"Format "Q" is not a 64-bit number.c                 r    SUs=::  a
  [         ::  d  O  [        R                  " SU-  5      eU [        -  U-  $ )zReturns an unsigned 32-bit integer that encodes the field number and
wire type information in standard protocol message wire format.

Args:
  field_number: Expected to be an integer in the range [1, 1 << 29)
  wire_type: One of the WIRETYPE_* constants.
r   zUnknown wire type: %d)_WIRETYPE_MAXr   EncodeErrorTAG_TYPE_BITS)field_number	wire_types     V/var/www/html/env/lib/python3.13/site-packages/google/protobuf/internal/wire_format.pyPackTagr   9   s8     
i	(=	(


5	A
BB
-
'9	44    c                 &    U [         -	  U [        -  4$ )zgThe inverse of PackTag().  Given an unsigned 32-bit number,
returns a (field_number, wire_type) tuple.
)r   TAG_TYPE_MASK)tags    r   	UnpackTagr   F   s     
#"5	66r   c                 (    U S:  a  U S-  $ U S-  S-  $ )zZigZag Transform:  Encodes signed integers so that they can be
effectively used with varint encoding.  See wire_format.h for
more details.
r   r    values    r   ZigZagEncoder   M   s$    
 aZA:
1*	r   c                 0    U S-  (       d  U S-	  $ U S-	  S-  $ )zInverse of ZigZagEncode().r   r   r   r   s    r   ZigZagDecoder!   W   s"    	A:
1*	r   c                     [        X5      $ N)Int64ByteSizer   int32s     r   Int32ByteSizer'   c   s    	|	++r   c                     [        SU -  5      $ Nr   )_VarUInt64ByteSizeNoTag)r&   s    r   Int32ByteSizeNoTagr+   g   s    	 !3e!;	<<r   c                      [        U SU-  5      $ r)   UInt64ByteSizer   int64s     r   r$   r$   k   s    	&85&@	AAr   c                     [        X5      $ r#   r-   )r   uint32s     r   UInt32ByteSizer3   p   s    		--r   c                 0    [        U 5      [        U5      -   $ r#   )TagByteSizer*   )r   uint64s     r   r.   r.   t   s    	\	"%<V%D	DDr   c                 ,    [        U [        U5      5      $ r#   )r3   r   r%   s     r   SInt32ByteSizer8   x       	l5&9	::r   c                 ,    [        U [        U5      5      $ r#   )r.   r   r/   s     r   SInt64ByteSizer;   |   r9   r   c                     [        U 5      S-   $ Nr   r5   )r   fixed32s     r   Fixed32ByteSizer@          	\	"Q	&&r   c                     [        U 5      S-   $ Nr   r>   )r   fixed64s     r   Fixed64ByteSizerE      rA   r   c                     [        U 5      S-   $ r=   r>   )r   sfixed32s     r   SFixed32ByteSizerH      rA   r   c                     [        U 5      S-   $ rC   r>   )r   sfixed64s     r   SFixed64ByteSizerK      rA   r   c                     [        U 5      S-   $ r=   r>   )r   flts     r   FloatByteSizerN      rA   r   c                     [        U 5      S-   $ rC   r>   )r   doubles     r   DoubleByteSizerQ      rA   r   c                     [        U 5      S-   $ )Nr   r>   r   bs     r   BoolByteSizerU      rA   r   c                     [        X5      $ r#   )r3   )r   enums     r   EnumByteSizerX      s    		++r   c                 6    [        XR                  S5      5      $ )Nzutf-8)BytesByteSizeencode)r   strings     r   StringByteSizer]      s    	|]]7%;	<<r   c                 Z    [        U 5      [        [        U5      5      -   [        U5      -   $ r#   )r5   r*   lenrS   s     r   rZ   rZ      s,    
l
##CF+,F r   c                 B    S[        U 5      -  UR                  " 5       -   $ )Nr   )r5   ByteSizer   r   s     r   GroupByteSizerc      s%    
k,'
'  r   c                 r    [        U 5      [        UR                  " 5       5      -   UR                  " 5       -   $ r#   r5   r*   ra   rb   s     r   MessageByteSizerf      s6    
l
##G$4$4$678  r   c                     S[        S5      -  [        S5      -   [        S5      -   nU[        U 5      -  nUR                  5       nU[        U5      -  nX#-  nU$ )Nr   r   r   re   )r   msg
total_sizemessage_sizes       r   MessageSetItemByteSizerk      sc    
 KN"[^3k!nD* '55*, '55* *	r   c                 ,    [        [        U S5      5      $ )zEReturns the bytes required to serialize a tag with this field number.r   )r*   r   )r   s    r   r5   r5      s     
!q!9	::r   c                     U S::  a  gU S::  a  gU S::  a  gU S::  a  gU S	::  a  g
U S::  a  gU S::  a  gU S::  a  gU S::  a  gU [         :  a  [        R                  " SU -  5      eg)zReturns the number of bytes required to serialize a single varint
using boundary value comparisons. (unrolled loop optimization -WPierce)
uint64 must be unsigned.
   r   i?  r   i r   ir   l    r	   l      l       l   r   r
   	   zValue out of range: %d
   )
UINT64_MAXr   r   )r6   s    r   r*   r*      s    
 t^Avaxy{1}Qq!!!j


6?
@@	r   c                     U [         ;  $ )zReturn true iff packable = true is valid for fields of this type.

Args:
  field_type: a FieldDescriptor::Type value.

Returns:
  True iff fields of this type are packable.
)NON_PACKABLE_TYPES)
field_types    r   IsTypePackablerw      s     
-	--r   )=__doc__
__author__structgoogle.protobufr   r   r   r   WIRETYPE_VARINTWIRETYPE_FIXED64WIRETYPE_LENGTH_DELIMITEDWIRETYPE_START_GROUPWIRETYPE_END_GROUPWIRETYPE_FIXED32r   int	INT32_MAX	INT32_MIN
UINT32_MAX	INT64_MAX	INT64_MINrs   FORMAT_UINT32_LITTLE_ENDIANFORMAT_UINT64_LITTLE_ENDIANFORMAT_FLOAT_LITTLE_ENDIANFORMAT_DOUBLE_LITTLE_ENDIANcalcsizeAssertionErrorr   r   r   r!   r'   r+   r$   r3   r.   r8   r;   r@   rE   rH   rK   rN   rQ   rU   rX   r]   rZ   rc   rf   rk   r5   r*   FieldDescriptorTYPE_STRING
TYPE_GROUPTYPE_MESSAGE
TYPE_BYTESru   rw   r   r   r   <module>r      s   M2
  & # m#q(       	
O	
		
 # " ! " 
 
??./14;<<	??./14;<<
57,=B
.E;;''''''',= 
 (;( ((''))''	 	.r   