Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 ©«jY3ã@s¢UdZdZdZddlZddlZddlZddlmZddlm Z ddl m Z m Z m Z mZmZddlmZdd lmZmZmZmZmZmZmZmZydd lmZWn ek r¾dd lmZYnXd d lmZm Z eee!e!e!fee!e!e!fee!e!e!ffZ"e"ee!e!e!e!e!e!fZ#e#eee e efZ$ee%e$fZ&d Z'dZ(e)e)e)dœdd„Z*d]e$ee+e)dœdd„Z,e$e)dœdd„Z-e$e.dœdd„Z/e$ddœdd„Z0d^e$ee)e.e)dœdd„Z1e$e+e)d œd!d"„Z2e$e)dœd#d$„Z3e"e"e"d%œd&d'„Z4e$ddœd(d)„Z5iZ6eee%e)fe)f6ee%e)fe)d*œd+d,„Z7ee%e%d-œd.d/„ƒZ8ee)e%d-œd0d/„ƒZ8ee%e)fe%d-œd1d/„Z8ee%e+d-œd2d3„ƒZ9ee)e)d-œd4d3„ƒZ9ee+e+d-œd5d3„ƒZ9ee+e%e)fee+e)fd-œd6d3„Z9e)e)d-œd7d8„Z:e+e%d9œd:d;„Z;d_Zdae%e%e%ddIœdJdK„Z?dbe%e%ddLœdMdN„Z@e%e%ddOœdPdQ„ZAe%edRœdSdT„ZBe%ee%efee%e%fdUœdVdW„ZCe+e%dXœdYdZ„ZDe Gd[d\„d\ƒƒZEdS)cz"Utility functions for PDF library.zMathieu Fenniakzbiziqe@mathieu.fenniak.netéN)Ú getencoder)Ú dataclass)ÚDEFAULT_BUFFER_SIZEÚBufferedReaderÚBufferedWriterÚBytesIOÚFileIO)ÚSEEK_CUR)ÚAnyÚCallableÚDictÚOptionalÚPatternÚTupleÚUnionÚoverload)Ú TypeAliasé)ÚSTREAM_TRUNCATED_PREMATURELYÚPdfStreamErrorz2{} is deprecated and will be removed in PyPDF2 {}.zE{} is deprecated and will be removed in PyPDF2 3.0.0. Use {} instead.)Úheader1Úheader2ÚreturncCsfd }g}||kr |j|j|ƒƒ||kr8|j|j|ƒƒt|ƒdkrZtd|›d |›d �ƒ‚|t|ƒS) Nó%PDF-1.3ó%PDF-1.4ó%PDF-1.5ó%PDF-1.6ó%PDF-1.7ó%PDF-2.0rzneither z nor z are proper headers)rrrrrr)ÚappendÚindexÚlenÚ ValueErrorÚmax)rrÚversionsZpdf_header_indices©r%ú//tmp/pip-build-vnmlutbd/PyPDF2/PyPDF2/_utils.pyÚ_get_max_pdf_version_headerNs r')ÚstreamÚmaxcharsrcCs>d}x4|jdƒ}|jƒs| r P||7}t|ƒ|krPqW|S)z~ Read non-whitespace characters and return them. Stops upon encountering whitespace or when maxchars is reached. ór)ÚreadÚisspacer!)r(r)ÚtxtÚtokr%r%r&Úread_until_whitespaceas  r/)r(rcCs&|jdƒ}x|tkr |jdƒ}q W|S)zEFind and read the next non-whitespace character (ignores whitespace).r)r+Ú WHITESPACES)r(r.r%r%r&Úread_non_whitespacers  r1cCs4td}d}x|tkr*|jdƒ}|d7}qW|dkS)zr Similar to read_non_whitespace, but return a Boolean if more than one whitespace character was read. rr)r0r+)r(r.Zcntr%r%r&Úskip_over_whitespacezs    r2cCs:|jdƒ}|jddƒ|dkr6x|dkr4|jdƒ}q WdS)Nró%ó ó éÿÿÿÿ)r4r5)r+Úseek)r(r.r%r%r&Úskip_over_comment‡s    r8F)r(ÚregexÚ ignore_eofrcCstd}xj|jdƒ}|s$|r|Sttƒ‚|j|ƒ}|dk rd||d|jƒ…7}|j|jƒt|ƒdƒP||7}qW|S)zñ Read until the regular expression pattern matched (ignore the match). :raises PdfStreamError: on premature end-of-file :param bool ignore_eof: If true, ignore end-of-line and return immediately :param regex: re.Pattern r*éNr)r+rrÚsearchÚstartr7r!)r(r9r:Únamer.Úmr%r%r&Úread_until_regex�s    r@)r(Úto_readrcCs>|jƒ|krtdƒ‚|j| tƒ|j|ƒ}|j| tƒ|S)z´ Given a stream at position X, read a block of size to_read ending at position X. This changes the stream's position to the beginning of where the block was read. z!Could not read malformed PDF file)Útellrr7r r+)r(rAr+r%r%r&Úread_block_backwards©s   rCcCsøg}d}|jƒdkrttƒ‚xÆtt|jƒƒ}|dkr6Pt||ƒ}t|ƒd}|s~x |dkrp||dkrp|d8}qRW|dkr~d}|r¼|j||dd…ƒx,|dkr¸||dkr¸|d8}qšWn |j|ƒ|dkr|j|dt ƒPqWdj |ddd…ƒS) aª Given a byte stream with current position X, return the previous line. All characters between the first CR/LF byte found before X (or, the start of the file, if no such byte is found) and position X After this call, the stream will be positioned one byte after the first non-CRLF character found beyond the first CR/LF byte before X, or, if no such byte is found, at the beginning of the stream. Frrs TNr*r6) rBrrÚminrrCr!rr7r Újoin)r(Z line_contentZ found_crlfrAÚblockÚidxr%r%r&Úread_previous_lineºs0      rH)ÚaÚbrcst‡fdd„|DƒƒS)Nc3s(|] ‰t‡fdd„tˆŽDƒƒVqdS)c3s&|]}tdd„tˆ|ƒDƒƒVqdS)css"|]\}}t|ƒt|ƒVqdS)N)Úfloat)Ú.0ÚiÚjr%r%r&ú ñsz6matrix_multiply....N)ÚsumÚzip)rLÚcol)Úrowr%r&rOñsz,matrix_multiply...N)ÚtuplerQ)rL)rJ)rSr&rOñsz"matrix_multiply..)rT)rIrJr%)rJr&Úmatrix_multiplyís rUc Csdd}|j| dƒtddƒ�0}|j|j|ƒƒ|jdƒ|j|j|ƒƒWdQRX|j| dƒdS)z5Create text file showing current location in context.iˆrzPyPDF2_pdfLocation.txtÚwbsHEREN)r7ÚopenÚwriter+)r(ZradiusZ output_fhr%r%r&Ú mark_locationös  rY)Úsrc Cs|t}||kr||St|tƒr"|Sy"|jdƒ}t|ƒdkrB|||<|Stk rv|jdƒ}t|ƒdkrr|||<|SXdS)Nzlatin-1ézutf-8)ÚB_CACHEÚ isinstanceÚbytesÚencoder!Ú Exception)rZZbcÚrr%r%r&Úb_s     rb)rJrcCsdS)Nr%)rJr%r%r&Ústr_srccCsdS)Nr%)rJr%r%r&rcscCst|tƒr|jdƒS|SdS)Nzlatin-1)r]r^Údecode)rJr%r%r&rc!s  cCsdS)Nr%)rJr%r%r&Úord_(srecCsdS)Nr%)rJr%r%r&re-scCsdS)Nr%)rJr%r%r&re2scCst|tƒrt|ƒS|S)N)r]ÚstrÚord)rJr%r%r&re7s cCstdƒ}||ƒ}|dS)NÚ hex_codecr)r)rJZcoderZcodedr%r%r&Ú hexencode=sri)ÚnumrcCst|ƒjddƒS)NÚLÚ)ÚhexÚreplace)rjr%r%r&Úhex_strDsroó r4r5ó ó)ÚleftÚupÚup_leftrcCsX|||}t||ƒ}t||ƒ}t||ƒ}||krD||krD|S||krP|S|SdS)N)Úabs)rsrtruÚpZ dist_leftZdist_upZ dist_up_leftr%r%r&Úpaeth_predictorKs    rxé)ÚmsgÚ stacklevelrcCstj|t|d�dS)N)r{)ÚwarningsÚwarnÚPendingDeprecationWarning)rzr{r%r%r&Ú deprecateYsrú3.0.0)Úold_nameÚnew_nameÚ removed_inrcCsttj|||ƒdƒdS)Né)rÚDEPR_MSGÚformat)r�r‚rƒr%r%r&Údeprecate_with_replacement]sr‡)r>rƒrcCsttj||ƒdƒdS)Nr„)rÚDEPR_MSG_NO_REPLACEMENTr†)r>rƒr%r%r&Údeprecate_no_replacementcsr‰)rzÚsrcrcCstj|ƒj|ƒdS)a“ Use this instead of logger.warning directly. That allows people to overwrite it more easily. ## Exception, warnings.warn, logger_warning - Exceptions should be used if the user should write code that deals with an error case, e.g. the PDF being completely broken. - warnings.warn should be used if the user needs to fix their code, e.g. DeprecationWarnings - logger_warning should be used if the user needs to know that an issue was handled by PyPDF2, e.g. a non-compliant PDF being read in a way that PyPDF2 could apply a robustness fix to still read it. This applies mainly to strict=False mode. N)ÚloggingÚ getLoggerÚwarning)rzrŠr%r%r&Úlogger_warninggsrŽ)Úaliasesrc stdœ‡fdd„ }|S)z¶ Decorator for deprecated term "bookmark" To be used for methods and function arguments outline_item = a bookmark outline = a collection of outline items )Úfunccstjˆƒ‡‡fdd„ƒ}|S)Ncstˆj|ˆƒˆ||ŽS)N)Ú rename_kwargsÚ__name__)ÚargsÚkwargs)r�r�r%r&Úwrapperƒsz7deprecate_bookmark..decoration..wrapper)Ú functoolsÚwraps)r�r•)r�)r�r&Ú decoration‚sz&deprecate_bookmark..decoration)r )r�r˜r%)r�r&Údeprecate_bookmarkzsr™)Ú func_namer”r�c Csvxp|jƒD]d\}}||kr ||krHt|›d|›d|›d|›d|›d� ƒ‚|j|ƒ||<tj|›d|›d�d�q Wd S) z1 Helper function to deprecate arguments. z received both z and z as an argument. z is deprecated. Use z instead.z# is deprecated as an argument. Use z instead)ÚmessageN)ÚitemsÚ TypeErrorÚpopr|r})ršr”r�Zold_termZnew_termr%r%r&r‘�s$r‘)r^rcCsV|d kr|›d�S|d kr*|d d›d�S|d krB|dd›d�S|dd›d �SdS)Né ryz Byteéz.1fz kBé z MBz GBièi@BièiÊš;i@BiÊš;r%)r^r%r%r&Ú_human_readable_bytes£s r¢c@s2eZdZUeeedœdd„Zedœdd„ZdS)ÚFile)rcCsd|j›dtt|jƒƒ›d�S)Nz File(name=z, data: ú))r>r¢r!Údata)Úselfr%r%r&Ú__str__³sz File.__str__cCs*d|j›dtt|jƒƒ›dt|jƒ›d�S)Nz File(name=z, data: z, hash: r¤)r>r¢r!r¥Úhash)r¦r%r%r&Ú__repr__¶sz File.__repr__N) r’Ú __module__Ú __qualname__rfr>r^r¥r§r©r%r%r%r&r£®s r£)N)F)rpr4r5rqrr)ry)r€)r€)FÚ__doc__Ú __author__Ú__author_email__r–r‹r|ÚcodecsrZ dataclassesrÚiorrrrrÚosr Útypingr r r r rrrrrÚ ImportErrorZtyping_extensionsÚerrorsrrrKZTransformationMatrixTypeZCompressedTransformationMatrixZ StreamTyperfZ StrByteTyperˆr…r^r'Úintr/r1Úboolr2r8r@rCrHrUrYr\rbrcreriror0rxrr‡r‰rŽr™r‘r¢r£r%r%r%r&Ús|   ( .   4 ""