This file is indexed.

/usr/lib/R/site-library/shinydashboard/shinydashboard.min.js.map is in r-cran-shinydashboard 0.6.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

1
{"version":3,"sources":["../srcjs/_start.js","../srcjs/tabs.js","../srcjs/sidebar.js","../srcjs/output_binding_menu.js","../srcjs/input_binding_tabItem.js","../srcjs/input_binding_sidebarCollapsed.js","../srcjs/input_binding_sidebarmenuExpanded.js"],"names":["$","deactivateOtherTabs","$tablinks","not","this","parent","removeClass","$obj","inputBinding","data","setValue","attr","trigger","document","on","ensureActivatedTab","$startTab","filter","length","first","tab","addClass","hide","sidebarCollapsedValue","offset","left","sidebarChange","window","$menu","next","hasClass","setTimeout","menuOutputBinding","Shiny","OutputBinding","extend","find","scope","onValueError","el","err","unbindAll","renderError","renderValue","html","dependencies","deps","$html","parseHTML","renderHtml","className","initializeInputs","bindAll","outputBindings","register","tabItemInputBinding","InputBinding","getValue","value","self","anchors","children","each","_getTabName","receiveMessage","hasOwnProperty","subscribe","callback","unsubscribe","off","anchor","inputBindings","sidebarCollapsedInputBinding","getId","toggleValue","current","newVal","sidebarmenuExpandedInputBinding","$open"],"mappings":";;AAGAA,EAAE,WCOF,GAAIC,GAAsB,WAGxB,GAAIC,GAAYF,EAAA,mEAIhBE,GAAUC,IAAGH,EAAGI,OAAOC,OAAM,MAAOC,YAAW,SAG/C,IAAIC,GAAOP,EAAA,+BACPQ,EAAeD,EAAKE,KAAI,sBACA,oBAAjBD,KACTA,EAAaE,SAAQH,EAAOP,EAAEI,MAAMO,KAAI,eACxCJ,EAAKK,QAAO,WAIhBZ,GAAEa,UAAUC,GAAE,eAAiB,qCAChBb,EAKf,IAAIc,GAAqB,WACvB,GAAIb,GAAYF,EAAA,sCAIZgB,EAAYd,EAAUe,OAAM,4BACP,KAAtBD,EAAWE,SAEZF,EAAYd,EAAUiB,SAIC,IAAtBH,EAAWE,SACZF,EAAUI,IAAG,QAMbpB,EAAA,+BAAiCW,KAAI,aACn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SAASnC,GACpB,GAAIoC,GAAUvE,KAAKqD,SAASlB,GACxBqC,EAASD,EAAU,QAAU,MACjCvE,MAAKM,SAAS6B,EAAIqC,IAEpBZ,eAAgB,SAASzB,EAAI9B,GACvBA,EAAKwD,eAAc,UACrB7D,KAAKM,SAAS6B,EAAI9B,EAAKiD,QAE3BQ,UAAW,SAAS3B,EAAI4B,GACtBnE,EAAEuC,GAAIzB,GAAE,sCAAwC,WAC9CqD,OAGJC,YAAa,SAAS7B,GACpBvC,EAAEuC,GAAI8B,IAAG,oCAGbpC,MAAMsC,cAAcjB,SAASkB,EAC3B,8CClCF,IAAIK,GAAkC,GAAI5C,OAAMuB,YAChDxD,GAAEmC,OAAO0C,GACPzC,KAAM,SAASC,GACb,MAAOrC,GAAEqC,GAAOD,KAAI,oBAEtBqC,MAAO,SAASlC,GACd,MAAO,uBAETkB,SAAU,SAASlB,GACjB,GAAIuC,GAAQ9E,EAAEuC,GAAIH,KAAI,kBACtB,OAAqB,KAAlB0C,EAAO5D,OAAqB4D,EAAMnE,KAAI,iBAC7B,MAEduD,UAAW,SAAS3B,EAAI4B,GACtBnE,EAAEuC,GAAIzB,GAAE,yCAA2C,WACjDqD,OAGJC,YAAa,SAAS7B,GACpBvC,EAAEuC,GAAI8B,IAAG,uCAGbpC,MAAMsC,cAAcjB,SAASuB,EAC3B","file":"shinydashboard.min.js","sourcesContent":["//---------------------------------------------------------------------\n// Source file: ../srcjs/_start.js\n\n$(function() {\n","//---------------------------------------------------------------------\n// Source file: ../srcjs/tabs.js\n\n// This function handles a special case in the AdminLTE sidebar: when there\n// is a sidebar-menu with items, and one of those items has sub-items, and\n// they are used for tab navigation. Normally, if one of the items is\n// selected and then a sub-item is clicked, both the item and sub-item will\n// retain the \"active\" class, so they will both be highlighted. This happens\n// because they're not designed to be used together for tab panels. This\n// code ensures that only one item will have the \"active\" class.\nvar deactivateOtherTabs = function() {\n  // Find all tab links under sidebar-menu even if they don't have a\n  // tabName (which is why the second selector is necessary)\n  var $tablinks = $(\".sidebar-menu a[data-toggle='tab'],\" +\n    \".sidebar-menu li.treeview > a\");\n\n  // If any other items are active, deactivate them\n  $tablinks.not($(this)).parent(\"li\").removeClass(\"active\");\n\n  // Trigger event for the tabItemInputBinding\n  var $obj = $('.sidebarMenuSelectedTabItem');\n  var inputBinding = $obj.data('shiny-input-binding');\n  if (typeof inputBinding !== 'undefined') {\n    inputBinding.setValue($obj, $(this).attr('data-value'));\n    $obj.trigger('change');\n  }\n};\n\n$(document).on('shown.bs.tab', '.sidebar-menu a[data-toggle=\"tab\"]',\n               deactivateOtherTabs);\n\n// When document is ready, if there is a sidebar menu with no activated tabs,\n// activate the one specified by `data-start-selected`, or if that's not\n// present, the first one.\nvar ensureActivatedTab = function() {\n  var $tablinks = $(\".sidebar-menu a[data-toggle='tab']\");\n\n  // If there's a `data-start-selected` attribute and we can find a tab with\n  // that name, activate it.\n  var $startTab = $tablinks.filter(\"[data-start-selected='1']\");\n  if ($startTab.length === 0) {\n    // If no tab starts selected, use the first one, if present\n    $startTab = $tablinks.first();\n  }\n\n  // If there are no tabs, $startTab.length will be 0.\n  if ($startTab.length !== 0) {\n    $startTab.tab(\"show\");\n\n    // This is indirectly setting the value of the Shiny input by setting\n    // an attribute on the html element it is bound to. We cannot use the\n    // inputBinding's setValue() method here because this is called too\n    // early (before Shiny has fully initialized)\n    $(\".sidebarMenuSelectedTabItem\").attr(\"data-value\",\n      $startTab.attr(\"data-value\"));\n  }\n};\n\nensureActivatedTab();\n","//---------------------------------------------------------------------\n// Source file: ../srcjs/sidebar.js\n\n// Optionally disable sidebar (set through the `disable` argument\n// to the `dashboardSidebar` function)\nif ($(\"section.sidebar\").data(\"disable\")) {\n  $(\"body\").addClass(\"sidebar-collapse\");\n  $(\".navbar > .sidebar-toggle\").hide();\n}\n\n// Get the correct value for `input$sidebarCollapsed`, depending on\n// whether or not the left offset on the sidebar is negative (hidden\n// - so `input$sidebarCollapsed` should be TRUE) or 0 (shown - so\n// `input$sidebarCollapsed` should be FALSE). That we know of,\n// `$(\".main-sidebar\").is(\":visible\")` is always true, so there is\n// no need to check for that.\nvar sidebarCollapsedValue = function() {\n  if ($(\".main-sidebar\").offset().left < 0) return(true);\n  else return(false);\n};\n\n// Whenever the sidebar changes from collapsed to expanded and vice versa,\n// call this function, so that we can trigger the resize event on the rest\n// of the window and also update the value for the sidebar's input binding.\nvar sidebarChange = function() {\n  // 1) Trigger the resize event (so images are responsive and resize)\n  $(window).trigger(\"resize\");\n\n  // 2) Update the value for the sidebar's input binding\n  var $obj = $('.main-sidebar.shiny-bound-input');\n  var inputBinding = $obj.data('shiny-input-binding');\n  inputBinding.setValue($obj, sidebarCollapsedValue());\n  $obj.trigger('change');\n};\n\n// Whenever the sidebar finishes a transition (which it does every time it\n// changes from collapsed to expanded and vice versa), call sidebarChange()\n$(\".main-sidebar\").on(\n  'webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend',\n    sidebarChange);\n\n// This fixes an edge case: when the app starts up with the sidebar already\n// collapsed (either because the screen is small or because\n// `dashboardSidebar(disable = TRUE`), make sure that `input$sidebarCollapsed`\n// is set to `FALSE`. Whenever this is the case, `$(\".main-sidebar\").offset().left`\n// is negative. That we know of, `$(\".main-sidebar\").is(\":visible\")` is always\n// true, so there is no need to check for that.\nif ($(\".main-sidebar\").offset().left < 0) {\n  // This is indirectly setting the value of the Shiny input by setting\n  // an attribute on the html element it is bound to. We cannot use the\n  // inputBinding's setValue() method here because this is called too\n  // early (before Shiny has fully initialized)\n  $(\".main-sidebar\").attr(\"data-collapsed\", \"true\");\n}\n\n// Whenever we expand a menuItem (to be expandable, it must have children),\n// update the value for the expandedItem's input binding (this is the\n// tabName of the fist subMenuItem inside the menuItem that is currently\n// expanded)\n$(document).on(\"click\", \".treeview > a\", function() {\n  var $menu = $(this).next();\n  // If this menuItem was already open, then clicking on it again,\n  // should trigger the \"hidden\" event, so Shiny doesn't worry about\n  // it while it's hidden (and vice versa).\n  if ($menu.hasClass(\"menu-open\")) $menu.trigger(\"hidden\");\n  else if ($menu.hasClass(\"treeview-menu\")) $menu.trigger(\"shown\");\n\n  // need to set timeout to account for the slideUp/slideDown animation\n  var $obj = $('section.sidebar.shiny-bound-input');\n  setTimeout(function() { $obj.trigger('change'); }, 600);\n});\n","//---------------------------------------------------------------------\n// Source file: ../srcjs/output_binding_menu.js\n\n/* global Shiny */\n\n// menuOutputBinding\n// ------------------------------------------------------------------\n// Based on Shiny.htmlOutputBinding, but instead of putting the result in a\n// wrapper div, it replaces the origin DOM element with the new DOM elements,\n// copying over the ID and class.\nvar menuOutputBinding = new Shiny.OutputBinding();\n$.extend(menuOutputBinding, {\n  find: function(scope) {\n    return $(scope).find('.shinydashboard-menu-output');\n  },\n  onValueError: function(el, err) {\n    Shiny.unbindAll(el);\n    this.renderError(el, err);\n  },\n  renderValue: function(el, data) {\n    Shiny.unbindAll(el);\n\n    var html;\n    var dependencies = [];\n    if (data === null) {\n      return;\n    } else if (typeof(data) === 'string') {\n      html = data;\n    } else if (typeof(data) === 'object') {\n      html = data.html;\n      dependencies = data.deps;\n    }\n\n    var $html = $($.parseHTML(html));\n\n    // Convert the inner contents to HTML, and pass to renderHtml\n    Shiny.renderHtml($html.html(), el, dependencies);\n\n    // Extract class of wrapper, and add them to the wrapper element\n    el.className = 'shinydashboard-menu-output shiny-bound-output ' +\n                   $html.attr('class');\n\n    Shiny.initializeInputs(el);\n    Shiny.bindAll(el);\n    ensureActivatedTab(); // eslint-disable-line\n  }\n});\nShiny.outputBindings.register(menuOutputBinding,\n                              \"shinydashboard.menuOutputBinding\");\n","//---------------------------------------------------------------------\n// Source file: ../srcjs/input_binding_tabItem.js\n\n/* global Shiny */\n\n// tabItemInputBinding\n// ------------------------------------------------------------------\n// Based on Shiny.tabItemInputBinding, but customized for tabItems in\n// shinydashboard, which have a slightly different structure.\nvar tabItemInputBinding = new Shiny.InputBinding();\n$.extend(tabItemInputBinding, {\n  find: function(scope) {\n    return $(scope).find('.sidebarMenuSelectedTabItem');\n  },\n  getValue: function(el) {\n    var value = $(el).attr('data-value');\n    if (value === \"null\") return null;\n    return value;\n  },\n  setValue: function(el, value) {\n    var self = this;\n    var anchors = $(el).parent('ul.sidebar-menu').find('li:not(.treeview)').children('a');\n    anchors.each(function() { // eslint-disable-line consistent-return\n      if (self._getTabName($(this)) === value) {\n        $(this).tab('show');\n        $(el).attr('data-value', self._getTabName($(this)));\n        return false;\n      }\n    });\n  },\n  receiveMessage: function(el, data) {\n    if (data.hasOwnProperty('value'))\n      this.setValue(el, data.value);\n  },\n  subscribe: function(el, callback) {\n    // This event is triggered by deactivateOtherTabs, which is triggered by\n    // shown. The deactivation of other tabs must occur before Shiny gets the\n    // input value.\n    $(el).on('change.tabItemInputBinding', function() {\n      callback();\n    });\n  },\n  unsubscribe: function(el) {\n    $(el).off('.tabItemInputBinding');\n  },\n  _getTabName: function(anchor) {\n    return anchor.attr('data-value');\n  }\n});\n\nShiny.inputBindings.register(tabItemInputBinding, 'shinydashboard.tabItemInput');\n","//---------------------------------------------------------------------\n// Source file: ../srcjs/input_binding_sidebarCollapsed.js\n\n/* global Shiny */\n\n// sidebarCollapsedInputBinding\n// ------------------------------------------------------------------\n// This keeps tracks of whether the sidebar is expanded (default)\n// or collapsed\nvar sidebarCollapsedInputBinding = new Shiny.InputBinding();\n$.extend(sidebarCollapsedInputBinding, {\n  find: function(scope) {\n    return $(scope).find('.main-sidebar').first();\n  },\n  getId: function(el) {\n    return \"sidebarCollapsed\";\n  },\n  getValue: function(el) {\n    return $(el).attr(\"data-collapsed\") === \"true\";\n  },\n  setValue: function(el, value) {\n    $(el).attr(\"data-collapsed\", value);\n  },\n  toggleValue: function(el) {\n    var current = this.getValue(el);\n    var newVal = current ? \"false\" : \"true\";\n    this.setValue(el, newVal);\n  },\n  receiveMessage: function(el, data) {\n    if (data.hasOwnProperty('value'))\n      this.setValue(el, data.value);\n  },\n  subscribe: function(el, callback) {\n    $(el).on('change.sidebarCollapsedInputBinding', function() {\n      callback();\n    });\n  },\n  unsubscribe: function(el) {\n    $(el).off('.sidebarCollapsedInputBinding');\n  }\n});\nShiny.inputBindings.register(sidebarCollapsedInputBinding,\n  'shinydashboard.sidebarCollapsedInputBinding');\n","//---------------------------------------------------------------------\n// Source file: ../srcjs/input_binding_sidebarmenuExpanded.js\n\n/* global Shiny */\n\n// sidebarmenuExpandedInputBinding\n// ------------------------------------------------------------------\n// This keeps tracks of what menuItem (if any) is expanded\nvar sidebarmenuExpandedInputBinding = new Shiny.InputBinding();\n$.extend(sidebarmenuExpandedInputBinding, {\n  find: function(scope) {\n    return $(scope).find('section.sidebar');\n  },\n  getId: function(el) {\n    return \"sidebarItemExpanded\";\n  },\n  getValue: function(el) {\n    var $open = $(el).find('li ul.menu-open');\n    if ($open.length === 1) return $open.attr('data-expanded');\n    else return null;\n  },\n  subscribe: function(el, callback) {\n    $(el).on('change.sidebarmenuExpandedInputBinding', function() {\n      callback();\n    });\n  },\n  unsubscribe: function(el) {\n    $(el).off('.sidebarmenuExpandedInputBinding');\n  }\n});\nShiny.inputBindings.register(sidebarmenuExpandedInputBinding,\n  'shinydashboard.sidebarmenuExpandedInputBinding');\n"]}