+
    =i                         ^ RI t ^ RIt^ RIHt ^ RIHtHt ^ RIHtH	t	H
t
 ^ RIHtHt  ! R R4      t ! R R	]4      tR# )
    N)Path)
PACKAGE_IDSUPPORTED_NUMBERS_VERSIONS)IWAFilecopy_object_to_iwa_filecreate_iwa_segment)IWorkIWorkHandlerc                   z   a  ] tR t^
t o V 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R	 lR
 ltRt	V t
R# )	ItemsListc                   < V ^8  d   QhRR/#    returnN )format__classdict__s   "|/Users/tonyclaw/.openclaw/workspace/scripts/youtube-playlists/venv/lib/python3.14/site-packages/numbers_parser/containers.py__annotate__ItemsList.__annotate__   s     ; ;4 ;    c                    VP                   P                  4       V n        V Uu. uF
  qC! W4      NK  	  upV n        R # u upi N)__name__lower
_item_name_items)selfmodelrefs
item_classxs   &&&& r   __init__ItemsList.__init__   s6    $--33559:Tz%+T::s   >c                    < V ^8  d   QhRS[ /# r   keyint)r   r   s   "r   r   r      s      s r   c                   \        V\        4      '       db   V^ 8  d   V\        V P                  4      ,          pV\        V P                  4      8  d   RV R2p\	        V4      hV P                  V,          # \        V\
        4      '       dG   V P                   F  pVP                  V8X  g   K  Vu # 	  RV P                   RV R2p\        V4      h\        V4      P                  pRV 2p\        V4      h)r   zindex z out of rangezno z named ''zinvalid index type )
isinstancer)   lenr   
IndexErrorstrnamer   KeyErrortyper   LookupError)r   r'   msgitemts   &&   r   __getitem__ItemsList.__getitem__   s    c3Qws4;;''c$++&&se=1 o%;;s##c399#K $ (Q7C3-I#A3'#r   c                    < V ^8  d   QhRS[ /# r   r   r(   )r   r   s   "r   r   r   !   s          r   c                ,    \        V P                  4      # r   )r-   r   r   s   &r   __len__ItemsList.__len__!   s    4;;r   c                    < V ^8  d   QhRS[ /# r:   )bool)r   r   s   "r   r   r   $   s     D D4 Dr   c                    VP                  4       V P                   Uu. uF  q"P                  P                  4       NK  	  up9   # u upi r   )r   r   r0   )r   r'   r"   s   && r   __contains__ItemsList.__contains__$   s1    yy{t{{C{!vv||~{CCCCs   "Ac                   < V ^8  d   QhRR/# r   r   )r   r   s   "r   r   r   '   s     ! !d !r   c                <    V P                   P                  V4       R # r   )r   append)r   r5   s   &&r   rF   ItemsList.append'   s    4 r   )r   r   N)r   
__module____qualname____firstlineno__r#   r7   r=   rB   rF   __static_attributes____classdictcell__r   s   @r   r   r   
   s9     ; ; $   D D! !r   r   c                     a  ] tR t^+t o V 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltV 3R	 lR
 ltV 3R lR lt	R t
RV 3R lR lltV 3R lR lt]R 4       tV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR ltRtV tR# )ObjectStorec                &   < V ^8  d   QhRS[ RS[/# )r   filepathr   )r   r)   )r   r   s   "r   r   ObjectStore.__annotate__,   s     	C 	C 	C# 	Cr   c                L   / V n         / V n        / V n        / V n        \	        V R 7      V n        V P
                  P                  V4       \        V P                   P                  4       4      V n	        \        P                  ! V P                  R,          4      R,          V n	        R# ))handleri@B N)_objects_file_store_object_to_filename_map_dirtyr	   _iworkopenmaxkeys_max_idmathceil)r   rQ   s   &&r   r#   ObjectStore.__init__,   su    ')$D)"4==--/0yy!787Br   c                *   < V ^8  d   QhRS[ RS[RR/# )r   rQ   packager   N)r   r@   )r   r   s   "r   r   rR   7   s"     > >T >D >T >r   c                R    V P                   P                  WP                  V4       R # r   )rY   saverV   )r   rQ   rb   s   &&&r   rd   ObjectStore.save7   s    #3#3W=r   c                0   < V ^8  d   QhRS[ RS[RS[RR/# )r   filename
identifierarchiver   N)r/   r)   object)r   r   s   "r   r   rR   :   s)     < <S <c <F <t <r   c                >    W0P                   V&   WP                  V&   R # r   )rU   rW   )r   rg   rh   ri   s   &&&&r   store_objectObjectStore.store_object:   s    $+j!3;$$Z0r   c                *   < V ^8  d   QhRS[ RS[RR/# )r   rg   blobr   N)r/   bytes)r   r   s   "r   r   rR   >   s"     * *3 *e * *r   c                "    W P                   V&   R # r   rV   )r   rg   ro   s   &&&r   
store_fileObjectStore.store_file>   s    %)"r   c                &   < V ^8  d   QhRS[ RS[/# )r   	extensionr   r/   r@   )r   r   s   "r   r   rR   A   s     ' ' ' 'r   c                    VR8H  # )zLbool: Return ``True`` if the filename extension is supported by the handler.z.numbersr   )r   rv   s   &&r   allowed_formatObjectStore.allowed_formatA   s    J&&r   c                &   < V ^8  d   QhRS[ RS[/# )r   versionr   rw   )r   r   s   "r   r   rR   E   s     5 5s 5t 5r   c                D    \         P                  ! RRV4      pV\        9   # )z9bool: Return ``True`` if the document version is allowed.z(\d+)\.(\d+)\.\d+z\1.\2)resubr   )r   r|   s   &&r   allowed_versionObjectStore.allowed_versionE   s!    &&-xA444r   c                    V ;P                   ^,          un         V P                   V P                  \        ,          n        V P                   # )z9Return the next available message ID for object creation.)r]   rU   r   last_object_identifierr<   s   &r   new_message_idObjectStore.new_message_idJ   s/    ;?<<j!8||r   c                ,   < V ^8  d   QhRS[ RS[RS[/# )r   iwa_fileobject_dictcls)r/   dictrj   )r   r   s   "r   r   rR   P   s"     - - -$ -V -r   c                   V P                   P                  4        UUu. uF  w  rVW9   g   K  VNK  	  ppp\        V4      ^ 8X  d   RMV^ ,          pV P                  4       p	\	        WV4      p
Vf[   V'       gS   VP                  V	4      R,           pRRV
P                  4       ././p\        P                  ! V4      V P                   V&   M=V P                   V,          P                  ^ ,          P                  P                  V
4       V! R/ VB V P                  V	&   WP                  V	&   WP                  V	,          3# u uppi )z
Create a new object and store the associated IWA segment. Return the
message ID for the object and the newly created object. If the IWA
file cannot be found, it will be created.
Nz.iwachunksarchivesr   )rV   itemsr-   r   r   r   to_dictr   	from_dictr   r   rF   rU   rW   )r   r   r   r   rF   kvpathsiwa_pathnamenew_idiwa_segmentr   s   &&&&&       r   create_object_from_dict#ObjectStore.create_object_from_dictP   s     $//557I7tq8=7I"5zQtE!H$$&(kB#??62V;L*{/B/B/D.E!F GHF-4->->v-FD\*\*11!4==DD[Q # 2k 2f/;$$V,}}V,,, Js
   
D?D?c                   < V ^8  d   QhRR/# r   r   )r   r   s   "r   r   rR   g   s     
 
$ 
r   c                    V P                    FC  p\        V P                  V P                  V,          ,          V P                   V,          V4       KE  	  R# )z
Copy the protobuf messages from any updated object to the cached
version in the file store so this can be saved to a new document.
N)rU   r   rV   rW   )r   obj_ids   & r   update_object_file_store$ObjectStore.update_object_file_storeg   sB    
 mmF#  !=!=f!EFf% $r   c                    V P                   # r   rr   r<   s   &r   
file_storeObjectStore.file_stores   s    r   c                    < V ^8  d   QhRS[ /# r&   )r/   )r   r   s   "r   r   rR   w   s     " "s "r   c                (    V P                   V,          # r   rU   r   r'   s   &&r   r7   ObjectStore.__getitem__w   s    }}S!!r   c                &   < V ^8  d   QhRS[ RS[/# )r   r'   r   rw   )r   r   s   "r   r   rR   z   s     $ $ $ $r   c                    WP                   9   # r   r   r   s   &&r   rB   ObjectStore.__contains__z   s    mm##r   c                    < V ^8  d   QhRS[ /# r:   r(   )r   r   s   "r   r   rR   }   s     " " "r   c                ,    \        V P                  4      # r   )r-   rU   r<   s   &r   r=   ObjectStore.__len__}   s    4==!!r   c                    < V ^8  d   QhRS[ /# r:   )list)r   r   s   "r   r   rR      s     U UT Ur   c                    V P                   P                  4        UUu. uF#  w  r#\        V4      P                  V8X  g   K!  VNK%  	  upp# u uppi r   )rU   r   r2   r   )r   ref_namer   r   s   &&  r   	find_refsObjectStore.find_refs   s>    "mm113T3datAw7G7G87S3TTTs   AA)rX   rV   rY   r]   rW   rU   N)F)r   rH   rI   rJ   r#   rd   rl   rs   ry   r   r   r   r   propertyr   r7   rB   r=   r   rK   rL   rM   s   @r   rO   rO   +   s     	C 	C> >< <* *' '5 5
- -.
 
    " "$ $" "U Ur   rO   )r^   r~   pathlibr   numbers_parser.constantsr   r   numbers_parser.iwafiler   r   r   numbers_parser.iworkr	   r
   r   rO   r   r   r   <module>r      s5     	  K W W 4! !BWU, WUr   