+
    j                       R t ^ RIHt ^ RIt^ RIHt ^ RIHt ^ RIt]! ]	4      P                  4       P                  P                  t]! ]4      ]P                  9  d#   ]P                  P                  ^ ]! ]4      4       ^ RIHt ^ RIHtHtHt / RR*bRR+bR	R,bR
R-bRR.bRR/bRR0bRR1bRR2bRR3bRR4bRR5bRR6bRR7bRR8bRR9bRR:b/ RR;bRR<bRR=bRR>bRR?bRR@bRRAbRRBbR RCbR!RDbR"REbR#RFbR$RGbR%RHbR&RIbR'RJbCt ! R( R)]4      tR# )Ku  Green-Acres source — wraps the existing legacy implementation.

This is a thin adapter rather than a rewrite: the legacy search_greenacres()
in search_properties.py works fine; rewriting it would risk regressions for
no behavioral gain. The adapter:
- Translates SearchCriteria → the legacy fixed-regions iteration
- Yields normalized PropertyHit records
- Adds a health() preflight (HEAD against green-acres.fr to detect blocks)

When upstream filtering is added (price/size in URL), it should land here
and bypass the legacy code path.
)annotationsN)Path)Iterator)load)PropertyHitSearchCriteriaSourcedromeardecheheraultcotes-d-armormorbihan	finisterecharentecharente-maritimedordognegardlotcorrezecreusegerslot-et-garonnemayenneorneindredeux-sevressarthecantalaveyronlozeretarntarn-et-garonnepyrenees-atlantiqueshautes-pyreneesaudepyrenees-orientalesmarcheumbriatoscanaliguriac                  B    ] tR t^KtRtRR.tRtR R ltRR R	 lltR
t	R# )GreenAcresSource
greenacresFRITFc                   V ^8  d   QhRR/# )   returnztuple[bool, str] )formats   "Z/Users/jonathan/Documents/Zakelijk/ClaudeOS/03_Lab/farmmatch/scraper/sources/greenacres.py__annotate__GreenAcresSource.__annotate__P   s     0 0( 0    c                    \         P                  ! RRR/^RRR7      pVP                  R8  d   RRVP                   23# VP                  4        R
#   \         P                   d#   pR\        T4      P                   3u R	p?# R	p?ii ; i)ziGET probe against green-acres.fr root.
Note: HEAD often returns 405 on these sites, so we use a tiny GET.zhttps://www.green-acres.fr/z
User-Agentzfarmmatch/1.0T)headerstimeoutallow_redirectsstreami  FzHTTP N)T	reachable)requestsgetstatus_codecloseRequestExceptiontype__name__)selfres   &  r4   healthGreenAcresSource.healthP   s    		0:&2O%D%&TKA }}#amm_555GGI$$(( 	0T!W--.//	0s#   >A A B
(B?B
B
Nc               $    V ^8  d   QhRRRRRR/# )r0   criteriar   
known_urlszset[str] | Noner1   zIterator[PropertyHit]r2   )r3   s   "r4   r5   r6   ^   s(     F F~ F*F6KFr7   c              #  n  "   ^ RI Hp VP                  '       d   VP                  \        9  d   R# ^ RI pVP                  pVP
                  P                  4       p VP                  '       d    \        VP                  ,          pV.Vn        VP                  e   VP                  VP
                  R&   VP                  e   VP                  VP
                  R&   VP                  e   VP                  VP
                  R&   T;'       g    R Uu/ uF  qRbK  	  p	pVP                  e   VP                  M^2p
V! WVP                  4      pWTn        Wdn        V EF=  pVP                  '       d-   VP                  R4      ;'       g    ^ VP                  8  d   KB  VP                  '       d-   VP                  R4      ;'       g    ^ VP                  8  d   K  \        VR	,          VR
,          VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      R7      x  EK@  	  R# u upi   YTn        Ydn        i ; i5i)a   Run the legacy search for a single region, yield normalized hits.

The legacy implementation handles the full regions list internally,
so we filter its output to the requested region. For multi-region
campaigns, the orchestrator calls search() once per region.

IMPORTANT: known_urls is converted to a {url: True} dict and passed
as the legacy `store` argument. Without this, the legacy function
re-parses every cached card on every run and `limit` counts cached
re-discoveries toward the cap (eval bug #2, #3).
)search_greenacresN	price_min	price_maxbedrooms_minT	land_sizebuilding_sizeurlsourcetitlepricecitycountrybedroomsrooms	thumbnailsearch_region)rT   rU   rV   rW   rX   rY   rS   rR   rZ   r[   r\   r]   r2   )search_propertiesrN   region
REGION_MAPREGIONS_GREENACRESCRITERIAcopy	min_price	max_pricemin_bedroomslimit	max_pagesmin_land_m2r?   min_building_m2r   )rE   rK   rL   rN   legacyoriginal_regionsoriginal_criteriatargetu
seed_storerg   resultsrF   s   &&&          r4   searchGreenAcresSource.search^   s)     	8???xj@ 	+!44"OO002	0#HOO4-3H)!!-/7/A/A,!!-/7/A/A,$$02:2G2G/
 -7,<,<",<>,<aT',<J>&.nn&@HNNbE'
8;M;MNG(8%/OA ###{);)@)@qHDXDX(X'''QUU?-C-H-HqHLdLd,deH{eeGneeGnUU6]i(eeO4%%,z*eeGn%%,eeO4   ? )9%/OsP   AJ5J$ /BJ$ J$ J1J$ ;J5	%J5/J5CJ5J$ $J22J5r2   )N)
rD   
__module____qualname____firstlineno__name	countriesrequires_authrH   rr   __static_attributes__r2   r7   r4   r+   r+   K   s&    DtIM0F Fr7   r+   )frr	   u   Drôme)r{   r
   u   Ardèche)r{   r   u   Hérault)r{   r   u   Côtes-d'Armor)r{   r   Morbihan)r{   r   u
   Finistère)r{   r   Charente)r{   r   zCharente-Maritime)r{   r   Dordogne)r{   r   Gard)r{   r   Lot)r{   r   u   Corrèze)r{   r   Creuse)r{   r   Gers)r{   r   zLot-et-Garonne)r{   r   Mayenne)r{   r   Orne)r{   r   Indre)r{   r   u   Deux-Sèvres)r{   r   Sarthe)r{   r   Cantal)r{   r   Aveyron)r{   r   u   Lozère)r{   r    Tarn)r{   r!   zTarn-et-Garonne)r{   r"   u   Pyrénées-Atlantiques)r{   r#   u   Hautes-Pyrénées)r{   r$   Aude)r{   r%   u   Pyrénées-Orientales)itr&   z	Le Marche)r   r'   Umbria)r   r(   Tuscany)r   r)   Liguria)__doc__
__future__r   syspathlibr   typingr   r>   __file__resolveparent
SCRIPT_DIRstrpathinsertstorer   sources._baser   r   r   r`   r+   r2   r7   r4   <module>r      s;   # 
    (^##%,,33
z?#(("HHOOAs:'  = =)0) 4) 4	)
 @) 5) 8) 6) I) 5) -) 
+) 4)  1!)$ -%)& A')( 3)), --). //)0 <1)2 13)6 17)8 39): 2;)< -=)> C?)@ TA)B EC)D -E)F QG)J 4K)L 1M)N 3O)P 3Q)
XYv Yr7   