define(["exports","./index.js"],function(_exports,_index){"use strict";Object.defineProperty(_exports,"__esModule",{value:!0});Object.defineProperty(_exports,"Router",{enumerable:!0,get:function get(){return _index.Router}});Object.defineProperty(_exports,"Resolver",{enumerable:!0,get:function get(){return _index.Resolver}});var isUrlAvailable,urlDocument,urlBase,urlAnchor;_index.Resolver.__ensureUrlAvailableOrPolyfilled=function(){if(isUrlAvailable===void 0){try{var url=new URL("b","http://a");url.pathname="c";isUrlAvailable="http://a/c"===url.href}catch(e){isUrlAvailable=!1}if(!isUrlAvailable){// The URL constructor is not available in IE11. Polyfill it by creating
// an HTMLAnchorElement in an in-memory HTML document.
urlDocument=document.implementation.createHTMLDocument("url");urlBase=urlDocument.createElement("base");urlDocument.head.appendChild(urlBase);urlAnchor=urlDocument.createElement("a");if(!urlAnchor.origin){// IE11: HTMLAnchorElement does not have the `origin` property
Object.defineProperty(urlAnchor,"origin",{get:function get(){// IE11: on HTTP and HTTPS the default port is not included into
// window.location.origin, so won't include it here either.
var protocol=urlAnchor.protocol,port=urlAnchor.port,defaultHttp="http:"===protocol&&"80"===port,defaultHttps="https:"===protocol&&"443"===port,host=defaultHttp||defaultHttps?urlAnchor.hostname:urlAnchor.host;return"".concat(protocol,"//").concat(host)}});// IE11: HTMLAnchorElement pathname does not start with a leading slash
var getPathnameOrig=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(urlAnchor),"pathname").get;Object.defineProperty(urlAnchor,"pathname",{get:function get(){var pathname=getPathnameOrig.apply(urlAnchor);return"/"!==pathname.charAt(0)?"/"+pathname:pathname}})}}}};_index.Resolver.__createUrl=function(path,base){_index.Resolver.__ensureUrlAvailableOrPolyfilled();if(isUrlAvailable){return new URL(path,base)}urlBase.href=base;urlAnchor.href=path.replace(/ /g,"%20");// IE11: only absolute href setting results in correct part properties
// (`protocol`, `host`, `port`, and such), otherwise they are empty.
urlAnchor.href=urlAnchor.href;// eslint-disable-line no-self-assign
return urlAnchor}});