@bull-board/ui
Version:
A Dashboard UI built on top of bull or bullmq.
1 lines • 19.7 kB
JavaScript
(self.webpackChunk_bull_board_ui=self.webpackChunk_bull_board_ui||[]).push([["2118"],{17547:function(n,t,e){"use strict";e.d(t,{Ep:()=>l,PP:()=>A,lX:()=>g,ob:()=>f,q_:()=>P});var r=e(13714),o=e(57613),i=e(44965);function a(n){return"/"===n.charAt(0)?n:"/"+n}function c(n){return"/"===n.charAt(0)?n.substr(1):n}function u(n,t){return 0===n.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(n.charAt(t.length))?n.substr(t.length):n}function s(n){return"/"===n.charAt(n.length-1)?n.slice(0,-1):n}function l(n){var t=n.pathname,e=n.search,r=n.hash,o=t||"/";return e&&"?"!==e&&(o+="?"===e.charAt(0)?e:"?"+e),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function f(n,t,e,i){var a,c,u,s,l,f;"string"==typeof n?(u="",s="",-1!==(l=(c=n||"/").indexOf("#"))&&(s=c.substr(l),c=c.substr(0,l)),-1!==(f=c.indexOf("?"))&&(u=c.substr(f),c=c.substr(0,f)),(a={pathname:c,search:"?"===u?"":u,hash:"#"===s?"":s}).state=t):(void 0===(a=(0,r.Z)({},n)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(n){if(n instanceof URIError)throw URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.');throw n}return e&&(a.key=e),i?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=(0,o.Z)(a.pathname,i.pathname)):a.pathname=i.pathname:a.pathname||(a.pathname="/"),a}function p(){var n=null,t=[];return{setPrompt:function(t){return n=t,function(){n===t&&(n=null)}},confirmTransitionTo:function(t,e,r,o){if(null!=n){var i="function"==typeof n?n(t,e):n;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(n){var e=!0;function r(){e&&n.apply(void 0,arguments)}return t.push(r),function(){e=!1,t=t.filter(function(n){return n!==r})}},notifyListeners:function(){for(var n=arguments.length,e=Array(n),r=0;r<n;r++)e[r]=arguments[r];t.forEach(function(n){return n.apply(void 0,e)})}}}var h=!!("undefined"!=typeof window&&window.document&&window.document.createElement);function d(n,t){t(window.confirm(n))}var v="popstate",m="hashchange";function y(){try{return window.history.state||{}}catch(n){return{}}}function g(n){void 0===n&&(n={}),h||(0,i.Z)(!1);var t,e=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,c=-1!==window.navigator.userAgent.indexOf("Trident"),g=n,x=g.forceRefresh,w=void 0!==x&&x,E=g.getUserConfirmation,b=void 0===E?d:E,C=g.keyLength,P=void 0===C?6:C,k=n.basename?s(a(n.basename)):"";function A(n){var t=n||{},e=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return k&&(i=u(i,k)),f(i,r,e)}function O(){return Math.random().toString(36).substr(2,P)}var R=p();function T(n){(0,r.Z)(j,n),j.length=e.length,R.notifyListeners(j.location,j.action)}function L(n){(void 0!==n.state||-1!==navigator.userAgent.indexOf("CriOS"))&&S(A(n.state))}function Z(){S(A(y()))}var _=!1;function S(n){_?(_=!1,T()):R.confirmTransitionTo(n,"POP",b,function(t){var e,r,o,i,a;t?T({action:"POP",location:n}):(e=n,r=j.location,-1===(o=M.indexOf(r.key))&&(o=0),-1===(i=M.indexOf(e.key))&&(i=0),(a=o-i)&&(_=!0,I(a)))})}var U=A(y()),M=[U.key];function N(n){return k+l(n)}function I(n){e.go(n)}var $=0;function B(n){1===($+=n)&&1===n?(window.addEventListener(v,L),c&&window.addEventListener(m,Z)):0===$&&(window.removeEventListener(v,L),c&&window.removeEventListener(m,Z))}var H=!1,j={length:e.length,action:"POP",location:U,createHref:N,push:function(n,t){var r="PUSH",i=f(n,t,O(),j.location);R.confirmTransitionTo(i,r,b,function(n){if(n){var t=N(i),a=i.key,c=i.state;if(o)if(e.pushState({key:a,state:c},null,t),w)window.location.href=t;else{var u=M.indexOf(j.location.key),s=M.slice(0,u+1);s.push(i.key),M=s,T({action:r,location:i})}else window.location.href=t}})},replace:function(n,t){var r="REPLACE",i=f(n,t,O(),j.location);R.confirmTransitionTo(i,r,b,function(n){if(n){var t=N(i),a=i.key,c=i.state;if(o)if(e.replaceState({key:a,state:c},null,t),w)window.location.replace(t);else{var u=M.indexOf(j.location.key);-1!==u&&(M[u]=i.key),T({action:r,location:i})}else window.location.replace(t)}})},go:I,goBack:function(){I(-1)},goForward:function(){I(1)},block:function(n){void 0===n&&(n=!1);var t=R.setPrompt(n);return H||(B(1),H=!0),function(){return H&&(H=!1,B(-1)),t()}},listen:function(n){var t=R.appendListener(n);return B(1),function(){B(-1),t()}}};return j}var x="hashchange",w={hashbang:{encodePath:function(n){return"!"===n.charAt(0)?n:"!/"+c(n)},decodePath:function(n){return"!"===n.charAt(0)?n.substr(1):n}},noslash:{encodePath:c,decodePath:a},slash:{encodePath:a,decodePath:a}};function E(n){var t=n.indexOf("#");return -1===t?n:n.slice(0,t)}function b(){var n=window.location.href,t=n.indexOf("#");return -1===t?"":n.substring(t+1)}function C(n){window.location.replace(E(window.location.href)+"#"+n)}function P(n){void 0===n&&(n={}),h||(0,i.Z)(!1);var t=window.history;window.navigator.userAgent.indexOf("Firefox");var e=n,o=e.getUserConfirmation,c=void 0===o?d:o,v=e.hashType,m=n.basename?s(a(n.basename)):"",y=w[void 0===v?"slash":v],g=y.encodePath,P=y.decodePath;function k(){var n=P(b());return m&&(n=u(n,m)),f(n)}var A=p();function O(n){(0,r.Z)(B,n),B.length=t.length,A.notifyListeners(B.location,B.action)}var R=!1,T=null;function L(){var n=b(),t=g(n);if(n!==t)C(t);else{var e,r=k(),o=B.location;if(!R&&o.pathname===r.pathname&&o.search===r.search&&o.hash===r.hash||T===l(r))return;T=null,e=r,R?(R=!1,O()):A.confirmTransitionTo(e,"POP",c,function(n){var t,r,o,i,a;n?O({action:"POP",location:e}):(t=e,r=B.location,-1===(o=U.lastIndexOf(l(r)))&&(o=0),-1===(i=U.lastIndexOf(l(t)))&&(i=0),(a=o-i)&&(R=!0,M(a)))})}}var Z=b(),_=g(Z);Z!==_&&C(_);var S=k(),U=[l(S)];function M(n){t.go(n)}var N=0;function I(n){1===(N+=n)&&1===n?window.addEventListener(x,L):0===N&&window.removeEventListener(x,L)}var $=!1,B={length:t.length,action:"POP",location:S,createHref:function(n){var t=document.querySelector("base"),e="";return t&&t.getAttribute("href")&&(e=E(window.location.href)),e+"#"+g(m+l(n))},push:function(n,t){var e="PUSH",r=f(n,void 0,void 0,B.location);A.confirmTransitionTo(r,e,c,function(n){if(n){var t=l(r),o=g(m+t);if(b()!==o){T=t,window.location.hash=o;var i=U.lastIndexOf(l(B.location)),a=U.slice(0,i+1);a.push(t),U=a,O({action:e,location:r})}else O()}})},replace:function(n,t){var e="REPLACE",r=f(n,void 0,void 0,B.location);A.confirmTransitionTo(r,e,c,function(n){if(n){var t=l(r),o=g(m+t);b()!==o&&(T=t,C(o));var i=U.indexOf(l(B.location));-1!==i&&(U[i]=t),O({action:e,location:r})}})},go:M,goBack:function(){M(-1)},goForward:function(){M(1)},block:function(n){void 0===n&&(n=!1);var t=A.setPrompt(n);return $||(I(1),$=!0),function(){return $&&($=!1,I(-1)),t()}},listen:function(n){var t=A.appendListener(n);return I(1),function(){I(-1),t()}}};return B}function k(n,t,e){return Math.min(Math.max(n,t),e)}function A(n){void 0===n&&(n={});var t=n,e=t.getUserConfirmation,o=t.initialEntries,i=void 0===o?["/"]:o,a=t.initialIndex,c=t.keyLength,u=void 0===c?6:c,s=p();function h(n){(0,r.Z)(g,n),g.length=g.entries.length,s.notifyListeners(g.location,g.action)}function d(){return Math.random().toString(36).substr(2,u)}var v=k(void 0===a?0:a,0,i.length-1),m=i.map(function(n){return"string"==typeof n?f(n,void 0,d()):f(n,void 0,n.key||d())});function y(n){var t=k(g.index+n,0,g.entries.length-1),r=g.entries[t];s.confirmTransitionTo(r,"POP",e,function(n){n?h({action:"POP",location:r,index:t}):h()})}var g={length:m.length,action:"POP",location:m[v],index:v,entries:m,createHref:l,push:function(n,t){var r="PUSH",o=f(n,t,d(),g.location);s.confirmTransitionTo(o,r,e,function(n){if(n){var t=g.index+1,e=g.entries.slice(0);e.length>t?e.splice(t,e.length-t,o):e.push(o),h({action:r,location:o,index:t,entries:e})}})},replace:function(n,t){var r="REPLACE",o=f(n,t,d(),g.location);s.confirmTransitionTo(o,r,e,function(n){n&&(g.entries[g.index]=o,h({action:r,location:o}))})},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(n){var t=g.index+n;return t>=0&&t<g.entries.length},block:function(n){return void 0===n&&(n=!1),s.setPrompt(n)},listen:function(n){return s.appendListener(n)}};return g}},47933:function(n,t,e){"use strict";e.d(t,{OL:()=>x,VK:()=>l,rU:()=>m});var r=e(7267),o=e(12485),i=e(2784),a=e(17547),c=e(13714),u=e(83660),s=e(44965),l=function(n){function t(){for(var t,e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return(t=n.call.apply(n,[this].concat(r))||this).history=(0,a.lX)(t.props),t}return(0,o.Z)(t,n),t.prototype.render=function(){return i.createElement(r.F0,{history:this.history,children:this.props.children})},t}(i.Component);i.Component;var f=function(n,t){return"function"==typeof n?n(t):n},p=function(n,t){return"string"==typeof n?(0,a.ob)(n,null,null,t):n},h=function(n){return n},d=i.forwardRef;void 0===d&&(d=h);var v=d(function(n,t){var e=n.innerRef,r=n.navigate,o=n.onClick,a=(0,u.Z)(n,["innerRef","navigate","onClick"]),s=a.target,l=(0,c.Z)({},a,{onClick:function(n){try{o&&o(n)}catch(t){throw n.preventDefault(),t}n.defaultPrevented||0!==n.button||s&&"_self"!==s||n.metaKey||n.altKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),r())}});return h!==d?l.ref=t||e:l.ref=e,i.createElement("a",l)}),m=d(function(n,t){var e=n.component,o=void 0===e?v:e,l=n.replace,m=n.to,y=n.innerRef,g=(0,u.Z)(n,["component","replace","to","innerRef"]);return i.createElement(r.s6.Consumer,null,function(n){n||(0,s.Z)(!1);var e=n.history,r=p(f(m,n.location),n.location),u=r?e.createHref(r):"",v=(0,c.Z)({},g,{href:u,navigate:function(){var t=f(m,n.location),r=(0,a.Ep)(n.location)===(0,a.Ep)(p(t));(l||r?e.replace:e.push)(t)}});return h!==d?v.ref=t||y:v.innerRef=y,i.createElement(o,v)})}),y=function(n){return n},g=i.forwardRef;void 0===g&&(g=y);var x=g(function(n,t){var e=n["aria-current"],o=void 0===e?"page":e,a=n.activeClassName,l=void 0===a?"active":a,h=n.activeStyle,d=n.className,v=n.exact,x=n.isActive,w=n.location,E=n.sensitive,b=n.strict,C=n.style,P=n.to,k=n.innerRef,A=(0,u.Z)(n,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return i.createElement(r.s6.Consumer,null,function(n){n||(0,s.Z)(!1);var e=w||n.location,a=p(f(P,e),e),u=a.pathname,O=u&&u.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),R=O?(0,r.LX)(e.pathname,{path:O,exact:v,sensitive:E,strict:b}):null,T=!!(x?x(R,e):R),L="function"==typeof d?d(T):d,Z="function"==typeof C?C(T):C;T&&(L=function(){for(var n=arguments.length,t=Array(n),e=0;e<n;e++)t[e]=arguments[e];return t.filter(function(n){return n}).join(" ")}(L,l),Z=(0,c.Z)({},Z,h));var _=(0,c.Z)({"aria-current":T&&o||null,className:L,style:Z,to:a},A);return y!==g?_.ref=t||k:_.innerRef=k,i.createElement(m,_)})})},7267:function(n,t,e){"use strict";e.d(t,{AW:()=>C,EN:()=>k,F0:()=>x,LX:()=>b,TH:()=>R,k6:()=>O,rs:()=>P,s6:()=>g});var r=e(12485),o=e(2784),i=e(13980),a=e.n(i),c=(e(17547),e(44965)),u=e(13714),s=e(79056),l=e.n(s);e(48570);var f=e(83660),p=e(73463),h=e.n(p),d="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:{},v=o.createContext||function(n,t){var e,i,c,u="__create-react-context-"+(d[e="__global_unique_id__"]=(d[e]||0)+1)+"__",s=function(n){function e(){for(var t,e,r,o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=(t=n.call.apply(n,[this].concat(i))||this).props.value,r=[],t.emitter={on:function(n){r.push(n)},off:function(n){r=r.filter(function(t){return t!==n})},get:function(){return e},set:function(n,t){e=n,r.forEach(function(n){return n(e,t)})}},t}(0,r.Z)(e,n);var o=e.prototype;return o.getChildContext=function(){var n;return(n={})[u]=this.emitter,n},o.componentWillReceiveProps=function(n){if(this.props.value!==n.value){var e,r=this.props.value,o=n.value;(r===o?0!==r||1/r==1/o:r!=r&&o!=o)?e=0:0!=(e=("function"==typeof t?t(r,o):0x3fffffff)|0)&&this.emitter.set(n.value,e)}},o.render=function(){return this.props.children},e}(o.Component);(i={})[u]=a().object.isRequired,s.childContextTypes=i;var l=function(t){function e(){for(var n,e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return(n=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,n.state={value:n.getValue()},n.onUpdate=function(t,e){((0|n.observedBits)&e)!=0&&n.setState({value:n.getValue()})},n}(0,r.Z)(e,t);var o=e.prototype;return o.componentWillReceiveProps=function(n){var t=n.observedBits;this.observedBits=null==t?0x3fffffff:t},o.componentDidMount=function(){this.context[u]&&this.context[u].on(this.onUpdate);var n=this.props.observedBits;this.observedBits=null==n?0x3fffffff:n},o.componentWillUnmount=function(){this.context[u]&&this.context[u].off(this.onUpdate)},o.getValue=function(){return this.context[u]?this.context[u].get():n},o.render=function(){var n;return(Array.isArray(n=this.props.children)?n[0]:n)(this.state.value)},e}(o.Component);return(c={})[u]=a().object,l.contextTypes=c,{Provider:s,Consumer:l}},m=function(n){var t=v();return t.displayName=n,t},y=m("Router-History"),g=m("Router"),x=function(n){function t(t){var e;return(e=n.call(this,t)||this).state={location:t.history.location},e._isMounted=!1,e._pendingLocation=null,t.staticContext||(e.unlisten=t.history.listen(function(n){e._pendingLocation=n})),e}(0,r.Z)(t,n),t.computeRootMatch=function(n){return{path:"/",url:"/",params:{},isExact:"/"===n}};var e=t.prototype;return e.componentDidMount=function(){var n=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(t){n._isMounted&&n.setState({location:t})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},e.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},e.render=function(){return o.createElement(g.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.createElement(y.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.Component);o.Component,o.Component;var w={},E=0;function b(n,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var e=t,r=e.path,o=e.exact,i=void 0!==o&&o,a=e.strict,c=void 0!==a&&a,u=e.sensitive,s=void 0!==u&&u;return[].concat(r).reduce(function(t,e){if(!e&&""!==e)return null;if(t)return t;var r=function(n,t){var e=""+t.end+t.strict+t.sensitive,r=w[e]||(w[e]={});if(r[n])return r[n];var o=[],i={regexp:l()(n,o,t),keys:o};return E<1e4&&(r[n]=i,E++),i}(e,{end:i,strict:c,sensitive:s}),o=r.regexp,a=r.keys,u=o.exec(n);if(!u)return null;var f=u[0],p=u.slice(1),h=n===f;return i&&!h?null:{path:e,url:"/"===e&&""===f?"/":f,isExact:h,params:a.reduce(function(n,t,e){return n[t.name]=p[e],n},{})}},null)}var C=function(n){function t(){return n.apply(this,arguments)||this}return(0,r.Z)(t,n),t.prototype.render=function(){var n=this;return o.createElement(g.Consumer,null,function(t){t||(0,c.Z)(!1);var e,r=n.props.location||t.location,i=n.props.computedMatch?n.props.computedMatch:n.props.path?b(r.pathname,n.props):t.match,a=(0,u.Z)({},t,{location:r,match:i}),s=n.props,l=s.children,f=s.component,p=s.render;return Array.isArray(l)&&(e=l,0===o.Children.count(e))&&(l=null),o.createElement(g.Provider,{value:a},a.match?l?"function"==typeof l?l(a):l:f?o.createElement(f,a):p?p(a):null:"function"==typeof l?l(a):null)})},t}(o.Component);o.Component;var P=function(n){function t(){return n.apply(this,arguments)||this}return(0,r.Z)(t,n),t.prototype.render=function(){var n=this;return o.createElement(g.Consumer,null,function(t){t||(0,c.Z)(!1);var e,r,i=n.props.location||t.location;return o.Children.forEach(n.props.children,function(n){if(null==r&&o.isValidElement(n)){e=n;var a=n.props.path||n.props.from;r=a?b(i.pathname,(0,u.Z)({},n.props,{path:a})):t.match}}),r?o.cloneElement(e,{location:i,computedMatch:r}):null})},t}(o.Component);function k(n){var t="withRouter("+(n.displayName||n.name)+")",e=function(t){var e=t.wrappedComponentRef,r=(0,f.Z)(t,["wrappedComponentRef"]);return o.createElement(g.Consumer,null,function(t){return t||(0,c.Z)(!1),o.createElement(n,(0,u.Z)({},r,t,{ref:e}))})};return e.displayName=t,e.WrappedComponent=n,h()(e,n)}var A=o.useContext;function O(){return A(y)}function R(){return A(g).location}},49613:function(n){n.exports=Array.isArray||function(n){return"[object Array]"==Object.prototype.toString.call(n)}},79056:function(n,t,e){var r=e(49613);n.exports=function n(t,e,o){if(r(e)||(o=e||o,e=[]),o=o||{},t instanceof RegExp){var a,c,u=e,f=t.source.match(/\((?!\?)/g);if(f)for(var p=0;p<f.length;p++)u.push({name:p,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return t.keys=u,t}if(r(t)){for(var h,d=e,v=o,m=[],y=0;y<t.length;y++)m.push(n(t[y],d,v).source);return(h=RegExp("(?:"+m.join("|")+")",s(v))).keys=d,h}return a=e,l(i(t,c=o),a,c)},n.exports.parse=i,n.exports.compile=function(n,t){return c(i(n,t),t)},n.exports.tokensToFunction=c,n.exports.tokensToRegExp=l;var o=RegExp("(\\\\.)|([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))","g");function i(n,t){for(var e,r=[],i=0,a=0,c="",s=t&&t.delimiter||"/";null!=(e=o.exec(n));){var l=e[0],f=e[1],p=e.index;if(c+=n.slice(a,p),a=p+l.length,f){c+=f[1];continue}var h=n[a],d=e[2],v=e[3],m=e[4],y=e[5],g=e[6],x=e[7];c&&(r.push(c),c="");var w=null!=d&&null!=h&&h!==d,E="+"===g||"*"===g,b="?"===g||"*"===g,C=e[2]||s,P=m||y;r.push({name:v||i++,prefix:d||"",delimiter:C,optional:b,repeat:E,partial:w,asterisk:!!x,pattern:P?P.replace(/([=!:$\/()])/g,"\\$1"):x?".*":"[^"+u(C)+"]+?"})}return a<n.length&&(c+=n.substr(a)),c&&r.push(c),r}function a(n){return encodeURI(n).replace(/[\/?#]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})}function c(n,t){for(var e=Array(n.length),o=0;o<n.length;o++)"object"==typeof n[o]&&(e[o]=RegExp("^(?:"+n[o].pattern+")$",s(t)));return function(t,o){for(var i="",c=t||{},u=(o||{}).pretty?a:encodeURIComponent,s=0;s<n.length;s++){var l,f=n[s];if("string"==typeof f){i+=f;continue}var p=c[f.name];if(null==p)if(f.optional){f.partial&&(i+=f.prefix);continue}else throw TypeError('Expected "'+f.name+'" to be defined');if(r(p)){if(!f.repeat)throw TypeError('Expected "'+f.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length)if(f.optional)continue;else throw TypeError('Expected "'+f.name+'" to not be empty');for(var h=0;h<p.length;h++){if(l=u(p[h]),!e[s].test(l))throw TypeError('Expected all "'+f.name+'" to match "'+f.pattern+'", but received `'+JSON.stringify(l)+"`");i+=(0===h?f.prefix:f.delimiter)+l}continue}if(l=f.asterisk?encodeURI(p).replace(/[?#]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()}):u(p),!e[s].test(l))throw TypeError('Expected "'+f.name+'" to match "'+f.pattern+'", but received "'+l+'"');i+=f.prefix+l}return i}}function u(n){return n.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(n){return n&&n.sensitive?"":"i"}function l(n,t,e){r(t)||(e=t||e,t=[]);for(var o,i=(e=e||{}).strict,a=!1!==e.end,c="",l=0;l<n.length;l++){var f=n[l];if("string"==typeof f)c+=u(f);else{var p=u(f.prefix),h="(?:"+f.pattern+")";t.push(f),f.repeat&&(h+="(?:"+p+h+")*"),c+=h=f.optional?f.partial?p+"("+h+")?":"(?:"+p+"("+h+"))?":p+"("+h+")"}}var d=u(e.delimiter||"/"),v=c.slice(-d.length)===d;return i||(c=(v?c.slice(0,-d.length):c)+"(?:"+d+"(?=$))?"),a?c+="$":c+=i&&v?"":"(?="+d+"|$)",(o=RegExp("^"+c,s(e))).keys=t,o}}}]);