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AC5B,EAAO,MAAM,SAAW,IACpB,EAAO,MAAM,SAAW,KAG1B,OAFA,EAAO,MAAM,QAAU,YACvB,EAAc,MAIlB,EAAc,EAAO,sBAAsB,EAC5C,CAVD,GAWR,GAII,EAAA,QAAiB,CAQrB,EAAE,KAAK,EAAM,OAAQ,U","file":"/npm/topbar@2.0.0/topbar.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.\n * Original file: /npm/topbar@2.0.0/topbar.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n * @license MIT\n * topbar 2.0.0, 2023-02-04\n * http://buunguyen.github.io/topbar\n * Copyright (c) 2021 Buu Nguyen\n */\n(function (window, document) {\n  \"use strict\";\n\n  // https://gist.github.com/paulirish/1579671\n  (function () {\n    var lastTime = 0;\n    var vendors = [\"ms\", \"moz\", \"webkit\", \"o\"];\n    for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {\n      window.requestAnimationFrame =\n        window[vendors[x] + \"RequestAnimationFrame\"];\n      window.cancelAnimationFrame =\n        window[vendors[x] + \"CancelAnimationFrame\"] ||\n        window[vendors[x] + \"CancelRequestAnimationFrame\"];\n    }\n    if (!window.requestAnimationFrame)\n      window.requestAnimationFrame = function (callback, element) {\n        var currTime = new Date().getTime();\n        var timeToCall = Math.max(0, 16 - (currTime - lastTime));\n        var id = window.setTimeout(function () {\n          callback(currTime + timeToCall);\n        }, timeToCall);\n        lastTime = currTime + timeToCall;\n        return id;\n      };\n    if (!window.cancelAnimationFrame)\n      window.cancelAnimationFrame = function (id) {\n        clearTimeout(id);\n      };\n  })();\n\n  var canvas,\n    currentProgress,\n    showing,\n    progressTimerId = null,\n    fadeTimerId = null,\n    delayTimerId = null,\n    addEvent = function (elem, type, handler) {\n      if (elem.addEventListener) elem.addEventListener(type, handler, false);\n      else if (elem.attachEvent) elem.attachEvent(\"on\" + type, handler);\n      else elem[\"on\" + type] = handler;\n    },\n    options = {\n      autoRun: true,\n      barThickness: 3,\n      barColors: {\n        0: \"rgba(26,  188, 156, .9)\",\n        \".25\": \"rgba(52,  152, 219, .9)\",\n        \".50\": \"rgba(241, 196, 15,  .9)\",\n        \".75\": \"rgba(230, 126, 34,  .9)\",\n        \"1.0\": \"rgba(211, 84,  0,   .9)\",\n      },\n      shadowBlur: 10,\n      shadowColor: \"rgba(0,   0,   0,   .6)\",\n      className: null,\n    },\n    repaint = function () {\n      canvas.width = window.innerWidth;\n      canvas.height = options.barThickness * 5; // need space for shadow\n\n      var ctx = canvas.getContext(\"2d\");\n      ctx.shadowBlur = options.shadowBlur;\n      ctx.shadowColor = options.shadowColor;\n\n      var lineGradient = ctx.createLinearGradient(0, 0, canvas.width, 0);\n      for (var stop in options.barColors)\n        lineGradient.addColorStop(stop, options.barColors[stop]);\n      ctx.lineWidth = options.barThickness;\n      ctx.beginPath();\n      ctx.moveTo(0, options.barThickness / 2);\n      ctx.lineTo(\n        Math.ceil(currentProgress * canvas.width),\n        options.barThickness / 2\n      );\n      ctx.strokeStyle = lineGradient;\n      ctx.stroke();\n    },\n    createCanvas = function () {\n      canvas = document.createElement(\"canvas\");\n      var style = canvas.style;\n      style.position = \"fixed\";\n      style.top = style.left = style.right = style.margin = style.padding = 0;\n      style.zIndex = 100001;\n      style.display = \"none\";\n      if (options.className) canvas.classList.add(options.className);\n      document.body.appendChild(canvas);\n      addEvent(window, \"resize\", repaint);\n    },\n    topbar = {\n      config: function (opts) {\n        for (var key in opts)\n          if (options.hasOwnProperty(key)) options[key] = opts[key];\n      },\n      show: function (delay) {\n        if (showing) return;\n        if (delay) {\n          if (delayTimerId) return;\n          delayTimerId = setTimeout(() => topbar.show(), delay);\n        } else  {\n          showing = true;\n          if (fadeTimerId !== null) window.cancelAnimationFrame(fadeTimerId);\n          if (!canvas) createCanvas();\n          canvas.style.opacity = 1;\n          canvas.style.display = \"block\";\n          topbar.progress(0);\n          if (options.autoRun) {\n            (function loop() {\n              progressTimerId = window.requestAnimationFrame(loop);\n              topbar.progress(\n                \"+\" + 0.05 * Math.pow(1 - Math.sqrt(currentProgress), 2)\n              );\n            })();\n          }\n        }\n      },\n      progress: function (to) {\n        if (typeof to === \"undefined\") return currentProgress;\n        if (typeof to === \"string\") {\n          to =\n            (to.indexOf(\"+\") >= 0 || to.indexOf(\"-\") >= 0\n              ? currentProgress\n              : 0) + parseFloat(to);\n        }\n        currentProgress = to > 1 ? 1 : to;\n        repaint();\n        return currentProgress;\n      },\n      hide: function () {\n        clearTimeout(delayTimerId);\n        delayTimerId = null;\n        if (!showing) return;\n        showing = false;\n        if (progressTimerId != null) {\n          window.cancelAnimationFrame(progressTimerId);\n          progressTimerId = null;\n        }\n        (function loop() {\n          if (topbar.progress(\"+.1\") >= 1) {\n            canvas.style.opacity -= 0.05;\n            if (canvas.style.opacity <= 0.05) {\n              canvas.style.display = \"none\";\n              fadeTimerId = null;\n              return;\n            }\n          }\n          fadeTimerId = window.requestAnimationFrame(loop);\n        })();\n      },\n    };\n\n  if (typeof module === \"object\" && typeof module.exports === \"object\") {\n    module.exports = topbar;\n  } else if (typeof define === \"function\" && define.amd) {\n    define(function () {\n      return topbar;\n    });\n  } else {\n    this.topbar = topbar;\n  }\n}.call(this, window, document));\n"]}