From 286f65d2e61d1982660376af62c644255527762d Mon Sep 17 00:00:00 2001 From: amanp Date: Mon, 4 Nov 2019 10:29:28 +0000 Subject: [PATCH] Updating latest python vmc-draas doc (4cad160) --- vmc-draas/_sources/com.rst.txt | 9 +- vmc-draas/_sources/com.vmware.rst.txt | 9 +- .../_sources/com.vmware.vmc.draas.rst.txt | 13 +- vmc-draas/_sources/com.vmware.vmc.rst.txt | 15 +- vmc-draas/_sources/enumeration.rst.txt | 82 + vmc-draas/_sources/index.rst.txt | 8 +- vmc-draas/_sources/vmware.rst.txt | 9 +- vmc-draas/_sources/vmware.vapi.rst.txt | 9 +- vmc-draas/_sources/vmware.vapi.vmc.rst.txt | 19 +- vmc-draas/_static/ajax-loader.gif | Bin 673 -> 0 bytes vmc-draas/_static/basic.css | 90 +- vmc-draas/_static/comment-bright.png | Bin 756 -> 0 bytes vmc-draas/_static/comment-close.png | Bin 829 -> 0 bytes vmc-draas/_static/comment.png | Bin 641 -> 0 bytes vmc-draas/_static/doctools.js | 5 +- vmc-draas/_static/documentation_options.js | 6 +- vmc-draas/_static/down-pressed.png | Bin 222 -> 0 bytes vmc-draas/_static/down.png | Bin 202 -> 0 bytes .../{jquery-3.2.1.js => jquery-3.4.1.js} | 1355 +++++++++++------ vmc-draas/_static/jquery.js | 6 +- vmc-draas/_static/pygments.css | 114 +- vmc-draas/_static/searchtools.js | 51 +- vmc-draas/_static/up-pressed.png | Bin 214 -> 0 bytes vmc-draas/_static/up.png | Bin 203 -> 0 bytes vmc-draas/_static/websupport.js | 808 ---------- vmc-draas/com.html | 17 +- vmc-draas/com.vmware.html | 13 +- vmc-draas/com.vmware.vmc.draas.html | 557 +++---- vmc-draas/com.vmware.vmc.html | 656 ++++---- vmc-draas/enumeration.html | 272 ++++ vmc-draas/genindex.html | 29 +- vmc-draas/index.html | 27 +- vmc-draas/objects.inv | Bin 995 -> 1001 bytes vmc-draas/py-modindex.html | 18 +- vmc-draas/search.html | 13 +- vmc-draas/searchindex.js | 2 +- vmc-draas/vmware.html | 15 +- vmc-draas/vmware.vapi.html | 15 +- vmc-draas/vmware.vapi.vmc.html | 168 +- 39 files changed, 2138 insertions(+), 2272 deletions(-) create mode 100644 vmc-draas/_sources/enumeration.rst.txt delete mode 100644 vmc-draas/_static/ajax-loader.gif delete mode 100644 vmc-draas/_static/comment-bright.png delete mode 100644 vmc-draas/_static/comment-close.png delete mode 100644 vmc-draas/_static/comment.png delete mode 100644 vmc-draas/_static/down-pressed.png delete mode 100644 vmc-draas/_static/down.png rename vmc-draas/_static/{jquery-3.2.1.js => jquery-3.4.1.js} (89%) delete mode 100644 vmc-draas/_static/up-pressed.png delete mode 100644 vmc-draas/_static/up.png delete mode 100644 vmc-draas/_static/websupport.js create mode 100644 vmc-draas/enumeration.html diff --git a/vmc-draas/_sources/com.rst.txt b/vmc-draas/_sources/com.rst.txt index 257ee95b..67cd77f5 100644 --- a/vmc-draas/_sources/com.rst.txt +++ b/vmc-draas/_sources/com.rst.txt @@ -2,14 +2,13 @@ com package =========== .. automodule:: com - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: Subpackages ----------- .. toctree:: - com.vmware - + com.vmware diff --git a/vmc-draas/_sources/com.vmware.rst.txt b/vmc-draas/_sources/com.vmware.rst.txt index 2f392e82..662d80a6 100644 --- a/vmc-draas/_sources/com.vmware.rst.txt +++ b/vmc-draas/_sources/com.vmware.rst.txt @@ -2,14 +2,13 @@ com.vmware package ================== .. automodule:: com.vmware - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: Subpackages ----------- .. toctree:: - com.vmware.vmc - + com.vmware.vmc diff --git a/vmc-draas/_sources/com.vmware.vmc.draas.rst.txt b/vmc-draas/_sources/com.vmware.vmc.draas.rst.txt index 8c0fd79a..2665011a 100644 --- a/vmc-draas/_sources/com.vmware.vmc.draas.rst.txt +++ b/vmc-draas/_sources/com.vmware.vmc.draas.rst.txt @@ -2,9 +2,9 @@ com.vmware.vmc.draas package ============================ .. automodule:: com.vmware.vmc.draas - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: Submodules ---------- @@ -13,8 +13,7 @@ com.vmware.vmc.draas.model\_client module ----------------------------------------- .. automodule:: com.vmware.vmc.draas.model_client - :members: - :undoc-members: - :show-inheritance: - + :members: + :undoc-members: + :show-inheritance: diff --git a/vmc-draas/_sources/com.vmware.vmc.rst.txt b/vmc-draas/_sources/com.vmware.vmc.rst.txt index fb0fda59..6684bf1e 100644 --- a/vmc-draas/_sources/com.vmware.vmc.rst.txt +++ b/vmc-draas/_sources/com.vmware.vmc.rst.txt @@ -2,16 +2,16 @@ com.vmware.vmc package ====================== .. automodule:: com.vmware.vmc - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: Subpackages ----------- .. toctree:: - com.vmware.vmc.draas + com.vmware.vmc.draas Submodules ---------- @@ -20,8 +20,7 @@ com.vmware.vmc.draas\_client module ----------------------------------- .. automodule:: com.vmware.vmc.draas_client - :members: - :undoc-members: - :show-inheritance: - + :members: + :undoc-members: + :show-inheritance: diff --git a/vmc-draas/_sources/enumeration.rst.txt b/vmc-draas/_sources/enumeration.rst.txt new file mode 100644 index 00000000..afe09e47 --- /dev/null +++ b/vmc-draas/_sources/enumeration.rst.txt @@ -0,0 +1,82 @@ +.. _enumeration_description: + +Interface definition language to python mapping for enumerated types +-------------------------------------------------------------------- + +The interface language definition type system includes enumerated types. Python +SDK supports both 2.x and 3.x versions of Python. Since Python 2.x does +not have first class support for enumerations, special classes are +generated to represent enumerated types from the interface definition +language. The special class contains class attributes which represent +the values of the enumerated type. + +This documentation explains the following: + +* How the class variables are defined in the module. This specifies the names that you can use in your program. +* How you instantiate a class to use it for communication with future versions of the service. + +Example of an enumerated type documentation +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +*class* com.vmware.vapi.metadata_client. **SourceType** (string) + Bases: vmware.vapi.bindings.enum.Enum + + Metadata source type + + .. note:: + This class represents an enumerated type in the interface language definition type system. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports a newer version of the API, you instantiate this class. See :ref:`enumerated type description page `. + + **Parameters** : **string** (``str``) – String value for the SourceType instance. + + **FILE** = *SourceType(string='FILE')* + If the source is backed by a file. + + **REMOTE** = *SourceType(string='REMOTE')* + If the source is backed by a remote service. + +Code Examples +^^^^^^^^^^^^^ + +The enumerated type classes are defined in python modules that your code +imports. You can use these in your code. + +1. If you want to pass an enumerated type value in a method to a server, specify the class variable of the enumerated type class. + +.. code-block:: python + + # SourceType is an enumerated type + from com.vmware.vapi.metadata_client import SourceType + + # SourceType has two class attrites, SourceType.FILE and SourceType.REMOTE + spec = Source.CreateSpec(type=SourceType.FILE, filepath='entity_metadata.json', description='Entity service') + source_svc.create(id='entity', spec=spec) + +2. When you receive an enumerated type value in the response from a server, allow for unknown enumerated type values. + +.. code-block:: python + + # SourceType is an enumerated type + from com.vmware.vapi.metadata_client import SourceType + + source_info = source_svc.get(id='entity') + if (source_info.type == SourceType.FILE) { + print 'Source is a file' + } else if (source_info.type == SourceType.REMOTE) { + print 'Source is a remote provider' + } else { + print 'Unknown source type: %s' % str(source_info.type) + } + +3. Sending a new enumerated type value to a server that has a newer version of the enumerated type. + +To use new values of the enumerated type in communication with a server that supports a newer version of the API, you instantiate the +enumerated type class. + +.. code-block:: python + + # If a newer version of SourceType has a new value FOLDER, FOLDER would be one + # of the class attributes for SourceType. In the older version, SourceType has + # only two class attributes, FILE and REMOTE + from com.vmware.vapi.metadata_client import SourceType + spec = Source.CreateSpec(type=SourceType('FOLDER'), filepath='entity_metadata', description='Entity service') + source_svc.create(id='entity', spec=spec) diff --git a/vmc-draas/_sources/index.rst.txt b/vmc-draas/_sources/index.rst.txt index 5d846af9..6228cea8 100644 --- a/vmc-draas/_sources/index.rst.txt +++ b/vmc-draas/_sources/index.rst.txt @@ -1,10 +1,10 @@ -.. vAPI documentation master file, created by - sphinx-quickstart on Fri Sep 6 13:52:42 2019. +.. draas documentation master file, created by + sphinx-quickstart on Mon Nov 4 10:29:19 2019. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to vAPI's documentation! -================================ +Welcome to draas's documentation! +================================= .. toctree:: :maxdepth: 10 diff --git a/vmc-draas/_sources/vmware.rst.txt b/vmc-draas/_sources/vmware.rst.txt index e2ea3a3f..4c078217 100644 --- a/vmc-draas/_sources/vmware.rst.txt +++ b/vmc-draas/_sources/vmware.rst.txt @@ -2,14 +2,13 @@ vmware package ============== .. automodule:: vmware - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: Subpackages ----------- .. toctree:: - vmware.vapi - + vmware.vapi diff --git a/vmc-draas/_sources/vmware.vapi.rst.txt b/vmc-draas/_sources/vmware.vapi.rst.txt index e2283c1f..b8e65b25 100644 --- a/vmc-draas/_sources/vmware.vapi.rst.txt +++ b/vmc-draas/_sources/vmware.vapi.rst.txt @@ -2,14 +2,13 @@ vmware.vapi package =================== .. automodule:: vmware.vapi - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: Subpackages ----------- .. toctree:: - vmware.vapi.vmc - + vmware.vapi.vmc diff --git a/vmc-draas/_sources/vmware.vapi.vmc.rst.txt b/vmc-draas/_sources/vmware.vapi.vmc.rst.txt index c5e81604..94fcab4b 100644 --- a/vmc-draas/_sources/vmware.vapi.vmc.rst.txt +++ b/vmc-draas/_sources/vmware.vapi.vmc.rst.txt @@ -2,9 +2,9 @@ vmware.vapi.vmc package ======================= .. automodule:: vmware.vapi.vmc - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: Submodules ---------- @@ -13,16 +13,15 @@ vmware.vapi.vmc.client module ----------------------------- .. automodule:: vmware.vapi.vmc.client - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: vmware.vapi.vmc.csp\_filter module ---------------------------------- .. automodule:: vmware.vapi.vmc.csp_filter - :members: - :undoc-members: - :show-inheritance: - + :members: + :undoc-members: + :show-inheritance: diff --git a/vmc-draas/_static/ajax-loader.gif b/vmc-draas/_static/ajax-loader.gif deleted file mode 100644 index 61faf8cab23993bd3e1560bff0668bd628642330..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmZ?wbhEHb6krfw_{6~Q|Nno%(3)e{?)x>&1u}A`t?OF7Z|1gRivOgXi&7IyQd1Pl zGfOfQ60;I3a`F>X^fL3(@);C=vM_KlFfb_o=k{|A33hf2a5d61U}gjg=>Rd%XaNQW zW@Cw{|b%Y*pl8F?4B9 zlo4Fz*0kZGJabY|>}Okf0}CCg{u4`zEPY^pV?j2@h+|igy0+Kz6p;@SpM4s6)XEMg z#3Y4GX>Hjlml5ftdH$4x0JGdn8~MX(U~_^d!Hi)=HU{V%g+mi8#UGbE-*ao8f#h+S z2a0-5+vc7MU$e-NhmBjLIC1v|)9+Im8x1yacJ7{^tLX(ZhYi^rpmXm0`@ku9b53aN zEXH@Y3JaztblgpxbJt{AtE1ad1Ca>{v$rwwvK(>{m~Gf_=-Ro7Fk{#;i~+{{>QtvI yb2P8Zac~?~=sRA>$6{!(^3;ZP0TPFR(G_-UDU(8Jl0?(IXu$~#4A!880|o%~Al1tN diff --git a/vmc-draas/_static/basic.css b/vmc-draas/_static/basic.css index 0807176e..ea6972d5 100644 --- a/vmc-draas/_static/basic.css +++ b/vmc-draas/_static/basic.css @@ -231,6 +231,16 @@ a.headerlink { visibility: hidden; } +a.brackets:before, +span.brackets > a:before{ + content: "["; +} + +a.brackets:after, +span.brackets > a:after { + content: "]"; +} + h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -279,6 +289,12 @@ img.align-center, .figure.align-center, object.align-center { margin-right: auto; } +img.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + .align-left { text-align: left; } @@ -287,6 +303,10 @@ img.align-center, .figure.align-center, object.align-center { text-align: center; } +.align-default { + text-align: center; +} + .align-right { text-align: right; } @@ -358,6 +378,11 @@ table.align-center { margin-right: auto; } +table.align-default { + margin-left: auto; + margin-right: auto; +} + table caption span.caption-number { font-style: italic; } @@ -391,6 +416,16 @@ table.citation td { border-bottom: none; } +th > p:first-child, +td > p:first-child { + margin-top: 0px; +} + +th > p:last-child, +td > p:last-child { + margin-bottom: 0px; +} + /* -- figures --------------------------------------------------------------- */ div.figure { @@ -460,11 +495,58 @@ ol.upperroman { list-style: upper-roman; } +li > p:first-child { + margin-top: 0px; +} + +li > p:last-child { + margin-bottom: 0px; +} + +dl.footnote > dt, +dl.citation > dt { + float: left; +} + +dl.footnote > dd, +dl.citation > dd { + margin-bottom: 0em; +} + +dl.footnote > dd:after, +dl.citation > dd:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dt:after { + content: ":"; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + dl { margin-bottom: 15px; } -dd p { +dd > p:first-child { margin-top: 0px; } @@ -537,6 +619,12 @@ dl.glossary dt { font-style: oblique; } +.classifier:before { + font-style: normal; + margin: 0.5em; + content: ":"; +} + abbr, acronym { border-bottom: dotted 1px; cursor: help; diff --git a/vmc-draas/_static/comment-bright.png b/vmc-draas/_static/comment-bright.png deleted file mode 100644 index 15e27edb12ac25701ac0ac21b97b52bb4e45415e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 756 zcmVgfIX78 z$8Pzv({A~p%??+>KickCb#0FM1rYN=mBmQ&Nwp<#JXUhU;{|)}%&s>suq6lXw*~s{ zvHx}3C%<;wE5CH!BR{p5@ml9ws}y)=QN-kL2?#`S5d*6j zk`h<}j1>tD$b?4D^N9w}-k)bxXxFg>+#kme^xx#qg6FI-%iv2U{0h(Y)cs%5a|m%Pn_K3X_bDJ>EH#(Fb73Z zfUt2Q3B>N+ot3qb*DqbTZpFIn4a!#_R-}{?-~Hs=xSS6p&$sZ-k1zDdtqU`Y@`#qL z&zv-~)Q#JCU(dI)Hf;$CEnK=6CK50}q7~wdbI->?E07bJ0R;!GSQTs5Am`#;*WHjvHRvY?&$Lm-vq1a_BzocI^ULXV!lbMd%|^B#fY;XX)n<&R^L z=84u1e_3ziq;Hz-*k5~zwY3*oDKt0;bM@M@@89;@m*4RFgvvM_4;5LB!@OB@^WbVT zjl{t;a8_>od-~P4 m{5|DvB&z#xT;*OnJqG}gk~_7HcNkCr0000W zanA~u9RIXo;n7c96&U)YLgs-FGlx~*_c{Jgvesu1E5(8YEf&5wF=YFPcRe@1=MJmi zag(L*xc2r0(slpcN!vC5CUju;vHJkHc*&70_n2OZsK%O~A=!+YIw z7zLLl7~Z+~RgWOQ=MI6$#0pvpu$Q43 zP@36QAmu6!_9NPM?o<1_!+stoVRRZbW9#SPe!n;#A_6m8f}|xN1;H{`0RoXQ2LM47 zt(g;iZ6|pCb@h2xk&(}S3=EVBUO0e90m2Lp5CB<(SPIaB;n4))3JB87Or#XPOPcum z?<^(g+m9}VNn4Y&B`g8h{t_$+RB1%HKRY6fjtd-<7&EsU;vs0GM(Lmbhi%Gwcfs0FTF}T zL{_M6Go&E0Eg8FuB*(Yn+Z*RVTBE@10eIOb3El^MhO`GabDll(V0&FlJi2k^;q8af zkENdk2}x2)_KVp`5OAwXZM;dG0?M-S)xE1IKDi6BY@5%Or?#aZ9$gcX)dPZ&wA1a< z$rFXHPn|TBf`e?>Are8sKtKrKcjF$i^lp!zkL?C|y^vlHr1HXeVJd;1I~g&Ob-q)& z(fn7s-KI}G{wnKzg_U5G(V%bX6uk zIa+<@>rdmZYd!9Y=C0cuchrbIjuRB_Wq{-RXlic?flu1*_ux}x%(HDH&nT`k^xCeC ziHi1!ChH*sQ6|UqJpTTzX$aw8e(UfcS^f;6yBWd+(1-70zU(rtxtqR%j z-lsH|CKQJXqD{+F7V0OTv8@{~(wp(`oIP^ZykMWgR>&|RsklFMCnOo&Bd{le} zV5F6424Qzl;o2G%oVvmHgRDP9!=rK8fy^!yV8y*4p=??uIRrrr0?>O!(z*g5AvL2!4z0{sq%vhG*Po}`a<6%kTK5TNhtC8}rXNu&h^QH4A&Sk~Autm*s~45(H7+0bi^MraaRVzr05hQ3iK?j` zR#U@^i0WhkIHTg29u~|ypU?sXCQEQgXfObPW;+0YAF;|5XyaMAEM0sQ@4-xCZe=0e z7r$ofiAxn@O5#RodD8rh5D@nKQ;?lcf@tg4o+Wp44aMl~c47azN_(im0N)7OqdPBC zGw;353_o$DqGRDhuhU$Eaj!@m000000NkvXXu0mjfjZ7Z_ diff --git a/vmc-draas/_static/doctools.js b/vmc-draas/_static/doctools.js index 344db17d..b33f87fc 100644 --- a/vmc-draas/_static/doctools.js +++ b/vmc-draas/_static/doctools.js @@ -87,14 +87,13 @@ jQuery.fn.highlightText = function(text, className) { node.nextSibling)); node.nodeValue = val.substr(0, pos); if (isInSVG) { - var bbox = span.getBBox(); var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); - rect.x.baseVal.value = bbox.x; + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; rect.y.baseVal.value = bbox.y; rect.width.baseVal.value = bbox.width; rect.height.baseVal.value = bbox.height; rect.setAttribute('class', className); - var parentOfText = node.parentNode.parentNode; addItems.push({ "parent": node.parentNode, "target": rect}); diff --git a/vmc-draas/_static/documentation_options.js b/vmc-draas/_static/documentation_options.js index b46e9dd4..361dd78d 100644 --- a/vmc-draas/_static/documentation_options.js +++ b/vmc-draas/_static/documentation_options.js @@ -1,10 +1,10 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '1.9.0', - LANGUAGE: 'None', + VERSION: '1.1.0', + LANGUAGE: 'en', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt', - NAVIGATION_WITH_KEYS: false, + NAVIGATION_WITH_KEYS: false }; \ No newline at end of file diff --git a/vmc-draas/_static/down-pressed.png b/vmc-draas/_static/down-pressed.png deleted file mode 100644 index 5756c8cad8854722893dc70b9eb4bb0400343a39..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 222 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`OFdm2Ln;`PZ^+1>KjR?B@S0W7 z%OS_REiHONoJ6{+Ks@6k3590|7k9F+ddB6!zw3#&!aw#S`x}3V3&=A(a#84O-&F7T z^k3tZB;&iR9siw0|F|E|DAL<8r-F4!1H-;1{e*~yAKZN5f0|Ei6yUmR#Is)EM(Po_ zi`qJR6|P<~+)N+kSDgL7AjdIC_!O7Q?eGb+L+qOjm{~LLinM4NHn7U%HcK%uoMYO5 VJ~8zD2B3o(JYD@<);T3K0RV0%P>BEl diff --git a/vmc-draas/_static/down.png b/vmc-draas/_static/down.png deleted file mode 100644 index 1b3bdad2ceffae91cee61b32f3295f9bbe646e48..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6CVIL!hEy=F?b*7pIY7kW{q%Rg zx!yQ<9v8bmJwa`TQk7YSw}WVQ()mRdQ;TC;* diff --git a/vmc-draas/_static/jquery-3.2.1.js b/vmc-draas/_static/jquery-3.4.1.js similarity index 89% rename from vmc-draas/_static/jquery-3.2.1.js rename to vmc-draas/_static/jquery-3.4.1.js index d2d8ca47..773ad95c 100644 --- a/vmc-draas/_static/jquery-3.2.1.js +++ b/vmc-draas/_static/jquery-3.4.1.js @@ -1,5 +1,5 @@ /*! - * jQuery JavaScript Library v3.2.1 + * jQuery JavaScript Library v3.4.1 * https://jquery.com/ * * Includes Sizzle.js @@ -9,7 +9,7 @@ * Released under the MIT license * https://jquery.org/license * - * Date: 2017-03-20T18:59Z + * Date: 2019-05-01T21:04Z */ ( function( global, factory ) { @@ -71,16 +71,70 @@ var ObjectFunctionString = fnToString.call( Object ); var support = {}; +var isFunction = function isFunction( obj ) { + + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + return typeof obj === "function" && typeof obj.nodeType !== "number"; + }; - function DOMEval( code, doc ) { +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; + }; + + + + + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + }; + + function DOMEval( code, node, doc ) { doc = doc || document; - var script = doc.createElement( "script" ); + var i, val, + script = doc.createElement( "script" ); script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { + + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[ i ] || node.getAttribute && node.getAttribute( i ); + if ( val ) { + script.setAttribute( i, val ); + } + } + } doc.head.appendChild( script ).parentNode.removeChild( script ); } + + +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} /* global Symbol */ // Defining this global in .eslintrc.json would create a danger of using the global // unguarded in another place, it seems safer to define global only for this module @@ -88,7 +142,7 @@ var support = {}; var - version = "3.2.1", + version = "3.4.1", // Define a local copy of jQuery jQuery = function( selector, context ) { @@ -100,16 +154,7 @@ var // Support: Android <=4.0 only // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; jQuery.fn = jQuery.prototype = { @@ -209,7 +254,7 @@ jQuery.extend = jQuery.fn.extend = function() { } // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction( target ) ) { + if ( typeof target !== "object" && !isFunction( target ) ) { target = {}; } @@ -226,25 +271,28 @@ jQuery.extend = jQuery.fn.extend = function() { // Extend the base object for ( name in options ) { - src = target[ name ]; copy = options[ name ]; + // Prevent Object.prototype pollution // Prevent never-ending loop - if ( target === copy ) { + if ( name === "__proto__" || target === copy ) { continue; } // Recurse if we're merging plain objects or arrays if ( deep && copy && ( jQuery.isPlainObject( copy ) || ( copyIsArray = Array.isArray( copy ) ) ) ) { + src = target[ name ]; - if ( copyIsArray ) { - copyIsArray = false; - clone = src && Array.isArray( src ) ? src : []; - + // Ensure proper type for the source value + if ( copyIsArray && !Array.isArray( src ) ) { + clone = []; + } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { + clone = {}; } else { - clone = src && jQuery.isPlainObject( src ) ? src : {}; + clone = src; } + copyIsArray = false; // Never move original objects, clone them target[ name ] = jQuery.extend( deep, clone, copy ); @@ -275,28 +323,6 @@ jQuery.extend( { noop: function() {}, - isFunction: function( obj ) { - return jQuery.type( obj ) === "function"; - }, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - - // As of jQuery 3.0, isNumeric is limited to - // strings and numbers (primitives or objects) - // that can be coerced to finite numbers (gh-2662) - var type = jQuery.type( obj ); - return ( type === "number" || type === "string" ) && - - // parseFloat NaNs numeric-cast false positives ("") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - !isNaN( obj - parseFloat( obj ) ); - }, - isPlainObject: function( obj ) { var proto, Ctor; @@ -319,9 +345,6 @@ jQuery.extend( { }, isEmptyObject: function( obj ) { - - /* eslint-disable no-unused-vars */ - // See https://github.com/eslint/eslint/issues/6125 var name; for ( name in obj ) { @@ -330,27 +353,9 @@ jQuery.extend( { return true; }, - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; - }, - // Evaluates a script in a global context - globalEval: function( code ) { - DOMEval( code ); - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE <=9 - 11, Edge 12 - 13 - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + globalEval: function( code, options ) { + DOMEval( code, { nonce: options && options.nonce } ); }, each: function( obj, callback ) { @@ -473,37 +478,6 @@ jQuery.extend( { // A global GUID counter for objects guid: 1, - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - // jQuery.support is not used in Core but other projects attach their // properties to it so it needs to exist. support: support @@ -526,9 +500,9 @@ function isArrayLike( obj ) { // hasOwn isn't used here due to false negatives // regarding Nodelist length in IE var length = !!obj && "length" in obj && obj.length, - type = jQuery.type( obj ); + type = toType( obj ); - if ( type === "function" || jQuery.isWindow( obj ) ) { + if ( isFunction( obj ) || isWindow( obj ) ) { return false; } @@ -537,14 +511,14 @@ function isArrayLike( obj ) { } var Sizzle = /*! - * Sizzle CSS Selector Engine v2.3.3 + * Sizzle CSS Selector Engine v2.3.4 * https://sizzlejs.com/ * - * Copyright jQuery Foundation and other contributors + * Copyright JS Foundation and other contributors * Released under the MIT license - * http://jquery.org/license + * https://js.foundation/ * - * Date: 2016-08-08 + * Date: 2019-04-08 */ (function( window ) { @@ -578,6 +552,7 @@ var i, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), + nonnativeSelectorCache = createCache(), sortOrder = function( a, b ) { if ( a === b ) { hasDuplicate = true; @@ -639,8 +614,7 @@ var i, rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), + rdescend = new RegExp( whitespace + "|>" ), rpseudo = new RegExp( pseudos ), ridentifier = new RegExp( "^" + identifier + "$" ), @@ -661,6 +635,7 @@ var i, whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, + rhtml = /HTML$/i, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, @@ -715,9 +690,9 @@ var i, setDocument(); }, - disabledAncestor = addCombinator( + inDisabledFieldset = addCombinator( function( elem ) { - return elem.disabled === true && ("form" in elem || "label" in elem); + return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; }, { dir: "parentNode", next: "legend" } ); @@ -830,18 +805,22 @@ function Sizzle( selector, context, results, seed ) { // Take advantage of querySelectorAll if ( support.qsa && - !compilerCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + !nonnativeSelectorCache[ selector + " " ] && + (!rbuggyQSA || !rbuggyQSA.test( selector )) && - if ( nodeType !== 1 ) { - newContext = context; - newSelector = selector; - - // qSA looks outside Element context, which is not what we want - // Thanks to Andrew Dupont for this workaround technique - // Support: IE <=8 + // Support: IE 8 only // Exclude object elements - } else if ( context.nodeName.toLowerCase() !== "object" ) { + (nodeType !== 1 || context.nodeName.toLowerCase() !== "object") ) { + + newSelector = selector; + newContext = context; + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // Thanks to Andrew Dupont for this technique. + if ( nodeType === 1 && rdescend.test( selector ) ) { // Capture the context ID, setting it first if necessary if ( (nid = context.getAttribute( "id" )) ) { @@ -863,17 +842,16 @@ function Sizzle( selector, context, results, seed ) { context; } - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + nonnativeSelectorCache( selector, true ); + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); } } } @@ -1037,7 +1015,7 @@ function createDisabledPseudo( disabled ) { // Where there is no isDisabled, check manually /* jshint -W018 */ elem.isDisabled !== !disabled && - disabledAncestor( elem ) === disabled; + inDisabledFieldset( elem ) === disabled; } return elem.disabled === disabled; @@ -1094,10 +1072,13 @@ support = Sizzle.support = {}; * @returns {Boolean} True iff elem is a non-HTML XML node */ isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; + var namespace = elem.namespaceURI, + docElem = (elem.ownerDocument || elem).documentElement; + + // Support: IE <=8 + // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes + // https://bugs.jquery.com/ticket/4833 + return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); }; /** @@ -1519,11 +1500,8 @@ Sizzle.matchesSelector = function( elem, expr ) { setDocument( elem ); } - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - if ( support.matchesSelector && documentIsHTML && - !compilerCache[ expr + " " ] && + !nonnativeSelectorCache[ expr + " " ] && ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { @@ -1537,7 +1515,9 @@ Sizzle.matchesSelector = function( elem, expr ) { elem.document && elem.document.nodeType !== 11 ) { return ret; } - } catch (e) {} + } catch (e) { + nonnativeSelectorCache( expr, true ); + } } return Sizzle( expr, document, null, [ elem ] ).length > 0; @@ -1996,7 +1976,7 @@ Expr = Sizzle.selectors = { "contains": markFunction(function( text ) { text = text.replace( runescape, funescape ); return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; }; }), @@ -2135,7 +2115,11 @@ Expr = Sizzle.selectors = { }), "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; + var i = argument < 0 ? + argument + length : + argument > length ? + length : + argument; for ( ; --i >= 0; ) { matchIndexes.push( i ); } @@ -2848,11 +2832,9 @@ var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>| -var risSimple = /^.[^:#\[\.,]*$/; - // Implement the identical functionality for filter and not function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { + if ( isFunction( qualifier ) ) { return jQuery.grep( elements, function( elem, i ) { return !!qualifier.call( elem, i, elem ) !== not; } ); @@ -2872,16 +2854,8 @@ function winnow( elements, qualifier, not ) { } ); } - // Simple selector that can be filtered directly, removing non-Elements - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - // Complex selector, compare the two sets, removing non-Elements - qualifier = jQuery.filter( qualifier, elements ); - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1; - } ); + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); } jQuery.filter = function( expr, elems, not ) { @@ -3002,7 +2976,7 @@ var rootjQuery, for ( match in context ) { // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { + if ( isFunction( this[ match ] ) ) { this[ match ]( context[ match ] ); // ...and otherwise set as attributes @@ -3045,7 +3019,7 @@ var rootjQuery, // HANDLE: $(function) // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { + } else if ( isFunction( selector ) ) { return root.ready !== undefined ? root.ready( selector ) : @@ -3195,18 +3169,18 @@ jQuery.each( { return siblings( elem.firstChild ); }, contents: function( elem ) { - if ( nodeName( elem, "iframe" ) ) { - return elem.contentDocument; - } + if ( typeof elem.contentDocument !== "undefined" ) { + return elem.contentDocument; + } - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } - return jQuery.merge( [], elem.childNodes ); + return jQuery.merge( [], elem.childNodes ); } }, function( name, fn ) { jQuery.fn[ name ] = function( until, selector ) { @@ -3360,11 +3334,11 @@ jQuery.Callbacks = function( options ) { ( function add( args ) { jQuery.each( args, function( _, arg ) { - if ( jQuery.isFunction( arg ) ) { + if ( isFunction( arg ) ) { if ( !options.unique || !self.has( arg ) ) { list.push( arg ); } - } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { + } else if ( arg && arg.length && toType( arg ) !== "string" ) { // Inspect recursively add( arg ); @@ -3479,11 +3453,11 @@ function adoptValue( value, resolve, reject, noValue ) { try { // Check for promise aspect first to privilege synchronous behavior - if ( value && jQuery.isFunction( ( method = value.promise ) ) ) { + if ( value && isFunction( ( method = value.promise ) ) ) { method.call( value ).done( resolve ).fail( reject ); // Other thenables - } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) { + } else if ( value && isFunction( ( method = value.then ) ) ) { method.call( value, resolve, reject ); // Other non-thenables @@ -3541,14 +3515,14 @@ jQuery.extend( { jQuery.each( tuples, function( i, tuple ) { // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; // deferred.progress(function() { bind to newDefer or newDefer.notify }) // deferred.done(function() { bind to newDefer or newDefer.resolve }) // deferred.fail(function() { bind to newDefer or newDefer.reject }) deferred[ tuple[ 1 ] ]( function() { var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { + if ( returned && isFunction( returned.promise ) ) { returned.promise() .progress( newDefer.notify ) .done( newDefer.resolve ) @@ -3602,7 +3576,7 @@ jQuery.extend( { returned.then; // Handle a returned thenable - if ( jQuery.isFunction( then ) ) { + if ( isFunction( then ) ) { // Special processors (notify) just wait for resolution if ( special ) { @@ -3698,7 +3672,7 @@ jQuery.extend( { resolve( 0, newDefer, - jQuery.isFunction( onProgress ) ? + isFunction( onProgress ) ? onProgress : Identity, newDefer.notifyWith @@ -3710,7 +3684,7 @@ jQuery.extend( { resolve( 0, newDefer, - jQuery.isFunction( onFulfilled ) ? + isFunction( onFulfilled ) ? onFulfilled : Identity ) @@ -3721,7 +3695,7 @@ jQuery.extend( { resolve( 0, newDefer, - jQuery.isFunction( onRejected ) ? + isFunction( onRejected ) ? onRejected : Thrower ) @@ -3761,8 +3735,15 @@ jQuery.extend( { // fulfilled_callbacks.disable tuples[ 3 - i ][ 2 ].disable, + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock ); } @@ -3832,7 +3813,7 @@ jQuery.extend( { // Use .then() to unwrap secondary thenables (cf. gh-3000) if ( master.state() === "pending" || - jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { return master.then(); } @@ -3960,7 +3941,7 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { bulk = key == null; // Sets many values - if ( jQuery.type( key ) === "object" ) { + if ( toType( key ) === "object" ) { chainable = true; for ( i in key ) { access( elems, fn, i, key[ i ], true, emptyGet, raw ); @@ -3970,7 +3951,7 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { } else if ( value !== undefined ) { chainable = true; - if ( !jQuery.isFunction( value ) ) { + if ( !isFunction( value ) ) { raw = true; } @@ -4012,6 +3993,23 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { return len ? fn( elems[ 0 ], key ) : emptyGet; }; + + +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; + +// Used by camelCase as callback to replace() +function fcamelCase( all, letter ) { + return letter.toUpperCase(); +} + +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (#9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} var acceptData = function( owner ) { // Accepts only: @@ -4074,14 +4072,14 @@ Data.prototype = { // Handle: [ owner, key, value ] args // Always use camelCase key (gh-2257) if ( typeof data === "string" ) { - cache[ jQuery.camelCase( data ) ] = value; + cache[ camelCase( data ) ] = value; // Handle: [ owner, { properties } ] args } else { // Copy the properties one-by-one to the cache object for ( prop in data ) { - cache[ jQuery.camelCase( prop ) ] = data[ prop ]; + cache[ camelCase( prop ) ] = data[ prop ]; } } return cache; @@ -4091,7 +4089,7 @@ Data.prototype = { this.cache( owner ) : // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ]; + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; }, access: function( owner, key, value ) { @@ -4139,9 +4137,9 @@ Data.prototype = { // If key is an array of keys... // We always set camelCase keys, so remove that. - key = key.map( jQuery.camelCase ); + key = key.map( camelCase ); } else { - key = jQuery.camelCase( key ); + key = camelCase( key ); // If a key with the spaces exists, use it. // Otherwise, create an array by matching non-whitespace @@ -4287,7 +4285,7 @@ jQuery.fn.extend( { if ( attrs[ i ] ) { name = attrs[ i ].name; if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice( 5 ) ); + name = camelCase( name.slice( 5 ) ); dataAttr( elem, name, data[ name ] ); } } @@ -4491,6 +4489,26 @@ var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; +var documentElement = document.documentElement; + + + + var isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ); + }, + composed = { composed: true }; + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if ( documentElement.getRootNode ) { + isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ) || + elem.getRootNode( composed ) === elem.ownerDocument; + }; + } var isHiddenWithinTree = function( elem, el ) { // isHiddenWithinTree might be called from jQuery#filter function; @@ -4505,7 +4523,7 @@ var isHiddenWithinTree = function( elem, el ) { // Support: Firefox <=43 - 45 // Disconnected elements can have computed display: none, so first confirm that elem is // in the document. - jQuery.contains( elem.ownerDocument, elem ) && + isAttached( elem ) && jQuery.css( elem, "display" ) === "none"; }; @@ -4534,8 +4552,7 @@ var swap = function( elem, options, callback, args ) { function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, - scale = 1, + var adjusted, scale, maxIterations = 20, currentValue = tween ? function() { @@ -4548,35 +4565,39 @@ function adjustCSS( elem, prop, valueParts, tween ) { unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), // Starting value computation is required for potential unit mismatches - initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + initialInUnit = elem.nodeType && + ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && rcssNum.exec( jQuery.css( elem, prop ) ); if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; + // Trust units reported by jQuery.css unit = unit || initialInUnit[ 3 ]; - // Make sure we update the tween properties later on - valueParts = valueParts || []; - // Iteratively approximate from a nonzero starting point initialInUnit = +initial || 1; - do { + while ( maxIterations-- ) { - // If previous iteration zeroed out, double until we get *something*. - // Use string for doubling so we don't accidentally see scale as unchanged below - scale = scale || ".5"; - - // Adjust and apply - initialInUnit = initialInUnit / scale; + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; + } + initialInUnit = initialInUnit / scale; - // Update scale, tolerating zero or NaN from tween.cur() - // Break the loop if scale is unchanged or perfect, or if we've just had enough. - } while ( - scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations - ); + } + + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Make sure we update the tween properties later on + valueParts = valueParts || []; } if ( valueParts ) { @@ -4692,9 +4713,9 @@ jQuery.fn.extend( { } ); var rcheckableType = ( /^(?:checkbox|radio)$/i ); -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); -var rscriptType = ( /^$|\/(?:java|ecma)script/i ); +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); @@ -4764,7 +4785,7 @@ function setGlobalEval( elems, refElements ) { var rhtml = /<|&#?\w+;/; function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, contains, j, + var elem, tmp, tag, wrap, attached, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, @@ -4776,7 +4797,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) { if ( elem || elem === 0 ) { // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { + if ( toType( elem ) === "object" ) { // Support: Android <=4.0 only, PhantomJS 1 only // push.apply(_, arraylike) throws on ancient WebKit @@ -4828,13 +4849,13 @@ function buildFragment( elems, context, scripts, selection, ignored ) { continue; } - contains = jQuery.contains( elem.ownerDocument, elem ); + attached = isAttached( elem ); // Append to fragment tmp = getAll( fragment.appendChild( elem ), "script" ); // Preserve script evaluation history - if ( contains ) { + if ( attached ) { setGlobalEval( tmp ); } @@ -4877,8 +4898,6 @@ function buildFragment( elems, context, scripts, selection, ignored ) { div.innerHTML = ""; support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; } )(); -var documentElement = document.documentElement; - var @@ -4894,8 +4913,19 @@ function returnFalse() { return false; } +// Support: IE <=9 - 11+ +// focus() and blur() are asynchronous, except when they are no-op. +// So expect focus to be synchronous when the element is already active, +// and blur to be synchronous when the element is not already active. +// (focus and blur are always synchronous in other supported browsers, +// this just defines when we can count on it). +function expectSync( elem, type ) { + return ( elem === safeActiveElement() ) === ( type === "focus" ); +} + // Support: IE <=9 only -// See #13393 for more info +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 function safeActiveElement() { try { return document.activeElement; @@ -5195,9 +5225,10 @@ jQuery.event = { while ( ( handleObj = matched.handlers[ j++ ] ) && !event.isImmediatePropagationStopped() ) { - // Triggered event must either 1) have no namespace, or 2) have namespace(s) - // a subset or equal to those in the bound event (both can have no namespace). - if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) { + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if ( !event.rnamespace || handleObj.namespace === false || + event.rnamespace.test( handleObj.namespace ) ) { event.handleObj = handleObj; event.data = handleObj.data; @@ -5286,7 +5317,7 @@ jQuery.event = { enumerable: true, configurable: true, - get: jQuery.isFunction( hook ) ? + get: isFunction( hook ) ? function() { if ( this.originalEvent ) { return hook( this.originalEvent ); @@ -5321,39 +5352,51 @@ jQuery.event = { // Prevent triggered image.load events from bubbling to window.load noBubble: true }, - focus: { - - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && nodeName( this, "input" ) ) { - this.click(); - return false; + // Utilize native event to ensure correct state for checkable inputs + setup: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Claim the first handler + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + // dataPriv.set( el, "click", ... ) + leverageNative( el, "click", returnTrue ); } + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Force setup before triggering a click + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + leverageNative( el, "click" ); + } + + // Return non-false to allow normal event-path propagation + return true; }, - // For cross-browser consistency, don't fire native .click() on links + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack _default: function( event ) { - return nodeName( event.target, "a" ); + var target = event.target; + return rcheckableType.test( target.type ) && + target.click && nodeName( target, "input" ) && + dataPriv.get( target, "click" ) || + nodeName( target, "a" ); } }, @@ -5370,6 +5413,93 @@ jQuery.event = { } }; +// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function leverageNative( el, type, expectSync ) { + + // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add + if ( !expectSync ) { + if ( dataPriv.get( el, type ) === undefined ) { + jQuery.event.add( el, type, returnTrue ); + } + return; + } + + // Register the controller as a special universal handler for all event namespaces + dataPriv.set( el, type, false ); + jQuery.event.add( el, type, { + namespace: false, + handler: function( event ) { + var notAsync, result, + saved = dataPriv.get( this, type ); + + if ( ( event.isTrigger & 1 ) && this[ type ] ) { + + // Interrupt processing of the outer synthetic .trigger()ed event + // Saved data should be false in such cases, but might be a leftover capture object + // from an async native handler (gh-4350) + if ( !saved.length ) { + + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call( arguments ); + dataPriv.set( this, type, saved ); + + // Trigger the native event and capture its result + // Support: IE <=9 - 11+ + // focus() and blur() are asynchronous + notAsync = expectSync( this, type ); + this[ type ](); + result = dataPriv.get( this, type ); + if ( saved !== result || notAsync ) { + dataPriv.set( this, type, false ); + } else { + result = {}; + } + if ( saved !== result ) { + + // Cancel the outer synthetic event + event.stopImmediatePropagation(); + event.preventDefault(); + return result.value; + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering the + // native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { + event.stopPropagation(); + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if ( saved.length ) { + + // ...and capture the result + dataPriv.set( this, type, { + value: jQuery.event.trigger( + + // Support: IE <=9 - 11+ + // Extend with the prototype to reset the above stopImmediatePropagation() + jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), + saved.slice( 1 ), + this + ) + } ); + + // Abort handling of the native event + event.stopImmediatePropagation(); + } + } + } ); +} + jQuery.removeEvent = function( elem, type, handle ) { // This "if" is needed for plain objects @@ -5421,7 +5551,7 @@ jQuery.Event = function( src, props ) { } // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); + this.timeStamp = src && src.timeStamp || Date.now(); // Mark it as fixed this[ jQuery.expando ] = true; @@ -5482,6 +5612,7 @@ jQuery.each( { shiftKey: true, view: true, "char": true, + code: true, charCode: true, key: true, keyCode: true, @@ -5528,6 +5659,33 @@ jQuery.each( { } }, jQuery.event.addProp ); +jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { + jQuery.event.special[ type ] = { + + // Utilize native event if possible so blur/focus sequence is correct + setup: function() { + + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative( this, type, expectSync ); + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function() { + + // Force setup before trigger + leverageNative( this, type ); + + // Return non-false to allow normal event-path propagation + return true; + }, + + delegateType: delegateType + }; +} ); + // Create mouseenter/leave events using mouseover/out and event-time checks // so that event delegation works in jQuery. // Do the same for pointerenter/pointerleave and pointerover/pointerout @@ -5620,14 +5778,13 @@ var /* eslint-enable */ - // Support: IE <=10 - 11, Edge 12 - 13 + // Support: IE <=10 - 11, Edge 12 - 13 only // In IE/Edge using regex groups here causes severe slowdowns. // See https://connect.microsoft.com/IE/feedback/details/1736512/ rnoInnerhtml = /\s*$/g; // Prefer a tbody over its parent table for containing new rows @@ -5635,7 +5792,7 @@ function manipulationTarget( elem, content ) { if ( nodeName( elem, "table" ) && nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - return jQuery( ">tbody", elem )[ 0 ] || elem; + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; } return elem; @@ -5647,10 +5804,8 @@ function disableScript( elem ) { return elem; } function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); } else { elem.removeAttribute( "type" ); } @@ -5716,15 +5871,15 @@ function domManip( collection, args, callback, ignored ) { l = collection.length, iNoClone = l - 1, value = args[ 0 ], - isFunction = jQuery.isFunction( value ); + valueIsFunction = isFunction( value ); // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || + if ( valueIsFunction || ( l > 1 && typeof value === "string" && !support.checkClone && rchecked.test( value ) ) ) { return collection.each( function( index ) { var self = collection.eq( index ); - if ( isFunction ) { + if ( valueIsFunction ) { args[ 0 ] = value.call( this, index, self.html() ); } domManip( self, args, callback, ignored ); @@ -5778,14 +5933,16 @@ function domManip( collection, args, callback, ignored ) { !dataPriv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - if ( node.src ) { + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); + if ( jQuery._evalUrl && !node.noModule ) { + jQuery._evalUrl( node.src, { + nonce: node.nonce || node.getAttribute( "nonce" ) + } ); } } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), doc ); + DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); } } } @@ -5807,7 +5964,7 @@ function remove( elem, selector, keepData ) { } if ( node.parentNode ) { - if ( keepData && jQuery.contains( node.ownerDocument, node ) ) { + if ( keepData && isAttached( node ) ) { setGlobalEval( getAll( node, "script" ) ); } node.parentNode.removeChild( node ); @@ -5825,7 +5982,7 @@ jQuery.extend( { clone: function( elem, dataAndEvents, deepDataAndEvents ) { var i, l, srcElements, destElements, clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); + inPage = isAttached( elem ); // Fix IE cloning issues if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && @@ -6065,8 +6222,6 @@ jQuery.each( { return this.pushStack( ret ); }; } ); -var rmargin = ( /^margin/ ); - var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); var getStyles = function( elem ) { @@ -6083,6 +6238,8 @@ var getStyles = function( elem ) { return view.getComputedStyle( elem ); }; +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); + ( function() { @@ -6096,25 +6253,35 @@ var getStyles = function( elem ) { return; } + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; div.style.cssText = - "box-sizing:border-box;" + - "position:relative;display:block;" + + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + "margin:auto;border:1px;padding:1px;" + - "top:1%;width:50%"; - div.innerHTML = ""; - documentElement.appendChild( container ); + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); var divStyle = window.getComputedStyle( div ); pixelPositionVal = divStyle.top !== "1%"; // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = divStyle.marginLeft === "2px"; - boxSizingReliableVal = divStyle.width === "4px"; + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; - // Support: Android 4.0 - 4.3 only + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 // Some styles come back with percentage values, even though they shouldn't - div.style.marginRight = "50%"; - pixelMarginRightVal = divStyle.marginRight === "4px"; + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = "absolute"; + scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; documentElement.removeChild( container ); @@ -6123,7 +6290,12 @@ var getStyles = function( elem ) { div = null; } - var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } + + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableMarginLeftVal, container = document.createElement( "div" ), div = document.createElement( "div" ); @@ -6138,26 +6310,26 @@ var getStyles = function( elem ) { div.cloneNode( true ).style.backgroundClip = ""; support.clearCloneStyle = div.style.backgroundClip === "content-box"; - container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + - "padding:0;margin-top:1px;position:absolute"; - container.appendChild( div ); - jQuery.extend( support, { - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, boxSizingReliable: function() { computeStyleTests(); return boxSizingReliableVal; }, - pixelMarginRight: function() { + pixelBoxStyles: function() { computeStyleTests(); - return pixelMarginRightVal; + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; }, reliableMarginLeft: function() { computeStyleTests(); return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; } } ); } )(); @@ -6180,7 +6352,7 @@ function curCSS( elem, name, computed ) { if ( computed ) { ret = computed.getPropertyValue( name ) || computed[ name ]; - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + if ( ret === "" && !isAttached( elem ) ) { ret = jQuery.style( elem, name ); } @@ -6189,7 +6361,7 @@ function curCSS( elem, name, computed ) { // but width seems to be reliably pixels. // This is against the CSSOM draft spec: // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { // Remember the original values width = style.width; @@ -6236,30 +6408,13 @@ function addGetHookIf( conditionFn, hookFn ) { } -var +var cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style, + vendorProps = {}; - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }, - - cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style; - -// Return a css property mapped to a potentially vendor prefixed property +// Return a vendor-prefixed property or undefined function vendorPropName( name ) { - // Shortcut for names that are not vendor prefixed - if ( name in emptyStyle ) { - return name; - } - // Check for vendor prefixed names var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), i = cssPrefixes.length; @@ -6272,16 +6427,33 @@ function vendorPropName( name ) { } } -// Return a property mapped along what jQuery.cssProps suggests or to -// a vendor prefixed property. +// Return a potentially-mapped jQuery.cssProps or vendor prefixed property function finalPropName( name ) { - var ret = jQuery.cssProps[ name ]; - if ( !ret ) { - ret = jQuery.cssProps[ name ] = vendorPropName( name ) || name; + var final = jQuery.cssProps[ name ] || vendorProps[ name ]; + + if ( final ) { + return final; } - return ret; + if ( name in emptyStyle ) { + return name; + } + return vendorProps[ name ] = vendorPropName( name ) || name; } + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }; + function setPositiveNumber( elem, value, subtract ) { // Any relative (+/-) values have already been @@ -6294,87 +6466,137 @@ function setPositiveNumber( elem, value, subtract ) { value; } -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i, - val = 0; +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0; - // If we already have the right measurement, avoid augmentation - if ( extra === ( isBorderBox ? "border" : "content" ) ) { - i = 4; - - // Otherwise initialize for horizontal or vertical properties - } else { - i = name === "width" ? 1 : 0; + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; } for ( ; i < 4; i += 2 ) { - // Both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + // Both box models exclude margin + if ( box === "margin" ) { + delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); } - if ( isBorderBox ) { + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } - // At this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" } else { - // At this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } - // At this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); } } } - return val; + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { + + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 + + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + ) ) || 0; + } + + return delta; } -function getWidthOrHeight( elem, name, extra ) { +function getWidthOrHeight( elem, dimension, extra ) { // Start with computed style - var valueIsBorderBox, - styles = getStyles( elem ), - val = curCSS( elem, name, styles ), + var styles = getStyles( elem ), + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + boxSizingNeeded = !support.boxSizingReliable() || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox, + + val = curCSS( elem, dimension, styles ), + offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { + return val; + } + val = "auto"; + } + + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + // Support: IE 9-11 only + // Also use offsetWidth/offsetHeight for when box sizing is unreliable + // We use getClientRects() to check for hidden/disconnected. + // In those cases, the computed value can be trusted to be border-box + if ( ( !support.boxSizingReliable() && isBorderBox || + val === "auto" || + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + elem.getClientRects().length ) { + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test( val ) ) { - return val; + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem; + if ( valueIsBorderBox ) { + val = elem[ offsetProp ]; + } } - // Check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && - ( support.boxSizingReliable() || val === elem.style[ name ] ); - - // Fall back to offsetWidth/Height when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - if ( val === "auto" ) { - val = elem[ "offset" + name[ 0 ].toUpperCase() + name.slice( 1 ) ]; - } - - // Normalize "", auto, and prepare for extra + // Normalize "" and auto val = parseFloat( val ) || 0; - // Use the active box-sizing model to add/subtract irrelevant styles + // Adjust for the element's box model return ( val + - augmentWidthOrHeight( + boxModelAdjustment( elem, - name, + dimension, extra || ( isBorderBox ? "border" : "content" ), valueIsBorderBox, - styles + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val ) ) + "px"; } @@ -6404,6 +6626,13 @@ jQuery.extend( { "flexGrow": true, "flexShrink": true, "fontWeight": true, + "gridArea": true, + "gridColumn": true, + "gridColumnEnd": true, + "gridColumnStart": true, + "gridRow": true, + "gridRowEnd": true, + "gridRowStart": true, "lineHeight": true, "opacity": true, "order": true, @@ -6415,9 +6644,7 @@ jQuery.extend( { // Add in properties whose names you wish to fix before // setting or getting the value - cssProps: { - "float": "cssFloat" - }, + cssProps: {}, // Get and set the style property on a DOM Node style: function( elem, name, value, extra ) { @@ -6429,7 +6656,7 @@ jQuery.extend( { // Make sure that we're working with the right name var ret, type, hooks, - origName = jQuery.camelCase( name ), + origName = camelCase( name ), isCustomProp = rcustomProp.test( name ), style = elem.style; @@ -6461,7 +6688,9 @@ jQuery.extend( { } // If a number was passed in, add the unit (except for certain CSS properties) - if ( type === "number" ) { + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if ( type === "number" && !isCustomProp ) { value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); } @@ -6497,7 +6726,7 @@ jQuery.extend( { css: function( elem, name, extra, styles ) { var val, num, hooks, - origName = jQuery.camelCase( name ), + origName = camelCase( name ), isCustomProp = rcustomProp.test( name ); // Make sure that we're working with the right name. We don't @@ -6535,8 +6764,8 @@ jQuery.extend( { } } ); -jQuery.each( [ "height", "width" ], function( i, name ) { - jQuery.cssHooks[ name ] = { +jQuery.each( [ "height", "width" ], function( i, dimension ) { + jQuery.cssHooks[ dimension ] = { get: function( elem, computed, extra ) { if ( computed ) { @@ -6552,29 +6781,52 @@ jQuery.each( [ "height", "width" ], function( i, name ) { // in IE throws an error. ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? swap( elem, cssShow, function() { - return getWidthOrHeight( elem, name, extra ); + return getWidthOrHeight( elem, dimension, extra ); } ) : - getWidthOrHeight( elem, name, extra ); + getWidthOrHeight( elem, dimension, extra ); } }, set: function( elem, value, extra ) { var matches, - styles = extra && getStyles( elem ), - subtract = extra && augmentWidthOrHeight( - elem, - name, - extra, + styles = getStyles( elem ), + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === "absolute", + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + boxSizingNeeded = scrollboxSizeBuggy || extra, + isBorderBox = boxSizingNeeded && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - styles + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && scrollboxSizeBuggy ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 ); + } // Convert to pixels if value adjustment is needed if ( subtract && ( matches = rcssNum.exec( value ) ) && ( matches[ 3 ] || "px" ) !== "px" ) { - elem.style[ name ] = value; - value = jQuery.css( elem, name ); + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); } return setPositiveNumber( elem, value, subtract ); @@ -6618,7 +6870,7 @@ jQuery.each( { } }; - if ( !rmargin.test( prefix ) ) { + if ( prefix !== "margin" ) { jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; } } ); @@ -6728,9 +6980,9 @@ Tween.propHooks = { // Use .style if available and use plain properties where available. if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && - ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || - jQuery.cssHooks[ tween.prop ] ) ) { + } else if ( tween.elem.nodeType === 1 && ( + jQuery.cssHooks[ tween.prop ] || + tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; @@ -6789,7 +7041,7 @@ function createFxNow() { window.setTimeout( function() { fxNow = undefined; } ); - return ( fxNow = jQuery.now() ); + return ( fxNow = Date.now() ); } // Generate parameters to create a standard animation @@ -6893,9 +7145,10 @@ function defaultPrefilter( elem, props, opts ) { // Restrict "overflow" and "display" styles during box animations if ( isBox && elem.nodeType === 1 ) { - // Support: IE <=9 - 11, Edge 12 - 13 + // Support: IE <=9 - 11, Edge 12 - 15 // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; // Identify a display type, preferring old show/hide data over the CSS cascade @@ -7003,7 +7256,7 @@ function propFilter( props, specialEasing ) { // camelCase, specialEasing and expand cssHook pass for ( index in props ) { - name = jQuery.camelCase( index ); + name = camelCase( index ); easing = specialEasing[ name ]; value = props[ index ]; if ( Array.isArray( value ) ) { @@ -7128,9 +7381,9 @@ function Animation( elem, properties, options ) { for ( ; index < length; index++ ) { result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); if ( result ) { - if ( jQuery.isFunction( result.stop ) ) { + if ( isFunction( result.stop ) ) { jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - jQuery.proxy( result.stop, result ); + result.stop.bind( result ); } return result; } @@ -7138,7 +7391,7 @@ function Animation( elem, properties, options ) { jQuery.map( props, createTween, animation ); - if ( jQuery.isFunction( animation.opts.start ) ) { + if ( isFunction( animation.opts.start ) ) { animation.opts.start.call( elem, animation ); } @@ -7171,7 +7424,7 @@ jQuery.Animation = jQuery.extend( Animation, { }, tweener: function( props, callback ) { - if ( jQuery.isFunction( props ) ) { + if ( isFunction( props ) ) { callback = props; props = [ "*" ]; } else { @@ -7203,9 +7456,9 @@ jQuery.Animation = jQuery.extend( Animation, { jQuery.speed = function( speed, easing, fn ) { var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { complete: fn || !fn && easing || - jQuery.isFunction( speed ) && speed, + isFunction( speed ) && speed, duration: speed, - easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + easing: fn && easing || easing && !isFunction( easing ) && easing }; // Go to the end state if fx are off @@ -7232,7 +7485,7 @@ jQuery.speed = function( speed, easing, fn ) { opt.old = opt.complete; opt.complete = function() { - if ( jQuery.isFunction( opt.old ) ) { + if ( isFunction( opt.old ) ) { opt.old.call( this ); } @@ -7396,7 +7649,7 @@ jQuery.fx.tick = function() { i = 0, timers = jQuery.timers; - fxNow = jQuery.now(); + fxNow = Date.now(); for ( ; i < timers.length; i++ ) { timer = timers[ i ]; @@ -7749,7 +8002,7 @@ jQuery.each( [ // Strip and collapse whitespace according to HTML spec - // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace function stripAndCollapse( value ) { var tokens = value.match( rnothtmlwhite ) || []; return tokens.join( " " ); @@ -7760,20 +8013,30 @@ function getClass( elem ) { return elem.getAttribute && elem.getAttribute( "class" ) || ""; } +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} + jQuery.fn.extend( { addClass: function( value ) { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; - if ( jQuery.isFunction( value ) ) { + if ( isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); } ); } - if ( typeof value === "string" && value ) { - classes = value.match( rnothtmlwhite ) || []; + classes = classesToArray( value ); + if ( classes.length ) { while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); @@ -7802,7 +8065,7 @@ jQuery.fn.extend( { var classes, elem, cur, curValue, clazz, j, finalValue, i = 0; - if ( jQuery.isFunction( value ) ) { + if ( isFunction( value ) ) { return this.each( function( j ) { jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); } ); @@ -7812,9 +8075,9 @@ jQuery.fn.extend( { return this.attr( "class", "" ); } - if ( typeof value === "string" && value ) { - classes = value.match( rnothtmlwhite ) || []; + classes = classesToArray( value ); + if ( classes.length ) { while ( ( elem = this[ i++ ] ) ) { curValue = getClass( elem ); @@ -7844,13 +8107,14 @@ jQuery.fn.extend( { }, toggleClass: function( value, stateVal ) { - var type = typeof value; + var type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); - if ( typeof stateVal === "boolean" && type === "string" ) { + if ( typeof stateVal === "boolean" && isValidValue ) { return stateVal ? this.addClass( value ) : this.removeClass( value ); } - if ( jQuery.isFunction( value ) ) { + if ( isFunction( value ) ) { return this.each( function( i ) { jQuery( this ).toggleClass( value.call( this, i, getClass( this ), stateVal ), @@ -7862,12 +8126,12 @@ jQuery.fn.extend( { return this.each( function() { var className, i, self, classNames; - if ( type === "string" ) { + if ( isValidValue ) { // Toggle individual class names i = 0; self = jQuery( this ); - classNames = value.match( rnothtmlwhite ) || []; + classNames = classesToArray( value ); while ( ( className = classNames[ i++ ] ) ) { @@ -7926,7 +8190,7 @@ var rreturn = /\r/g; jQuery.fn.extend( { val: function( value ) { - var hooks, ret, isFunction, + var hooks, ret, valueIsFunction, elem = this[ 0 ]; if ( !arguments.length ) { @@ -7955,7 +8219,7 @@ jQuery.fn.extend( { return; } - isFunction = jQuery.isFunction( value ); + valueIsFunction = isFunction( value ); return this.each( function( i ) { var val; @@ -7964,7 +8228,7 @@ jQuery.fn.extend( { return; } - if ( isFunction ) { + if ( valueIsFunction ) { val = value.call( this, i, jQuery( this ).val() ); } else { val = value; @@ -8106,18 +8370,24 @@ jQuery.each( [ "radio", "checkbox" ], function() { // Return jQuery for attributes-only inclusion -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; +support.focusin = "onfocusin" in window; + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); + }; jQuery.extend( jQuery.event, { trigger: function( event, data, elem, onlyHandlers ) { - var i, cur, tmp, bubbleType, ontype, handle, special, + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, eventPath = [ elem || document ], type = hasOwn.call( event, "type" ) ? event.type : event, namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - cur = tmp = elem = elem || document; + cur = lastElement = tmp = elem = elem || document; // Don't do events on text and comment nodes if ( elem.nodeType === 3 || elem.nodeType === 8 ) { @@ -8169,7 +8439,7 @@ jQuery.extend( jQuery.event, { // Determine event propagation path in advance, per W3C events spec (#9951) // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { bubbleType = special.delegateType || type; if ( !rfocusMorph.test( bubbleType + type ) ) { @@ -8189,7 +8459,7 @@ jQuery.extend( jQuery.event, { // Fire handlers on the event path i = 0; while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - + lastElement = cur; event.type = i > 1 ? bubbleType : special.bindType || type; @@ -8221,7 +8491,7 @@ jQuery.extend( jQuery.event, { // Call a native DOM method on the target with the same name as the event. // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { // Don't re-trigger an onFOO event when we call its FOO() method tmp = elem[ ontype ]; @@ -8232,7 +8502,17 @@ jQuery.extend( jQuery.event, { // Prevent re-triggering of the same event, since we already bubbled it above jQuery.event.triggered = type; + + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } + elem[ type ](); + + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } + jQuery.event.triggered = undefined; if ( tmp ) { @@ -8278,31 +8558,6 @@ jQuery.fn.extend( { } ); -jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup contextmenu" ).split( " " ), - function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); - }; -} ); - -jQuery.fn.extend( { - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -} ); - - - - -support.focusin = "onfocusin" in window; - - // Support: Firefox <=44 // Firefox doesn't have focus(in | out) events // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 @@ -8346,7 +8601,7 @@ if ( !support.focusin ) { } var location = window.location; -var nonce = jQuery.now(); +var nonce = Date.now(); var rquery = ( /\?/ ); @@ -8404,7 +8659,7 @@ function buildParams( prefix, obj, traditional, add ) { } } ); - } else if ( !traditional && jQuery.type( obj ) === "object" ) { + } else if ( !traditional && toType( obj ) === "object" ) { // Serialize object item. for ( name in obj ) { @@ -8426,7 +8681,7 @@ jQuery.param = function( a, traditional ) { add = function( key, valueOrFunction ) { // If value is a function, invoke it and use its return value - var value = jQuery.isFunction( valueOrFunction ) ? + var value = isFunction( valueOrFunction ) ? valueOrFunction() : valueOrFunction; @@ -8434,6 +8689,10 @@ jQuery.param = function( a, traditional ) { encodeURIComponent( value == null ? "" : value ); }; + if ( a == null ) { + return ""; + } + // If an array was passed in, assume that it is an array of form elements. if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { @@ -8544,7 +8803,7 @@ function addToPrefiltersOrTransports( structure ) { i = 0, dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - if ( jQuery.isFunction( func ) ) { + if ( isFunction( func ) ) { // For each dataType in the dataTypeExpression while ( ( dataType = dataTypes[ i++ ] ) ) { @@ -8936,12 +9195,14 @@ jQuery.extend( { if ( !responseHeaders ) { responseHeaders = {}; while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ]; + responseHeaders[ match[ 1 ].toLowerCase() + " " ] = + ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) + .concat( match[ 2 ] ); } } - match = responseHeaders[ key.toLowerCase() ]; + match = responseHeaders[ key.toLowerCase() + " " ]; } - return match == null ? null : match; + return match == null ? null : match.join( ", " ); }, // Raw string @@ -9016,7 +9277,7 @@ jQuery.extend( { if ( s.crossDomain == null ) { urlAnchor = document.createElement( "a" ); - // Support: IE <=8 - 11, Edge 12 - 13 + // Support: IE <=8 - 11, Edge 12 - 15 // IE throws exception on accessing the href property if url is malformed, // e.g. http://example.com:80x/ try { @@ -9074,8 +9335,8 @@ jQuery.extend( { // Remember the hash so we can put it back uncached = s.url.slice( cacheURL.length ); - // If data is available, append data to url - if ( s.data ) { + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; // #9682: remove data so that it's not used in an eventual retry @@ -9312,7 +9573,7 @@ jQuery.each( [ "get", "post" ], function( i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // Shift arguments if data argument was omitted - if ( jQuery.isFunction( data ) ) { + if ( isFunction( data ) ) { type = type || callback; callback = data; data = undefined; @@ -9330,7 +9591,7 @@ jQuery.each( [ "get", "post" ], function( i, method ) { } ); -jQuery._evalUrl = function( url ) { +jQuery._evalUrl = function( url, options ) { return jQuery.ajax( { url: url, @@ -9340,7 +9601,16 @@ jQuery._evalUrl = function( url ) { cache: true, async: false, global: false, - "throws": true + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + "text script": function() {} + }, + dataFilter: function( response ) { + jQuery.globalEval( response, options ); + } } ); }; @@ -9350,7 +9620,7 @@ jQuery.fn.extend( { var wrap; if ( this[ 0 ] ) { - if ( jQuery.isFunction( html ) ) { + if ( isFunction( html ) ) { html = html.call( this[ 0 ] ); } @@ -9376,7 +9646,7 @@ jQuery.fn.extend( { }, wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { + if ( isFunction( html ) ) { return this.each( function( i ) { jQuery( this ).wrapInner( html.call( this, i ) ); } ); @@ -9396,10 +9666,10 @@ jQuery.fn.extend( { }, wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); + var htmlIsFunction = isFunction( html ); return this.each( function( i ) { - jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); } ); }, @@ -9491,7 +9761,8 @@ jQuery.ajaxTransport( function( options ) { return function() { if ( callback ) { callback = errorCallback = xhr.onload = - xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; if ( type === "abort" ) { xhr.abort(); @@ -9531,7 +9802,7 @@ jQuery.ajaxTransport( function( options ) { // Listen to events xhr.onload = callback(); - errorCallback = xhr.onerror = callback( "error" ); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); // Support: IE 9 only // Use onreadystatechange to replace onabort @@ -9622,24 +9893,21 @@ jQuery.ajaxPrefilter( "script", function( s ) { // Bind script tag hack transport jQuery.ajaxTransport( "script", function( s ) { - // This transport only deals with cross domain requests - if ( s.crossDomain ) { + // This transport only deals with cross domain or forced-by-attrs requests + if ( s.crossDomain || s.scriptAttrs ) { var script, callback; return { send: function( _, complete ) { - script = jQuery( " + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + + + + +
+ +
    + +
  • Docs »
  • + +
  • Interface definition language to python mapping for enumerated types
  • + + +
  • + + + View page source + + +
  • + +
+ + +
+
+
+
+ +
+

Interface definition language to python mapping for enumerated types

+

The interface language definition type system includes enumerated types. Python +SDK supports both 2.x and 3.x versions of Python. Since Python 2.x does +not have first class support for enumerations, special classes are +generated to represent enumerated types from the interface definition +language. The special class contains class attributes which represent +the values of the enumerated type.

+

This documentation explains the following:

+
    +
  • How the class variables are defined in the module. This specifies the names that you can use in your program.

  • +
  • How you instantiate a class to use it for communication with future versions of the service.

  • +
+
+

Example of an enumerated type documentation

+
+
class com.vmware.vapi.metadata_client. SourceType (string)

Bases: vmware.vapi.bindings.enum.Enum

+

Metadata source type

+
+

Note

+

This class represents an enumerated type in the interface language definition type system. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports a newer version of the API, you instantiate this class. See enumerated type description page.

+
+

Parameters : string (str) – String value for the SourceType instance.

+
+
FILE = SourceType(string=’FILE’)

If the source is backed by a file.

+
+
REMOTE = SourceType(string=’REMOTE’)

If the source is backed by a remote service.

+
+
+
+
+
+
+

Code Examples

+

The enumerated type classes are defined in python modules that your code +imports. You can use these in your code.

+
    +
  1. If you want to pass an enumerated type value in a method to a server, specify the class variable of the enumerated type class.

  2. +
+
# SourceType is an enumerated type
+from com.vmware.vapi.metadata_client import SourceType
+
+# SourceType has two class attrites, SourceType.FILE and SourceType.REMOTE
+spec = Source.CreateSpec(type=SourceType.FILE, filepath='entity_metadata.json', description='Entity service')
+source_svc.create(id='entity', spec=spec)
+
+
+
    +
  1. When you receive an enumerated type value in the response from a server, allow for unknown enumerated type values.

  2. +
+
# SourceType is an enumerated type
+from com.vmware.vapi.metadata_client import SourceType
+
+source_info = source_svc.get(id='entity')
+if (source_info.type == SourceType.FILE) {
+    print 'Source is a file'
+} else if (source_info.type == SourceType.REMOTE) {
+    print 'Source is a remote provider'
+} else {
+    print 'Unknown source type: %s' % str(source_info.type)
+}
+
+
+
    +
  1. Sending a new enumerated type value to a server that has a newer version of the enumerated type.

  2. +
+

To use new values of the enumerated type in communication with a server that supports a newer version of the API, you instantiate the +enumerated type class.

+
# If a newer version of SourceType has a new value FOLDER, FOLDER would be one
+# of the class attributes for SourceType. In the older version, SourceType has
+# only two class attributes, FILE and REMOTE
+from com.vmware.vapi.metadata_client import SourceType
+spec = Source.CreateSpec(type=SourceType('FOLDER'), filepath='entity_metadata', description='Entity service')
+source_svc.create(id='entity', spec=spec)
+
+
+
+
+ + +
+ +
+ + +
+
+ +
+ +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/vmc-draas/genindex.html b/vmc-draas/genindex.html index cf9cb237..5b0f1b83 100644 --- a/vmc-draas/genindex.html +++ b/vmc-draas/genindex.html @@ -9,7 +9,7 @@ - Index — vSphere Automation SDK for Python 1.9.0 documentation + Index — draas 1.1.0 documentation @@ -49,7 +49,7 @@ - vSphere Automation SDK for Python + draas @@ -59,7 +59,7 @@
- 1.9.0 + 1.1.0
@@ -101,7 +101,7 @@
@@ -186,16 +186,14 @@
  • com.vmware (module)
  • com.vmware.vmc (module) -
  • -
  • com.vmware.vmc.draas (module)
    • -
    • vmware (module) -
    • vmware.vapi (module)
    • vmware.vapi.vmc (module) -
    • -
    • vmware.vapi.vmc.client (module)
    • vmware.vapi.vmc.csp_filter (module)
    • @@ -424,10 +418,11 @@

      - © Copyright 2019, VMware, Inc. All rights reserved + © Copyright 2019, VMware, Inc.

      -
      + + Built with Sphinx using a theme provided by Read the Docs. diff --git a/vmc-draas/index.html b/vmc-draas/index.html index f9c7ae35..71e3ea44 100644 --- a/vmc-draas/index.html +++ b/vmc-draas/index.html @@ -8,7 +8,7 @@ - Welcome to vAPI’s documentation! — vSphere Automation SDK for Python 1.9.0 documentation + Welcome to draas’s documentation! — draas 1.1.0 documentation @@ -49,7 +49,7 @@ - vSphere Automation SDK for Python + draas @@ -59,7 +59,7 @@
      - 1.9.0 + 1.1.0
      @@ -101,7 +101,7 @@
      @@ -132,7 +132,7 @@
    • Docs »
    • -
    • Welcome to vAPI’s documentation!
    • +
    • Welcome to draas’s documentation!
    • @@ -151,8 +151,8 @@
      -
      -

      Welcome to vAPI’s documentation!

      +
      +

      Welcome to draas’s documentation!

      Contents:

      + Built with Sphinx using a theme provided by Read the Docs. diff --git a/vmc-draas/objects.inv b/vmc-draas/objects.inv index bff04baed6ae1ea72901d782a210499499fcaadd..873b9ba236c24b70853ff35b7dda3fc783526232 100644 GIT binary patch delta 915 zcmV;E18n@`2k8fpC=_IJVPSI$BOq2~a&u{KZaN?_E-{fs%OeRIc72V$UZ1404a8tW94eU=M$-8|N$2QJSd7x`Q_RA3 z1n2<~7F#PBNB2ca=R4}$WoeuE7v@kYS|nevP(S3HmCE|W(h51o;*xz{pplBD@*xUH zL?Mv|B(3gTNPmurbP`GBHY1P-3xOUl02(S2NjF%6PbGLj*arC4X32ssby6J88TUY> zED@knc+A;`3d$0n$NH=7K^jqldsMs`lC@bBfpP&$bOOrGG^K0#?!*Z^#~w``Zx;BI zuKL@xC+<{z^fD@zlGFKGLW^W~_|iJs?hb9Ie}gvnoPXQ(_kn$j9`C8{zD1*-yRKnB z4^@V#5u0gS?S*U!m;1|bpd8`G{n4yFUOQp2gN?n>)b-ubur;FRbbB-7tjTQb1im+D z2Q>8tep@8tpeb-+a0gLBSi@1z3EFa1721Z|>Zq+j)nb#4?Z6+sdbShvZv~!q2d>?B zP11K{p?@`O<$C_C&Phz~zITH49sn}Ed~$vDjV;AhhJgjK3^B6`9ueH3>;EvzP(R+p z3__h%mmGu`ukimKf*V{lG`VEBcp$wrFq>5FjH>;Q{x{T9$GdNYGk8 z?G3h4CJZPB4+bnMdeqcieVme^~U?^pwmaBT9Mrg(Rrzl zjT)+dTiVG&vW|h{{Fc9@R!S~JT-CpPfeD}x7Br!`L4=d#TB#t(R5zU&SrH62u9>5WvLsW;pFLWhz%2rycw1k8vA-o^gVV}BhyZXHQD7NdP zQi-1ssb0>ZdH4SP{YM~GOu-VF*ZkX^ngVJ_>9(`aD5M6(JW?z&!u} delta 909 zcmV;819JT72jd5jC@^+YaA;+6WgtOybZ>28bZKvHAX7w3AZBlJAW(U9Xm4%`BOq2~ za&u{KZaN?_E;*4rKYx;p_AXE~ab~mpv zuQyLJi71VNiZ;QOnB@Fll9Q7wp)pD~&oP~?B0!Ib(AZdtIQpKYbbg@DgGyV+zcGVS z(Jc9lh5R9>tYp>&OJl|`=I89U1!}1nG9RLVL?I+XgQQ_jxqo1o2s;s>*eC*tFz4v$ z44|em5#bsO@IwI}5V{7ov1l?67fn)Z#whcEr!?Wvq_E5AI^-cud=@ufZ4c5YB)A*$ zcTKVujUtdPph=T}qBC{r8oo2K1JAaGW80eq{>YSnO>5+gdqQQjq6qhd|EO~M$*#LC6?Jzc4FUgU(|uT>%puz*0O6xQAOD#`9`uhHXa zFb^XE>}$Q0%NUmL`ao7J6zbMqz=wFr^{;R4Wq(~YY=ano1Po-XXR~`ggc}F(T~0u< zEPXV-q^oGQZPlh8MaC=QV)i_v1a+SB$1U}NQcT|Q0*bF&M@0)EjEZkyCBto0RvYiD zgN~oXDn)khU8ki!x1Ff^rEDj=fFw+2@UfMO@Dw5?wolCj9QFC|S!_ovl=uaaqyQ2W ztx`?b`S<59N3zr^mf?j}Tzz|x5l{h2H=TV(rqs{EC_{3jG{;^bPk$mdpcFbS7!kKI`{yijRU-s$`YL(70IIPbU4 diff --git a/vmc-draas/py-modindex.html b/vmc-draas/py-modindex.html index 7581a376..bd7c3644 100644 --- a/vmc-draas/py-modindex.html +++ b/vmc-draas/py-modindex.html @@ -8,7 +8,7 @@ - Python Module Index — vSphere Automation SDK for Python 1.9.0 documentation + Python Module Index — draas 1.1.0 documentation @@ -51,7 +51,7 @@ - vSphere Automation SDK for Python + draas @@ -61,7 +61,7 @@
      - 1.9.0 + 1.1.0
      @@ -103,7 +103,7 @@
      @@ -211,11 +211,6 @@     vmware.vapi.vmc - - -     - vmware.vapi.vmc.client -     @@ -234,10 +229,11 @@

      - © Copyright 2019, VMware, Inc. All rights reserved + © Copyright 2019, VMware, Inc.

      -
      +
      + Built with Sphinx using a theme provided by Read the Docs. diff --git a/vmc-draas/search.html b/vmc-draas/search.html index 0a1cd0d1..af910a6b 100644 --- a/vmc-draas/search.html +++ b/vmc-draas/search.html @@ -8,7 +8,7 @@ - Search — vSphere Automation SDK for Python 1.9.0 documentation + Search — draas 1.1.0 documentation @@ -49,7 +49,7 @@ - vSphere Automation SDK for Python + draas @@ -59,7 +59,7 @@
      - 1.9.0 + 1.1.0
      @@ -101,7 +101,7 @@
      @@ -173,10 +173,11 @@

      - © Copyright 2019, VMware, Inc. All rights reserved + © Copyright 2019, VMware, Inc.

      -
      +
      + Built with Sphinx using a theme provided by Read the Docs. diff --git a/vmc-draas/searchindex.js b/vmc-draas/searchindex.js index bf4ee797..0b86ba5b 100644 --- a/vmc-draas/searchindex.js +++ b/vmc-draas/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["com","com.vmware","com.vmware.vmc","com.vmware.vmc.draas","index","vmware","vmware.vapi","vmware.vapi.vmc"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:54},filenames:["com.rst","com.vmware.rst","com.vmware.vmc.rst","com.vmware.vmc.draas.rst","index.rst","vmware.rst","vmware.vapi.rst","vmware.vapi.vmc.rst"],objects:{"":{com:[0,0,0,"-"],vmware:[5,0,0,"-"]},"com.vmware":{vmc:[2,0,0,"-"]},"com.vmware.vmc":{draas:[3,0,0,"-"],draas_client:[2,0,0,"-"]},"com.vmware.vmc.draas":{model_client:[3,0,0,"-"]},"com.vmware.vmc.draas.model_client":{AbstractEntity:[3,1,1,""],ActivateSiteRecoveryConfig:[3,1,1,""],ErrorResponse:[3,1,1,""],ProvisionSrmConfig:[3,1,1,""],ReplicaDisk:[3,1,1,""],ReplicaDiskCollection:[3,1,1,""],SiteRecovery:[3,1,1,""],SiteRecoveryNode:[3,1,1,""],SiteRecoveryNodeVersion:[3,1,1,""],SiteRecoveryVersions:[3,1,1,""],StubFactory:[3,1,1,""],Task:[3,1,1,""],TaskProgressPhase:[3,1,1,""]},"com.vmware.vmc.draas.model_client.SiteRecovery":{SITE_RECOVERY_STATE_ACTIVATED:[3,2,1,""],SITE_RECOVERY_STATE_ACTIVATING:[3,2,1,""],SITE_RECOVERY_STATE_CANCELED:[3,2,1,""],SITE_RECOVERY_STATE_DEACTIVATED:[3,2,1,""],SITE_RECOVERY_STATE_DEACTIVATING:[3,2,1,""],SITE_RECOVERY_STATE_DELETED:[3,2,1,""],SITE_RECOVERY_STATE_FAILED:[3,2,1,""]},"com.vmware.vmc.draas.model_client.SiteRecoveryNode":{STATE_CANCELED:[3,2,1,""],STATE_DELETING:[3,2,1,""],STATE_DEPLOYING:[3,2,1,""],STATE_FAILED:[3,2,1,""],STATE_PROVISIONED:[3,2,1,""],STATE_READY:[3,2,1,""],TYPE_SRM:[3,2,1,""],TYPE_VRMS:[3,2,1,""],TYPE_VRS:[3,2,1,""]},"com.vmware.vmc.draas.model_client.SiteRecoveryNodeVersion":{NODE_TYPE_SRM:[3,2,1,""],NODE_TYPE_VRMS:[3,2,1,""],NODE_TYPE_VRS:[3,2,1,""],VERSION_SOURCE_LS:[3,2,1,""],VERSION_SOURCE_VAMICLI:[3,2,1,""]},"com.vmware.vmc.draas.model_client.Task":{STATUS_CANCELED:[3,2,1,""],STATUS_CANCELING:[3,2,1,""],STATUS_FAILED:[3,2,1,""],STATUS_FINISHED:[3,2,1,""],STATUS_STARTED:[3,2,1,""]},"com.vmware.vmc.draas_client":{ReplicaDiskCollections:[2,1,1,""],SiteRecovery:[2,1,1,""],SiteRecoverySrmNodes:[2,1,1,""],SiteRecoveryVersions:[2,1,1,""],StubFactory:[2,1,1,""],Task:[2,1,1,""]},"com.vmware.vmc.draas_client.ReplicaDiskCollections":{get:[2,3,1,""]},"com.vmware.vmc.draas_client.SiteRecovery":{"delete":[2,3,1,""],get:[2,3,1,""],post:[2,3,1,""],post_0:[2,3,1,""]},"com.vmware.vmc.draas_client.SiteRecoverySrmNodes":{"delete":[2,3,1,""],post:[2,3,1,""]},"com.vmware.vmc.draas_client.SiteRecoveryVersions":{GET_VERSION_SOURCE_LS:[2,2,1,""],GET_VERSION_SOURCE_VAMICLI:[2,2,1,""],get:[2,3,1,""]},"com.vmware.vmc.draas_client.Task":{get:[2,3,1,""]},"vmware.vapi":{vmc:[7,0,0,"-"]},"vmware.vapi.vmc":{client:[7,0,0,"-"],csp_filter:[7,0,0,"-"]},"vmware.vapi.vmc.client":{VmcClient:[7,1,1,""],VmcStubFactory:[7,1,1,""],create_vmc_client:[7,4,1,""]},"vmware.vapi.vmc.csp_filter":{CSPSecurityContextFilter:[7,1,1,""]},"vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter":{get_max_retries:[7,3,1,""],get_security_context:[7,3,1,""],should_retry:[7,3,1,""]},com:{vmware:[1,0,0,"-"]},vmware:{vapi:[6,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","attribute","Python attribute"],"3":["py","method","Python method"],"4":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:attribute","3":"py:method","4":"py:function"},terms:{"case":7,"class":[2,3,7],"default":3,"float":3,"int":7,"long":3,"new":7,"public":7,"return":[2,7],"true":[2,3,7],NOT:3,Not:2,The:3,VRS:3,abstractent:3,access:7,act:3,action:2,activ:[2,3],activate_site_recovery_config:2,activatesiterecoveryconfig:[2,3],add:7,added:7,addit:[2,3],after:7,all:7,allow:[3,7],api:[3,7],apicli:7,append:3,applianc:2,appliance_vers:3,argument:[2,3],attribut:3,automat:7,backup:2,bad:2,base:[2,3,7],begin:3,being:3,bind:[2,3,7],bool:[2,3,7],build_numb:3,call:7,can:[2,3],cancel:3,cannot:2,chain:7,charact:3,client:[3,4,5,6],code:3,collect:2,collection_id:3,com:[4,7],complet:3,compos:3,config:[2,3],configur:2,connector:7,contain:3,content:4,context:7,core:7,creat:[2,3,7],create_vmc_cli:7,csp:7,csp_filter:[4,5,6],csp_url:7,cspsecuritycontextfilt:7,current:3,custom:[2,3],data:[3,7],datastor:2,datastore_mo_id:[2,3],datastores_for_single_host_mov:3,datetim:3,deactiv:[2,3],delet:[2,3],deploi:3,detail:2,disk:[2,3],disk_id:3,displai:3,divid:3,doe:3,draa:[0,1,2,4],draas_client:[0,1,4],draas_h5_url:3,either:7,els:7,end:3,end_tim:3,entiti:3,error:[3,7],error_cod:3,error_messag:3,error_valu:7,errorrespons:3,errors_cli:2,errorvalu:7,estim:3,estimated_remaining_minut:3,exampl:2,exchang:7,execut:[3,7],extens:[2,3],factori:7,fail:3,fals:7,file:2,filter:7,find:2,finish:3,flag:3,forbidden:2,forc:2,forcefulli:2,form:3,format:3,found:2,from:[2,7],full:3,full_vers:3,gener:3,get:[2,7],get_max_retri:7,get_security_context:7,get_version_source_l:2,get_version_source_vamicli:2,given:2,has:3,have:3,helper:7,hostnam:3,http:[3,7],identifi:[2,3],index:4,initi:[2,3,7],instanc:[2,3,7],int32:3,intern:3,invalid:2,invalidrequest:2,invok:3,involv:3,ip_address:3,kei:[2,3],last:3,less:3,letter:3,list:[2,3],local:3,make:7,max:7,mean:3,meaning:3,messag:3,method:[2,7],minut:3,model:2,model_cli:[0,1,2,4],modul:[0,1,4,5,6],more:3,moref:2,movabl:3,must:3,name:3,node:[2,3],node_id:3,node_ip:3,node_typ:3,node_type_srm:3,node_type_vr:3,node_type_vrm:3,node_vers:3,none:[2,3,7],notfound:2,nsx:3,number:[3,7],object:7,obtain:7,occur:7,on_error:7,one:7,oper:3,option:[2,3],org:2,organ:2,origin:3,packag:4,page:4,param:3,paramet:[2,3,7],parent_task_id:3,pass:7,path:3,percentag:3,phase:3,placeholder_vm_mo_id:3,possibl:[2,3],post:2,post_0:2,progress:3,progress_perc:3,provid:7,providess:7,provis:[2,3],provision_srm_config:2,provisionsrmconfig:[2,3],queri:2,rais:2,readi:3,record:3,recoveri:[2,3],refresh:7,refresh_token:7,refresh_url:7,remain:3,replica:2,replicadisk:3,replicadiskcollect:[2,3],repres:2,request:[3,7],requir:2,resourc:3,resource_id:3,resource_typ:3,retri:[3,7],retriev:[2,7],retryabl:3,same:3,script:2,sddc:[2,3],sddc_id:3,search:[2,4],secur:7,security_context_filt:7,securitycontext:7,securitycontextfilt:7,server:2,servic:7,session:7,should:[3,7],should_retri:7,site:[2,3],site_recovery_nod:2,site_recovery_st:3,site_recovery_state_activ:3,site_recovery_state_cancel:3,site_recovery_state_deactiv:3,site_recovery_state_delet:3,site_recovery_state_fail:3,siterecoveri:[2,3],siterecoverynod:3,siterecoverynodevers:3,siterecoverysrmnod:2,siterecoveryvers:[2,3],sourc:2,space_requir:3,specif:2,specifi:[2,3,7],srm:[2,3],srm_extension_key_suffix:3,srm_node:[2,3],start:3,start_tim:3,state:3,state_cancel:3,state_delet:3,state_deploi:3,state_fail:3,state_provis:3,state_readi:3,statu:3,status_cancel:3,status_fail:3,status_finish:3,status_start:3,std:2,str:[2,3,7],struct:3,stub:[2,3,7],stub_config:[2,3,7],stubconfigur:[2,3],stubfactori:[2,3,7],stubfactorybas:[2,3],sub_statu:3,submodul:[0,1,4,5,6],subpackag:4,suffix:[2,3],task:[2,3],task_progress_phas:3,task_typ:3,task_vers:3,taskprogressphas:3,tenant_id:3,thi:[3,7],time:3,token:7,type:[2,3,7],type_srm:3,type_vr:3,type_vrm:3,unauthent:[2,7],unauthor:[2,7],uniqu:3,updat:3,updated_by_user_id:3,updated_by_user_nam:3,upload:2,upon:3,uri:3,url:7,use:7,used:[2,3,7],user:3,user_id:3,user_nam:3,using:7,uuid:3,valu:[2,3,7],vamicli:[2,3],vapi:[2,3,5],vapiinterfac:2,vapistruct:3,vcdr:3,version:[2,3],version_sourc:[2,3],version_source_l:3,version_source_vamicli:3,versionsourc:2,vm_moref_id:3,vmc:[0,1,4,5,6],vmc_client:7,vmc_url:7,vmcclient:7,vmcstubfactori:7,vmware:[0,4],vr_node:3,vrm:3,whether:7},titles:["com package","com.vmware package","com.vmware.vmc package","com.vmware.vmc.draas package","Welcome to vAPI\u2019s documentation!","vmware package","vmware.vapi package","vmware.vapi.vmc package"],titleterms:{client:7,com:[0,1,2,3],csp_filter:7,document:4,draa:3,draas_client:2,indic:4,model_cli:3,modul:[2,3,7],packag:[0,1,2,3,5,6,7],submodul:[2,3,7],subpackag:[0,1,2,5,6],tabl:4,vapi:[4,6,7],vmc:[2,3,7],vmware:[1,2,3,5,6,7],welcom:4}}) \ No newline at end of file +Search.setIndex({docnames:["com","com.vmware","com.vmware.vmc","com.vmware.vmc.draas","enumeration","index","vmware","vmware.vapi","vmware.vapi.vmc"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,sphinx:56},filenames:["com.rst","com.vmware.rst","com.vmware.vmc.rst","com.vmware.vmc.draas.rst","enumeration.rst","index.rst","vmware.rst","vmware.vapi.rst","vmware.vapi.vmc.rst"],objects:{"":{com:[0,0,0,"-"],vmware:[6,0,0,"-"]},"com.vmware":{vmc:[2,0,0,"-"]},"com.vmware.vmc":{draas:[3,0,0,"-"],draas_client:[2,0,0,"-"]},"com.vmware.vmc.draas":{model_client:[3,0,0,"-"]},"com.vmware.vmc.draas.model_client":{AbstractEntity:[3,1,1,""],ActivateSiteRecoveryConfig:[3,1,1,""],ErrorResponse:[3,1,1,""],ProvisionSrmConfig:[3,1,1,""],ReplicaDisk:[3,1,1,""],ReplicaDiskCollection:[3,1,1,""],SiteRecovery:[3,1,1,""],SiteRecoveryNode:[3,1,1,""],SiteRecoveryNodeVersion:[3,1,1,""],SiteRecoveryVersions:[3,1,1,""],StubFactory:[3,1,1,""],Task:[3,1,1,""],TaskProgressPhase:[3,1,1,""]},"com.vmware.vmc.draas.model_client.SiteRecovery":{SITE_RECOVERY_STATE_ACTIVATED:[3,2,1,""],SITE_RECOVERY_STATE_ACTIVATING:[3,2,1,""],SITE_RECOVERY_STATE_CANCELED:[3,2,1,""],SITE_RECOVERY_STATE_DEACTIVATED:[3,2,1,""],SITE_RECOVERY_STATE_DEACTIVATING:[3,2,1,""],SITE_RECOVERY_STATE_DELETED:[3,2,1,""],SITE_RECOVERY_STATE_FAILED:[3,2,1,""]},"com.vmware.vmc.draas.model_client.SiteRecoveryNode":{STATE_CANCELED:[3,2,1,""],STATE_DELETING:[3,2,1,""],STATE_DEPLOYING:[3,2,1,""],STATE_FAILED:[3,2,1,""],STATE_PROVISIONED:[3,2,1,""],STATE_READY:[3,2,1,""],TYPE_SRM:[3,2,1,""],TYPE_VRMS:[3,2,1,""],TYPE_VRS:[3,2,1,""]},"com.vmware.vmc.draas.model_client.SiteRecoveryNodeVersion":{NODE_TYPE_SRM:[3,2,1,""],NODE_TYPE_VRMS:[3,2,1,""],NODE_TYPE_VRS:[3,2,1,""],VERSION_SOURCE_LS:[3,2,1,""],VERSION_SOURCE_VAMICLI:[3,2,1,""]},"com.vmware.vmc.draas.model_client.Task":{STATUS_CANCELED:[3,2,1,""],STATUS_CANCELING:[3,2,1,""],STATUS_FAILED:[3,2,1,""],STATUS_FINISHED:[3,2,1,""],STATUS_STARTED:[3,2,1,""]},"com.vmware.vmc.draas_client":{ReplicaDiskCollections:[2,1,1,""],SiteRecovery:[2,1,1,""],SiteRecoverySrmNodes:[2,1,1,""],SiteRecoveryVersions:[2,1,1,""],StubFactory:[2,1,1,""],Task:[2,1,1,""]},"com.vmware.vmc.draas_client.ReplicaDiskCollections":{get:[2,3,1,""]},"com.vmware.vmc.draas_client.SiteRecovery":{"delete":[2,3,1,""],get:[2,3,1,""],post:[2,3,1,""],post_0:[2,3,1,""],post_1:[2,3,1,""]},"com.vmware.vmc.draas_client.SiteRecoverySrmNodes":{"delete":[2,3,1,""],post:[2,3,1,""]},"com.vmware.vmc.draas_client.SiteRecoveryVersions":{GET_VERSION_SOURCE_LS:[2,2,1,""],GET_VERSION_SOURCE_VAMICLI:[2,2,1,""],get:[2,3,1,""]},"com.vmware.vmc.draas_client.Task":{get:[2,3,1,""]},"vmware.vapi":{vmc:[8,0,0,"-"]},"vmware.vapi.vmc":{csp_filter:[8,0,0,"-"]},"vmware.vapi.vmc.csp_filter":{CSPSecurityContextFilter:[8,1,1,""]},"vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter":{get_max_retries:[8,3,1,""],get_security_context:[8,3,1,""],should_retry:[8,3,1,""]},com:{vmware:[1,0,0,"-"]},vmware:{vapi:[7,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","attribute","Python attribute"],"3":["py","method","Python method"]},objtypes:{"0":"py:module","1":"py:class","2":"py:attribute","3":"py:method"},terms:{"case":8,"class":[2,3,4,8],"default":3,"enum":4,"float":3,"import":4,"int":8,"long":3,"new":[4,8],"return":[2,8],"true":[2,3,8],NOT:3,Not:2,The:[3,4],VRS:3,abstractent:3,access:8,act:3,action:2,activ:[2,3],activate_site_recovery_config:2,activatesiterecoveryconfig:[2,3],add:8,addit:[2,3],after:8,allow:[3,4,8],api:[3,4,8],append:3,applianc:2,appliance_vers:3,argument:[2,3],attribut:[3,4],attrit:4,audit:2,back:4,backup:2,bad:2,base:[2,3,4,8],begin:3,being:3,bind:[2,3,4],bool:[2,3,8],both:4,build_numb:3,call:8,can:[2,3,4],cancel:3,cannot:2,chain:8,charact:3,client:[3,5,6,7],code:3,collect:2,collection_id:3,com:[4,5],commun:4,complet:3,compos:3,config:[2,3],configur:2,contain:[3,4],content:5,context:8,core:8,creat:[2,3,4,8],createspec:4,csp:8,csp_filter:[5,6,7],cspsecuritycontextfilt:8,current:[3,4],custom:[2,3],data:[3,8],datastor:2,datastore_mo_id:[2,3],datastores_for_single_host_mov:3,datetim:3,deactiv:[2,3],defin:4,delet:[2,3],deploi:3,descript:4,detail:2,disk:[2,3],disk_id:3,displai:3,divid:3,doe:[3,4],draa:[0,1,2],draas_client:[0,1,5],draas_h5_url:3,either:8,els:[4,8],end:3,end_tim:3,entiti:[3,4],entity_metadata:4,error:[3,8],error_cod:3,error_messag:3,error_valu:8,errorrespons:3,errors_cli:2,errorvalu:8,estim:3,estimated_remaining_minut:3,exampl:2,exchang:8,execut:[3,8],explain:4,extens:[2,3],fail:3,fals:8,file:[2,4],filepath:4,filter:8,find:2,finish:3,first:4,flag:3,folder:4,follow:4,forbidden:2,forc:2,forcefulli:2,form:3,format:3,found:2,from:[2,4],full:3,full_vers:3,futur:4,gener:[3,4],get:[2,4,8],get_max_retri:8,get_security_context:8,get_version_source_l:2,get_version_source_vamicli:2,given:2,has:[3,4],have:[3,4],hostnam:3,how:4,http:[3,8],identifi:[2,3],includ:4,index:5,initi:[2,3,8],instanc:[2,3,4],instanti:4,int32:3,intern:3,invalid:2,invalidrequest:2,invok:3,involv:3,ip_address:3,json:4,kei:[2,3],last:3,less:3,letter:3,list:[2,3],local:3,mai:4,make:8,max:8,mean:3,meaning:3,messag:3,metadata:4,metadata_cli:4,method:[2,4,8],minut:3,model:2,model_cli:[0,1,2,5],modul:[0,1,4,5,6,7],more:3,moref:2,movabl:3,must:3,name:[3,4],newer:4,node:[2,3],node_id:3,node_ip:3,node_typ:3,node_type_srm:3,node_type_vr:3,node_type_vrm:3,node_vers:3,none:[2,3],notfound:2,nsx:3,number:[3,8],object:8,obtain:8,occur:8,older:4,on_error:8,one:4,onli:4,oper:3,option:[2,3],org:2,organ:2,origin:3,packag:5,page:[4,5],param:3,paramet:[2,3,4,8],parent_task_id:3,pass:[4,8],path:3,percentag:3,phase:3,placeholder_vm_mo_id:3,possibl:[2,3],post:2,post_0:2,post_1:2,print:4,program:4,progress:3,progress_perc:3,provid:[4,8],provis:[2,3],provision_srm_config:2,provisionsrmconfig:[2,3],queri:2,rais:2,readi:3,receiv:4,record:3,recoveri:[2,3],refresh:8,refresh_token:8,refresh_url:8,remain:3,remot:4,replica:2,replicadisk:3,replicadiskcollect:[2,3],repres:[2,4],request:[3,8],requir:2,resourc:3,resource_id:3,resource_typ:3,respons:4,retri:[3,8],retriev:[2,8],retryabl:3,rsyslog:2,same:3,script:2,sddc:[2,3],sddc_id:3,sdk:4,search:[2,5],secur:8,security_context_filt:8,securitycontext:8,securitycontextfilt:8,see:4,send:4,server:[2,4],servic:4,session:8,setup:2,should:[3,8],should_retri:8,sinc:4,site:[2,3],site_recovery_nod:2,site_recovery_st:3,site_recovery_state_activ:3,site_recovery_state_cancel:3,site_recovery_state_deactiv:3,site_recovery_state_delet:3,site_recovery_state_fail:3,siterecoveri:[2,3],siterecoverynod:3,siterecoverynodevers:3,siterecoverysrmnod:2,siterecoveryvers:[2,3],sourc:[2,4],source_info:4,source_svc:4,sourcetyp:4,space_requir:3,spec:4,special:4,specif:2,specifi:[2,3,4,8],srm:[2,3],srm_extension_key_suffix:3,srm_node:[2,3],start:3,start_tim:3,state:3,state_cancel:3,state_delet:3,state_deploi:3,state_fail:3,state_provis:3,state_readi:3,statu:3,status_cancel:3,status_fail:3,status_finish:3,status_start:3,std:2,str:[2,3,4,8],string:4,struct:3,stub:[2,3],stub_config:[2,3],stubconfigur:[2,3],stubfactori:[2,3],stubfactorybas:[2,3],sub_statu:3,submodul:[0,1,5,6,7],subpackag:5,suffix:[2,3],support:4,system:4,task:[2,3],task_progress_phas:3,task_typ:3,task_vers:3,taskprogressphas:3,tenant_id:3,thi:[3,4,8],time:3,token:8,two:4,type:[2,3,8],type_srm:3,type_vr:3,type_vrm:3,unauthent:[2,8],unauthor:[2,8],uniqu:3,unknown:4,updat:3,updated_by_user_id:3,updated_by_user_nam:3,upload:2,upon:3,uri:3,url:8,use:[4,8],used:[2,3],user:3,user_id:3,user_nam:3,using:8,uuid:3,valu:[2,3,4,8],vamicli:[2,3],vapi:[2,3,4,5,6],vapiinterfac:2,vapistruct:3,variabl:4,vcdr:3,version:[2,3,4],version_sourc:[2,3],version_source_l:3,version_source_vamicli:3,versionsourc:2,vm_moref_id:3,vmc:[0,1,5,6,7],vmware:[0,4,5],vr_node:3,vrm:3,want:4,when:4,whether:8,which:4,would:4,you:4,your:4},titles:["com package","com.vmware package","com.vmware.vmc package","com.vmware.vmc.draas package","Interface definition language to python mapping for enumerated types","Welcome to draas\u2019s documentation!","vmware package","vmware.vapi package","vmware.vapi.vmc package"],titleterms:{client:8,code:4,com:[0,1,2,3],csp_filter:8,definit:4,document:[4,5],draa:[3,5],draas_client:2,enumer:4,exampl:4,indic:5,interfac:4,languag:4,map:4,model_cli:3,modul:[2,3,8],packag:[0,1,2,3,6,7,8],python:4,submodul:[2,3,8],subpackag:[0,1,2,6,7],tabl:5,type:4,vapi:[7,8],vmc:[2,3,8],vmware:[1,2,3,6,7,8],welcom:5}}) \ No newline at end of file diff --git a/vmc-draas/vmware.html b/vmc-draas/vmware.html index 7b0edb06..93b2678a 100644 --- a/vmc-draas/vmware.html +++ b/vmc-draas/vmware.html @@ -8,7 +8,7 @@ - vmware package — vSphere Automation SDK for Python 1.9.0 documentation + vmware package — draas 1.1.0 documentation @@ -50,7 +50,7 @@ - vSphere Automation SDK for Python + draas @@ -60,7 +60,7 @@
      - 1.9.0 + 1.1.0
      @@ -108,7 +108,7 @@
      @@ -168,7 +168,7 @@
    • Subpackages
      • vmware.vapi.vmc package
      • @@ -201,10 +201,11 @@

        - © Copyright 2019, VMware, Inc. All rights reserved + © Copyright 2019, VMware, Inc.

        -
        + + Built with Sphinx using a theme provided by Read the Docs. diff --git a/vmc-draas/vmware.vapi.html b/vmc-draas/vmware.vapi.html index f68489a8..ce197c3a 100644 --- a/vmc-draas/vmware.vapi.html +++ b/vmc-draas/vmware.vapi.html @@ -8,7 +8,7 @@ - vmware.vapi package — vSphere Automation SDK for Python 1.9.0 documentation + vmware.vapi package — draas 1.1.0 documentation @@ -50,7 +50,7 @@ - vSphere Automation SDK for Python + draas @@ -60,7 +60,7 @@
        - 1.9.0 + 1.1.0
        @@ -111,7 +111,7 @@
        @@ -171,7 +171,7 @@
        • vmware.vapi.vmc package
        • @@ -200,10 +200,11 @@

          - © Copyright 2019, VMware, Inc. All rights reserved + © Copyright 2019, VMware, Inc.

          -
          + + Built with Sphinx using a theme provided by Read the Docs. diff --git a/vmc-draas/vmware.vapi.vmc.html b/vmc-draas/vmware.vapi.vmc.html index 565c924c..3edf4863 100644 --- a/vmc-draas/vmware.vapi.vmc.html +++ b/vmc-draas/vmware.vapi.vmc.html @@ -8,7 +8,7 @@ - vmware.vapi.vmc package — vSphere Automation SDK for Python 1.9.0 documentation + vmware.vapi.vmc package — draas 1.1.0 documentation @@ -49,7 +49,7 @@ - vSphere Automation SDK for Python + draas @@ -59,7 +59,7 @@
          - 1.9.0 + 1.1.0
          @@ -110,7 +110,7 @@
          @@ -169,142 +169,79 @@

          Submodules

          -
          -

          vmware.vapi.vmc.client module

          -

          CSP Refresh token based SecurityContextFilter

          -
          -
          -class vmware.vapi.vmc.client.VmcClient(session, refresh_token, vmc_url, csp_url)
          -

          Bases: vmware.vapi.bindings.stub.ApiClient

          -

          VMC Client class that providess access to stubs for all the services in the -VMC API

          -

          Initialize VmcClient by creating a stub factory instance using a CSP -Security context filter added to the filter chain of the connector

          - --- - - - -
          Parameters:
            -
          • session (requests.Session) – Requests HTTP session instance
          • -
          • refresh_token (str) – Refresh token obtained from CSP
          • -
          -
          -
          - -
          -
          -class vmware.vapi.vmc.client.VmcStubFactory(stub_config)
          -

          Bases: com.vmware.vmc_client.StubFactory

          -
          - -
          -
          -vmware.vapi.vmc.client.create_vmc_client(refresh_token, session=None)
          -

          Helper method to create an instance of the VMC API client using the public -VMC and CSP URL.

          - --- - - - - - - - -
          Parameters:
            -
          • refresh_token (str) – Refresh token obtained from CSP
          • -
          • session (requests.Session or None) – Requests HTTP session instance. If not specified, then one -is automatically created and used
          • -
          -
          Return type:

          vmware.vapi.vmc.client.VmcClient

          -
          Returns:

          VMC Client instance

          -
          -
          - +
          +

          vmware.vapi.vmc.client module

          vmware.vapi.vmc.csp_filter module

          CSP Refresh token based SecurityContextFilter

          -class vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter(session, refresh_token, refresh_url)
          +class vmware.vapi.vmc.csp_filter.CSPSecurityContextFilter(session, refresh_token, refresh_url)

          Bases: vmware.vapi.security.client.security_context_filter.SecurityContextFilter

          CSP Security Context filter in API Provider chain adds the security context based on a refresh token to the execution context passed in.

          Initialize SecurityContextFilter

          - --- - - - -
          Parameters:
            -
          • session (requests.Session) – Requests Session object to use for making HTTP calls
          • -
          • refresh_token (str) – Refresh token to use for obtaining an access token
          • -
          • refresh_url (str) – URL that allows exchanging a refresh token for an -access token
          • +
            +
            Parameters
            +
              +
            • session (requests.Session) – Requests Session object to use for making HTTP calls

            • +
            • refresh_token (str) – Refresh token to use for obtaining an access token

            • +
            • refresh_url (str) – URL that allows exchanging a refresh token for an +access token

            -
          +
          +
          -get_max_retries()
          +get_max_retries()

          Get the max number of retries

          - --- - - - - - -
          Return type:int
          Returns:Number of retries
          +
          +
          Return type
          +

          int

          +
          +
          Returns
          +

          Number of retries

          +
          +
          -get_security_context(on_error)
          +get_security_context(on_error)

          Retrieve security context. If this method is called after an error occured, then a new access token is obtained using the refresh token and a new security context is created.

          - --- - - - - - - - -
          Parameters:on_error (bool) – Whether this method is called after getting an error
          Return type:vmware.vapi.core.SecurityContext
          Returns:Security context
          +
          +
          Parameters
          +

          on_error (bool) – Whether this method is called after getting an error

          +
          +
          Return type
          +

          vmware.vapi.core.SecurityContext

          +
          +
          Returns
          +

          Security context

          +
          +
          -should_retry(error_value)
          +should_retry(error_value)

          Returns whether the request should be retried or not based on the error specified.

          - --- - - - - - - - -
          Parameters:error_value (vmware.vapi.data.value.ErrorValue) – Method error
          Return type:bool
          Returns:Returns True if request should be retried in case the error is -either Unauthenticated or Unauthorized else False
          +
          +
          Parameters
          +

          error_value (vmware.vapi.data.value.ErrorValue) – Method error

          +
          +
          Return type
          +

          bool

          +
          +
          Returns
          +

          Returns True if request should be retried in case the error is +either Unauthenticated or Unauthorized else False

          +
          +
          @@ -330,10 +267,11 @@ either Unauthenticated or Unauthorized else False

          - © Copyright 2019, VMware, Inc. All rights reserved + © Copyright 2019, VMware, Inc.

          -
          +
          + Built with Sphinx using a theme provided by Read the Docs.