ó
    UB/jç  ã                  ó„   • S r SSKJr  SSKrSSKJr  SSKJrJr  SSK	J
r
  SSKJrJrJr  SSKJr    S
       SS	 jjrg)u�  Camelot flow: pull cell grids straight from the PDF.

Runs both Camelot flavors over the whole document, drops only the
content-empty shells lattice leaves on whitespace-aligned pages, and tags
each surviving grid with an is-table verdict. The verdict is METADATA: it
is recorded for later cross-reference, never used to drop a candidate â€”
deciding what is a real table is the visual flow's job, not Camelot's.
é    )ÚannotationsN)ÚPath)ÚListÚOptional)ÚTableClassifier)ÚCamelotCandidateÚis_content_emptyÚrun_camelot_flavors_parallel)ÚCamelotTablec              ƒ  ó¤  ^^^#   • [         R                  " [        U 5      I Sh  v•N nU Vs/ s H!  n[        UR                  5      (       a  M  UPM#     nnTc  U Vs/ s H  n[        USS9PM     sn$ [         R                  " U5      mSUU4S jjm[        [         R                  " U4S jU 5       6 I Sh  v•N 5      $  N�s  snf s  snf  N7f)zØExtract Camelot grids from `source`, tagging each with an is-table verdict.

With no classifier, the grids are returned untagged (`classification`
None). The content-empty shells are always dropped; nothing else is.
N©Ú	candidateÚclassificationc              “  óÜ   >#   • T IS h  v•N   TR                  U R                  5      I S h  v•N nS S S 5      IS h  v•N   [        U WS9$  NA N  N! , IS h  v•N  (       d  f       N'= f7f)Nr   )ÚclassifyÚmarkdownr   )r   ÚverdictÚ
classifierÚ	semaphores     €€Ú@/home/mande/repo/quber/src/quber/core/extractors/dual/camelot.pyÚtagÚrun_camelot_flow.<locals>.tag+   sK   øé € ß’9Ø&×/Ñ/°	×0BÑ0BÓC×CˆG÷ —9ä iÀÑHÐHñ ÙC÷ —9—9�9üsQ   ƒA,ŠA‹A,ŽA­A®A²A,½A¾A,ÁAÁA,ÁA)ÁAÁA)Á%A,c              3  ó4   >#   • U  H  nT" U5      v •  M     g 7f)N© )Ú.0Úcr   s     €r   Ú	<genexpr>Ú#run_camelot_flow.<locals>.<genexpr>0   s   øé € Ð&<²t°!¡s¨1§v v²tùs   ƒ)r   r   Úreturnr   )	ÚasyncioÚ	to_threadr
   r	   r   r   Ú	SemaphoreÚlistÚgather)Úsourcer   ÚconcurrencyÚ
candidatesr   Úkeptr   r   s    `    @@r   Úrun_camelot_flowr)      s¯   úé € ô ×(Ò(Ô)EÀvÓN×N€JÙ!ÓF’z�!Ô)9¸!¿*¹*×)E�A‘z€DÐFàÑÙHLÓMÊÀ1” q¸Ô>ÉÑMÐMä×!Ò! +Ó.€I÷Ið Iô
 ”g—n’nÔ&<±tÓ&<Ð=×=Ó>Ð>ñ OùÚFùò Nñ >ùs?   …C¤C¥C­CÁCÁ	CÁC	Á2ACÂ9CÂ:	CÃC)Né   )r%   r   r   zOptional[TableClassifier]r&   Úintr   zList[CamelotTable])Ú__doc__Ú
__future__r   r    Úpathlibr   Útypingr   r   Úquber.agents.classifierr   Ú%quber.core.extractors.camelot.acquirer   r	   r
   Ú!quber.core.extractors.dual.modelsr   r)   r   ó    r   Ú<module>r4      s[   ðñõ #ã Ý ß !å 3÷ñ õ
 ;ð
 -1Øð?Øð?à)ð?ð ð?ð ö	?r3   