UNPKG

dd-trace

Version:

Datadog APM tracing client for JavaScript

1 lines 1.52 kB
(()=>{var e={"./path-to-regexp/index.js":function(e){e.exports=function e(t,n,o){n=n||[];var i,s=(o=o||{}).strict,a=!1!==o.end,f=o.sensitive?"":"i",p=!1!==o.lookahead,u=0,x=n.length,g=0,l=0,c=0,h="";if(t instanceof RegExp){for(;i=r.exec(t.source);)"\\"!==i[0][0]&&n.push({name:i[1]||l++,optional:!1,offset:i.index});return t}if(Array.isArray(t))return new RegExp((t=t.map(function(r){return e(r,n,o).source})).join("|"),f);if("string"!=typeof t)throw TypeError("path must be a string, array of strings, or regular expression");for(t=t.replace(/\\.|(\/)?(\.)?:(\w+)(\(.*?\))?(\*)?(\?)?|[.*]|\/\(/g,function(e,r,o,i,s,a,f,p){if("\\"===e[0])return h+=e,c+=2,e;if("."===e)return h+="\\.",u+=1,c+=1,"\\.";if(r||o?h="":h+=t.slice(c,p),c=p+e.length,"*"===e)return u+=3,"(.*)";if("/("===e)return h+="/",u+=2,"/(?:";r=r||"",o=o?"\\.":"",f=f||"",s=s?s.replace(/\\.|\*/,function(e){return"*"===e?"(.*)":e}):h?"((?:(?!/|"+h+").)+?)":"([^/"+o+"]+?)",n.push({name:i,optional:!!f,offset:p+u});var x="(?:"+o+r+s+(a?"((?:[/"+o+"].+?)?)":"")+")"+f;return u+=x.length-e.length,x});i=r.exec(t);)"\\"!==i[0][0]&&((x+g===n.length||n[x+g].offset>i.index)&&n.splice(x+g,0,{name:l++,optional:!1,offset:i.index}),g++);return t+=s?"":"/"===t[t.length-1]?"?":"/?",a?t+="$":"/"!==t[t.length-1]&&(t+=p?"(?=/|$)":"(?:/|$)"),RegExp("^"+t,f)};var r=/\\.|\((?:\?<(.*?)>)?(?!\?)/g}},r={},t=function t(n){var o=r[n];if(void 0!==o)return o.exports;var i=r[n]={exports:{}};return e[n](i,i.exports,t),i.exports}("./path-to-regexp/index.js");module.exports=t})();