Ë
    òÏjUN  ã                  ó  — d dl mZ d dlZd dlmZmZmZmZ d dlmZm	Z	 d dl
mZ d dlmZmZmZ d dlmZ d dlmZmZmZmZmZ d d	lmZ d d
lmZ d dlmZmZ d dlm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z& d dl'm(Z( d dl)m*Z* d dl+m,Z, d dl-m.Z. d dl/m0Z0m1Z1 dZ2eedgef   Z3d+d„Z4d,d„Z5d-d„Z6d-d„Z7	 	 	 	 	 	 	 	 d.d„Z8	 	 	 	 d/d„Z9	 	 	 	 	 	 d0d„Z:	 	 	 	 	 	 d1d„Z;	 	 	 	 	 	 d2d„Z<	 	 	 	 	 	 	 	 d3d„Z=	 	 	 	 	 	 	 	 d3d„Z>	 	 	 	 	 	 	 	 d4d„Z?	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d5d„Z@ddddddd œ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d6d!„ZA	 	 	 	 	 	 	 	 d7d"„ZBd8d#„ZC	 	 	 	 d9d$„ZD	 	 	 	 	 	 d:d%„ZE	 	 	 	 	 	 	 	 d;d&„ZFddd'œ	 	 	 	 	 	 	 	 	 d<d(„ZGddd'œ	 	 	 	 	 	 	 	 	 d<d)„ZHd=d*„ZIy)>é    )ÚannotationsN)ÚCallableÚIterableÚMappingÚSequence)ÚdatetimeÚtimezone)Ú	signature)ÚAnyÚLiteralÚcast)ÚRunnableConfig)ÚBaseCheckpointSaverÚChannelVersionsÚ
CheckpointÚCheckpointTupleÚPendingWrite)Úuuid6)Ú_DeltaSnapshot)Ú#DELTA_MAX_SUPERSTEPS_SINCE_SNAPSHOTÚpatch_configurable)ÚCONFÚCONFIG_KEY_CHECKPOINT_IDÚNS_ENDÚNS_SEPÚNULL_TASK_IDÚPUSHÚSNAPSHOT_BUMPS)ÚMISSING)ÚBaseChannel)Ú_get_overwrite)ÚDeltaChannel)ÚManagedValueMappingÚManagedValueSpecé   c                 ó°   — t        t        t        t        d¬«      «      t	        j
                  t        j                  «      j                  «       i i i ¬«      S )Néþÿÿÿ©Ú	clock_seq)ÚvÚidÚtsÚchannel_valuesÚchannel_versionsÚversions_seen)	r   ÚLATEST_VERSIONÚstrr   r   Únowr	   ÚutcÚ	isoformat© ó    úY/var/www/html/gaurav-v2/venv/lib/python3.12/site-packages/langgraph/pregel/_checkpoint.pyÚempty_checkpointr8   ,   sA   € ÜÜ
ÜŒu˜rÔ"Ó#Ü�<‰<œŸ™Ó%×/Ñ/Ó1ØØØôð r6   c                óN   — t        | «      j                  j                  d«      duS )z«Whether a saver's `put_writes` or `aput_writes` takes `task_path`.

    Savers written before the parameter existed don't, so it is passed only
    when this is true.
    Ú	task_pathN)r
   Ú
parametersÚget)Ú
put_writess    r7   Úput_writes_accepts_task_pathr>   7   s%   € ô �ZÓ ×+Ñ+×/Ñ/°Ó<ÀDÐHÐHr6   c           
     ó¸   — t        t        j                  |«      «      j                  d«      }| d›d|d   › d|d   › d|d   › d|d   › �	}|t        k(  r| d›d�S |S )au  Synthetic task id for exit-mode DeltaChannel writes.

    Embeds the superstep in the first UUID group so `ORDER BY task_id, idx`
    preserves chronological order while remaining a valid RFC UUID (required by
    Postgres `checkpoint_writes.task_id uuid` columns). Never `NULL_TASK_ID`:
    readers apply writes under it as the anchor checkpoint's own pending writes.
    Ú-Ú08dé   é   é   r%   z-0000-0000-0000-000000000001)r1   ÚuuidÚUUIDÚsplitr   )ÚstepÚtask_idÚpartsÚ	synthetics       r7   Úexit_delta_task_idrL   @   st   € ô ”—	‘	˜'Ó"Ó#×)Ñ)¨#Ó.€EØ˜�*˜A˜e A™h˜Z q¨¨q©¨
°!°E¸!±H°:¸Q¸uÀQ¹x¸jÐI€IØ”LÒ Ø�s�Ð7Ð8Ð8ØÐr6   c           	     ó”   — t        t        j                  |«      «      j                  d«      }d| dz	  d›d| dz  d›d|d   › d|d   › �S )zðSynthetic task id for exit-mode writes of a superstep after the anchor's own.

    Sorts after every real task id, in step order, so replay keeps them after
    the anchor's own superstep whether a saver orders by task path or task id.
    r@   z	ffffffff-é   Ú04xiÿÿ  rD   r%   )r1   rE   rF   rG   )rH   rI   rJ   s      r7   Úexit_delta_late_task_idrP   O   sW   € ô ”—	‘	˜'Ó"Ó#×)Ñ)¨#Ó.€EØ�t˜r‘z #Ð& a¨¨v©°cÐ':¸!¸EÀ!¹H¸:ÀQÀuÈQÁxÀjÐQÐQr6   c                ó  — t        «       }| j                  «       D ]i  \  }}t        |t        «      r|j	                  «       r||vrŒ+|j                  |d«      \  }}||j                  k\  s
|t        k\  sŒY|j                  |«       Œk |S )u˜  Return the set of DeltaChannel names that should snapshot now.

    A channel snapshots when EITHER its accumulated update count reaches
    `snapshot_frequency` OR the total supersteps since its last snapshot
    reaches `DELTA_MAX_SUPERSTEPS_SINCE_SNAPSHOT`. A channel without a version
    was never written on this branch, so it has nothing to snapshot. This is a
    pure predicate â€” no mutation.
    ©r   r   )	ÚsetÚitemsÚ
isinstancer"   Úis_availabler<   Úsnapshot_frequencyr   Úadd)ÚchannelsÚcounters_since_delta_snapshotr.   ÚresultÚnameÚchÚupdatesÚ
superstepss           r7   Údelta_channels_to_snapshotr`   Y   s�   € ô “u€FØ—N‘NÖ$‰ˆˆbä˜2œ|Ô,Ø—?‘?Ô$ØÐ+Ñ+àØ;×?Ñ?ÀÀfÓMÑˆ�à�r×,Ñ,Ò,ØÔ@Ó@à�J‰J�tÕð %ð €Mr6   c                ót   — | D ���ch c]"  }|j                   D ]  \  }}|t        k7  sŒ|’Œ Œ$ c}}}S c c}}}w )zDChannel names written by an update_state superstep (excluding PUSH).)Úwritesr   )Ú	run_tasksÚtaskÚcÚ_s       r7   Úget_updated_channels_from_tasksrg   w   s2   € ñ $ÕI™)�$°·´©¨¨1¸qÄD»yŠA°ˆA˜)ÓIÐIùÔIs   ‡ 3¨3c                óœ   — | j                  «       D ��ch c]+  \  }}t        |t        «      r|j                  «       r||v r|’Œ- c}}S c c}}w )z�DeltaChannels to snapshot on the first update_state of a fresh thread:
    the ones it wrote, as the rest have no version and nothing to store.)rT   rU   r"   rV   )rY   r.   Úkr]   s       r7   Ú$get_delta_channels_from_all_channelsrj   ~   sO   € ð —^‘^Ô%ôá%‰EˆAˆrÜ�bœ,Ô'¨B¯O©OÔ,=À!ÐGWÑBWò 	
Ø%òð ùó s   ”0Ac           	     ó€   — |xs dD ��ch c]'  \  }}}t        | j                  |«      t        «      r|’Œ) c}}S c c}}w )a%  DeltaChannels a branch starting from this checkpoint must snapshot.

    A checkpoint's pending writes belong to the child that consumed them, and
    nothing records which child that was. A new branch snapshots every delta
    channel they touch, so its ancestor walk never replays them.
    r5   )rU   r<   r"   )ÚspecsÚpending_writesrf   r]   s       r7   Ú"delta_channels_with_pending_writesrn   ‹   sI   € ð 'Ò,¨"Ð,ôá,‰HˆAˆr�1Ü�e—i‘i “m¤\Ô2ò 	Ø,òð ùó s   Š,:c           	     ó’   — |D ��ch c]4  \  }}t        | j                  |«      t        «      rt        |«      d   r|’Œ6 c}}S c c}}w )ad  Return the names of the DeltaChannels that `writes` set with an `Overwrite`.

    `update_state` saves a full snapshot of these channels in the checkpoint it
    creates, like the loop does when a node returns an `Overwrite`. Otherwise,
    reading the channel later starts from an older snapshot and replays the
    writes the `Overwrite` threw away.
    r   )rU   r<   r"   r!   )rl   rb   r]   Úvalues       r7   Údelta_channels_overwrittenrq   œ   sK   € ñ  ôá‰IˆB�Ü�e—i‘i “m¤\Ô2´~ÀeÓ7LÈQÒ7Oò 	Øòð ùó s   †9Ac                óÈ   — |t            j                  t        «      sy| j                  t	        |t        di«      «      }|duxr |j
                  d   |j
                  d   k7  S )a<  Whether the thread has moved past `saved`, the checkpoint `config` addressed.

    A checkpoint with a child is never the latest put, so this misses none. A
    leaf of an abandoned branch counts as well; telling it apart would mean
    listing the thread to look for children, which the saver can't do cheaply.
    FNr+   )r   r<   r   Ú	get_tupler   Ú
checkpoint©ÚsaverÚconfigÚsavedÚlatests       r7   Úcheckpoint_supersededrz   ­   se   € ð ”$‰<×ÑÔ4Ô5ØØ�_‰_Ü˜6Ô$<¸dÐ#CÓDó€Fð ˜ÐÒS &×"3Ñ"3°DÑ"9¸U×=MÑ=MÈdÑ=SÑ"SÐSr6   c              ƒ  óä   K  — |t            j                  t        «      sy| j                  t	        |t        di«      «      ƒ d{  –—† }|duxr |j
                  d   |j
                  d   k7  S 7 Œ)­w)zAsync `checkpoint_superseded`.FNr+   )r   r<   r   Ú
aget_tupler   rt   ru   s       r7   Úacheckpoint_supersededr}   ¾   su   è ø€ ð ”$‰<×ÑÔ4Ô5ØØ×#Ñ#Ü˜6Ô$<¸dÐ#CÓDó÷ €Fð ˜ÐÒS &×"3Ñ"3°DÑ"9¸U×=MÑ=MÈdÑ=SÑ"SÐSðús   ‚AA0ÁA.Á*A0c               óô   — t        |xs i j                  d«      xs i «      }i }| j                  «       D ]@  \  }}t        |t        «      sŒ|j                  |d«      \  }}|dz  }||v r|dz  }||f||<   ŒB |S )z Advance ``counters_since_delta_snapshot`` for update_state on a non-fresh thread.

    Mirrors the per-superstep counter bump in ``_loop._put_checkpoint``.
    rZ   rR   rB   )Údictr<   rT   rU   r"   )	rY   Úupdated_channelsÚprev_metadataÚprev_countersÚnew_countersÚch_namer]   ÚuÚss	            r7   Ú$create_metadata_for_update_state_apir‡   Ê   s—   € ô Ø	Ò	˜"×!Ñ!Ð"AÓBÒHÀbó€Mð 02€LØ—~‘~Ö'‰ˆ�Ü˜"œlÔ+ØØ× Ñ  ¨&Ó1‰ˆˆ1Ø	ˆQ‰ˆØÐ&Ñ&Ø�‰FˆAØ!" A ˆ�WÒð (ð Ðr6   c               óö   — |||dœ}	|rt        | |«      |	fS t        | ||¬«      }
t        | |
|«      |z  }|D ]  }d|
|<   Œ	 |
j                  «       D ��ci c]  \  }}|dk7  sŒ||“Œ }}}|r||	d<   ||	fS c c}}w )zEReturn ``(channels_to_snapshot, metadata)`` for an update_state head.)ÚsourcerH   Úparents)r�   rR   rZ   )rj   r‡   r`   rT   )rY   r€   r‰   rH   rŠ   Úsaved_metadataÚis_fresh_threadÚfork_channelsr.   Úmetadatarƒ   Úchannels_to_snapshotri   r*   Únon_zeros                  r7   Ú+create_checkpoint_plan_for_update_state_apir‘   ã   sÆ   € ð ØØñ €Hñ
 Ü3ØÐ&ó
àðð 	ô 8ØØØ$ô€Lô 	# 8¨\Ð;KÓLØ
ñ	ð ó "ˆØ ˆ�QŠð "à!-×!3Ñ!3Ô!5ÔEÑ!5™˜˜A¸¸f»��1‘Ð!5€HÑEÙØ4<ˆÐ0Ñ1Ø Ð)Ð)ùó Fs   ÁA5Á"A5)r+   r€   Úget_next_versionr�   Ústored_versionsÚtrigger_to_nodesc               óÜ  — t        j                  t        j                  «      j	                  «       }	|xs
 t        «       }i }
|€| d   }| d   }nÎi }t        | d   «      }|D ]¹  }||   }||vr9||v r4|�2 |dd«      ||<   d||   f|
|<   t        |j                  «       «      ||<   ŒE||v rS|�4|�2||   |j                  |«      k(  r||   } ||d«      ||<   |||   f|
|<   t        |j                  «       «      ||<   Œœ|j                  «       }|t        usŒµ|||<   Œ» t        t        |	|xs t        t        |¬«      «      ||t        | d   |
|xs i «      |€d¬«      S t!        |«      ¬«      S )uz  Build a new Checkpoint from the previous one and live channel state.

    For each name in `channels_to_snapshot`, a `_DeltaSnapshot(value)` blob
    is written into `channel_values[k]`. Other delta channels are omitted
    from `channel_values` â€” the ancestor walk reconstructs their state
    from `checkpoint_writes`. Callers compute the set via
    `delta_channels_to_snapshot(channels, counters)`; defaults to empty
    (no snapshots) when not provided.

    `stored_versions` are the channel versions of the last checkpoint the
    saver stored. A snapshotted channel whose version has not moved since
    then is bumped.
    Nr-   r.   r(   r/   ©r*   r,   r+   r-   r.   r/   r€   )r   r2   r	   r3   r4   rS   r   r   r<   rt   r   r   r0   r1   r   Ú_mark_bumps_seenÚsorted)rt   rY   rH   r+   r€   r’   r�   r“   r”   r,   ÚbumpedÚvaluesr.   ri   r]   Úoldr*   s                    r7   Úcreate_checkpointrœ     sÅ  € ô2 
�‰”h—l‘lÓ	#×	-Ñ	-Ó	/€BØ/Ò8´3³5ÐØ)+€FØÐØÐ,Ñ-ˆØ%Ð&8Ñ9ÑàˆÜ 
Ð+=Ñ >Ó?ÐÛˆAØ˜!‘ˆBØÐ(Ñ(ð Ð,Ñ,Ð1AÐ1MÙ*:¸4ÀÓ*FÐ$ QÑ'Ø!%Ð'7¸Ñ':Ð ;�F˜1‘IÜ .¨r¯v©v«xÓ 8�F˜1‘IØØÐ(Ñ(ð %Ð0Ø'Ð3Ø(¨Ñ+¨×/BÑ/BÀ1Ó/EÒEà*¨1Ñ-�CÙ*:¸3ÀÓ*EÐ$ QÑ'Ø!$Ð&6°qÑ&9Ð :�F˜1‘IÜ*¨2¯6©6«8Ó4��q’	à—M‘M“O�ØœGÒ#Ø !�F˜1’Ið9 ô: Ü
ØØÒ+””U TÔ*Ó+ØØ)Ü&Ø�Ñ'¨Ð1AÒ1GÀRó
ð "2Ð!9˜ô
ð 
ô @FÐFVÓ?Wô
ð 
r6   c                ó$  — |s| S t        | «      }|j                  «       D ]4  \  }\  }}|�Œ|j                  |d«      D ]  }|j                  |i «       Œ Œ6 t        | j                  t        i «      «      }|j                  «       D ]|  \  }}	|t        k(  rŒ|j                  «       D ]Z  \  }\  }}
|	j                  |«      |k7  rŒt        ||«      \  }}|�|j                  |«      |k7  r|||<   |
||<   i ||   ¥||
i¥||<   Œ\ Œ~ |r	||t        <   |S )a'  Advance whoever had seen a bumped channel's old version to the new one.

    A bump that only stores a snapshot is not a write. Left unseen, it would
    re-fire `interrupt_before` and rerun the channel's subscribers. A channel
    bumped from no version was never written, so it also goes to the
    subscribers that never ran: they have no entry, and would start on the bump.
    For each entry it advances, `SNAPSHOT_BUMPS` keeps the new version and the
    one the node really read, so `versions_seen_without_bumps` can put the read
    back.
    r5   )r   rT   r<   Ú
setdefaultr   Ú
_bump_keys)r/   r™   r”   Úoutri   r›   rf   ÚnodeÚmarksÚseenÚnewÚadvancedÚreads                r7   r—   r—   W  s   € ñ ØÐÜ
ˆ}Ó
€CØ—|‘|–~‰ˆ‰8ˆC�Ø‰;Ø(×,Ñ,¨Q°Ö3�Ø—‘˜t RÕ(ñ 4ð &ô �×"Ñ"¤>°2Ó6Ó7€EØ—i‘i–k‰
ˆˆdØ”>Ò!ØØ#Ÿ\™\ž^‰MˆA‰z��SØ�x‰x˜‹{˜cÒ!ØÜ'¨¨aÓ0‰NˆH�dàˆ 5§9¡9¨XÓ#6¸#Ò#=Ø!��d‘Ø!ˆE�(‰OØ-˜3˜t™9Ð- a¨Ñ-ˆC�ŠIñ ,ð "ñ Ø#ˆŒNÑØ€Jr6   c                ó2   — | › t         › |› �| › t        › |› �fS )N)r   r   )r¡   Úchannels     r7   rŸ   rŸ     s'   € àˆV”F�8˜G˜9Ð%¨$¨´¨x¸°yÐ'AÐAÐAr6   c                ó2  — | j                  t        «      x}s| S i }| j                  «       D ]h  \  }}|t        k(  rŒi ||<   |j                  «       D ]A  \  }}t        ||«      \  }}|j                  |«      |k7  r	|||   |<   Œ2||v sŒ7||   ||   |<   ŒC Œj |S )z�`versions_seen` as the nodes read it: an entry a bump advanced goes back
    to the version the node really read, or away if it never read one.)r<   r   rT   rŸ   )	r/   r¢   r    r¡   r£   ri   r*   r¥   r¦   s	            r7   Úversions_seen_without_bumpsrª   „  s±   € ð
 #×&Ñ&¤~Ó6Ð6ˆEÐ6ØÐØ&(€CØ#×)Ñ)Ö+‰
ˆˆdØ”>Ò!ØØˆˆD‰	Ø—J‘J–L‰DˆAˆqÜ'¨¨aÓ0‰NˆH�dØ�y‰y˜Ó" aÒ'Ø ��D‘	˜!’Ø˜’Ø$ T™{��D‘	˜!’ñ !ð	 ,ð €Jr6   c                óÀ   — | j                  «       D ��cg c]=  \  }}t        |t        «      r(||d   v r!|d   j                  |t        «      t        u r|‘Œ? c}}S c c}}w )a«  DeltaChannels whose value at `checkpoint` the ancestor walk rebuilds.

    A `_DeltaSnapshot` blob or a plain value (migration) resolves directly via
    `from_checkpoint`, so only a channel with nothing stored here needs the
    walk. A channel with no version was never written, so it is empty without
    one; a walk for it would find no snapshot to stop at and read every
    ancestor, every time the thread is loaded.
    r.   r-   )rT   rU   r"   r<   r   )rl   rt   ri   Úspecs       r7   Ú_delta_channels_to_replayr­   ™  sf   € ð —{‘{”}ôá$‰GˆAˆtÜ�dœLÔ)Ø�Ð.Ñ/Ñ/ØÐ'Ñ(×,Ñ,¨Q´Ó8¼GÑCò	 	
Ø$òð ùó s   ”AAc                ó0   — | r|�|€t        d| › d�«      ‚y y )NzDeltaChannel zJ has history to replay but no checkpointer or config was passed to read it)Ú
ValueError)Údelta_channelsrv   rw   s      r7   Ú_require_saver_for_historyr±   ­  s5   € ñ
 ˜5˜=¨F¨NÜØ˜NÐ+ð ,;ð ;ó
ð 	
ð -;€~r6   )rv   rw   c               ó  — i }i }| j                  «       D ]   \  }}t        |t        «      r|||<   Œ|||<   Œ" t        ||«      }t	        |||«       i }	|r|�|�|j                  ||¬«      }	i }
|j                  «       D ]‡  \  }}||	v rQt        t        |«      }|	|   }|j                  |j                  dt        «      «      }|j                  |d   «       |}n(|j                  |d   j                  |t        «      «      }||
|<   Œ‰ |
|fS )a   Hydrate channels from a checkpoint.

    For most channels, `spec.from_checkpoint(checkpoint["channel_values"][k])`
    is sufficient. `DeltaChannel` is the exception: when the channel is
    absent from `channel_values`, an ancestor walk via
    `saver.get_delta_channel_history` is required to find the nearest seed
    (`_DeltaSnapshot` blob or pre-migration plain value) and accumulate
    the writes between it and the target. All delta channels needing
    replay are batched into a single saver call.
    ©rw   rY   Úseedrb   r-   )rT   rU   r    r­   r±   Úget_delta_channel_historyr   r"   Úfrom_checkpointr<   r   Úreplay_writes©rl   rt   rv   rw   Úchannel_specsÚmanaged_specsri   r*   r°   Ú	historiesrY   r¬   Ú
delta_specÚhistoryÚ	replay_chr]   s                   r7   Úchannels_from_checkpointr¿   ¹  s,  € ð" -/€MØ13€MØ—‘–‰ˆˆ1Ü�aœÔ%Ø ˆM˜!Òà ˆM˜!Òð	 ô /¨}¸jÓI€NÜ˜~¨u°fÔ=Ø#%€IÙ˜%Ð+°Ð0BØ×3Ñ3Ø Nð 4ó 
ˆ	ð (*€HØ ×&Ñ&Ö(‰ˆˆ4à�	‰>Üœl¨DÓ1ˆJØ ‘lˆGØ"×2Ñ2°7·;±;¸vÄwÓ3OÓPˆIØ×#Ñ# G¨HÑ$5Ô6Ø‰Bà×%Ñ% jÐ1AÑ&B×&FÑ&FÀqÌ'Ó&RÓSˆBØˆ�Šð )ð �]Ð"Ð"r6   c             ƒ  ó4  K  — i }i }| j                  «       D ]   \  }}t        |t        «      r|||<   Œ|||<   Œ" t        ||«      }t	        |||«       i }	|r|�|�|j                  ||¬«      ƒ d{  –—† }	i }
|j                  «       D ]‡  \  }}||	v rQt        t        |«      }|	|   }|j                  |j                  dt        «      «      }|j                  |d   «       |}n(|j                  |d   j                  |t        «      «      }||
|<   Œ‰ |
|fS 7 Œ¤­w)zAAsync version of `channels_from_checkpoint`. See docstring there.Nr³   r´   rb   r-   )rT   rU   r    r­   r±   Úaget_delta_channel_historyr   r"   r¶   r<   r   r·   r¸   s                   r7   Úachannels_from_checkpointrÂ   é  s:  è ø€ ð -/€MØ13€MØ—‘–‰ˆˆ1Ü�aœÔ%Ø ˆM˜!Òà ˆM˜!Òð	 ô /¨}¸jÓI€NÜ˜~¨u°fÔ=Ø#%€IÙ˜%Ð+°Ð0BØ×:Ñ:Ø Nð ;ó 
÷ 
ˆ	ð (*€HØ ×&Ñ&Ö(‰ˆˆ4à�	‰>Üœl¨DÓ1ˆJØ ‘lˆGØ"×2Ñ2°7·;±;¸vÄwÓ3OÓPˆIØ×#Ñ# G¨HÑ$5Ô6Ø‰Bà×%Ñ% jÐ1AÑ&B×&FÑ&FÀqÌ'Ó&RÓSˆBØˆ�Šð )ð �]Ð"Ð"ð!
ús   ‚A/DÁ1DÁ2B%Dc                ó  — t        | d   | d   | d   | d   j                  «       | d   j                  «       | d   j                  «       D ��ci c]  \  }}||j                  «       “Œ c}}| j                  dd «      ¬«      S c c}}w )	Nr*   r,   r+   r-   r.   r/   r€   r–   )r   ÚcopyrT   r<   )rt   ri   r*   s      r7   Úcopy_checkpointrÅ     s�   € ÜØ
�S‰/Ø�dÑØ�dÑØ!Ð"2Ñ3×8Ñ8Ó:Ø#Ð$6Ñ7×<Ñ<Ó>Ø/9¸/Ñ/J×/PÑ/PÔ/RÔSÑ/R¡t q¨!�q˜!Ÿ&™&›(‘{Ð/RÒSØ#Ÿ™Ð(:¸DÓAôð ùó Ts   ÁB)Úreturnr   )r=   zCallable[..., Any]rÆ   Úbool)rH   ÚintrI   r1   rÆ   r1   )rY   úMapping[str, BaseChannel]rZ   zMapping[str, tuple[int, int]]r.   r   rÆ   úset[str])rc   zIterable[Any]rÆ   rÊ   )rY   rÉ   r.   r   rÆ   rÊ   )rl   úMapping[str, Any]rm   zIterable[PendingWrite] | NonerÆ   rÊ   )rl   rË   rb   zIterable[tuple[str, Any]]rÆ   rÊ   )rv   r   rw   r   rx   r   rÆ   rÇ   )rY   rÉ   r€   rÊ   r�   úMapping[str, Any] | NonerÆ   zdict[str, tuple[int, int]])rY   rÉ   r€   rÊ   r‰   zLiteral['update', 'input']rH   rÈ   rŠ   zdict[str, Any]r‹   rÌ   rŒ   rÇ   r�   rÊ   r.   r   rÆ   ztuple[set[str], dict[str, Any]])rt   r   rY   z Mapping[str, BaseChannel] | NonerH   rÈ   r+   z
str | Noner€   úset[str] | Noner’   zGetNextVersion | Noner�   rÍ   r“   zChannelVersions | Noner”   z"Mapping[str, Sequence[str]] | NonerÆ   r   )r/   údict[str, ChannelVersions]r™   zMapping[str, tuple[Any, Any]]r”   zMapping[str, Sequence[str]]rÆ   rÎ   )r¡   r1   r¨   r1   rÆ   ztuple[str, str])r/   rÎ   rÆ   rÎ   )rl   rÉ   rt   r   rÆ   ú	list[str])r°   rÏ   rv   úBaseCheckpointSaver | Nonerw   úRunnableConfig | NonerÆ   ÚNone)
rl   z,Mapping[str, BaseChannel | ManagedValueSpec]rt   r   rv   rÐ   rw   rÑ   rÆ   z5tuple[Mapping[str, BaseChannel], ManagedValueMapping])rt   r   rÆ   r   )JÚ
__future__r   rE   Úcollections.abcr   r   r   r   r   r	   Úinspectr
   Útypingr   r   r   Úlangchain_core.runnablesr   Úlanggraph.checkpoint.baser   r   r   r   r   Úlanggraph.checkpoint.base.idr   Ú langgraph.checkpoint.serde.typesr   Úlanggraph._internal._configr   r   Úlanggraph._internal._constantsr   r   r   r   r   r   r   Úlanggraph._internal._typingr   Úlanggraph.channels.baser    Úlanggraph.channels.binopr!   Úlanggraph.channels.deltar"   Úlanggraph.managed.baser#   r$   r0   ÚGetNextVersionr8   r>   rL   rP   r`   rg   rj   rn   rq   rz   r}   r‡   r‘   rœ   r—   rŸ   rª   r­   r±   r¿   rÂ   rÅ   r5   r6   r7   Ú<module>rã      s‘  ðÝ "ã ß AÓ Aß 'Ý ß %Ñ %å 3÷õ õ /Ý ;÷÷÷ ñ õ 0Ý /Ý 3Ý 1ß Hà€à˜3 ˜+ sÐ*Ñ+€óóIóóRðØ'ðà#@ðð &ðð ó	ð<JØðJàóJð
Ø'ð
à%ð
ð ó
ðØðà1ðð óð"ØðØ&?ðàóð"TØðTØ(6ðTØ?NðTà	óTð"	TØð	TØ(6ð	TØ?Nð	Tà	ó	TðØ'ðàðð ,ð	ð
  óð2%*Ø'ð%*àð%*ð 'ð	%*ð
 ð%*ð ð%*ð -ð%*ð ð%*ð ð%*ð &ð%*ð %ó%*ðZ Ø(,Ø.2Ø,0Ø.2Ø;?ñIØðIà.ðIð ðIð
 	ðIð &ðIð ,ðIð *ðIð ,ðIð 9ðIð óIðX%Ø-ð%à)ð%ð 2ð%ð  ó	%óPBð
Ø-ðàóð*Ø$ðØ2<ðàóð(	
Øð	
à%ð	
ð "ð	
ð 
ó		
ð  )-Ø$(ñ-#Ø7ð-#àð-#ð &ð	-#ð
 "ð-#ð ;ó-#ðh )-Ø$(ñ$#Ø7ð$#àð$#ð &ð	$#ð
 "ð$#ð ;ó$#ôN	r6   