XjZdZddlmZddlZddlZGddeZedZedZy)z_Provides the PackURI value type. Also some useful known pack URI strings such as PACKAGE_URI. ) annotationsNceZdZdZej dZd dZeddZ e ddZ e ddZ e dZ e dZe d Zdd Ze d Zy )PackURIzxProvides access to pack URI components such as the baseURI and the filename slice. Behaves as |str| otherwise. z([a-zA-Z]+)([1-9][0-9]*)?c^|ddk7rd}t||ztj||S)Nr/z'PackURI must begin with slash, got '%s') ValueErrorstr__new__)cls pack_uri_strtmpls d/mnt/ssd/data/Dropbox/adrian/vault-secondbrain/venv/lib/python3.12/site-packages/docx/opc/packuri.pyr zPackURI.__new__s4 ?c !u{{1~& &rc |ddS)zThe pack URI with the leading slash stripped off, the form used as the Zip file membername for the package item. Returns '' for the package pseudo-partname '/'. r Nrs r membernamezPackURI.membernameMsABxrcB|dk(r|ddStj||S)zReturn string containing relative reference to package item from `baseURI`. E.g. PackURI('/ppt/slideLayouts/slideLayout1.xml') would return '../slideLayouts/slideLayout1.xml' for baseURI '/ppt/slides'. rr N)rrelpath)rrs rrzPackURI.relative_refVs(#c>tABxOy/@/@w/OOrcxd|jz}tj|jd|}t |S)zThe pack URI of the .rels part corresponding to the current pack URI. Only produces sensible output if the pack URI is a partname or the package pseudo-partname '/'. z%s.rels_rels)r'rrrr)r rels_filename rels_uri_strs rrels_urizPackURI.rels_uri`s3"DMM1  ~~dllG]K |$$rN)r r )rr rr returnr)r:r )rr )__name__ __module__ __qualname____doc__recompiler*r staticmethodrpropertyrr%r'r/r2rr9r1rrrr s 2::9:L.   ((CC((  P%%rrrz/[Content_Types].xml) r> __future__rrr?r r PACKAGE_URICONTENT_TYPES_URIr1rrrFs; # ]%c]%@cl 23r