zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
U
H=®diãD@s^ dZddlmZmZmZddlZddlZddlmZm    Z    ddl
m Z ddl mZdd    lmZmZd
gZd Ze ee¡eed d fed dfed dfed dfed dfed dfed dfed dfed dfed dfed dfed dfed dfed dfed dfed dfed dfed dfed dfed d fed d!fed d"fed d#fed d$fed d%fed d&fed d'fed d(fed d)fed d*fed d+fed d,fed d-fed d.fed d/fed d0fed d1fed d2fed d3fed d4fed d5fed d6fed d7fed d8fed d9fed d:fed d;fed d<fed d=fed d>fed d?fed d@fed dAfed dBfed dCfed dDfed dEfed dFfed dGfed dHfed dIfed dJfed dKfed dLfed dMfed dNfed dOfed dPfed dQfed dRfed dSfed dTfed dUfed dVfed dWfed dXfed dYfed dZfed d[fed d\fed d]fed d^fed d_fed d`fed dafed dbfed dcfed ddfed defed dffed dgfed dhfed difed djfed dkfed dlfed dmfed dnfed dofedpdqfedpdrfedpdsfedpdtfedpdufedpdvfedpdwfedpdxfedpdyfedpdzfedpd{fedpd|fedpd}fedpd~fedpdfedpd€fedpdfedpd‚fedpdƒfedpd„fedpd…fedpd†fedpd‡fedpdˆfedpd‰fedpdŠfedpd‹fedŒd fedŒdfedŒdŽfedŒdfedŒdfedŒd‘fedŒd’fedŒd“fedŒd”fedŒd•fedŒd–fedŒd—fedŒd˜fedŒd™fedŒdšfedŒd›fedŒdœfedŒdfedŒdžfedŒdŸfedŒd fedŒd¡fedŒd¢fedŒd£fedŒd¤fedŒd¥fedŒd¦fedŒd§fedŒd¨fedŒdŒfedŒd©fedŒdªfedŒd«fedŒd¬fedŒd­ff¡ƒZed®d¯d°d±d²d³d´dµd¶d·d¸d¹dºd»d¼d½d¾d¿dÀdÁdÂdÃdÄdÅdÆdÇdÈdÉdÊdËdÌdÍdÎdÏdÐdÑdÒdÓdÔdÕdÖd×dØdÙdÚdÛdÜdÝdÞdßdàdádâdãdädådædçdèdédêdëdìdídîdïdðdñdòdódôdõdöd÷dødùdúdûdüdýdþdÿdddddddddd    d
d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9ed:d;fd<d³d=d=d=d>d?d@dAdBdCdDdEdFdGdHdädèdIdJdKdLdMdMdNdOdPdQdQdQdRdSddTdUdVdWdXd8d8edYdZfedYd[fedYd\fd]d^d_d`dadbdcdddedfdgdhdidjdːdkd͐dldmdndodpdqdrdsdBdtdàdudvdwdxdydzd{d|d}d~dd€dd‚dƒd„d…dèd†d‡dðdˆd‰dАd‹dŒdöddސddd‘d’d“dÿddd”d•d–d—d˜d™dšd›dœddždŸd d¡d¢d£d¤d¥d¦d§d¨d©dªd«d¬d­d®d¯d°d±d²d³d´dµd¶d·d¸d¹d*dºd»d¼d.d½d¾d¿dÀdÁddÐdĐdŐdƐdǐd8dȐdɐdʐdːdÌedYdÍfedYdÎfedYdZfedYdÏfedYd[fedYd«fedYd\fed:dÐfed:d;fed:dÑfdҐdӐdԐdՐfCƒZedìd#dÊd²dødd¸d×dÞdþd edYdZfed:dÐff ƒZedփZed׃Zed؃ZedكZedڃZedۃZed܃Z e !dÝej"¡Z#GdÞd
„d
ej$ƒZ$dS(ßa2Deprecated from html5lib 1.1.
 
See `here <https://github.com/html5lib/html5lib-python/issues/443>`_ for
information about its deprecation; `Bleach <https://github.com/mozilla/bleach>`_
is recommended as a replacement. Please let us know in the aforementioned issue
if Bleach is unsuitable for your needs.
 
é)Úabsolute_importÚdivisionÚunicode_literalsN)ÚescapeÚunescape)Ú urllib_parseé)Úbaseé)Ú
namespacesÚprefixesÚFilterzœhtml5lib's sanitizer is deprecated; see https://github.com/html5lib/html5lib-python/issues/443 and please let us know if Bleach is unsuitable for your needsÚhtmlÚaÚabbrZacronymÚaddressÚareaÚarticleÚasideÚaudioÚbÚbigÚ
blockquoteÚbrÚbuttonZcanvasÚcaptionÚcenterÚciteÚcodeÚcolÚcolgroupÚcommandÚdatagridZdatalistÚddÚdelÚdetailsÚdfnÚdialogÚdirÚdivÚdlÚdtÚemz event-sourceÚfieldsetÚ
figcaptionÚfigureÚfooterÚfontÚformÚheaderÚh1Úh2Úh3Úh4Úh5Úh6ÚhrÚiÚimgÚinputZinsÚkeygenZkbdÚlabelZlegendÚliÚmÚmapÚmenuZmeterZmulticolÚnavZnextidÚolÚoutputÚoptgroupÚoptionÚpÚpreÚprogressÚqÚsZsampÚsectionÚselectÚsmallZsoundÚsourceZspacerÚspanÚstrikeÚstrongÚsubÚsupÚtableÚtbodyÚtdÚtextareaÚtimeÚtfootÚthÚtheadÚtrÚttÚuÚulÚvarÚvideoÚmathmlZmactionÚmathZmerrorZmfracÚmiZ mmultiscriptsÚmnÚmoZmoverZmpaddedZmphantomZ mprescriptsZmrootZmrowZmspaceZmsqrtZmstyleZmsubZmsubsupZmsupZmtableZmtdÚmtextZmtrZmunderZ
munderoverÚnoneÚsvgÚanimateÚ animateColorÚ animateMotionÚanimateTransformÚclipPathZcircleZdefsÚdescZellipsez    font-facezfont-face-namez font-face-srcÚgZglyphZhkernÚlinearGradientÚlineÚmarkerÚmetadataz missing-glyphZmpathÚpathZpolygonZpolylineÚradialGradientZrectÚsetÚstopÚswitchÚtextÚtitleZtspanÚuse)Nr)NÚaccept)Nzaccept-charset)NZ    accesskey)NÚaction)NZalign)NZalt)NÚ autocomplete)NÚ    autofocus)NZaxis)NÚ
background)NZbalance)NZbgcolor)NZ bgproperties)NÚborder)NZ bordercolor)NZbordercolordark)NZbordercolorlight)NZ bottompadding)NZ cellpadding)NZ cellspacing)NÚch)NÚ    challenge)NÚchar)NZcharoff)NZchoff)NÚcharset)NÚchecked)Nr)NÚclass)NÚclear)NÚcolor)NÚcols)NZcolspan)NÚcompact)NZcontenteditable)NÚcontrols)NZcoords)NÚdata)NZdatafld)NZ datapagesize)NZdatasrc)NÚdatetime)NÚdefault)NÚdelay)Nr()NÚdisabled)NZ    draggable)NZdynsrc)NZenctype)NÚend)NÚface)NÚfor)Nr2)NÚframe)NZ
galleryimg)NZgutter)NÚheaders)NÚheight)NZ    hidefocus)NÚhidden)NÚhigh)NÚhref)NZhreflang)NZhspace)NZicon)NÚid)NZ    inputmode)NÚismap)NZkeytype)Nr?)NZ leftspacing)NÚlang)NÚlist)NZlongdesc)NZloop)NZ    loopcount)NZloopend)NZ    loopstart)NÚlow)NZlowsrc)NÚmax)NZ    maxlength)NZmedia)NÚmethod)NÚmin)NÚmultiple)NÚname)NZnohref)NÚnoshade)NÚnowrap)NÚopen)NZoptimum©NÚpattern)NZping)Nz
point-size)NZposter)NZpqg)NZpreload)NÚprompt)NZ
radiogroup)NÚreadonly)NÚrel)Nz
repeat-max)Nz
repeat-min)NÚreplace)NÚrequired)NÚrev)NZ rightspacing)NÚrows)NZrowspan)NÚrules)NZscope)NÚselected)NÚshape)NÚsize)NrR)NÚsrc)NÚstart)NÚstep©NÚstyle)NÚsummary)NÚsuppress)NZtabindex)NÚtarget)NÚtemplate)Nr~)NZ
toppadding)NÚtype)NZ unselectable)NZusemap)NÚurn)NZvalign)NÚvalue)NÚvariable)NÚvolume)NZvspace)NZvrml)NÚwidth)NÚwrapÚxmlr¡)NZ
actiontype)NZ columnalign)NZ columnlines)NZ columnspacing)NZ
columnspan)NÚdepth)NÚdisplay)NZ displaystyle)NZ equalcolumns)NZ    equalrows)NZfence)NZ    fontstyle)NZ
fontweight)NZ linethickness)NZlspace)NZmathbackground)NZ    mathcolor)NZ mathvariant)NÚmaxsize)NZminsize)NÚother)NZrowalign)NZrowlines)NZ
rowspacing)NZrspace)NZ scriptlevel)NZ    selection)NÚ    separator)NZstretchyÚxlinkržÚshowrÂ)Nz accent-height)NÚ
accumulate)NZadditive)NZ
alphabetic)Nz arabic-form)NZascent)NÚ attributeName)NÚ attributeType)NÚ baseProfile)NZbbox)NÚbegin)NZby)NÚcalcMode)Nz
cap-height©Nz    clip-path)Nzcolor-rendering)NÚcontent)NÚcx)NÚcy)NÚd)NZdx)NZdy)NZdescent)NZdur©NÚfill)Nú fill-opacity)Nú    fill-rule)Nú font-family)Nú    font-size)Nz font-stretch)Nú
font-style)Nú font-variant)Nú font-weight)NÚfrom)NZfx)NZfy)NZg1)NZg2)Nz
glyph-name)NÚ gradientUnits)NZhanging)Nz horiz-adv-x)Nzhoriz-origin-x)NZ ideographic)NÚk)NÚ    keyPoints)NÚ
keySplines)NÚkeyTimes©Nz
marker-end©Nz
marker-mid©Nz marker-start)NÚ markerHeight)NÚ markerUnits)NÚ markerWidth)NZ mathematical)NÚoffset)NZopacity)NZorient)NÚorigin)Nzoverline-position)Nzoverline-thickness)Nzpanose-1)Nrx)NÚ
pathLength)NZpoints)NÚpreserveAspectRatio)NÚr)NÚrefX)NÚrefY)NÚ repeatCount)NÚ    repeatDur)NÚrequiredExtensions)NÚrequiredFeatures)NZrestart)NÚrotate)NÚrx)NZry)NZslope)NZstemh)NZstemv)Nz
stop-color)Nz stop-opacity)Nzstrikethrough-position)Nzstrikethrough-thickness©NÚstroke)Nzstroke-dasharray)Nzstroke-dashoffset)Nústroke-linecap)Nústroke-linejoin)Nzstroke-miterlimit)Nústroke-opacity)Nú stroke-width)NÚsystemLanguage)Nz text-anchor)NÚto)NZ    transform)NÚu1)NÚu2)Nzunderline-position)Nzunderline-thickness)NÚunicode)Nz unicode-range)Nz units-per-em)NÚvalues)NÚversion)NÚviewBox)NZ
visibility)NZwidths)NÚx)Nzx-height)NÚx1)NZx2ÚactuateÚarcroleÚroler    Úspace)NÚy)NÚy1)NÚy2)NÚ
zoomAndPan) r×)Nz color-profile©NÚcursorrÜ©NÚfilter)Nrvrírìrë)NÚmaskrþ))NÚaltGlyph)Nrm)Nrn)Nro)Nrpr)NÚfeImager)Nrtr¬)Nry)NÚtextpath)NZtref)Nrz)Nr).Zazimuthzbackground-colorzborder-bottom-colorzborder-collapsez border-colorzborder-left-colorzborder-right-colorzborder-top-colorrŒrrÚ    directionrËZ    elevationÚfloatr1ràrárârãrär›zletter-spacingz line-heightZoverflowZpausez pause-afterz pause-beforeZpitchz pitch-rangeZrichnessZspeakz speak-headerz speak-numeralzspeak-punctuationz speech-rateZstressz
text-alignztext-decorationz text-indentz unicode-bidizvertical-alignz voice-familyrÆz white-spacerÇ)'ÚautoZaquaZblackÚblockÚblueZboldZbothÚbottomZbrownrZcollapseZdashedZdottedZfuchsiaZgrayÚgreenz
!importantZitalicÚleftZlimeZmaroonZmediumrkZnavyÚnormalrªZoliveÚpointerZpurpleÚredÚrightZsolidZsilverZtealÚtopZ transparentZ    underlineZwhiteZyellow)rÝrÞrßrÿrrrr)Zed2kÚftpÚhttpÚhttpsZircÚmailtoÚnewsÚgopherÚnntpÚtelnetZwebcalZxmppZcalltoÚfeedrÃZaimÚrsyncÚtagÚsshÚsftpÚrtspZafsr‘)z    image/pngz
image/jpegz    image/gifz
image/webpz    image/bmpz
text/plainaL
                                ^
                                # Match a content type <application>/<type>
                                (?P<content_type>[-a-zA-Z0-9.]+/[-a-zA-Z0-9.]+)
                                # Match any character set and encoding
                                (?:(?:;charset=(?:[-a-zA-Z0-9]+)(?:;(?:base64))?)
                                  |(?:;(?:base64))?(?:;charset=(?:[-a-zA-Z0-9]+))?)
                                # Assume the rest is data
                                ,.*
                                $
                                c
s^eZdZdZeeeeee    e
e e e f
‡fdd„    Zdd„Zdd„Zdd    „Zd
d „Zd d „Z‡ZS)r zISanitizes token stream of XHTML+MathML+SVG and of inline style attributesc s\tt|ƒ |¡t tt¡||_||_||_    ||_
||_ ||_ ||_ |    |_|
|_| |_dS)aSCreates a Filter
 
        :arg allowed_elements: set of elements to allow--everything else will
            be escaped
 
        :arg allowed_attributes: set of attributes to allow in
            elements--everything else will be stripped
 
        :arg allowed_css_properties: set of CSS properties to allow--everything
            else will be stripped
 
        :arg allowed_css_keywords: set of CSS keywords to allow--everything
            else will be stripped
 
        :arg allowed_svg_properties: set of SVG properties to allow--everything
            else will be removed
 
        :arg allowed_protocols: set of allowed protocols for URIs
 
        :arg allowed_content_types: set of allowed content types for ``data`` URIs.
 
        :arg attr_val_is_uri: set of attributes that have URI values--values
            that have a scheme not listed in ``allowed_protocols`` are removed
 
        :arg svg_attr_val_allows_ref: set of SVG attributes that can have
            references
 
        :arg svg_allow_local_href: set of SVG elements that can have local
            hrefs--these are removed
 
        N)Úsuperr Ú__init__ÚwarningsÚwarnÚ_deprecation_msgÚDeprecationWarningÚallowed_elementsÚallowed_attributesÚallowed_css_propertiesÚallowed_css_keywordsÚallowed_svg_propertiesÚallowed_protocolsÚallowed_content_typesÚattr_val_is_uriÚsvg_attr_val_allows_refÚsvg_allow_local_href) ÚselfrQr?r@rArBrCrDrErFrGrH©Ú    __class__©ú]D:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_vendor/html5lib/filters/sanitizer.pyr:Ös+ zFilter.__init__ccs*tj |¡D]}| |¡}|r |Vq dS)N)r    r Ú__iter__Úsanitize_token)rIÚtokenrLrLrMrNs
zFilter.__iter__cCsp|d}|dkr^|d}|d}||f|jksH|dkrRtd|f|jkrR| |¡S| |¡Sn|dkrhn|SdS)NrÂ)ÚStartTagÚEndTagÚEmptyTagr¨Ú    namespacerÚComment)r?r Ú allowed_tokenÚdisallowed_token)rIrPÚ
token_typer¨rTrLrLrMrO!sÿþ
 zFilter.sanitize_tokenc        Csªd|kr¦|d}t| ¡ƒ}||jD]}|d|=| |¡q(||j@D]¸}||ks\t‚t ddt||ƒ¡     ¡}| 
dd¡}zt   |¡}Wnt k
r®d}||=YnX|rL|j rL|j |jkrÌ||=|j dkrLt |j¡}|sî||=qL| d¡|jkrL||=qL|jD]*}||kr t ddt||ƒ¡||<q |d|jkr‚td    d
f|kr‚t d |td    d
f¡r‚|td    d
f=d |krž| |d ¡|d <||d<|S) Nr‘u [`- - \s]+Úuï¿½Ú content_typezurl\s*\(\s*[^#\s][^)]+?\)ú r¨rÏržz ^\s*[^#\s].*r¼)rzÚkeysr@ÚremoverFÚAssertionErrorÚrerUrÚlowerr±ÚurlparseÚ
ValueErrorÚschemerDÚdata_content_typeÚmatchrxÚgrouprErGrHr ÚsearchÚ sanitize_css)    rIrPÚattrsZ
attr_namesZ    to_removeÚattrZ val_unescapedÚurirArLrLrMrV3sX
 
 
ÿ  
 
 
 
 
þ ÿÿÿ
zFilter.allowed_tokencCsâ|d}|dkr"d|d|d<nŒ|drž|dks6t‚g}|d ¡D]:\\}}}| d|dkrd|ndt||ft|ƒf¡qFd    |dd
 |¡f|d<nd |d|d<| d ¡rÐ|ddd …d|d<d|d<|d=|S)NrÂrRz</%s>r¨r‘)rQrSz %s="%s"z%s:%sz<%s%s>rYz<%s>Ú selfClosingéÿÿÿÿz/>Ú
Characters)r^ÚitemsÚappendr rÚjoinÚget)rIrPrXriÚnsr¨ÚvrLrLrMrWes 0
zFilter.disallowed_tokencCsüt d¡ d|¡}t d|¡s"dSt d|¡s2dSg}t d|¡D]®\}}|sPqB| ¡|jkrv| |d|d¡qB| d    ¡d
 ¡d krÌ| ¡D]}||j    kr”t d |¡s”qðq”| |d|d¡qB| ¡|j
krB| |d|d¡qBd  |¡S) Nzurl\s*\(\s*[^\s)]+?\s*\)\s*r[z@^([:,;#%.\sa-zA-Z0-9!]|\w-\w|'[\s\w]+'|"[\s\w]+"|\([\d,\s]+\))*$rYz ^\s*([-\w]+\s*:[^:;]*(;\s*|$))*$z([-\w]+)\s*:\s*([^:;]*)z: ú;ú-r)r„r…ÚmarginÚpaddingz_^(#[0-9a-fA-F]+|rgb\(\d+%?,\d*%?,?\d*%?\)?|\d{0,2}\.?\d{0,2}(cm|em|ex|in|mm|pc|pt|px|%|,|\))?)$) r_ÚcompilerUreÚfindallr`rArpÚsplitrBrCrq)rIr½ÚcleanÚproprÄÚkeywordrLrLrMrhys*   
 
ÿzFilter.sanitize_css)Ú__name__Ú
__module__Ú __qualname__Ú__doc__r?r@rArBrCrDrErFrGrHr:rNrOrVrWrhÚ __classcell__rLrLrJrMr Ôs"õ:2)%r‚Ú
__future__rrrr_r;Úxml.sax.saxutilsrrÚpip._vendor.six.movesrrarYr    Ú    constantsr r Ú__all__r=r<r>Ú    frozensetr?r@rFrGrHrArBrCrDrEryÚVERBOSErdr rLrLrLrMÚ<module>s&  ÿ 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
€ß% €€ºKó
 
 
1
*
 
 
 
 õ