HEX
Server: Apache/2.4.46 (Ubuntu)
System: Linux localhost 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64
User: root (0)
PHP: 7.4.16
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/sarvodayahospital/node_modules/turbolinks/src/turbolinks/progress_bar.coffee
class Turbolinks.ProgressBar
  ANIMATION_DURATION = 300

  @defaultCSS: """
    .turbolinks-progress-bar {
      position: fixed;
      display: block;
      top: 0;
      left: 0;
      height: 3px;
      background: #0076ff;
      z-index: 9999;
      transition: width #{ANIMATION_DURATION}ms ease-out, opacity #{ANIMATION_DURATION / 2}ms #{ANIMATION_DURATION / 2}ms ease-in;
      transform: translate3d(0, 0, 0);
    }
  """

  constructor: ->
    @stylesheetElement = @createStylesheetElement()
    @progressElement = @createProgressElement()

  show: ->
    unless @visible
      @visible = true
      @installStylesheetElement()
      @installProgressElement()
      @startTrickling()

  hide: ->
    if @visible and not @hiding
      @hiding = true
      @fadeProgressElement =>
        @uninstallProgressElement()
        @stopTrickling()
        @visible = false
        @hiding = false

  setValue: (@value) ->
    @refresh()

  # Private

  installStylesheetElement: ->
    document.head.insertBefore(@stylesheetElement, document.head.firstChild)

  installProgressElement: ->
    @progressElement.style.width = 0
    @progressElement.style.opacity = 1
    document.documentElement.insertBefore(@progressElement, document.body)
    @refresh()

  fadeProgressElement: (callback) ->
    @progressElement.style.opacity = 0
    setTimeout(callback, ANIMATION_DURATION * 1.5)

  uninstallProgressElement: ->
    if @progressElement.parentNode
      document.documentElement.removeChild(@progressElement)

  startTrickling: ->
    @trickleInterval ?= setInterval(@trickle, ANIMATION_DURATION)

  stopTrickling: ->
    clearInterval(@trickleInterval)
    @trickleInterval = null

  trickle: =>
    @setValue(@value + Math.random() / 100)

  refresh: ->
    requestAnimationFrame =>
      @progressElement.style.width = "#{10 + (@value * 90)}%"

  createStylesheetElement: ->
    element = document.createElement("style")
    element.type = "text/css"
    element.textContent = @constructor.defaultCSS
    element

  createProgressElement: ->
    element = document.createElement("div")
    element.className = "turbolinks-progress-bar"
    element