/** * @license Angular v8.1.0 * (c) 2010-2019 Google LLC. https://angular.io/ * License: MIT */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/upgrade/static")):"function"==typeof define&&define.amd?define("@angular/common/upgrade",["exports","@angular/common","@angular/core","@angular/upgrade/static"],e):e(((t=t||self).ng=t.ng||{},t.ng.common=t.ng.common||{},t.ng.common.upgrade={}),t.ng.common,t.ng.core,t.ng.upgrade.static)}(this,function(t,e,r,o){"use strict";var a=function(){return(a=Object.assign||function t(e){for(var r,o=1,a=arguments.length;o0)&&!(o=n.next()).done;)i.push(o.value)}catch(t){a={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}(a,2),s=n[0],h=n[1];try{s(t,e,r,o)}catch(t){h(t)}})},t.prototype.$$parse=function(t){var e;if(void 0===(e=t.startsWith("/")?t:this.stripBaseUrl(this.getServerBase(),t)))throw new Error('Invalid url "'+t+'", missing path prefix "'+this.getServerBase()+'".');this.parseAppUrl(e),this.$$path||(this.$$path="/"),this.composeUrls()},t.prototype.$$parseLinkUrl=function(t,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var r,o=this.stripBaseUrl(this.getServerBase(),t);return void 0!==o?r=this.getServerBase()+o:this.getServerBase()===t+"/"&&(r=this.getServerBase()),r&&this.$$parse(r),!!r},t.prototype.setBrowserUrlWithFallback=function(t,e,r){var o=this.url(),a=this.$$state;try{this.browserUrl(t,e,r),this.$$state=this.browserState(),this.$$notifyChangeListeners(t,r,o,a)}catch(t){throw this.url(o),this.$$state=a,t}},t.prototype.composeUrls=function(){this.$$url=this.urlCodec.normalize(this.$$path,this.$$search,this.$$hash),this.$$absUrl=this.getServerBase()+this.$$url.substr(1),this.updateBrowser=!0},t.prototype.absUrl=function(){return this.$$absUrl},t.prototype.url=function(t){if("string"==typeof t){t.length||(t="/");var e=n.exec(t);return e?((e[1]||""===t)&&this.path(this.urlCodec.decodePath(e[1])),(e[2]||e[1]||""===t)&&this.search(e[3]||""),this.hash(e[5]||""),this):this}return this.$$url},t.prototype.protocol=function(){return this.$$protocol},t.prototype.host=function(){return this.$$host},t.prototype.port=function(){return this.$$port},t.prototype.path=function(t){return void 0===t?this.$$path:(t="/"===(t=null!==t?t.toString():"").charAt(0)?t:"/"+t,this.$$path=t,this.composeUrls(),this)},t.prototype.search=function(t,e){switch(arguments.length){case 0:return this.$$search;case 1:if("string"==typeof t||"number"==typeof t)this.$$search=this.urlCodec.decodeSearch(t.toString());else{if("object"!=typeof t||null===t)throw new Error("LocationProvider.search(): First argument must be a string or an object.");for(var r in t=a({},t))null==t[r]&&delete t[r];this.$$search=t}break;default:if("string"==typeof t){var o=this.search();return null==e?(delete o[t],this.search(o)):(o[t]=e,this.search(o))}}return this.composeUrls(),this},t.prototype.hash=function(t){return void 0===t?this.$$hash:(this.$$hash=null!==t?t.toString():"",this.composeUrls(),this)},t.prototype.replace=function(){return this.$$replace=!0,this},t.prototype.state=function(t){return void 0===t?this.$$state:(this.$$state=t,this)},t}(),p=function(){function t(t,e,r,o,a){this.ngUpgrade=t,this.location=e,this.platformLocation=r,this.urlCodec=o,this.locationStrategy=a}return t.prototype.$get=function(){return new c(this.ngUpgrade.$injector,this.location,this.platformLocation,this.urlCodec,this.locationStrategy)},t.prototype.hashPrefix=function(t){throw new Error("Configure LocationUpgrade through LocationUpgradeModule.config method.")},t.prototype.html5Mode=function(t){throw new Error("Configure LocationUpgrade through LocationUpgradeModule.config method.")},t}(),u=function u(){},l=function(){function t(){}return t.prototype.encodePath=function(t){for(var e=t.split("/"),r=e.length;r--;)e[r]=$(e[r].replace(/%2F/g,"/"));return function o(t){return t.replace(/\/index.html$/,"")}(((t=e.join("/"))&&"/"!==t[0]?"/":"")+t)},t.prototype.encodeSearch=function(t){return"string"==typeof t&&(t=d(t)),(t=function e(t){var e=[],r=function(r){var o=t[r];Array.isArray(o)?o.forEach(function(t){e.push(g(r,!0)+(!0===t?"":"="+g(t,!0)))}):e.push(g(r,!0)+(!0===o?"":"="+g(o,!0)))};for(var o in t)r(o);return e.length?e.join("&"):""}(t))?"?"+t:""},t.prototype.encodeHash=function(t){return(t=$(t))?"#"+t:""},t.prototype.decodePath=function(t,e){void 0===e&&(e=!0);for(var r=t.split("/"),o=r.length;o--;)r[o]=decodeURIComponent(r[o]),e&&(r[o]=r[o].replace(/\//g,"%2F"));return r.join("/")},t.prototype.decodeSearch=function(t){return d(t)},t.prototype.decodeHash=function(t){return"#"===(t=decodeURIComponent(t))[0]?t.substring(1):t},t.prototype.normalize=function(t,e,r,o){if(1===arguments.length){var a=this.parse(t,o);if("string"==typeof a)return a;var n=a.protocol+"://"+a.hostname+(a.port?":"+a.port:"");return this.normalize(this.decodePath(a.pathname),this.decodeSearch(a.search),this.decodeHash(a.hash),n)}var i=this.encodePath(t),s=e&&this.encodeSearch(e)||"",h=r&&this.encodeHash(r)||"",c=(o||"")+i;return c.length&&"/"===c[0]||(c="/"+c),c+s+h},t.prototype.areEqual=function(t,e){return this.normalize(t)===this.normalize(e)},t.prototype.parse=function(t,e){try{var r=new URL(t,e);return{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}catch(r){throw new Error("Invalid URL ("+t+") with base ("+e+")")}},t}();function f(t){try{return decodeURIComponent(t)}catch(t){return}}function d(t){var e={};return(t||"").split("&").forEach(function(t){var r,o,a;t&&(o=t=t.replace(/\+/g,"%20"),-1!==(r=t.indexOf("="))&&(o=t.substring(0,r),a=t.substring(r+1)),void 0!==(o=f(o))&&(a=void 0===a||f(a),e.hasOwnProperty(o)?Array.isArray(e[o])?e[o].push(a):e[o]=[e[o],a]:e[o]=a))}),e}function $(t){return g(t,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function g(t,e){return void 0===e&&(e=!1),encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,e?"%20":"+")} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */var y=new r.InjectionToken("LOCATION_UPGRADE_CONFIGURATION"),v=new r.InjectionToken("APP_BASE_HREF_RESOLVED"),m=function(){function t(){}var a;return a=t,t.config=function(t){return{ngModule:a,providers:[e.Location,{provide:c,useFactory:b,deps:[o.UpgradeModule,e.Location,e.PlatformLocation,u,e.LocationStrategy]},{provide:y,useValue:t||{}},{provide:u,useFactory:U,deps:[y]},{provide:v,useFactory:S,deps:[y,[new r.Inject(e.APP_BASE_HREF),new r.Optional]]},{provide:e.LocationStrategy,useFactory:w,deps:[e.PlatformLocation,v,y]}]}},a=function n(t,e,r,o){var a,n=arguments.length,i=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,o);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(i=(n<3?a(i):n>3?a(e,r,i):a(e,r))||i);return n>3&&i&&Object.defineProperty(e,r,i),i}([r.NgModule({imports:[e.CommonModule]})],t)}();function S(t,e){return t&&null!=t.appBaseHref?t.appBaseHref:null!=e?e:""}function U(t){return new(t&&t.urlCodec||l)}function w(t,r,o){return void 0===o&&(o={}),o.useHash?new e.HashLocationStrategy(t,r):new e.PathLocationStrategy(t,r)}function b(t,e,r,o,a){return new p(t,e,r,o,a).$get()} /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */t.ɵangular_packages_common_upgrade_upgrade_d=b,t.ɵangular_packages_common_upgrade_upgrade_a=S,t.ɵangular_packages_common_upgrade_upgrade_c=w,t.ɵangular_packages_common_upgrade_upgrade_b=U,t.$locationShim=c,t.$locationShimProvider=p,t.LOCATION_UPGRADE_CONFIGURATION=y,t.LocationUpgradeModule=m,t.AngularJSUrlCodec=l,t.UrlCodec=u,Object.defineProperty(t,"__esModule",{value:!0})});