Re"ddlmZmZmZ ddlmZn#e$r ddlmZYnwxYwddlm Z m Z ddl Z ddl m Z ddl mZdd lmZdd lmZd ZeeZdS) )absolute_importdivisionunicode_literals)MutableMapping)minidomNodeN)base) constants) namespaces)moduleFactoryFactorycGddtGfddtjGfddtj}dt S)Nc>eZdZdZdZdZdZdZdZdZ dZ d S) getDomBuilder..AttrListc||_dSNelementselfrs /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/html5lib/treebuilders/dom.py__init__z(getDomBuilder..AttrList.__init__s "DLLLcXt|jjSr)iterr attributeskeysrs r__iter__z(getDomBuilder..AttrList.__iter__s! /446677 7rct|trt|jj|}||_||jj|<dSr) isinstancetupleNotImplementedErrorr ownerDocumentcreateAttributevaluer)rnamer'attrs r __setitem__z+getDomBuilder..AttrList.__setitem__sN$&& 5))|1AA$GG" 04 '---rc4t|jjSr)lenrrrs r__len__z'getDomBuilder..AttrList.__len__#st|.// /rcXt|jjSr)listrritemsrs rr0z%getDomBuilder..AttrList.items&s! /557788 8rcXt|jjSr)r/rrvaluesrs rr2z&getDomBuilder..AttrList.values)s! /668899 9rcht|trt|jj|jSr)r"r#r$rrr'rr(s r __getitem__z+getDomBuilder..AttrList.__getitem__,s-$&& ;))|.t4::rcXt|trt|jj|=dSr)r"r#r$rrr4s r __delitem__z+getDomBuilder..AttrList.__delitem__2s-$&& 2))L+D111rN) __name__ __module__ __qualname__rr r*r-r0r2r5r7rrAttrListrs # # # 8 8 8 5 5 5 0 0 0 9 9 9 : : : ; ; ;  2 2 2 2 2rr<ceZdZdZedZdZddZdZdZ dZ fd Z d Z ee e Z fd Zd Zd ZeeZdS)"getDomBuilder..NodeBuilderc^tj||j||_dSr)r rrnodeNamerrs rrz+getDomBuilder..NodeBuilder.__init__9s( I  tW%5 6 6 6"DLLLrcHt|jdr |jjpdS)N namespaceURI)hasattrrrBrs rz+getDomBuilder..NodeBuilder.=s*'$,*O*O+7!\6+?:>rcR||_|j|jdSr)parentr appendChildrnodes rrGz.getDomBuilder..NodeBuilder.appendChild@s'DK L $ $T\ 2 2 2 2 2rNc|jj|}|r"|j||jdS|j|dSr)rr%createTextNode insertBeforerG)rdatarLtexts r insertTextz-getDomBuilder..NodeBuilder.insertTextDs_<-<.NodeBuilder.insertBeforeKs) L % %dlGO D D DDKKKrc||jj|jkr|j|jd|_dSr)r parentNode removeChildrFrHs rrTz.getDomBuilder..NodeBuilder.removeChildOs7|&$,66 ((666DKKKrc|jrY|jj}|j||j||jYg|_dSr)r hasChildNodes firstChildrTrG childNodes)r newParentchilds rreparentChildrenz3getDomBuilder..NodeBuilder.reparentChildrenTst,,,.. 5 / ((///!--e444,,,.. 5!DOOOrc$|jSrr)rr<s r getAttributesz0getDomBuilder..NodeBuilder.getAttributes[s8DL)) )rcL|rt|D]\}}t|trH|d|ddz|dz}n|d}|j|d||b|j||~dSdS)Nr:r r )r/r0r"r#rsetAttributeNS setAttribute)rrr(r' qualifiedNames r setAttributesz0getDomBuilder..NodeBuilder.setAttributes^s )#' (8(8(:(:#;#; ) )KD%!$.. )7.-1!Ws]T!W-DMM,0GM 33DG]49;;;; 11 %)))) ) ) ) )rcJ|jdS)NF)r cloneNoder NodeBuilders rrez,getDomBuilder..NodeBuilder.cloneNodems#;t|55e<<== =rc4|jSr)rrVrs r hasContentz-getDomBuilder..NodeBuilder.hasContentps<--// /rcT|jtd|jfS|j|jfS)Nhtml) namespacer r(rs r getNameTuplez/getDomBuilder..NodeBuilder.getNameTupless+~%!&)4944~ty00rr)r8r9r:rpropertyrlrGrOrLrTr[r]rcrrerirm nameTuple)r<rgsrrgr>8s # # #H??@@  3 3 3 / / / /        ! ! ! * * * * * ) ) )Xm];;  > > > > > 0 0 0 1 1 1 H\** rrgcreZdZfdZfdZd fd ZfdZfdZdZfdZ d Z d Z d d Z Z dZdS) "getDomBuilder..TreeBuildercddd|_tj|Sr)getDOMImplementationcreateDocumentdomweakrefproxy)rDoms r documentClassz0getDomBuilder..TreeBuilder.documentClass|s8//11@@tTRRDH=&& &rc|d}|d}|d}}||||}|j|tkr|j|_dSdS)Nr(publicIdsystemId)rscreateDocumentTypedocumentrGrrur%) rtokenr(r{r|domimpldoctyperxrgs r insertDoctypez0getDomBuilder..TreeBuilder.insertDoctypes=DZ(HZ(H..00G00xJJG M % %kk'&:&: ; ; ;g~~(,%%%~rNc|"|j|j|}n|j||}|Sr)defaultNamespaceru createElementcreateElementNS)rr(rlrIrgs r elementClassz/getDomBuilder..TreeBuilder.elementClasssO T%:%Bx--d33x// 4@@;t$$ $rcJ|j|Sr)ru createComment)rrMrgs r commentClassz/getDomBuilder..TreeBuilder.commentClasss#;tx55d;;<< .TreeBuilder.fragmentClasss!;tx>>@@AA ArcD|j|jdSr)rurGrrHs rrGz.getDomBuilder..TreeBuilder.appendChilds H  . . . . .rc|Srr;)rrtestSerializers rrz1getDomBuilder..TreeBuilder.testSerializers!>'** *rc|jSr)rurs r getDocumentz.getDomBuilder..TreeBuilder.getDocuments 8OrcJtj|jSr)r TreeBuilder getFragmentrrs rrz.getDomBuilder..TreeBuilder.getFragments#//55= =rc|}||kr#tj|||dSt|jdrdt j|jjvrLt|jj|j_|jj t j|j |j |dS)N_child_node_types) r rrOrCrur TEXT_NODErr/appendrGrK)rrMrFs rrOz-getDomBuilder..TreeBuilder.insertTextsD~~ ++D$?????48%899J~TX-GGG59$(:T5U5U2299$.III$$TX%<% > > D D D D+rrc|gdfd |ddS)Nrc |jtjkr|jrr|js|jr>|jpd}|jpd} dd|zd|jd|d|d nP dd|zd|jdn* dd|zd n |jtjkr d n|jtjkr d n|jtj kr& dd|zd |j d ny|jtj kr& dd|zd|j dn>t|dr)|j "tj|j d|j}n|j} dd|zd|d|rg}t%t'|jD]n}|j|}|j}|j}|j } | rtj| d|j}n|j}|||fot1|D])\}} dd|dzz|d|d*|dz }|jD]}  | |dS)N| z >z z #documentz#document-fragmentz"rB.testSerializer..serializeElementsV4#:::< B'U7+;U#*#3#9r#*#3#9r #&<<<xxx#STTTT f glll"STTTTIII#,,,@AAAA!T%777 +&&&&!T%@@@ .////!T%666 cFlllG.testSerializersd - 0- 0- 0- 0- 0- 0- 0\ !$$$yy}}r)rr rrlocals)rrr<rxrgrs` @@@@r getDomBuilderrs C"2"2"2"2"2>"2"2"2HA+A+A+A+A+A+A+A+diA+A+A+F8888888888d&888t444l 88Or) __future__rrrcollections.abcr ImportError collectionsxml.domrrrvrr r r _utilsrr getDomModuler;rrrsBBBBBBBBBB+.......+++********+!!!!!!!!""""""))))))ZZZ|$#M22 s  !!