+
    TŎi!                     >    ^ RI Ht ^ RIt^ RIt^ RIt ! R R4      tR# )    )FacebookBadObjectErrorNc                   ~   a  ] tR t^t o  ! R R]4      t]RR l4       t]RR l4       tRR lt	RR lt
R tR	 tR
tV tR# )CustomAudienceMixinc                   <    ] tR t^tRtRtRtRt ! R R]4      t	Rt
R# )	CustomAudienceMixin.SchemaUIDEMAIL_SHA256PHONE_SHA256MOBILE_ADVERTISER_IDc                   V    ] tR t^tRtRtRtRtRtRt	Rt
RtR	tR
tRtRtRtRtRtRtRtR# ))CustomAudienceMixin.Schema.MultiKeySchema	EXTERN_IDEMAILPHONEGENDOBYDOBMDOBDLNFNFICTSTZIPMADIDCOUNTRYAPPUID N)__name__
__module____qualname____firstlineno__	extern_idemailphonegendobydobmdobdlnfnfictstzipmadidcountryappuid__static_attributes__r       چ/Users/ahmad/.openclaw/workspace/scripts/.venv/lib/python3.14/site-packages/facebook_business/adobjects/helpers/customaudiencemixin.pyMultiKeySchemar      sR    #IEECDDDBBBBBCEGFr4   r6   r   N)r   r    r!   r"   uid
email_hash
phone_hashmobile_advertiser_idobjectr6   r3   r   r4   r5   Schemar      s(    #
#
5	V 	 	r4   r<   Nc                f   . pWP                   P                  V P                   P                  V P                   P                  39   Ed    V F  pWP                   P                  8X  d    VP	                  R 4      P                  4       p\        V\        P                  4      '       d4   V'       g,   WP                   P                  8w  d   VP                  R4      pV'       g   WP                   P                  8X  d   VP                  V4       K  VP                  \        P                  ! V4      P                  4       4       K  	  EMl\        V\        4      '       EdV   V'       g   \        R
4      hV EF;  p\!        V4      \!        V4      8w  d   \        R4      hV'       d   VP                  V4       KC  ^ p	. p
V F  pVP	                  R 4      P                  4       pV P#                  W,          \%        V4      4      pW,          V P                   P&                  P(                  8w  dV   \        V\        P                  4      '       d   VP                  R4      p\        P                  ! V4      P                  4       pV	^,           p	V
P                  V4       K  	  VP                  V
4       EK>  	  RTRTRT;'       g    T/pWP                   P*                  8X  d6   V'       g.   \        RV P                   P*                  ,           R,           4      hV'       d   WLR&   RV/pV'       d   WmR	&   V# )z 	
 .utf8schemais_rawdatazCustom Audiences with type zrequire at least one app_idapp_idspayloadsessionzfPlease send single PIIs i.e. is_raw should be true. The combining of the keys will be done internally.z[Number of keys in each list in the data should match the number of keys specified in scheme)r<   r9   r8   r:   striplower
isinstancesix	text_typeencodeappendhashlibsha256	hexdigestlistr   lennormalize_keystrr6   r#   r7   )clsr?   usersr@   rB   
pre_hashedrD   hashed_usersusercounterhashed_userkeyrC   paramss   &&&&&&&       r5   format_params!CustomAudienceMixin.format_params'   s    jj++jj++jj557 7 ZZ222::&67==?DdCMM22:6U_U_UtUtKt;;v.D::+J+J!J ''- ''t(<(F(F(HI  %%,I 
 v;#d)+0G   ''-G"$K#!ii(89??A!//;>s8E!? #

 9 9 C CD)#s}}==&)jj&8").."5"?"?"AC")A+#**3/  $ !''43 8 ffL))E
 ZZ^^#,1CJJNNB12 
 !(I w
  '9r4   c                L   Vf   V# WP                   P                  P                  8X  gm   WP                   P                  P                  8X  gI   WP                   P                  P                  8X  g%   WP                   P                  P
                  8X  d   V# WP                   P                  P                  8X  d   \        P                  ! RRV4      pV# WP                   P                  P                  8X  d   VP                  4       R,          pV# WP                   P                  P                  8X  d   \        P                  ! RRV4      pV# WP                   P                  P                  8X  g%   WP                   P                  P                  8X  d4   \        P                  ! RRV4      p\        V4      ^8X  d
   RV,           pV# WP                   P                  P                  8X  g   WP                   P                  P                   8X  gm   WP                   P                  P"                  8X  gI   WP                   P                  P$                  8X  g%   WP                   P                  P&                  8X  d   \        P                  ! RRV4      pV# WP                   P                  P(                  8X  d!   \        P*                  ! RV4      ^ ,          pV# WP                   P                  P,                  8X  d"   \        P                  ! RRV4      R,          pV# R# )	z&
Normalize the value based on the key
Nz[^0-9] :N   N0z	[^a-zA-Z]-:N   N)r<   r6   r#   r$   r0   r2   r%   resubr&   rE   r'   r(   r)   rP   r*   r+   r-   r,   r.   r/   splitr1   )rS   key_name	key_values   &&&r5   rQ   !CustomAudienceMixin.normalize_keyw   s?   
 zz00:::zz00666zz00666zz00777zz00666y"i8Izz00444!)"-Izz00555y"i8Izz00555zz00555y"i8I9~")O	zz00333zz00333zz00333zz00333zz00333|R;Izz00444i03Izz00888|R;B?I 9r4   c                    V P                  4       P                  RV P                  4       R3V P                  VVVVVV4      R7      # )zAdds users to this CustomAudience.

Args:
    schema: A CustomAudience.Schema value specifying the type of values
        in the users list.
    users: A list of identities respecting the schema specified.

Returns:
    The FacebookResponse object.
POSTrT   r[   get_api_assuredcallget_id_assuredr\   selfr?   rT   r@   rB   rU   rD   s   &&&&&&&r5   	add_usersCustomAudienceMixin.add_users   sY    " ##%**  "G,%% + 
 	
r4   c                    V P                  4       P                  RV P                  4       R3V P                  VVVVVV4      R7      # )zDeletes users from this CustomAudience.

Args:
    schema: A CustomAudience.Schema value specifying the type of values
        in the users list.
    users: A list of identities respecting the schema specified.

Returns:
    The FacebookResponse object.
DELETErT   rl   rm   rq   s   &&&&&&&r5   remove_users CustomAudienceMixin.remove_users   sY    " ##%**  "G,%% + 
 	
r4   c                j    V P                  4       P                  RV P                  4       R3RV/R7      # )zShares this CustomAudience with the specified account_ids.

Args:
    account_ids: A list of account ids.

Returns:
    The FacebookResponse object.
rk   
adaccountsrl   rn   ro   rp   rr   account_idss   &&r5   share_audience"CustomAudienceMixin.share_audience   sA     ##%**  "L1 +. + 
 	
r4   c                j    V P                  4       P                  RV P                  4       R3RV/R7      # )zUnshares this CustomAudience with the specified account_ids.

Args:
    account_ids: A list of account ids.

Returns:
    The FacebookResponse object.
rv   rz   rl   r{   r|   s   &&r5   unshare_audience$CustomAudienceMixin.unshare_audience   sA     ##%**  "L1 +. + 
 	
r4   r   )FNNN)N)r   r    r!   r"   r;   r<   classmethodr\   rQ   rs   rw   r~   r   r3   __classdictcell__)__classdict__s   @r5   r   r      sV      0 M M^ / /b
<
<

 
r4   r   )facebook_business.exceptionsr   rL   rH   rd   r   r   r4   r5   <module>r      s     @  
 	t
 t
r4   