zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
U
[±d:ã@sÎddlmZddlmZmZddlmZddlZddlZGdd„dej    ƒZ
eGdd    „d    ƒƒZ dd
d d œd d„Z d dœdd„Z ddd dœdd„Zd dd
d dœdd„Zd dœdd„ZedƒeGdd„dƒƒƒZdS)!é)Ú annotationsé)Ú event_classÚ T_JSON_DICT)Ú    dataclassNc@s,eZdZdZdZdZdd„Zedd„ƒZdS)    Ú
LoginStatez–
    Whether this is a sign-up or sign-in action for this account, i.e.
    whether this account has ever been used to sign in to this RP before.
    ZSignInZSignUpcCs|jS©N)Úvalue)Úself©r úed:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/common/devtools/v113/fed_cm.pyÚto_jsonszLoginState.to_jsoncCs||ƒSrr ©ÚclsÚjsonr r r Ú    from_jsonszLoginState.from_jsonN)    Ú__name__Ú
__module__Ú __qualname__Ú__doc__ZSIGN_INZSIGN_UPr Ú classmethodrr r r r r s rc@s~eZdZUdZded<ded<ded<ded<ded<ded<ded    <d
ed <d Zd ed<d Zd ed<dd„Zedd„ƒZ    d S)ÚAccountz/
    Corresponds to IdentityRequestAccount
    ÚstrÚ
account_idÚemailÚnameÚ
given_nameÚ picture_urlÚidp_config_urlÚidp_signin_urlrÚ login_stateNútyping.Optional[str]Úterms_of_service_urlÚprivacy_policy_urlcCs†tƒ}|j|d<|j|d<|j|d<|j|d<|j|d<|j|d<|j|d<|j     ¡|d<|j
dk    rn|j
|d    <|j dk    r‚|j |d
<|S) NÚ    accountIdrrÚ    givenNameÚ
pictureUrlÚ idpConfigUrlÚ idpSigninUrlÚ
loginStateÚtermsOfServiceUrlÚprivacyPolicyUrl) Údictrrrrrrrr r r"r#)r
rr r r r 7s
 
 
 
 
 
 
 
 
 
 
zAccount.to_jsonc Cs†|t|dƒt|dƒt|dƒt|dƒt|dƒt|dƒt|dƒt |d¡d    |krht|d    ƒndd
|kr~t|d
ƒndd 
S) Nr$rrr%r&r'r(r)r*r+)
rrrrrrrr r"r#)rrrrr r r rGs
 
 
 
 
 
 
 özAccount.from_json)
rrrrÚ__annotations__r"r#r rrr r r r rs
  rztyping.Optional[bool]z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])Údisable_rejection_delayÚreturnccs*tƒ}|dk    r||d<d|dœ}|V}dS)zû
    :param disable_rejection_delay: *(Optional)* Allows callers to disable the promise rejection delay that would normally happen, if this is unimportant to what's being tested. (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)
    NZdisableRejectionDelayz FedCm.enable©ÚmethodÚparams©r,)r.r2Úcmd_dictrr r r ÚenableWsþr5)r/ccsddi}|V}dS)Nr1z FedCm.disabler ©r4rr r r Údisablegsÿr7rÚint)Ú    dialog_idÚ account_indexr/ccs*tƒ}||d<||d<d|dœ}|V}dS)z5
    :param dialog_id:
    :param account_index:
    ÚdialogIdZ accountIndexzFedCm.selectAccountr0Nr3)r9r:r2r4rr r r Úselect_accountosþr<)r9Útrigger_cooldownr/ccs2tƒ}||d<|dk    r||d<d|dœ}|V}dS)zE
    :param dialog_id:
    :param trigger_cooldown: *(Optional)*
    r;NZtriggerCooldownzFedCm.dismissDialogr0r3)r9r=r2r4rr r r Údismiss_dialogsþr>ccsddi}|V}dS)z
    Resets the cooldown time, if any, to allow the next FedCM call to show
    a dialog even if one was recently dismissed by the user.
    r1zFedCm.resetCooldownNr r6r r r Úreset_cooldown”sÿr?zFedCm.dialogShownc@sBeZdZUded<ded<ded<ded<eddd    œd
d „ƒZd S) Ú DialogShownrr9ztyping.List[Account]ÚaccountsÚtitler!Úsubtitler)rr/cCsB|t|dƒdd„|dDƒt|dƒd|kr:t|dƒnddS)Nr;cSsg|]}t |¡‘qSr )rr)Ú.0Úir r r Ú
<listcomp>­sz)DialogShown.from_json.<locals>.<listcomp>rArBrC)r9rArBrC)rrr r r r©s 
 
üzDialogShown.from_jsonN)rrrr-rrr r r r r@Ÿs
r@)N)N)Ú
__future__rÚutilrrZ dataclassesrÚenumÚtypingÚEnumrrr5r7r<r>r?r@r r r r Ú<module>s"  :ÿþ