§
    ¬	Êj_  ã                  óŠ   — d Z ddlmZ ddlZddlZddlmZ dZdZ G d„ de	¦  «        Z
 G d	„ d
¦  «        Z G d„ d¦  «        ZdS )u·  The lifecycle: frame tree, navigations, load state.

â›” THIS IS THE PIECE THAT DECIDES WHETHER THE BREAK FROM PLAYWRIGHT HOLDS UP,
and the reason is how it fails: it does not crash, it "works nineteen times
out of twenty". This is why the comments here say WHY a line is the way it
is, not what it does.

THE CLASSIC DEFECT, and the reason for half of this file: **states must be
kept per NAVIGATION, not per frame.** If kept per frame, a `load` left over
from the PREVIOUS document satisfies the wait for the next one, and
`goto()` returns before the page exists. It is the error that almost never
shows, because it needs the two events to arrive in the wrong order.

THE CORRELATION, which the protocol does NOT hand you. `Page.eventFired`
carries `frameId` and `name` (`load` or `DOMContentLoaded`) and **does not
carry the navigationId**. So membership is established by ORDER: after the
`navigationCommitted` of navigation N, the first `load` of that frame
belongs to N. That is what makes it mandatory to clear the states on
`navigationStarted`.

THE FOUR WAITS, and which event closes each:

    commit             Page.navigationCommitted
    domcontentloaded   Page.eventFired name=DOMContentLoaded
    load               Page.eventFired name=load
    networkidle        `load`, then zero inflight requests for IDLE_QUIET
                       seconds (`Lifecycle._settle`, the only place)

â›” networkidle IS A STATE LIKE THE OTHER THREE, kept in `Frame.states` and
cleared with them, and `announce` hands it to the page so the client hears it
too. It used to be a predicate evaluated inside `wait_for_state`, which only a
waiter in THIS process could see: the client's `wait_for_load_state(
"networkidle")` waits for a `loadstate` event that was never sent.

â›” `sameDocumentNavigation` does NOT clear anything: it is the same
document, and a history push does not reload the page. Treating it as a
navigation means waiting for a `load` that will never arrive.
é    )ÚannotationsN)ÚOptionalg      à?)ÚcommitÚdomcontentloadedÚloadÚnetworkidlec                  ó   — e Zd ZdZdS )ÚNavigationErrorz9The navigation was aborted by the browser, with its text.N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úPC:\Projects\Muse2API\.venv\Lib\site-packages\invisible_core/juggler/lifecycle.pyr
   r
   5   s   € € € € € ØCÐCÐCÐCr   r
   c                  ó&   — e Zd Zdd„Zdd	„Zdd„ZdS )ÚFrameÚframe_idÚstrÚparentúOptional[str]c                óŽ   — || _         || _        d| _        d | _        t	          ¦   «         | _        i | _        i | _        d| _        d S )NÚ r   )	Úidr   ÚurlÚ
navigationÚsetÚstatesÚabortedÚ_orderÚsame_document)Úselfr   r   s      r   Ú__init__zFrame.__init__:   sK   € ØˆŒØˆŒØˆŒà)-ˆŒÝ™5œ5ˆŒð  ˆŒð ˆŒð ˆÔÐÐr   r   ÚreturnÚNonec                ó\   — |�'|| j         vr t          | j         ¦  «        | j         |<   dS dS dS )z;Number `navigation` the first time the browser mentions it.N)r    Úlen)r"   r   s     r   Úsawz	Frame.sawK   s>   € àÐ! j¸¼Ð&CÐ&CÝ&)¨$¬+Ñ&6Ô&6ˆDŒK˜
Ñ#Ð#Ð#ð "Ð!Ð&CÐ&Cr   Úboolc                óª   — | j         |k    rdS | j                             |¦  «        }| j                             | j         ¦  «        }|duo	|duo||k    S )u³  Is the current navigation `navigation` itself, or one that came
        AFTER it?

        â›” TWO DEFECTS SIT ON EITHER SIDE OF THIS LINE, and each fix alone
        re-opens the other.

        Before ours: `Page.navigate` answers with the navigationId before
        `navigationStarted` arrives, and in that window the frame still
        carries the states of the PREVIOUS document. Accepting them made
        `goto(until="commit")` return in 0.01s on `about:blank` (2026-08-27).
        A navigation we have not seen yet is therefore never followed.

        After ours: a page that replaces itself from script while it loads -
        `location.replace`, a JavaScript challenge, YouTube's `?themeRefresh=1`
        - starts a NEW navigation after ours committed, and ours never
        reaches `load`: its document is gone. Requiring `f.navigation ==
        ours` made every such `goto` time out on a page that was ready, 45 s
        on YouTube and Reddit while stock Playwright answered in 2 to 4 s on
        the same Firefox (2026-09-25, [B228]). Stock Playwright waits for the
        frame's lifecycle after our navigation, whichever document carries
        it, and so does this.
        TN)r   r    Úget)r"   r   ÚmineÚcurrents       r   ÚfollowszFrame.followsP   s\   € ð. Œ?˜jÒ(Ð(Ø�4ØŒ{�Š˜zÑ*Ô*ˆØ”+—/’/ $¤/Ñ2Ô2ˆØ˜4ÐÐJ G°4Ð$7ÐJ¸GÀdºNÐJr   N)r   r   r   r   )r   r   r$   r%   )r   r   r$   r)   )r   r   r   r#   r(   r.   r   r   r   r   r   9   sV   € € € € € ðð ð ð ð"7ð 7ð 7ð 7ð
Kð Kð Kð Kð Kð Kr   r   c                  óÆ   — e Zd ZdZd2d„Zd3d„Zd4d„Zd5d„Zd6d„Zd4d„Z	d4d„Z
d7d„Zd8d„Zd9d„Zd:d„Z	 	 d;d<d#„Zd=d>d%„Zd&dd'œd?d)„Zd&ddd&d*œd@d.„ZdAd/„ZedBd1„¦   «         Zd&S )CÚ	Lifecyclez:Follows a single page. Hooks into a `Connection`'s events.Úsessionr   c                ó
  — || _         || _        i | _        d | _        d| _        d| _        t          j        ¦   «         | _        t          j
        ¦   «         | _        d | _        d | _        |                     | j        ¦  «         d S )NFr   )Úcr1   ÚframesÚ
main_frameÚreadyÚ	_inflightÚtimeÚ	monotonicÚ_last_activityÚ	threadingÚ	ConditionÚ_cvÚannounceÚ_settle_timerÚadd_listenerÚ_route)r"   Ú
connectionr1   s      r   r#   zLifecycle.__init__q   s{   € ØˆŒØˆŒØˆŒØ)-ˆŒØˆŒ
ØˆŒÝ"œnÑ.Ô.ˆÔÝÔ&Ñ(Ô(ˆŒð ˆŒà8<ˆÔð 	×Ò ¤Ñ,Ô,Ð,Ð,Ð,r   ÚmethodÚparamsÚdictÚevent_sessionr   r$   r%   c                óL   — || j         k    r|                      ||¦  «         d S d S ©N)r1   Ú	_on_event)r"   rC   rD   rF   s       r   rA   zLifecycle._route‹   s1   € à˜DœLÒ(Ð(Ø�NŠN˜6 6Ñ*Ô*Ð*Ð*Ð*ð )Ð(r   c                óà   — | j                              | j        ¦  «         | j        5  d| _        | j        � | j                             ¦   «          d| _        ddd¦  «         dS # 1 swxY w Y   dS )z<Stop listening. Called when the page this follows goes away.N)r3   Úremove_listenerrA   r=   r>   r?   Úcancel©r"   s    r   ÚdetachzLifecycle.detach�   s³   € àŒ×Ò˜tœ{Ñ+Ô+Ð+ØŒXð 	*ð 	*Ø ˆDŒMØÔ!Ð-ØÔ"×)Ò)Ñ+Ô+Ð+Ø%)�Ô"ð		*ð 	*ð 	*ñ 	*ô 	*ð 	*ð 	*ð 	*ð 	*ð 	*ð 	*ð 	*øøøð 	*ð 	*ð 	*ð 	*ð 	*ð 	*s   §/A#Á#A'Á*A'r   c                ó6   — | j                              |¦  «        S )u  The frame with this id, or None.

        â›” HERE AND NOT AT THE CALLER, because how frames are kept is this
        object's business. Callers used to reach in with
        `self.lifecycle.frames.get(id)` - two of them - and each one of those
        also asserted that `frames` is a dict keyed by id. `_frame()` below
        CREATES one when it is missing, which is right for an event arriving
        for a frame we never saw attach and wrong for a caller that only wants
        to look: the two readings need two names.
        )r4   r+   )r"   r   s     r   ÚframezLifecycle.frame™   s   € ð Œ{�Š˜xÑ(Ô(Ð(r   Úpc                óú   — | j         5  |                      ||¦  «        }|                      ¦   «          |€|                     d¦  «        r| j                              ¦   «          d d d ¦  «         d S # 1 swxY w Y   d S )NzNetwork.)r=   Ú_applyÚ_settleÚ
startswithÚ
notify_all)r"   rC   rQ   Úfs       r   rI   zLifecycle._on_event§   s¹   € ØŒXð 	&ð 	&Ø—’˜F AÑ&Ô&ˆAØ�LŠL‰NŒNˆNØˆ} × 1Ò 1°*Ñ =Ô =ˆ}Ø”×#Ò#Ñ%Ô%Ð%ð		&ð 	&ð 	&ñ 	&ô 	&ð 	&ð 	&ð 	&ð 	&ð 	&ð 	&ð 	&øøøð 	&ð 	&ð 	&ð 	&ð 	&ð 	&s   ˆAA0Á0A4Á7A4c                ó  — d„ | j                              ¦   «         D ¦   «         }|r| j        rdS t          j        ¦   «         | j        z
  }|t          k     rU| j        €Lt          j	        t          |z
  | j
        ¦  «        | _        d| j        _        | j                             ¦   «          dS |D ]>}|j                             d¦  «         | j        �|                      d|j        ¦  «         Œ?| j                             ¦   «          dS )u£  Give networkidle to every frame whose document has loaded, once the
        network has been quiet for IDLE_QUIET. Called under the lock.

        â›” networkidle IMPLIES `load`, THE WAY `load` IMPLIES
        `domcontentloaded`. The request counter is page-wide and knows nothing
        about documents. With a `beforeunload` listener on the page being
        left, Firefox sends `navigationStarted` BEFORE the new document's
        request: the counter is zero and has been quiet for seconds - the OLD
        page's silence. Measured 2026-10-03 leaving a production single-page
        login app: `goto(..., "networkidle")` returned in 78 ms with no
        Response, still on the old page. `load` is cleared on
        `navigationStarted`, so requiring it measures the quiet on the frame's
        current document.

        â›” AND IT IS BORN ON A SILENCE DEADLINE, when NOTHING happens, so no
        event can deliver it: a timer does, one at a time. A check that finds
        activity since it was scheduled schedules the remainder.

        Once given it stays until the next document, as in Playwright: a
        request the page makes later does not take it back.
        c                ó6   — g | ]}d |j         v ¯d|j         v¯|‘ŒS )r   r   ©r   )Ú.0rW   s     r   ú
<listcomp>z%Lifecycle._settle.<locals>.<listcomp>Ä   s=   € ð Lð Lð L˜Ø ¤Ð(Ð(¨]À!Ä(Ð-JÐ-Jð Ø-JÐ-JÐ-Jr   NTr   )r4   Úvaluesr7   r8   r9   r:   Ú
IDLE_QUIETr?   r;   ÚTimerÚ_settle_laterÚdaemonÚstartr   Úaddr>   r   r=   rV   )r"   ÚwaitingÚ	quiet_forrW   s       r   rT   zLifecycle._settle®   s  € ð,Lð L˜dœk×0Ò0Ñ2Ô2ð Lñ Lô Lˆàð 	˜$œ.ð 	ØˆFÝ”NÑ$Ô$ tÔ':Ñ:ˆ	Ø•zÒ!Ð!ØÔ!Ð)Ý%.¤_Ý Ñ*¨DÔ,>ñ&@ô &@�Ô"à,0�Ô"Ô)ØÔ"×(Ò(Ñ*Ô*Ð*ØˆFØð 	3ð 	3ˆAØŒH�LŠL˜Ñ'Ô'Ð'ØŒ}Ð(Ø—’˜m¨Q¬TÑ2Ô2Ð2øØŒ×ÒÑÔÐÐÐr   c                ó|   — | j         5  d | _        |                      ¦   «          d d d ¦  «         d S # 1 swxY w Y   d S rH   )r=   r?   rT   rM   s    r   r`   zLifecycle._settle_laterÖ   sƒ   € ØŒXð 	ð 	Ø!%ˆDÔØ�LŠL‰NŒNˆNð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s   ˆ1±5¸5c                óè  ‡ ‡— |dk    r	d‰ _         d S |dk    r\|d         Št          ‰|                     d¦  «        ¦  «        ‰ j        ‰<   |                     d¦  «        €‰‰ _        ‰ j        ‰         S |dk    rN|d         Šˆˆ fd„‰ j                             ¦   «         D ¦   «         D ]}‰ j                             |d ¦  «         Œd S |dk    rW‰                      |d         ¦  «        }|d	         |_        | 	                    |j        ¦  «         t          ¦   «         |_        |S |d
k    rŠ‰                      |d         ¦  «        }|                     d	¦  «        }|�||_        | 	                    |¦  «         |                     d|j        ¦  «        |_        |j                             d¦  «         |S |dk    rA‰                      |d         ¦  «        }|                     dd¦  «        |j        |d	         <   |S |dk    ru‰                      |d         ¦  «        }|                     d|j        ¦  «        |_        |xj        dz  c_        ‰ j        �!‰                      d|j        |j        ¦  «         |S |dk    r�‰                      |d         ¦  «        }|                     d¦  «        }|dk    r5|j                             d¦  «         |j                             d¦  «         n |dk    r|j                             d¦  «         |S |dk    r)‰ xj        dz  c_        t'          j        ¦   «         ‰ _        n9|dv r5t-          d‰ j        dz
  ¦  «        ‰ _        t'          j        ¦   «         ‰ _        d S )Nz
Page.readyTzPage.frameAttachedÚframeIdÚparentFrameIdzPage.frameDetachedc                óR   •— g | ]#\  }}|‰k    s‰                      |‰¦  «        ¯!|‘Œ$S r   )Ú_descendants)r[   ÚkÚvÚfidr"   s      €€r   r\   z$Lifecycle._apply.<locals>.<listcomp>ì   sD   ø€ ð @ð @ð @™D˜A˜qØ˜cš˜ T×%6Ò%6°q¸#Ñ%>Ô%>˜ð Ø!˜˜r   zPage.navigationStartedÚnavigationIdzPage.navigationCommittedr   r   zPage.navigationAbortedÚ	errorTextr   zPage.sameDocumentNavigationé   ÚsameDocumentzPage.eventFiredÚnamer   r   ÚDOMContentLoadedzNetwork.requestWillBeSent)zNetwork.requestFinishedzNetwork.requestFailedr   )r6   r   r+   r4   r5   ÚitemsÚpopÚ_framer   r(   r   r   r   rc   r   r!   r>   r   r7   r8   r9   r:   Úmax)r"   rC   rQ   ÚxrW   Únavrs   rn   s   `      @r   rS   zLifecycle._applyÛ   st  øø€ Ø�\Ò!Ð!ØˆDŒJØ�4àÐ)Ò)Ð)Ø�I”,ˆCÝ$ S¨!¯%ª%°Ñ*@Ô*@ÑAÔAˆDŒK˜ÑØ�uŠu�_Ñ%Ô%Ð-Ø"%�”Ø”;˜sÔ#Ð#àÐ)Ò)Ð)Ø�I”,ˆCð@ð @ð @ð @ð @ D¤K×$5Ò$5Ñ$7Ô$7ð @ñ @ô @ð )ð )�à”—’  4Ñ(Ô(Ð(Ð(Ø�4àÐ-Ò-Ð-Ø—’˜A˜iœLÑ)Ô)ˆAØ˜^Ô,ˆAŒLØ�EŠE�!”,ÑÔÐõ ‘u”uˆAŒHØˆHàÐ/Ò/Ð/Ø—’˜A˜iœLÑ)Ô)ˆAØ—%’%˜Ñ'Ô'ˆCØˆØ"�”Ø—’�c‘
”
�
Ø—E’E˜% ¤Ñ'Ô'ˆAŒEØŒH�LŠL˜Ñ"Ô"Ð"ØˆHàÐ-Ò-Ð-Ø—’˜A˜iœLÑ)Ô)ˆAØ+,¯5ª5°¸iÑ+HÔ+HˆAŒI�a˜Ô'Ñ(ØˆHàÐ2Ò2Ð2Ø—’˜A˜iœLÑ)Ô)ˆAØ—E’E˜% ¤Ñ'Ô'ˆAŒEØˆOŒO˜qÑ ˆOŒOð
 Œ}Ð(Ø—’˜n¨a¬d°A´EÑ:Ô:Ð:ØˆHàÐ&Ò&Ð&Ø—’˜A˜iœLÑ)Ô)ˆAØ—5’5˜‘=”=ˆDØ�vŠ~ˆ~Ø”—’˜VÑ$Ô$Ð$ð
 ”—’Ð/Ñ0Ô0Ð0Ð0ØÐ+Ò+Ð+Ø”—’Ð/Ñ0Ô0Ð0ØˆHàÐ0Ò0Ð0ØˆNŒN˜aÑˆNŒNÝ"&¤.Ñ"2Ô"2ˆDÔÐØÐKÐKÐKõ
 !  D¤N°QÑ$6Ñ7Ô7ˆDŒNÝ"&¤.Ñ"2Ô"2ˆDÔØˆtr   rn   Úancestorr)   c                ó*  — t          ¦   «         }| j                             |¦  «        }|rh|j        ra|j        |vrX|j        |k    rdS |                     |j        ¦  «         | j                             |j        ¦  «        }|r|j        r	|j        |v°XdS )NTF)r   r4   r+   r   rc   )r"   rn   r{   ÚseenÚcurs        r   rk   zLifecycle._descendants/  sœ   € Ý‰uŒuˆØŒk�oŠo˜cÑ"Ô"ˆØð 	.�c”jð 	. S¤Z°tÐ%;Ð%;ØŒz˜XÒ%Ð%Ø�tØ�HŠH�S”ZÑ Ô Ð Ø”+—/’/ #¤*Ñ-Ô-ˆCð	 ð 	.�c”jð 	. S¤Z°tÐ%;Ð%;ð
 ˆur   r   c                óz   — || j         vr&t          |d ¦  «        | j         |<   | j        €|| _        | j         |         S rH   )r4   r   r5   )r"   rn   s     r   rw   zLifecycle._frame9  sC   € ð �d”kÐ!Ð!Ý$ S¨$Ñ/Ô/ˆDŒK˜ÑØŒÐ&Ø"%�”ØŒ{˜3ÔÐr   rW   Ústatec                ó   — ||j         v S rH   rZ   )r"   rW   r€   s      r   Ú_reachedzLifecycle._reachedC  s   € ð ˜œÐ Ð r   r   ç      >@ÚpreviousÚtimeoutÚfloatc                ó  — t          j        ¦   «         |z   }| j        5  	 | j                             |¦  «        }|�|j        |k    rnZ|t          j        ¦   «         z
  }|dk    rt          d|||fz  ¦  «        ‚| j                             t          |d¦  «        ¦  «         Œ‚| j        |         j        }ddd¦  «         n# 1 swxY w Y   |  	                    |||t          d|t          j        ¦   «         z
  ¦  «        ¬¦  «         |S )uø  Wait for a navigation that is NOT the one already in progress, and
        answer with the id of the one it waited for.

        â›” THE ID IS RETURNED BECAUSE ONLY THIS FUNCTION KNOWS IT. The caller
        needs it to answer `reload` / `go_back` with a Response, and reading
        the frame's current navigation afterwards would be a different value
        the moment the page navigates on its own. It is computed here anyway.

        â›” THIS IS THE HISTORY CASE, AND WITHOUT IT `go_back` IS A NO-OP THAT
        REPORTS SUCCESS. `Page.goBack` answers `{success: true}` the moment the
        browser accepts the request, not when the new document is loaded. Wait
        for `load` at that instant and it is already set - by the document you
        are navigating AWAY from - so the wait returns immediately and the next
        read sees the old page.

        Measured on 2026-08-27: `go_back()` from the second page, then
        `title()`, answered "second". The states were right, the document was
        not, and nothing raised.

        `goto` does not need this because `Page.navigate` hands back the
        navigationId to wait on. History gives no id, so the only thing to
        anchor on is that the frame's CURRENT navigation has changed.
        TNr   zNno new navigation on frame %s in %.0fs: the previous one (%s) is still currentçš™™™™™©?©r   r…   )r8   r9   r=   r4   r+   r   ÚTimeoutErrorÚwaitÚminÚwait_for_staterx   )	r"   r   r„   r€   r…   ÚdeadlinerW   Úleftr   s	            r   Úwait_for_new_navigationz!Lifecycle.wait_for_new_navigationH  sd  € õ4 ”>Ñ#Ô# gÑ-ˆØŒXð 	:ð 	:ð
/Ø”K—O’O HÑ-Ô-�Ø�= Q¤\°XÒ%=Ð%=ØØ¥$¤.Ñ"2Ô"2Ñ2�Ø˜1’9�9Ý&ð4Ø7?ÀØ7?ð7AñAñBô Bð Bð ”—’�c $¨™oœoÑ.Ô.Ð.ð
/ð œ XÔ.Ô9ˆJð	:ð 	:ð 	:ñ 	:ô 	:ð 	:ð 	:ð 	:ð 	:ð 	:ð 	:øøøð 	:ð 	:ð 	:ð 	:ð 	×Ò˜H e¸
Ý$'¨¨h½¼Ñ9IÔ9IÑ.IÑ$JÔ$Jð 	ñ 	Lô 	Lð 	LàÐs   žBC Ã CÃCç      4@c                ón  — t          j        ¦   «         |z   }| j        5  | j        €q|t          j        ¦   «         z
  }|dk    r&t	          d|t          | j        ¦  «        fz  ¦  «        ‚| j                             t          |d¦  «        ¦  «         | j        ®q| j        cddd¦  «         S # 1 swxY w Y   dS )uå  The main frame id, waiting for it to arrive.

        â›” IT ARRIVES AS AN EVENT, so reading `main_frame` right after attaching
        to a page is a race: it is set by `Page.frameAttached`, which the
        browser sends when it is ready and not when we ask. On a free machine
        the attribute is usually already there, which is exactly what makes
        this the kind of race that ships - it fails under load, on somebody
        else's machine, once in twenty runs.
        Nr   zEno main frame in %.0fs: the page never announced one. Frames seen: %srˆ   )	r8   r9   r=   r5   rŠ   Úsortedr4   r‹   rŒ   )r"   r…   rŽ   r�   s       r   Úwait_for_main_framezLifecycle.wait_for_main_framet  s  € õ ”>Ñ#Ô# gÑ-ˆØŒXð 	#ð 	#Ø”/Ð)Ø¥$¤.Ñ"2Ô"2Ñ2�Ø˜1’9�9Ý&ð*Ø-4µf¸T¼[Ñ6IÔ6IÐ,JñKñLô Lð Lð ”—’�c $¨™oœoÑ.Ô.Ð.ð ”/Ð)ð ”?ð	#ð 	#ð 	#ð 	#ñ 	#ô 	#ð 	#ð 	#ð 	#ð 	#ð 	#ð 	#øøøð 	#ð 	#ð 	#ð 	#ð 	#ð 	#s   žA?B*Â*B.Â1B.Nr‰   r   c               óî  — |t           vr.t          d|›dd                     t           ¦  «        ›d�¦  «        ‚t          j        ¦   «         |z   }| j        5  	 | j                             |¦  «        }|�a|r#||j        v rt          |j        |         ¦  «        ‚|�| 
                    |¦  «        sn$|                      ||¦  «        r	 d d d ¦  «         d S |t          j        ¦   «         z
  }|dk    r^|€d}n>|�#| 
                    |¦  «        sd|j        ›d	|›�}nd
t          |j        ¦  «        pdz  }t          d|||| j        fz  ¦  «        ‚| j                             |¦  «         �Œ# 1 swxY w Y   d S )Nzunknown state: z (the four are z, ú)Tr   zthe frame does not existzthe current navigation is z
, not our zstates reached: %sÚnonez3%s not reached in %.0fs (%s, inflight requests: %d))ÚSTATESÚ
ValueErrorÚjoinr8   r9   r=   r4   r+   r   r
   r.   r‚   r   r“   r   rŠ   r7   r‹   )	r"   r   r€   r   r…   rŽ   rW   Ú	remainingÚreasons	            r   r�   zLifecycle.wait_for_state‰  s  € ð �ÐÐÝ�*Ø!&  ¨¯	ª	µ&Ñ(9Ô(9Ð(9Ð(9ð;ñ <ô <ð <å”>Ñ#Ô# gÑ-ˆØŒXð 2	)ð 2	)ð1)Ø”K—O’O HÑ-Ô-�Ø�=Ø!ð E j°A´IÐ&=Ð&=Ý-¨a¬i¸
Ô.CÑDÔDÐDð( "Ð-°a·i²iÀ
Ñ6KÔ6KÐ-ØØŸš q¨%Ñ0Ô0ð Øð92	)ð 2	)ð 2	)ñ 2	)ô 2	)ð 2	)ð 2	)ð 2	)ð: %¥t¤~Ñ'7Ô'7Ñ7�	Ø ’>�>Ø�yØ!;˜˜Ø$Ð0Ø"#§)¢)¨JÑ"7Ô"7ð 1Ð0ð +,¬,¨,¨,¸
¸
ð#D˜˜ð #7Ý%+¨A¬HÑ%5Ô%5Ð%?¸ñ#A˜å&ðØ!&¨°¸¼Ð HñIñJô Jð Jð ”—’˜iÑ(Ô(Ð(ñc1)ð2	)ð 2	)ð 2	)ð 2	)øøøð 2	)ð 2	)ð 2	)ð 2	)ð 2	)ð 2	)s   ÁA2E*ÃBE*Å*E.Å1E.)r   Úuntilr…   Úrefererr   r�   rž   c               ó4  — |p| j         }|€t          d¦  «        ‚||dœ}|r||d<   t          j        ¦   «         |z   }| j        5  |                      |¦  «        j        }	d d d ¦  «         n# 1 swxY w Y   | j                             d|| j	        |¬¦  «        pi }
|
 
                    d¦  «        }|€º| j        5  |                      |¦  «        j        |	k    rh|t          j        ¦   «         z
  }|dk    rt          d||fz  ¦  «        ‚| j                             |¦  «         |                      |¦  «        j        |	k    °hd | j        |         j        d	œcd d d ¦  «         S # 1 swxY w Y   |                      ||||¬
¦  «         || j        |         j        d	œS )Nz7no frame: the page has not announced its main frame yet)rh   r   rž   zPage.navigate)r1   r…   ro   r   z<the same-document navigation to %s was not reported in %.0fs)ro   r   r‰   )r5   ÚRuntimeErrorr8   r9   r=   rw   r!   r3   Úsendr1   r+   rŠ   r‹   r4   r   r�   )r"   r   r   r�   r…   rž   rn   rD   rŽ   ÚbeforeÚresultrz   r�   s                r   ÚgotozLifecycle.gotoÅ  sk  € ð Ð)˜$œ/ˆØˆ;Ýð  1ñ 2ô 2ð 2à ¨Ð-Ð-ˆØð 	(Ø 'ˆF�9ÑÝ”>Ñ#Ô# gÑ-ˆð ŒXð 	4ð 	4Ø—[’[ Ñ%Ô%Ô3ˆFð	4ð 	4ð 	4ñ 	4ô 	4ð 	4ð 	4ð 	4ð 	4ð 	4ð 	4øøøð 	4ð 	4ð 	4ð 	4à”—’˜_¨fØ&*¤l¸Gð ñ Eô Eð KØHJð 	à�jŠj˜Ñ(Ô(ˆð ˆ;Ø”ð Kð KØ—k’k #Ñ&Ô&Ô4¸Ò>Ð>Ø#¥d¤nÑ&6Ô&6Ñ6�DØ˜q’y�yÝ*ð0Ø36¸°.ñAñBô Bð Bð ”H—M’M $Ñ'Ô'Ð'ð —k’k #Ñ&Ô&Ô4¸Ò>Ð>ð )-°T´[ÀÔ5EÔ5IÐJÐJðKð Kð Kð Kñ Kô Kð Kð Kð Kð Kð Kð Køøøð Kð Kð Kð Kð 	×Ò˜C °3ÀÐÑHÔHÐHØ #¨D¬K¸Ô,<Ô,@ÐAÐAÐAs%   ÁA+Á+A/Á2A/Â9BE!Å!E%Å(E%c                óH   — d„ | j                              ¦   «         D ¦   «         S )Nc                óf   — i | ].\  }}||j         |j        t          |j        ¦  «        |j        d œ“Œ/S ))r   r   r   r   )r   r   r“   r   r   )r[   rn   rW   s      r   ú
<dictcomp>z(Lifecycle.frame_tree.<locals>.<dictcomp>ó  sR   € ð 3ð 3ð 3ñ �C˜ð  ¤°´Ý!'¨¬Ñ!1Ô!1Ø%&¤\ð3ð 3ð 3ð 3ð 3r   )r4   ru   rM   s    r   Ú
frame_treezLifecycle.frame_treeò  s3   € ð3ð 3ð #œk×/Ò/Ñ1Ô1ð3ñ 3ô 3ð 	3r   Úintc                ó   — | j         S rH   )r7   rM   s    r   ÚinflightzLifecycle.inflightø  s
   € àŒ~Ðr   )r1   r   )rC   r   rD   rE   rF   r   r$   r%   )r$   r%   )r   r   )rC   r   rQ   rE   r$   r%   )rC   r   rQ   rE   )rn   r   r{   r   r$   r)   )rn   r   r$   r   )rW   r   r€   r   r$   r)   )r   rƒ   )
r   r   r„   r   r€   r   r…   r†   r$   r   )r‘   )r…   r†   r$   r   )
r   r   r€   r   r   r   r…   r†   r$   r%   )r   r   r   r   r�   r   r…   r†   rž   r   r$   rE   )r$   rE   )r$   r©   )r   r   r   r   r#   rA   rN   rP   rI   rT   r`   rS   rk   rw   r‚   r�   r”   r�   r¤   r¨   Úpropertyr«   r   r   r   r0   r0   n   sÄ  € € € € € ØDÐDð-ð -ð -ð -ð4+ð +ð +ð +ð
*ð *ð *ð *ð)ð )ð )ð )ð&ð &ð &ð &ð&ð &ð &ð &ðPð ð ð ð
Rð Rð Rð Rðhð ð ð ð ð  ð  ð  ð!ð !ð !ð !ð .4Ø15ð*ð *ð *ð *ð *ðX#ð #ð #ð #ð #ð, 59Ø)-ð9)ð 9)ð 9)ð 9)ð 9)ð 9)ðx ;?Ø!°DØ'+ð*Bð *Bð *Bð *Bð *Bð *BðZ3ð 3ð 3ð 3ð ðð ð ñ „Xðð ð r   r0   )r   Ú
__future__r   r;   r8   Útypingr   r^   r˜   r    r
   r   r0   r   r   r   ú<module>r¯      sö   ðð%ð %ðL #Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø €€€Ø Ð Ð Ð Ð Ð ð
 €
à	>€ðDð Dð Dð Dð D�lñ Dô Dð Dð2Kð 2Kð 2Kð 2Kð 2Kñ 2Kô 2Kð 2KðjLð Lð Lð Lð Lñ Lô Lð Lð Lð Lr   