{"version":3,"sources":["jsdelivr-header.js","/npm/@sensorfactdev/ellipsisify@1.0.0/lib/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAUA,SAAS,QAAQ,GAAwT,OAAtO,QAArD,mBAAX,QAAoD,iBAApB,OAAO,SAAmC,SAAiB,GAAO,cAAc,CAAK,EAAsB,SAAiB,GAAO,OAAO,GAAyB,mBAAX,QAAyB,EAAI,cAAgB,QAAU,IAAQ,OAAO,UAAY,gBAAkB,CAAK,EAAY,QAAQ,EAAM,CAE9V,SAAS,YAAY,EAAK,EAAQ,GAChC,IAAI,EAAW,UAAU,OAAS,QAAsB,IAAjB,UAAU,GAAmB,UAAU,GAAK,MAE/E,EAAY,QAAQ,GAExB,GAAkB,WAAd,EACF,MAAM,IAAI,UAAU,uDAAuD,OAAO,EAAW,MAG/F,OAAI,EAAI,QAAU,IACb,GAAU,EAAS,GAAU,EAAI,OADL,EAE5B,EACE,GAAG,OAAO,EAAI,OAAO,EAAG,IAAS,OAAO,GAAU,OAAO,EAAI,OAAO,EAAI,OAAS,IADpE,GAAG,OAAO,EAAI,OAAO,EAAG,IAAS,OAAO,EAE9D,CAEA,OAAO,QAAU","file":"/npm/@sensorfactdev/ellipsisify@1.0.0/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.19.2.\n * Original file: /npm/@sensorfactdev/ellipsisify@1.0.0/lib/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","'use strict';\n/**\n * ellipsisify\n * @param {string} str The string you need to cut off\n * @param {number} cutoff The position on which you want to cut off\n * @param {number} remain The amount of characters that should remain after the ellipsis\n * @param {string} [ellipsis='...'] The string to add to the end\n * @returns {string} ellipsisified string\n */\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ellipsisify(str, cutoff, remain) {\n  var ellipsis = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '...';\n\n  var inputType = _typeof(str);\n\n  if (inputType !== 'string') {\n    throw new TypeError(\"Expected type of input to be `string` but received `\".concat(inputType, \"`\"));\n  }\n\n  if (str.length <= cutoff) return str;\n  if (!cutoff || cutoff + remain >= str.length) return str;\n  if (!remain) return \"\".concat(str.substr(0, cutoff)).concat(ellipsis);\n  return \"\".concat(str.substr(0, cutoff)).concat(ellipsis).concat(str.substr(str.length - remain));\n}\n\nmodule.exports = ellipsisify;\n"]}