~f dZddlmZddlmZmZddlZddlZddlm Z m Z dZ ejdZ edZed Zed dd ZGd deZdddZdddZddZy)zUtility.) annotations)wraps lru_cacheN)CallableAnyz(?:\r\n|(?!\r\n)[\n\r])|$AZi)maxsizecg}|D]B}t|}|jt|cxkr tkrnnt |dzn|Ddj |S)zLower. )ordappendUC_AUC_Zchrjoin)string new_stringcos W/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/soupsieve/util.pylowerrsQJ  F):d):#a"f+B 77: c&eZdZdZddfd ZxZS)SelectorSyntaxErrorzSyntax error in a CSS selector.cd|_d|_d|_|?|=t||\|_|_|_|d|jd|j}t||y)z Initialize.Nz line z: )linecolcontextget_pattern_contextsuper__init__)selfmsgpatternindex __class__s rr$zSelectorSyntaxError.__init__si   5#40CGU0S -DL$)TXE499+S?C r)NN)r&strr'z str | Noner(z int | NonereturnNone)__name__ __module__ __qualname____doc__r$ __classcell__)r)s@rrrs)  rrcdfd }|S)z Raise a `DeprecationWarning` when wrapped function/method is called. Usage: @deprecated("This method will be removed in version X; use Y instead.") def some_method()" pass c6tdfd }|S)Ncltjdjdt|i|S)N'z' is deprecated. category stacklevel)warningswarnr-DeprecationWarning)argskwargsfuncmessager8s r_deprecated_funcz6deprecated.._wrapper.._deprecated_func9s< MMDMM?"3G9=+%  (( (r)r<rr=rr+r)r)r>r@r?r8s` r_wrapperzdeprecated.._wrapper8s! t )  ) r)r>Callable[..., Any]r+rB)r?r8rAs`` r deprecatedrD-s   Orc<tj|t|y)zWarn deprecated.r6N)r9r:r;)r?r8s rwarn_deprecatedrFEs MM#rcd}d}d}g}d}d}tj|D]}|||jd} t|j dst|s d} d}||z dz}nG||cxkr|j dkr)nn&d} ||jdkDrdnddz}||z dz}nd} d}t|r|j d |j | | |-|j d |j d ||zzd z|}|dz }|j d} dj|||fS) zGet the pattern context.rrNrz--> z   ^)RE_PATTERN_LINE_SPLITfinditerstartlengroupendrr) r'r(last current_liner textroffsetmlinetextindents rr"r"OsP DL C D D F# + +G 44 +1771:s4yFF$,"C U %QUU1X %F!AGGAJ.bA:F$,"CFF t9 KK  vhxj)*   KK  KKsV|,s2 3D uuQx356 774=$ ##r)rr*r+r*))r?r*r8intr+rB)r?r*r8r[r+r,)r'r*r(r[r+ztuple[str, int, int])r0 __future__r functoolsrrr9retypingrrDEBUGcompilerMrrrr ExceptionrrDrFr"rCrrrcst"& " #?@ 3x 3x 3)$0&$r