Ë
    ¹ûàg|  ã                   ó®  — d Z ddlZddl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  ej$                  d«      Zd	„ Z edee«      Zd
„ Z ee«      Z edee«      Zd„ Z ee«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z ee«      Z ee«      Z ee«      Z ee«      Z  ee«      Z! G d„ d«      Z"d„ Z#d„ Z$y)a  
 This module houses the ctypes initialization procedures, as well
 as the notice and error handler function callbacks (get called
 when an error occurs in GEOS).

 This module also houses GEOS Pointer utilities, including
 get_pointer_arr(), and GEOM_PTR.
é    N)ÚCDLLÚ	CFUNCTYPEÚPOINTERÚ	StructureÚc_char_p)Úfind_library)ÚImproperlyConfigured)ÚSimpleLazyObjectÚcached_property)Úget_version_tuplezdjango.contrib.gisc                  ó  — 	 ddl m}  | j                  }|rd }nLt        j                  dk(  rddg}n4t        j                  dk(  rddg}nt	        dt        j                  z  «      ‚|r|D ]  }t        |«      }|€Œ n |€t	        d	d
j                  |«      z  «      ‚t        |«      }t        |j                  _        t        g|j                  _        t"        |j$                  _        |S # t        t        t
        t        f$ r d }Y Œòw xY w)Nr   )ÚsettingsÚntÚgeos_czlibgeos_c-1ÚposixÚGEOSzUnsupported OS "%s"z]Could not find the GEOS library (tried "%s"). Try setting GEOS_LIBRARY_PATH in your settings.z", ")Údjango.confr   ÚGEOS_LIBRARY_PATHÚAttributeErrorÚImportErrorr	   ÚOSErrorÚosÚnamer   Újoinr   ÚCONTEXT_PTRÚ
initGEOS_rÚrestypeÚfinishGEOS_rÚargtypesr   ÚGEOSversion)r   Úlib_pathÚ	lib_namesÚlib_nameÚ_lgeoss        ú]/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/django/contrib/gis/geos/libgeos.pyÚ	load_geosr&      s  € ðÝ(à×-Ñ-ˆñ
 Ø‰	Ü	�‰�DŠà˜}Ð-‰	Ü	�‰�GÒ	à˜vÐ&‰	äÐ/´"·'±'Ñ9Ó:Ð:ñ
 Ø!ò 	ˆHÜ# HÓ-ˆHØÑ#Ùð	ð ÐÜð>Ø@FÇÁÈIÓ@VñWó
ð 	
ô �(‹^€Fô
 !,€F×ÑÔÜ$/ =€F×ÑÔ ä!)€F×ÑÔØ€MøôW œKÔ)=¼wÐGò ØŠðús   ‚C) Ã)DÄDc                 óž   — | j                  «       |j                  «       }} 	 | |z  }t        j                  d|«       y # t        $ r | }Y Œ$w xY w)NzGEOS_NOTICE: %s
)ÚdecodeÚ	TypeErrorÚloggerÚwarning)ÚfmtÚlstÚwarn_msgs      r%   Únotice_hr/   P   sL   € Ø�z‰z‹|˜SŸZ™Z›\ˆ€CðØ˜‘9ˆô ‡N�NÐ&¨Õ1øô ò ØŠðúó   ¢> ¾AÁAc                 óž   — | j                  «       |j                  «       }} 	 | |z  }t        j                  d|«       y # t        $ r | }Y Œ$w xY w)NzGEOS_ERROR: %s
)r(   r)   r*   Úerror)r,   r-   Úerr_msgs      r%   Úerror_hr4   ^   sL   € Ø�z‰z‹|˜SŸZ™Z›\ˆ€CðØ˜‘)ˆô ‡L�LÐ# WÕ-øô ò ØŠðúr0   c                   ó   — e Zd Zy)Ú
GEOSGeom_tN©Ú__name__Ú
__module__Ú__qualname__© ó    r%   r6   r6   m   ó   „ Ør<   r6   c                   ó   — e Zd Zy)ÚGEOSPrepGeom_tNr7   r;   r<   r%   r?   r?   q   r=   r<   r?   c                   ó   — e Zd Zy)ÚGEOSCoordSeq_tNr7   r;   r<   r%   rA   rA   u   r=   r<   rA   c                   ó   — e Zd Zy)ÚGEOSContextHandle_tNr7   r;   r<   r%   rC   rC   y   r=   r<   rC   c                   óB   — e Zd ZdZdZdZdZddddœd„Zd„ Ze	d„ «       Z
y)ÚGEOSFuncFactoryz)
    Lazy loading of GEOS functions.
    N)r   Úerrcheckr   c                óJ   — || _         |�|| _        |�|| _        |�|| _        y y ©N)Ú	func_namer   rF   r   )ÚselfrI   r   rF   r   s        r%   Ú__init__zGEOSFuncFactory.__init__�   s5   € Ø"ˆŒØÐØ"ˆDŒLØÐØ$ˆDŒMØÐØ$ˆD�Mð  r<   c                 ó    —  | j                   |Ž S rH   )Úfunc)rJ   Úargss     r%   Ú__call__zGEOSFuncFactory.__call__™   s   € Øˆt�y‰y˜$ÐÐr<   c                 ó¼   — ddl m}  || j                  «      }| j                  xs g |_        | j                  |_        | j
                  r| j
                  |_        |S )Nr   )ÚGEOSFunc)Ú-django.contrib.gis.geos.prototypes.threadsaferQ   rI   r   r   rF   )rJ   rQ   rM   s      r%   rM   zGEOSFuncFactory.funcœ   sE   € åJá˜Ÿ™Ó'ˆØŸ™Ò+¨ˆŒØ—|‘|ˆŒØ�=Š=Ø ŸM™MˆDŒMØˆr<   )r8   r9   r:   Ú__doc__r   r   rF   rK   rO   r   rM   r;   r<   r%   rE   rE   ‡   s=   „ ñð €HØ€GØ€Hà-1¸DÈ4ô %ò ð ñó ñr<   rE   c                  ó*   — t         j                  «       S )z.Return the string version of the GEOS library.)Úlgeosr    r;   r<   r%   Úgeos_versionrV   ¨   s   € ä×ÑÓÐr<   c                  óD   — t        t        «       j                  «       «      S )z<Return the GEOS version as a tuple (major, minor, subminor).)r   rV   r(   r;   r<   r%   Úgeos_version_tuplerX   ­   s   € äœ\›^×2Ñ2Ó4Ó5Ð5r<   )%rS   Úloggingr   Úctypesr   r   r   r   r   Úctypes.utilr   Údjango.core.exceptionsr	   Údjango.utils.functionalr
   r   Údjango.utils.versionr   Ú	getLoggerr*   r&   Ú
NOTICEFUNCr/   Ú	ERRORFUNCr4   r6   r?   rA   rC   ÚGEOM_PTRÚPREPGEOM_PTRÚCS_PTRr   rU   rE   rV   rX   r;   r<   r%   ú<module>re      sù   ðñó Û 	ß @Õ @Ý $å 7ß EÝ 2à	ˆ×	Ñ	Ð/Ó	0€ò1ñn �t˜X xÓ0€
ò2ñ �hÓ€á�d˜H hÓ/€	ò.ñ �GÓ
€ô	�ô 	ô	�Yô 	ô	�Yô 	ô	˜)ô 	ñ
 �:Ó€Ù�~Ó&€Ù	�Ó	 €ÙÐ)Ó*€ñ 	˜Ó#€÷ñ òBó
6r<   