diff --git a/docs/html/.buildinfo b/docs/html/.buildinfo
index f6f6351e..1df8fadf 100644
--- a/docs/html/.buildinfo
+++ b/docs/html/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: 54e3c41ee399a53cbbd539e0b5b1070a
+config: 851d89774707ad51b2c12510a4226ab6
tags: 645f666f9bcd5a90fca523b33c5a78b7
diff --git a/docs/html/.doctrees/composer.doctree b/docs/html/.doctrees/composer.doctree
index 17e8da96..5d4c884b 100644
Binary files a/docs/html/.doctrees/composer.doctree and b/docs/html/.doctrees/composer.doctree differ
diff --git a/docs/html/.doctrees/environment.pickle b/docs/html/.doctrees/environment.pickle
index b1c97a5b..9ab75afe 100644
Binary files a/docs/html/.doctrees/environment.pickle and b/docs/html/.doctrees/environment.pickle differ
diff --git a/docs/html/.doctrees/livemedia-creator.doctree b/docs/html/.doctrees/livemedia-creator.doctree
index 7b09a96a..36525a07 100644
Binary files a/docs/html/.doctrees/livemedia-creator.doctree and b/docs/html/.doctrees/livemedia-creator.doctree differ
diff --git a/docs/html/.doctrees/lorax.doctree b/docs/html/.doctrees/lorax.doctree
index afc4b631..4ba1f7a8 100644
Binary files a/docs/html/.doctrees/lorax.doctree and b/docs/html/.doctrees/lorax.doctree differ
diff --git a/docs/html/.doctrees/pylorax.doctree b/docs/html/.doctrees/pylorax.doctree
index c7fba21b..d1e2611f 100644
Binary files a/docs/html/.doctrees/pylorax.doctree and b/docs/html/.doctrees/pylorax.doctree differ
diff --git a/docs/html/_modules/composer/cli.html b/docs/html/_modules/composer/cli.html
index ec508961..02848856 100644
--- a/docs/html/_modules/composer/cli.html
+++ b/docs/html/_modules/composer/cli.html
@@ -8,7 +8,7 @@
-
[docs] def delete_url_json ( socket_path , url ):
+
[docs] def delete_url_json ( socket_path , url , timeout = 120 ):
"""Send a DELETE request to the url and return JSON response
:param socket_path: Path to the Unix socket to use for API communication
@@ -293,7 +293,7 @@
:returns: The json response from the server
:rtype: dict
"""
-
http = UnixHTTPConnectionPool ( socket_path )
+
http = UnixHTTPConnectionPool ( socket_path , timeout = timeout )
r = http . request ( "DELETE" , url )
return json . loads ( r . data . decode ( "utf-8" ))
diff --git a/docs/html/_modules/composer/unix_socket.html b/docs/html/_modules/composer/unix_socket.html
index d69483dc..9270d230 100644
--- a/docs/html/_modules/composer/unix_socket.html
+++ b/docs/html/_modules/composer/unix_socket.html
@@ -8,7 +8,7 @@
-
composer.unix_socket — Lorax 32.4 documentation
+
composer.unix_socket — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/index.html b/docs/html/_modules/index.html
index ea6bc240..e429cbcb 100644
--- a/docs/html/_modules/index.html
+++ b/docs/html/_modules/index.html
@@ -8,7 +8,7 @@
-
Overview: module code — Lorax 32.4 documentation
+
Overview: module code — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/lifted/config.html b/docs/html/_modules/lifted/config.html
index 0b2fb925..7b9e98f9 100644
--- a/docs/html/_modules/lifted/config.html
+++ b/docs/html/_modules/lifted/config.html
@@ -8,7 +8,7 @@
-
lifted.config — Lorax 32.4 documentation
+
lifted.config — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/lifted/providers.html b/docs/html/_modules/lifted/providers.html
index 4469d1df..0794a2b6 100644
--- a/docs/html/_modules/lifted/providers.html
+++ b/docs/html/_modules/lifted/providers.html
@@ -8,7 +8,7 @@
-
lifted.providers — Lorax 32.4 documentation
+
lifted.providers — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/lifted/queue.html b/docs/html/_modules/lifted/queue.html
index 80497002..6c1efb56 100644
--- a/docs/html/_modules/lifted/queue.html
+++ b/docs/html/_modules/lifted/queue.html
@@ -8,7 +8,7 @@
-
lifted.queue — Lorax 32.4 documentation
+
lifted.queue — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/lifted/upload.html b/docs/html/_modules/lifted/upload.html
index f9453208..54433f9e 100644
--- a/docs/html/_modules/lifted/upload.html
+++ b/docs/html/_modules/lifted/upload.html
@@ -8,7 +8,7 @@
-
lifted.upload — Lorax 32.4 documentation
+
lifted.upload — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax.html b/docs/html/_modules/pylorax.html
index 5b825a6e..34be9b6e 100644
--- a/docs/html/_modules/pylorax.html
+++ b/docs/html/_modules/pylorax.html
@@ -8,7 +8,7 @@
-
pylorax — Lorax 32.4 documentation
+
pylorax — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/api/bisect.html b/docs/html/_modules/pylorax/api/bisect.html
index 38a153ae..d6d6d30f 100644
--- a/docs/html/_modules/pylorax/api/bisect.html
+++ b/docs/html/_modules/pylorax/api/bisect.html
@@ -8,7 +8,7 @@
-
pylorax.api.bisect — Lorax 32.4 documentation
+
pylorax.api.bisect — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/api/checkparams.html b/docs/html/_modules/pylorax/api/checkparams.html
index 076cc7a5..9a331193 100644
--- a/docs/html/_modules/pylorax/api/checkparams.html
+++ b/docs/html/_modules/pylorax/api/checkparams.html
@@ -8,7 +8,7 @@
-
pylorax.api.checkparams — Lorax 32.4 documentation
+
pylorax.api.checkparams — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/api/cmdline.html b/docs/html/_modules/pylorax/api/cmdline.html
index efc1e9f8..f5cad2f8 100644
--- a/docs/html/_modules/pylorax/api/cmdline.html
+++ b/docs/html/_modules/pylorax/api/cmdline.html
@@ -8,7 +8,7 @@
-
pylorax.api.cmdline — Lorax 32.4 documentation
+
pylorax.api.cmdline — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/api/compose.html b/docs/html/_modules/pylorax/api/compose.html
index 85d37c3e..6dec6a92 100644
--- a/docs/html/_modules/pylorax/api/compose.html
+++ b/docs/html/_modules/pylorax/api/compose.html
@@ -8,7 +8,7 @@
-
pylorax.api.compose — Lorax 32.4 documentation
+
pylorax.api.compose — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
@@ -1036,7 +1036,7 @@
disable_map = {
"arm" : [ "alibaba" , "ami" , "google" , "hyper-v" , "vhd" , "vmdk" ],
"armhfp" : [ "alibaba" , "ami" , "google" , "hyper-v" , "vhd" , "vmdk" ],
-
"aarch64" : [ "alibaba" , "ami" , "google" , "hyper-v" , "vhd" , "vmdk" ],
+
"aarch64" : [ "alibaba" , "google" , "hyper-v" , "vhd" , "vmdk" ],
"ppc" : [ "alibaba" , "ami" , "google" , "hyper-v" , "vhd" , "vmdk" ],
"ppc64" : [ "alibaba" , "ami" , "google" , "hyper-v" , "vhd" , "vmdk" ],
"ppc64le" : [ "alibaba" , "ami" , "google" , "hyper-v" , "vhd" , "vmdk" ],
diff --git a/docs/html/_modules/pylorax/api/config.html b/docs/html/_modules/pylorax/api/config.html
index 43b9b602..269c5e38 100644
--- a/docs/html/_modules/pylorax/api/config.html
+++ b/docs/html/_modules/pylorax/api/config.html
@@ -8,7 +8,7 @@
-
pylorax.api.config — Lorax 32.4 documentation
+
pylorax.api.config — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/api/dnfbase.html b/docs/html/_modules/pylorax/api/dnfbase.html
index f5f4a45a..7c33b8d7 100644
--- a/docs/html/_modules/pylorax/api/dnfbase.html
+++ b/docs/html/_modules/pylorax/api/dnfbase.html
@@ -8,7 +8,7 @@
-
pylorax.api.dnfbase — Lorax 32.4 documentation
+
pylorax.api.dnfbase — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/api/flask_blueprint.html b/docs/html/_modules/pylorax/api/flask_blueprint.html
index 2f8806be..4ae6d28c 100644
--- a/docs/html/_modules/pylorax/api/flask_blueprint.html
+++ b/docs/html/_modules/pylorax/api/flask_blueprint.html
@@ -8,7 +8,7 @@
-
pylorax.api.flask_blueprint — Lorax 32.4 documentation
+
pylorax.api.flask_blueprint — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/api/gitrpm.html b/docs/html/_modules/pylorax/api/gitrpm.html
index de939868..87146c13 100644
--- a/docs/html/_modules/pylorax/api/gitrpm.html
+++ b/docs/html/_modules/pylorax/api/gitrpm.html
@@ -8,7 +8,7 @@
-
pylorax.api.gitrpm — Lorax 32.4 documentation
+
pylorax.api.gitrpm — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/api/projects.html b/docs/html/_modules/pylorax/api/projects.html
index 28ca1542..2f230cf5 100644
--- a/docs/html/_modules/pylorax/api/projects.html
+++ b/docs/html/_modules/pylorax/api/projects.html
@@ -8,7 +8,7 @@
-
pylorax.api.projects — Lorax 32.4 documentation
+
pylorax.api.projects — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/api/queue.html b/docs/html/_modules/pylorax/api/queue.html
index 94b28e82..3fbbf649 100644
--- a/docs/html/_modules/pylorax/api/queue.html
+++ b/docs/html/_modules/pylorax/api/queue.html
@@ -8,7 +8,7 @@
-
pylorax.api.queue — Lorax 32.4 documentation
+
pylorax.api.queue — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
@@ -395,7 +395,9 @@
cfg_dict [ "lorax_templates" ] = find_templates ( cfg . share_dir )
cfg_dict [ "tmp" ] = cfg . tmp
-
cfg_dict [ "dracut_args" ] = None # Use default args for dracut
+
# Use default args for dracut
+
cfg_dict [ "dracut_conf" ] = None
+
cfg_dict [ "dracut_args" ] = None
# TODO How to support other arches?
cfg_dict [ "arch" ] = None
diff --git a/docs/html/_modules/pylorax/api/recipes.html b/docs/html/_modules/pylorax/api/recipes.html
index bdc0f39f..941a5906 100644
--- a/docs/html/_modules/pylorax/api/recipes.html
+++ b/docs/html/_modules/pylorax/api/recipes.html
@@ -8,7 +8,7 @@
-
pylorax.api.recipes — Lorax 32.4 documentation
+
pylorax.api.recipes — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
@@ -1203,11 +1203,9 @@
datetime = sig . get_time ()
# XXX What do we do with timezone?
_timezone = sig . get_time_zone ()
-
timeval = GLib . TimeVal ()
-
ok = datetime . to_timeval ( timeval )
-
if not ok :
+
time_str = datetime . format_iso8601 ()
+
if not time_str :
raise CommitTimeValError
-
time_str = timeval . to_iso8601 ()
return CommitDetails ( commit_str , time_str , message , revision )
diff --git a/docs/html/_modules/pylorax/api/server.html b/docs/html/_modules/pylorax/api/server.html
index 441fd8f4..25ad3883 100644
--- a/docs/html/_modules/pylorax/api/server.html
+++ b/docs/html/_modules/pylorax/api/server.html
@@ -8,7 +8,7 @@
[docs] def make_appliance ( disk_img , name , template , outfile , networks = None , ram = 1024 ,
vcpus = 1 , arch = None , title = "Linux" , project = "Linux" ,
@@ -382,15 +397,10 @@
:param str sys_root_dir: Path to root of the system
:param str results_dir: Path of directory for storing results
"""
-
if not opts . dracut_args :
-
dracut_args = DRACUT_DEFAULT
-
else :
-
dracut_args = []
-
for arg in opts . dracut_args :
-
dracut_args += arg . split ( " " , 1 )
-
log . info ( "dracut args = %s " , dracut_args )
+
# cmdline dracut args override the defaults, but need to be parsed
+
log . info ( "dracut args = %s " , dracut_args ( opts ))
-
dracut = [ "dracut" , "--nomdadmconf" , "--nolvmconf" ] + dracut_args
+
dracut = [ "dracut" , "--nomdadmconf" , "--nolvmconf" ] + dracut_args ( opts )
kdir = "boot"
if opts . ostree :
@@ -526,14 +536,8 @@
templatedir = joinpaths ( opts . lorax_templates , "live/" ),
extra_boot_args = opts . extra_boot_args )
log . info ( "Rebuilding initrds" )
-
if not opts . dracut_args :
-
dracut_args = DRACUT_DEFAULT
-
else :
-
dracut_args = []
-
for arg in opts . dracut_args :
-
dracut_args += arg . split ( " " , 1 )
-
log . info ( "dracut args = %s " , dracut_args )
-
tb . rebuild_initrds ( add_args = dracut_args )
+
log . info ( "dracut args = %s " , dracut_args ( opts ))
+
tb . rebuild_initrds ( add_args = dracut_args ( opts ))
log . info ( "Building boot.iso" )
tb . build ()
diff --git a/docs/html/_modules/pylorax/decorators.html b/docs/html/_modules/pylorax/decorators.html
index 5b8357bd..9db05ff5 100644
--- a/docs/html/_modules/pylorax/decorators.html
+++ b/docs/html/_modules/pylorax/decorators.html
@@ -8,7 +8,7 @@
-
pylorax.decorators — Lorax 32.4 documentation
+
pylorax.decorators — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/discinfo.html b/docs/html/_modules/pylorax/discinfo.html
index da5ae7f2..70850a4b 100644
--- a/docs/html/_modules/pylorax/discinfo.html
+++ b/docs/html/_modules/pylorax/discinfo.html
@@ -8,7 +8,7 @@
-
pylorax.discinfo — Lorax 32.4 documentation
+
pylorax.discinfo — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/dnfbase.html b/docs/html/_modules/pylorax/dnfbase.html
index 011c4734..f2d9d399 100644
--- a/docs/html/_modules/pylorax/dnfbase.html
+++ b/docs/html/_modules/pylorax/dnfbase.html
@@ -8,7 +8,7 @@
-
pylorax.dnfbase — Lorax 32.4 documentation
+
pylorax.dnfbase — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/dnfhelper.html b/docs/html/_modules/pylorax/dnfhelper.html
index d1e0bf40..6fedd00d 100644
--- a/docs/html/_modules/pylorax/dnfhelper.html
+++ b/docs/html/_modules/pylorax/dnfhelper.html
@@ -8,7 +8,7 @@
-
pylorax.dnfhelper — Lorax 32.4 documentation
+
pylorax.dnfhelper — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/executils.html b/docs/html/_modules/pylorax/executils.html
index 49c91979..57330ffa 100644
--- a/docs/html/_modules/pylorax/executils.html
+++ b/docs/html/_modules/pylorax/executils.html
@@ -8,7 +8,7 @@
-
pylorax.executils — Lorax 32.4 documentation
+
pylorax.executils — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
@@ -486,7 +486,7 @@
stderr = subprocess . STDOUT
try :
-
proc = startProgram ( argv , root = root , stdin = stdin , stdout = subprocess . PIPE , stderr = stderr , bufsize = 1 ,
+
proc = startProgram ( argv , root = root , stdin = stdin , stdout = subprocess . PIPE , stderr = stderr ,
env_prune = env_prune , env_add = env_add , reset_handlers = reset_handlers , reset_lang = reset_lang )
except OSError as e :
with program_log_lock :
diff --git a/docs/html/_modules/pylorax/imgutils.html b/docs/html/_modules/pylorax/imgutils.html
index 23666113..6f112f88 100644
--- a/docs/html/_modules/pylorax/imgutils.html
+++ b/docs/html/_modules/pylorax/imgutils.html
@@ -8,7 +8,7 @@
-
pylorax.imgutils — Lorax 32.4 documentation
+
pylorax.imgutils — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/installer.html b/docs/html/_modules/pylorax/installer.html
index 43894a61..46bcd144 100644
--- a/docs/html/_modules/pylorax/installer.html
+++ b/docs/html/_modules/pylorax/installer.html
@@ -8,7 +8,7 @@
-
pylorax.installer — Lorax 32.4 documentation
+
pylorax.installer — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
@@ -467,7 +467,17 @@
Attempts to cleanup may also fail. Catch these and continue trying the
other mountpoints.
+
+
Anaconda may also leave /run/anaconda.pid behind, clean that up as well.
"""
+
# Anaconda may not clean up its /var/run/anaconda.pid file
+
# Make sure the process is really finished (it should be, since it was started from a subprocess call)
+
# and then remove the pid file.
+
if os . path . exists ( "/var/run/anaconda.pid" ):
+
# lorax-composer runs anaconda using unshare so the pid is always 1
+
if open ( "/var/run/anaconda.pid" ) . read () . strip () == "1" :
+
os . unlink ( "/var/run/anaconda.pid" )
+
rc = True
dirinstall_path = os . path . abspath ( dirinstall_path )
# unmount filesystems
@@ -547,12 +557,14 @@
cancel_funcs . append ( cancel_func )
# Make sure anaconda has the right product and release
+
# Preload libgomp.so.1 to workaround rhbz#1722181
log . info ( "Running anaconda." )
try :
unshare_args = [ "--pid" , "--kill-child" , "--mount" , "--propagation" , "unchanged" , "anaconda" ] + args
for line in execReadlines ( "unshare" , unshare_args , reset_lang = False ,
env_add = { "ANACONDA_PRODUCTNAME" : opts . project ,
-
"ANACONDA_PRODUCTVERSION" : opts . releasever },
+
"ANACONDA_PRODUCTVERSION" : opts . releasever ,
+
"LD_PRELOAD" : "libgomp.so.1" },
callback = lambda p : not novirt_cancel_check ( cancel_funcs , p )):
log . info ( line )
diff --git a/docs/html/_modules/pylorax/ltmpl.html b/docs/html/_modules/pylorax/ltmpl.html
index c7758581..c9a3be45 100644
--- a/docs/html/_modules/pylorax/ltmpl.html
+++ b/docs/html/_modules/pylorax/ltmpl.html
@@ -8,7 +8,7 @@
-
pylorax.ltmpl — Lorax 32.4 documentation
+
pylorax.ltmpl — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
@@ -198,7 +198,7 @@
import sys , traceback
import struct
import dnf
-
import collections
+
import collections.abc
[docs] class LoraxTemplate ( object ):
def __init__ ( self , directories = None ):
@@ -322,7 +322,7 @@
try :
# grab the method named in cmd and pass it the given arguments
f = getattr ( self , cmd , None )
-
if cmd [ 0 ] == '_' or cmd == 'run' or not isinstance ( f , collections . Callable ):
+
if cmd [ 0 ] == '_' or cmd == 'run' or not isinstance ( f , collections . abc . Callable ):
raise ValueError ( "unknown command %s " % cmd )
f ( * args )
except Exception : # pylint: disable=broad-except
diff --git a/docs/html/_modules/pylorax/monitor.html b/docs/html/_modules/pylorax/monitor.html
index e8269388..233bbcfe 100644
--- a/docs/html/_modules/pylorax/monitor.html
+++ b/docs/html/_modules/pylorax/monitor.html
@@ -8,7 +8,7 @@
-
pylorax.monitor — Lorax 32.4 documentation
+
pylorax.monitor — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/mount.html b/docs/html/_modules/pylorax/mount.html
index dfe48197..899b3902 100644
--- a/docs/html/_modules/pylorax/mount.html
+++ b/docs/html/_modules/pylorax/mount.html
@@ -8,7 +8,7 @@
-
pylorax.mount — Lorax 32.4 documentation
+
pylorax.mount — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/sysutils.html b/docs/html/_modules/pylorax/sysutils.html
index ec0cfe47..15c82d1d 100644
--- a/docs/html/_modules/pylorax/sysutils.html
+++ b/docs/html/_modules/pylorax/sysutils.html
@@ -8,7 +8,7 @@
-
pylorax.sysutils — Lorax 32.4 documentation
+
pylorax.sysutils — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/treebuilder.html b/docs/html/_modules/pylorax/treebuilder.html
index dd5d1ef5..ce50b989 100644
--- a/docs/html/_modules/pylorax/treebuilder.html
+++ b/docs/html/_modules/pylorax/treebuilder.html
@@ -8,7 +8,7 @@
-
pylorax.treebuilder — Lorax 32.4 documentation
+
pylorax.treebuilder — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_modules/pylorax/treeinfo.html b/docs/html/_modules/pylorax/treeinfo.html
index 9c8aa20f..c32eacb2 100644
--- a/docs/html/_modules/pylorax/treeinfo.html
+++ b/docs/html/_modules/pylorax/treeinfo.html
@@ -8,7 +8,7 @@
-
pylorax.treeinfo — Lorax 32.4 documentation
+
pylorax.treeinfo — Lorax 32.5 documentation
@@ -58,7 +58,7 @@
- 32.4
+ 32.5
diff --git a/docs/html/_static/basic.css b/docs/html/_static/basic.css
index c41d718e..ea6972d5 100644
--- a/docs/html/_static/basic.css
+++ b/docs/html/_static/basic.css
@@ -520,14 +520,15 @@ dl.citation > dd:after {
}
dl.field-list {
- display: flex;
- flex-wrap: wrap;
+ display: grid;
+ grid-template-columns: fit-content(30%) auto;
}
dl.field-list > dt {
- flex-basis: 20%;
font-weight: bold;
word-break: break-word;
+ padding-left: 0.5em;
+ padding-right: 5px;
}
dl.field-list > dt:after {
@@ -535,8 +536,8 @@ dl.field-list > dt:after {
}
dl.field-list > dd {
- flex-basis: 70%;
- padding-left: 1em;
+ padding-left: 0.5em;
+ margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}
diff --git a/docs/html/_static/documentation_options.js b/docs/html/_static/documentation_options.js
index 33703de6..43103ca7 100644
--- a/docs/html/_static/documentation_options.js
+++ b/docs/html/_static/documentation_options.js
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
- VERSION: '32.4',
+ VERSION: '32.5',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
diff --git a/docs/html/_static/jquery-3.2.1.js b/docs/html/_static/jquery-3.4.1.js
similarity index 89%
rename from docs/html/_static/jquery-3.2.1.js
rename to docs/html/_static/jquery-3.4.1.js
index d2d8ca47..773ad95c 100644
--- a/docs/html/_static/jquery-3.2.1.js
+++ b/docs/html/_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 = /