Liferay.Loader.define("data-engine-taglib$path-to-regexp@1.8.0/index",["module","exports","require","data-engine-taglib$isarray"],(function(e,t,r){window;{var n=r("data-engine-taglib$isarray");e.exports=pathToRegexp,e.exports.parse=parse,e.exports.compile=function compile(e,t){return tokensToFunction(parse(e,t),t)},e.exports.tokensToFunction=tokensToFunction,e.exports.tokensToRegExp=tokensToRegExp;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function parse(e,t){for(var r,n=[],a=0,i=0,p="",s=t&&t.delimiter||"/";null!=(r=o.exec(e));){var c=r[0],l=r[1],u=r.index;if(p+=e.slice(i,u),i=u+c.length,l)p+=l[1];else{var g=e[i],f=r[2],x=r[3],h=r[4],d=r[5],y=r[6],m=r[7];p&&(n.push(p),p="");var v=r[2]||s,R=h||d;n.push({name:x||a++,prefix:f||"",delimiter:v,optional:"?"===y||"*"===y,repeat:"+"===y||"*"===y,partial:null!=f&&null!=g&&g!==f,asterisk:!!m,pattern:R?escapeGroup(R):m?".*":"[^"+escapeString(v)+"]+?"})}}return i<e.length&&(p+=e.substr(i)),p&&n.push(p),n}function encodeURIComponentPretty(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function tokensToFunction(e,t){for(var r=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(r[o]=new RegExp("^(?:"+e[o].pattern+")$",flags(t)));return function(t,o){for(var a="",i=t||{},p=(o||{}).pretty?encodeURIComponentPretty:encodeURIComponent,s=0;s<e.length;s++){var c=e[s];if("string"!=typeof c){var l,u=i[c.name];if(null==u){if(c.optional){c.partial&&(a+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(n(u)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(u)+"`");if(0===u.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var g=0;g<u.length;g++){if(l=p(u[g]),!r[s].test(l))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(l)+"`");a+=(0===g?c.prefix:c.delimiter)+l}}else{if(l=c.asterisk?encodeURI(u).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):p(u),!r[s].test(l))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+l+'"');a+=c.prefix+l}}else a+=c}return a}}function escapeString(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function escapeGroup(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function attachKeys(e,t){return e.keys=t,e}function flags(e){return e&&e.sensitive?"":"i"}function tokensToRegExp(e,t,r){n(t)||(r=t||r,t=[]);for(var o=(r=r||{}).strict,a=!1!==r.end,i="",p=0;p<e.length;p++){var s=e[p];if("string"==typeof s)i+=escapeString(s);else{var c=escapeString(s.prefix),l="(?:"+s.pattern+")";t.push(s),s.repeat&&(l+="(?:"+c+l+")*"),i+=l=s.optional?s.partial?c+"("+l+")?":"(?:"+c+"("+l+"))?":c+"("+l+")"}}var u=escapeString(r.delimiter||"/"),g=i.slice(-u.length)===u;return o||(i=(g?i.slice(0,-u.length):i)+"(?:"+u+"(?=$))?"),i+=a?"$":o&&g?"":"(?="+u+"|$)",attachKeys(new RegExp("^"+i,flags(r)),t)}function pathToRegexp(e,t,r){return n(t)||(r=t||r,t=[]),r=r||{},e instanceof RegExp?function regexpToRegexp(e,t){var r=e.source.match(/\((?!\?)/g);if(r)for(var n=0;n<r.length;n++)t.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return attachKeys(e,t)}(e,t):n(e)?function arrayToRegexp(e,t,r){for(var n=[],o=0;o<e.length;o++)n.push(pathToRegexp(e[o],t,r).source);return attachKeys(new RegExp("(?:"+n.join("|")+")",flags(r)),t)}(e,t,r):function stringToRegexp(e,t,r){return tokensToRegExp(parse(e,r),t,r)}(e,t,r)}}}));
//# sourceMappingURL=index.js.map