diff --git a/.github/workflows/rituals.yaml b/.github/workflows/rituals.yaml index c36b5f7976..408dfabf85 100644 --- a/.github/workflows/rituals.yaml +++ b/.github/workflows/rituals.yaml @@ -169,5 +169,4 @@ jobs: # Execute after pushing, as no updated files will be produced - name: Test TypeScript code run: | - cd srcts yarn test diff --git a/DESCRIPTION b/DESCRIPTION index 71ee20505e..8673684b69 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: shiny Type: Package Title: Web Application Framework for R -Version: 1.6.0.9021 +Version: 1.6.0.9022 Authors@R: c( person("Winston", "Chang", role = c("aut", "cre"), email = "winston@rstudio.com", comment = c(ORCID = "0000-0002-1576-2126")), person("Joe", "Cheng", role = "aut", email = "joe@rstudio.com"), diff --git a/NAMESPACE b/NAMESPACE index a9b48ab3a8..d8a9104926 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -273,6 +273,7 @@ export(stopApp) export(strong) export(submitButton) export(suppressDependencies) +export(sustainEnvAndQuoted) export(tabPanel) export(tabPanelBody) export(tableOutput) @@ -378,6 +379,7 @@ importFrom(htmltools,tags) importFrom(htmltools,validateCssUnit) importFrom(htmltools,withTags) importFrom(lifecycle,deprecated) +importFrom(lifecycle,is_present) importFrom(promises,"%...!%") importFrom(promises,"%...>%") importFrom(promises,as.promise) @@ -386,10 +388,13 @@ importFrom(promises,promise) importFrom(promises,promise_reject) importFrom(promises,promise_resolve) importFrom(rlang,"%||%") +importFrom(rlang,"fn_body<-") +importFrom(rlang,"fn_fmls<-") importFrom(rlang,as_function) importFrom(rlang,as_quosure) importFrom(rlang,enexpr) importFrom(rlang,enquo) +importFrom(rlang,enquo0) importFrom(rlang,enquos) importFrom(rlang,enquos0) importFrom(rlang,eval_tidy) @@ -408,4 +413,8 @@ importFrom(rlang,new_function) importFrom(rlang,new_quosure) importFrom(rlang,pairlist2) importFrom(rlang,quo) +importFrom(rlang,quo_get_expr) +importFrom(rlang,quo_is_missing) +importFrom(rlang,quo_set_env) +importFrom(rlang,quo_set_expr) importFrom(rlang,zap_srcref) diff --git a/NEWS.md b/NEWS.md index 98b1ae43ad..e747cdf0e8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,7 +1,3 @@ -Addresses #2521: Updated the list of TCP ports that will [be rejected](https://chromium.googlesource.com/chromium/src.git/+/refs/heads/main/net/base/port_util.cc) -by default in runapp.R, adding 5060, 5061 and 6566. Added documentation describing the port range (3000:8000) -and which ports are rejected. - shiny 1.6.0.9000 ================ @@ -21,13 +17,17 @@ shiny 1.6.0.9000 * Closed #3322, #3313, #1823, #3321, #3320, #1928, and #2310: Various improvements to `navbarPage()`, `tabsetPanel()`, `tabPanel()`, `navbarMenu()`, etc. Also, these functions are now powered by the `{bslib}` package's new `nav()` API (consider using `{bslib}`'s API to create better looking and more fully featured navs). (#3388) * All uses of `list(...)` have been replaced with `rlang::list2(...)`. This means that you can use trailing `,` without error and use rlang's `!!!` operator to "splice" a list of argument values into `...`. We think this'll be particularly useful for passing a list of `tabPanel()` to their consumers (i.e., `tabsetPanel()`, `navbarPage()`, etc). For example, `tabs <- list(tabPanel("A", "a"), tabPanel("B", "b")); navbarPage(!!!tabs)`. (#3315 and #3328) - + +* `installExprFunction()` and `exprToFunction()` are now able to handle quosures, so `render`-functions which call these functions can now understand quosures, when they are called using `rlang::inject()`. This also means that `render` function no longer need `env` and `quoted` parameters; that information can be embedded into a quosure which is then passed to the `render` function. Additionally, the `getQuosure()` function was added, which makes it easier for developers to create `render` functions which understand quosures. Better documentation was added for how to create `render` functions. (#3462, #3466) + * `icon(lib="fontawesome")` is now powered by the `{fontawesome}` package, which will make it easier to use the latest FA icons in the future (by updating the `{fontawesome}` package). (#3302) * Closed #3397: `renderPlot()` new uses `ggplot2::get_alt_text()` to inform an `alt` text default (for `{ggplot2}` plots). (#3398) * `modalDialog()` gains support for `size = "xl"`. (#3410) +* Addressed #2521: Updated the list of TCP ports that will be rejected by default in runapp.R, adding 5060, 5061 and 6566. Added documentation describing the port range (3000:8000) and which ports are rejected. (#3456) + ### Other improvements * Shiny's core JavaScript code was converted to TypeScript. For the latest development information, please see the [README.md in `./srcts`](https://github.com/rstudio/shiny/tree/master/srcts). (#3296) @@ -42,6 +42,8 @@ shiny 1.6.0.9000 * Closed #3345: Shiny now correctly renders `htmltools::htmlDependency()`(s) with a `list()` of `script` attributes when used in a dynamic UI context. This fairly new `htmlDependency()` feature was added in `{htmltools}` v0.5.1. (#3395) +* Fixed [#2666](https://github.com/rstudio/shiny/issues/2666) and [#2670](https://github.com/rstudio/shiny/issues/2670): `nearPoints()` and `brushedPoints()` weren't properly account for missing values (#2666 was introduced in v1.4.0). ([#2668](https://github.com/rstudio/shiny/pull/2668)) + * Closed #3374: `quoToFunction()` now works correctly with nested quosures; and as a result, quasi-quotation with rendering function (e.g., `renderPrint()`, `renderPlot()`, etc) now works as expected with nested quosures. (#3373) * Exported `register_devmode_option()`. This method was described in the documentation for `devmode()` but was never exported. See `?devmode()` for more details on how to register Shiny Developer options using `register_devmode_option()`. (#3364) diff --git a/R/deprecated.R b/R/deprecated.R index faf99d55fb..92f58674cb 100644 --- a/R/deprecated.R +++ b/R/deprecated.R @@ -9,13 +9,19 @@ #' @param details Additional information to be added after a new line to the displayed message #' @keywords internal shinyDeprecated <- function( - version, what, with = NULL, details = NULL + version, + what, + with = NULL, + details = NULL, + type = c("deprecated", "superseded") ) { if (is_false(getOption("shiny.deprecation.messages"))) { return(invisible()) } - msg <- paste0("`", what, "` is deprecated as of shiny ", version, ".") + type <- match.arg(type) + + msg <- paste0("`", what, "` is ", type, " as of shiny ", version, ".") if (!is.null(with)) { msg <- paste0(msg, "\n", "Please use `", with, "` instead.") } @@ -60,7 +66,7 @@ diskCache <- function( logfile = NULL ) { shinyDeprecated("1.6.0", "diskCache()", "cachem::cache_disk()") - if (lifecycle::is_present(exec_missing)) { + if (is_present(exec_missing)) { shinyDeprecated("1.6.0", "diskCache(exec_missing =)") } @@ -93,7 +99,7 @@ memoryCache <- function( logfile = NULL) { shinyDeprecated("1.6.0", "diskCache()", "cachem::cache_mem()") - if (lifecycle::is_present(exec_missing)) { + if (is_present(exec_missing)) { shinyDeprecated("1.6.0", "diskCache(exec_missing =)") } diff --git a/R/image-interact.R b/R/image-interact.R index 460809888e..fd7d868cf8 100644 --- a/R/image-interact.R +++ b/R/image-interact.R @@ -267,6 +267,7 @@ nearPoints <- function(df, coordinfo, xvar = NULL, yvar = NULL, stop("nearPoints: `yvar` ('", yvar ,"') not in names of input") # Extract data values from the data frame + coordinfo <- fortifyDiscreteLimits(coordinfo) x <- asNumber(df[[xvar]], coordinfo$domain$discrete_limits$x) y <- asNumber(df[[yvar]], coordinfo$domain$discrete_limits$y) @@ -392,6 +393,7 @@ nearPoints <- function(df, coordinfo, xvar = NULL, yvar = NULL, # an input brush within_brush <- function(vals, brush, var = "x") { var <- match.arg(var, c("x", "y")) + brush <- fortifyDiscreteLimits(brush) vals <- asNumber(vals, brush$domain$discrete_limits[[var]]) # It's possible for a non-missing data values to not # map to the axis limits, for example: @@ -414,11 +416,43 @@ asNumber <- function(x, levels = NULL) { as.numeric(x) } +# Ensure the discrete limits/levels of a coordmap received +# from the client matches the data structure sent the client. +# +# When we construct the coordmap (in getGgplotCoordmap()), +# we save a character vector which may contain missing values +# (e.g., c("a", "b", NA)). When that same character is received +# from the client, it runs through decodeMessage() which sets +# simplifyVector=FALSE, which means NA are replaced by NULL +# (because jsonlite::fromJSON('["a", "b", null]') -> list("a", "b", NULL)) +# +# Thankfully, it doesn't seem like it's meaningful for limits to +# contains a NULL in the 1st place, so we simply treat NULL like NA. +# For more context, https://github.com/rstudio/shiny/issues/2666 +fortifyDiscreteLimits <- function(coord) { + # Note that discrete_limits$x/y are populated iff + # x/y are discrete mappings + coord$domain$discrete_limits <- lapply( + coord$domain$discrete_limits, + function(var) { + # if there is an 'explicit' NULL, then the limits are NA + if (is.null(var)) return(NA) + vapply(var, function(x) { + if (is.null(x) || isTRUE(is.na(x))) NA_character_ else x + }, character(1)) + } + ) + coord +} + + + # Given a panelvar value and a vector x, return logical vector indicating which # items match the panelvar value. Because the panelvar value is always a # string but the vector could be numeric, it might be necessary to coerce the # panelvar to a number before comparing to the vector. panelMatch <- function(search_value, x) { + if (is.null(search_value)) return(is.na(x)) if (is.numeric(x)) search_value <- as.numeric(search_value) x == search_value } diff --git a/R/map.R b/R/map.R index f2c25e26e8..297a648896 100644 --- a/R/map.R +++ b/R/map.R @@ -1,4 +1,3 @@ -#' @importFrom fastmap fastmap Map <- R6Class( 'Map', portable = FALSE, diff --git a/R/reactives.R b/R/reactives.R index 573bec2213..3840cda45f 100644 --- a/R/reactives.R +++ b/R/reactives.R @@ -945,12 +945,12 @@ Observable <- R6Class( #' See the [Shiny tutorial](https://shiny.rstudio.com/tutorial/) for #' more information about reactive expressions. #' -#' @param x For `reactive`, an expression (quoted or unquoted). For +#' @param x TODO-barret docs; For `reactive`, an expression (quoted or unquoted). For #' `is.reactive`, an object to test. -#' @param env The parent environment for the reactive expression. By default, +#' @param env TODO-barret docs; The parent environment for the reactive expression. By default, #' this is the calling environment, the same as when defining an ordinary #' non-reactive expression. -#' @param quoted Is the expression quoted? By default, this is `FALSE`. +#' @param quoted TODO-barret docs; Is the expression quoted? By default, this is `FALSE`. #' This is useful when you want to use an expression that is stored in a #' variable; to do so, it must be quoted with `quote()`. #' @param label A label for the reactive expression, useful for debugging. @@ -961,6 +961,7 @@ Observable <- R6Class( #' @return a function, wrapped in a S3 class "reactive" #' #' @examples +#' # TODO-barret docs; with quosures, not env / quoted #' values <- reactiveValues(A=1) #' #' reactiveB <- reactive({ @@ -979,7 +980,10 @@ Observable <- R6Class( #' isolate(reactiveC()) #' isolate(reactiveD()) #' @export -reactive <- function(x, env = parent.frame(), quoted = FALSE, +reactive <- function( + x, + env = deprecated(), + quoted = deprecated(), ..., label = NULL, domain = getDefaultReactiveDomain(), @@ -987,20 +991,19 @@ reactive <- function(x, env = parent.frame(), quoted = FALSE, { check_dots_empty() - x <- get_quosure(x, env, quoted) - fun <- as_function(x) - # as_function returns a function that takes `...`. We need one that takes no - # args. - formals(fun) <- list() + q <- enquo0(x) + q <- sustainEnvAndQuotedInternal(q, x, env, quoted) + fun <- quoToSimpleFunction(q) # Attach a label and a reference to the original user source for debugging - label <- exprToLabel(get_expr(x), "reactive", label) + q_expr <- quo_get_expr(q) + label <- exprToLabel(q_expr, "reactive", label) o <- Observable$new(fun, label, domain, ..stacktraceon = ..stacktraceon) structure( o$getValue, observable = o, - cacheHint = list(userExpr = zap_srcref(get_expr(x))), + cacheHint = list(userExpr = zap_srcref(q_expr)), class = c("reactiveExpr", "reactive", "function") ) } @@ -1325,10 +1328,10 @@ Observer <- R6Class( #' #' @param x An expression (quoted or unquoted). Any return value will be #' ignored. -#' @param env The parent environment for the reactive expression. By default, +#' @param env TODO-barret docs; The parent environment for the reactive expression. By default, #' this is the calling environment, the same as when defining an ordinary #' non-reactive expression. -#' @param quoted Is the expression quoted? By default, this is `FALSE`. +#' @param quoted TODO-barret docs; Is the expression quoted? By default, this is `FALSE`. #' This is useful when you want to use an expression that is stored in a #' variable; to do so, it must be quoted with `quote()`. #' @param label A label for the observer, useful for debugging. @@ -1383,6 +1386,7 @@ Observer <- R6Class( #' } #' #' @examples +#' # TODO-barret docs; examples are outdated #' values <- reactiveValues(A=1) #' #' obsB <- observe({ @@ -1400,7 +1404,10 @@ Observer <- R6Class( #' # are at the console, you can force a flush with flushReact() #' shiny:::flushReact() #' @export -observe <- function(x, env = parent.frame(), quoted = FALSE, +observe <- function( + x, + env = deprecated(), + quoted = deprecated(), ..., label = NULL, suspended = FALSE, @@ -1411,14 +1418,12 @@ observe <- function(x, env = parent.frame(), quoted = FALSE, { check_dots_empty() - x <- get_quosure(x, env, quoted) - fun <- as_function(x) - # as_function returns a function that takes `...`. We need one that takes no - # args. - formals(fun) <- list() + q <- enquo0(x) + q <- sustainEnvAndQuotedInternal(q, x, env, quoted) + fun <- quoToSimpleFunction(q) if (is.null(label)) { - label <- sprintf('observe(%s)', paste(deparse(get_expr(x)), collapse='\n')) + label <- sprintf('observe(%s)', paste(deparse(quo_get_expr(q)), collapse='\n')) } o <- Observer$new( @@ -2146,17 +2151,17 @@ maskReactiveContext <- function(expr) { #' scope. #' @param event.env The parent environment for `eventExpr`. By default, #' this is the calling environment. -#' @param event.quoted Is the `eventExpr` expression quoted? By default, +#' @param event.quoted TODO-barret docs; Is the `eventExpr` expression quoted? By default, #' this is `FALSE`. This is useful when you want to use an expression #' that is stored in a variable; to do so, it must be quoted with #' `quote()`. -#' @param handler.env The parent environment for `handlerExpr`. By default, +#' @param handler.env TODO-barret docs; The parent environment for `handlerExpr`. By default, #' this is the calling environment. -#' @param handler.quoted Is the `handlerExpr` expression quoted? By +#' @param handler.quoted TODO-barret docs; Is the `handlerExpr` expression quoted? By #' default, this is `FALSE`. This is useful when you want to use an #' expression that is stored in a variable; to do so, it must be quoted with #' `quote()`. -#' @param value.env The parent environment for `valueExpr`. By default, +#' @param value.env TODO-barret docs; The parent environment for `valueExpr`. By default, #' this is the calling environment. #' @param value.quoted Is the `valueExpr` expression quoted? By default, #' this is `FALSE`. This is useful when you want to use an expression @@ -2265,8 +2270,8 @@ maskReactiveContext <- function(expr) { #' } #' @export observeEvent <- function(eventExpr, handlerExpr, - event.env = parent.frame(), event.quoted = FALSE, - handler.env = parent.frame(), handler.quoted = FALSE, + event.env = deprecated(), event.quoted = deprecated(), + handler.env = deprecated(), handler.quoted = deprecated(), ..., label = NULL, suspended = FALSE, priority = 0, domain = getDefaultReactiveDomain(), autoDestroy = TRUE, @@ -2274,15 +2279,17 @@ observeEvent <- function(eventExpr, handlerExpr, { check_dots_empty() - eventExpr <- get_quosure(eventExpr, event.env, event.quoted) - handlerExpr <- get_quosure(handlerExpr, handler.env, handler.quoted) + eventQ <- enquo0(eventExpr) + handlerQ <- enquo0(handlerExpr) + eventQ <- sustainEnvAndQuotedInternal(eventQ, eventExpr, event.env, event.quoted) + handlerQ <- sustainEnvAndQuotedInternal(handlerQ, handlerExpr, handler.env, handler.quoted) if (is.null(label)) { - label <- sprintf('observeEvent(%s)', paste(deparse(get_expr(eventExpr)), collapse='\n')) + label <- sprintf('observeEvent(%s)', paste(deparse(get_expr(eventQ)), collapse='\n')) } handler <- inject(observe( - !!handlerExpr, + !!handlerQ, label = label, suspended = suspended, priority = priority, @@ -2296,7 +2303,7 @@ observeEvent <- function(eventExpr, handlerExpr, ignoreInit = ignoreInit, once = once, label = label, - !!eventExpr, + !!eventQ, x = handler )) @@ -2306,27 +2313,29 @@ observeEvent <- function(eventExpr, handlerExpr, #' @rdname observeEvent #' @export eventReactive <- function(eventExpr, valueExpr, - event.env = parent.frame(), event.quoted = FALSE, - value.env = parent.frame(), value.quoted = FALSE, + event.env = deprecated(), event.quoted = deprecated(), + value.env = deprecated(), value.quoted = deprecated(), ..., label = NULL, domain = getDefaultReactiveDomain(), ignoreNULL = TRUE, ignoreInit = FALSE) { check_dots_empty() - eventExpr <- get_quosure(eventExpr, event.env, event.quoted) - valueExpr <- get_quosure(valueExpr, value.env, value.quoted) + eventQ <- enquo0(eventExpr) + valueQ <- enquo0(valueExpr) + eventQ <- sustainEnvAndQuotedInternal(eventQ, eventExpr, event.env, event.quoted) + valueQ <- sustainEnvAndQuotedInternal(valueQ, valueExpr, value.env, value.quoted) if (is.null(label)) { - label <- sprintf('eventReactive(%s)', paste(deparse(get_expr(eventExpr)), collapse='\n')) + label <- sprintf('eventReactive(%s)', paste(deparse(get_expr(eventQ)), collapse='\n')) } invisible(inject(bindEvent( ignoreNULL = ignoreNULL, ignoreInit = ignoreInit, label = label, - !!eventExpr, - x = reactive(!!valueExpr, domain = domain, label = label) + !!eventQ, + x = reactive(!!valueQ, domain = domain, label = label) ))) } diff --git a/R/render-plot.R b/R/render-plot.R index 7b36931a53..0815f41fb2 100644 --- a/R/render-plot.R +++ b/R/render-plot.R @@ -46,8 +46,8 @@ #' decorative images. #' @param ... Arguments to be passed through to [grDevices::png()]. #' These can be used to set the width, height, background color, etc. -#' @param env The environment in which to evaluate `expr`. -#' @param quoted Is `expr` a quoted expression (with `quote()`)? This +#' @param env TODO-barret docs; The environment in which to evaluate `expr`. +#' @param quoted TODO-barret docs; Is `expr` a quoted expression (with `quote()`)? This #' is useful if you want to save an expression in a variable. #' @param execOnResize If `FALSE` (the default), then when a plot is #' resized, Shiny will *replay* the plot drawing commands with @@ -61,14 +61,15 @@ #' @export renderPlot <- function(expr, width = 'auto', height = 'auto', res = 72, ..., alt = NA, - env = parent.frame(), quoted = FALSE, + env = deprecated(), quoted = deprecated(), execOnResize = FALSE, outputArgs = list() ) { - expr <- get_quosure(expr, env, quoted) + q <- enquo0(expr) + q <- sustainEnvAndQuotedInternal(q, expr, env, quoted) # This ..stacktraceon is matched by a ..stacktraceoff.. when plotFunc # is called - func <- quoToFunction(expr, "renderPlot", ..stacktraceon = TRUE) + func <- quoToFunction(q, "renderPlot", ..stacktraceon = TRUE) args <- list(...) @@ -186,7 +187,7 @@ renderPlot <- function(expr, width = 'auto', height = 'auto', res = 72, ..., outputFunc, renderFunc, outputArgs, - cacheHint = list(userExpr = get_expr(expr), res = res) + cacheHint = list(userExpr = get_expr(q), res = res) ) class(markedFunc) <- c("shiny.renderPlot", class(markedFunc)) markedFunc diff --git a/R/render-table.R b/R/render-table.R index 01a86d242b..e2566fa2a5 100644 --- a/R/render-table.R +++ b/R/render-table.R @@ -42,8 +42,8 @@ #' (i.e. they either evaluate to `NA` or `NaN`). #' @param ... Arguments to be passed through to [xtable::xtable()] #' and [xtable::print.xtable()]. -#' @param env The environment in which to evaluate `expr`. -#' @param quoted Is `expr` a quoted expression (with `quote()`)? +#' @param env TODO-barret docs; The environment in which to evaluate `expr`. +#' @param quoted TODO-barret docs; Is `expr` a quoted expression (with `quote()`)? #' This is useful if you want to save an expression in a variable. #' @param outputArgs A list of arguments to be passed through to the #' implicit call to [tableOutput()] when `renderTable` is @@ -71,11 +71,12 @@ renderTable <- function(expr, striped = FALSE, hover = FALSE, width = "auto", align = NULL, rownames = FALSE, colnames = TRUE, digits = NULL, na = "NA", ..., - env = parent.frame(), quoted = FALSE, + env = deprecated(), quoted = deprecated(), outputArgs=list()) { - expr <- get_quosure(expr, env, quoted) - func <- quoToFunction(expr, "renderTable") + q <- enquo0(expr) + q <- sustainEnvAndQuotedInternal(q, expr, env, quoted) + func <- quoToFunction(q, "renderTable") if (!is.function(spacing)) spacing <- match.arg(spacing) diff --git a/R/shiny-package.R b/R/shiny-package.R index 63d03affda..5c6b8611d3 100644 --- a/R/shiny-package.R +++ b/R/shiny-package.R @@ -2,7 +2,7 @@ ## usethis namespace: start ## usethis namespace: end -#' @importFrom lifecycle deprecated +#' @importFrom lifecycle deprecated is_present #' @importFrom grDevices dev.set dev.cur #' @importFrom fastmap fastmap #' @importFrom promises %...!% @@ -11,11 +11,13 @@ #' promise promise_resolve promise_reject is.promising #' as.promise #' @importFrom rlang -#' quo enquo as_function get_expr get_env new_function enquos +#' quo enquo enquo0 as_function get_expr get_env new_function enquos #' eval_tidy expr pairlist2 new_quosure enexpr as_quosure is_quosure inject +#' quo_set_env quo_set_expr quo_get_expr #' enquos0 zap_srcref %||% is_na #' is_false list2 #' missing_arg is_missing maybe_missing +#' quo_is_missing fn_fmls<- fn_body<- #' @importFrom ellipsis #' check_dots_empty check_dots_unnamed #' @import htmltools diff --git a/R/shinywrappers.R b/R/shinywrappers.R index d8c276b029..10e6319c94 100644 --- a/R/shinywrappers.R +++ b/R/shinywrappers.R @@ -8,6 +8,12 @@ utils::globalVariables('func', add = TRUE) #' function. This can be used in R Markdown documents to create complete output #' widgets out of just the render function. #' +#' Note that it is generally preferable to use [createRenderFunction()] instead +#' of `markRenderFunction()`. It essentially wraps up the user-provided +#' expression in the `transform` function passed to it, then pases the resulting +#' function to `markRenderFunction()`. It also provides a simpler calling +#' interface. +#' #' @param uiFunc A function that renders Shiny UI. Must take a single argument: #' an output ID. #' @param renderFunc A function that is suitable for assigning to a Shiny output @@ -136,7 +142,8 @@ print.shiny.render.function <- function(x, ...) { #' Implement render functions #' #' This function is a wrapper for [markRenderFunction()] which provides support -#' for async computation via promises. +#' for async computation via promises. It is recommended to use +#' `createRenderFunction()` instead of `markRenderFunction()`. #' #' @param func A function without parameters, that returns user data. If the #' returned value is a promise, then the render function will proceed in async @@ -153,16 +160,12 @@ print.shiny.render.function <- function(x, ...) { #' @return An annotated render function, ready to be assigned to an #' `output` slot. #' -#' @seealso [quoToFunction()], [markRenderFunction()]. +#' @seealso [quoToFunction()], [markRenderFunction()], [rlang::enquo()]. #' #' @examples #' # A very simple render function -#' renderTriple <- function(x) { -#' x <- substitute(x) -#' if (!rlang::is_quosure(x)) { -#' x <- rlang::new_quosure(x, env = parent.frame()) -#' } -#' func <- quoToFunction(x, "renderTriple") +#' renderTriple <- function(expr) { +#' func <- quoToFunction(rlang::enquo0(expr)) #' #' createRenderFunction( #' func, @@ -175,9 +178,10 @@ print.shiny.render.function <- function(x, ...) { #' #' # Test render function from the console #' a <- 1 -#' r <- renderTriple({ a + 1 }) +#' r <- renderTriple({ a * 10 }) #' a <- 2 #' r() +#' # [1] "20, 20, 20" #' @export createRenderFunction <- function( func, @@ -316,8 +320,8 @@ markOutputAttrs <- function(renderFunc, snapshotExclude = NULL, #' the output, see [plotPNG()]. #' #' @param expr An expression that returns a list. -#' @param env The environment in which to evaluate `expr`. -#' @param quoted Is `expr` a quoted expression (with `quote()`)? This +#' @param env TODO-barret docs; The environment in which to evaluate `expr`. +#' @param quoted TODO-barret docs; Is `expr` a quoted expression (with `quote()`)? This #' is useful if you want to save an expression in a variable. #' @param deleteFile Should the file in `func()$src` be deleted after #' it is sent to the client browser? Generally speaking, if the image is a @@ -397,11 +401,12 @@ markOutputAttrs <- function(renderFunc, snapshotExclude = NULL, #' #' shinyApp(ui, server) #' } -renderImage <- function(expr, env=parent.frame(), quoted=FALSE, +renderImage <- function(expr, env = deprecated(), quoted = deprecated(), deleteFile, outputArgs=list()) { - expr <- get_quosure(expr, env, quoted) - func <- quoToFunction(expr, "renderImage") + q <- enquo0(expr) + q <- sustainEnvAndQuotedInternal(q, expr, env, quoted) + func <- quoToFunction(q, "renderImage") # missing() must be used directly within the function with the given arg if (missing(deleteFile)) { @@ -523,8 +528,8 @@ isTemp <- function(path, tempDir = tempdir(), mustExist) { #' function return [invisible()]. #' #' @param expr An expression to evaluate. -#' @param env The environment in which to evaluate `expr`. For expert use only. -#' @param quoted Is `expr` a quoted expression (with `quote()`)? This +#' @param env TODO-barret docs; The environment in which to evaluate `expr`. For expert use only. +#' @param quoted TODO-barret docs; Is `expr` a quoted expression (with `quote()`)? This #' is useful if you want to save an expression in a variable. #' @param width Width of printed output. #' @param outputArgs A list of arguments to be passed through to the implicit @@ -533,11 +538,12 @@ isTemp <- function(path, tempDir = tempdir(), mustExist) { #' #' @example res/text-example.R #' @export -renderPrint <- function(expr, env = parent.frame(), quoted = FALSE, +renderPrint <- function(expr, env = deprecated(), quoted = deprecated(), width = getOption('width'), outputArgs=list()) { - expr <- get_quosure(expr, env, quoted) - func <- quoToFunction(expr, "renderPrint") + q <- enquo0(expr) + q <- sustainEnvAndQuotedInternal(q, expr, env, quoted) + func <- quoToFunction(q, "renderPrint") # Set a promise domain that sets the console width # and captures output @@ -569,7 +575,7 @@ renderPrint <- function(expr, env = parent.frame(), quoted = FALSE, outputArgs, cacheHint = list( label = "renderPrint", - origUserExpr = get_expr(expr) + origUserExpr = get_expr(q) ) ) } @@ -619,11 +625,12 @@ createRenderPrintPromiseDomain <- function(width) { #' element. #' @export #' @rdname renderPrint -renderText <- function(expr, env=parent.frame(), quoted=FALSE, +renderText <- function(expr, env = deprecated(), quoted = deprecated(), outputArgs=list(), sep=" ") { - expr <- get_quosure(expr, env, quoted) - func <- quoToFunction(expr, "renderText") + q <- enquo0(expr) + q <- sustainEnvAndQuotedInternal(q, expr, env, quoted) + func <- quoToFunction(q, "renderText") createRenderFunction( func, @@ -644,8 +651,8 @@ renderText <- function(expr, env=parent.frame(), quoted=FALSE, #' #' @param expr An expression that returns a Shiny tag object, [HTML()], #' or a list of such objects. -#' @param env The environment in which to evaluate `expr`. -#' @param quoted Is `expr` a quoted expression (with `quote()`)? This +#' @param env TODO-barret docs; The environment in which to evaluate `expr`. +#' @param quoted TODO-barret docs; Is `expr` a quoted expression (with `quote()`)? This #' is useful if you want to save an expression in a variable. #' @param outputArgs A list of arguments to be passed through to the implicit #' call to [uiOutput()] when `renderUI` is used in an @@ -672,11 +679,12 @@ renderText <- function(expr, env=parent.frame(), quoted=FALSE, #' shinyApp(ui, server) #' } #' -renderUI <- function(expr, env = parent.frame(), quoted = FALSE, +renderUI <- function(expr, env = deprecated(), quoted = deprecated(), outputArgs = list()) { - expr <- get_quosure(expr, env, quoted) - func <- quoToFunction(expr, "renderUI") + q <- enquo0(expr) + q <- sustainEnvAndQuotedInternal(q, expr, env, quoted) + func <- quoToFunction(q, "renderUI") createRenderFunction( func, @@ -755,6 +763,8 @@ downloadHandler <- function(filename, content, contentType=NA, outputArgs=list() #' Table output with the JavaScript DataTables library #' #' @description +#' `r lifecycle::badge("superseded")` Please use [`DT::renderDataTable()`]. (Shiny 0.11.1) +#' #' Makes a reactive version of the given function that returns a data frame (or #' matrix), which will be rendered with the [DataTables](https://datatables.net) #' library. Paging, searching, filtering, and sorting can be done on the R side @@ -818,7 +828,7 @@ downloadHandler <- function(filename, content, contentType=NA, outputArgs=list() #' } renderDataTable <- function(expr, options = NULL, searchDelay = 500, callback = 'function(oTable) {}', escape = TRUE, - env = parent.frame(), quoted = FALSE, + env = deprecated(), quoted = deprecated(), outputArgs=list()) { @@ -829,8 +839,9 @@ renderDataTable <- function(expr, options = NULL, searchDelay = 500, ) } - expr <- get_quosure(expr, env, quoted) - func <- quoToFunction(expr, "renderDataTable") + q <- enquo0(expr) + q <- sustainEnvAndQuotedInternal(q, expr, env, quoted) + func <- quoToFunction(q, "renderDataTable") renderFunc <- function(shinysession, name, ...) { if (is.function(options)) options <- options() diff --git a/R/utils-lang.R b/R/utils-lang.R index 2237a90ee3..3cf6f4915d 100644 --- a/R/utils-lang.R +++ b/R/utils-lang.R @@ -51,60 +51,463 @@ formalsAndBody <- function(x) { } -# This function is to be called from functions like `reactive()`, `observe()`, +#' Convert a quosure to a function for a Shiny render function +#' +#' This takes a quosure and label, and wraps them into a function that should be +#' passed to [createRenderFunction()] or [markRenderFunction()]. +#' +#' This function was added in Shiny 1.6.0. Previously, it was recommended to use +#' [installExprFunction()] or [exprToFunction()] in render functions, but now we +#' recommend using [quoToFunction()], because it does not require `env` and +#' `quoted` arguments -- that information is captured by quosures provided by +#' \pkg{rlang}. +#' +#' @param q A quosure. +#' @inheritParams installExprFunction +#' @seealso [createRenderFunction()] for example usage. +#' +#' @export +quoToFunction <- function(q, + label = sys.call(-1)[[1]], + ..stacktraceon = FALSE) +{ + q <- as_quosure(q) + func <- quoToSimpleFunction(q) + wrapFunctionLabel(func, updateFunctionLabel(label), ..stacktraceon = ..stacktraceon) +} +updateFunctionLabel <- function(label) { + # browser() + if (all(is.language(label))) { + # Prevent immediately invoked functions like as.language(a()()) + if (is.language(label) && length(label) > 1) { + return("wrappedFunction") + } + label <- deparse(label, width.cutoff = 500L) + } + label <- as.character(label) + # Prevent function calls that are over one line; (Assignments are hard to perform) + # Prevent immediately invoked functions like "a()()" + if (length(label) > 1 || grepl("(", label, fixed = TRUE)) { + return("wrappedFunction") + } + if (label == "NULL") { + return("wrappedFunction") + } + label +} + +quoToSimpleFunction <- function(q) { + # Should not use `new_function(list(), get_expr(q), get_env(q))` as extra logic + # is done by rlang to convert the quosure to a function within `as_function(q)` + fun <- as_function(q) + + # If the quosure is empty, then the returned function can not be called. + # https://github.com/r-lib/rlang/issues/1244 + if (quo_is_missing(q)) { + fn_body(fun) <- quote({}) + return(fun) + } + # as_function returns a function that takes `...`. We need one that takes no + # args. + fn_fmls(fun) <- list() + fun +} + + +#' Convert expressions and quosures to functions +#' +#' `handleEnvAndQuoted()` and `quoToFunction()` are meant to be used together in a +#' `render` function, to capture user expressions or quosures and convert them +#' to functions. They are meant to replace the older functions +#' [installExprFunction()] and [exprToFunction()] (although those will continue +#' to work in the future). See the examples in [installExprFunction()] for +#' information on how to migrate to `getQuosure()` and `quoToFunction()`. +#' +#' Although `getQuosure()` can take `env` and `quoted` parameters, it is +#' recommended that they not be used, except for backward compatibility. +#' The recommended usage of `getQuosure()` and `quoToFunction()` does not +#' include use of the `env` and `quoted` parameters. If it is necessary to +#' use quoted expressions and/or custom environments for evaluating, it can be +#' done with quosures and [rlang::inject()]. The examples below demonstrate how +#' to do this. +#' +#' If you are updating from [installExprFunction()] or [exprToFunction()] to +#' these functions, see the examples in the documentation for the old functions +#' for how to migrate them. +#' +#' @param x An expression or quosure. +#' @param env An environment. This is provided for backward compatibility. +#' @param quoted A boolean indicating whether or not `env` is quoted. This is +#' provided for backward compatibility. +#' +#' @examples +#' # Example of a new renderer, similar to renderText. +#' # This is something that toolkit authors will do. +#' renderTriple <- function(expr) { +#' # Convert expr to a quosure, and then to a function +#' func <- quoToFunction(rlang::enquo0(expr)) +#' +#' # Wrap up func, with another function which takes the value of func() +#' # and modifies it. +#' createRenderFunction( +#' func, +#' transform = function(value, session, name, ...) { +#' paste(rep(value, 3), collapse=", ") +#' }, +#' # The outputFunc can be used by rmarkdown shiny apps to automatically +#' # generate outputs. +#' outputFunc = textOutput +#' ) +#' } +#' +#' +#' # Example of using the renderer. +#' # This is something that app authors will do. +#' values <- reactiveValues(A="text") +#' +#' \dontrun{ +#' # Create an output object +#' output$tripleA <- renderTriple({ +#' values$A +#' }) +#' } +#' +#' # At the R console, you can experiment with the renderer using isolate() +#' tripleA <- renderTriple({ +#' values$A +#' }) +#' +#' isolate(tripleA()) +#' # "text, text, text" +#' +#' +#' # If you want to use a quoted expression, use rlang:inject(). +#' a <- 1 +#' expr <- quote({ values$A }) +#' tripleA <- rlang::inject(renderTriple(!!expr)) +#' isolate(tripleA()) +#' # "text, text, text" +#' +#' # Capturing an expression and an environment, using a quosure and rlang::inject(): +#' e <- new.env() +#' e$vals <- reactiveValues(A="hello") +#' # Create a quosure that captures both the expression and environment. +#' myquo <- rlang::new_quosure(quote({ vals$A }), env = e) +#' tripleA <- rlang::inject(renderTriple(!!myquo)) +#' isolate(tripleA()) +#' # "hello, hello, hello" +#' +#' +#' @rdname quoToFunction +#' @export +sustainEnvAndQuoted <- function(q, x, env, quoted) { + ## To avoid possible boilerplate with `deprecated()`... + env_is_present <- + if (!is_present(env)) { + # If `env` is `deprecated()`, set to the parent frame of the caller + env <- parent.frame(2) + + FALSE # env_is_present + } else { + # check of parent frame had a missing _`env`_ param + eval(substitute(!missing(env)), parent.frame()) + } + quoted_is_present <- + if (!is_present(quoted)) { + # If `quoted` is deprecated(), set to `FALSE` + quoted <- FALSE + + FALSE # quoted_is_present + } else { + # check of parent frame had a missing _`quoted`_ param + eval(substitute(!missing(quoted)), parent.frame()) + } + ## + # This is TRUE when the user called `inject(renderFoo(!!q))` + x_is_quosure <- is_quosure(eval(substitute(substitute(x)), parent.frame())) + + sustainEnvAndQuoted_( + q = q, env = env, quoted = quoted, + env_is_present = env_is_present, + quoted_is_present = quoted_is_present, + x_is_quosure = x_is_quosure, + verbose = TRUE + ) +} + +# `sustainEnvAndQuotedInternal()` is to be called from functions like `reactive()`, `observe()`, # and the various render functions. It handles the following cases: # - The typical case where x is an unquoted expression, and `env` and `quoted` # are not used. # - New-style metaprogramming cases, where rlang::inject() is used to inline a # quosure into the AST, as in `inject(reactive(!!x))`. # - Old-style metaprogramming cases, where `env` and/or `quoted` are used. -# -# Much of the complexity is handling old-style metaprogramming cases. The code -# in this function is more complicated because it needs to look at unevaluated -# expressions in the _calling_ function. If this code were put directly in the -# calling function, it would look like this: -# -# if (!missing(env) || !missing(quoted)) { -# deprecatedEnvQuotedMessage() -# if (!quoted) x <- substitute(x) -# x <- new_quosure(x, env) -# -# } else { -# x <- substitute(x) -# if (!is_quosure(x)) { -# x <- new_quosure(x, env = parent.frame()) -# } -# } -# -# In the future, the calling functions will not need to have the `env` and -# `quoted` arguments -- `rlang::inject()` and quosures can be used instead. -# Instead of using this function, `get_quosure()`, the caller can instead use -# just the following code: -# -# x <- substitute(x) -# if (!is_quosure(x)) { -# x <- new_quosure(x, env = parent.frame()) +# Same as `sustainEnvAndQuoted()`, but quiet +# Under assumption that `env = deprecated()` and `quoted = deprecated()` +sustainEnvAndQuotedInternal <- function(q, x, env, quoted) { + ## Can leverage the fact that we know all `env` and `quoted` args are set to `deprecated()` + env_is_present <- is_present(env) # eval(substitute(!missing(env)), parent.frame()) + quoted_is_present <- is_present(quoted) # eval(substitute(!missing(quoted)), parent.frame()) + x_is_quosure <- is_quosure(eval(substitute(substitute(x)), parent.frame())) + if (!env_is_present) env <- parent.frame(2) + if (!quoted_is_present) quoted <- FALSE + + sustainEnvAndQuoted_( + q = q, + env = env, + quoted = quoted, + env_is_present = env_is_present, + quoted_is_present = quoted_is_present, + x_is_quosure = x_is_quosure, + verbose = FALSE + ) +} +# # Reaches up three calls to check if env / quoted were provided. +# # Can not leverage `is_present()` logic like in `sustainEnvAndQuotedInternal()` + +# # This is similar to `sustainEnvAndQuotedInternal()`, but it is intended to be used only by +# # `installExprFunction()` and `exprToFunction()`. Whereas `sustainEnvAndQuotedInternal()` reaches +# # 2 calls back to find the expression passed in, this function reaches 3 calls +# # back, and it is only used internally within Shiny. +# sustainEnvAndQuoted3Internal <- function(q, x, env, quoted) { +# ## To avoid possible boilerplate with `deprecated()`... +# env_is_present <- +# if (!is_present(env)) { +# # If `env` is `deprecated()`, set to the parent frame of the caller +# env <- parent.frame(3) + +# FALSE # env_is_present +# } else { +# # check of parent frame of the caller had a missing _`env`_ param +# eval(eval(substitute(substitute(!missing(env))), parent.frame()), parent.frame(2)) +# } +# quoted_is_present <- +# if (!is_present(quoted)) { +# # If `quoted` is deprecated(), set to `FALSE` +# quoted <- FALSE + +# FALSE # quoted_is_present +# } else { +# # check of parent frame had a missing _`quoted`_ param +# eval(eval(substitute(substitute(!missing(quoted))), parent.frame()), parent.frame(2)) +# } +# ## +# x_is_quosure <- is_quosure(eval(eval(substitute(substitute(x)), parent.frame()), parent.frame(2))) + +# sustainEnvAndQuoted_( +# q = q, env = env, quoted = quoted, +# env_is_present = env_is_present, +# quoted_is_present = quoted_is_present, +# x_is_quosure = x_is_quosure, +# verbose = FALSE +# ) # } -# -get_quosure <- function(x, env, quoted) { - if (!eval(substitute(missing(env)), parent.frame()) || - !eval(substitute(missing(quoted)), parent.frame())) - { - deprecatedEnvQuotedMessage() - if (!quoted) { - x <- eval(substitute(substitute(x)), parent.frame()) - } - x <- new_quosure(x, env) +sustainEnvAndQuoted_ <- function( + q, env, quoted, + env_is_present, quoted_is_present, x_is_quosure, + verbose = TRUE +) { + if ( + env_is_present || + quoted_is_present + ) { + if (verbose) deprecatedEnvQuotedMessage() + # browser() - } else { - x <- eval(substitute(substitute(x)), parent.frame()) + # Can't have x be a quosure and use env/quoted. + if (x_is_quosure) { + stop( + "Can not use a `quosure()` with either the `env` or `quoted` parameters.\n", + "Please alter your quosure before the shiny function call and ", + "do not supply any `env` or `quoted` parameters.\n", + "To use your `quosure()` object directly, use `inject()` mixed with `!!`.\n", + "Ex: `inject(renderText(!!q))`" + ) + } - # At this point, x can be a quosure if rlang::inject() is used, but the - # typical case is that x is not a quosure. - if (!is_quosure(x)) { - x <- new_quosure(x, env = parent.frame(2L)) + # In this code path, x is NOT a literal quosure object + if (isTRUE(quoted)) { + q <- quo_set_expr(q, eval_tidy(q)) } + if (env_is_present) { + q <- quo_set_env(q, env) + } + } + q +} + + + +#' Convert an expression to a function +#' +#' @description +#' `r lifecycle::badge("superseded")` Please see [`quoToFunction()`] for updated usage. (Shiny 1.7.0) +#' +#' Note: as of Shiny 1.7.0, it is +#' recommended to use [`quoToFunction()`] (and if necessary, [`sustainEnvAndQuoted()`]) instead of +#' `exprToFunction()` and `installExprFunction()`. See the examples for +#' information on how to migrate to `getQuosure()` and `quoToFunction()`. +#' +#' This is to be called from another function, because it will attempt to get +#' an unquoted expression from two calls back. +#' +#' For `exprToFunction()`: +#' If `expr` is a quoted expression, then this just converts it to a function. +#' If `expr` is a function, then this simply returns expr (and prints a +#' deprecation message). +#' If `expr` was a non-quoted expression from two calls back, then this will +#' quote the original expression and convert it to a function. +#' +#' `installExprFunction` installs an expression in the given environment as a +#' function, and registers debug hooks so that breakpoints may be set in the +#' function. +#' +#' `installExprFunction` can replace `exprToFunction` as follows: we may use +#' `func <- exprToFunction(expr)` if we do not want the debug hooks, or +#' `installExprFunction(expr, "func")` if we do. Both approaches create a +#' function named `func` in the current environment. +#' +#' +#' @param expr A quoted or unquoted expression, or a quosure. +#' @param env The desired environment for the function. Defaults to the +#' calling environment two steps back. +#' @param quoted Is the expression quoted? +#' +#' @examples +#' # These examples demonstrate the old method, with exprToFunction() and +#' # installExprFunction(), as well as how to replace them, with getQuosure(). +#' +#' # Version 1: exprToFunction() +#' # The old way of converting the expression to a quosure, with exprToFunction() +#' renderTriple <- function(expr, env=parent.frame(), quoted=FALSE) { +#' # Convert expr to a function +#' func <- exprToFunction(expr, env, quoted) +#' +#' function() { +#' value <- func() +#' paste(rep(value, 3), collapse=", ") +#' } +#' } +#' +#' # Version 2: installExprFunction() +#' # The not-quite-as-old way of converting the expression to a quosure, with +#' # installExprFunction() +#' renderTriple <- function(expr, env=parent.frame(), quoted=FALSE) { +#' # Convert expr to a function +#' installExprFunction(expr, "func", env, quoted) +#' +#' function() { +#' value <- func() +#' paste(rep(value, 3), collapse=", ") +#' } +#' } +#' +#' # Version 3: Replacing the old functions with getQuosure() and quoToFunction() +#' # This keeps the `env` and `quoted` arguments, in case they are needed for +#' # backward compatibility +#' renderTriple <- function(expr, env=parent.frame(), quoted=FALSE) { +#' # Convert expr to a quosure, and then to a function +#' q <- rlang::enquo0(expr) +#' q <- sustainEnvAndQuoted(q, expr, env, quoted) +#' func <- quoToFunction(q) +#' +#' function() { +#' value <- func() +#' paste(rep(value, 3), collapse=", ") +#' } +#' } +#' +#' +#' # Version 4: getQuosure() +#' # This is the recommended way to use getQuosure() and quoToFunction(), and +#' # it discards `env` and `quoted`, for simplicity. +#' renderTriple <- function(expr) { +#' # Convert expr to a quosure, and then to a function +#' func <- quoToFunction(rlang::enquo0(expr)) +#' +#' function() { +#' value <- func() +#' paste(rep(value, 3), collapse=", ") +#' } +#' } +#' +#' # Example of using the renderer. +#' # This is something that app authors will do. +#' values <- reactiveValues(A="text") +#' +#' \dontrun{ +#' # Create an output object +#' output$tripleA <- renderTriple({ +#' values$A +#' }) +#' } +#' +#' # At the R console, you can experiment with the renderer using isolate() +#' tripleA <- renderTriple({ +#' values$A +#' }) +#' +#' isolate(tripleA()) +#' # "text, text, text" +#' @export +exprToFunction <- function(expr, env = parent.frame(), quoted = FALSE) { + if (!quoted) { + expr <- eval(substitute(substitute(expr)), parent.frame()) + } + + # expr is a quoted expression + new_function(list(), body = expr, env = env) +} + +#' @rdname exprToFunction +#' +#' @param name The name the function should be given +#' @param eval.env The desired environment for the function. Defaults to the +#' calling environment two steps back. +#' @param assign.env The environment in which the function should be assigned. +#' @param label A label for the object to be shown in the debugger. Defaults to +#' the name of the calling function. +#' @param wrappedWithLabel,..stacktraceon Advanced use only. For stack manipulation purposes; see +#' [stacktrace()]. +#' @export +installExprFunction <- function(expr, name, eval.env = parent.frame(2), + quoted = FALSE, + assign.env = parent.frame(1), + label = sys.call(-1)[[1]], + wrappedWithLabel = TRUE, + ..stacktraceon = FALSE) { + if (!quoted) { + quoted <- TRUE + expr <- eval(substitute(substitute(expr)), parent.frame()) } - x + func <- exprToFunction(expr, eval.env, quoted) + if (length(label) > 1) { + # Just in case the deparsed code is more complicated than we imagine. If we + # have a label with length > 1 it causes warnings in wrapFunctionLabel. + label <- paste0(label, collapse = "\n") + } + if (wrappedWithLabel) { + func <- wrapFunctionLabel(func, updateFunctionLabel(label), ..stacktraceon = ..stacktraceon) + } else { + registerDebugHook(name, assign.env, label) + } + assign(name, func, envir = assign.env) +} + +# Utility function for creating a debugging label, given an expression. +# `expr` is a quoted expression. +# `function_name` is the name of the calling function. +# `label` is an optional user-provided label. If NULL, it will be inferred. +exprToLabel <- function(expr, function_name, label = NULL) { + srcref <- attr(expr, "srcref", exact = TRUE) + if (is.null(label)) { + label <- rexprSrcrefToLabel( + srcref[[1]], + sprintf('%s(%s)', function_name, paste(deparse(expr), collapse = '\n')) + ) + } + if (length(srcref) >= 2) attr(label, "srcref") <- srcref[[2]] + attr(label, "srcfile") <- srcFileOfRef(srcref[[1]]) + label } diff --git a/R/utils.R b/R/utils.R index 39cca5f3f9..49f1a16c66 100644 --- a/R/utils.R +++ b/R/utils.R @@ -404,165 +404,6 @@ getContentType <- function(file, defaultType = 'application/octet-stream') { mime::guess_type(file, unknown = defaultType, subtype = subtype) } -# Create a zero-arg function from a quoted expression and environment -# @examples -# makeFunction(body=quote(print(3))) -makeFunction <- function(args = pairlist(), body, env = parent.frame()) { - eval(call("function", args, body), env) -} - -#' Convert an expression to a function -#' -#' This is to be called from another function, because it will attempt to get -#' an unquoted expression from two calls back. Note: as of Shiny 1.6.0, it is -#' recommended to use [quoToFunction()] instead. -#' -#' If expr is a quoted expression, then this just converts it to a function. -#' If expr is a function, then this simply returns expr (and prints a -#' deprecation message). -#' If expr was a non-quoted expression from two calls back, then this will -#' quote the original expression and convert it to a function. -# -#' @param expr A quoted or unquoted expression, or a function. -#' @param env The desired environment for the function. Defaults to the -#' calling environment two steps back. -#' @param quoted Is the expression quoted? -#' -#' @examples -#' # Example of a new renderer, similar to renderText -#' # This is something that toolkit authors will do -#' renderTriple <- function(expr, env=parent.frame(), quoted=FALSE) { -#' # Convert expr to a function -#' func <- shiny::exprToFunction(expr, env, quoted) -#' -#' function() { -#' value <- func() -#' paste(rep(value, 3), collapse=", ") -#' } -#' } -#' -#' -#' # Example of using the renderer. -#' # This is something that app authors will do. -#' values <- reactiveValues(A="text") -#' -#' \dontrun{ -#' # Create an output object -#' output$tripleA <- renderTriple({ -#' values$A -#' }) -#' } -#' -#' # At the R console, you can experiment with the renderer using isolate() -#' tripleA <- renderTriple({ -#' values$A -#' }) -#' -#' isolate(tripleA()) -#' # "text, text, text" -#' @export -exprToFunction <- function(expr, env=parent.frame(), quoted=FALSE) { - if (!quoted) { - expr <- eval(substitute(substitute(expr)), parent.frame()) - } - - # expr is a quoted expression - makeFunction(body=expr, env=env) -} - -#' Install an expression as a function -#' -#' Installs an expression in the given environment as a function, and registers -#' debug hooks so that breakpoints may be set in the function. Note: as of -#' Shiny 1.6.0, it is recommended to use [quoToFunction()] instead. -#' -#' This function can replace `exprToFunction` as follows: we may use -#' `func <- exprToFunction(expr)` if we do not want the debug hooks, or -#' `installExprFunction(expr, "func")` if we do. Both approaches create a -#' function named `func` in the current environment. -#' -#' @seealso Wraps [exprToFunction()]; see that method's documentation -#' for more documentation and examples. -#' -#' @param expr A quoted or unquoted expression -#' @param name The name the function should be given -#' @param eval.env The desired environment for the function. Defaults to the -#' calling environment two steps back. -#' @param quoted Is the expression quoted? -#' @param assign.env The environment in which the function should be assigned. -#' @param label A label for the object to be shown in the debugger. Defaults to -#' the name of the calling function. -#' @param wrappedWithLabel,..stacktraceon Advanced use only. For stack manipulation purposes; see -#' [stacktrace()]. -#' @export -installExprFunction <- function(expr, name, eval.env = parent.frame(2), - quoted = FALSE, - assign.env = parent.frame(1), - label = deparse(sys.call(-1)[[1]]), - wrappedWithLabel = TRUE, - ..stacktraceon = FALSE) { - if (!quoted) { - quoted <- TRUE - expr <- eval(substitute(substitute(expr)), parent.frame()) - } - - func <- exprToFunction(expr, eval.env, quoted) - if (length(label) > 1) { - # Just in case the deparsed code is more complicated than we imagine. If we - # have a label with length > 1 it causes warnings in wrapFunctionLabel. - label <- paste0(label, collapse = "\n") - } - if (wrappedWithLabel) { - func <- wrapFunctionLabel(func, label, ..stacktraceon = ..stacktraceon) - } else { - registerDebugHook(name, assign.env, label) - } - assign(name, func, envir = assign.env) -} - -#' Convert a quosure to a function for a Shiny render function -#' -#' This takes a quosure and label, and wraps them into a function that should be -#' passed to [createRenderFunction()] or [markRenderFunction()]. -#' -#' This function was added in Shiny 1.6.0. Previously, it was recommended to use -#' [installExprFunction()] or [exprToFunction()] in render functions, but now we -#' recommend using [quoToFunction()], because it does not require `env` and -#' `quoted` arguments -- that information is captured by quosures provided by -#' \pkg{rlang}. -#' -#' @param q A quosure. -#' @inheritParams installExprFunction -#' @seealso [createRenderFunction()] for example usage. -#' -#' @export -quoToFunction <- function(q, label, ..stacktraceon = FALSE) { - q <- as_quosure(q) - func <- as_function(q) - # as_function returns a function that takes `...`. We want one that takes no - # args. - formals(func) <- list() - wrapFunctionLabel(func, label, ..stacktraceon = ..stacktraceon) -} - - -# Utility function for creating a debugging label, given an expression. -# `expr` is a quoted expression. -# `function_name` is the name of the calling function. -# `label` is an optional user-provided label. If NULL, it will be inferred. -exprToLabel <- function(expr, function_name, label = NULL) { - srcref <- attr(expr, "srcref", exact = TRUE) - if (is.null(label)) { - label <- rexprSrcrefToLabel( - srcref[[1]], - sprintf('%s(%s)', function_name, paste(deparse(expr), collapse = '\n')) - ) - } - if (length(srcref) >= 2) attr(label, "srcref") <- srcref[[2]] - attr(label, "srcfile") <- srcFileOfRef(srcref[[1]]) - label -} - #' Parse a GET query string from a URL #' #' Returns a named list of key-value pairs. diff --git a/inst/www/shared/shiny-autoreload.js b/inst/www/shared/shiny-autoreload.js index c4df3d090f..6010fc1d24 100644 --- a/inst/www/shared/shiny-autoreload.js +++ b/inst/www/shared/shiny-autoreload.js @@ -1,3 +1,3 @@ -/*! shiny 1.6.0.9021 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ +/*! shiny 1.6.0.9022 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ (function(){var t="ws:";window.location.protocol==="https:"&&(t="wss:");var o=window.location.pathname;/\/$/.test(o)||(o+="/");o+="autoreload/";var n=new WebSocket(t+"//"+window.location.host+o);n.onmessage=function(a){a.data==="autoreload"&&window.location.reload()};})(); //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4v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MiOiBbXQp9Cg== diff --git a/inst/www/shared/shiny-showcase.css b/inst/www/shared/shiny-showcase.css index 50ff493bfa..1355a3d7e0 100644 --- a/inst/www/shared/shiny-showcase.css +++ b/inst/www/shared/shiny-showcase.css @@ -1,2 +1,2 @@ -/*! shiny 1.6.0.9021 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ +/*! shiny 1.6.0.9022 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ #showcase-well{border-radius:0}.shiny-code{background-color:#fff;margin-bottom:0}.shiny-code code{font-family:Menlo,Consolas,"Courier New",monospace}.shiny-code-container{margin-top:20px;clear:both}.shiny-code-container h3{display:inline;margin-right:15px}.showcase-header{font-size:16px;font-weight:normal}.showcase-code-link{text-align:right;padding:15px}#showcase-app-container{vertical-align:top}#showcase-code-tabs{margin-right:15px}#showcase-code-tabs pre{border:none;line-height:1em}#showcase-code-tabs .nav{margin-bottom:0}#showcase-code-tabs ul{margin-bottom:0}#showcase-code-tabs .tab-content{border-style:solid;border-color:#e5e5e5;border-width:0px 1px 1px 1px;overflow:auto;border-bottom-right-radius:4px;border-bottom-left-radius:4px}#showcase-app-code{width:100%}#showcase-code-position-toggle{float:right}#showcase-sxs-code{padding-top:20px;vertical-align:top}.showcase-code-license{display:block;text-align:right}#showcase-code-content pre{background-color:#fff} diff --git a/inst/www/shared/shiny-showcase.js b/inst/www/shared/shiny-showcase.js index 0fe87bc964..dd405c844e 100644 --- a/inst/www/shared/shiny-showcase.js +++ b/inst/www/shared/shiny-showcase.js @@ -1,3 +1,3 @@ -/*! shiny 1.6.0.9021 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ +/*! shiny 1.6.0.9022 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ (function(){var en=Object.create;var ee=Object.defineProperty;var rn=Object.getOwnPropertyDescriptor;var tn=Object.getOwnPropertyNames;var nn=Object.getPrototypeOf,an=Object.prototype.hasOwnProperty;var on=function(e){return ee(e,"__esModule",{value:!0})};var l=function(e,r){return function(){return r||e((r={exports:{}}).exports,r),r.exports}};var ln=function(e,r,t){if(r&&typeof r=="object"||typeof r=="function")for(var n=tn(r),i=0,a=n.length,o;i0?gi:pi)(e)}});var me=l(function(qo,Ur){var yi=_(),hi=Math.min;Ur.exports=function(e){return e>0?hi(yi(e),9007199254740991):0}});var Wr=l(function(So,kr){var bi=_(),xi=Math.max,mi=Math.min;kr.exports=function(e,r){var t=bi(e);return t<0?xi(t+r,0):mi(t,r)}});var Kr=l(function(wo,Gr){var Ei=B(),qi=me(),Si=Wr(),Hr=function(e){return function(r,t,n){var i=Ei(r),a=qi(i.length),o=Si(n,a),s;if(e&&t!=t){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===t)return e||o||0;return!e&&-1}};Gr.exports={includes:Hr(!0),indexOf:Hr(!1)}});var Xr=l(function(Io,zr){var Ee=m(),wi=B(),Ii=Kr().indexOf,Pi=ve();zr.exports=function(e,r){var t=wi(e),n=0,i=[],a;for(a in t)!Ee(Pi,a)&&Ee(t,a)&&i.push(a);for(;r.length>n;)Ee(t,a=r[n++])&&(~Ii(i,a)||i.push(a));return i}});var Jr=l(function(Po,Yr){Yr.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Qr=l(function(Zr){var Oi=Xr(),ji=Jr(),Ti=ji.concat("length","prototype");Zr.f=Object.getOwnPropertyNames||function(r){return Oi(r,Ti)}});var et=l(function(Vr){Vr.f=Object.getOwnPropertySymbols});var tt=l(function(To,rt){var _i=xe(),Ci=Qr(),Ri=et(),Ai=j();rt.exports=_i("Reflect","ownKeys")||function(r){var t=Ci.f(Ai(r)),n=Ri.f;return n?t.concat(n(r)):t}});var it=l(function(_o,nt){var Ni=m(),Di=tt(),Mi=le(),Bi=se();nt.exports=function(e,r){for(var t=Di(r),n=Bi.f,i=Mi.f,a=0;a0&&(!t.multiline||t.multiline&&r[t.lastIndex-1]!=="\n")&&(f="(?: "+f+")",c=" "+c,v++),i=new RegExp("^(?:"+f+")",u)),Ie&&(i=new RegExp("^"+f+"$(?!\\s)",u)),we&&(n=t.lastIndex),a=G.call(s?i:t,c),s?a?(a.input=a.input.slice(v),a[0]=a[0].slice(v),a.index=t.lastIndex,t.lastIndex+=a[0].length):t.lastIndex=0:we&&a&&(t.lastIndex=t.global?a.index+a[0].length:n),Ie&&a&&a.length>1&&Vi.call(a[0],i,function(){for(o=1;o=74)&&(h=Oe.match(/Chrome\/(\d+)/),h&&(z=h[1])));wt.exports=z&&+z});var je=l(function($o,Ot){var Pt=It(),ia=b();Ot.exports=!!Object.getOwnPropertySymbols&&!ia(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Pt&&Pt<41})});var Tt=l(function(Uo,jt){var aa=je();jt.exports=aa&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var At=l(function(ko,Rt){var oa=g(),la=k(),_t=m(),sa=fe(),Ct=je(),ua=Tt(),R=la("wks"),A=oa.Symbol,ca=ua?A:A&&A.withoutSetter||sa;Rt.exports=function(e){return(!_t(R,e)||!(Ct||typeof R[e]=="string"))&&(Ct&&_t(A,e)?R[e]=A[e]:R[e]=ca("Symbol."+e)),R[e]}});var Ft=l(function(Wo,Lt){"use strict";Pe();var Nt=ye(),fa=K(),X=b(),Te=At(),va=q(),da=Te("species"),_e=RegExp.prototype,pa=!X(function(){var e=/./;return e.exec=function(){var r=[];return r.groups={a:"7"},r},"".replace(e,"$")!=="7"}),Dt=function(){return"a".replace(/./,"$0")==="$0"}(),Mt=Te("replace"),Bt=function(){return/./[Mt]?/./[Mt]("a","$0")==="":!1}(),ga=!X(function(){var e=/(?:)/,r=e.exec;e.exec=function(){return r.apply(this,arguments)};var t="ab".split(e);return t.length!==2||t[0]!=="a"||t[1]!=="b"});Lt.exports=function(e,r,t,n){var i=Te(e),a=!X(function(){var c={};return c[i]=function(){return 7},""[e](c)!=7}),o=a&&!X(function(){var c=!1,d=/a/;return e==="split"&&(d={},d.constructor={},d.constructor[da]=function(){return d},d.flags="",d[i]=/./[i]),d.exec=function(){return c=!0,null},d[i](""),!c});if(!a||!o||e==="replace"&&!(pa&&Dt&&!Bt)||e==="split"&&!ga){var s=/./[i],u=t(i,""[e],function(c,d,y,N,S){var p=d.exec;return p===fa||p===_e.exec?a&&!S?{done:!0,value:s.call(d,y,N)}:{done:!0,value:c.call(y,d,N)}:{done:!1}},{REPLACE_KEEPS_$0:Dt,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Bt}),f=u[0],v=u[1];Nt(String.prototype,e,f),Nt(_e,i,r==2?function(c,d){return v.call(c,this,d)}:function(c){return v.call(c,this)})}n&&va(_e[i],"sham",!0)}});var kt=l(function(Ho,Ut){var ya=_(),ha=P(),$t=function(e){return function(r,t){var n=String(ha(r)),i=ya(t),a=n.length,o,s;return i<0||i>=a?e?"":void 0:(o=n.charCodeAt(i),o<55296||o>56319||i+1===a||(s=n.charCodeAt(i+1))<56320||s>57343?e?n.charAt(i):o:e?n.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}};Ut.exports={codeAt:$t(!1),charAt:$t(!0)}});var Ht=l(function(Go,Wt){"use strict";var ba=kt().charAt;Wt.exports=function(e,r,t){return r+(t?ba(e,r).length:1)}});var Kt=l(function(Ko,Gt){var xa=ie(),ma=Math.floor,Ea="".replace,qa=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Sa=/\$([$&'`]|\d{1,2})/g;Gt.exports=function(e,r,t,n,i,a){var o=t+e.length,s=n.length,u=Sa;return i!==void 0&&(i=xa(i),u=qa),Ea.call(a,u,function(f,v){var c;switch(v.charAt(0)){case"$":return"$";case"&":return e;case"`":return r.slice(0,t);case"'":return r.slice(o);case"<":c=i[v.slice(1,-1)];break;default:var d=+v;if(d===0)return f;if(d>s){var y=ma(d/10);return y===0?f:y<=s?n[y-1]===void 0?v.charAt(1):n[y-1]+v.charAt(1):f}c=n[d-1]}return c===void 0?"":c})}});var Xt=l(function(zo,zt){var wa=te(),Ia=K();zt.exports=function(e,r){var t=e.exec;if(typeof t=="function"){var n=t.call(e,r);if(typeof n!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return n}if(wa(e)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return Ia.call(e,r)}});var Jo=sn(Pe());"use strict";var Pa=Ft(),Oa=j(),ja=me(),Ta=_(),_a=P(),Ca=Ht(),Ra=Kt(),Aa=Xt(),Na=Math.max,Da=Math.min,Ma=function(e){return e===void 0?e:String(e)};Pa("replace",2,function(e,r,t,n){var i=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,a=n.REPLACE_KEEPS_$0,o=i?"$":"$0";return[function(u,f){var v=_a(this),c=u==null?void 0:u[e];return c!==void 0?c.call(u,v,f):r.call(String(v),u,f)},function(s,u){if(!i&&a||typeof u=="string"&&u.indexOf(o)===-1){var f=t(r,s,this,u);if(f.done)return f.value}var v=Oa(s),c=String(this),d=typeof u=="function";d||(u=String(u));var y=v.global;if(y){var N=v.unicode;v.lastIndex=0}for(var S=[];;){var p=Aa(v,c);if(p===null||(S.push(p),!y))break;var Vt=String(p[0]);Vt===""&&(v.lastIndex=Ca(c,ja(v.lastIndex),N))}for(var Ne="",D=0,Y=0;Y=D&&(Ne+=c.slice(D,w)+Me,D=w+J.length)}return Ne+c.slice(D)}]});var Yt=400;function Ce(e,r){var t=0;if(e.nodeType===3){var n=e.nodeValue.replace(/\n/g,"").length;if(n>=r)return{element:e,offset:r};t+=n}else if(e.nodeType===1&&e.firstChild){var i=Ce(e.firstChild,r);if(i.element!==null)return i;t+=i.offset}return e.nextSibling?Ce(e.nextSibling,r-t):{element:null,offset:t}}function Re(e,r,t){for(var n=0,i=0;i show below':' show with app'}),r&&$(document.body).animate({scrollTop:0},n),Ae=r,Zt(r&&t),$(window).trigger("resize")};function Zt(e){var r=960,t=r,n=1,i=document.getElementById("showcase-app-code").offsetWidth;i/2>r?t=i/2:i*.66>r?t=960:(t=i*.66,n=t/r);var a=document.getElementById("showcase-app-container");$(a).animate({width:t+"px",zoom:n*100+"%"},e?Yt:0)}var La=function(){Jt(!Ae,!0)},Fa=function(){document.body.offsetWidth>1350&&Jt(!0,!1)};function Qt(){document.getElementById("showcase-code-content").style.height=$(window).height()+"px"}function $a(){var e=document.getElementById("showcase-markdown-content");if(e!==null){var r=e.innerText||e.innerHTML,t=window.Showdown.converter;document.getElementById("readme-md").innerHTML=new t().makeHtml(r)}}$(window).resize(function(){Ae&&(Zt(!1),Qt())});window.toggleCodePosition=La;$(window).on("load",Fa);$(window).on("load",$a);window.hljs&&window.hljs.initHighlightingOnLoad();})(); //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2dsb2JhbC5qcyIsICIuLi8uLi8uLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvZmFpbHMuanMiLCAiLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2Rlc2NyaXB0b3JzLmpzIiwgIi4uLy4uLy4uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9vYmplY3QtcHJvcGVydHktaXMtZW51bWVyYWJsZS5qcyIsICIuLi8uLi8uLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlcm5hbHMvY3JlYXRlLXByb3BlcnR5LWRlc2NyaXB0b3IuanMiLCAiLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2NvcmUtanMvaW50ZXJuYWxzL2NsYXNzb2YtcmF3LmpzIiwgIi4uLy4uLy4uL25vZGVfbW9kdWxlcy9jb3JlLWpzL2ludGVybmFscy9pbmRleGVkLW9iamVjdC5qcyIsICIuLi8uLi8uLi9ub2RlX21vZHVsZXMvY29yZS1qcy9pbnRlc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QUFvQixJQUNwQixRQUdKLE9BQU8sbUJBQXFCLEdBQzVCLEVBQUUsUUFBUSxHQUFHLE9BQVEsSUFDckIsRUFBRSxRQUFRLEdBQUcsT0FBUSxJQUNyQixBQUFJLE9BQU8sTUFBTSxPQUFPLEtBQUsiLAogICJuYW1lcyI6IFtdCn0K diff --git a/inst/www/shared/shiny-testmode.js b/inst/www/shared/shiny-testmode.js index c9fdb0dd56..3745db3501 100644 --- a/inst/www/shared/shiny-testmode.js +++ b/inst/www/shared/shiny-testmode.js @@ -1,3 +1,3 @@ -/*! shiny 1.6.0.9021 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ +/*! shiny 1.6.0.9022 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ (function(){var a=eval;window.addEventListener("message",function(i){var e=i.data;e.code&&a(e.code)});})(); //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vc3JjdHMvc3JjL3V0aWxzL2V2YWwudHMiLCAiLi4vLi4vLi4vc3JjdHMvZXh0cmFzL3NoaW55LXRlc3Rtb2RlLnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyIvL2VzYnVpbGQuZ2l0aHViLmlvL2NvbnRlbnQtdHlwZXMvI2RpcmVjdC1ldmFsXG4vL3RsL2RyO1xuLy8gKiBEaXJlY3QgdXNhZ2Ugb2YgYGV2YWwoXCJ4XCIpYCBpcyBiYWQgd2l0aCBidW5kbGVkIGNvZGUuXG4vLyAqIEluc3RlYWQsIHVzZSBpbmRpcmVjdCBjYWxscyB0byBgZXZhbGAgc3VjaCBhcyBgaW5kaXJlY3RFdmFsKFwieFwiKWBcbi8vICAgKiBFdmVuIGp1c3QgcmVuYW1pbmcgdGhlIGZ1bmN0aW9uIHdvcmtzIHdlbGwgZW5vdWdoLlxuLy8gPiBUaGlzIGlzIGtub3duIGFzIFwiaW5kaXJlY3QgZXZhbFwiIGJlY2F1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Z2UgPSBlLmRhdGE7XG4gIGlmIChtZXNzYWdlLmNvZGUpIGluZGlyZWN0RXZhbChtZXNzYWdlLmNvZGUpO1xufSk7Il0sCiAgIm1hcHBpbmdzIjogIjtZQU9BLEdBQUksR0FBZSxLQ0huQixPQUFPLGlCQUFpQixVQUFXLFNBQVUsRUFBRyxDQUM5QyxHQUFJLEdBQVUsRUFBRSxLQUNoQixBQUFJLEVBQVEsTUFBTSxFQUFhLEVBQVEiLAogICJuYW1lcyI6IFtdCn0K diff --git a/inst/www/shared/shiny.js b/inst/www/shared/shiny.js index 3bb529f759..c973dcb9b9 100644 --- a/inst/www/shared/shiny.js +++ b/inst/www/shared/shiny.js @@ -1,4 +1,4 @@ -/*! shiny 1.6.0.9021 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ +/*! shiny 1.6.0.9022 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ (function() { var __create = Object.create; var __defProp = Object.defineProperty; @@ -13263,7 +13263,7 @@ var windowShiny2; function setShiny(windowShiny_) { windowShiny2 = windowShiny_; - windowShiny2.version = "1.6.0.9021"; + windowShiny2.version = "1.6.0.9022"; var _initInputBindings = initInputBindings(), inputBindings = _initInputBindings.inputBindings, fileInputBinding2 = _initInputBindings.fileInputBinding; var _initOutputBindings = initOutputBindings(), outputBindings = _initOutputBindings.outputBindings; setFileInputBinding(fileInputBinding2); diff --git a/inst/www/shared/shiny.min.css b/inst/www/shared/shiny.min.css index a8b7743144..c1f199b284 100644 --- a/inst/www/shared/shiny.min.css +++ b/inst/www/shared/shiny.min.css @@ -1,2 +1,2 @@ -/*! shiny 1.6.0.9021 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ +/*! shiny 1.6.0.9022 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ pre.shiny-text-output:empty:before{content:" "}pre.shiny-text-output.noplaceholder:empty{margin:0;padding:0;border-width:0;height:0}pre.shiny-text-output{word-wrap:normal}.shiny-image-output img.shiny-scalable,.shiny-plot-output img.shiny-scalable{max-width:100%;max-height:100%}#shiny-disconnected-overlay{position:fixed;top:0;bottom:0;left:0;right:0;background-color:#999;opacity:.5;overflow:hidden;z-index:99998;pointer-events:none}.table.shiny-table>thead>tr>th,.table.shiny-table>thead>tr>td,.table.shiny-table>tbody>tr>th,.table.shiny-table>tbody>tr>td,.table.shiny-table>tfoot>tr>th,.table.shiny-table>tfoot>tr>td{padding-right:12px;padding-left:12px}.shiny-table.spacing-xs>thead>tr>th,.shiny-table.spacing-xs>thead>tr>td,.shiny-table.spacing-xs>tbody>tr>th,.shiny-table.spacing-xs>tbody>tr>td,.shiny-table.spacing-xs>tfoot>tr>th,.shiny-table.spacing-xs>tfoot>tr>td{padding-top:3px;padding-bottom:3px}.shiny-table.spacing-s>thead>tr>th,.shiny-table.spacing-s>thead>tr>td,.shiny-table.spacing-s>tbody>tr>th,.shiny-table.spacing-s>tbody>tr>td,.shiny-table.spacing-s>tfoot>tr>th,.shiny-table.spacing-s>tfoot>tr>td{padding-top:5px;padding-bottom:5px}.shiny-table.spacing-m>thead>tr>th,.shiny-table.spacing-m>thead>tr>td,.shiny-table.spacing-m>tbody>tr>th,.shiny-table.spacing-m>tbody>tr>td,.shiny-table.spacing-m>tfoot>tr>th,.shiny-table.spacing-m>tfoot>tr>td{padding-top:8px;padding-bottom:8px}.shiny-table.spacing-l>thead>tr>th,.shiny-table.spacing-l>thead>tr>td,.shiny-table.spacing-l>tbody>tr>th,.shiny-table.spacing-l>tbody>tr>td,.shiny-table.spacing-l>tfoot>tr>th,.shiny-table.spacing-l>tfoot>tr>td{padding-top:10px;padding-bottom:10px}.shiny-table .NA{color:#909090}.shiny-output-error{color:red;white-space:pre-wrap}.shiny-output-error:before{content:"Error: ";font-weight:bold}.shiny-output-error-validation{color:#888}.shiny-output-error-validation:before{content:"";font-weight:inherit}@supports (-ms-ime-align:auto){.shiny-bound-output{transition:0}}.recalculating{opacity:.3;transition:opacity .25s ease .5s}.slider-animate-container{text-align:right;margin-top:-9px}.slider-animate-button{opacity:.5}.slider-animate-button .pause{display:none}.slider-animate-button.playing .pause{display:inline}.slider-animate-button .play{display:inline}.slider-animate-button.playing .play{display:none}.progress.shiny-file-input-progress{visibility:hidden}.progress.shiny-file-input-progress .progress-bar.bar-danger{transition:none}.shiny-input-container input[type=file]{overflow:hidden;max-width:100%}.shiny-progress-container{position:fixed;top:0px;width:100%;z-index:2000}.shiny-progress .progress{position:absolute;width:100%;top:0px;height:3px;margin:0}.shiny-progress .bar{opacity:.6;transition-duration:.25s}.shiny-progress .progress-text{position:absolute;right:10px;width:240px;background-color:#eef8ff;margin:0;padding:2px 3px;opacity:.85}.shiny-progress .progress-text .progress-message{padding:0 3px;font-weight:bold;font-size:90%}.shiny-progress .progress-text .progress-detail{padding:0 3px;font-size:80%}.shiny-progress-notification .progress{margin-bottom:5px;height:10px}.shiny-progress-notification .progress-text .progress-message{font-weight:bold;font-size:90%}.shiny-progress-notification .progress-text .progress-detail{font-size:80%}.shiny-label-null{display:none}.crosshair{cursor:crosshair}.grabbable{cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.grabbing{cursor:grabbing;cursor:-moz-grabbing;cursor:-webkit-grabbing}.ns-resize{cursor:ns-resize}.ew-resize{cursor:ew-resize}.nesw-resize{cursor:nesw-resize}.nwse-resize{cursor:nwse-resize}.qt pre,.qt code{font-family:monospace!important}.qt5 .radio input[type=radio],.qt5 .checkbox input[type=checkbox]{margin-top:0}.selectize-control{margin-bottom:10px}.shiny-frame{border:none}.shiny-flow-layout>div{display:inline-block;vertical-align:top;padding-right:12px;width:220px}.shiny-split-layout{width:100%;white-space:nowrap}.shiny-split-layout>div{display:inline-block;vertical-align:top;box-sizing:border-box;overflow:auto}.shiny-input-panel{padding:6px 8px;margin-top:6px;margin-bottom:6px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:2px}.shiny-input-checkboxgroup label~.shiny-options-group,.shiny-input-radiogroup label~.shiny-options-group{margin-top:-10px}.shiny-input-checkboxgroup.shiny-input-container-inline label~.shiny-options-group,.shiny-input-radiogroup.shiny-input-container-inline label~.shiny-options-group{margin-top:-1px}.shiny-input-container:not(.shiny-input-container-inline){width:300px;max-width:100%}.well .shiny-input-container{width:auto}.shiny-input-container>div>select:not(.selectized){width:100%}#shiny-notification-panel{position:fixed;bottom:0;right:0;background-color:#0000;padding:2px;width:250px;z-index:99999}.shiny-notification{background-color:#e8e8e8;color:#333;border:1px solid #ccc;border-radius:3px;opacity:.85;padding:10px 8px 10px 10px;margin:2px}.shiny-notification-message{color:#31708f;background-color:#d9edf7;border:1px solid #bce8f1}.shiny-notification-warning{color:#8a6d3b;background-color:#fcf8e3;border:1px solid #faebcc}.shiny-notification-error{color:#a94442;background-color:#f2dede;border:1px solid #ebccd1}.shiny-notification-close{float:right;font-weight:bold;font-size:18px;bottom:9px;position:relative;padding-left:4px;color:#444;cursor:default}.shiny-notification-close:hover{color:#000}.shiny-notification-content-action a{color:#337ab7;text-decoration:underline;font-weight:bold}.shiny-file-input-active{box-shadow:inset 0 1px 1px #00000013,0 0 8px #66afe999}.shiny-file-input-over{box-shadow:inset 0 1px 1px #00000013,0 0 8px #4cae4c99}.datepicker table tbody tr td.disabled,.datepicker table tbody tr td.disabled:hover,.datepicker table tbody tr td span.disabled,.datepicker table tbody tr td span.disabled:hover{color:#aaa;cursor:not-allowed}.nav-hidden{display:none!important} diff --git a/inst/www/shared/shiny.min.js b/inst/www/shared/shiny.min.js index 606eaa1c29..3661ad3233 100644 --- a/inst/www/shared/shiny.min.js +++ b/inst/www/shared/shiny.min.js @@ -1,3 +1,3 @@ -/*! shiny 1.6.0.9021 | (c) 2012-2021 RStudio, PBC. | License: GPL-3 | file LICENSE */ -(function(){var xy=Object.create;var Zi=Object.defineProperty;var Oy=Object.getOwnPropertyDescriptor;var Sy=Object.getOwnPropertyNames;var Iy=Object.getPrototypeOf,Ry=Object.prototype.hasOwnProperty;var Py=function(e){return Zi(e,"__esModule",{value:!0})};var v=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}};var qy=function(e,t,r){if(t&&typeof t=="object"||typeof t=="function")for(var n=Sy(t),i=0,o=n.length,a;i0?Nh:Ch)(e)}});var fe=v(function($q,Xs){var Ah=ut(),$h=Math.min;Xs.exports=function(e){return e>0?$h(Ah(e),9007199254740991):0}});var Vt=v(function(Mq,Qs){var Mh=ut(),Vh=Math.max,Fh=Math.min;Qs.exports=function(e,t){var r=Mh(e);return r<0?Vh(r+t,0):Fh(r,t)}});var co=v(function(Vq,Zs){var Lh=Te(),zh=fe(),Uh=Vt(),Js=function(e){return function(t,r,n){var i=Lh(t),o=zh(i.length),a=Uh(n,o),u;if(e&&r!=r){for(;o>a;)if(u=i[a++],u!=u)return!0}else for(;o>a;a++)if((e||a in i)&&i[a]===r)return e||a||0;return!e&&-1}};Zs.exports={includes:Js(!0),indexOf:Js(!1)}});var mo=v(function(Fq,el){var po=le(),Hh=Te(),Gh=co().indexOf,Kh=pr();el.exports=function(e,t){var r=Hh(e),n=0,i=[],o;for(o in r)!po(Kh,o)&&po(r,o)&&i.push(o);for(;t.length>n;)po(r,o=t[n++])&&(~Gh(i,o)||i.push(o));return i}});var sn=v(function(Lq,tl){tl.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var Ft=v(function(rl){var Wh=mo(),Yh=sn(),Xh=Yh.concat("length","prototype");rl.f=Object.getOwnPropertyNames||function(t){return Wh(t,Xh)}});var vo=v(function(nl){nl.f=Object.getOwnPropertySymbols});var ol=v(function(Hq,il){var Qh=St(),Jh=Ft(),Zh=vo(),eg=Y();il.exports=Qh("Reflect","ownKeys")||function(t){var r=Jh.f(eg(t)),n=Zh.f;return n?r.concat(n(t)):r}});var yo=v(function(Gq,al){var tg=le(),rg=ol(),ng=xt(),ig=de();al.exports=function(e,t){for(var r=rg(t),n=ig.f,i=ng.f,o=0;o>>0||(Pg.test(n)?16:10))}:fn});var xo=v(function(fT,ql){"use strict";var Ng=Y();ql.exports=function(){var e=Ng(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}});var So=v(function(Oo){"use strict";var Tl=M();function El(e,t){return RegExp(e,t)}Oo.UNSUPPORTED_Y=Tl(function(){var e=El("a","y");return e.lastIndex=2,e.exec("abcd")!=null});Oo.BROKEN_CARET=Tl(function(){var e=El("^r","gy");return e.lastIndex=2,e.exec("str")!=null})});var gr=v(function(pT,Cl){"use strict";var Ag=xo(),kl=So(),$g=fr(),cn=RegExp.prototype.exec,Mg=$g("native-string-replace",String.prototype.replace),Bl=cn,Io=function(){var e=/a/,t=/b*/g;return cn.call(e,"a"),cn.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),Dl=kl.UNSUPPORTED_Y||kl.BROKEN_CARET,Ro=/()??/.exec("")[1]!==void 0,Vg=Io||Ro||Dl;Vg&&(Bl=function(t){var r=this,n,i,o,a,u=Dl&&r.sticky,l=Ag.call(r),s=r.source,f=0,c=t;return u&&(l=l.replace("y",""),l.indexOf("g")===-1&&(l+="g"),c=String(t).slice(r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&t[r.lastIndex-1]!=="\n")&&(s="(?: "+s+")",c=" "+c,f++),i=new RegExp("^(?:"+s+")",l)),Ro&&(i=new RegExp("^"+s+"$(?!\\s)",l)),Io&&(n=r.lastIndex),o=cn.call(u?i:r,c),u?o?(o.input=o.input.slice(f),o[0]=o[0].slice(f),o.index=r.lastIndex,r.lastIndex+=o[0].length):r.lastIndex=0:Io&&o&&(r.lastIndex=r.global?o.index+o[0].length:n),Ro&&o&&o.length>1&&Mg.call(o[0],i,function(){for(a=1;a=74)&&(Ve=Po.match(/Chrome\/(\d+)/),Ve&&(pn=Ve[1])));Ll.exports=pn&&+pn});var dn=v(function(hT,Ul){var zl=br(),Ug=M();Ul.exports=!!Object.getOwnPropertySymbols&&!Ug(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&zl&&zl<41})});var qo=v(function(gT,Hl){var Hg=dn();Hl.exports=Hg&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var G=v(function(bT,Wl){var Gg=z(),Kg=fr(),Gl=le(),Wg=on(),Kl=dn(),Yg=qo(),jr=Kg("wks"),wr=Gg.Symbol,Xg=Yg?wr:wr&&wr.withoutSetter||Wg;Wl.exports=function(e){return(!Gl(jr,e)||!(Kl||typeof jr[e]=="string"))&&(Kl&&Gl(wr,e)?jr[e]=wr[e]:jr[e]=Xg("Symbol."+e)),jr[e]}});var _r=v(function(jT,Zl){"use strict";Ie();var Yl=We(),Qg=gr(),mn=M(),To=G(),Jg=Se(),Zg=To("species"),Eo=RegExp.prototype,eb=!mn(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$")!=="7"}),Xl=function(){return"a".replace(/./,"$0")==="$0"}(),Ql=To("replace"),Jl=function(){return/./[Ql]?/./[Ql]("a","$0")==="":!1}(),tb=!mn(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return r.length!==2||r[0]!=="a"||r[1]!=="b"});Zl.exports=function(e,t,r,n){var i=To(e),o=!mn(function(){var c={};return c[i]=function(){return 7},""[e](c)!=7}),a=o&&!mn(function(){var c=!1,p=/a/;return e==="split"&&(p={},p.constructor={},p.constructor[Zg]=function(){return p},p.flags="",p[i]=/./[i]),p.exec=function(){return c=!0,null},p[i](""),!c});if(!o||!a||e==="replace"&&!(eb&&Xl&&!Jl)||e==="split"&&!tb){var u=/./[i],l=r(i,""[e],function(c,p,m,d,y){var h=p.exec;return h===Qg||h===Eo.exec?o&&!y?{done:!0,value:u.call(p,m,d)}:{done:!0,value:c.call(m,p,d)}:{done:!1}},{REPLACE_KEEPS_$0:Xl,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:Jl}),s=l[0],f=l[1];Yl(String.prototype,e,s),Yl(Eo,i,t==2?function(c,p){return f.call(c,this,p)}:function(c){return f.call(c,this)})}n&&Jg(Eo[i],"sham",!0)}});var ko=v(function(wT,tf){var rb=ut(),nb=Ke(),ef=function(e){return function(t,r){var n=String(nb(t)),i=rb(r),o=n.length,a,u;return i<0||i>=o?e?"":void 0:(a=n.charCodeAt(i),a<55296||a>56319||i+1===o||(u=n.charCodeAt(i+1))<56320||u>57343?e?n.charAt(i):a:e?n.slice(i,i+2):(a-55296<<10)+(u-56320)+65536)}};tf.exports={codeAt:ef(!1),charAt:ef(!0)}});var vn=v(function(_T,rf){"use strict";var ib=ko().charAt;rf.exports=function(e,t,r){return t+(r?ib(e,t).length:1)}});var of=v(function(xT,nf){var ob=be(),ab=Math.floor,ub="".replace,sb=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,lb=/\$([$&'`]|\d{1,2})/g;nf.exports=function(e,t,r,n,i,o){var a=r+e.length,u=n.length,l=lb;return i!==void 0&&(i=ob(i),l=sb),ub.call(o,l,function(s,f){var c;switch(f.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(a);case"<":c=i[f.slice(1,-1)];break;default:var p=+f;if(p===0)return s;if(p>u){var m=ab(p/10);return m===0?s:m<=u?n[m-1]===void 0?f.charAt(1):n[m-1]+f.charAt(1):s}c=n[p-1]}return c===void 0?"":c})}});var xr=v(function(OT,af){var fb=Ge(),cb=gr();af.exports=function(e,t){var r=e.exec;if(typeof r=="function"){var n=r.call(e,t);if(typeof n!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return n}if(fb(e)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return cb.call(e,t)}});var yn=v(function(IT,sf){var xb=G(),Ob=xb("toStringTag"),uf={};uf[Ob]="z";sf.exports=String(uf)==="[object z]"});var Bo=v(function(RT,lf){var Sb=yn(),hn=Ge(),Ib=G(),Rb=Ib("toStringTag"),Pb=hn(function(){return arguments}())=="Arguments",qb=function(e,t){try{return e[t]}catch(r){}};lf.exports=Sb?hn:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=qb(t=Object(e),Rb))=="string"?r:Pb?hn(t):(n=hn(t))=="Object"&&typeof t.callee=="function"?"Arguments":n}});var cf=v(function(PT,ff){"use strict";var Tb=yn(),Eb=Bo();ff.exports=Tb?{}.toString:function(){return"[object "+Eb(this)+"]"}});var vf=v(function(ET,mf){var Fb=z(),Lb=hr().trim,zb=yr(),Co=Fb.parseFloat,Ub=1/Co(zb+"-0")!=-Infinity;mf.exports=Ub?function(t){var r=Lb(String(t)),n=Co(r);return n===0&&r.charAt(0)=="-"?-0:n}:Co});var gf=v(function(BT,hf){var Gb=Ge();hf.exports=function(e){if(typeof e!="number"&&Gb(e)!="Number")throw TypeError("Incorrect invocation");return+e}});var Or=v(function(CT,wf){var Yb=Ge();wf.exports=Array.isArray||function(t){return Yb(t)=="Array"}});var Sr=v(function(NT,_f){"use strict";var Xb=$t(),Qb=de(),Jb=At();_f.exports=function(e,t,r){var n=Xb(t);n in e?Qb.f(e,n,Jb(0,r)):e[n]=r}});var bn=v(function(AT,Of){var Zb=re(),xf=Or(),ej=G(),tj=ej("species");Of.exports=function(e,t){var r;return xf(e)&&(r=e.constructor,typeof r=="function"&&(r===Array||xf(r.prototype))?r=void 0:Zb(r)&&(r=r[tj],r===null&&(r=void 0))),new(r===void 0?Array:r)(t===0?0:t)}});var Lt=v(function($T,Sf){var rj=M(),nj=G(),ij=br(),oj=nj("species");Sf.exports=function(e){return ij>=51||!rj(function(){var t=[],r=t.constructor={};return r[oj]=function(){return{foo:1}},t[e](Boolean).foo!==1})}});var Ir=v(function(LT,kf){var Uj=mo(),Hj=sn();kf.exports=Object.keys||function(t){return Uj(t,Hj)}});var Cf=v(function(UT,Df){var Xj=re(),Qj=Ge(),Jj=G(),Zj=Jj("match");Df.exports=function(e){var t;return Xj(e)&&((t=e[Zj])!==void 0?!!t:Qj(e)=="RegExp")}});var zt=v(function(HT,Nf){Nf.exports=function(e){if(typeof e!="function")throw TypeError(String(e)+" is not a function");return e}});var No=v(function(GT,$f){var Af=Y(),ew=zt(),tw=G(),rw=tw("species");$f.exports=function(e,t){var r=Af(e).constructor,n;return r===void 0||(n=Af(r)[rw])==null?t:ew(n)}});var Uo=v(function(hE,rc){var gw=zt();rc.exports=function(e,t,r){if(gw(e),t===void 0)return e;switch(r){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,i){return e.call(t,n,i)};case 3:return function(n,i,o){return e.call(t,n,i,o)}}return function(){return e.apply(t,arguments)}}});var Gt=v(function(gE,ic){var bw=Uo(),jw=sr(),ww=be(),_w=fe(),xw=bn(),nc=[].push,st=function(e){var t=e==1,r=e==2,n=e==3,i=e==4,o=e==6,a=e==7,u=e==5||o;return function(l,s,f,c){for(var p=ww(l),m=jw(p),d=bw(s,f,3),y=_w(m.length),h=0,g=c||xw,w=t?g(l,y):r||a?g(l,0):void 0,I,_;y>h;h++)if((u||h in m)&&(I=m[h],_=d(I,h,p),e))if(t)w[h]=_;else if(_)switch(e){case 3:return!0;case 5:return I;case 6:return h;case 2:nc.call(w,I)}else switch(e){case 4:return!1;case 7:nc.call(w,I)}return o?-1:n||i?i:w}};ic.exports={forEach:st(0),map:st(1),filter:st(2),some:st(3),every:st(4),find:st(5),findIndex:st(6),filterOut:st(7)}});var ac=v(function(bE,oc){var Ow=pe(),Sw=de(),Iw=Y(),Rw=Ir();oc.exports=Ow?Object.defineProperties:function(t,r){Iw(t);for(var n=Rw(r),i=n.length,o=0,a;i>o;)Sw.f(t,a=n[o++],r[a]);return t}});var sc=v(function(jE,uc){var Pw=St();uc.exports=Pw("document","documentElement")});var Kt=v(function(wE,mc){var qw=Y(),Tw=ac(),lc=sn(),Ew=pr(),kw=sc(),Bw=to(),Dw=cr(),fc=">",cc="<",Ho="prototype",Go="script",pc=Dw("IE_PROTO"),Ko=function(){},dc=function(e){return cc+Go+fc+e+cc+"/"+Go+fc},Cw=function(e){e.write(dc("")),e.close();var t=e.parentWindow.Object;return e=null,t},Nw=function(){var e=Bw("iframe"),t="java"+Go+":",r;return e.style.display="none",kw.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(dc("document.F=Object")),r.close(),r.F},Wo,xn=function(){try{Wo=document.domain&&new ActiveXObject("htmlfile")}catch(t){}xn=Wo?Cw(Wo):Nw();for(var e=lc.length;e--;)delete xn[Ho][lc[e]];return xn()};Ew[pc]=!0;mc.exports=Object.create||function(t,r){var n;return t!==null?(Ko[Ho]=qw(t),n=new Ko,Ko[Ho]=null,n[pc]=t):n=xn(),r===void 0?n:Tw(n,r)}});var Qo=v(function(_E,vc){var Aw=G(),$w=Kt(),Mw=de(),Yo=Aw("unscopables"),Xo=Array.prototype;Xo[Yo]==null&&Mw.f(Xo,Yo,{configurable:!0,value:$w(null)});vc.exports=function(e){Xo[Yo][e]=!0}});var gc=v(function(OE,hc){var zw=re();hc.exports=function(e){if(!zw(e)&&e!==null)throw TypeError("Can't set "+String(e)+" as a prototype");return e}});var qr=v(function(SE,bc){var Uw=Y(),Hw=gc();bc.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},r;try{r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,r.call(t,[]),e=t instanceof Array}catch(n){}return function(i,o){return Uw(i),Hw(o),e?r.call(i,o):i.__proto__=o,i}}():void 0)});var Zo=v(function(RE,jc){var Ww=M();jc.exports=!Ww(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})});var Wt=v(function(PE,_c){var Yw=le(),Xw=be(),Qw=cr(),Jw=Zo(),wc=Qw("IE_PROTO"),Zw=Object.prototype;_c.exports=Jw?Object.getPrototypeOf:function(e){return e=Xw(e),Yw(e,wc)?e[wc]:typeof e.constructor=="function"&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Zw:null}});var Ic=v(function(TE,Sc){"use strict";var o_=zt(),a_=re(),Oc=[].slice,ea={},u_=function(e,t,r){if(!(t in ea)){for(var n=[],i=0;i=t.length?(e.target=void 0,{value:void 0,done:!0}):r=="keys"?{value:n,done:!1}:r=="values"?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values");Sp.Arguments=Sp.Array;Ra("keys");Ra("values");Ra("entries")});var Pa=v(function(HE,Ep){Ep.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var Vp=v(function(uk,Mp){var Ix=M(),Ap=yr(),$p="\u200B\x85\u180E";Mp.exports=function(e){return Ix(function(){return!!Ap[e]()||$p[e]()!=$p||Ap[e].name!==e})}});var Gp=v(function(Ok,Hp){var $x=re(),Up=qr();Hp.exports=function(e,t,r){var n,i;return Up&&typeof(n=t.constructor)=="function"&&n!==r&&$x(i=n.prototype)&&i!==r.prototype&&Up(e,i),e}});var pm=v(function(fN,cm){cm.exports=Object.is||function(t,r){return t===r?t!==0||1/t==1/r:t!=t&&r!=r}});var _m=v(function(zN,wm){var NI=pe(),AI=Ir(),$I=Te(),MI=en().f,jm=function(e){return function(t){for(var r=$I(t),n=AI(r),i=n.length,o=0,a=[],u;i>o;)u=n[o++],(!NI||MI.call(r,u))&&a.push(e?[u,r[u]]:r[u]);return a}};wm.exports={entries:jm(!0),values:jm(!1)}});var Om=v(function(HN,xm){var LI=Y();xm.exports=function(e){var t=e.return;if(t!==void 0)return LI(t.call(e)).value}});var Im=v(function(GN,Sm){var zI=Y(),UI=Om();Sm.exports=function(e,t,r,n){try{return n?t(zI(r)[0],r[1]):t(r)}catch(i){throw UI(e),i}}});var Pm=v(function(KN,Rm){var HI=G(),GI=Jt(),KI=HI("iterator"),WI=Array.prototype;Rm.exports=function(e){return e!==void 0&&(GI.Array===e||WI[KI]===e)}});var Tm=v(function(WN,qm){var YI=Bo(),XI=Jt(),QI=G(),JI=QI("iterator");qm.exports=function(e){if(e!=null)return e[JI]||e["@@iterator"]||XI[YI(e)]}});var Bm=v(function(YN,km){"use strict";var ZI=Uo(),e0=be(),t0=Im(),r0=Pm(),n0=fe(),Em=Sr(),i0=Tm();km.exports=function(t){var r=e0(t),n=typeof this=="function"?this:Array,i=arguments.length,o=i>1?arguments[1]:void 0,a=o!==void 0,u=i0(r),l=0,s,f,c,p,m,d;if(a&&(o=ZI(o,i>2?arguments[2]:void 0,2)),u!=null&&!(n==Array&&r0(u)))for(p=u.call(r),m=p.next,f=new n;!(c=m.call(p)).done;l++)d=a?t0(p,o,[c.value,l],!0):c.value,Em(f,l,d);else for(s=n0(r.length),f=new n(s);s>l;l++)d=a?o(r[l],l):r[l],Em(f,l,d);return f.length=l,f}});var $m=v(function(XN,Am){var o0=G(),Dm=o0("iterator"),Cm=!1;try{Nm=0,su={next:function(){return{done:!!Nm++}},return:function(){Cm=!0}},su[Dm]=function(){return this},Array.from(su,function(){throw 2})}catch(e){}var Nm,su;Am.exports=function(e,t){if(!t&&!Cm)return!1;var r=!1;try{var n={};n[Dm]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(i){}return r}});var Cu=v(function(iF,jv){jv.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"});var _v=v(function(oF,wv){var WR=We();wv.exports=function(e,t,r){for(var n in t)WR(e,n,t[n],r);return e}});var Ov=v(function(aF,xv){xv.exports=function(e,t,r){if(!(e instanceof t))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return e}});var Iv=v(function(uF,Sv){var YR=ut(),XR=fe();Sv.exports=function(e){if(e===void 0)return 0;var t=YR(e),r=XR(t);if(t!==r)throw RangeError("Wrong length or index");return r}});var Pv=v(function(sF,Rv){var QR=Math.abs,rt=Math.pow,JR=Math.floor,ZR=Math.log,eP=Math.LN2,tP=function(e,t,r){var n=new Array(r),i=r*8-t-1,o=(1<>1,u=t===23?rt(2,-24)-rt(2,-77):0,l=e<0||e===0&&1/e<0?1:0,s=0,f,c,p;for(e=QR(e),e!=e||e===Infinity?(c=e!=e?1:0,f=o):(f=JR(ZR(e)/eP),e*(p=rt(2,-f))<1&&(f--,p*=2),f+a>=1?e+=u/p:e+=u*rt(2,1-a),e*p>=2&&(f++,p/=2),f+a>=o?(c=0,f=o):f+a>=1?(c=(e*p-1)*rt(2,t),f=f+a):(c=e*rt(2,a-1)*rt(2,t),f=0));t>=8;n[s++]=c&255,c/=256,t-=8);for(f=f<0;n[s++]=f&255,f/=256,i-=8);return n[--s]|=l*128,n},rP=function(e,t){var r=e.length,n=r*8-t-1,i=(1<>1,a=n-7,u=r-1,l=e[u--],s=l&127,f;for(l>>=7;a>0;s=s*256+e[u],u--,a-=8);for(f=s&(1<<-a)-1,s>>=-a,a+=t;a>0;f=f*256+e[u],u--,a-=8);if(s===0)s=1-o;else{if(s===i)return f?NaN:l?-Infinity:Infinity;f=f+rt(2,t),s=s-o}return(l?-1:1)*f*rt(2,s-t)};Rv.exports={pack:tP,unpack:rP}});var Ev=v(function(lF,Tv){"use strict";var nP=be(),qv=Vt(),iP=fe();Tv.exports=function(t){for(var r=nP(this),n=iP(r.length),i=arguments.length,o=qv(i>1?arguments[1]:void 0,n),a=i>2?arguments[2]:void 0,u=a===void 0?n:qv(a,n);u>o;)r[o++]=t;return r}});var Yi=v(function(fF,Kv){"use strict";var Nu=z(),Au=pe(),oP=Cu(),aP=Se(),kv=_v(),$u=M(),Fi=Ov(),uP=ut(),sP=fe(),Li=Iv(),Bv=Pv(),lP=Wt(),Dv=qr(),fP=Ft().f,cP=de().f,pP=Ev(),Cv=Tr(),Nv=Mt(),ur=Nv.get,Av=Nv.set,zi="ArrayBuffer",Ui="DataView",Xr="prototype",dP="Wrong length",$v="Wrong index",$e=Nu[zi],Oe=$e,Me=Nu[Ui],Hi=Me&&Me[Xr],Mv=Object.prototype,Gi=Nu.RangeError,Vv=Bv.pack,Fv=Bv.unpack,Lv=function(e){return[e&255]},zv=function(e){return[e&255,e>>8&255]},Uv=function(e){return[e&255,e>>8&255,e>>16&255,e>>24&255]},Hv=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},mP=function(e){return Vv(e,23,4)},vP=function(e){return Vv(e,52,8)},Ki=function(e,t){cP(e[Xr],t,{get:function(){return ur(this)[t]}})},jt=function(e,t,r,n){var i=Li(r),o=ur(e);if(i+t>o.byteLength)throw Gi($v);var a=ur(o.buffer).bytes,u=i+o.byteOffset,l=a.slice(u,u+t);return n?l:l.reverse()},wt=function(e,t,r,n,i,o){var a=Li(r),u=ur(e);if(a+t>u.byteLength)throw Gi($v);for(var l=ur(u.buffer).bytes,s=a+u.byteOffset,f=n(+i),c=0;ci)throw Gi("Wrong offset");if(n=n===void 0?i-o:sP(n),o+n>i)throw Gi(dP);Av(this,{buffer:t,byteLength:n,byteOffset:o}),Au||(this.buffer=t,this.byteLength=n,this.byteOffset=o)},Au&&(Ki(Oe,"byteLength"),Ki(Me,"buffer"),Ki(Me,"byteLength"),Ki(Me,"byteOffset")),kv(Me[Xr],{getInt8:function(t){return jt(this,1,t)[0]<<24>>24},getUint8:function(t){return jt(this,1,t)[0]},getInt16:function(t){var r=jt(this,2,t,arguments.length>1?arguments[1]:void 0);return(r[1]<<8|r[0])<<16>>16},getUint16:function(t){var r=jt(this,2,t,arguments.length>1?arguments[1]:void 0);return r[1]<<8|r[0]},getInt32:function(t){return Hv(jt(this,4,t,arguments.length>1?arguments[1]:void 0))},getUint32:function(t){return Hv(jt(this,4,t,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(t){return Fv(jt(this,4,t,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(t){return Fv(jt(this,8,t,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(t,r){wt(this,1,t,Lv,r)},setUint8:function(t,r){wt(this,1,t,Lv,r)},setInt16:function(t,r){wt(this,2,t,zv,r,arguments.length>2?arguments[2]:void 0)},setUint16:function(t,r){wt(this,2,t,zv,r,arguments.length>2?arguments[2]:void 0)},setInt32:function(t,r){wt(this,4,t,Uv,r,arguments.length>2?arguments[2]:void 0)},setUint32:function(t,r){wt(this,4,t,Uv,r,arguments.length>2?arguments[2]:void 0)},setFloat32:function(t,r){wt(this,4,t,mP,r,arguments.length>2?arguments[2]:void 0)},setFloat64:function(t,r){wt(this,8,t,vP,r,arguments.length>2?arguments[2]:void 0)}});else{if(!$u(function(){$e(1)})||!$u(function(){new $e(-1)})||$u(function(){return new $e,new $e(1.5),new $e(NaN),$e.name!=zi})){for(Oe=function(t){return Fi(this,Oe),new $e(Li(t))},Gv=Oe[Xr]=$e[Xr],Mu=fP($e),Vu=0;Mu.length>Vu;)(Wi=Mu[Vu++])in Oe||aP(Oe,Wi,$e[Wi]);Gv.constructor=Oe}Dv&&lP(Hi)!==Mv&&Dv(Hi,Mv),Qr=new Me(new Oe(2)),Fu=Hi.setInt8,Qr.setInt8(0,2147483648),Qr.setInt8(1,2147483649),(Qr.getInt8(0)||!Qr.getInt8(1))&&kv(Hi,{setInt8:function(t,r){Fu.call(this,t,r<<24>>24)},setUint8:function(t,r){Fu.call(this,t,r<<24>>24)}},{unsafe:!0})}var Gv,Mu,Vu,Wi,Qr,Fu;Cv(Oe,zi);Cv(Me,Ui);Kv.exports={ArrayBuffer:Oe,DataView:Me}});var Xv=v(function(cF,Yv){"use strict";var yP=St(),hP=de(),gP=G(),bP=pe(),Wv=gP("species");Yv.exports=function(e){var t=yP(e),r=hP.f;bP&&t&&!t[Wv]&&r(t,Wv,{configurable:!0,get:function(){return this}})}});var oy=v(function(vF,iy){var BP=zt(),DP=be(),CP=sr(),NP=fe(),ny=function(e){return function(t,r,n,i){BP(r);var o=DP(t),a=CP(o),u=NP(o.length),l=e?u-1:0,s=e?-1:1;if(n<2)for(;;){if(l in a){i=a[l],l+=s;break}if(l+=s,e?l<0:u<=l)throw TypeError("Reduce of empty array with no initial value")}for(;e?l>=0:u>l;l+=s)l in a&&(i=r(i,a[l],l,o));return i}};iy.exports={left:ny(!1),right:ny(!0)}});var uy=v(function(yF,ay){var AP=Ge(),$P=z();ay.exports=AP($P.process)=="process"});var Uu=v(function(gF,ly){"use strict";var HP=Gt().forEach,GP=vr(),KP=GP("forEach");ly.exports=KP?[].forEach:function(t){return HP(this,t,arguments.length>1?arguments[1]:void 0)}});var Yu=j(E());function Xu(){(0,Yu.default)(document).on("submit","form:not([action])",function(e){e.preventDefault()})}var Qu=j(E());function Ju(){var e=window.history.pushState;window.history.pushState=function(){for(var t=arguments.length,r=new Array(t),n=0;n1?arguments[1]:void 0)}});var Tg=A(),hl=yl();Tg({global:!0,forced:parseInt!=hl},{parseInt:hl});var wo=j(E());var gl=!1,bl=!1,jl=-1;function jo(e){gl=e}function wl(e){bl=e}function _l(e){jl=e}function xl(){return gl}function It(){return bl}function Ol(){return jl}var je;function Sl(e){je=e}function Eg(){var e=je.indexOf("MSIE ");if(It()&&e>0)return parseInt(je.substring(e+5,je.indexOf(".",e)),10);var t=je.indexOf("Trident/");if(t>0){var r=je.indexOf("rv:");return parseInt(je.substring(r+3,je.indexOf(".",r)),10)}return-1}function Il(){/\bQt\//.test(je)?((0,wo.default)(document.documentElement).addClass("qt"),jo(!0)):jo(!1),/\bQt\/5/.test(je)&&/Linux/.test(je)&&(0,wo.default)(document.documentElement).addClass("qt5"),wl(/MSIE|Trident|Edge/.test(je)),_l(Eg())}function Rl(){return window.Shiny||(window.Shiny={}),window.Shiny}var hy=j(E());var kg=pe(),Bg=de().f,_o=Function.prototype,Dg=_o.toString,Cg=/^\s*function ([^ (]*)/,Pl="name";kg&&!(Pl in _o)&&Bg(_o,Pl,{configurable:!0,get:function(){try{return Dg.call(this).match(Cg)[1]}catch(e){return""}}});var QT=j(Ie());"use strict";var pb=_r(),db=Y(),mb=fe(),vb=ut(),yb=Ke(),hb=vn(),gb=of(),bb=xr(),jb=Math.max,wb=Math.min,_b=function(e){return e===void 0?e:String(e)};pb("replace",2,function(e,t,r,n){var i=n.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,o=n.REPLACE_KEEPS_$0,a=i?"$":"$0";return[function(l,s){var f=yb(this),c=l==null?void 0:l[e];return c!==void 0?c.call(l,f,s):t.call(String(f),l,s)},function(u,l){if(!i&&o||typeof l=="string"&&l.indexOf(a)===-1){var s=r(t,u,this,l);if(s.done)return s.value}var f=db(u),c=String(this),p=typeof l=="function";p||(l=String(l));var m=f.global;if(m){var d=f.unicode;f.lastIndex=0}for(var y=[];;){var h=bb(f,c);if(h===null||(y.push(h),!m))break;var g=String(h[0]);g===""&&(f.lastIndex=hb(c,mb(f.lastIndex),d))}for(var w="",I=0,_=0;_=I&&(w+=c.slice(I,D)+ge,I=D+P.length)}return w+c.slice(I)}]});var kb=yn(),Bb=We(),Db=cf();kb||Bb(Object.prototype,"toString",Db,{unsafe:!0});"use strict";var Cb=We(),Nb=Y(),Ab=M(),$b=xo(),Do="toString",pf=RegExp.prototype,df=pf[Do],Mb=Ab(function(){return df.call({source:"a",flags:"b"})!="/a/b"}),Vb=df.name!=Do;(Mb||Vb)&&Cb(RegExp.prototype,Do,function(){var t=Nb(this),r=String(t.source),n=t.flags,i=String(n===void 0&&t instanceof RegExp&&!("flags"in pf)?$b.call(t):n);return"/"+r+"/"+i},{unsafe:!0});var Hb=A(),yf=vf();Hb({global:!0,forced:parseFloat!=yf},{parseFloat:yf});"use strict";var Kb=A(),bf=M(),jf=gf(),gn=1 .toPrecision,Wb=bf(function(){return gn.call(1,void 0)!=="1"})||!bf(function(){gn.call({})});Kb({target:"Number",proto:!0,forced:Wb},{toPrecision:function(t){return t===void 0?gn.call(jf(this)):gn.call(jf(this),t)}});"use strict";var aj=A(),uj=M(),sj=Or(),lj=re(),fj=be(),cj=fe(),If=Sr(),pj=bn(),dj=Lt(),mj=G(),vj=br(),Rf=mj("isConcatSpreadable"),Pf=9007199254740991,qf="Maximum allowed index exceeded",yj=vj>=51||!uj(function(){var e=[];return e[Rf]=!1,e.concat()[0]!==e}),hj=dj("concat"),gj=function(e){if(!lj(e))return!1;var t=e[Rf];return t!==void 0?!!t:sj(e)},bj=!yj||!hj;aj({target:"Array",proto:!0,forced:bj},{concat:function(t){var r=fj(this),n=pj(r,0),i=0,o,a,u,l,s;for(o=-1,u=arguments.length;oPf)throw TypeError(qf);for(a=0;a=Pf)throw TypeError(qf);If(n,i++,s)}return n.length=i,n}});"use strict";var jj=A(),wj=re(),Tf=Or(),Ef=Vt(),_j=fe(),xj=Te(),Oj=Sr(),Sj=G(),Ij=Lt(),Rj=Ij("slice"),Pj=Sj("species"),qj=[].slice,Tj=Math.max;jj({target:"Array",proto:!0,forced:!Rj},{slice:function(t,r){var n=xj(this),i=_j(n.length),o=Ef(t,i),a=Ef(r===void 0?i:r,i),u,l,s;if(Tf(n)&&(u=n.constructor,typeof u=="function"&&(u===Array||Tf(u.prototype))?u=void 0:wj(u)&&(u=u[Pj],u===null&&(u=void 0)),u===Array||u===void 0))return qj.call(n,o,a);for(l=new(u===void 0?Array:u)(Tj(a-o,0)),s=0;oLj)throw TypeError(zj);for(s=Nj(n,l),f=0;fi-l+u;f--)delete n[f-1]}else if(u>l)for(f=i-l;f>o;f--)c=f+l-1,p=f+u-1,c in n?n[p]=n[c]:delete n[p];for(f=0;f1||"".split(/.?/).length?n=function(i,o){var a=String(Mf(this)),u=o===void 0?Ff:o>>>0;if(u===0)return[];if(i===void 0)return[a];if(!iw(i))return t.call(a,i,u);for(var l=[],s=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),f=0,c=new RegExp(i.source,s+"g"),p,m,d;(p=lw.call(c,a))&&(m=c.lastIndex,!(m>f&&(l.push(a.slice(f,p.index)),p.length>1&&p.index=u)));)c.lastIndex===p.index&&c.lastIndex++;return f===a.length?(d||!c.test(""))&&l.push(""):l.push(a.slice(f)),l.length>u?l.slice(0,u):l}:"0".split(void 0,0).length?n=function(i,o){return i===void 0&&o===0?[]:t.call(this,i,o)}:n=t,[function(o,a){var u=Mf(this),l=o==null?void 0:o[e];return l!==void 0?l.call(o,u,a):n.call(String(u),o,a)},function(i,o){var a=r(n,i,this,o,n!==t);if(a.done)return a.value;var u=ow(i),l=String(this),s=aw(u,RegExp),f=u.unicode,c=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(Ut?"g":"y"),p=new s(Ut?"^(?:"+u.source+")":u,c),m=o===void 0?Ff:o>>>0;if(m===0)return[];if(l.length===0)return Vf(p,l)===null?[l]:[];for(var d=0,y=0,h=[];y":">",'"':""","'":"'","/":"/"};return e.replace(/[&<>'"/]/g,function(r){return t[r]})}function wn(){return Math.floor(4294967296+Math.random()*64424509440).toString(16)}function Rt(e){if(!(!e||!e.toLowerCase))switch(e.toLowerCase()){case"true":return!0;case"false":return!1;default:return}}function Fe(e,t){var r=void 0;if(e.currentStyle)r=e.currentStyle[t];else if(window.getComputedStyle){var n=document.defaultView.getComputedStyle(e,null);n&&(r=n.getPropertyValue(t))}return r}function Gf(e,t){for(var r=e.toString();r.length1&&arguments[1]!==void 0?arguments[1]:1;if(t<1)throw"Significant digits must be at least 1.";return parseFloat(e.toPrecision(t))}function Kf(e){var t=new Date(e);return t.toString()==="Invalid Date"&&(t=new Date(e.replace(/-/g,"/"))),t}function Ee(e){return e instanceof Date?e.getUTCFullYear()+"-"+Gf(e.getUTCMonth()+1,2)+"-"+Gf(e.getUTCDate(),2):null}function Wf(e,t){var r={};return function(){var n={w:e.offsetWidth,h:e.offsetHeight};n.w===0&&n.h===0||n.w===r.w&&n.h===r.h||(r=n,t(n.w,n.h))}}function Mo(){return Ao()?Math.round(Ao()*100)/100:1}function Yf(e){var t=e.replace(/[\\"']/g,"\\$&").replace(/\u0000/g,"\\0").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\b]/g,"\\b"),r;try{r=new Function("with (this) {\n try {\n return (".concat(e,");\n } catch (e) {\n console.error('Error evaluating expression: ").concat(t,"');\n throw e;\n }\n }"))}catch(n){throw console.error("Error parsing expression: "+e),n}return function(n){return r.call(n)}}function Ht(e){return e==null?[]:Array.isArray(e)?e:[e]}function Xf(e,t){function r(s,f,c){for(var p=0,m=0,d=[];p?@[\\\]^`{|}~])/g,"\\$1")};function ke(e,t){var r={};for(var n in e)O(e,n)&&(r[n]=t(e[n],n,e));return r}function Qf(e){return typeof e=="number"&&isNaN(e)}function Vo(e,t){if(Rr.default.type(e)==="object"&&Rr.default.type(t)==="object"){var r=e,n=t;if(Object.keys(r).length!==Object.keys(n).length)return!1;for(var i in r)if(!O(n,i)||!Vo(r[i],n[i]))return!1;return!0}else if(Rr.default.type(e)==="array"&&Rr.default.type(t)==="array"){var o=e,a=t;if(o.length!==a.length)return!1;for(var u=0;u=")return a>=0;if(r===">")return a>0;if(r==="<=")return a<=0;if(r==="<")return a<0;throw"Unknown operator: ".concat(r)};function ne(e,t){if(typeof e!="undefined"){if(t.length!==1)throw new Error("labelNode must be of length 1");var r=Array.isArray(e)&&e.length===0;r?t.addClass("shiny-label-null"):(t.text(e),t.removeClass("shiny-label-null"))}}function Pr(e){var t=document.createElement("a");t.href="/";var r=document.createElement("div");r.style.setProperty("position","absolute","important"),r.style.setProperty("top","-1000px","important"),r.style.setProperty("left","0","important"),r.style.setProperty("width","30px","important"),r.style.setProperty("height","10px","important"),r.appendChild(t),e.appendChild(r);var n=window.getComputedStyle(t).getPropertyValue("color");return e.removeChild(r),n}function Lo(){return!window.bootstrap}function Zf(e){return e.toLowerCase()}function dw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ec(e,t){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:0,o={binding:r,priority:i};this.bindings.unshift(o),n&&(this.bindingNames[n]=o,r.name=n)}},{key:"setPriority",value:function(r,n){var i=this.bindingNames[r];if(!i)throw"Tried to set priority on unknown binding "+r;i.priority=n||0}},{key:"getPriority",value:function(r){var n=this.bindingNames[r];return n?n.priority:!1}},{key:"getBindings",value:function(){return Xf(this.bindings,function(r,n){return n.priority-r.priority})}}]),e}();function vw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tc(e,t){for(var r=0;r1?arguments[1]:void 0)}});Lw(Jo);var Gw=A(),Kw=qr();Gw({target:"Object",stat:!0},{setPrototypeOf:Kw});var e_=A(),t_=M(),r_=be(),xc=Wt(),n_=Zo(),i_=t_(function(){xc(1)});e_({target:"Object",stat:!0,forced:i_,sham:!n_},{getPrototypeOf:function(t){return xc(r_(t))}});var s_=A(),l_=St(),Rc=zt(),f_=Y(),Pc=re(),c_=Kt(),p_=Ic(),qc=M(),ta=l_("Reflect","construct"),Tc=qc(function(){function e(){}return!(ta(function(){},[],e)instanceof e)}),Ec=!qc(function(){ta(function(){})}),kc=Tc||Ec;s_({target:"Reflect",stat:!0,forced:kc,sham:kc},{construct:function(t,r){Rc(t),f_(r);var n=arguments.length<3?t:Rc(arguments[2]);if(Ec&&!Tc)return ta(t,r,n);if(t==n){switch(r.length){case 0:return new t;case 1:return new t(r[0]);case 2:return new t(r[0],r[1]);case 3:return new t(r[0],r[1],r[2]);case 4:return new t(r[0],r[1],r[2],r[3])}var i=[null];return i.push.apply(i,r),new(p_.apply(t,i))}var o=n.prototype,a=c_(Pc(o)?o:Object.prototype),u=Function.apply.call(t,a,r);return Pc(u)?u:a}});"use strict";var Yt=A(),Lc=z(),x_=St(),O_=lr(),Xt=pe(),Pt=dn(),S_=qo(),ia=M(),K=le(),I_=Or(),R_=re(),oa=Y(),P_=be(),On=Te(),aa=$t(),ua=At(),Er=Kt(),zc=Ir(),q_=Ft(),Uc=Nc(),sa=vo(),Hc=xt(),Gc=de(),Kc=en(),T_=Se(),la=We(),kr=fr(),E_=cr(),Wc=pr(),Yc=on(),Xc=G(),k_=ra(),B_=na(),D_=Tr(),Qc=Mt(),Sn=Gt().forEach,me=E_("hidden"),In="Symbol",Ye="prototype",Jc=Xc("toPrimitive"),C_=Qc.set,Zc=Qc.getterFor(In),Re=Object[Ye],ve=Lc.Symbol,Br=x_("JSON","stringify"),ep=Hc.f,lt=Gc.f,tp=Uc.f,N_=Kc.f,Xe=kr("symbols"),Dr=kr("op-symbols"),fa=kr("string-to-symbol-registry"),ca=kr("symbol-to-string-registry"),A_=kr("wks"),pa=Lc.QObject,da=!pa||!pa[Ye]||!pa[Ye].findChild,ma=Xt&&ia(function(){return Er(lt({},"a",{get:function(){return lt(this,"a",{value:7}).a}})).a!=7})?function(e,t,r){var n=ep(Re,t);n&&delete Re[t],lt(e,t,r),n&&e!==Re&<(Re,t,n)}:lt,va=function(e,t){var r=Xe[e]=Er(ve[Ye]);return C_(r,{type:In,tag:e,description:t}),Xt||(r.description=t),r},ya=S_?function(e){return typeof e=="symbol"}:function(e){return Object(e)instanceof ve},Rn=function(t,r,n){t===Re&&Rn(Dr,r,n),oa(t);var i=aa(r,!0);return oa(n),K(Xe,i)?(n.enumerable?(K(t,me)&&t[me][i]&&(t[me][i]=!1),n=Er(n,{enumerable:ua(0,!1)})):(K(t,me)||lt(t,me,ua(1,{})),t[me][i]=!0),ma(t,i,n)):lt(t,i,n)},rp=function(t,r){oa(t);var n=On(r),i=zc(n).concat(ga(n));return Sn(i,function(o){(!Xt||ha.call(n,o))&&Rn(t,o,n[o])}),t},$_=function(t,r){return r===void 0?Er(t):rp(Er(t),r)},ha=function(t){var r=aa(t,!0),n=N_.call(this,r);return this===Re&&K(Xe,r)&&!K(Dr,r)?!1:n||!K(this,r)||!K(Xe,r)||K(this,me)&&this[me][r]?n:!0},np=function(t,r){var n=On(t),i=aa(r,!0);if(!(n===Re&&K(Xe,i)&&!K(Dr,i))){var o=ep(n,i);return o&&K(Xe,i)&&!(K(n,me)&&n[me][i])&&(o.enumerable=!0),o}},ip=function(t){var r=tp(On(t)),n=[];return Sn(r,function(i){!K(Xe,i)&&!K(Wc,i)&&n.push(i)}),n},ga=function(t){var r=t===Re,n=tp(r?Dr:On(t)),i=[];return Sn(n,function(o){K(Xe,o)&&(!r||K(Re,o))&&i.push(Xe[o])}),i};Pt||(ve=function(){if(this instanceof ve)throw TypeError("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),r=Yc(t),n=function(i){this===Re&&n.call(Dr,i),K(this,me)&&K(this[me],r)&&(this[me][r]=!1),ma(this,r,ua(1,i))};return Xt&&da&&ma(Re,r,{configurable:!0,set:n}),va(r,t)},la(ve[Ye],"toString",function(){return Zc(this).tag}),la(ve,"withoutSetter",function(e){return va(Yc(e),e)}),Kc.f=ha,Gc.f=Rn,Hc.f=np,q_.f=Uc.f=ip,sa.f=ga,k_.f=function(e){return va(Xc(e),e)},Xt&&(lt(ve[Ye],"description",{configurable:!0,get:function(){return Zc(this).description}}),O_||la(Re,"propertyIsEnumerable",ha,{unsafe:!0})));Yt({global:!0,wrap:!0,forced:!Pt,sham:!Pt},{Symbol:ve});Sn(zc(A_),function(e){B_(e)});Yt({target:In,stat:!0,forced:!Pt},{for:function(e){var t=String(e);if(K(fa,t))return fa[t];var r=ve(t);return fa[t]=r,ca[r]=t,r},keyFor:function(t){if(!ya(t))throw TypeError(t+" is not a symbol");if(K(ca,t))return ca[t]},useSetter:function(){da=!0},useSimple:function(){da=!1}});Yt({target:"Object",stat:!0,forced:!Pt,sham:!Xt},{create:$_,defineProperty:Rn,defineProperties:rp,getOwnPropertyDescriptor:np});Yt({target:"Object",stat:!0,forced:!Pt},{getOwnPropertyNames:ip,getOwnPropertySymbols:ga});Yt({target:"Object",stat:!0,forced:ia(function(){sa.f(1)})},{getOwnPropertySymbols:function(t){return sa.f(P_(t))}});Br&&(op=!Pt||ia(function(){var e=ve();return Br([e])!="[null]"||Br({a:e})!="{}"||Br(Object(e))!="{}"}),Yt({target:"JSON",stat:!0,forced:op},{stringify:function(t,r,n){for(var i=[t],o=1,a;arguments.length>o;)i.push(arguments[o++]);if(a=r,!(!R_(r)&&t===void 0||ya(t)))return I_(r)||(r=function(u,l){if(typeof a=="function"&&(l=a.call(this,u,l)),!ya(l))return l}),i[1]=r,Br.apply(null,i)}}));var op;ve[Ye][Jc]||T_(ve[Ye],Jc,ve[Ye].valueOf);D_(ve,In);Wc[me]=!0;"use strict";var M_=A(),V_=pe(),F_=z(),L_=le(),z_=re(),U_=de().f,H_=yo(),Qe=F_.Symbol;V_&&typeof Qe=="function"&&(!("description"in Qe.prototype)||Qe().description!==void 0)&&(ba={},Qt=function(){var t=arguments.length<1||arguments[0]===void 0?void 0:String(arguments[0]),r=this instanceof Qt?new Qe(t):t===void 0?Qe():Qe(t);return t===""&&(ba[r]=!0),r},H_(Qt,Qe),Pn=Qt.prototype=Qe.prototype,Pn.constructor=Qt,ap=Pn.toString,up=String(Qe("test"))=="Symbol(test)",sp=/^Symbol\((.*)\)[^)]+$/,U_(Pn,"description",{configurable:!0,get:function(){var t=z_(this)?this.valueOf():this,r=ap.call(t);if(L_(ba,t))return"";var n=up?r.slice(7,-1):r.replace(sp,"$1");return n===""?void 0:n}}),M_({global:!0,forced:!0},{Symbol:Qt}));var ba,Qt,Pn,ap,up,sp;var G_=na();G_("iterator");var tk=j($());"use strict";var mx=ko().charAt,qp=Mt(),vx=Ia(),Tp="String Iterator",yx=qp.set,hx=qp.getterFor(Tp);vx(String,"String",function(e){yx(this,{type:Tp,string:String(e),index:0})},function(){var t=hx(this),r=t.string,n=t.index,i;return n>=r.length?{value:void 0,done:!0}:(i=mx(r,n),t.index+=i.length,{value:i,done:!1})});var gx=z(),kp=Pa(),Nr=$(),qa=Se(),Bp=G(),Ta=Bp("iterator"),Dp=Bp("toStringTag"),Ea=Nr.values;for(var ka in kp)if(Ba=gx[ka],Le=Ba&&Ba.prototype,Le){if(Le[Ta]!==Ea)try{qa(Le,Ta,Ea)}catch(e){Le[Ta]=Ea}if(Le[Dp]||qa(Le,Dp,ka),kp[ka]){for(Tt in Nr)if(Le[Tt]!==Nr[Tt])try{qa(Le,Tt,Nr[Tt])}catch(e){Le[Tt]=Nr[Tt]}}}var Ba,Le,Tt;var Et=j(E());function En(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?En=function(r){return typeof r}:En=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},En(e)}function bx(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cp(e,t){for(var r=0;r2){if(t=Yx(t),r=t.charCodeAt(0),r===43||r===45){if(n=t.charCodeAt(2),n===88||n===120)return NaN}else if(r===48){switch(t.charCodeAt(1)){case 66:case 98:i=2,o=49;break;case 79:case 111:i=8,o=55;break;default:return+t}for(a=t.slice(2),u=a.length,l=0;lo)return NaN;return parseInt(a,i)}}return+t};if(Vx(Ar,!ft(" 0o1")||!ft("0b1")||ft("+0x1"))){for(ct=function(t){var r=arguments.length<1?0:t,n=this;return n instanceof ct&&(Xx?Ux(function(){Cn.valueOf.call(n)}):Yp(n)!=Ar)?Lx(new ft(Xp(r)),n,ct):Xp(r)},Na=Mx?Gx(ft):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),Nn=0;Na.length>Nn;Nn++)Wp(ft,$r=Na[Nn])&&!Wp(ct,$r)&&Wx(ct,$r,Kx(ft,$r));ct.prototype=Cn,Cn.constructor=ct,Fx(Kp,Ar,ct)}var ct,Na,Nn,$r;var eB=j($());var Vr=j(E());var Qx=A(),Jx=re(),Zx=Y(),eO=le(),tO=xt(),rO=Wt();function Qp(e,t){var r=arguments.length<3?e:arguments[2],n,i;if(Zx(e)===r)return e[t];if(n=tO.f(e,t))return eO(n,"value")?n.value:n.get===void 0?void 0:n.get.call(r);if(Jx(i=rO(e)))return Qp(i,t,r)}Qx({target:"Reflect",stat:!0},{get:Qp});var nO=A(),iO=M(),oO=Te(),Jp=xt().f,Zp=pe(),aO=iO(function(){Jp(1)}),uO=!Zp||aO;nO({target:"Object",stat:!0,forced:uO,sham:!Zp},{getOwnPropertyDescriptor:function(t,r){return Jp(oO(t),r)}});var Mk=j($());var kt=j(E());function An(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?An=function(r){return typeof r}:An=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},An(e)}function ed(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function td(e,t){for(var r=0;ru.getTime()?(0,F.default)(i).bsDatepicker("clearDates"):(0,F.default)(i).bsDatepicker("setUTCDate",u)}}}},{key:"_setMax",value:function(i,o){if(o!==void 0){if(o===null){(0,F.default)(i).bsDatepicker("setEndDate",null);return}var a=this._newDate(o);if(a!==null&&(o=a,!isNaN(o.valueOf()))){var u=(0,F.default)(i).bsDatepicker("getUTCDate");(0,F.default)(i).bsDatepicker("setEndDate",this._utcDateAsLocal(o)),o&&u&&o.getTime()1&&arguments[1]!==void 0?arguments[1]:",",r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".",n=e.toString().split(".");return n[0]=n[0].replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+t),n.length===1?n[0]:n.length===2?n[0]+r+n[1]:""}(0,X.default)(document).on("click",".slider-animate-button",function(e){e.preventDefault();var t=(0,X.default)(this),r=(0,X.default)("#"+q(t.attr("data-target-id"))),n="Play",i="Pause",o=t.attr("data-loop")!==void 0&&!/^\s*false\s*$/i.test(t.attr("data-loop")),a=t.attr("data-interval");if(isNaN(a)?a=1500:a=Number(a),r.data("animTimer"))clearTimeout(r.data("animTimer")),r.removeData("animTimer"),t.attr("title",n),t.removeClass("playing"),r.removeData("animating");else{var u;if(r.hasClass("jslider")){var l=r.slider();l.canStepNext()||l.resetToStart(),u=setInterval(function(){o&&!l.canStepNext()?l.resetToStart():(l.stepNext(),!o&&!l.canStepNext()&&t.click())},a)}else{var s=r.data("ionRangeSlider"),f=function(){return s.options.type==="double"?s.result.to0}var Bd=function(e){sS(r,e);var t=lS(r);function r(){return aS(this,r),t.apply(this,arguments)}return uS(r,[{key:"find",value:function(i){return(0,U.default)(i).find("select")}},{key:"getType",value:function(i){var o=(0,U.default)(i);return o.hasClass("symbol")?o.attr("multiple")==="multiple"?"shiny.symbolList":"shiny.symbol":null}},{key:"getId",value:function(i){return V.prototype.getId.call(this,i)||i.name}},{key:"getValue",value:function(i){return(0,U.default)(i).val()}},{key:"setValue",value:function(i,o){if(!kd(i))(0,U.default)(i).val(o);else{var a=this._selectize(i);a&&a.setValue(o)}}},{key:"getState",value:function(i){for(var o=new Array(i.length),a=0;a1&&arguments[1]!==void 0?arguments[1]:!1;if(!!U.default.fn.selectize){var a=(0,U.default)(i),u=a.parent().find('script[data-for="'+q(i.id)+'"]');if(u.length!==0){var l=U.default.extend({labelField:"label",valueField:"value",searchField:["label"]},JSON.parse(u.html()));typeof u.data("nonempty")!="undefined"?(i.nonempty=!0,l=U.default.extend(l,{onItemRemove:function(p){this.getValue()===""&&(0,U.default)("select#"+q(i.id)).empty().append((0,U.default)("