{"version":3,"sources":["jsdelivr-header.js","/npm/react-topbar-progress-indicator@4.0.2/src/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACJA,IAAI,MAAQ,QAAQ,SAGhB,OACgB,oBAAX,OACH,CACE,KAAM,WAAY,EAClB,KAAM,WAAY,EAClB,OAAQ,WAAY,GAEtB,QAAQ,UAEV,UAAyB,EAQzB,UAAY,SAAS,GACvB,OAAO,EAAM,QAAU,MACzB,EAEA,SAAS,OAAO,GAed,OAdA,MAAM,WAAU,WAMd,OALkB,IAAd,WACF,UAAU,GAAO,OAEnB,YAEO,WAEa,MADlB,WAEE,UAAU,GAAO,MAErB,CACF,GAAG,IAEI,IACT,CAEA,OAAO,OAAS,OAAO,OAEvB,OAAO,QAAU","file":"/npm/react-topbar-progress-indicator@4.0.2/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-topbar-progress-indicator@4.0.2/src/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// @flow\n\nvar React = require(\"react\");\n\n// topbar require window, so here is an universal workaround\nvar topbar =\n  typeof window === \"undefined\"\n    ? {\n        show: function() {},\n        hide: function() {},\n        config: function() {}\n      }\n    : require(\"topbar\");\n\nvar semaphore /*: number*/ = 0;\n\n/*::\ntype Props = {\n  topbar?: typeof topbar\n};\n*/\n\nvar getTopBar = function(props /*: Props*/) /*: typeof topbar*/ {\n  return props.topbar || topbar;\n};\n\nfunction TopBar(props /*: Props */) {\n  React.useEffect(function() {\n    if (semaphore === 0) {\n      getTopBar(props).show();\n    }\n    semaphore++;\n\n    return function() {\n      semaphore--;\n      if (semaphore === 0) {\n        getTopBar(props).hide();\n      }\n    };\n  }, []);\n\n  return null;\n}\n\nTopBar.config = topbar.config;\n\nmodule.exports = TopBar;\n"]}