UNPKG

ng-auth-oidc

Version:

OAuth2 Implicit Flow with OpenID Connect (e.g. identity-server4) implemented with Angular Elements

3 lines 547 kB
!function(r){function e(e){for(var t,p,c=e[0],a=e[1],f=e[2],l=0,s=[];l<c.length;l++)o[p=c[l]]&&s.push(o[p][0]),o[p]=0;for(t in a)Object.prototype.hasOwnProperty.call(a,t)&&(r[t]=a[t]);for(i&&i(e);s.length;)s.shift()();return u.push.apply(u,f||[]),n()}function n(){for(var r,e=0;e<u.length;e++){for(var n=u[e],t=!0,c=1;c<n.length;c++)0!==o[n[c]]&&(t=!1);t&&(u.splice(e--,1),r=p(p.s=n[0]))}return r}var t={},o={0:0},u=[];function p(e){if(t[e])return t[e].exports;var n=t[e]={i:e,l:!1,exports:{}};return r[e].call(n.exports,n,n.exports,p),n.l=!0,n.exports}p.m=r,p.c=t,p.d=function(r,e,n){p.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:n})},p.r=function(r){Object.defineProperty(r,"__esModule",{value:!0})},p.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return p.d(e,"a",e),e},p.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},p.p="";var c=window.webpackJsonp=window.webpackJsonp||[],a=c.push.bind(c);c.push=e,c=c.slice();for(var f=0;f<c.length;f++)e(c[f]);var i=a;n()}([]);
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{"+rLv":function(t,e,n){var r=n("dyZX").document;t.exports=r&&r.documentElement},"0/R4":function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},"0TWp":function(t,e,n){!function(){"use strict";!function(t){var e=t.performance;function n(t){e&&e.mark&&e.mark(t)}function r(t,n){e&&e.measure&&e.measure(t,n)}if(n("Zone"),t.Zone)throw new Error("Zone already loaded.");var o,i=function(){function e(t,e){this._properties=null,this._parent=t,this._name=e?e.name||"unnamed":"<root>",this._properties=e&&e.properties||{},this._zoneDelegate=new c(this,this._parent&&this._parent._zoneDelegate,e)}return e.assertZonePatched=function(){if(t.Promise!==S.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(e,"root",{get:function(){for(var t=e.current;t.parent;)t=t.parent;return t},enumerable:!0,configurable:!0}),Object.defineProperty(e,"current",{get:function(){return O.zone},enumerable:!0,configurable:!0}),Object.defineProperty(e,"currentTask",{get:function(){return D},enumerable:!0,configurable:!0}),e.__load_patch=function(o,i){if(S.hasOwnProperty(o))throw Error("Already loaded patch: "+o);if(!t["__Zone_disable_"+o]){var a="Zone:"+o;n(a),S[o]=i(t,e,x),r(a,a)}},Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),e.prototype.get=function(t){var e=this.getZoneWith(t);if(e)return e._properties[t]},e.prototype.getZoneWith=function(t){for(var e=this;e;){if(e._properties.hasOwnProperty(t))return e;e=e._parent}return null},e.prototype.fork=function(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)},e.prototype.wrap=function(t,e){if("function"!=typeof t)throw new Error("Expecting function got: "+t);var n=this._zoneDelegate.intercept(this,t,e),r=this;return function(){return r.runGuarded(n,this,arguments,e)}},e.prototype.run=function(t,e,n,r){void 0===e&&(e=void 0),void 0===n&&(n=null),void 0===r&&(r=null),O={parent:O,zone:this};try{return this._zoneDelegate.invoke(this,t,e,n,r)}finally{O=O.parent}},e.prototype.runGuarded=function(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),O={parent:O,zone:this};try{try{return this._zoneDelegate.invoke(this,t,e,n,r)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{O=O.parent}},e.prototype.runTask=function(t,e,n){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||g).name+"; Execution: "+this.name+")");if(t.state!==y||t.type!==C){var r=t.state!=b;r&&t._transitionTo(b,_),t.runCount++;var o=D;D=t,O={parent:O,zone:this};try{t.type==T&&t.data&&!t.data.isPeriodic&&(t.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,t,e,n)}catch(t){if(this._zoneDelegate.handleError(this,t))throw t}}finally{t.state!==y&&t.state!==k&&(t.type==C||t.data&&t.data.isPeriodic?r&&t._transitionTo(_,b):(t.runCount=0,this._updateTaskCount(t,-1),r&&t._transitionTo(y,b,y))),O=O.parent,D=o}}},e.prototype.scheduleTask=function(t){if(t.zone&&t.zone!==this)for(var e=this;e;){if(e===t.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+t.zone.name);e=e.parent}t._transitionTo(m,y);var n=[];t._zoneDelegates=n,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(e){throw t._transitionTo(k,m,y),this._zoneDelegate.handleError(this,e),e}return t._zoneDelegates===n&&this._updateTaskCount(t,1),t.state==m&&t._transitionTo(_,m),t},e.prototype.scheduleMicroTask=function(t,e,n,r){return this.scheduleTask(new s(E,t,e,n,r,null))},e.prototype.scheduleMacroTask=function(t,e,n,r,o){return this.scheduleTask(new s(T,t,e,n,r,o))},e.prototype.scheduleEventTask=function(t,e,n,r,o){return this.scheduleTask(new s(C,t,e,n,r,o))},e.prototype.cancelTask=function(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||g).name+"; Execution: "+this.name+")");t._transitionTo(w,_,b);try{this._zoneDelegate.cancelTask(this,t)}catch(e){throw t._transitionTo(k,w),this._zoneDelegate.handleError(this,e),e}return this._updateTaskCount(t,-1),t._transitionTo(y,w),t.runCount=0,t},e.prototype._updateTaskCount=function(t,e){var n=t._zoneDelegates;-1==e&&(t._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(t.type,e)},e.__symbol__=Z,e}(),a={name:"",onHasTask:function(t,e,n,r){return t.hasTask(n,r)},onScheduleTask:function(t,e,n,r){return t.scheduleTask(n,r)},onInvokeTask:function(t,e,n,r,o,i){return t.invokeTask(n,r,o,i)},onCancelTask:function(t,e,n,r){return t.cancelTask(n,r)}},c=function(){function t(t,e,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=t,this._parentDelegate=e,this._forkZS=n&&(n&&n.onFork?n:e._forkZS),this._forkDlgt=n&&(n.onFork?e:e._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:e.zone),this._interceptZS=n&&(n.onIntercept?n:e._interceptZS),this._interceptDlgt=n&&(n.onIntercept?e:e._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:e.zone),this._invokeZS=n&&(n.onInvoke?n:e._invokeZS),this._invokeDlgt=n&&(n.onInvoke?e:e._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:e.zone),this._handleErrorZS=n&&(n.onHandleError?n:e._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?e:e._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:e.zone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:e._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?e:e._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:e.zone),this._invokeTaskZS=n&&(n.onInvokeTask?n:e._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?e:e._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:e.zone),this._cancelTaskZS=n&&(n.onCancelTask?n:e._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?e:e._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:e.zone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||e&&e._hasTaskZS)&&(this._hasTaskZS=r?n:a,this._hasTaskDlgt=e,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=t,n.onScheduleTask||(this._scheduleTaskZS=a,this._scheduleTaskDlgt=e,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=a,this._invokeTaskDlgt=e,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=a,this._cancelTaskDlgt=e,this._cancelTaskCurrZone=this.zone))}return t.prototype.fork=function(t,e){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,t,e):new i(t,e)},t.prototype.intercept=function(t,e,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,t,e,n):e},t.prototype.invoke=function(t,e,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,t,e,n,r,o):e.apply(n,r)},t.prototype.handleError=function(t,e){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,t,e)},t.prototype.scheduleTask=function(t,e){var n=e;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,t,e))||(n=e);else if(e.scheduleFn)e.scheduleFn(e);else{if(e.type!=E)throw new Error("Task is missing scheduleFn.");d(e)}return n},t.prototype.invokeTask=function(t,e,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,t,e,n,r):e.callback.apply(n,r)},t.prototype.cancelTask=function(t,e){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,t,e);else{if(!e.cancelFn)throw Error("Task is not cancelable");n=e.cancelFn(e)}return n},t.prototype.hasTask=function(t,e){try{return this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,t,e)}catch(e){this.handleError(t,e)}},t.prototype._updateTaskCount=function(t,e){var n=this._taskCounts,r=n[t],o=n[t]=r+e;if(o<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=o||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:t})},t}(),s=function(){function e(n,r,o,i,a,c){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=i,this.scheduleFn=a,this.cancelFn=c,this.callback=o;var s=this;this.invoke=n===C&&i&&i.useG?e.invokeTask:function(){return e.invokeTask.call(t,s,this,arguments)}}return e.invokeTask=function(t,e,n){t||(t=this),j++;try{return t.runCount++,t.zone.runTask(t,e,n)}finally{1==j&&v(),j--}},Object.defineProperty(e.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),e.prototype.cancelScheduleRequest=function(){this._transitionTo(y,m)},e.prototype._transitionTo=function(t,e,n){if(this._state!==e&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+t+"', expecting state '"+e+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=t,t==y&&(this._zoneDelegates=null)},e.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId:Object.prototype.toString.call(this)},e.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},e}(),u=Z("setTimeout"),l=Z("Promise"),f=Z("then"),p=[],h=!1;function d(e){0===j&&0===p.length&&(o||t[l]&&(o=t[l].resolve(0)),o?o[f](v):t[u](v,0)),e&&p.push(e)}function v(){if(!h){for(h=!0;p.length;){var t=p;p=[];for(var e=0;e<t.length;e++){var n=t[e];try{n.zone.runTask(n,null,null)}catch(t){x.onUnhandledError(t)}}}x.microtaskDrainDone(),h=!1}}var g={name:"NO ZONE"},y="notScheduled",m="scheduling",_="scheduled",b="running",w="canceling",k="unknown",E="microTask",T="macroTask",C="eventTask",S={},x={symbol:Z,currentZoneFrame:function(){return O},onUnhandledError:P,microtaskDrainDone:P,scheduleMicroTask:d,showUncaughtError:function(){return!i[Z("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:P,patchMethod:function(){return P},bindArguments:function(){return null},setNativePromise:function(t){t&&"function"==typeof t.resolve&&(o=t.resolve(0))}},O={parent:null,zone:new i(null,null)},D=null,j=0;function P(){}function Z(t){return"__zone_symbol__"+t}r("Zone","Zone"),t.Zone=i}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),Zone.__load_patch("ZoneAwarePromise",function(t,e,n){var r=Object.getOwnPropertyDescriptor,o=Object.defineProperty,i=n.symbol,a=[],c=i("Promise"),s=i("then"),u="__creationTrace__";n.onUnhandledError=function(t){if(n.showUncaughtError()){var e=t&&t.rejection;e?console.error("Unhandled Promise rejection:",e instanceof Error?e.message:e,"; Zone:",t.zone.name,"; Task:",t.task&&t.task.source,"; Value:",e,e instanceof Error?e.stack:void 0):console.error(t)}},n.microtaskDrainDone=function(){for(;a.length;)for(var t=function(){var t=a.shift();try{t.zone.runGuarded(function(){throw t})}catch(t){f(t)}};a.length;)t()};var l=i("unhandledPromiseRejectionHandler");function f(t){n.onUnhandledError(t);try{var r=e[l];r&&"function"==typeof r&&r.call(this,t)}catch(t){}}function p(t){return t&&t.then}function h(t){return t}function d(t){return M.reject(t)}var v=i("state"),g=i("value"),y=i("finally"),m=i("parentPromiseValue"),_=i("parentPromiseState"),b="Promise.then",w=null,k=!0,E=!1,T=0;function C(t,e){return function(n){try{D(t,e,n)}catch(e){D(t,!1,e)}}}var S=function(){var t=!1;return function(e){return function(){t||(t=!0,e.apply(null,arguments))}}},x="Promise resolved with itself",O=i("currentTaskTrace");function D(t,r,i){var c,s=S();if(t===i)throw new TypeError(x);if(t[v]===w){var l=null;try{"object"!=typeof i&&"function"!=typeof i||(l=i&&i.then)}catch(e){return s(function(){D(t,!1,e)})(),t}if(r!==E&&i instanceof M&&i.hasOwnProperty(v)&&i.hasOwnProperty(g)&&i[v]!==w)P(i),D(t,i[v],i[g]);else if(r!==E&&"function"==typeof l)try{l.call(i,s(C(t,r)),s(C(t,!1)))}catch(e){s(function(){D(t,!1,e)})()}else{t[v]=r;var f=t[g];if(t[g]=i,t[y]===y&&r===k&&(t[v]=t[_],t[g]=t[m]),r===E&&i instanceof Error){var p=e.currentTask&&e.currentTask.data&&e.currentTask.data[u];p&&o(i,O,{configurable:!0,enumerable:!1,writable:!0,value:p})}for(var h=0;h<f.length;)Z(t,f[h++],f[h++],f[h++],f[h++]);if(0==f.length&&r==E){t[v]=T;try{throw new Error("Uncaught (in promise): "+((c=i)&&c.toString===Object.prototype.toString?(c.constructor&&c.constructor.name||"")+": "+JSON.stringify(c):c?c.toString():Object.prototype.toString.call(c))+(i&&i.stack?"\n"+i.stack:""))}catch(r){var d=r;d.rejection=i,d.promise=t,d.zone=e.current,d.task=e.currentTask,a.push(d),n.scheduleMicroTask()}}}}return t}var j=i("rejectionHandledHandler");function P(t){if(t[v]===T){try{var n=e[j];n&&"function"==typeof n&&n.call(this,{rejection:t[g],promise:t})}catch(t){}t[v]=E;for(var r=0;r<a.length;r++)t===a[r].promise&&a.splice(r,1)}}function Z(t,e,n,r,o){P(t);var i=t[v],a=i?"function"==typeof r?r:h:"function"==typeof o?o:d;e.scheduleMicroTask(b,function(){try{var r=t[g],o=n&&y===n[y];o&&(n[m]=r,n[_]=i);var c=e.run(a,void 0,o&&a!==d&&a!==h?[]:[r]);D(n,!0,c)}catch(t){D(n,!1,t)}},n)}var M=function(){function t(e){if(!(this instanceof t))throw new Error("Must be an instanceof Promise.");this[v]=w,this[g]=[];try{e&&e(C(this,k),C(this,E))}catch(t){D(this,!1,t)}}return t.toString=function(){return"function ZoneAwarePromise() { [native code] }"},t.resolve=function(t){return D(new this(null),k,t)},t.reject=function(t){return D(new this(null),E,t)},t.race=function(t){var e,n,r=new this(function(t,r){e=t,n=r});function o(t){r&&(r=e(t))}function i(t){r&&(r=n(t))}for(var a=0,c=t;a<c.length;a++){var s=c[a];p(s)||(s=this.resolve(s)),s.then(o,i)}return r},t.all=function(t){for(var e,n,r=new this(function(t,r){e=t,n=r}),o=0,i=[],a=0,c=t;a<c.length;a++){var s=c[a];p(s)||(s=this.resolve(s)),s.then(function(t){return function(n){i[t]=n,--o||e(i)}}(o),n),o++}return o||e(i),r},t.prototype.then=function(t,n){var r=new this.constructor(null),o=e.current;return this[v]==w?this[g].push(o,r,t,n):Z(this,o,r,t,n),r},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var n=new this.constructor(null);n[y]=y;var r=e.current;return this[v]==w?this[g].push(r,n,t,t):Z(this,r,n,t,t),n},t}();M.resolve=M.resolve,M.reject=M.reject,M.race=M.race,M.all=M.all;var z=t[c]=t.Promise,N=e.__symbol__("ZoneAwarePromise"),L=r(t,"Promise");L&&!L.configurable||(L&&delete L.writable,L&&delete L.value,L||(L={configurable:!0,enumerable:!0}),L.get=function(){return t[N]?t[N]:t[c]},L.set=function(e){e===M?t[N]=e:(t[c]=e,e.prototype[s]||F(e),n.setNativePromise(e))},o(t,"Promise",L)),t.Promise=M;var A,R=i("thenPatched");function F(t){var e=t.prototype,n=r(e,"then");if(!n||!1!==n.writable&&n.configurable){var o=e.then;e[s]=o,t.prototype.then=function(t,e){var n=this;return new M(function(t,e){o.call(n,t,e)}).then(t,e)},t[R]=!0}}if(z){F(z);var I=t.fetch;"function"==typeof I&&(t.fetch=(A=I,function(){var t=A.apply(this,arguments);if(t instanceof M)return t;var e=t.constructor;return e[R]||F(e),t}))}return Promise[e.__symbol__("uncaughtPromiseErrors")]=a,M});var t=Object.getOwnPropertyDescriptor,e=Object.defineProperty,n=Object.getPrototypeOf,r=Object.create,o=Array.prototype.slice,i="addEventListener",a="removeEventListener",c=Zone.__symbol__(i),s=Zone.__symbol__(a),u="true",l="false",f="__zone_symbol__";function p(t,e){return Zone.current.wrap(t,e)}function h(t,e,n,r,o){return Zone.current.scheduleMacroTask(t,e,n,r,o)}var d=Zone.__symbol__,v="undefined"!=typeof window,g=v?window:void 0,y=v&&g||"object"==typeof self&&self||global,m="removeAttribute",_=[null];function b(t,e){for(var n=t.length-1;n>=0;n--)"function"==typeof t[n]&&(t[n]=p(t[n],e+"_"+n));return t}function w(t){return!t||!1!==t.writable&&!("function"==typeof t.get&&void 0===t.set)}var k="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,E=!("nw"in y)&&void 0!==y.process&&"[object process]"==={}.toString.call(y.process),T=!E&&!k&&!(!v||!g.HTMLElement),C=void 0!==y.process&&"[object process]"==={}.toString.call(y.process)&&!k&&!(!v||!g.HTMLElement),S={},x=function(t){if(t=t||y.event){var e=S[t.type];e||(e=S[t.type]=d("ON_PROPERTY"+t.type));var n=(this||t.target||y)[e],r=n&&n.apply(this,arguments);return void 0==r||r||t.preventDefault(),r}};function O(n,r,o){var i=t(n,r);if(!i&&o&&t(o,r)&&(i={enumerable:!0,configurable:!0}),i&&i.configurable){delete i.writable,delete i.value;var a=i.get,c=i.set,s=r.substr(2),u=S[s];u||(u=S[s]=d("ON_PROPERTY"+s)),i.set=function(t){var e=this;e||n!==y||(e=y),e&&(e[u]&&e.removeEventListener(s,x),c&&c.apply(e,_),"function"==typeof t?(e[u]=t,e.addEventListener(s,x,!1)):e[u]=null)},i.get=function(){var t=this;if(t||n!==y||(t=y),!t)return null;var e=t[u];if(e)return e;if(a){var o=a&&a.call(this);if(o)return i.set.call(this,o),"function"==typeof t[m]&&t.removeAttribute(r),o}return null},e(n,r,i)}}function D(t,e,n){if(e)for(var r=0;r<e.length;r++)O(t,"on"+e[r],n);else{var o=[];for(var i in t)"on"==i.substr(0,2)&&o.push(i);for(var a=0;a<o.length;a++)O(t,o[a],n)}}var j=d("originalInstance");function P(t){var n=y[t];if(n){y[d(t)]=n,y[t]=function(){var e=b(arguments,t);switch(e.length){case 0:this[j]=new n;break;case 1:this[j]=new n(e[0]);break;case 2:this[j]=new n(e[0],e[1]);break;case 3:this[j]=new n(e[0],e[1],e[2]);break;case 4:this[j]=new n(e[0],e[1],e[2],e[3]);break;default:throw new Error("Arg list too long.")}},M(y[t],n);var r,o=new n(function(){});for(r in o)"XMLHttpRequest"===t&&"responseBlob"===r||function(n){"function"==typeof o[n]?y[t].prototype[n]=function(){return this[j][n].apply(this[j],arguments)}:e(y[t].prototype,n,{set:function(e){"function"==typeof e?(this[j][n]=p(e,t+"."+n),M(this[j][n],e)):this[j][n]=e},get:function(){return this[j][n]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(y[t][r]=n[r])}}function Z(e,r,o){for(var i=e;i&&!i.hasOwnProperty(r);)i=n(i);!i&&e[r]&&(i=e);var a,c=d(r);if(i&&!(a=i[c])&&(a=i[c]=i[r],w(i&&t(i,r)))){var s=o(a,c,r);i[r]=function(){return s(this,arguments)},M(i[r],a)}return a}function M(t,e){t[d("OriginalDelegate")]=e}var z=!1,N=!1;function L(){if(z)return N;z=!0;try{var t=g.navigator.userAgent;return-1===t.indexOf("MSIE ")&&-1===t.indexOf("Trident/")&&-1===t.indexOf("Edge/")||(N=!0),N}catch(t){}}Zone.__load_patch("toString",function(t){var e=Function.prototype.toString,n=d("OriginalDelegate"),r=d("Promise"),o=d("Error"),i=function(){if("function"==typeof this){var i=this[n];if(i)return"function"==typeof i?e.apply(this[n],arguments):Object.prototype.toString.call(i);if(this===Promise){var a=t[r];if(a)return e.apply(a,arguments)}if(this===Error){var c=t[o];if(c)return e.apply(c,arguments)}}return e.apply(this,arguments)};i[n]=e,Function.prototype.toString=i;var a=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":a.apply(this,arguments)}});var A={useG:!0},R={},F={},I=/^__zone_symbol__(\w+)(true|false)$/,H="__zone_symbol__propagationStopped";function q(t,e,r){var o=r&&r.add||i,c=r&&r.rm||a,s=r&&r.listeners||"eventListeners",p=r&&r.rmAll||"removeAllListeners",h=d(o),v="."+o+":",g="prependListener",y="."+g+":",m=function(t,e,n){if(!t.isRemoved){var r=t.callback;"object"==typeof r&&r.handleEvent&&(t.callback=function(t){return r.handleEvent(t)},t.originalDelegate=r),t.invoke(t,e,[n]);var o=t.options;o&&"object"==typeof o&&o.once&&e[c].call(e,n.type,t.originalDelegate?t.originalDelegate:t.callback,o)}},_=function(e){if(e=e||t.event){var n=this||e.target||t,r=n[R[e.type][l]];if(r)if(1===r.length)m(r[0],n,e);else for(var o=r.slice(),i=0;i<o.length&&(!e||!0!==e[H]);i++)m(o[i],n,e)}},b=function(e){if(e=e||t.event){var n=this||e.target||t,r=n[R[e.type][u]];if(r)if(1===r.length)m(r[0],n,e);else for(var o=r.slice(),i=0;i<o.length&&(!e||!0!==e[H]);i++)m(o[i],n,e)}};function w(e,r){if(!e)return!1;var i=!0;r&&void 0!==r.useG&&(i=r.useG);var a=r&&r.vh,m=!0;r&&void 0!==r.chkDup&&(m=r.chkDup);var w=!1;r&&void 0!==r.rt&&(w=r.rt);for(var k=e;k&&!k.hasOwnProperty(o);)k=n(k);if(!k&&e[o]&&(k=e),!k)return!1;if(k[h])return!1;var E,T={},C=k[h]=k[o],S=k[d(c)]=k[c],x=k[d(s)]=k[s],O=k[d(p)]=k[p];r&&r.prepend&&(E=k[d(r.prepend)]=k[r.prepend]);var D=i?function(){if(!T.isExisting)return C.call(T.target,T.eventName,T.capture?b:_,T.options)}:function(t){return C.call(T.target,T.eventName,t.invoke,T.options)},j=i?function(t){if(!t.isRemoved){var e=R[t.eventName],n=void 0;e&&(n=e[t.capture?u:l]);var r=n&&t.target[n];if(r)for(var o=0;o<r.length;o++)if(r[o]===t){r.splice(o,1),t.isRemoved=!0,0===r.length&&(t.allRemoved=!0,t.target[n]=null);break}}if(t.allRemoved)return S.call(t.target,t.eventName,t.capture?b:_,t.options)}:function(t){return S.call(t.target,t.eventName,t.invoke,t.options)},P=r&&r.diff?r.diff:function(t,e){var n=typeof e;return"function"===n&&t.callback===e||"object"===n&&t.originalDelegate===e},Z=Zone[Zone.__symbol__("BLACK_LISTED_EVENTS")],z=function(e,n,r,o,c,s){return void 0===c&&(c=!1),void 0===s&&(s=!1),function(){var p=this||t,h=arguments[1];if(!h)return e.apply(this,arguments);var d=!1;if("function"!=typeof h){if(!h.handleEvent)return e.apply(this,arguments);d=!0}if(!a||a(e,h,p,arguments)){var v,g=arguments[0],y=arguments[2];if(Z)for(var _=0;_<Z.length;_++)if(g===Z[_])return e.apply(this,arguments);var b=!1;void 0===y?v=!1:!0===y?v=!0:!1===y?v=!1:(v=!!y&&!!y.capture,b=!!y&&!!y.once);var w,k=Zone.current,E=R[g];if(E)w=E[v?u:l];else{var C=f+(g+l),S=f+(g+u);R[g]={},R[g][l]=C,R[g][u]=S,w=v?S:C}var x,O=p[w],D=!1;if(O){if(D=!0,m)for(_=0;_<O.length;_++)if(P(O[_],h))return}else O=p[w]=[];var j=p.constructor.name,M=F[j];M&&(x=M[g]),x||(x=j+n+g),T.options=y,b&&(T.options.once=!1),T.target=p,T.capture=v,T.eventName=g,T.isExisting=D;var z=i?A:null;z&&(z.taskData=T);var N=k.scheduleEventTask(x,h,z,r,o);return T.target=null,z&&(z.taskData=null),b&&(y.once=!0),N.options=y,N.target=p,N.capture=v,N.eventName=g,d&&(N.originalDelegate=h),s?O.unshift(N):O.push(N),c?p:void 0}}};return k[o]=z(C,v,D,j,w),E&&(k[g]=z(E,y,function(t){return E.call(T.target,T.eventName,t.invoke,T.options)},j,w,!0)),k[c]=function(){var e,n=this||t,r=arguments[0],o=arguments[2];e=void 0!==o&&(!0===o||!1!==o&&!!o&&!!o.capture);var i=arguments[1];if(!i)return S.apply(this,arguments);if(!a||a(S,i,n,arguments)){var c,s=R[r];s&&(c=s[e?u:l]);var f=c&&n[c];if(f)for(var p=0;p<f.length;p++){var h=f[p];if(P(h,i))return f.splice(p,1),h.isRemoved=!0,0===f.length&&(h.allRemoved=!0,n[c]=null),h.zone.cancelTask(h),w?n:void 0}return S.apply(this,arguments)}},k[s]=function(){for(var e=[],n=W(this||t,arguments[0]),r=0;r<n.length;r++){var o=n[r];e.push(o.originalDelegate?o.originalDelegate:o.callback)}return e},k[p]=function(){var e=this||t,n=arguments[0];if(n){var r=R[n];if(r){var o=e[r[l]],i=e[r[u]];if(o){var a=o.slice();for(h=0;h<a.length;h++)this[c].call(this,n,(s=a[h]).originalDelegate?s.originalDelegate:s.callback,s.options)}if(i)for(a=i.slice(),h=0;h<a.length;h++){var s;this[c].call(this,n,(s=a[h]).originalDelegate?s.originalDelegate:s.callback,s.options)}}}else{for(var f=Object.keys(e),h=0;h<f.length;h++){var d=I.exec(f[h]),v=d&&d[1];v&&"removeListener"!==v&&this[p].call(this,v)}this[p].call(this,"removeListener")}if(w)return this},M(k[o],C),M(k[c],S),O&&M(k[p],O),x&&M(k[s],x),!0}for(var k=[],E=0;E<e.length;E++)k[E]=w(e[E],r);return k}function W(t,e){var n=[];for(var r in t){var o=I.exec(r),i=o&&o[1];if(i&&(!e||i===e)){var a=t[r];if(a)for(var c=0;c<a.length;c++)n.push(a[c])}}return n}var X=d("zoneTask");function U(t,e,n,r){var o=null,i=null;n+=r;var a={};function c(e){var n=e.data;return n.args[0]=function(){try{e.invoke.apply(this,arguments)}finally{e.data&&e.data.isPeriodic||("number"==typeof n.handleId?delete a[n.handleId]:n.handleId&&(n.handleId[X]=null))}},n.handleId=o.apply(t,n.args),e}function s(t){return i(t.data.handleId)}o=Z(t,e+=r,function(n){return function(o,i){if("function"==typeof i[0]){var u=h(e,i[0],{handleId:null,isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?i[1]||0:null,args:i},c,s);if(!u)return u;var l=u.data.handleId;return"number"==typeof l?a[l]=u:l&&(l[X]=u),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(u.ref=l.ref.bind(l),u.unref=l.unref.bind(l)),"number"==typeof l||l?l:u}return n.apply(t,i)}}),i=Z(t,n,function(e){return function(n,r){var o,i=r[0];"number"==typeof i?o=a[i]:(o=i&&i[X])||(o=i),o&&"string"==typeof o.type?"notScheduled"!==o.state&&(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&("number"==typeof i?delete a[i]:i&&(i[X]=null),o.zone.cancelTask(o)):e.apply(t,r)}})}var K=Object[d("defineProperty")]=Object.defineProperty,B=Object[d("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,Y=Object.create,V=d("unconfigurables");function J(t,e){return t&&t[V]&&t[V][e]}function G(t,e,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(t[V]||Object.isFrozen(t)||K(t,V,{writable:!0,value:{}}),t[V]&&(t[V][e]=!0)),n}function Q(t,e,n,r){try{return K(t,e,n)}catch(i){if(!n.configurable)throw i;void 0===r?delete n.configurable:n.configurable=r;try{return K(t,e,n)}catch(r){var o=null;try{o=JSON.stringify(n)}catch(t){o=n.toString()}console.log("Attempting to configure '"+e+"' with descriptor '"+o+"' on object '"+t+"' and got error, giving up: "+r)}}}var $=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplyconnected","vrdisplaydisconnected","vrdisplaypresentchange"],tt=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],et=["load"],nt=["blur","error","focus","load","resize","scroll","messageerror"],rt=["bounce","finish","start"],ot=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],it=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],at=["close","error","open","message"],ct=["error","message"],st=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange"],$,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function ut(t,e,n,r){t&&D(t,function(t,e,n){if(!n)return e;var r=n.filter(function(e){return e.target===t});if(!r||0===r.length)return e;var o=r[0].ignoreProperties;return e.filter(function(t){return-1===o.indexOf(t)})}(t,e,n),r)}function lt(c,s){if(!E||C){var u="undefined"!=typeof WebSocket;if(function(){if((T||C)&&!t(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var n=t(Element.prototype,"onclick");if(n&&!n.configurable)return!1}var r=XMLHttpRequest.prototype,o=t(r,"onreadystatechange");if(o){e(r,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}});var i=!!(c=new XMLHttpRequest).onreadystatechange;return e(r,"onreadystatechange",o||{}),i}var a=d("fake");e(r,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[a]},set:function(t){this[a]=t}});var c,s=function(){};return(c=new XMLHttpRequest).onreadystatechange=s,i=c[a]===s,c.onreadystatechange=null,i}()){var l=s.__Zone_ignore_on_properties;if(T){var f=window;ut(f,st.concat(["messageerror"]),l,n(f)),ut(Document.prototype,st,l),void 0!==f.SVGElement&&ut(f.SVGElement.prototype,st,l),ut(Element.prototype,st,l),ut(HTMLElement.prototype,st,l),ut(HTMLMediaElement.prototype,tt,l),ut(HTMLFrameSetElement.prototype,$.concat(nt),l),ut(HTMLBodyElement.prototype,$.concat(nt),l),ut(HTMLFrameElement.prototype,et,l),ut(HTMLIFrameElement.prototype,et,l);var h=f.HTMLMarqueeElement;h&&ut(h.prototype,rt,l);var v=f.Worker;v&&ut(v.prototype,ct,l)}ut(XMLHttpRequest.prototype,ot,l);var g=s.XMLHttpRequestEventTarget;g&&ut(g&&g.prototype,ot,l),"undefined"!=typeof IDBIndex&&(ut(IDBIndex.prototype,it,l),ut(IDBRequest.prototype,it,l),ut(IDBOpenDBRequest.prototype,it,l),ut(IDBDatabase.prototype,it,l),ut(IDBTransaction.prototype,it,l),ut(IDBCursor.prototype,it,l)),u&&ut(WebSocket.prototype,at,l)}else!function(){for(var t=function(t){var e=st[t],n="on"+e;self.addEventListener(e,function(t){var e,r,o=t.target;for(r=o?o.constructor.name+"."+n:"unknown."+n;o;)o[n]&&!o[n][ft]&&((e=p(o[n],r))[ft]=o[n],o[n]=e),o=o.parentElement},!0)},e=0;e<st.length;e++)t(e)}(),P("XMLHttpRequest"),u&&function(e,n){var c=n.WebSocket;n.EventTarget||q(n,[c.prototype]),n.WebSocket=function(e,n){var s,u,l=arguments.length>1?new c(e,n):new c(e),f=t(l,"onmessage");return f&&!1===f.configurable?(s=r(l),u=l,[i,a,"send","close"].forEach(function(t){s[t]=function(){var e=o.call(arguments);if(t===i||t===a){var n=e.length>0?e[0]:void 0;if(n){var r=Zone.__symbol__("ON_PROPERTY"+n);l[r]=s[r]}}return l[t].apply(l,e)}})):s=l,D(s,["close","error","message","open"],u),s};var s=n.WebSocket;for(var u in c)s[u]=c[u]}(0,s)}}var ft=d("unbound");Zone.__load_patch("util",function(t,e,n){n.patchOnProperties=D,n.patchMethod=Z,n.bindArguments=b}),Zone.__load_patch("timers",function(t){U(t,"set","clear","Timeout"),U(t,"set","clear","Interval"),U(t,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",function(t){U(t,"request","cancel","AnimationFrame"),U(t,"mozRequest","mozCancel","AnimationFrame"),U(t,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(t,e){for(var n=["alert","prompt","confirm"],r=0;r<n.length;r++)Z(t,n[r],function(n,r,o){return function(r,i){return e.current.run(n,t,i,o)}})}),Zone.__load_patch("EventTarget",function(t,e,n){var r=e.__symbol__("BLACK_LISTED_EVENTS");t[r]&&(e[r]=t[r]),function(t,e){!function(t,e){var n=t.Event;n&&n.prototype&&e.patchMethod(n.prototype,"stopImmediatePropagation",function(t){return function(e,n){e[H]=!0,t&&t.apply(e,n)}})}(t,e)}(t,n),function(t,e){var n="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video",r="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket".split(","),o=[],i=t.wtf,a=n.split(",");i?o=a.map(function(t){return"HTML"+t+"Element"}).concat(r):t.EventTarget?o.push("EventTarget"):o=r;for(var c=t.__Zone_disable_IE_check||!1,s=t.__Zone_enable_cross_context_check||!1,p=L(),h="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",d=0;d<st.length;d++){var v=f+((b=st[d])+l),g=f+(b+u);R[b]={},R[b][l]=v,R[b][u]=g}for(d=0;d<n.length;d++)for(var y=a[d],m=F[y]={},_=0;_<st.length;_++){var b;m[b=st[_]]=y+".addEventListener:"+b}var w=[];for(d=0;d<o.length;d++){var k=t[o[d]];w.push(k&&k.prototype)}q(t,w,{vh:function(t,e,n,r){if(!c&&p){if(s)try{var o;if("[object FunctionWrapper]"===(o=e.toString())||o==h)return t.apply(n,r),!1}catch(e){return t.apply(n,r),!1}else if("[object FunctionWrapper]"===(o=e.toString())||o==h)return t.apply(n,r),!1}else if(s)try{e.toString()}catch(e){return t.apply(n,r),!1}return!0}}),e.patchEventTarget=q}(t,n);var o=t.XMLHttpRequestEventTarget;o&&o.prototype&&n.patchEventTarget(t,[o.prototype]),P("MutationObserver"),P("WebKitMutationObserver"),P("IntersectionObserver"),P("FileReader")}),Zone.__load_patch("on_property",function(e,n,r){lt(0,e),Object.defineProperty=function(t,e,n){if(J(t,e))throw new TypeError("Cannot assign to read only property '"+e+"' of "+t);var r=n.configurable;return"prototype"!==e&&(n=G(t,e,n)),Q(t,e,n,r)},Object.defineProperties=function(t,e){return Object.keys(e).forEach(function(n){Object.defineProperty(t,n,e[n])}),t},Object.create=function(t,e){return"object"!=typeof e||Object.isFrozen(e)||Object.keys(e).forEach(function(n){e[n]=G(t,n,e[n])}),Y(t,e)},Object.getOwnPropertyDescriptor=function(t,e){var n=B(t,e);return J(t,e)&&(n.configurable=!1),n},function(n){if((T||C)&&"registerElement"in e.document){var r=document.registerElement,o=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(e,n){return n&&n.prototype&&o.forEach(function(e){var r,o,i,a,c="Document.registerElement::"+e,s=n.prototype;if(s.hasOwnProperty(e)){var u=t(s,e);u&&u.value?(u.value=p(u.value,c),a=(i=u).configurable,Q(r=n.prototype,o=e,i=G(r,o,i),a)):s[e]=p(s[e],c)}else s[e]&&(s[e]=p(s[e],c))}),r.call(document,e,n)},M(document.registerElement,r)}}()}),Zone.__load_patch("canvas",function(t){var e=t.HTMLCanvasElement;void 0!==e&&e.prototype&&e.prototype.toBlob&&function(t,n,r){var o=null;function i(t){var e=t.data;return e.args[e.cbIdx]=function(){t.invoke.apply(this,arguments)},o.apply(e.target,e.args),t}o=Z(e.prototype,"toBlob",function(t){return function(e,n){var r=function(t,e){return{name:"HTMLCanvasElement.toBlob",target:t,cbIdx:0,args:e}}(e,n);return r.cbIdx>=0&&"function"==typeof n[r.cbIdx]?h(r.name,n[r.cbIdx],r,i,null):t.apply(e,n)}})}()}),Zone.__load_patch("XHR",function(t,e){!function(e){var u=XMLHttpRequest.prototype,l=u[c],f=u[s];if(!l){var p=t.XMLHttpRequestEventTarget;if(p){var d=p.prototype;l=d[c],f=d[s]}}var v="readystatechange",g="scheduled";function y(t){XMLHttpRequest[i]=!1;var e=t.data,r=e.target,a=r[o];l||(l=r[c],f=r[s]),a&&f.call(r,v,a);var u=r[o]=function(){r.readyState===r.DONE&&!e.aborted&&XMLHttpRequest[i]&&t.state===g&&t.invoke()};return l.call(r,v,u),r[n]||(r[n]=t),w.apply(r,e.args),XMLHttpRequest[i]=!0,t}function m(){}function _(t){var e=t.data;return e.aborted=!0,k.apply(e.target,e.args)}var b=Z(u,"open",function(){return function(t,e){return t[r]=0==e[2],t[a]=e[1],b.apply(t,e)}}),w=Z(u,"send",function(){return function(t,e){return t[r]?w.apply(t,e):h("XMLHttpRequest.send",m,{target:t,url:t[a],isPeriodic:!1,delay:null,args:e,aborted:!1},y,_)}}),k=Z(u,"abort",function(){return function(t){var e=t[n];if(e&&"string"==typeof e.type){if(null==e.cancelFn||e.data&&e.data.aborted)return;e.zone.cancelTask(e)}}})}();var n=d("xhrTask"),r=d("xhrSync"),o=d("xhrListener"),i=d("xhrScheduled"),a=d("xhrURL")}),Zone.__load_patch("geolocation",function(e){e.navigator&&e.navigator.geolocation&&function(e,n){for(var r=e.constructor.name,o=function(o){var i=n[o],a=e[i];if(a){if(!w(t(e,i)))return"continue";e[i]=function(t){var e=function(){return t.apply(this,b(arguments,r+"."+i))};return M(e,t),e}(a)}},i=0;i<n.length;i++)o(i)}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",function(t,e){function n(e){return function(n){W(t,e).forEach(function(r){var o=t.PromiseRejectionEvent;if(o){var i=new o(e,{promise:n.promise,reason:n.rejection});r.invoke(i)}})}}t.PromiseRejectionEvent&&(e[d("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),e[d("rejectionHandledHandler")]=n("rejectionhandled"))})}()},"1TsA":function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},2:function(t,e,n){t.exports=n("hN/g")},"2OiF":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},"3Lyj":function(t,e,n){var r=n("KroJ");t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},"45Tv":function(t,e,n){var r=n("N6cJ"),o=n("y3w9"),i=n("OP3Y"),a=r.has,c=r.get,s=r.key,u=function(t,e,n){if(a(t,e,n))return c(t,e,n);var r=i(e);return null!==r?u(t,r,n):void 0};r.exp({getMetadata:function(t,e){return u(t,o(e),arguments.length<3?void 0:s(arguments[2]))}})},"49D4":function(t,e,n){var r=n("N6cJ"),o=n("y3w9"),i=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,o(n),i(r))}})},"4LiD":function(t,e,n){"use strict";var r=n("dyZX"),o=n("XKFU"),i=n("KroJ"),a=n("3Lyj"),c=n("Z6vF"),s=n("SlkY"),u=n("9gX7"),l=n("0/R4"),f=n("eeVq"),p=n("XMVh"),h=n("fyDq"),d=n("Xbzi");t.exports=function(t,e,n,v,g,y){var m=r[t],_=m,b=g?"set":"add",w=_&&_.prototype,k={},E=function(t){var e=w[t];i(w,t,"delete"==t?function(t){return!(y&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof _&&(y||w.forEach&&!f(function(){(new _).entries().next()}))){var T=new _,C=T[b](y?{}:-0,1)!=T,S=f(function(){T.has(1)}),x=p(function(t){new _(t)}),O=!y&&f(function(){for(var t=new _,e=5;e--;)t[b](e,e);return!t.has(-0)});x||((_=e(function(e,n){u(e,_,t);var r=d(new m,e,_);return void 0!=n&&s(n,g,r[b],r),r})).prototype=w,w.constructor=_),(S||O)&&(E("delete"),E("has"),g&&E("get")),(O||C)&&E(b),y&&w.clear&&delete w.clear}else _=v.getConstructor(e,t,g,b),a(_.prototype,n),c.NEED=!0;return h(_,t),k[t]=_,o(o.G+o.W+o.F*(_!=m),k),y||v.setStrong(_,t,g),_}},"4R4u":function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"6FMO":function(t,e,n){var r=n("0/R4"),o=n("EWmC"),i=n("K0xU")("species");t.exports=function(t){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&null===(e=e[i])&&(e=void 0)),void 0===e?Array:e}},"7Dlh":function(t,e,n){var r=n("N6cJ"),o=n("y3w9"),i=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},"9AAn":function(t,e,n){"use strict";var r=n("wmvG"),o=n("s5qY");t.exports=n("4LiD")("Map",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(o(this,"Map"),0===t?0:t,e)}},r,!0)},"9gX7":function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},Afnz:function(t,e,n){"use strict";var r=n("LQAc"),o=n("XKFU"),i=n("KroJ"),a=n("Mukb"),c=n("hPIQ"),s=n("QaDb"),u=n("fyDq"),l=n("OP3Y"),f=n("K0xU")("iterator"),p=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,d,v,g,y){s(n,e,d);var m,_,b,w=function(t){if(!p&&t in C)return C[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},k=e+" Iterator",E="values"==v,T=!1,C=t.prototype,S=C[f]||C["@@iterator"]||v&&C[v],x=S||w(v),O=v?E?w("entries"):x:void 0,D="Array"==e&&C.entries||S;if(D&&(b=l(D.call(new t)))!==Object.prototype&&b.next&&(u(b,k,!0),r||"function"==typeof b[f]||a(b,f,h)),E&&S&&"values"!==S.name&&(T=!0,x=function(){return S.call(this)}),r&&!y||!p&&!T&&C[f]||a(C,f,x),c[e]=x,c[k]=h,v)if(m={values:E?x:w("values"),keys:g?x:w("keys"),entries:O},y)for(_ in m)_ in C||i(C,_,m[_]);else o(o.P+o.F*(p||T),e,m);return m}},BqfV:function(t,e,n){var r=n("N6cJ"),o=n("y3w9"),i=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return i(t,o(e),arguments.length<3?void 0:a(arguments[2]))}})},CkkT:function(t,e,n){var r=n("m0Pp"),o=n("Ymqv"),i=n("S/j/"),a=n("ne8i"),c=n("zRwo");t.exports=function(t,e){var n=1==t,s=2==t,u=3==t,l=4==t,f=6==t,p=5==t||f,h=e||c;return function(e,c,d){for(var v,g,y=i(e),m=o(y),_=r(c,d,3),b=a(m.length),w=0,k=n?h(e,b):s?h(e,0):void 0;b>w;w++)if((p||w in m)&&(g=_(v=m[w],w,y),t))if(n)k[w]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:k.push(v)}else if(l)return!1;return f?-1:u||l?l:k}}},DVgA:function(t,e,n){var r=n("zhAb"),o=n("4R4u");t.exports=Object.keys||function(t){return r(t,o)}},EK0E:function(t,e,n){"use strict";var r,o=n("CkkT")(0),i=n("KroJ"),a=n("Z6vF"),c=n("czNK"),s=n("ZD67"),u=n("0/R4"),l=n("eeVq"),f=n("s5qY"),p=a.getWeak,h=Object.isExtensible,d=s.ufstore,v={},g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(u(t)){var e=p(t);return!0===e?d(f(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return s.def(f(this,"WeakMap"),t,e)}},m=t.exports=n("4LiD")("WeakMap",g,y,s,!0,!0);l(function(){return 7!=(new m).set((Object.freeze||Object)(v),7).get(v)})&&(c((r=s.getConstructor(g,"WeakMap")).prototype,y),a.NEED=!0,o(["delete","has","get","set"],function(t){var e=m.prototype,n=e[t];i(e,t,function(e,o){if(u(e)&&!h(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},EWmC:function(t,e,n){var r=n("LZWt");t.exports=Array.isArray||function(t){return"Array"==r(t)}},EemH:function(t,e,n){var r=n("UqcF"),o=n("RjD/"),i=n("aCFj"),a=n("apmT"),c=n("aagx"),s=n("xpql"),u=Object.getOwnPropertyDescriptor;e.f=n("nh4g")?u:function(t,e){if(t=i(t),e=a(e,!0),s)try{return u(t,e)}catch(t){}if(c(t,e))return o(!r.f.call(t,e),t[e])}},FJW5:function(t,e,n){var r=n("hswa"),o=n("y3w9"),i=n("DVgA");t.exports=n("nh4g")?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),c=a.length,s=0;c>s;)r.f(t,n=a[s++],e[n]);return t}},FZcq:function(t,e,n){n("49D4"),n("zq+C"),n("45Tv"),n("uAtd"),n("BqfV"),n("fN/3"),n("iW+S"),n("7Dlh"),n("Opxb"),t.exports=n("g3g5").Reflect},H6hf:function(t,e,n){var r=n("y3w9");t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},"I8a+":function(t,e,n){var r=n("LZWt"),o=n("K0xU")("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},Iw71:function(t,e,n){var r=n("0/R4"),o=n("dyZX").document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},"J+6e":function(t,e,n){var r=n("I8a+"),o=n("K0xU")("iterator"),i=n("hPIQ");t.exports=n("g3g5").getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},JiEa:function(t,e){e.f=Object.getOwnPropertySymbols},K0xU:function(t,e,n){var r=n("VTer")("wks"),o=n("ylqs"),i=n("dyZX").Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},KroJ:function(t,e,n){var r=n("dyZX"),o=n("Mukb"),i=n("aagx"),a=n("ylqs")("src"),c=Function.toString,s=(""+c).split("toString");n("g3g5").inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,c){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(u&&(i(n,a)||o(n,a,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:c?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||c.call(this)})},Kuth:function(t,e,n){var r=n("y3w9"),o=n("FJW5"),i=n("4R4u"),a=n("YTvA")("IE_PROTO"),c=function(){},s=function(){var t,e=n("Iw71")("iframe"),r=i.length;for(e.style.display="none",n("+rLv").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s.prototype[i[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(c.prototype=r(t),n=new c,c.prototype=null,n[a]=t):n=s(),void 0===e?n:o(n,e)}},LQAc:function(t,e){t.exports=!1},LZWt:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},M6Qj:function(t,e,n){var r=n("hPIQ"),o=n("K0xU")("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},Mukb:function(t,e,n){var r=n("hswa"),o=n("RjD/");t.exports=n("nh4g")?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},N6cJ:function(t,e,n){var r=n("9AAn"),o=n("XKFU"),i=n("VTer")("metadata"),a=i.store||(i.store=new(n("EK0E"))),c=function(t,e,n){var o=a.get(t);if(!o){if(!n)return;a.set(t,o=new r)}var i=o.get(e);if(!i){if(!n)return;o.set(e,i=new r)}return i};t.exports={store:a,map:c,has:function(t,e,n){var r=c(e,n,!1);return void 0!==r&&r.has(t)},get:function(t,e,n){var r=c(e,n,!1);return void 0===r?void 0:r.get(t)},set:function(t,e,n,r){c(n,r,!0).set(t,e)},keys:function(t,e){var n=c(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},key:function(t){return void 0===t||"symbol"==typeof t?t:String(t)},exp:function(t){o(o.S,"Reflect",t)}}},OP3Y:function(t,e,n){var r=n("aagx"),o=n("S/j/"),i=n("YTvA")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},Opxb:function(t,e,n){var r=n("N6cJ"),o=n("y3w9"),i=n("2OiF"),a=r.key,c=r.set;r.exp({metadata:function(t,e){return function(n,r){c(t,e,(void 0!==r?o:i)(n),a(r))}}})},Q3ne:function(t,e,n){var r=n("SlkY");t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},QaDb:function(t,e,n){"use strict";var r=n("Kuth"),o=n("RjD/"),i=n("fyDq"),a={};n("Mukb")(a,n("K0xU")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},RYi7:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},"RjD/":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"S/j/":function(t,e,n){var r=n("vhPU");t.exports=function(t){return Object(r(t))}},SlkY:function(t,e,n){var r=n("m0Pp"),o=n("H6hf"),i=n("M6Qj"),a=n("y3w9"),c=n("ne8i"),s=n("J+6e"),u={},l={};(e=t.exports=function(t,e,n,f,p){var h,d,v,g,y=p?function(){return t}:s(t),m=r(n,f,e?2:1),_=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(i(y)){for(h=c(t.length);h>_;_++)if((g=e?m(a(d=t[_])[0],d[1]):m(t[_]))===u||g===l)return g}else for(v=y.call(t);!(d=v.next()).done;)if((g=o(v,m,d.value,e))===u||g===l)return g}).BREAK=u,e.RETURN=l},T39b:function(t,e,n){"use strict";var r=n("wmvG"),o=n("s5qY");t.exports=n("4LiD")("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},UqcF:function(t,e){e.f={}.propertyIsEnumerable},VTer:function(t,e,n){var r=n("g3g5"),o=n("dyZX"),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("LQAc")?"pure":"global",copyright:"\xa9 2018 Denis Pushkarev (zloirock.ru)"})},XKFU:function(t,e,n){var r=n("dyZX"),o=n("g3g5"),i=n("Mukb"),a=n("KroJ"),c=n("m0Pp"),s=function(t,e,n){var u,l,f,p,h=t&s.F,d=t&s.G,v=t&s.P,g=t&s.B,y=d?r:t&s.S?r[e]||(r[e]={}):(r[e]||{}).prototype,m=d?o:o[e]||(o[e]={}),_=m.prototype||(m.prototype={});for(u in d&&(n=e),n)f=((l=!h&&y&&void 0!==y[u])?y:n)[u],p=g&&l?c(f,r):v&&"function"==typeof f?c(Function.call,f):f,y&&a(y,u,f,t&s.U),m[u]!=f&&i(m,u,p),v&&_[u]!=f&&(_[u]=f)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},XMVh:function(t,e,n){var r=n("K0xU")("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},Xbzi:function(t,e,n){var r=n("0/R4"),o=n("i5dc").set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},YTvA:function(t,e,n){var r=n("VTer")("keys"),o=n("ylqs");t.exports=function(t){return r[t]||(r[t]=o(t))}},Ymqv:function(t,e,n){var r=n("LZWt");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},Z6vF:function(t,e,n){var r=n("ylqs")("meta"),o=n("0/R4"),i=n("aagx"),a=n("hswa").f,c=0,s=Object.isExtensible||function(){return!0},u=!n("eeVq")(function(){return s(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++c,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!s(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!s(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return u&&f.NEED&&s(t)&&!i(t,r)&&l(t),t}}},ZD67:function(t,e,n){"use strict";var r=n("3Lyj"),o=n("Z6vF").getWeak,i=n("y3w9"),a=n("0/R4"),c=n("9gX7"),s=n("SlkY"),u=n("CkkT"),l=n("aagx"),f=n("s5qY"),p=u(5),h=u(6),d=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,e){return p(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var u=t(function(t,r){c(t,u,e,"_i"),t._t=e,t._i=d++,t._l=void 0,void 0!=r&&s(r,n,t[i],t)});return r(u.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return!0===n?v(f(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return!0===n?v(f(this,e)).has(t):n&&l(n,this._i)}}),u},def:function(t,e,n){var r=o(i(e),!0);return!0===r?v(t).set(e,n):r[t._i]=n,t},ufstore:v}},aCFj:function(t,e,n){var r=n("Ymqv"),o=n("vhPU");t.exports=function(t){return r(o(t))}},aVe3:function(t,e){(function(){"use strict";var t=new function(){},e=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function n(t){var n=e.has(t);return t=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(t),!n&&t}function r(t){var e=t.isConnected;if(void 0!==e)return e;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function o(t,e){for(;e&&e!==t&&!e.nextSibling;)e=e.parentNode;return e&&e!==t?e.nextSibling:null}function i(t,e,n){n=n||new Set;for(var r=t;r;){if(r.nodeType===Node.ELEMENT_NODE){var a=r;e(a);var c=a.localName;if("link"===c&&"import"===a.getAttribute("rel")){if((r=a.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)i(r,e,n);r=o(t,a);continue}if("template"===c){r=o(t,a);continue}if(a=a.__CE_shadowRoot)for(a=a.firstChild;a;a=a.nextSibling)i(a,e,n)}r=r.firstChild?r.firstChild:o(t,r)}}function a(t,e,n){t[e]=n}function c(){this.a=new Map,this.s=new Map,this.f=[],this.b=!1}function s(t,e){t.b=!0,t.f.push(e)}function u(t,e){t.b&&i(e,function(e){return l(t,e)})}function l(t,e){if(t.b&&!e.__CE_patched){e.__CE_patched=!0;for(var n=0;n<t.f.length;n++)t.f[n](e)}}function f(t,e){var n=[];for(i(e,function(t){return n.push(t)}),e=0;e<n.length;e++){var r=n[e];1===r.__CE_state?t.connectedCallback(r):d(t,r)}}function p(t,e){var n=[];for(i(e,function(t){return n.push(t)}),e=0;e<n.length;e++){var r=n[e];1===r.__CE_state&&t.disconnectedCallback(r)}}function h(t,e,n){var r=(n=n||{}).w||new Set,o=n.i||function(e){return d(t,e)},a=[];if(i(e,function(e){if("link"===e.localName&&"import"===e.getAttribute("rel")){var n=e.import;n instanceof Node&&(n.__CE_isImportDocument=!0,n.__CE_hasRegistry=!0),n&&"complete"===n.readyState?n.__CE_documentLoadHandled=!0:e.addEventListener("load",function(){var n=e.import;if(!n.__CE_documentLoadHandled){n.__CE_documentLoadHandled=!0;var i=new Set(r);i.delete(n),h(t,n,{w:i,i:o})}})}else a.push(e)},r),t.b)for(e=0;e<a.length;e++)l(t,a[e]);for(e=0;e<a.length;e++)o(a[e])}function d(t,e){if(void 0===e.__CE_state){var n=e.ownerDocument;if((n.defaultView||n.__CE_isImportDocument&&n.__CE_hasRegistry)&&(n=t.a.get(e.localName))){n.constructionStack.push(e);var o=n.constructor;try{try{if(new o!==e)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{n.constructionStack.pop()}}catch(t){throw e.__CE_state=2,t}if(e.__CE_state=1,e.__CE_definition=n,n.attributeChangedCallback)for(n=n.observedAttributes,o=0;o<n.length;o++){var i=n[o],a=e.getAttribute(i);null!==a&&t.attributeChangedCallback(e,i,null,a,null)}r(e)&&t.connectedCallback(e)}}}function v(t,e){this.c=t,this.a=e,this.b=void 0,h(this.c,this.a),"loading"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function g(t){t.b&&t.b.disconnect()}function y(t){if(t.a)throw Error("Already resolved.");t.a=void 0,t.b&&t.b(void 0)}function m(t){this.j=!1,this.c=t,this.o=new Map,this.l=function(t){return t()},this.g=!1,this.m=[],this.u=new v(t,document)}c.prototype.connectedCallback=function(t){var e=t.__CE_definition;e.connectedCallback&&e.connectedCallback.call(t)},c.prototype.disconnectedCallback=function(t){var e=t.__CE_definition;e.disconnectedCallback&&e.disconnectedCallback.call(t)},c.prototype.attributeChangedCallback=function(t,e,n,r,o){var i=t.__CE_definition;i.attributeChangedCallback&&-1<i.observedAttributes.indexOf(e)&&i.attributeChangedCallback.call(t,e,n,r,o)},v.prototype.f=function(t){var e=this.a.readyState;for("interactive"!==e&&"complete"!==e||g(this),e=0;e<t.length;e++)for(var n=t[e].addedNodes,r=0;r<n.length;r++)h(this.c,n[r])},m.prototype.define=function(t,e){var r,o,i,a,c,s=this;if(!(e instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!n(t))throw new SyntaxError("The element name '"+t+"' is not valid.");if(this.c.a.get(t))throw Error("A custom element with name '"+t+"' has already been defined.");if(this.j)throw Error("A custom element is already being defined.");this.j=!0;try{var u=function(t){var e=l[t];if(void 0!==e&&!(e instanceof Function))throw Error("The '"+t+"' callback must be a function.");return e},l=e.prototype;if(!(l instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");r=u("connectedCallback"),o=u("disconnectedCallback"),i=u("adoptedCallback"),a=u("attributeChangedCallback"),c=e.observedAttributes||[]}catch(t){return}finally{this.j=!1}(function(t,e,n){t.a.set(e,n),t.s.set(n.constructor,n)})(this.c,t,e={localName:t,constructor:e,connectedCallback:r,disconnectedCallback:o,adoptedCallback:i,attributeChangedCallback:a,observedAttributes:c,constructionStack:[]}),this.m.push(e),this.g||(this.g=!0,this.l(function(){return function(t){if(!1!==t.g){t.g=!1;for(var e=t.m,n=[],r=new Map,o=0;o<e.length;o++)r.set(e[o].localName,[]);for(h(t.c,document,{i:function(e){if(void 0===e.__CE_state){var o=e.localName,i=r.get(o);i?i.push(e):t.c.a.get(o)&&n.push(e)}}}),o=0;o<n.length;o++)d(t.c,n[o]);for(;0<e.length;){o=(i=e.shift()).localName;for(var i=r.get(i.localName),a=0;a<i.length;a++)d(t.c,i[a]);(o=t.o.get(o))&&y(o)}}}(s)}))},m.prototype.i=function(t){h(this.c,t)},m.prototype.get=function(t){if(t=this.c.a.get(t))return t.constructor},m.prototype.whenDefined=function(t){if(!n(t))return Promise.reject(new SyntaxError("'"+t+"' is not a valid custom element name."));var e=this.o.get(t);return e?e.f:(e=new function(){var t=this;this.b=this.a=void 0,this.f=new Promise(function(e){t.b=e,t.a&&e(t.a)})},this.o.set(t,e),this.c.a.get(t)&&!this.m.some(function(e){return e.localName===t})&&y(e),e.f)},m.prototype.v=function(t){g(this.u);var e=this.l;this.l=function(n){return t(function(){return e(n)})}},window.CustomElementRegistry=m,m.prototype.define=m.prototype.define,m.prototype.upgrade=m.prototype.i,m.prototype.get=m.prototype.get,m.prototype.whenDefined=m.prototype.whenDefined,m.prototype.polyfillWrapFlushCallback=m.prototype.v;var _=window.Document.prototype.createElement,b=window.Document.prototype.createElementNS,w=window.Document.prototype.importNode,k=window.Document.prototype.prepend,E=window.Document.prototype.append,T=window.DocumentFragment.prototype.prepend,C=window.DocumentFragment.prototype.append,S=window.Node.prototype.cloneNode,x=window.Node.prototype.appendChild,O=window.Node.prototype.insertBefore,D=window.Node.prototype.removeChild,j=window.Node.prototype.replaceChild,P=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),Z=window.Element.prototype.attachShadow,M=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),z=window.Element.prototype.getAttribute,N=window.Element.prototype.setAttribute,L=window.Element.prototype.removeAttribute,A=window.Element.prototype.getAttributeNS,R=window.Element.prototype.setAttributeNS,F=window.Element.prototype.removeAttributeNS,I=window.Element.prototype.insertAdjacentElement,H=window.Element.prototype.insertAdjacentHTML,q=window.Element.prototype.prepend,W=window.Element.prototype.append,X=window.Element.prototype.before,U=window.Element.prototype.after,K=window.Element.prototype.replaceWith,B=window.Element.prototype.remove,Y=window.HTMLElement,V=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),J=window.HTMLElement.prototype.insertAdjacentElement,G=window.HTMLElement.prototype.insertAdjacentHTML;function Q(t,e,n){function o(e){return function(n){for(var o=[],i=0;i<arguments.length;++i)o[i-0]=arguments[i];i=[];for(var a=[],c=0;c<o.length;c++){var s=o[c];if(s instanceof Element&&r(s)&&a.push(s),s instanceof DocumentFragment)for(s=s.firstChild;s;s=s.nextSibling)i.push(s);else i.push(s)}for(e.apply(this,o),o=0;o<a.length;o++)p(t,a[o]);if(r(this))for(o=0;o<i.length;o++)(a=i[o])instanceof Element&&f(t,a)}}n.h&&(e.prepend=o(n.h)),n.append&&(e.append=o(n.append))}var $,tt=window.customElements;if(!tt||tt.forcePolyfill||"function"!=typeof tt.define||"function"!=typeof tt.get){var et=new c;$=et,window.HTMLElement=function(){function e(){var e=this.constructor;if(!(r=$.s.get(e)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=_.call(document,r.localName),Object.setPrototypeOf(n,e.prototype),n.__CE_state=1,n.__CE_definition=r,l($,n),n;var r,o=n[r=n.length-1];if(o===t)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=t,Object.setPrototypeOf(o,e.prototype),l($,o),o}return e.prototype=Y.prototype,e}(),function(){var t=et;a(Document.prototype,"createElement",function(e){if(this.__CE_hasRegistry){var n=t.a.get(e);if(n)return new n.constructor}return e=_.call(this,e),l(t,e),e}),a(Document.prototype,"importNode",function(e,n){return e=w.call(this,e,n),this.__CE_hasRegistry?h(t,e):u(t,e),e}),a(Document.prototype,"createElementNS",function(e,n){if(this.__CE_hasRegistry&&(null===e||"http://www.w3.org/1999/xhtml"===e)){var r=t.a.get(n);if(r)return new r.constructor}return e=b.call(this,e,n),l(t,e),e}),Q(t,Document.prototype,{h:k,append:E})}(),Q(et,DocumentFragment.prototype,{h:T,append:C}),function(){var t=et;function e(e,n){Object.defineProperty(e,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,e);else{var o=void 0;if(this.firstChild){var i=this.childNodes,a=i.length;if(0<a&&r(this)){o=Array(a);for(var c=0;c<a;c++)o[c]=i[c]}}if(n.set.call(this,e),o)for(e=0;e<o.length;e++)p(t,o[e])}}})}a(Node.prototype,"insertBefore",function(e,n){if(e instanceof DocumentFragment){var o=Array.prototype.slice.apply(e.childNodes);if(e=O.call(this,e,n),r(this))for(n=0;n<o.length;n++)f(t,o[n]);return e}return o=r(e),n=O.call(this,e,n),o&&p(t,e),r(this)&&f(t,e),n}),a(Node.prototype,"appendChild",function(e){if(e instanceof DocumentFragment){var n=Array.prototype.slice.apply(e.childNodes);if(e=x.call(this,e),r(this))for(var o=0;o<n.length;o++)f(t,n[o]);return e}return n=r(e),o=x.call(this,e),n&&p(t,e),r(this)&&f(t,e),o}),a(Node.prototype,"cloneNode",function(e){return e=S.call(this,e),this.ownerDocument.__CE_hasRegistry?h(t,e):u(t,e),e}),a(Node.prototype,"removeChild",function(e){var n=r(e),o=D.call(this,e);return n&&p(t,e),o}),a(Node.prototype,"replaceChild",function(e,n){if(e instanceof DocumentFragment){var o=Array.prototype.slice.apply(e.childNodes);if(e=j.call(this,e,n),r(this))for(p(t,n),n=0;n<o.length;n++)f(t,o[n]);return e}o=r(e);var i=j.call(this,e,n),a=r(this);return a&&p(t,n),o&&p(t,e),a&&f(t,e),i}),P&&P.get?e(Node.prototype,P):s(t,function(t){e(t,{enumerable:!0,configurable:!0,get:function(){for(var t=[],e=0;e<this.childNodes.length;e++)t.push(this.childNodes[e].textContent);return t.join("")},set:function(t){for(;this.firstChild;)D.call(this,this.firstChild);x.call(this,document.createTextNode(t))}})})}(),function(){var t=et;function e(e,n){Object.defineProperty(e,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(e){var o=this,a=void 0;if(r(this)&&(a=[],i(this,function(t){t!==o&&a.push(t)})),n.set.call(this,e),a)for(var c=0;c<a.length;c++){var s=a[c];1===s.__CE_state&&t.disconnectedCallback(s)}return this.ownerDocument.__CE_hasRegistry?h(t,this):u(t,this),e}})}function n(e,n){a(e,"insertAdjacentElement",function(e,o){var i=r(o);return e=n.call(this,e,o),i&&p(t,o),r(e)&&f(t,o),e})}function o(e,n){function r(e,n){for(var r=[];e!==n;e=e.nextSibling)r.push(e);for(n=0;n<r.length;n++)h(t,r[n])}a(e,"insertAdjacentHTML",function(t,e){if("beforebegin"===(t=t.toLowerCase())){var o=this.previousSibling;n.call(this,t,e),r(o||this.parentNode.firstChild,this)}else if("afterbegin"===t)o=this.firstChild,n.call(this,t,e),r(this.firstChild,o);else if("beforeend"===t)o=this.lastChild,n.call(this,t,e),r(o||this.firstChild,null);else{if("afterend"!==t)throw new SyntaxError("The value provided ("+String(t)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");o=this.nextSibling,n.call(this,t,e),r(this.nextSibling,o)}})}Z&&a(Element.prototype,"attachShadow",function(t){return this.__CE_shadowRoot=Z.call(this,t)}),M&&M.get?e(Element.prototype,M):V&&V.get?e(HTMLElement.prototype,V):s(t,function(t){e(t,{enumerable:!0,configurable:!0,get:function(){return S.call(this,!0).innerHTML},set:function(t){var e="template"===this.localName,n=e?this.content:this,r=b.call(document,this.namespaceURI,this.localName);for(r.innerHTML=t;0<n.childNodes.length;)D.call(n,n.childNodes[0]);for(t=e?r.content:r;0<t.childNodes.length;)x.call(n,t.childNodes[0])}})}),a(Element.prototype,"setAttribute",function(e,n){if(1!==this.__CE_state)return N.call(this,e,n);var r=z.call(this,e);N.call(this,e,n),n=z.call(this,e),t.attributeChangedCallback(this,e,r,n,null)}),a(Element.prototype,"setAttributeNS",function(e,n,r){if(1!==this.__CE_state)return R.call(this,e,n,r);var o=A.call(this,e,n);R.call(this,e,n,r),r=A.call(this,e,n),t.attributeChangedCallback(this,n,o,r,e)}),a(Element.prototype,"removeAttribute",function(e){if(1!==this.__CE_state)return L.call(this,e);var n=z.call(this,e);L.call(this,e),null!==n&&t.attributeChangedCallback(this,e,n,null,null)}),a(Element.prototype,"removeAttributeNS",function(e,n){if(1!==this.__CE_state)return F.call(this,e,n);var r=A.call(this,e,n);F.call(this,e,n);var o=A.call(this,e,n);r!==o&&t.attributeChangedCallback(this,n,r,o,e)}),J?n(HTMLElement.prototype,J):I?n(Element.prototype,I):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),G?o(HTMLElement.prototype,G):H?o(Element.prototype,H):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched."),Q(t,Element.prototype,{h:q,append:W}),function(t){var e=Element.prototype;function n(e){return function(n){for(var o=[],i=0;i<arguments.length;++i)o[i-0]=arguments[i];i=[];for(var a=[],c=0;c<o.length;c++){var s=o[c];if(s instanceof Element&&r(s)&&a.push(s),s instanceof DocumentFragment)for(s=s.firstChild;s;s=s.nextSibling)i.push(s);else i.push(s)}for(e.apply(this,o),o=0;o<a.length;o++)p(t,a[o]);if(r(this))for(o=0;o<i.length;o++)(a=i[o])instanceof Element&&f(t,a)}}X&&(e.before=n(X)),X&&(e.after=n(U)),K&&a(e,"replaceWith",function(e){for(var n=[],o=0;o<arguments.length;++o)n[o-0]=arguments[o];o=[];for(var i=[],a=0;a<n.length;a++){var c=n[a];if(c instanceof Element&&r(c)&&i.push(c),c instanceof DocumentFragment)for(c=c.firstChild;c;c=c.nextSibling)o.push(c);else o.push(c)}for(a=r(this),K.apply(this,n),n=0;n<i.length;n++)p(t,i[n]);if(a)for(p(t,this),n=0;n<o.length;n++)(i=o[n])instanceof Element&&f(t,i)}),B&&a(e,"remove",function(){var e=r(this);B.call(this),e&&p(t,this)})}(t)}(),document.__CE_hasRegistry=!0;var nt=new m(et);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:nt})}}).call(self)},aagx:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},apmT:function(t,e,n){var r=n("0/R4");t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},czNK:function(t,e,n){"use strict";var r=n("DVgA"),o=n("JiEa"),i=n("UqcF"),a=n("S/j/"),c=n("Ymqv"),s=Object.assign;t.exports=!s||n("eeVq")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r})?function(t,e){for(var n=a(t),s=arguments.length,u=1,l=o.f,f=i.f;s>u;)for(var p,h=c(arguments[u++]),d=l?r(h).concat(l(h)):r(h),v=d.length,g=0;v>g;)f.call(h,p=d[g++])&&(n[p]=h[p]);return n}:s},"d/Gc":function(t,e,n){var r=n("RYi7"),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},dyZX:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},eeVq:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},elZq:function(t,e,n){"use strict";var r=n("dyZX"),o=n("hswa"),i=n("nh4g"),a=n("K0xU")("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},"fN/3":function(t,e,n){var r=n("N6cJ"),o=n("y3w9"),i=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return i(o(t),arguments.length<2?void 0:a(arguments[1]))}})},fyDq:function(t,e,n){var r=n("hswa").f,o=n("aagx"),i=n("K0xU")("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},g3g5:function(t,e){var n=t.exports={version:"2.5.6"};"number"==typeof __e&&(__e=n)},"hN/g":function(t,e,n){"use strict";n.r(e),n("FZcq"),n("0TWp"),n("s1Zv"),n("aVe3")},hPIQ:function(t,e){t.exports={}},hswa:function(t,e,n){var r=n("y3w9"),o=n("xpql"),i=n("apmT"),a=Object.defineProperty;e.f=n("nh4g")?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},i5dc:function(t,e,n){var r=n("0/R4"),o=n("y3w9"),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n("m0Pp")(Function.call,n("EemH").f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},"iW+S":function(t,e,n){var r=n("N6cJ"),o=n("y3w9"),i=n("OP3Y"),a=r.has,c=r.key,s=function(t,e,n){if(a(t,e,n))return!0;var r=i(e);return null!==r&&s(t,r,n)};r.exp({hasMetadata:function(t,e){return s(t,o(e),arguments.length<3?void 0:c(arguments[2]))}})},m0Pp:function(t,e,n){var r=n("2OiF");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},ne8i:function(t,e,n){var r=n("RYi7"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},nh4g:function(t,e,n){t.exports=!n("eeVq")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},s1Zv:function(t,e){(()=>{"use strict";if(!window.customElements)return;const t=window.HTMLElement,e=window.customElements.define,n=window.customElements.get,r=new Map,o=new Map;let i=!1,a=!1;window.HTMLElement=function(){if(!i){const t=r.get(this.constructor),e=n.call(window.customElements,t);return a=!0,new e}i=!1},window.HTMLElement.prototype=t.prototype,Object.defineProperty(window,"customElements",{value:window.customElements,configurable:!0,writable:!0}),Object.defineProperty(window.customElements,"define",{value:(n,c)=>{const s=c.prototype,u=class extends t{constructor(){super(),Object.setPrototypeOf(this,s),a||(i=!0,c.call(this)),a=!1}},l=u.prototype;u.observedAttributes=c.observedAttributes,l.connectedCallback=s.connectedCallback,l.disconnectedCallback=s.disconnectedCallback,l.attributeChangedCallback=s.attributeChangedCallback,l.adoptedCallback=s.adoptedCallback,r.set(c,n),o.set(n,c),e.call(window.customElements,n,u)},configurable:!0,writable:!0}),Object.defineProperty(window.customElements,"get",{value:t=>o.get(t),configurable:!0,writable:!0})})()},s5qY:function(t,e,n){var r=n("0/R4");t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},uAtd:function(t,e,n){var r=n("T39b"),o=n("Q3ne"),i=n("N6cJ"),a=n("y3w9"),c=n("OP3Y"),s=i.keys,u=i.key,l=function(t,e){var n=s(t,e),i=c(t);if(null===i)return n;var a=l(i,e);return a.length?n.length?o(new r(n.concat(a))):a:n};i.exp({getMetadataKeys:function(t){return l(a(t),arguments.length<2?void 0:u(arguments[1]))}})},vhPU:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on  "+t);return t}},w2a5:function(t,e,n){var r=n("aCFj"),o=n("ne8i"),i=n("d/Gc");t.exports=function(t){return function(e,n,a){var c,s=r(e),u=o(s.length),l=i(a,u);if(t&&n!=n){for(;u>l;)if((c=s[l++])!=c)return!0}else for(;u>l;l++)if((t||l in s)&&s[l]===n)return t||l||0;return!t&&-1}}},wmvG:function(t,e,n){"use strict";var r=n("hswa").f,o=n("Kuth"),i=n("3Lyj"),a=n("m0Pp"),c=n("9gX7"),s=n("SlkY"),u=n("Afnz"),l=n("1TsA"),f=n("elZq"),p=n("nh4g"),h=n("Z6vF").fastKey,d=n("s5qY"),v=p?"_s":"size",g=function(t,e){var n,r=h(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,u){var l=t(function(t,r){c(t,l,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[v]=0,void 0!=r&&s(r,n,t[u],t)});return i(l.prototype,{clear:function(){for(var t=d(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=d(this,e),r=g(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[v]--}return!!r},forEach:function(t){d(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(d(this,e),t)}}),p&&r(l.prototype,"size",{get:function(){return d(this,e)[v]}}),l},def:function(t,e,n){var r,o,i=g(t,e);return i?i.v=n:(t._l=i={i:o=h(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[v]++,"F"!==o&&(t._i[o]=i)),t},getEntry:g,setStrong:function(t,e,n){u(t,e,function(t,n){this._t=d(t,e),this._k=n,this._l=void 0},function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?l(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,l(1))},n?"entries":"values",!n,!0),f(e)}}},xpql:function(t,e,n){t.exports=!n("nh4g")&&!n("eeVq")(function(){return 7!=Object.defineProperty(n("Iw71")("div"),"a",{get:function(){return 7}}).a})},y3w9:function(t,e,n){var r=n("0/R4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},ylqs:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},zRwo:function(t,e,n){var r=n("6FMO");t.exports=function(t,e){return new(r(t))(e)}},zhAb:function(t,e,n){var r=n("aagx"),o=n("aCFj"),i=n("w2a5")(!1),a=n("YTvA")("IE_PROTO");t.exports=function(t,e){var n,c=o(t),s=0,u=[];for(n in c)n!=a&&r(c,n)&&u.push(n);for(;e.length>s;)r(c,n=e[s++])&&(~i(u,n)||u.push(n));return u}},"zq+C":function(t,e,n){var r=n("N6cJ"),o=n("y3w9"),i=r.key,a=r.map,c=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:i(arguments[2]),r=a(o(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var s=c.get(e);return s.delete(n),!!s.size||c.delete(e)}})}},[[2,0]]]);
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+rLv":function(e,t,n){var r=n("dyZX").document;e.exports=r&&r.documentElement},"0/R4":function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},"0TWp":function(e,t,n){!function(){"use strict";!function(e){var t=e.performance;function n(e){t&&t.mark&&t.mark(e)}function r(e,n){t&&t.measure&&t.measure(e,n)}if(n("Zone"),e.Zone)throw new Error("Zone already loaded.");var i,o=function(){function t(e,t){this._properties=null,this._parent=e,this._name=t?t.name||"unnamed":"<root>",this._properties=t&&t.properties||{},this._zoneDelegate=new a(this,this._parent&&this._parent._zoneDelegate,t)}return t.assertZonePatched=function(){if(e.Promise!==C.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(t,"root",{get:function(){for(var e=t.current;e.parent;)e=e.parent;return e},enumerable:!0,configurable:!0}),Object.defineProperty(t,"current",{get:function(){return k.zone},enumerable:!0,configurable:!0}),Object.defineProperty(t,"currentTask",{get:function(){return T},enumerable:!0,configurable:!0}),t.__load_patch=function(i,o){if(C.hasOwnProperty(i))throw Error("Already loaded patch: "+i);if(!e["__Zone_disable_"+i]){var s="Zone:"+i;n(s),C[i]=o(e,t,A),r(s,s)}},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var t=this.getZoneWith(e);if(t)return t._properties[e]},t.prototype.getZoneWith=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t;t=t._parent}return null},t.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},t.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},t.prototype.run=function(e,t,n,r){void 0===t&&(t=void 0),void 0===n&&(n=null),void 0===r&&(r=null),k={parent:k,zone:this};try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{k=k.parent}},t.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),k={parent:k,zone:this};try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{k=k.parent}},t.prototype.runTask=function(e,t,n){if(e.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(e.zone||v).name+"; Execution: "+this.name+")");if(e.state!==y||e.type!==F){var r=e.state!=w;r&&e._transitionTo(w,b),e.runCount++;var i=T;T=e,k={parent:k,zone:this};try{e.type==x&&e.data&&!e.data.isPeriodic&&(e.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(e){if(this._zoneDelegate.handleError(this,e))throw e}}finally{e.state!==y&&e.state!==S&&(e.type==F||e.data&&e.data.isPeriodic?r&&e._transitionTo(b,w):(e.runCount=0,this._updateTaskCount(e,-1),r&&e._transitionTo(y,w,y))),k=k.parent,T=i}}},t.prototype.scheduleTask=function(e){if(e.zone&&e.zone!==this)for(var t=this;t;){if(t===e.zone)throw Error("can not reschedule task to "+this.name+" which is descendants of the original zone "+e.zone.name);t=t.parent}e._transitionTo(m,y);var n=[];e._zoneDelegates=n,e._zone=this;try{e=this._zoneDelegate.scheduleTask(this,e)}catch(t){throw e._transitionTo(S,m,y),this._zoneDelegate.handleError(this,t),t}return e._zoneDelegates===n&&this._updateTaskCount(e,1),e.state==m&&e._transitionTo(b,m),e},t.prototype.scheduleMicroTask=function(e,t,n,r){return this.scheduleTask(new u(E,e,t,n,r,null))},t.prototype.scheduleMacroTask=function(e,t,n,r,i){return this.scheduleTask(new u(x,e,t,n,r,i))},t.prototype.scheduleEventTask=function(e,t,n,r,i){return this.scheduleTask(new u(F,e,t,n,r,i))},t.prototype.cancelTask=function(e){if(e.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(e.zone||v).name+"; Execution: "+this.name+")");e._transitionTo(_,b,w);try{this._zoneDelegate.cancelTask(this,e)}catch(t){throw e._transitionTo(S,_),this._zoneDelegate.handleError(this,t),t}return this._updateTaskCount(e,-1),e._transitionTo(y,_),e.runCount=0,e},t.prototype._updateTaskCount=function(e,t){var n=e._zoneDelegates;-1==t&&(e._zoneDelegates=null);for(var r=0;r<n.length;r++)n[r]._updateTaskCount(e.type,t)},t.__symbol__=I,t}(),s={name:"",onHasTask:function(e,t,n,r){return e.hasTask(n,r)},onScheduleTask:function(e,t,n,r){return e.scheduleTask(n,r)},onInvokeTask:function(e,t,n,r,i,o){return e.invokeTask(n,r,i,o)},onCancelTask:function(e,t,n,r){return e.cancelTask(n,r)}},a=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._forkCurrZone=n&&(n.onFork?this.zone:t.zone),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=n&&(n.onIntercept?this.zone:t.zone),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=n&&(n.onInvoke?this.zone:t.zone),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=n&&(n.onHandleError?this.zone:t.zone),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=n&&(n.onScheduleTask?this.zone:t.zone),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=n&&(n.onInvokeTask?this.zone:t.zone),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=n&&(n.onCancelTask?this.zone:t.zone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var r=n&&n.onHasTask;(r||t&&t._hasTaskZS)&&(this._hasTaskZS=r?n:s,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=e,n.onScheduleTask||(this._scheduleTaskZS=s,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),n.onInvokeTask||(this._invokeTaskZS=s,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),n.onCancelTask||(this._cancelTaskZS=s,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new o(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,i){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,e,t,n,r,i):t.apply(n,r)},e.prototype.handleError=function(e,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,e,t)},e.prototype.scheduleTask=function(e,t){var n=t;if(this._scheduleTaskZS)this._hasTaskZS&&n._zoneDelegates.push(this._hasTaskDlgtOwner),(n=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,e,t))||(n=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=E)throw new Error("Task is missing scheduleFn.");f(t)}return n},e.prototype.invokeTask=function(e,t,n,r){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,e,t,n,r):t.callback.apply(n,r)},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,e,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");n=t.cancelFn(t)}return n},e.prototype.hasTask=function(e,t){try{return this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,e,t)}catch(t){this.handleError(e,t)}},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],i=n[e]=r+t;if(i<0)throw new Error("More tasks executed then were scheduled.");0!=r&&0!=i||this.hasTask(this.zone,{microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e})},e}(),u=function(){function t(n,r,i,o,s,a){this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=n,this.source=r,this.data=o,this.scheduleFn=s,this.cancelFn=a,this.callback=i;var u=this;this.invoke=n===F&&o&&o.useG?t.invokeTask:function(){return t.invokeTask.call(e,u,this,arguments)}}return t.invokeTask=function(e,t,n){e||(e=this),P++;try{return e.runCount++,e.zone.runTask(e,t,n)}finally{1==P&&g(),P--}},Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!0,configurable:!0}),t.prototype.cancelScheduleRequest=function(){this._transitionTo(y,m)},t.prototype._transitionTo=function(e,t,n){if(this._state!==t&&this._state!==n)throw new Error(this.type+" '"+this.source+"': can not transition to '"+e+"', expecting state '"+t+"'"+(n?" or '"+n+"'":"")+", was '"+this._state+"'.");this._state=e,e==y&&(this._zoneDelegates=null)},t.prototype.toString=function(){return this.data&&void 0!==this.data.handleId?this.data.handleId:Object.prototype.toString.call(this)},t.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},t}(),c=I("setTimeout"),l=I("Promise"),h=I("then"),d=[],p=!1;function f(t){0===P&&0===d.length&&(i||e[l]&&(i=e[l].resolve(0)),i?i[h](g):e[c](g,0)),t&&d.push(t)}function g(){if(!p){for(p=!0;d.length;){var e=d;d=[];for(var t=0;t<e.length;t++){var n=e[t];try{n.zone.runTask(n,null,null)}catch(e){A.onUnhandledError(e)}}}A.microtaskDrainDone(),p=!1}}var v={name:"NO ZONE"},y="notScheduled",m="scheduling",b="scheduled",w="running",_="canceling",S="unknown",E="microTask",x="macroTask",F="eventTask",C={},A={symbol:I,currentZoneFrame:function(){return k},onUnhandledError:D,microtaskDrainDone:D,scheduleMicroTask:f,showUncaughtError:function(){return!o[I("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:D,patchMethod:function(){return D},bindArguments:function(){return null},setNativePromise:function(e){e&&"function"==typeof e.resolve&&(i=e.resolve(0))}},k={parent:null,zone:new o(null,null)},T=null,P=0;function D(){}function I(e){return"__zone_symbol__"+e}r("Zone","Zone"),e.Zone=o}("undefined"!=typeof window&&window||"undefined"!=typeof self&&self||global),Zone.__load_patch("ZoneAwarePromise",function(e,t,n){var r=Object.getOwnPropertyDescriptor,i=Object.defineProperty,o=n.symbol,s=[],a=o("Promise"),u=o("then"),c="__creationTrace__";n.onUnhandledError=function(e){if(n.showUncaughtError()){var t=e&&e.rejection;t?console.error("Unhandled Promise rejection:",t instanceof Error?t.message:t,"; Zone:",e.zone.name,"; Task:",e.task&&e.task.source,"; Value:",t,t instanceof Error?t.stack:void 0):console.error(e)}},n.microtaskDrainDone=function(){for(;s.length;)for(var e=function(){var e=s.shift();try{e.zone.runGuarded(function(){throw e})}catch(e){h(e)}};s.length;)e()};var l=o("unhandledPromiseRejectionHandler");function h(e){n.onUnhandledError(e);try{var r=t[l];r&&"function"==typeof r&&r.call(this,e)}catch(e){}}function d(e){return e&&e.then}function p(e){return e}function f(e){return N.reject(e)}var g=o("state"),v=o("value"),y=o("finally"),m=o("parentPromiseValue"),b=o("parentPromiseState"),w="Promise.then",_=null,S=!0,E=!1,x=0;function F(e,t){return function(n){try{T(e,t,n)}catch(t){T(e,!1,t)}}}var C=function(){var e=!1;return function(t){return function(){e||(e=!0,t.apply(null,arguments))}}},A="Promise resolved with itself",k=o("currentTaskTrace");function T(e,r,o){var a,u=C();if(e===o)throw new TypeError(A);if(e[g]===_){var l=null;try{"object"!=typeof o&&"function"!=typeof o||(l=o&&o.then)}catch(t){return u(function(){T(e,!1,t)})(),e}if(r!==E&&o instanceof N&&o.hasOwnProperty(g)&&o.hasOwnProperty(v)&&o[g]!==_)D(o),T(e,o[g],o[v]);else if(r!==E&&"function"==typeof l)try{l.call(o,u(F(e,r)),u(F(e,!1)))}catch(t){u(function(){T(e,!1,t)})()}else{e[g]=r;var h=e[v];if(e[v]=o,e[y]===y&&r===S&&(e[g]=e[b],e[v]=e[m]),r===E&&o instanceof Error){var d=t.currentTask&&t.currentTask.data&&t.currentTask.data[c];d&&i(o,k,{configurable:!0,enumerable:!1,writable:!0,value:d})}for(var p=0;p<h.length;)I(e,h[p++],h[p++],h[p++],h[p++]);if(0==h.length&&r==E){e[g]=x;try{throw new Error("Uncaught (in promise): "+((a=o)&&a.toString===Object.prototype.toString?(a.constructor&&a.constructor.name||"")+": "+JSON.stringify(a):a?a.toString():Object.prototype.toString.call(a))+(o&&o.stack?"\n"+o.stack:""))}catch(r){var f=r;f.rejection=o,f.promise=e,f.zone=t.current,f.task=t.currentTask,s.push(f),n.scheduleMicroTask()}}}}return e}var P=o("rejectionHandledHandler");function D(e){if(e[g]===x){try{var n=t[P];n&&"function"==typeof n&&n.call(this,{rejection:e[v],promise:e})}catch(e){}e[g]=E;for(var r=0;r<s.length;r++)e===s[r].promise&&s.splice(r,1)}}function I(e,t,n,r,i){D(e);var o=e[g],s=o?"function"==typeof r?r:p:"function"==typeof i?i:f;t.scheduleMicroTask(w,function(){try{var r=e[v],i=n&&y===n[y];i&&(n[m]=r,n[b]=o);var a=t.run(s,void 0,i&&s!==f&&s!==p?[]:[r]);T(n,!0,a)}catch(e){T(n,!1,e)}},n)}var N=function(){function e(t){if(!(this instanceof e))throw new Error("Must be an instanceof Promise.");this[g]=_,this[v]=[];try{t&&t(F(this,S),F(this,E))}catch(e){T(this,!1,e)}}return e.toString=function(){return"function ZoneAwarePromise() { [native code] }"},e.resolve=function(e){return T(new this(null),S,e)},e.reject=function(e){return T(new this(null),E,e)},e.race=function(e){var t,n,r=new this(function(e,r){t=e,n=r});function i(e){r&&(r=t(e))}function o(e){r&&(r=n(e))}for(var s=0,a=e;s<a.length;s++){var u=a[s];d(u)||(u=this.resolve(u)),u.then(i,o)}return r},e.all=function(e){for(var t,n,r=new this(function(e,r){t=e,n=r}),i=0,o=[],s=0,a=e;s<a.length;s++){var u=a[s];d(u)||(u=this.resolve(u)),u.then(function(e){return function(n){o[e]=n,--i||t(o)}}(i),n),i++}return i||t(o),r},e.prototype.then=function(e,n){var r=new this.constructor(null),i=t.current;return this[g]==_?this[v].push(i,r,e,n):I(this,i,r,e,n),r},e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var n=new this.constructor(null);n[y]=y;var r=t.current;return this[g]==_?this[v].push(r,n,e,e):I(this,r,n,e,e),n},e}();N.resolve=N.resolve,N.reject=N.reject,N.race=N.race,N.all=N.all;var R=e[a]=e.Promise,O=t.__symbol__("ZoneAwarePromise"),j=r(e,"Promise");j&&!j.configurable||(j&&delete j.writable,j&&delete j.value,j||(j={configurable:!0,enumerable:!0}),j.get=function(){return e[O]?e[O]:e[a]},j.set=function(t){t===N?e[O]=t:(e[a]=t,t.prototype[u]||B(t),n.setNativePromise(t))},i(e,"Promise",j)),e.Promise=N;var H,M=o("thenPatched");function B(e){var t=e.prototype,n=r(t,"then");if(!n||!1!==n.writable&&n.configurable){var i=t.then;t[u]=i,e.prototype.then=function(e,t){var n=this;return new N(function(e,t){i.call(n,e,t)}).then(e,t)},e[M]=!0}}if(R){B(R);var V=e.fetch;"function"==typeof V&&(e.fetch=(H=V,function(){var e=H.apply(this,arguments);if(e instanceof N)return e;var t=e.constructor;return t[M]||B(t),e}))}return Promise[t.__symbol__("uncaughtPromiseErrors")]=s,N});var e=Object.getOwnPropertyDescriptor,t=Object.defineProperty,n=Object.getPrototypeOf,r=Object.create,i=Array.prototype.slice,o="addEventListener",s="removeEventListener",a=Zone.__symbol__(o),u=Zone.__symbol__(s),c="true",l="false",h="__zone_symbol__";function d(e,t){return Zone.current.wrap(e,t)}function p(e,t,n,r,i){return Zone.current.scheduleMacroTask(e,t,n,r,i)}var f=Zone.__symbol__,g="undefined"!=typeof window,v=g?window:void 0,y=g&&v||"object"==typeof self&&self||global,m="removeAttribute",b=[null];function w(e,t){for(var n=e.length-1;n>=0;n--)"function"==typeof e[n]&&(e[n]=d(e[n],t+"_"+n));return e}function _(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&void 0===e.set)}var S="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope,E=!("nw"in y)&&void 0!==y.process&&"[object process]"==={}.toString.call(y.process),x=!E&&!S&&!(!g||!v.HTMLElement),F=void 0!==y.process&&"[object process]"==={}.toString.call(y.process)&&!S&&!(!g||!v.HTMLElement),C={},A=function(e){if(e=e||y.event){var t=C[e.type];t||(t=C[e.type]=f("ON_PROPERTY"+e.type));var n=(this||e.target||y)[t],r=n&&n.apply(this,arguments);return void 0==r||r||e.preventDefault(),r}};function k(n,r,i){var o=e(n,r);if(!o&&i&&e(i,r)&&(o={enumerable:!0,configurable:!0}),o&&o.configurable){delete o.writable,delete o.value;var s=o.get,a=o.set,u=r.substr(2),c=C[u];c||(c=C[u]=f("ON_PROPERTY"+u)),o.set=function(e){var t=this;t||n!==y||(t=y),t&&(t[c]&&t.removeEventListener(u,A),a&&a.apply(t,b),"function"==typeof e?(t[c]=e,t.addEventListener(u,A,!1)):t[c]=null)},o.get=function(){var e=this;if(e||n!==y||(e=y),!e)return null;var t=e[c];if(t)return t;if(s){var i=s&&s.call(this);if(i)return o.set.call(this,i),"function"==typeof e[m]&&e.removeAttribute(r),i}return null},t(n,r,o)}}function T(e,t,n){if(t)for(var r=0;r<t.length;r++)k(e,"on"+t[r],n);else{var i=[];for(var o in e)"on"==o.substr(0,2)&&i.push(o);for(var s=0;s<i.length;s++)k(e,i[s],n)}}var P=f("originalInstance");function D(e){var n=y[e];if(n){y[f(e)]=n,y[e]=function(){var t=w(arguments,e);switch(t.length){case 0:this[P]=new n;break;case 1:this[P]=new n(t[0]);break;case 2:this[P]=new n(t[0],t[1]);break;case 3:this[P]=new n(t[0],t[1],t[2]);break;case 4:this[P]=new n(t[0],t[1],t[2],t[3]);break;default:throw new Error("Arg list too long.")}},N(y[e],n);var r,i=new n(function(){});for(r in i)"XMLHttpRequest"===e&&"responseBlob"===r||function(n){"function"==typeof i[n]?y[e].prototype[n]=function(){return this[P][n].apply(this[P],arguments)}:t(y[e].prototype,n,{set:function(t){"function"==typeof t?(this[P][n]=d(t,e+"."+n),N(this[P][n],t)):this[P][n]=t},get:function(){return this[P][n]}})}(r);for(r in n)"prototype"!==r&&n.hasOwnProperty(r)&&(y[e][r]=n[r])}}function I(t,r,i){for(var o=t;o&&!o.hasOwnProperty(r);)o=n(o);!o&&t[r]&&(o=t);var s,a=f(r);if(o&&!(s=o[a])&&(s=o[a]=o[r],_(o&&e(o,r)))){var u=i(s,a,r);o[r]=function(){return u(this,arguments)},N(o[r],s)}return s}function N(e,t){e[f("OriginalDelegate")]=t}var R=!1,O=!1;function j(){if(R)return O;R=!0;try{var e=v.navigator.userAgent;return-1===e.indexOf("MSIE ")&&-1===e.indexOf("Trident/")&&-1===e.indexOf("Edge/")||(O=!0),O}catch(e){}}Zone.__load_patch("toString",function(e){var t=Function.prototype.toString,n=f("OriginalDelegate"),r=f("Promise"),i=f("Error"),o=function(){if("function"==typeof this){var o=this[n];if(o)return"function"==typeof o?t.apply(this[n],arguments):Object.prototype.toString.call(o);if(this===Promise){var s=e[r];if(s)return t.apply(s,arguments)}if(this===Error){var a=e[i];if(a)return t.apply(a,arguments)}}return t.apply(this,arguments)};o[n]=t,Function.prototype.toString=o;var s=Object.prototype.toString;Object.prototype.toString=function(){return this instanceof Promise?"[object Promise]":s.apply(this,arguments)}});var H={useG:!0},M={},B={},V=/^__zone_symbol__(\w+)(true|false)$/,U="__zone_symbol__propagationStopped";function L(e,t,r){var i=r&&r.add||o,a=r&&r.rm||s,u=r&&r.listeners||"eventListeners",d=r&&r.rmAll||"removeAllListeners",p=f(i),g="."+i+":",v="prependListener",y="."+v+":",m=function(e,t,n){if(!e.isRemoved){var r=e.callback;"object"==typeof r&&r.handleEvent&&(e.callback=function(e){return r.handleEvent(e)},e.originalDelegate=r),e.invoke(e,t,[n]);var i=e.options;i&&"object"==typeof i&&i.once&&t[a].call(t,n.type,e.originalDelegate?e.originalDelegate:e.callback,i)}},b=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[M[t.type][l]];if(r)if(1===r.length)m(r[0],n,t);else for(var i=r.slice(),o=0;o<i.length&&(!t||!0!==t[U]);o++)m(i[o],n,t)}},w=function(t){if(t=t||e.event){var n=this||t.target||e,r=n[M[t.type][c]];if(r)if(1===r.length)m(r[0],n,t);else for(var i=r.slice(),o=0;o<i.length&&(!t||!0!==t[U]);o++)m(i[o],n,t)}};function _(t,r){if(!t)return!1;var o=!0;r&&void 0!==r.useG&&(o=r.useG);var s=r&&r.vh,m=!0;r&&void 0!==r.chkDup&&(m=r.chkDup);var _=!1;r&&void 0!==r.rt&&(_=r.rt);for(var S=t;S&&!S.hasOwnProperty(i);)S=n(S);if(!S&&t[i]&&(S=t),!S)return!1;if(S[p])return!1;var E,x={},F=S[p]=S[i],C=S[f(a)]=S[a],A=S[f(u)]=S[u],k=S[f(d)]=S[d];r&&r.prepend&&(E=S[f(r.prepend)]=S[r.prepend]);var T=o?function(){if(!x.isExisting)return F.call(x.target,x.eventName,x.capture?w:b,x.options)}:function(e){return F.call(x.target,x.eventName,e.invoke,x.options)},P=o?function(e){if(!e.isRemoved){var t=M[e.eventName],n=void 0;t&&(n=t[e.capture?c:l]);var r=n&&e.target[n];if(r)for(var i=0;i<r.length;i++)if(r[i]===e){r.splice(i,1),e.isRemoved=!0,0===r.length&&(e.allRemoved=!0,e.target[n]=null);break}}if(e.allRemoved)return C.call(e.target,e.eventName,e.capture?w:b,e.options)}:function(e){return C.call(e.target,e.eventName,e.invoke,e.options)},D=r&&r.diff?r.diff:function(e,t){var n=typeof t;return"function"===n&&e.callback===t||"object"===n&&e.originalDelegate===t},I=Zone[Zone.__symbol__("BLACK_LISTED_EVENTS")],R=function(t,n,r,i,a,u){return void 0===a&&(a=!1),void 0===u&&(u=!1),function(){var d=this||e,p=arguments[1];if(!p)return t.apply(this,arguments);var f=!1;if("function"!=typeof p){if(!p.handleEvent)return t.apply(this,arguments);f=!0}if(!s||s(t,p,d,arguments)){var g,v=arguments[0],y=arguments[2];if(I)for(var b=0;b<I.length;b++)if(v===I[b])return t.apply(this,arguments);var w=!1;void 0===y?g=!1:!0===y?g=!0:!1===y?g=!1:(g=!!y&&!!y.capture,w=!!y&&!!y.once);var _,S=Zone.current,E=M[v];if(E)_=E[g?c:l];else{var F=h+(v+l),C=h+(v+c);M[v]={},M[v][l]=F,M[v][c]=C,_=g?C:F}var A,k=d[_],T=!1;if(k){if(T=!0,m)for(b=0;b<k.length;b++)if(D(k[b],p))return}else k=d[_]=[];var P=d.constructor.name,N=B[P];N&&(A=N[v]),A||(A=P+n+v),x.options=y,w&&(x.options.once=!1),x.target=d,x.capture=g,x.eventName=v,x.isExisting=T;var R=o?H:null;R&&(R.taskData=x);var O=S.scheduleEventTask(A,p,R,r,i);return x.target=null,R&&(R.taskData=null),w&&(y.once=!0),O.options=y,O.target=d,O.capture=g,O.eventName=v,f&&(O.originalDelegate=p),u?k.unshift(O):k.push(O),a?d:void 0}}};return S[i]=R(F,g,T,P,_),E&&(S[v]=R(E,y,function(e){return E.call(x.target,x.eventName,e.invoke,x.options)},P,_,!0)),S[a]=function(){var t,n=this||e,r=arguments[0],i=arguments[2];t=void 0!==i&&(!0===i||!1!==i&&!!i&&!!i.capture);var o=arguments[1];if(!o)return C.apply(this,arguments);if(!s||s(C,o,n,arguments)){var a,u=M[r];u&&(a=u[t?c:l]);var h=a&&n[a];if(h)for(var d=0;d<h.length;d++){var p=h[d];if(D(p,o))return h.splice(d,1),p.isRemoved=!0,0===h.length&&(p.allRemoved=!0,n[a]=null),p.zone.cancelTask(p),_?n:void 0}return C.apply(this,arguments)}},S[u]=function(){for(var t=[],n=K(this||e,arguments[0]),r=0;r<n.length;r++){var i=n[r];t.push(i.originalDelegate?i.originalDelegate:i.callback)}return t},S[d]=function(){var t=this||e,n=arguments[0];if(n){var r=M[n];if(r){var i=t[r[l]],o=t[r[c]];if(i){var s=i.slice();for(p=0;p<s.length;p++)this[a].call(this,n,(u=s[p]).originalDelegate?u.originalDelegate:u.callback,u.options)}if(o)for(s=o.slice(),p=0;p<s.length;p++){var u;this[a].call(this,n,(u=s[p]).originalDelegate?u.originalDelegate:u.callback,u.options)}}}else{for(var h=Object.keys(t),p=0;p<h.length;p++){var f=V.exec(h[p]),g=f&&f[1];g&&"removeListener"!==g&&this[d].call(this,g)}this[d].call(this,"removeListener")}if(_)return this},N(S[i],F),N(S[a],C),k&&N(S[d],k),A&&N(S[u],A),!0}for(var S=[],E=0;E<t.length;E++)S[E]=_(t[E],r);return S}function K(e,t){var n=[];for(var r in e){var i=V.exec(r),o=i&&i[1];if(o&&(!t||o===t)){var s=e[r];if(s)for(var a=0;a<s.length;a++)n.push(s[a])}}return n}var q=f("zoneTask");function z(e,t,n,r){var i=null,o=null;n+=r;var s={};function a(t){var n=t.data;return n.args[0]=function(){try{t.invoke.apply(this,arguments)}finally{t.data&&t.data.isPeriodic||("number"==typeof n.handleId?delete s[n.handleId]:n.handleId&&(n.handleId[q]=null))}},n.handleId=i.apply(e,n.args),t}function u(e){return o(e.data.handleId)}i=I(e,t+=r,function(n){return function(i,o){if("function"==typeof o[0]){var c=p(t,o[0],{handleId:null,isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?o[1]||0:null,args:o},a,u);if(!c)return c;var l=c.data.handleId;return"number"==typeof l?s[l]=c:l&&(l[q]=c),l&&l.ref&&l.unref&&"function"==typeof l.ref&&"function"==typeof l.unref&&(c.ref=l.ref.bind(l),c.unref=l.unref.bind(l)),"number"==typeof l||l?l:c}return n.apply(e,o)}}),o=I(e,n,function(t){return function(n,r){var i,o=r[0];"number"==typeof o?i=s[o]:(i=o&&o[q])||(i=o),i&&"string"==typeof i.type?"notScheduled"!==i.state&&(i.cancelFn&&i.data.isPeriodic||0===i.runCount)&&("number"==typeof o?delete s[o]:o&&(o[q]=null),i.zone.cancelTask(i)):t.apply(e,r)}})}var Z=Object[f("defineProperty")]=Object.defineProperty,W=Object[f("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,J=Object.create,G=f("unconfigurables");function Y(e,t){return e&&e[G]&&e[G][t]}function X(e,t,n){return Object.isFrozen(n)||(n.configurable=!0),n.configurable||(e[G]||Object.isFrozen(e)||Z(e,G,{writable:!0,value:{}}),e[G]&&(e[G][t]=!0)),n}function Q(e,t,n,r){try{return Z(e,t,n)}catch(o){if(!n.configurable)throw o;void 0===r?delete n.configurable:n.configurable=r;try{return Z(e,t,n)}catch(r){var i=null;try{i=JSON.stringify(n)}catch(e){i=n.toString()}console.log("Attempting to configure '"+t+"' with descriptor '"+i+"' on object '"+e+"' and got error, giving up: "+r)}}}var $=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplyconnected","vrdisplaydisconnected","vrdisplaypresentchange"],ee=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],te=["load"],ne=["blur","error","focus","load","resize","scroll","messageerror"],re=["bounce","finish","start"],ie=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],oe=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],se=["close","error","open","message"],ae=["error","message"],ue=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange"],$,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function ce(e,t,n,r){e&&T(e,function(e,t,n){if(!n)return t;var r=n.filter(function(t){return t.target===e});if(!r||0===r.length)return t;var i=r[0].ignoreProperties;return t.filter(function(e){return-1===i.indexOf(e)})}(e,t,n),r)}function le(a,u){if(!E||F){var c="undefined"!=typeof WebSocket;if(function(){if((x||F)&&!e(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var n=e(Element.prototype,"onclick");if(n&&!n.configurable)return!1}var r=XMLHttpRequest.prototype,i=e(r,"onreadystatechange");if(i){t(r,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return!0}});var o=!!(a=new XMLHttpRequest).onreadystatechange;return t(r,"onreadystatechange",i||{}),o}var s=f("fake");t(r,"onreadystatechange",{enumerable:!0,configurable:!0,get:function(){return this[s]},set:function(e){this[s]=e}});var a,u=function(){};return(a=new XMLHttpRequest).onreadystatechange=u,o=a[s]===u,a.onreadystatechange=null,o}()){var l=u.__Zone_ignore_on_properties;if(x){var h=window;ce(h,ue.concat(["messageerror"]),l,n(h)),ce(Document.prototype,ue,l),void 0!==h.SVGElement&&ce(h.SVGElement.prototype,ue,l),ce(Element.prototype,ue,l),ce(HTMLElement.prototype,ue,l),ce(HTMLMediaElement.prototype,ee,l),ce(HTMLFrameSetElement.prototype,$.concat(ne),l),ce(HTMLBodyElement.prototype,$.concat(ne),l),ce(HTMLFrameElement.prototype,te,l),ce(HTMLIFrameElement.prototype,te,l);var p=h.HTMLMarqueeElement;p&&ce(p.prototype,re,l);var g=h.Worker;g&&ce(g.prototype,ae,l)}ce(XMLHttpRequest.prototype,ie,l);var v=u.XMLHttpRequestEventTarget;v&&ce(v&&v.prototype,ie,l),"undefined"!=typeof IDBIndex&&(ce(IDBIndex.prototype,oe,l),ce(IDBRequest.prototype,oe,l),ce(IDBOpenDBRequest.prototype,oe,l),ce(IDBDatabase.prototype,oe,l),ce(IDBTransaction.prototype,oe,l),ce(IDBCursor.prototype,oe,l)),c&&ce(WebSocket.prototype,se,l)}else!function(){for(var e=function(e){var t=ue[e],n="on"+t;self.addEventListener(t,function(e){var t,r,i=e.target;for(r=i?i.constructor.name+"."+n:"unknown."+n;i;)i[n]&&!i[n][he]&&((t=d(i[n],r))[he]=i[n],i[n]=t),i=i.parentElement},!0)},t=0;t<ue.length;t++)e(t)}(),D("XMLHttpRequest"),c&&function(t,n){var a=n.WebSocket;n.EventTarget||L(n,[a.prototype]),n.WebSocket=function(t,n){var u,c,l=arguments.length>1?new a(t,n):new a(t),h=e(l,"onmessage");return h&&!1===h.configurable?(u=r(l),c=l,[o,s,"send","close"].forEach(function(e){u[e]=function(){var t=i.call(arguments);if(e===o||e===s){var n=t.length>0?t[0]:void 0;if(n){var r=Zone.__symbol__("ON_PROPERTY"+n);l[r]=u[r]}}return l[e].apply(l,t)}})):u=l,T(u,["close","error","message","open"],c),u};var u=n.WebSocket;for(var c in a)u[c]=a[c]}(0,u)}}var he=f("unbound");Zone.__load_patch("util",function(e,t,n){n.patchOnProperties=T,n.patchMethod=I,n.bindArguments=w}),Zone.__load_patch("timers",function(e){z(e,"set","clear","Timeout"),z(e,"set","clear","Interval"),z(e,"set","clear","Immediate")}),Zone.__load_patch("requestAnimationFrame",function(e){z(e,"request","cancel","AnimationFrame"),z(e,"mozRequest","mozCancel","AnimationFrame"),z(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(e,t){for(var n=["alert","prompt","confirm"],r=0;r<n.length;r++)I(e,n[r],function(n,r,i){return function(r,o){return t.current.run(n,e,o,i)}})}),Zone.__load_patch("EventTarget",function(e,t,n){var r=t.__symbol__("BLACK_LISTED_EVENTS");e[r]&&(t[r]=e[r]),function(e,t){!function(e,t){var n=e.Event;n&&n.prototype&&t.patchMethod(n.prototype,"stopImmediatePropagation",function(e){return function(t,n){t[U]=!0,e&&e.apply(t,n)}})}(e,t)}(e,n),function(e,t){var n="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video",r="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket".split(","),i=[],o=e.wtf,s=n.split(",");o?i=s.map(function(e){return"HTML"+e+"Element"}).concat(r):e.EventTarget?i.push("EventTarget"):i=r;for(var a=e.__Zone_disable_IE_check||!1,u=e.__Zone_enable_cross_context_check||!1,d=j(),p="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",f=0;f<ue.length;f++){var g=h+((w=ue[f])+l),v=h+(w+c);M[w]={},M[w][l]=g,M[w][c]=v}for(f=0;f<n.length;f++)for(var y=s[f],m=B[y]={},b=0;b<ue.length;b++){var w;m[w=ue[b]]=y+".addEventListener:"+w}var _=[];for(f=0;f<i.length;f++){var S=e[i[f]];_.push(S&&S.prototype)}L(e,_,{vh:function(e,t,n,r){if(!a&&d){if(u)try{var i;if("[object FunctionWrapper]"===(i=t.toString())||i==p)return e.apply(n,r),!1}catch(t){return e.apply(n,r),!1}else if("[object FunctionWrapper]"===(i=t.toString())||i==p)return e.apply(n,r),!1}else if(u)try{t.toString()}catch(t){return e.apply(n,r),!1}return!0}}),t.patchEventTarget=L}(e,n);var i=e.XMLHttpRequestEventTarget;i&&i.prototype&&n.patchEventTarget(e,[i.prototype]),D("MutationObserver"),D("WebKitMutationObserver"),D("IntersectionObserver"),D("FileReader")}),Zone.__load_patch("on_property",function(t,n,r){le(0,t),Object.defineProperty=function(e,t,n){if(Y(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);var r=n.configurable;return"prototype"!==t&&(n=X(e,t,n)),Q(e,t,n,r)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"!=typeof t||Object.isFrozen(t)||Object.keys(t).forEach(function(n){t[n]=X(e,n,t[n])}),J(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=W(e,t);return Y(e,t)&&(n.configurable=!1),n},function(n){if((x||F)&&"registerElement"in t.document){var r=document.registerElement,i=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(t,n){return n&&n.prototype&&i.forEach(function(t){var r,i,o,s,a="Document.registerElement::"+t,u=n.prototype;if(u.hasOwnProperty(t)){var c=e(u,t);c&&c.value?(c.value=d(c.value,a),s=(o=c).configurable,Q(r=n.prototype,i=t,o=X(r,i,o),s)):u[t]=d(u[t],a)}else u[t]&&(u[t]=d(u[t],a))}),r.call(document,t,n)},N(document.registerElement,r)}}()}),Zone.__load_patch("canvas",function(e){var t=e.HTMLCanvasElement;void 0!==t&&t.prototype&&t.prototype.toBlob&&function(e,n,r){var i=null;function o(e){var t=e.data;return t.args[t.cbIdx]=function(){e.invoke.apply(this,arguments)},i.apply(t.target,t.args),e}i=I(t.prototype,"toBlob",function(e){return function(t,n){var r=function(e,t){return{name:"HTMLCanvasElement.toBlob",target:e,cbIdx:0,args:t}}(t,n);return r.cbIdx>=0&&"function"==typeof n[r.cbIdx]?p(r.name,n[r.cbIdx],r,o,null):e.apply(t,n)}})}()}),Zone.__load_patch("XHR",function(e,t){!function(t){var c=XMLHttpRequest.prototype,l=c[a],h=c[u];if(!l){var d=e.XMLHttpRequestEventTarget;if(d){var f=d.prototype;l=f[a],h=f[u]}}var g="readystatechange",v="scheduled";function y(e){XMLHttpRequest[o]=!1;var t=e.data,r=t.target,s=r[i];l||(l=r[a],h=r[u]),s&&h.call(r,g,s);var c=r[i]=function(){r.readyState===r.DONE&&!t.aborted&&XMLHttpRequest[o]&&e.state===v&&e.invoke()};return l.call(r,g,c),r[n]||(r[n]=e),_.apply(r,t.args),XMLHttpRequest[o]=!0,e}function m(){}function b(e){var t=e.data;return t.aborted=!0,S.apply(t.target,t.args)}var w=I(c,"open",function(){return function(e,t){return e[r]=0==t[2],e[s]=t[1],w.apply(e,t)}}),_=I(c,"send",function(){return function(e,t){return e[r]?_.apply(e,t):p("XMLHttpRequest.send",m,{target:e,url:e[s],isPeriodic:!1,delay:null,args:t,aborted:!1},y,b)}}),S=I(c,"abort",function(){return function(e){var t=e[n];if(t&&"string"==typeof t.type){if(null==t.cancelFn||t.data&&t.data.aborted)return;t.zone.cancelTask(t)}}})}();var n=f("xhrTask"),r=f("xhrSync"),i=f("xhrListener"),o=f("xhrScheduled"),s=f("xhrURL")}),Zone.__load_patch("geolocation",function(t){t.navigator&&t.navigator.geolocation&&function(t,n){for(var r=t.constructor.name,i=function(i){var o=n[i],s=t[o];if(s){if(!_(e(t,o)))return"continue";t[o]=function(e){var t=function(){return e.apply(this,w(arguments,r+"."+o))};return N(t,e),t}(s)}},o=0;o<n.length;o++)i(o)}(t.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",function(e,t){function n(t){return function(n){K(e,t).forEach(function(r){var i=e.PromiseRejectionEvent;if(i){var o=new i(t,{promise:n.promise,reason:n.rejection});r.invoke(o)}})}}e.PromiseRejectionEvent&&(t[f("unhandledPromiseRejectionHandler")]=n("unhandledrejection"),t[f("rejectionHandledHandler")]=n("rejectionhandled"))})}()},"1TsA":function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},"2OiF":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},3:function(e,t,n){e.exports=n("zUnb")},"3Lyj":function(e,t,n){var r=n("KroJ");e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},"45Tv":function(e,t,n){var r=n("N6cJ"),i=n("y3w9"),o=n("OP3Y"),s=r.has,a=r.get,u=r.key,c=function(e,t,n){if(s(e,t,n))return a(e,t,n);var r=o(t);return null!==r?c(e,r,n):void 0};r.exp({getMetadata:function(e,t){return c(e,i(t),arguments.length<3?void 0:u(arguments[2]))}})},"49D4":function(e,t,n){var r=n("N6cJ"),i=n("y3w9"),o=r.key,s=r.set;r.exp({defineMetadata:function(e,t,n,r){s(e,t,i(n),o(r))}})},"4LiD":function(e,t,n){"use strict";var r=n("dyZX"),i=n("XKFU"),o=n("KroJ"),s=n("3Lyj"),a=n("Z6vF"),u=n("SlkY"),c=n("9gX7"),l=n("0/R4"),h=n("eeVq"),d=n("XMVh"),p=n("fyDq"),f=n("Xbzi");e.exports=function(e,t,n,g,v,y){var m=r[e],b=m,w=v?"set":"add",_=b&&b.prototype,S={},E=function(e){var t=_[e];o(_,e,"delete"==e?function(e){return!(y&&!l(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(y&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return y&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(y||_.forEach&&!h(function(){(new b).entries().next()}))){var x=new b,F=x[w](y?{}:-0,1)!=x,C=h(function(){x.has(1)}),A=d(function(e){new b(e)}),k=!y&&h(function(){for(var e=new b,t=5;t--;)e[w](t,t);return!e.has(-0)});A||((b=t(function(t,n){c(t,b,e);var r=f(new m,t,b);return void 0!=n&&u(n,v,r[w],r),r})).prototype=_,_.constructor=b),(C||k)&&(E("delete"),E("has"),v&&E("get")),(k||F)&&E(w),y&&_.clear&&delete _.clear}else b=g.getConstructor(t,e,v,w),s(b.prototype,n),a.NEED=!0;return p(b,e),S[e]=b,i(i.G+i.W+i.F*(b!=m),S),y||g.setStrong(b,e,v),b}},"4R4u":function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"6FMO":function(e,t,n){var r=n("0/R4"),i=n("EWmC"),o=n("K0xU")("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[o])&&(t=void 0)),void 0===t?Array:t}},"7Dlh":function(e,t,n){var r=n("N6cJ"),i=n("y3w9"),o=r.has,s=r.key;r.exp({hasOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},"9AAn":function(e,t,n){"use strict";var r=n("wmvG"),i=n("s5qY");e.exports=n("4LiD")("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(i(this,"Map"),0===e?0:e,t)}},r,!0)},"9gX7":function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},Afnz:function(e,t,n){"use strict";var r=n("LQAc"),i=n("XKFU"),o=n("KroJ"),s=n("Mukb"),a=n("hPIQ"),u=n("QaDb"),c=n("fyDq"),l=n("OP3Y"),h=n("K0xU")("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,f,g,v,y){u(n,t,f);var m,b,w,_=function(e){if(!d&&e in F)return F[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",E="values"==g,x=!1,F=e.prototype,C=F[h]||F["@@iterator"]||g&&F[g],A=C||_(g),k=g?E?_("entries"):A:void 0,T="Array"==t&&F.entries||C;if(T&&(w=l(T.call(new e)))!==Object.prototype&&w.next&&(c(w,S,!0),r||"function"==typeof w[h]||s(w,h,p)),E&&C&&"values"!==C.name&&(x=!0,A=function(){return C.call(this)}),r&&!y||!d&&!x&&F[h]||s(F,h,A),a[t]=A,a[S]=p,g)if(m={values:E?A:_("values"),keys:v?A:_("keys"),entries:k},y)for(b in m)b in F||o(F,b,m[b]);else i(i.P+i.F*(d||x),t,m);return m}},BqfV:function(e,t,n){var r=n("N6cJ"),i=n("y3w9"),o=r.get,s=r.key;r.exp({getOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},CkkT:function(e,t,n){var r=n("m0Pp"),i=n("Ymqv"),o=n("S/j/"),s=n("ne8i"),a=n("zRwo");e.exports=function(e,t){var n=1==e,u=2==e,c=3==e,l=4==e,h=6==e,d=5==e||h,p=t||a;return function(t,a,f){for(var g,v,y=o(t),m=i(y),b=r(a,f,3),w=s(m.length),_=0,S=n?p(t,w):u?p(t,0):void 0;w>_;_++)if((d||_ in m)&&(v=b(g=m[_],_,y),e))if(n)S[_]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return _;case 2:S.push(g)}else if(l)return!1;return h?-1:c||l?l:S}}},DVgA:function(e,t,n){var r=n("zhAb"),i=n("4R4u");e.exports=Object.keys||function(e){return r(e,i)}},EK0E:function(e,t,n){"use strict";var r,i=n("CkkT")(0),o=n("KroJ"),s=n("Z6vF"),a=n("czNK"),u=n("ZD67"),c=n("0/R4"),l=n("eeVq"),h=n("s5qY"),d=s.getWeak,p=Object.isExtensible,f=u.ufstore,g={},v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(e){if(c(e)){var t=d(e);return!0===t?f(h(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(h(this,"WeakMap"),e,t)}},m=e.exports=n("4LiD")("WeakMap",v,y,u,!0,!0);l(function(){return 7!=(new m).set((Object.freeze||Object)(g),7).get(g)})&&(a((r=u.getConstructor(v,"WeakMap")).prototype,y),s.NEED=!0,i(["delete","has","get","set"],function(e){var t=m.prototype,n=t[e];o(t,e,function(t,i){if(c(t)&&!p(t)){this._f||(this._f=new r);var o=this._f[e](t,i);return"set"==e?this:o}return n.call(this,t,i)})}))},EWmC:function(e,t,n){var r=n("LZWt");e.exports=Array.isArray||function(e){return"Array"==r(e)}},EemH:function(e,t,n){var r=n("UqcF"),i=n("RjD/"),o=n("aCFj"),s=n("apmT"),a=n("aagx"),u=n("xpql"),c=Object.getOwnPropertyDescriptor;t.f=n("nh4g")?c:function(e,t){if(e=o(e),t=s(t,!0),u)try{return c(e,t)}catch(e){}if(a(e,t))return i(!r.f.call(e,t),e[t])}},FJW5:function(e,t,n){var r=n("hswa"),i=n("y3w9"),o=n("DVgA");e.exports=n("nh4g")?Object.defineProperties:function(e,t){i(e);for(var n,s=o(t),a=s.length,u=0;a>u;)r.f(e,n=s[u++],t[n]);return e}},FZcq:function(e,t,n){n("49D4"),n("zq+C"),n("45Tv"),n("uAtd"),n("BqfV"),n("fN/3"),n("iW+S"),n("7Dlh"),n("Opxb"),e.exports=n("g3g5").Reflect},H6hf:function(e,t,n){var r=n("y3w9");e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},"I8a+":function(e,t,n){var r=n("LZWt"),i=n("K0xU")("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},Iw71:function(e,t,n){var r=n("0/R4"),i=n("dyZX").document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},"J+6e":function(e,t,n){var r=n("I8a+"),i=n("K0xU")("iterator"),o=n("hPIQ");e.exports=n("g3g5").getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||o[r(e)]}},JiEa:function(e,t){t.f=Object.getOwnPropertySymbols},K0xU:function(e,t,n){var r=n("VTer")("wks"),i=n("ylqs"),o=n("dyZX").Symbol,s="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=s&&o[e]||(s?o:i)("Symbol."+e))}).store=r},KroJ:function(e,t,n){var r=n("dyZX"),i=n("Mukb"),o=n("aagx"),s=n("ylqs")("src"),a=Function.toString,u=(""+a).split("toString");n("g3g5").inspectSource=function(e){return a.call(e)},(e.exports=function(e,t,n,a){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(c&&(o(n,s)||i(n,s,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:a?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||a.call(this)})},Kuth:function(e,t,n){var r=n("y3w9"),i=n("FJW5"),o=n("4R4u"),s=n("YTvA")("IE_PROTO"),a=function(){},u=function(){var e,t=n("Iw71")("iframe"),r=o.length;for(t.style.display="none",n("+rLv").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[o[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(a.prototype=r(e),n=new a,a.prototype=null,n[s]=e):n=u(),void 0===t?n:i(n,t)}},LQAc:function(e,t){e.exports=!1},LZWt:function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},M6Qj:function(e,t,n){var r=n("hPIQ"),i=n("K0xU")("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},Mukb:function(e,t,n){var r=n("hswa"),i=n("RjD/");e.exports=n("nh4g")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},N6cJ:function(e,t,n){var r=n("9AAn"),i=n("XKFU"),o=n("VTer")("metadata"),s=o.store||(o.store=new(n("EK0E"))),a=function(e,t,n){var i=s.get(e);if(!i){if(!n)return;s.set(e,i=new r)}var o=i.get(t);if(!o){if(!n)return;i.set(t,o=new r)}return o};e.exports={store:s,map:a,has:function(e,t,n){var r=a(t,n,!1);return void 0!==r&&r.has(e)},get:function(e,t,n){var r=a(t,n,!1);return void 0===r?void 0:r.get(e)},set:function(e,t,n,r){a(n,r,!0).set(e,t)},keys:function(e,t){var n=a(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},key:function(e){return void 0===e||"symbol"==typeof e?e:String(e)},exp:function(e){i(i.S,"Reflect",e)}}},OP3Y:function(e,t,n){var r=n("aagx"),i=n("S/j/"),o=n("YTvA")("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},Opxb:function(e,t,n){var r=n("N6cJ"),i=n("y3w9"),o=n("2OiF"),s=r.key,a=r.set;r.exp({metadata:function(e,t){return function(n,r){a(e,t,(void 0!==r?i:o)(n),s(r))}}})},Q3ne:function(e,t,n){var r=n("SlkY");e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},QaDb:function(e,t,n){"use strict";var r=n("Kuth"),i=n("RjD/"),o=n("fyDq"),s={};n("Mukb")(s,n("K0xU")("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(s,{next:i(1,n)}),o(e,t+" Iterator")}},RYi7:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},"RjD/":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"S/j/":function(e,t,n){var r=n("vhPU");e.exports=function(e){return Object(r(e))}},SlkY:function(e,t,n){var r=n("m0Pp"),i=n("H6hf"),o=n("M6Qj"),s=n("y3w9"),a=n("ne8i"),u=n("J+6e"),c={},l={};(t=e.exports=function(e,t,n,h,d){var p,f,g,v,y=d?function(){return e}:u(e),m=r(n,h,t?2:1),b=0;if("function"!=typeof y)throw TypeError(e+" is not iterable!");if(o(y)){for(p=a(e.length);p>b;b++)if((v=t?m(s(f=e[b])[0],f[1]):m(e[b]))===c||v===l)return v}else for(g=y.call(e);!(f=g.next()).done;)if((v=i(g,m,f.value,t))===c||v===l)return v}).BREAK=c,t.RETURN=l},T39b:function(e,t,n){"use strict";var r=n("wmvG"),i=n("s5qY");e.exports=n("4LiD")("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},UqcF:function(e,t){t.f={}.propertyIsEnumerable},VTer:function(e,t,n){var r=n("g3g5"),i=n("dyZX"),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("LQAc")?"pure":"global",copyright:"\xa9 2018 Denis Pushkarev (zloirock.ru)"})},XKFU:function(e,t,n){var r=n("dyZX"),i=n("g3g5"),o=n("Mukb"),s=n("KroJ"),a=n("m0Pp"),u=function(e,t,n){var c,l,h,d,p=e&u.F,f=e&u.G,g=e&u.P,v=e&u.B,y=f?r:e&u.S?r[t]||(r[t]={}):(r[t]||{}).prototype,m=f?i:i[t]||(i[t]={}),b=m.prototype||(m.prototype={});for(c in f&&(n=t),n)h=((l=!p&&y&&void 0!==y[c])?y:n)[c],d=v&&l?a(h,r):g&&"function"==typeof h?a(Function.call,h):h,y&&s(y,c,h,e&u.U),m[c]!=h&&o(m,c,d),g&&b[c]!=h&&(b[c]=h)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},XMVh:function(e,t,n){var r=n("K0xU")("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},e(o)}catch(e){}return n}},Xbzi:function(e,t,n){var r=n("0/R4"),i=n("i5dc").set;e.exports=function(e,t,n){var o,s=t.constructor;return s!==n&&"function"==typeof s&&(o=s.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},YTvA:function(e,t,n){var r=n("VTer")("keys"),i=n("ylqs");e.exports=function(e){return r[e]||(r[e]=i(e))}},Ymqv:function(e,t,n){var r=n("LZWt");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},Z6vF:function(e,t,n){var r=n("ylqs")("meta"),i=n("0/R4"),o=n("aagx"),s=n("hswa").f,a=0,u=Object.isExtensible||function(){return!0},c=!n("eeVq")(function(){return u(Object.preventExtensions({}))}),l=function(e){s(e,r,{value:{i:"O"+ ++a,w:{}}})},h=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,r)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[r].i},getWeak:function(e,t){if(!o(e,r)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[r].w},onFreeze:function(e){return c&&h.NEED&&u(e)&&!o(e,r)&&l(e),e}}},ZD67:function(e,t,n){"use strict";var r=n("3Lyj"),i=n("Z6vF").getWeak,o=n("y3w9"),s=n("0/R4"),a=n("9gX7"),u=n("SlkY"),c=n("CkkT"),l=n("aagx"),h=n("s5qY"),d=c(5),p=c(6),f=0,g=function(e){return e._l||(e._l=new v)},v=function(){this.a=[]},y=function(e,t){return d(e.a,function(e){return e[0]===t})};v.prototype={get:function(e){var t=y(this,e);if(t)return t[1]},has:function(e){return!!y(this,e)},set:function(e,t){var n=y(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=p(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,o){var c=e(function(e,r){a(e,c,t,"_i"),e._t=t,e._i=f++,e._l=void 0,void 0!=r&&u(r,n,e[o],e)});return r(c.prototype,{delete:function(e){if(!s(e))return!1;var n=i(e);return!0===n?g(h(this,t)).delete(e):n&&l(n,this._i)&&delete n[this._i]},has:function(e){if(!s(e))return!1;var n=i(e);return!0===n?g(h(this,t)).has(e):n&&l(n,this._i)}}),c},def:function(e,t,n){var r=i(o(t),!0);return!0===r?g(e).set(t,n):r[e._i]=n,e},ufstore:g}},aCFj:function(e,t,n){var r=n("Ymqv"),i=n("vhPU");e.exports=function(e){return r(i(e))}},aVe3:function(e,t){(function(){"use strict";var e=new function(){},t=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function n(e){var n=t.has(e);return e=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(e),!n&&e}function r(e){var t=e.isConnected;if(void 0!==t)return t;for(;e&&!(e.__CE_isImportDocument||e instanceof Document);)e=e.parentNode||(window.ShadowRoot&&e instanceof ShadowRoot?e.host:void 0);return!(!e||!(e.__CE_isImportDocument||e instanceof Document))}function i(e,t){for(;t&&t!==e&&!t.nextSibling;)t=t.parentNode;return t&&t!==e?t.nextSibling:null}function o(e,t,n){n=n||new Set;for(var r=e;r;){if(r.nodeType===Node.ELEMENT_NODE){var s=r;t(s);var a=s.localName;if("link"===a&&"import"===s.getAttribute("rel")){if((r=s.import)instanceof Node&&!n.has(r))for(n.add(r),r=r.firstChild;r;r=r.nextSibling)o(r,t,n);r=i(e,s);continue}if("template"===a){r=i(e,s);continue}if(s=s.__CE_shadowRoot)for(s=s.firstChild;s;s=s.nextSibling)o(s,t,n)}r=r.firstChild?r.firstChild:i(e,r)}}function s(e,t,n){e[t]=n}function a(){this.a=new Map,this.s=new Map,this.f=[],this.b=!1}function u(e,t){e.b=!0,e.f.push(t)}function c(e,t){e.b&&o(t,function(t){return l(e,t)})}function l(e,t){if(e.b&&!t.__CE_patched){t.__CE_patched=!0;for(var n=0;n<e.f.length;n++)e.f[n](t)}}function h(e,t){var n=[];for(o(t,function(e){return n.push(e)}),t=0;t<n.length;t++){var r=n[t];1===r.__CE_state?e.connectedCallback(r):f(e,r)}}function d(e,t){var n=[];for(o(t,function(e){return n.push(e)}),t=0;t<n.length;t++){var r=n[t];1===r.__CE_state&&e.disconnectedCallback(r)}}function p(e,t,n){var r=(n=n||{}).w||new Set,i=n.i||function(t){return f(e,t)},s=[];if(o(t,function(t){if("link"===t.localName&&"import"===t.getAttribute("rel")){var n=t.import;n instanceof Node&&(n.__CE_isImportDocument=!0,n.__CE_hasRegistry=!0),n&&"complete"===n.readyState?n.__CE_documentLoadHandled=!0:t.addEventListener("load",function(){var n=t.import;if(!n.__CE_documentLoadHandled){n.__CE_documentLoadHandled=!0;var o=new Set(r);o.delete(n),p(e,n,{w:o,i:i})}})}else s.push(t)},r),e.b)for(t=0;t<s.length;t++)l(e,s[t]);for(t=0;t<s.length;t++)i(s[t])}function f(e,t){if(void 0===t.__CE_state){var n=t.ownerDocument;if((n.defaultView||n.__CE_isImportDocument&&n.__CE_hasRegistry)&&(n=e.a.get(t.localName))){n.constructionStack.push(t);var i=n.constructor;try{try{if(new i!==t)throw Error("The custom element constructor did not produce the element being upgraded.")}finally{n.constructionStack.pop()}}catch(e){throw t.__CE_state=2,e}if(t.__CE_state=1,t.__CE_definition=n,n.attributeChangedCallback)for(n=n.observedAttributes,i=0;i<n.length;i++){var o=n[i],s=t.getAttribute(o);null!==s&&e.attributeChangedCallback(t,o,null,s,null)}r(t)&&e.connectedCallback(t)}}}function g(e,t){this.c=e,this.a=t,this.b=void 0,p(this.c,this.a),"loading"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function v(e){e.b&&e.b.disconnect()}function y(e){if(e.a)throw Error("Already resolved.");e.a=void 0,e.b&&e.b(void 0)}function m(e){this.j=!1,this.c=e,this.o=new Map,this.l=function(e){return e()},this.g=!1,this.m=[],this.u=new g(e,document)}a.prototype.connectedCallback=function(e){var t=e.__CE_definition;t.connectedCallback&&t.connectedCallback.call(e)},a.prototype.disconnectedCallback=function(e){var t=e.__CE_definition;t.disconnectedCallback&&t.disconnectedCallback.call(e)},a.prototype.attributeChangedCallback=function(e,t,n,r,i){var o=e.__CE_definition;o.attributeChangedCallback&&-1<o.observedAttributes.indexOf(t)&&o.attributeChangedCallback.call(e,t,n,r,i)},g.prototype.f=function(e){var t=this.a.readyState;for("interactive"!==t&&"complete"!==t||v(this),t=0;t<e.length;t++)for(var n=e[t].addedNodes,r=0;r<n.length;r++)p(this.c,n[r])},m.prototype.define=function(e,t){var r,i,o,s,a,u=this;if(!(t instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!n(e))throw new SyntaxError("The element name '"+e+"' is not valid.");if(this.c.a.get(e))throw Error("A custom element with name '"+e+"' has already been defined.");if(this.j)throw Error("A custom element is already being defined.");this.j=!0;try{var c=function(e){var t=l[e];if(void 0!==t&&!(t instanceof Function))throw Error("The '"+e+"' callback must be a function.");return t},l=t.prototype;if(!(l instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");r=c("connectedCallback"),i=c("disconnectedCallback"),o=c("adoptedCallback"),s=c("attributeChangedCallback"),a=t.observedAttributes||[]}catch(e){return}finally{this.j=!1}(function(e,t,n){e.a.set(t,n),e.s.set(n.constructor,n)})(this.c,e,t={localName:e,constructor:t,connectedCallback:r,disconnectedCallback:i,adoptedCallback:o,attributeChangedCallback:s,observedAttributes:a,constructionStack:[]}),this.m.push(t),this.g||(this.g=!0,this.l(function(){return function(e){if(!1!==e.g){e.g=!1;for(var t=e.m,n=[],r=new Map,i=0;i<t.length;i++)r.set(t[i].localName,[]);for(p(e.c,document,{i:function(t){if(void 0===t.__CE_state){var i=t.localName,o=r.get(i);o?o.push(t):e.c.a.get(i)&&n.push(t)}}}),i=0;i<n.length;i++)f(e.c,n[i]);for(;0<t.length;){i=(o=t.shift()).localName;for(var o=r.get(o.localName),s=0;s<o.length;s++)f(e.c,o[s]);(i=e.o.get(i))&&y(i)}}}(u)}))},m.prototype.i=function(e){p(this.c,e)},m.prototype.get=function(e){if(e=this.c.a.get(e))return e.constructor},m.prototype.whenDefined=function(e){if(!n(e))return Promise.reject(new SyntaxError("'"+e+"' is not a valid custom element name."));var t=this.o.get(e);return t?t.f:(t=new function(){var e=this;this.b=this.a=void 0,this.f=new Promise(function(t){e.b=t,e.a&&t(e.a)})},this.o.set(e,t),this.c.a.get(e)&&!this.m.some(function(t){return t.localName===e})&&y(t),t.f)},m.prototype.v=function(e){v(this.u);var t=this.l;this.l=function(n){return e(function(){return t(n)})}},window.CustomElementRegistry=m,m.prototype.define=m.prototype.define,m.prototype.upgrade=m.prototype.i,m.prototype.get=m.prototype.get,m.prototype.whenDefined=m.prototype.whenDefined,m.prototype.polyfillWrapFlushCallback=m.prototype.v;var b=window.Document.prototype.createElement,w=window.Document.prototype.createElementNS,_=window.Document.prototype.importNode,S=window.Document.prototype.prepend,E=window.Document.prototype.append,x=window.DocumentFragment.prototype.prepend,F=window.DocumentFragment.prototype.append,C=window.Node.prototype.cloneNode,A=window.Node.prototype.appendChild,k=window.Node.prototype.insertBefore,T=window.Node.prototype.removeChild,P=window.Node.prototype.replaceChild,D=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),I=window.Element.prototype.attachShadow,N=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),R=window.Element.prototype.getAttribute,O=window.Element.prototype.setAttribute,j=window.Element.prototype.removeAttribute,H=window.Element.prototype.getAttributeNS,M=window.Element.prototype.setAttributeNS,B=window.Element.prototype.removeAttributeNS,V=window.Element.prototype.insertAdjacentElement,U=window.Element.prototype.insertAdjacentHTML,L=window.Element.prototype.prepend,K=window.Element.prototype.append,q=window.Element.prototype.before,z=window.Element.prototype.after,Z=window.Element.prototype.replaceWith,W=window.Element.prototype.remove,J=window.HTMLElement,G=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),Y=window.HTMLElement.prototype.insertAdjacentElement,X=window.HTMLElement.prototype.insertAdjacentHTML;function Q(e,t,n){function i(t){return function(n){for(var i=[],o=0;o<arguments.length;++o)i[o-0]=arguments[o];o=[];for(var s=[],a=0;a<i.length;a++){var u=i[a];if(u instanceof Element&&r(u)&&s.push(u),u instanceof DocumentFragment)for(u=u.firstChild;u;u=u.nextSibling)o.push(u);else o.push(u)}for(t.apply(this,i),i=0;i<s.length;i++)d(e,s[i]);if(r(this))for(i=0;i<o.length;i++)(s=o[i])instanceof Element&&h(e,s)}}n.h&&(t.prepend=i(n.h)),n.append&&(t.append=i(n.append))}var $,ee=window.customElements;if(!ee||ee.forcePolyfill||"function"!=typeof ee.define||"function"!=typeof ee.get){var te=new a;$=te,window.HTMLElement=function(){function t(){var t=this.constructor;if(!(r=$.s.get(t)))throw Error("The custom element being constructed was not registered with `customElements`.");var n=r.constructionStack;if(!n.length)return n=b.call(document,r.localName),Object.setPrototypeOf(n,t.prototype),n.__CE_state=1,n.__CE_definition=r,l($,n),n;var r,i=n[r=n.length-1];if(i===e)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");return n[r]=e,Object.setPrototypeOf(i,t.prototype),l($,i),i}return t.prototype=J.prototype,t}(),function(){var e=te;s(Document.prototype,"createElement",function(t){if(this.__CE_hasRegistry){var n=e.a.get(t);if(n)return new n.constructor}return t=b.call(this,t),l(e,t),t}),s(Document.prototype,"importNode",function(t,n){return t=_.call(this,t,n),this.__CE_hasRegistry?p(e,t):c(e,t),t}),s(Document.prototype,"createElementNS",function(t,n){if(this.__CE_hasRegistry&&(null===t||"http://www.w3.org/1999/xhtml"===t)){var r=e.a.get(n);if(r)return new r.constructor}return t=w.call(this,t,n),l(e,t),t}),Q(e,Document.prototype,{h:S,append:E})}(),Q(te,DocumentFragment.prototype,{h:x,append:F}),function(){var e=te;function t(t,n){Object.defineProperty(t,"textContent",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(t){if(this.nodeType===Node.TEXT_NODE)n.set.call(this,t);else{var i=void 0;if(this.firstChild){var o=this.childNodes,s=o.length;if(0<s&&r(this)){i=Array(s);for(var a=0;a<s;a++)i[a]=o[a]}}if(n.set.call(this,t),i)for(t=0;t<i.length;t++)d(e,i[t])}}})}s(Node.prototype,"insertBefore",function(t,n){if(t instanceof DocumentFragment){var i=Array.prototype.slice.apply(t.childNodes);if(t=k.call(this,t,n),r(this))for(n=0;n<i.length;n++)h(e,i[n]);return t}return i=r(t),n=k.call(this,t,n),i&&d(e,t),r(this)&&h(e,t),n}),s(Node.prototype,"appendChild",function(t){if(t instanceof DocumentFragment){var n=Array.prototype.slice.apply(t.childNodes);if(t=A.call(this,t),r(this))for(var i=0;i<n.length;i++)h(e,n[i]);return t}return n=r(t),i=A.call(this,t),n&&d(e,t),r(this)&&h(e,t),i}),s(Node.prototype,"cloneNode",function(t){return t=C.call(this,t),this.ownerDocument.__CE_hasRegistry?p(e,t):c(e,t),t}),s(Node.prototype,"removeChild",function(t){var n=r(t),i=T.call(this,t);return n&&d(e,t),i}),s(Node.prototype,"replaceChild",function(t,n){if(t instanceof DocumentFragment){var i=Array.prototype.slice.apply(t.childNodes);if(t=P.call(this,t,n),r(this))for(d(e,n),n=0;n<i.length;n++)h(e,i[n]);return t}i=r(t);var o=P.call(this,t,n),s=r(this);return s&&d(e,n),i&&d(e,t),s&&h(e,t),o}),D&&D.get?t(Node.prototype,D):u(e,function(e){t(e,{enumerable:!0,configurable:!0,get:function(){for(var e=[],t=0;t<this.childNodes.length;t++)e.push(this.childNodes[t].textContent);return e.join("")},set:function(e){for(;this.firstChild;)T.call(this,this.firstChild);A.call(this,document.createTextNode(e))}})})}(),function(){var e=te;function t(t,n){Object.defineProperty(t,"innerHTML",{enumerable:n.enumerable,configurable:!0,get:n.get,set:function(t){var i=this,s=void 0;if(r(this)&&(s=[],o(this,function(e){e!==i&&s.push(e)})),n.set.call(this,t),s)for(var a=0;a<s.length;a++){var u=s[a];1===u.__CE_state&&e.disconnectedCallback(u)}return this.ownerDocument.__CE_hasRegistry?p(e,this):c(e,this),t}})}function n(t,n){s(t,"insertAdjacentElement",function(t,i){var o=r(i);return t=n.call(this,t,i),o&&d(e,i),r(t)&&h(e,i),t})}function i(t,n){function r(t,n){for(var r=[];t!==n;t=t.nextSibling)r.push(t);for(n=0;n<r.length;n++)p(e,r[n])}s(t,"insertAdjacentHTML",function(e,t){if("beforebegin"===(e=e.toLowerCase())){var i=this.previousSibling;n.call(this,e,t),r(i||this.parentNode.firstChild,this)}else if("afterbegin"===e)i=this.firstChild,n.call(this,e,t),r(this.firstChild,i);else if("beforeend"===e)i=this.lastChild,n.call(this,e,t),r(i||this.firstChild,null);else{if("afterend"!==e)throw new SyntaxError("The value provided ("+String(e)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");i=this.nextSibling,n.call(this,e,t),r(this.nextSibling,i)}})}I&&s(Element.prototype,"attachShadow",function(e){return this.__CE_shadowRoot=I.call(this,e)}),N&&N.get?t(Element.prototype,N):G&&G.get?t(HTMLElement.prototype,G):u(e,function(e){t(e,{enumerable:!0,configurable:!0,get:function(){return C.call(this,!0).innerHTML},set:function(e){var t="template"===this.localName,n=t?this.content:this,r=w.call(document,this.namespaceURI,this.localName);for(r.innerHTML=e;0<n.childNodes.length;)T.call(n,n.childNodes[0]);for(e=t?r.content:r;0<e.childNodes.length;)A.call(n,e.childNodes[0])}})}),s(Element.prototype,"setAttribute",function(t,n){if(1!==this.__CE_state)return O.call(this,t,n);var r=R.call(this,t);O.call(this,t,n),n=R.call(this,t),e.attributeChangedCallback(this,t,r,n,null)}),s(Element.prototype,"setAttributeNS",function(t,n,r){if(1!==this.__CE_state)return M.call(this,t,n,r);var i=H.call(this,t,n);M.call(this,t,n,r),r=H.call(this,t,n),e.attributeChangedCallback(this,n,i,r,t)}),s(Element.prototype,"removeAttribute",function(t){if(1!==this.__CE_state)return j.call(this,t);var n=R.call(this,t);j.call(this,t),null!==n&&e.attributeChangedCallback(this,t,n,null,null)}),s(Element.prototype,"removeAttributeNS",function(t,n){if(1!==this.__CE_state)return B.call(this,t,n);var r=H.call(this,t,n);B.call(this,t,n);var i=H.call(this,t,n);r!==i&&e.attributeChangedCallback(this,n,r,i,t)}),Y?n(HTMLElement.prototype,Y):V?n(Element.prototype,V):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched."),X?i(HTMLElement.prototype,X):U?i(Element.prototype,U):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched."),Q(e,Element.prototype,{h:L,append:K}),function(e){var t=Element.prototype;function n(t){return function(n){for(var i=[],o=0;o<arguments.length;++o)i[o-0]=arguments[o];o=[];for(var s=[],a=0;a<i.length;a++){var u=i[a];if(u instanceof Element&&r(u)&&s.push(u),u instanceof DocumentFragment)for(u=u.firstChild;u;u=u.nextSibling)o.push(u);else o.push(u)}for(t.apply(this,i),i=0;i<s.length;i++)d(e,s[i]);if(r(this))for(i=0;i<o.length;i++)(s=o[i])instanceof Element&&h(e,s)}}q&&(t.before=n(q)),q&&(t.after=n(z)),Z&&s(t,"replaceWith",function(t){for(var n=[],i=0;i<arguments.length;++i)n[i-0]=arguments[i];i=[];for(var o=[],s=0;s<n.length;s++){var a=n[s];if(a instanceof Element&&r(a)&&o.push(a),a instanceof DocumentFragment)for(a=a.firstChild;a;a=a.nextSibling)i.push(a);else i.push(a)}for(s=r(this),Z.apply(this,n),n=0;n<o.length;n++)d(e,o[n]);if(s)for(d(e,this),n=0;n<i.length;n++)(o=i[n])instanceof Element&&h(e,o)}),W&&s(t,"remove",function(){var t=r(this);W.call(this),t&&d(e,this)})}(e)}(),document.__CE_hasRegistry=!0;var ne=new m(te);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:ne})}}).call(self)},aagx:function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},apmT:function(e,t,n){var r=n("0/R4");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},crnd:function(e,t){function n(e){return Promise.resolve().then(function(){var t=new Error('Cannot find module "'+e+'".');throw t.code="MODULE_NOT_FOUND",t})}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id="crnd"},czNK:function(e,t,n){"use strict";var r=n("DVgA"),i=n("JiEa"),o=n("UqcF"),s=n("S/j/"),a=n("Ymqv"),u=Object.assign;e.exports=!u||n("eeVq")(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r})?function(e,t){for(var n=s(e),u=arguments.length,c=1,l=i.f,h=o.f;u>c;)for(var d,p=a(arguments[c++]),f=l?r(p).concat(l(p)):r(p),g=f.length,v=0;g>v;)h.call(p,d=f[v++])&&(n[d]=p[d]);return n}:u},"d/Gc":function(e,t,n){var r=n("RYi7"),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},dyZX:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},eeVq:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},elZq:function(e,t,n){"use strict";var r=n("dyZX"),i=n("hswa"),o=n("nh4g"),s=n("K0xU")("species");e.exports=function(e){var t=r[e];o&&t&&!t[s]&&i.f(t,s,{configurable:!0,get:function(){return this}})}},"fN/3":function(e,t,n){var r=n("N6cJ"),i=n("y3w9"),o=r.keys,s=r.key;r.exp({getOwnMetadataKeys:function(e){return o(i(e),arguments.length<2?void 0:s(arguments[1]))}})},fyDq:function(e,t,n){var r=n("hswa").f,i=n("aagx"),o=n("K0xU")("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},g3g5:function(e,t){var n=e.exports={version:"2.5.6"};"number"==typeof __e&&(__e=n)},"hN/g":function(e,t,n){"use strict";n.r(t),n("FZcq"),n("0TWp"),n("s1Zv"),n("aVe3")},hPIQ:function(e,t){e.exports={}},hswa:function(e,t,n){var r=n("y3w9"),i=n("xpql"),o=n("apmT"),s=Object.defineProperty;t.f=n("nh4g")?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},i5dc:function(e,t,n){var r=n("0/R4"),i=n("y3w9"),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n("m0Pp")(Function.call,n("EemH").f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},"iW+S":function(e,t,n){var r=n("N6cJ"),i=n("y3w9"),o=n("OP3Y"),s=r.has,a=r.key,u=function(e,t,n){if(s(e,t,n))return!0;var r=o(t);return null!==r&&u(e,r,n)};r.exp({hasMetadata:function(e,t){return u(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},lW0m:function(e,t){var n={userAgent:!1},r={};if(void 0===i)var i={};i.lang={extend:function(e,t,r){if(!t||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t),r){var o;for(o in r)e.prototype[o]=r[o];var s=function(){},a=["toString","valueOf"];try{/MSIE/.test(n.userAgent)&&(s=function(e,t){for(o=0;o<a.length;o+=1){var n=a[o],r=t[n];"function"==typeof r&&r!=Object.prototype[n]&&(e[n]=r)}})}catch(e){}s(e.prototype,r)}}};var o,s,a,u,c,l,h,d,p,f,g,v=v||(o=Math,a=(s={}).lib={},u=a.Base=function(){function e(){}return{extend:function(t){e.prototype=this;var n=new e;return t&&n.mixIn(t),n.hasOwnProperty("init")||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=a.WordArray=u.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:4*e.length},toString:function(e){return(e||h).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++)t[r+o>>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(r+o)%4*8;else for(o=0;o<i;o+=4)t[r+o>>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=o.ceil(t/4)},clone:function(){var e=u.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(4294967296*o.random()|0);return new c.init(t,e)}}),l=s.enc={},h=l.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(n,t/2)}},d=l.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++)r.push(String.fromCharCode(t[i>>>2]>>>24-i%4*8&255));return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(n,t)}},p=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},f=a.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,n=t.words,r=t.sigBytes,i=this.blockSize,s=r/(4*i),a=(s=e?o.ceil(s):o.max((0|s)-this._minBufferSize,0))*i,u=o.min(4*a,r);if(a){for(var l=0;l<a;l+=i)this._doProcessBlock(n,l);var h=n.splice(0,a);t.sigBytes-=u}return new c.init(h,u)},clone:function(){var e=u.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),a.Hasher=f.extend({cfg:u.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){f.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new g.HMAC.init(e,n).finalize(t)}}}),g=s.algo={},s);!function(e){var t,n=(t=v).lib,r=n.Base,i=n.WordArray;(t=t.x64={}).Word=r.extend({init:function(e,t){this.high=e,this.low=t}}),t.WordArray=r.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=void 0!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var o=e[r];n.push(o.high),n.push(o.low)}return i.create(n,this.sigBytes)},clone:function(){for(var e=r.clone.call(this),t=e.words=this.words.slice(0),n=t.length,i=0;i<n;i++)t[i]=t[i].clone();return e}})}(),function(){var e=v.lib.WordArray;v.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp(),e=[];for(var i=0;i<n;i+=3)for(var o=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;4>s&&i+.75*s<n;s++)e.push(r.charAt(o>>>6*(3-s)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(t){var n=t.length,r=this._map;(i=r.charAt(64))&&-1!=(i=t.indexOf(i))&&(n=i);for(var i=[],o=0,s=0;s<n;s++)if(s%4){var a=r.indexOf(t.charAt(s-1))<<s%4*2,u=r.indexOf(t.charAt(s))>>>6-s%4*2;i[o>>>2]|=(a|u)<<24-o%4*8,o++}return e.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){for(var t=v,n=(i=t.lib).WordArray,r=i.Hasher,i=t.algo,o=[],s=[],a=function(e){return 4294967296*(e-(0|e))|0},u=2,c=0;64>c;){var l;e:{for(var h=e.sqrt(l=u),d=2;d<=h;d++)if(!(l%d)){l=!1;break e}l=!0}l&&(8>c&&(o[c]=a(e.pow(u,.5))),s[c]=a(e.pow(u,1/3)),c++),u++}var p=[];i=i.SHA256=r.extend({_doReset:function(){this._hash=new n.init(o.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],u=n[4],c=n[5],l=n[6],h=n[7],d=0;64>d;d++){if(16>d)p[d]=0|e[t+d];else{var f=p[d-15],g=p[d-2];p[d]=((f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3)+p[d-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+p[d-16]}f=h+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&l)+s[d]+p[d],g=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&o^i&o),h=l,l=c,c=u,u=a+f|0,a=o,o=i,i=r,r=f+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+h|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA256=r._createHelper(i),t.HmacSHA256=r._createHmacHelper(i)}(Math),function(){function e(){return r.create.apply(r,arguments)}for(var t=v,n=t.lib.Hasher,r=(o=t.x64).Word,i=o.WordArray,o=t.algo,s=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],a=[],u=0;80>u;u++)a[u]=e();o=o.SHA512=n.extend({_doReset:function(){this._hash=new i.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n,r=(n=this._hash.words)[0],i=n[1],o=n[2],u=n[3],c=n[4],l=n[5],h=n[6],d=r.high,p=r.low,f=i.high,g=i.low,v=o.high,y=o.low,m=u.high,b=u.low,w=c.high,_=c.low,S=l.high,E=l.low,x=h.high,F=h.low,C=(n=n[7]).high,A=n.low,k=d,T=p,P=f,D=g,I=v,N=y,R=m,O=b,j=w,H=_,M=S,B=E,V=x,U=F,L=C,K=A,q=0;80>q;q++){var z=a[q];if(16>q)var Z=z.high=0|e[t+2*q],W=z.low=0|e[t+2*q+1];else{Z=((W=(Z=a[q-15]).high)>>>1|(J=Z.low)<<31)^(W>>>8|J<<24)^W>>>7;var J=(J>>>1|W<<31)^(J>>>8|W<<24)^(J>>>7|W<<25),G=((W=(G=a[q-2]).high)>>>19|(Y=G.low)<<13)^(W<<3|Y>>>29)^W>>>6,Y=(Y>>>19|W<<13)^(Y<<3|W>>>29)^(Y>>>6|W<<26),X=(Q=a[q-16]).high,Q=Q.low;z.high=Z=(Z=(Z=Z+($=(W=a[q-7]).high)+((W=J+W.low)>>>0<J>>>0?1:0))+G+((W+=Y)>>>0<Y>>>0?1:0))+X+((W+=Q)>>>0<Q>>>0?1:0),z.low=W}var $=j&M^~j&V,ee=(Q=H&B^~H&U,z=k&P^k&I^P&I,J=(k>>>28|T<<4)^(k<<30|T>>>2)^(k<<25|T>>>7),G=(T>>>28|k<<4)^(T<<30|k>>>2)^(T<<25|k>>>7),(Y=s[q]).high),te=Y.low;X=(X=(X=(X=L+((j>>>14|H<<18)^(j>>>18|H<<14)^(j<<23|H>>>9))+((Y=K+((H>>>14|j<<18)^(H>>>18|j<<14)^(H<<23|j>>>9)))>>>0<K>>>0?1:0))+$+((Y+=Q)>>>0<Q>>>0?1:0))+ee+((Y+=te)>>>0<te>>>0?1:0))+Z+((Y+=W)>>>0<W>>>0?1:0),z=J+z+((W=G+(T&D^T&N^D&N))>>>0<G>>>0?1:0),L=V,K=U,V=M,U=B,M=j,B=H,j=R+X+((H=O+Y|0)>>>0<O>>>0?1:0)|0,R=I,O=N,I=P,N=D,P=k,D=T,k=X+z+((T=Y+W|0)>>>0<Y>>>0?1:0)|0}p=r.low=p+T,r.high=d+k+(p>>>0<T>>>0?1:0),g=i.low=g+D,i.high=f+P+(g>>>0<D>>>0?1:0),y=o.low=y+N,o.high=v+I+(y>>>0<N>>>0?1:0),b=u.low=b+O,u.high=m+R+(b>>>0<O>>>0?1:0),_=c.low=_+H,c.high=w+j+(_>>>0<H>>>0?1:0),E=l.low=E+B,l.high=S+M+(E>>>0<B>>>0?1:0),F=h.low=F+U,h.high=x+V+(F>>>0<U>>>0?1:0),A=n.low=A+K,n.high=C+L+(A>>>0<K>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32}),t.SHA512=n._createHelper(o),t.HmacSHA512=n._createHmacHelper(o)}(),function(){var e=v,t=(i=e.x64).Word,n=i.WordArray,r=(i=e.algo).SHA512,i=i.SHA384=r.extend({_doReset:function(){this._hash=new n.init([new t.init(3418070365,3238371032),new t.init(1654270250,914150663),new t.init(2438529370,812702999),new t.init(355462360,4144912697),new t.init(1731405415,4290775857),new t.init(2394180231,1750603025),new t.init(3675008525,1694076839),new t.init(1203062813,3204075428)])},_doFinalize:function(){var e=r._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=r._createHelper(i),e.HmacSHA384=r._createHmacHelper(i)}();var y,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b="=";function w(e){var t,n,r="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),r+=m.charAt(n>>6)+m.charAt(63&n);if(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),r+=m.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),r+=m.charAt(n>>2)+m.charAt((3&n)<<4)),b)for(;(3&r.length)>0;)r+=b;return r}function _(e){var t,n,r,i="",o=0;for(t=0;t<e.length&&e.charAt(t)!=b;++t)(r=m.indexOf(e.charAt(t)))<0||(0==o?(i+=T(r>>2),n=3&r,o=1):1==o?(i+=T(n<<2|r>>4),n=15&r,o=2):2==o?(i+=T(n),i+=T(r>>2),n=3&r,o=3):(i+=T(n<<2|r>>4),i+=T(15&r),o=0));return 1==o&&(i+=T(n<<2)),i}function S(e){var t,n=_(e),r=new Array;for(t=0;2*t<n.length;++t)r[t]=parseInt(n.substring(2*t,2*t+2),16);return r}function E(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):this.fromString(e,null==t&&"string"!=typeof e?256:t))}function x(){return new E(null)}"Microsoft Internet Explorer"==n.appName?(E.prototype.am=function(e,t,n,r,i,o){for(var s=32767&t,a=t>>15;--o>=0;){var u=32767&this[e],c=this[e++]>>15,l=a*u+c*s;i=((u=s*u+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+a*c+(i>>>30),n[r++]=1073741823&u}return i},y=30):"Netscape"!=n.appName?(E.prototype.am=function(e,t,n,r,i,o){for(;--o>=0;){var s=t*this[e++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},y=26):(E.prototype.am=function(e,t,n,r,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var u=16383&this[e],c=this[e++]>>14,l=a*u+c*s;i=((u=s*u+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+a*c,n[r++]=268435455&u}return i},y=28),E.prototype.DB=y,E.prototype.DM=(1<<y)-1,E.prototype.DV=1<<y,E.prototype.FV=Math.pow(2,52),E.prototype.F1=52-y,E.prototype.F2=2*y-52;var F,C,A="0123456789abcdefghijklmnopqrstuvwxyz",k=new Array;for(F="0".charCodeAt(0),C=0;C<=9;++C)k[F++]=C;for(F="a".charCodeAt(0),C=10;C<36;++C)k[F++]=C;for(F="A".charCodeAt(0),C=10;C<36;++C)k[F++]=C;function T(e){return A.charAt(e)}function P(e,t){var n=k[e.charCodeAt(t)];return null==n?-1:n}function D(e){var t=x();return t.fromInt(e),t}function I(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function N(e){this.m=e}function R(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function O(e,t){return e&t}function j(e,t){return e|t}function H(e,t){return e^t}function M(e,t){return e&~t}function B(e){if(0==e)return-1;var t=0;return 0==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function V(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function U(){}function L(e){return e}function K(e){this.r2=x(),this.q3=x(),E.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}N.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},N.prototype.revert=function(e){return e},N.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},N.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},N.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},R.prototype.convert=function(e){var t=x();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(E.ZERO)>0&&this.m.subTo(t,t),t},R.prototype.revert=function(e){var t=x();return e.copyTo(t),this.reduce(t),t},R.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},R.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},R.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},E.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},E.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},E.prototype.fromString=function(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(256==t)n=8;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return void this.fromRadix(e,t);n=2}this.t=0,this.s=0;for(var r=e.length,i=!1,o=0;--r>=0;){var s=8==n?255&e[r]:P(e,r);s<0?"-"==e.charAt(r)&&(i=!0):(i=!1,0==o?this[this.t++]=s:o+n>this.DB?(this[this.t-1]|=(s&(1<<this.DB-o)-1)<<o,this[this.t++]=s>>this.DB-o):this[this.t-1]|=s<<o,(o+=n)>=this.DB&&(o-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),i&&E.ZERO.subTo(this,this)},E.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},E.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},E.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},E.prototype.lShiftTo=function(e,t){var n,r=e%this.DB,i=this.DB-r,o=(1<<i)-1,s=Math.floor(e/this.DB),a=this.s<<r&this.DM;for(n=this.t-1;n>=0;--n)t[n+s+1]=this[n]>>i|a,a=(this[n]&o)<<r;for(n=s-1;n>=0;--n)t[n]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},E.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var s=n+1;s<this.t;++s)t[s-n-1]|=(this[s]&o)<<i,t[s-n]=this[s]>>r;r>0&&(t[this.t-n-1]|=(this.s&o)<<i),t.t=this.t-n,t.clamp()}},E.prototype.subTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},E.prototype.multiplyTo=function(e,t){var n=this.abs(),r=e.abs(),i=n.t;for(t.t=i+r.t;--i>=0;)t[i]=0;for(i=0;i<r.t;++i)t[i+n.t]=n.am(0,r[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&E.ZERO.subTo(t,t)},E.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;--n>=0;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},E.prototype.divRemTo=function(e,t,n){var r=e.abs();if(!(r.t<=0)){var i=this.abs();if(i.t<r.t)return null!=t&&t.fromInt(0),void(null!=n&&this.copyTo(n));null==n&&(n=x());var o=x(),s=this.s,a=e.s,u=this.DB-I(r[r.t-1]);u>0?(r.lShiftTo(u,o),i.lShiftTo(u,n)):(r.copyTo(o),i.copyTo(n));var c=o.t,l=o[c-1];if(0!=l){var h=l*(1<<this.F1)+(c>1?o[c-2]>>this.F2:0),d=this.FV/h,p=(1<<this.F1)/h,f=1<<this.F2,g=n.t,v=g-c,y=null==t?x():t;for(o.dlShiftTo(v,y),n.compareTo(y)>=0&&(n[n.t++]=1,n.subTo(y,n)),E.ONE.dlShiftTo(c,y),y.subTo(o,o);o.t<c;)o[o.t++]=0;for(;--v>=0;){var m=n[--g]==l?this.DM:Math.floor(n[g]*d+(n[g-1]+f)*p);if((n[g]+=o.am(0,m,n,v,0,c))<m)for(o.dlShiftTo(v,y),n.subTo(y,n);n[g]<--m;)n.subTo(y,n)}null!=t&&(n.drShiftTo(c,t),s!=a&&E.ZERO.subTo(t,t)),n.t=c,n.clamp(),u>0&&n.rShiftTo(u,n),s<0&&E.ZERO.subTo(n,n)}}},E.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},E.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},E.prototype.exp=function(e,t){if(e>4294967295||e<1)return E.ONE;var n=x(),r=x(),i=t.convert(this),o=I(e)-1;for(i.copyTo(n);--o>=0;)if(t.sqrTo(n,r),(e&1<<o)>0)t.mulTo(r,i,n);else{var s=n;n=r,r=s}return t.revert(n)},E.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<<t)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%t;if(s-- >0)for(a<this.DB&&(n=this[s]>>a)>0&&(i=!0,o=T(n));s>=0;)a<t?(n=(this[s]&(1<<a)-1)<<t-a,n|=this[--s]>>(a+=this.DB-t)):(n=this[s]>>(a-=t)&r,a<=0&&(a+=this.DB,--s)),n>0&&(i=!0),i&&(o+=T(n));return i?o:"0"},E.prototype.negate=function(){var e=x();return E.ZERO.subTo(this,e),e},E.prototype.abs=function(){return this.s<0?this.negate():this},E.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},E.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+I(this[this.t-1]^this.s&this.DM)},E.prototype.mod=function(e){var t=x();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(E.ZERO)>0&&e.subTo(t,t),t},E.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new N(t):new R(t),this.exp(e,n)},E.ZERO=D(0),E.ONE=D(1),U.prototype.convert=L,U.prototype.revert=L,U.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},U.prototype.sqrTo=function(e,t){e.squareTo(t)},K.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=x();return e.copyTo(t),this.reduce(t),t},K.prototype.revert=function(e){return e},K.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},K.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},K.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var q=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],z=(1<<26)/q[q.length-1];function Z(){this.i=0,this.j=0,this.S=new Array}E.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},E.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=D(n),i=x(),o=x(),s="";for(this.divRemTo(r,i,o);i.signum()>0;)s=(n+o.intValue()).toString(e).substr(1)+s,i.divRemTo(r,i,o);return o.intValue().toString(e)+s},E.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),r=Math.pow(t,n),i=!1,o=0,s=0,a=0;a<e.length;++a){var u=P(e,a);u<0?"-"==e.charAt(a)&&0==this.signum()&&(i=!0):(s=t*s+u,++o>=n&&(this.dMultiply(r),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(s,0)),i&&E.ZERO.subTo(this,this)},E.prototype.fromNumber=function(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(E.ONE.shiftLeft(e-1),j,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(E.ONE.shiftLeft(e-1),this);else{var r=new Array,i=7&e;r.length=1+(e>>3),t.nextBytes(r),i>0?r[0]&=(1<<i)-1:r[0]=0,this.fromString(r,256)}},E.prototype.bitwiseTo=function(e,t,n){var r,i,o=Math.min(e.t,this.t);for(r=0;r<o;++r)n[r]=t(this[r],e[r]);if(e.t<this.t){for(i=e.s&this.DM,r=o;r<this.t;++r)n[r]=t(this[r],i);n.t=this.t}else{for(i=this.s&this.DM,r=o;r<e.t;++r)n[r]=t(i,e[r]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},E.prototype.changeBit=function(e,t){var n=E.ONE.shiftLeft(e);return this.bitwiseTo(n,t,n),n},E.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},E.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},E.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},E.prototype.multiplyLowerTo=function(e,t,n){var r,i=Math.min(this.t+e.t,t);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(r=n.t-this.t;i<r;++i)n[i+this.t]=this.am(0,e[i],n,i,0,this.t);for(r=Math.min(e.t,t);i<r;++i)this.am(0,e[i],n,i,0,t-i);n.clamp()},E.prototype.multiplyUpperTo=function(e,t,n){var r=n.t=this.t+e.t- --t;for(n.s=0;--r>=0;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},E.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},E.prototype.millerRabin=function(e){var t=this.subtract(E.ONE),n=t.getLowestSetBit();if(n<=0)return!1;var r=t.shiftRight(n);(e=e+1>>1)>q.length&&(e=q.length);for(var i=x(),o=0;o<e;++o){i.fromInt(q[Math.floor(Math.random()*q.length)]);var s=i.modPow(r,this);if(0!=s.compareTo(E.ONE)&&0!=s.compareTo(t)){for(var a=1;a++<n&&0!=s.compareTo(t);)if(0==(s=s.modPowInt(2,this)).compareTo(E.ONE))return!1;if(0!=s.compareTo(t))return!1}}return!0},E.prototype.clone=function(){var e=x();return this.copyTo(e),e},E.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},E.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},E.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},E.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},E.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var n,r=this.DB-e*this.DB%8,i=0;if(e-- >0)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<<this.DB-r);e>=0;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t},E.prototype.equals=function(e){return 0==this.compareTo(e)},E.prototype.min=function(e){return this.compareTo(e)<0?this:e},E.prototype.max=function(e){return this.compareTo(e)>0?this:e},E.prototype.and=function(e){var t=x();return this.bitwiseTo(e,O,t),t},E.prototype.or=function(e){var t=x();return this.bitwiseTo(e,j,t),t},E.prototype.xor=function(e){var t=x();return this.bitwiseTo(e,H,t),t},E.prototype.andNot=function(e){var t=x();return this.bitwiseTo(e,M,t),t},E.prototype.not=function(){for(var e=x(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},E.prototype.shiftLeft=function(e){var t=x();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},E.prototype.shiftRight=function(e){var t=x();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},E.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(0!=this[e])return e*this.DB+B(this[e]);return this.s<0?this.t*this.DB:-1},E.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=V(this[n]^t);return e},E.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},E.prototype.setBit=function(e){return this.changeBit(e,j)},E.prototype.clearBit=function(e){return this.changeBit(e,M)},E.prototype.flipBit=function(e){return this.changeBit(e,H)},E.prototype.add=function(e){var t=x();return this.addTo(e,t),t},E.prototype.subtract=function(e){var t=x();return this.subTo(e,t),t},E.prototype.multiply=function(e){var t=x();return this.multiplyTo(e,t),t},E.prototype.divide=function(e){var t=x();return this.divRemTo(e,t,null),t},E.prototype.remainder=function(e){var t=x();return this.divRemTo(e,null,t),t},E.prototype.divideAndRemainder=function(e){var t=x(),n=x();return this.divRemTo(e,t,n),new Array(t,n)},E.prototype.modPow=function(e,t){var n,r,i=e.bitLength(),o=D(1);if(i<=0)return o;n=i<18?1:i<48?3:i<144?4:i<768?5:6,r=i<8?new N(t):t.isEven()?new K(t):new R(t);var s=new Array,a=3,u=n-1,c=(1<<n)-1;if(s[1]=r.convert(this),n>1){var l=x();for(r.sqrTo(s[1],l);a<=c;)s[a]=x(),r.mulTo(l,s[a-2],s[a]),a+=2}var h,d,p=e.t-1,f=!0,g=x();for(i=I(e[p])-1;p>=0;){for(i>=u?h=e[p]>>i-u&c:(h=(e[p]&(1<<i+1)-1)<<u-i,p>0&&(h|=e[p-1]>>this.DB+i-u)),a=n;0==(1&h);)h>>=1,--a;if((i-=a)<0&&(i+=this.DB,--p),f)s[h].copyTo(o),f=!1;else{for(;a>1;)r.sqrTo(o,g),r.sqrTo(g,o),a-=2;a>0?r.sqrTo(o,g):(d=o,o=g,g=d),r.mulTo(g,s[h],o)}for(;p>=0&&0==(e[p]&1<<i);)r.sqrTo(o,g),d=o,o=g,g=d,--i<0&&(i=this.DB-1,--p)}return r.revert(o)},E.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return E.ZERO;for(var n=e.clone(),r=this.clone(),i=D(1),o=D(0),s=D(0),a=D(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),t?(i.isEven()&&o.isEven()||(i.addTo(this,i),o.subTo(e,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;r.isEven();)r.rShiftTo(1,r),t?(s.isEven()&&a.isEven()||(s.addTo(this,s),a.subTo(e,a)),s.rShiftTo(1,s)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);n.compareTo(r)>=0?(n.subTo(r,n),t&&i.subTo(s,i),o.subTo(a,o)):(r.subTo(n,r),t&&s.subTo(i,s),a.subTo(o,a))}return 0!=r.compareTo(E.ONE)?E.ZERO:a.compareTo(e)>=0?a.subtract(e):a.signum()<0?(a.addTo(e,a),a.signum()<0?a.add(e):a):a},E.prototype.pow=function(e){return this.exp(e,new U)},E.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return t;for(i<o&&(o=i),o>0&&(t.rShiftTo(o,t),n.rShiftTo(o,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},E.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=q[q.length-1]){for(t=0;t<q.length;++t)if(n[0]==q[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<q.length;){for(var r=q[t],i=t+1;i<q.length&&r<z;)r*=q[i++];for(r=n.modInt(r);t<i;)if(r%q[t++]==0)return!1}return n.millerRabin(e)},E.prototype.square=function(){var e=x();return this.squareTo(e),e},Z.prototype.init=function(e){var t,n,r;for(t=0;t<256;++t)this.S[t]=t;for(n=0,t=0;t<256;++t)r=this.S[t],this.S[t]=this.S[n=n+this.S[t]+e[t%e.length]&255],this.S[n]=r;this.i=0,this.j=0},Z.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var W,J,G,Y=256;function X(){var e;e=(new Date).getTime(),J[G++]^=255&e,J[G++]^=e>>8&255,J[G++]^=e>>16&255,J[G++]^=e>>24&255,G>=Y&&(G-=Y)}if(null==J){var Q;if(J=new Array,G=0,void 0!==r&&(void 0!==r.crypto||void 0!==r.msCrypto)){var $=r.crypto||r.msCrypto;if($.getRandomValues){var ee=new Uint8Array(32);for($.getRandomValues(ee),Q=0;Q<32;++Q)J[G++]=ee[Q]}else if("Netscape"==n.appName&&n.appVersion<"5"){var te=r.crypto.random(32);for(Q=0;Q<te.length;++Q)J[G++]=255&te.charCodeAt(Q)}}for(;G<Y;)Q=Math.floor(65536*Math.random()),J[G++]=Q>>>8,J[G++]=255&Q;G=0,X()}function ne(){if(null==W){for(X(),(W=new Z).init(J),G=0;G<J.length;++G)J[G]=0;G=0}return W.next()}function re(){}function ie(e,t){return new E(e,t)}function oe(e,t,n){for(var r="",i=0;r.length<t;)r+=n(String.fromCharCode.apply(String,e.concat([(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return r}function se(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function ae(e,t){this.x=t,this.q=e}function ue(e,t,n,r){this.curve=e,this.x=t,this.y=n,this.z=null==r?E.ONE:r,this.zinv=null}function ce(e,t,n){this.q=e,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(n),this.infinity=new ue(this,null,null)}re.prototype.nextBytes=function(e){var t;for(t=0;t<e.length;++t)e[t]=ne()},se.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},se.prototype.setPublic=function(e,t){if(this.isPublic=!0,this.isPrivate=!1,"string"!=typeof e)this.n=e,this.e=t;else{if(!(null!=e&&null!=t&&e.length>0&&t.length>0))throw"Invalid RSA public key";this.n=ie(e,16),this.e=parseInt(t,16)}},se.prototype.encrypt=function(e){var t=function(e,t){if(t<e.length+11)throw"Message too long for RSA";for(var n=new Array,r=e.length-1;r>=0&&t>0;){var i=e.charCodeAt(r--);i<128?n[--t]=i:i>127&&i<2048?(n[--t]=63&i|128,n[--t]=i>>6|192):(n[--t]=63&i|128,n[--t]=i>>6&63|128,n[--t]=i>>12|224)}n[--t]=0;for(var o=new re,s=new Array;t>2;){for(s[0]=0;0==s[0];)o.nextBytes(s);n[--t]=s[0]}return n[--t]=2,n[--t]=0,new E(n)}(e,this.n.bitLength()+7>>3);if(null==t)return null;var n=this.doPublic(t);if(null==n)return null;var r=n.toString(16);return 0==(1&r.length)?r:"0"+r},se.prototype.encryptOAEP=function(e,t,n){var r=function(e,t,n,r){var i=he.crypto.MessageDigest,o=he.crypto.Util,s=null;if(n||(n="sha1"),"string"==typeof n&&(s=i.getCanonicalAlgName(n),r=i.getHashLength(s),n=function(e){return Fe(o.hashHex(Ce(e),s))}),e.length+2*r+2>t)throw"Message too long for RSA";var a,u="";for(a=0;a<t-e.length-2*r-2;a+=1)u+="\0";var c=n("")+u+"\x01"+e,l=new Array(r);(new re).nextBytes(l);var h=oe(l,c.length,n),d=[];for(a=0;a<c.length;a+=1)d[a]=c.charCodeAt(a)^h.charCodeAt(a);var p=oe(d,l.length,n),f=[0];for(a=0;a<l.length;a+=1)f[a+1]=l[a]^p.charCodeAt(a);return new E(f.concat(d))}(e,this.n.bitLength()+7>>3,t,n);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;var o=i.toString(16);return 0==(1&o.length)?o:"0"+o},se.prototype.type="RSA",ae.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.x.equals(e.x)},ae.prototype.toBigInteger=function(){return this.x},ae.prototype.negate=function(){return new ae(this.q,this.x.negate().mod(this.q))},ae.prototype.add=function(e){return new ae(this.q,this.x.add(e.toBigInteger()).mod(this.q))},ae.prototype.subtract=function(e){return new ae(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))},ae.prototype.multiply=function(e){return new ae(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))},ae.prototype.square=function(){return new ae(this.q,this.x.square().mod(this.q))},ae.prototype.divide=function(e){return new ae(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))},ue.prototype.getX=function(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))},ue.prototype.getY=function(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))},ue.prototype.equals=function(e){return e==this||(this.isInfinity()?e.isInfinity():e.isInfinity()?this.isInfinity():!!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(E.ZERO)&&e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(E.ZERO))},ue.prototype.isInfinity=function(){return null==this.x&&null==this.y||this.z.equals(E.ZERO)&&!this.y.toBigInteger().equals(E.ZERO)},ue.prototype.negate=function(){return new ue(this.curve,this.x,this.y.negate(),this.z)},ue.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),n=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(E.ZERO.equals(n))return E.ZERO.equals(t)?this.twice():this.curve.getInfinity();var r=new E("3"),i=this.x.toBigInteger(),o=this.y.toBigInteger(),s=(e.x.toBigInteger(),e.y.toBigInteger(),n.square()),a=s.multiply(n),u=i.multiply(s),c=t.square().multiply(this.z),l=c.subtract(u.shiftLeft(1)).multiply(e.z).subtract(a).multiply(n).mod(this.curve.q),h=u.multiply(r).multiply(t).subtract(o.multiply(a)).subtract(c.multiply(t)).multiply(e.z).add(t.multiply(a)).mod(this.curve.q),d=a.multiply(this.z).multiply(e.z).mod(this.curve.q);return new ue(this.curve,this.curve.fromBigInteger(l),this.curve.fromBigInteger(h),d)},ue.prototype.twice=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=new E("3"),t=this.x.toBigInteger(),n=this.y.toBigInteger(),r=n.multiply(this.z),i=r.multiply(n).mod(this.curve.q),o=this.curve.a.toBigInteger(),s=t.square().multiply(e);E.ZERO.equals(o)||(s=s.add(this.z.square().multiply(o)));var a=(s=s.mod(this.curve.q)).square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.q),u=s.multiply(e).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(s.square().multiply(s)).mod(this.curve.q),c=r.square().multiply(r).shiftLeft(3).mod(this.curve.q);return new ue(this.curve,this.curve.fromBigInteger(a),this.curve.fromBigInteger(u),c)},ue.prototype.multiply=function(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t,n=e,r=n.multiply(new E("3")),i=this.negate(),o=this;for(t=r.bitLength()-2;t>0;--t){o=o.twice();var s=r.testBit(t);s!=n.testBit(t)&&(o=o.add(s?this:i))}return o},ue.prototype.multiplyTwo=function(e,t,n){var r;r=e.bitLength()>n.bitLength()?e.bitLength()-1:n.bitLength()-1;for(var i=this.curve.getInfinity(),o=this.add(t);r>=0;)i=i.twice(),e.testBit(r)?i=n.testBit(r)?i.add(o):i.add(this):n.testBit(r)&&(i=i.add(t)),--r;return i},ce.prototype.getQ=function(){return this.q},ce.prototype.getA=function(){return this.a},ce.prototype.getB=function(){return this.b},ce.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)},ce.prototype.getInfinity=function(){return this.infinity},ce.prototype.fromBigInteger=function(e){return new ae(this.q,e)},ce.prototype.decodePointHex=function(e){switch(parseInt(e.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var t=(e.length-2)/2,n=e.substr(2,t),r=e.substr(t+2,t);return new ue(this,this.fromBigInteger(new E(n,16)),this.fromBigInteger(new E(r,16)));default:return null}};var le=function(){var e=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),t=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),n={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function r(e,t,r){return t?n[t]:String.fromCharCode(parseInt(r,16))}var i=new String(""),o=(Object,Array,Object.hasOwnProperty);return function(n,s){var a,u,c=n.match(e),l=c[0],h=!1;"{"===l?a={}:"["===l?a=[]:(a=[],h=!0);for(var d=[a],p=1-h,f=c.length;p<f;++p){var g;switch((l=c[p]).charCodeAt(0)){default:(g=d[0])[u||g.length]=+l,u=void 0;break;case 34:if(-1!==(l=l.substring(1,l.length-1)).indexOf("\\")&&(l=l.replace(t,r)),g=d[0],!u){if(!(g instanceof Array)){u=l||i;break}u=g.length}g[u]=l,u=void 0;break;case 91:d.unshift((g=d[0])[u||g.length]=[]),u=void 0;break;case 93:d.shift();break;case 102:(g=d[0])[u||g.length]=!1,u=void 0;break;case 110:(g=d[0])[u||g.length]=null,u=void 0;break;case 116:(g=d[0])[u||g.length]=!0,u=void 0;break;case 123:d.unshift((g=d[0])[u||g.length]={}),u=void 0;break;case 125:d.shift()}}if(h){if(1!==d.length)throw new Error;a=a[0]}else if(d.length)throw new Error;if(s){var v=function(e,t){var n=e[t];if(n&&"object"==typeof n){var r=null;for(var i in n)if(o.call(n,i)&&n!==e){var a=v(n,i);void 0!==a?n[i]=a:(r||(r=[]),r.push(i))}if(r)for(var u=r.length;--u>=0;)delete n[r[u]]}return s.call(e,t,n)};a=v({"":a},"")}return a}}();void 0!==he&&he||(he={}),void 0!==he.asn1&&he.asn1||(he.asn1={}),he.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=t.substr(1).length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i<n;i++)r+="f";t=new E(r,16).xor(e).add(E.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return Pe(e,t)},this.newObject=function(e){var t=he.asn1,n=t.DERBoolean,r=t.DERInteger,i=t.DERBitString,o=t.DEROctetString,s=t.DERNull,a=t.DERObjectIdentifier,u=t.DEREnumerated,c=t.DERUTF8String,l=t.DERNumericString,h=t.DERPrintableString,d=t.DERTeletexString,p=t.DERIA5String,f=t.DERUTCTime,g=t.DERGeneralizedTime,v=t.DERSequence,y=t.DERSet,m=t.DERTaggedObject,b=t.ASN1Util.newObject,w=Object.keys(e);if(1!=w.length)throw"key of param shall be only one.";var _=w[0];if(-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+_+":"))throw"undefined key: "+_;if("bool"==_)return new n(e[_]);if("int"==_)return new r(e[_]);if("bitstr"==_)return new i(e[_]);if("octstr"==_)return new o(e[_]);if("null"==_)return new s(e[_]);if("oid"==_)return new a(e[_]);if("enum"==_)return new u(e[_]);if("utf8str"==_)return new c(e[_]);if("numstr"==_)return new l(e[_]);if("prnstr"==_)return new h(e[_]);if("telstr"==_)return new d(e[_]);if("ia5str"==_)return new p(e[_]);if("utctime"==_)return new f(e[_]);if("gentime"==_)return new g(e[_]);if("seq"==_){for(var S=e[_],E=[],x=0;x<S.length;x++){var F=b(S[x]);E.push(F)}return new v({array:E})}if("set"==_){for(S=e[_],E=[],x=0;x<S.length;x++)F=b(S[x]),E.push(F);return new y({array:E})}if("tag"==_){var C=e[_];if("[object Array]"===Object.prototype.toString.call(C)&&3==C.length){var A=b(C[2]);return new m({tag:C[0],explicit:C[1],obj:A})}var k={};if(void 0!==C.explicit&&(k.explicit=C.explicit),void 0!==C.tag&&(k.tag=C.tag),void 0===C.obj)throw"obj shall be specified for 'tag'.";return k.obj=b(C.obj),new m(k)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},he.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substr(0,2),16),r=(t=Math.floor(n/40)+"."+n%40,""),i=2;i<e.length;i+=2){var o=("00000000"+parseInt(e.substr(i,2),16).toString(2)).slice(-8);r+=o.substr(1,7),"0"==o.substr(0,1)&&(t=t+"."+new E(r,2).toString(10),r="")}return t},he.asn1.ASN1Util.oidIntToHex=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",r=new E(e,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",s=0;s<i;s++)o+="0";for(r=o+r,s=0;s<r.length-1;s+=7){var a=r.substr(s,7);s!=r.length-7&&(a="1"+a),n+=t(parseInt(a,2))}return n};if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=t(o),i.splice(0,2);for(var s=0;s<i.length;s++)r+=n(i[s]);return r},he.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var n=t.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+n).toString(16)+t},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},he.asn1.DERAbstractString=function(e){he.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=Ee(this.s).toLowerCase()},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},i.lang.extend(he.asn1.DERAbstractString,he.asn1.ASN1Object),he.asn1.DERAbstractTime=function(e){he.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,n){var r=this.zeroPadding,i=this.localDateToUTC(e),o=String(i.getFullYear());"utc"==t&&(o=o.substr(2,2));var s=o+r(String(i.getMonth()+1),2)+r(String(i.getDate()),2)+r(String(i.getHours()),2)+r(String(i.getMinutes()),2)+r(String(i.getSeconds()),2);if(!0===n){var a=i.getMilliseconds();if(0!=a){var u=r(String(a),3);s=s+"."+(u=u.replace(/[0]+$/,""))}}return s+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=me(e)},this.setByDateValue=function(e,t,n,r,i,o){var s=new Date(Date.UTC(e,t-1,n,r,i,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}},i.lang.extend(he.asn1.DERAbstractTime,he.asn1.ASN1Object),he.asn1.DERAbstractStructured=function(e){he.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},i.lang.extend(he.asn1.DERAbstractStructured,he.asn1.ASN1Object),he.asn1.DERBoolean=function(){he.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},i.lang.extend(he.asn1.DERBoolean,he.asn1.ASN1Object),he.asn1.DERInteger=function(e){he.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=he.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new E(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},i.lang.extend(he.asn1.DERInteger,he.asn1.ASN1Object),he.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=he.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}he.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;var n="0"+e;this.hTLV=null,this.isModified=!0,this.hV=n+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var n=0;n<=t;n++)e+="0";var r="";for(n=0;n<e.length-1;n+=8){var i=e.substr(n,8),o=parseInt(i,2).toString(16);1==o.length&&(o="0"+o),r+=o}this.hTLV=null,this.isModified=!0,this.hV="0"+t+r},this.setByBooleanArray=function(e){for(var t="",n=0;n<e.length;n++)t+=1==e[n]?"1":"0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=!1;return t},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):void 0!==e.hex?this.setHexValueIncludingUnusedBits(e.hex):void 0!==e.bin?this.setByBinaryString(e.bin):void 0!==e.array&&this.setByBooleanArray(e.array))},i.lang.extend(he.asn1.DERBitString,he.asn1.ASN1Object),he.asn1.DEROctetString=function(e){if(void 0!==e&&void 0!==e.obj){var t=he.asn1.ASN1Util.newObject(e.obj);e.hex=t.getEncodedHex()}he.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},i.lang.extend(he.asn1.DEROctetString,he.asn1.DERAbstractString),he.asn1.DERNull=function(){he.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},i.lang.extend(he.asn1.DERNull,he.asn1.ASN1Object),he.asn1.DERObjectIdentifier=function(e){var t=function(e){var t=e.toString(16);return 1==t.length&&(t="0"+t),t},n=function(e){var n="",r=new E(e,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",s=0;s<i;s++)o+="0";for(r=o+r,s=0;s<r.length-1;s+=7){var a=r.substr(s,7);s!=r.length-7&&(a="1"+a),n+=t(parseInt(a,2))}return n};he.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var r="",i=e.split("."),o=40*parseInt(i[0])+parseInt(i[1]);r+=t(o),i.splice(0,2);for(var s=0;s<i.length;s++)r+=n(i[s]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.setValueName=function(e){var t=he.asn1.x509.OID.name2oid(e);if(""===t)throw"DERObjectIdentifier oidName undefined: "+e;this.setValueOidString(t)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):void 0!==e.oid?this.setValueOidString(e.oid):void 0!==e.hex?this.setValueHex(e.hex):void 0!==e.name&&this.setValueName(e.name))},i.lang.extend(he.asn1.DERObjectIdentifier,he.asn1.ASN1Object),he.asn1.DEREnumerated=function(e){he.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=he.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new E(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},i.lang.extend(he.asn1.DEREnumerated,he.asn1.ASN1Object),he.asn1.DERUTF8String=function(e){he.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},i.lang.extend(he.asn1.DERUTF8String,he.asn1.DERAbstractString),he.asn1.DERNumericString=function(e){he.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},i.lang.extend(he.asn1.DERNumericString,he.asn1.DERAbstractString),he.asn1.DERPrintableString=function(e){he.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},i.lang.extend(he.asn1.DERPrintableString,he.asn1.DERAbstractString),he.asn1.DERTeletexString=function(e){he.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},i.lang.extend(he.asn1.DERTeletexString,he.asn1.DERAbstractString),he.asn1.DERIA5String=function(e){he.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},i.lang.extend(he.asn1.DERIA5String,he.asn1.DERAbstractString),he.asn1.DERUTCTime=function(e){he.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=me(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=me(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},i.lang.extend(he.asn1.DERUTCTime,he.asn1.DERAbstractTime),he.asn1.DERGeneralizedTime=function(e){he.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=me(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=me(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},i.lang.extend(he.asn1.DERGeneralizedTime,he.asn1.DERAbstractTime),he.asn1.DERSequence=function(e){he.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++)e+=this.asn1Array[t].getEncodedHex();return this.hV=e,this.hV}},i.lang.extend(he.asn1.DERSequence,he.asn1.DERAbstractStructured),he.asn1.DERSet=function(e){he.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++)e.push(this.asn1Array[t].getEncodedHex());return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},void 0!==e&&void 0!==e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},i.lang.extend(he.asn1.DERSet,he.asn1.DERAbstractStructured),he.asn1.DERTaggedObject=function(e){he.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,n){this.hT=t,this.isExplicit=e,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.tag&&(this.hT=e.tag),void 0!==e.explicit&&(this.isExplicit=e.explicit),void 0!==e.obj&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},i.lang.extend(he.asn1.DERTaggedObject,he.asn1.ASN1Object);var he,de,pe,fe=new function(){};function ge(e){for(var t=new Array,n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}function ve(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}function ye(e){for(var t="",n=0;n<e.length;n++){var r=e[n].toString(16);1==r.length&&(r="0"+r),t+=r}return t}function me(e){return ye(ge(e))}function be(e){return(e=(e=e.replace(/\=/g,"")).replace(/\+/g,"-")).replace(/\//g,"_")}function we(e){return e.length%4==2?e+="==":e.length%4==3&&(e+="="),(e=e.replace(/-/g,"+")).replace(/_/g,"/")}function _e(e){return e.length%2==1&&(e="0"+e),be(w(e))}function Se(e){return _(we(e))}function Ee(e){return Re(Be(e))}function xe(e){return decodeURIComponent(Oe(e))}function Fe(e){for(var t="",n=0;n<e.length-1;n+=2)t+=String.fromCharCode(parseInt(e.substr(n,2),16));return t}function Ce(e){for(var t="",n=0;n<e.length;n++)t+=("0"+e.charCodeAt(n).toString(16)).slice(-2);return t}function Ae(e){return w(e)}function ke(e){return Ae(e).replace(/(.{64})/g,"$1\r\n").replace(/\r\n$/,"")}function Te(e){return _(e.replace(/[^0-9A-Za-z\/+=]*/g,""))}function Pe(e,t){return"-----BEGIN "+t+"-----\r\n"+ke(e)+"\r\n-----END "+t+"-----\r\n"}function De(e,t){if(-1==e.indexOf("-----BEGIN "))throw"can't find PEM header: "+t;return Te(e=void 0!==t?(e=e.replace("-----BEGIN "+t+"-----","")).replace("-----END "+t+"-----",""):(e=e.replace(/-----BEGIN [^-]+-----/,"")).replace(/-----END [^-]+-----/,""))}function Ie(e){var t,n,r,i,o,s,a,u,c,l,h;if(h=e.match(/^(\d{2}|\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/))return u=h[1],t=parseInt(u),2===u.length&&(50<=t&&t<100?t=1900+t:0<=t&&t<50&&(t=2e3+t)),n=parseInt(h[2])-1,r=parseInt(h[3]),i=parseInt(h[4]),o=parseInt(h[5]),s=parseInt(h[6]),a=0,""!==(c=h[7])&&(l=(c.substr(1)+"00").substr(0,3),a=parseInt(l)),Date.UTC(t,n,r,i,o,s,a);throw"unsupported zulu format: "+e}function Ne(e){return~~(Ie(e)/1e3)}function Re(e){return e.replace(/%/g,"")}function Oe(e){return e.replace(/(..)/g,"%$1")}function je(e){var t="malformed IPv6 address";if(!e.match(/^[0-9A-Fa-f:]+$/))throw t;var n=(e=e.toLowerCase()).split(":").length-1;if(n<2)throw t;var r=":".repeat(7-n+2),i=(e=e.replace("::",r)).split(":");if(8!=i.length)throw t;for(var o=0;o<8;o++)i[o]=("0000"+i[o]).slice(-4);return i.join("")}function He(e){if(!e.match(/^[0-9A-Fa-f]{32}$/))throw"malformed IPv6 address octet";for(var t=(e=e.toLowerCase()).match(/.{1,4}/g),n=0;n<8;n++)t[n]=t[n].replace(/^0+/,""),""==t[n]&&(t[n]="0");var r=(e=":"+t.join(":")+":").match(/:(0:){2,}/g);if(null===r)return e.slice(1,-1);var i="";for(n=0;n<r.length;n++)r[n].length>i.length&&(i=r[n]);return(e=e.replace(i,"::")).slice(1,-1)}function Me(e){var t="malformed hex value";if(!e.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw t;if(8!=e.length)return 32==e.length?He(e):e;try{return parseInt(e.substr(0,2),16)+"."+parseInt(e.substr(2,2),16)+"."+parseInt(e.substr(4,2),16)+"."+parseInt(e.substr(6,2),16)}catch(e){throw t}}function Be(e){for(var t=encodeURIComponent(e),n="",r=0;r<t.length;r++)"%"==t[r]?(n+=t.substr(r,3),r+=2):n=n+"%"+me(t[r]);return n}function Ve(e){return e.length%2==1?"0"+e:e.substr(0,1)>"7"?"00"+e:e}function Ue(e){e=(e=(e=e.replace(/^\s*\[\s*/,"")).replace(/\s*\]\s*$/,"")).replace(/\s*/g,"");try{return e.split(/,/).map(function(e,t,n){var r=parseInt(e);if(r<0||255<r)throw"integer not in range 0-255";return("00"+r.toString(16)).slice(-2)}).join("")}catch(e){throw"malformed integer array string: "+e}}fe.getLblen=function(e,t){if("8"!=e.substr(t+2,1))return 1;var n=parseInt(e.substr(t+3,1));return 0==n?-1:0<n&&n<10?n+1:-2},fe.getL=function(e,t){var n=fe.getLblen(e,t);return n<1?"":e.substr(t+2,2*n)},fe.getVblen=function(e,t){var n;return""==(n=fe.getL(e,t))?-1:("8"===n.substr(0,1)?new E(n.substr(2),16):new E(n,16)).intValue()},fe.getVidx=function(e,t){var n=fe.getLblen(e,t);return n<0?n:t+2*(n+1)},fe.getV=function(e,t){var n=fe.getVidx(e,t),r=fe.getVblen(e,t);return e.substr(n,2*r)},fe.getTLV=function(e,t){return e.substr(t,2)+fe.getL(e,t)+fe.getV(e,t)},fe.getNextSiblingIdx=function(e,t){return fe.getVidx(e,t)+2*fe.getVblen(e,t)},fe.getChildIdx=function(e,t){var n=fe,r=new Array,i=n.getVidx(e,t);"03"==e.substr(t,2)?r.push(i+2):r.push(i);for(var o=n.getVblen(e,t),s=i,a=0;;){var u=n.getNextSiblingIdx(e,s);if(null==u||u-i>=2*o)break;if(a>=200)break;r.push(u),s=u,a++}return r},fe.getNthChildIdx=function(e,t,n){return fe.getChildIdx(e,t)[n]},fe.getIdxbyList=function(e,t,n,r){var i,o,s=fe;if(0==n.length){if(void 0!==r&&e.substr(t,2)!==r)throw"checking tag doesn't match: "+e.substr(t,2)+"!="+r;return t}return i=n.shift(),o=s.getChildIdx(e,t),s.getIdxbyList(e,o[i],n,r)},fe.getTLVbyList=function(e,t,n,r){var i=fe,o=i.getIdxbyList(e,t,n);if(void 0===o)throw"can't find nthList object";if(void 0!==r&&e.substr(o,2)!=r)throw"checking tag doesn't match: "+e.substr(o,2)+"!="+r;return i.getTLV(e,o)},fe.getVbyList=function(e,t,n,r,i){var o,s,a=fe;if(void 0===(o=a.getIdxbyList(e,t,n,r)))throw"can't find nthList object";return s=a.getV(e,o),!0===i&&(s=s.substr(2)),s},fe.hextooidstr=function(e){var t=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},n=[],r=e.substr(0,2),i=parseInt(r,16);n[0]=new String(Math.floor(i/40)),n[1]=new String(i%40);for(var o=e.substr(2),s=[],a=0;a<o.length/2;a++)s.push(parseInt(o.substr(2*a,2),16));var u=[],c="";for(a=0;a<s.length;a++)128&s[a]?c+=t((127&s[a]).toString(2),7):(c+=t((127&s[a]).toString(2),7),u.push(new String(parseInt(c,2))),c="");var l=n.join(".");return u.length>0&&(l=l+"."+u.join(".")),l},fe.dump=function(e,t,n,r){var i=fe,o=i.getV,s=i.dump,a=i.getChildIdx,u=e;e instanceof he.asn1.ASN1Object&&(u=e.getEncodedHex());var c=function(e,t){return e.length<=2*t?e:e.substr(0,t)+"..(total "+e.length/2+"bytes).."+e.substr(e.length-t,t)};void 0===t&&(t={ommit_long_octet:32}),void 0===n&&(n=0),void 0===r&&(r="");var l=t.ommit_long_octet;if("01"==u.substr(n,2))return"00"==(h=o(u,n))?r+"BOOLEAN FALSE\n":r+"BOOLEAN TRUE\n";if("02"==u.substr(n,2))return r+"INTEGER "+c(h=o(u,n),l)+"\n";if("03"==u.substr(n,2))return r+"BITSTRING "+c(h=o(u,n),l)+"\n";if("04"==u.substr(n,2)){var h=o(u,n);return i.isASN1HEX(h)?(S=r+"OCTETSTRING, encapsulates\n")+s(h,t,0,r+"  "):r+"OCTETSTRING "+c(h,l)+"\n"}if("05"==u.substr(n,2))return r+"NULL\n";if("06"==u.substr(n,2)){var d=o(u,n),p=he.asn1.ASN1Util.oidHexToInt(d),f=he.asn1.x509.OID.oid2name(p),g=p.replace(/\./g," ");return""!=f?r+"ObjectIdentifier "+f+" ("+g+")\n":r+"ObjectIdentifier ("+g+")\n"}if("0c"==u.substr(n,2))return r+"UTF8String '"+xe(o(u,n))+"'\n";if("13"==u.substr(n,2))return r+"PrintableString '"+xe(o(u,n))+"'\n";if("14"==u.substr(n,2))return r+"TeletexString '"+xe(o(u,n))+"'\n";if("16"==u.substr(n,2))return r+"IA5String '"+xe(o(u,n))+"'\n";if("17"==u.substr(n,2))return r+"UTCTime "+xe(o(u,n))+"\n";if("18"==u.substr(n,2))return r+"GeneralizedTime "+xe(o(u,n))+"\n";if("30"==u.substr(n,2)){if("3000"==u.substr(n,4))return r+"SEQUENCE {}\n";S=r+"SEQUENCE\n";var v=t;if((2==(b=a(u,n)).length||3==b.length)&&"06"==u.substr(b[0],2)&&"04"==u.substr(b[b.length-1],2)){f=i.oidname(o(u,b[0]));var y=JSON.parse(JSON.stringify(t));y.x509ExtName=f,v=y}for(var m=0;m<b.length;m++)S+=s(u,v,b[m],r+"  ");return S}if("31"==u.substr(n,2)){S=r+"SET\n";var b=a(u,n);for(m=0;m<b.length;m++)S+=s(u,t,b[m],r+"  ");return S}var w=parseInt(u.substr(n,2),16);if(0!=(128&w)){var _=31&w;if(0!=(32&w)){var S=r+"["+_+"]\n";for(b=a(u,n),m=0;m<b.length;m++)S+=s(u,t,b[m],r+"  ");return S}return"68747470"==(h=o(u,n)).substr(0,8)&&(h=xe(h)),"subjectAltName"===t.x509ExtName&&2==_&&(h=xe(h)),r+"["+_+"] "+h+"\n"}return r+"UNKNOWN("+u.substr(n,2)+") "+o(u,n)+"\n"},fe.isASN1HEX=function(e){var t=fe;if(e.length%2==1)return!1;var n=t.getVblen(e,0),r=e.substr(0,2),i=t.getL(e,0);return e.length-r.length-i.length==2*n},fe.oidname=function(e){var t=he.asn1;he.lang.String.isHex(e)&&(e=t.ASN1Util.oidHexToInt(e));var n=t.x509.OID.oid2name(e);return""===n&&(n=e),n},void 0!==he&&he||(he={}),void 0!==he.asn1&&he.asn1||(he.asn1={}),void 0!==he.asn1.x509&&he.asn1.x509||(he.asn1.x509={}),he.asn1.x509.Certificate=function(e){he.asn1.x509.Certificate.superclass.constructor.call(this);var t=he.asn1,n=t.DERSequence,r=t.DERBitString;this.sign=function(){this.asn1SignatureAlg=this.asn1TBSCert.asn1SignatureAlg;var e=new he.crypto.Signature({alg:this.asn1SignatureAlg.nameAlg});e.init(this.prvKey),e.updateHex(this.asn1TBSCert.getEncodedHex()),this.hexSig=e.sign(),this.asn1Sig=new r({hex:"00"+this.hexSig});var t=new n({array:[this.asn1TBSCert,this.asn1SignatureAlg,this.asn1Sig]});this.hTLV=t.getEncodedHex(),this.isModified=!1},this.setSignatureHex=function(e){this.asn1SignatureAlg=this.asn1TBSCert.asn1SignatureAlg,this.hexSig=e,this.asn1Sig=new r({hex:"00"+this.hexSig});var t=new n({array:[this.asn1TBSCert,this.asn1SignatureAlg,this.asn1Sig]});this.hTLV=t.getEncodedHex(),this.isModified=!1},this.getEncodedHex=function(){if(0==this.isModified&&null!=this.hTLV)return this.hTLV;throw"not signed yet"},this.getPEMString=function(){return"-----BEGIN CERTIFICATE-----\r\n"+ke(this.getEncodedHex())+"\r\n-----END CERTIFICATE-----\r\n"},void 0!==e&&(void 0!==e.tbscertobj&&(this.asn1TBSCert=e.tbscertobj),void 0!==e.prvkeyobj&&(this.prvKey=e.prvkeyobj))},i.lang.extend(he.asn1.x509.Certificate,he.asn1.ASN1Object),he.asn1.x509.TBSCertificate=function(e){he.asn1.x509.TBSCertificate.superclass.constructor.call(this);var t=he.asn1,n=t.DERSequence,r=t.DERInteger,i=t.DERTaggedObject,o=t.x509,s=o.Time,a=o.X500Name,u=o.SubjectPublicKeyInfo;this._initialize=function(){this.asn1Array=new Array,this.asn1Version=new i({obj:new r({int:2})}),this.asn1SerialNumber=null,this.asn1SignatureAlg=null,this.asn1Issuer=null,this.asn1NotBefore=null,this.asn1NotAfter=null,this.asn1Subject=null,this.asn1SubjPKey=null,this.extensionsArray=new Array},this.setSerialNumberByParam=function(e){this.asn1SerialNumber=new r(e)},this.setSignatureAlgByParam=function(e){this.asn1SignatureAlg=new o.AlgorithmIdentifier(e)},this.setIssuerByParam=function(e){this.asn1Issuer=new a(e)},this.setNotBeforeByParam=function(e){this.asn1NotBefore=new s(e)},this.setNotAfterByParam=function(e){this.asn1NotAfter=new s(e)},this.setSubjectByParam=function(e){this.asn1Subject=new a(e)},this.setSubjectPublicKey=function(e){this.asn1SubjPKey=new u(e)},this.setSubjectPublicKeyByGetKey=function(e){var t=Le.getKey(e);this.asn1SubjPKey=new u(t)},this.appendExtension=function(e){this.extensionsArray.push(e)},this.appendExtensionByName=function(e,t){he.asn1.x509.Extension.appendByNameToArray(e,t,this.extensionsArray)},this.getEncodedHex=function(){if(null==this.asn1NotBefore||null==this.asn1NotAfter)throw"notBefore and/or notAfter not set";var e=new n({array:[this.asn1NotBefore,this.asn1NotAfter]});if(this.asn1Array=new Array,this.asn1Array.push(this.asn1Version),this.asn1Array.push(this.asn1SerialNumber),this.asn1Array.push(this.asn1SignatureAlg),this.asn1Array.push(this.asn1Issuer),this.asn1Array.push(e),this.asn1Array.push(this.asn1Subject),this.asn1Array.push(this.asn1SubjPKey),this.extensionsArray.length>0){var t=new n({array:this.extensionsArray}),r=new i({explicit:!0,tag:"a3",obj:t});this.asn1Array.push(r)}var o=new n({array:this.asn1Array});return this.hTLV=o.getEncodedHex(),this.isModified=!1,this.hTLV},this._initialize()},i.lang.extend(he.asn1.x509.TBSCertificate,he.asn1.ASN1Object),he.asn1.x509.Extension=function(e){he.asn1.x509.Extension.superclass.constructor.call(this);var t=he.asn1,n=t.DERObjectIdentifier,r=t.DEROctetString,i=t.DERBoolean,o=t.DERSequence;this.getEncodedHex=function(){var e=new n({oid:this.oid}),t=new r({hex:this.getExtnValueHex()}),s=new Array;return s.push(e),this.critical&&s.push(new i),s.push(t),new o({array:s}).getEncodedHex()},this.critical=!1,void 0!==e&&void 0!==e.critical&&(this.critical=e.critical)},i.lang.extend(he.asn1.x509.Extension,he.asn1.ASN1Object),he.asn1.x509.Extension.appendByNameToArray=function(e,t,n){var r=e.toLowerCase(),i=he.asn1.x509;if("basicconstraints"==r){var o=new i.BasicConstraints(t);n.push(o)}else if("keyusage"==r)o=new i.KeyUsage(t),n.push(o);else if("crldistributionpoints"==r)o=new i.CRLDistributionPoints(t),n.push(o);else if("extkeyusage"==r)o=new i.ExtKeyUsage(t),n.push(o);else if("authoritykeyidentifier"==r)o=new i.AuthorityKeyIdentifier(t),n.push(o);else if("authorityinfoaccess"==r)o=new i.AuthorityInfoAccess(t),n.push(o);else if("subjectaltname"==r)o=new i.SubjectAltName(t),n.push(o);else{if("issueraltname"!=r)throw"unsupported extension name: "+e;o=new i.IssuerAltName(t),n.push(o)}},he.asn1.x509.KeyUsage=function(e){he.asn1.x509.KeyUsage.superclass.constructor.call(this,e);var t=We.KEYUSAGE_NAME;if(this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.15",void 0!==e&&(void 0!==e.bin&&(this.asn1ExtnValue=new he.asn1.DERBitString(e)),void 0!==e.names&&void 0!==e.names.length)){for(var n=e.names,r="000000000",i=0;i<n.length;i++)for(var o=0;o<t.length;o++)n[i]===t[o]&&(r=r.substring(0,o)+"1"+r.substring(o+1,r.length));this.asn1ExtnValue=new he.asn1.DERBitString({bin:r})}},i.lang.extend(he.asn1.x509.KeyUsage,he.asn1.x509.Extension),he.asn1.x509.BasicConstraints=function(e){he.asn1.x509.BasicConstraints.superclass.constructor.call(this,e),this.getExtnValueHex=function(){var e=new Array;this.cA&&e.push(new he.asn1.DERBoolean),this.pathLen>-1&&e.push(new he.asn1.DERInteger({int:this.pathLen}));var t=new he.asn1.DERSequence({array:e});return this.asn1ExtnValue=t,this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.19",this.cA=!1,this.pathLen=-1,void 0!==e&&(void 0!==e.cA&&(this.cA=e.cA),void 0!==e.pathLen&&(this.pathLen=e.pathLen))},i.lang.extend(he.asn1.x509.BasicConstraints,he.asn1.x509.Extension),he.asn1.x509.CRLDistributionPoints=function(e){he.asn1.x509.CRLDistributionPoints.superclass.constructor.call(this,e);var t=he.asn1,n=t.x509;this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.setByDPArray=function(e){this.asn1ExtnValue=new t.DERSequence({array:e})},this.setByOneURI=function(e){var t=new n.GeneralNames([{uri:e}]),r=new n.DistributionPointName(t),i=new n.DistributionPoint({dpobj:r});this.setByDPArray([i])},this.oid="2.5.29.31",void 0!==e&&(void 0!==e.array?this.setByDPArray(e.array):void 0!==e.uri&&this.setByOneURI(e.uri))},i.lang.extend(he.asn1.x509.CRLDistributionPoints,he.asn1.x509.Extension),he.asn1.x509.ExtKeyUsage=function(e){he.asn1.x509.ExtKeyUsage.superclass.constructor.call(this,e);var t=he.asn1;this.setPurposeArray=function(e){this.asn1ExtnValue=new t.DERSequence;for(var n=0;n<e.length;n++){var r=new t.DERObjectIdentifier(e[n]);this.asn1ExtnValue.appendASN1Object(r)}},this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.37",void 0!==e&&void 0!==e.array&&this.setPurposeArray(e.array)},i.lang.extend(he.asn1.x509.ExtKeyUsage,he.asn1.x509.Extension),he.asn1.x509.AuthorityKeyIdentifier=function(e){he.asn1.x509.AuthorityKeyIdentifier.superclass.constructor.call(this,e);var t=he.asn1,n=t.DERTaggedObject;this.asn1KID=null,this.asn1CertIssuer=null,this.asn1CertSN=null,this.getExtnValueHex=function(){var e=new Array;this.asn1KID&&e.push(new n({explicit:!1,tag:"80",obj:this.asn1KID})),this.asn1CertIssuer&&e.push(new n({explicit:!1,tag:"a1",obj:this.asn1CertIssuer})),this.asn1CertSN&&e.push(new n({explicit:!1,tag:"82",obj:this.asn1CertSN}));var r=new t.DERSequence({array:e});return this.asn1ExtnValue=r,this.asn1ExtnValue.getEncodedHex()},this.setKIDByParam=function(e){this.asn1KID=new he.asn1.DEROctetString(e)},this.setCertIssuerByParam=function(e){this.asn1CertIssuer=new he.asn1.x509.X500Name(e)},this.setCertSNByParam=function(e){this.asn1CertSN=new he.asn1.DERInteger(e)},this.oid="2.5.29.35",void 0!==e&&(void 0!==e.kid&&this.setKIDByParam(e.kid),void 0!==e.issuer&&this.setCertIssuerByParam(e.issuer),void 0!==e.sn&&this.setCertSNByParam(e.sn))},i.lang.extend(he.asn1.x509.AuthorityKeyIdentifier,he.asn1.x509.Extension),he.asn1.x509.AuthorityInfoAccess=function(e){he.asn1.x509.AuthorityInfoAccess.superclass.constructor.call(this,e),this.setAccessDescriptionArray=function(e){for(var t=new Array,n=he.asn1,r=n.DERSequence,i=0;i<e.length;i++){var o=new r({array:[new n.DERObjectIdentifier(e[i].accessMethod),new n.x509.GeneralName(e[i].accessLocation)]});t.push(o)}this.asn1ExtnValue=new r({array:t})},this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="1.3.6.1.5.5.7.1.1",void 0!==e&&void 0!==e.array&&this.setAccessDescriptionArray(e.array)},i.lang.extend(he.asn1.x509.AuthorityInfoAccess,he.asn1.x509.Extension),he.asn1.x509.SubjectAltName=function(e){he.asn1.x509.SubjectAltName.superclass.constructor.call(this,e),this.setNameArray=function(e){this.asn1ExtnValue=new he.asn1.x509.GeneralNames(e)},this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.17",void 0!==e&&void 0!==e.array&&this.setNameArray(e.array)},i.lang.extend(he.asn1.x509.SubjectAltName,he.asn1.x509.Extension),he.asn1.x509.IssuerAltName=function(e){he.asn1.x509.IssuerAltName.superclass.constructor.call(this,e),this.setNameArray=function(e){this.asn1ExtnValue=new he.asn1.x509.GeneralNames(e)},this.getExtnValueHex=function(){return this.asn1ExtnValue.getEncodedHex()},this.oid="2.5.29.18",void 0!==e&&void 0!==e.array&&this.setNameArray(e.array)},i.lang.extend(he.asn1.x509.IssuerAltName,he.asn1.x509.Extension),he.asn1.x509.CRL=function(e){he.asn1.x509.CRL.superclass.constructor.call(this),this.sign=function(){this.asn1SignatureAlg=this.asn1TBSCertList.asn1SignatureAlg,sig=new he.crypto.Signature({alg:"SHA1withRSA",prov:"cryptojs/jsrsa"}),sig.init(this.prvKey),sig.updateHex(this.asn1TBSCertList.getEncodedHex()),this.hexSig=sig.sign(),this.asn1Sig=new he.asn1.DERBitString({hex:"00"+this.hexSig});var e=new he.asn1.DERSequence({array:[this.asn1TBSCertList,this.asn1SignatureAlg,this.asn1Sig]});this.hTLV=e.getEncodedHex(),this.isModified=!1},this.getEncodedHex=function(){if(0==this.isModified&&null!=this.hTLV)return this.hTLV;throw"not signed yet"},this.getPEMString=function(){return"-----BEGIN X509 CRL-----\r\n"+ke(this.getEncodedHex())+"\r\n-----END X509 CRL-----\r\n"},void 0!==e&&(void 0!==e.tbsobj&&(this.asn1TBSCertList=e.tbsobj),void 0!==e.prvkeyobj&&(this.prvKey=e.prvkeyobj))},i.lang.extend(he.asn1.x509.CRL,he.asn1.ASN1Object),he.asn1.x509.TBSCertList=function(e){he.asn1.x509.TBSCertList.superclass.constructor.call(this);var t=he.asn1,n=t.DERSequence,r=t.x509,i=r.Time;this.setSignatureAlgByParam=function(e){this.asn1SignatureAlg=new r.AlgorithmIdentifier(e)},this.setIssuerByParam=function(e){this.asn1Issuer=new r.X500Name(e)},this.setThisUpdateByParam=function(e){this.asn1ThisUpdate=new i(e)},this.setNextUpdateByParam=function(e){this.asn1NextUpdate=new i(e)},this.addRevokedCert=function(e,t){var n={};void 0!=e&&null!=e&&(n.sn=e),void 0!=t&&null!=t&&(n.time=t);var i=new r.CRLEntry(n);this.aRevokedCert.push(i)},this.getEncodedHex=function(){if(this.asn1Array=new Array,null!=this.asn1Version&&this.asn1Array.push(this.asn1Version),this.asn1Array.push(this.asn1SignatureAlg),this.asn1Array.push(this.asn1Issuer),this.asn1Array.push(this.asn1ThisUpdate),null!=this.asn1NextUpdate&&this.asn1Array.push(this.asn1NextUpdate),this.aRevokedCert.length>0){var e=new n({array:this.aRevokedCert});this.asn1Array.push(e)}var t=new n({array:this.asn1Array});return this.hTLV=t.getEncodedHex(),this.isModified=!1,this.hTLV},this._initialize=function(){this.asn1Version=null,this.asn1SignatureAlg=null,this.asn1Issuer=null,this.asn1ThisUpdate=null,this.asn1NextUpdate=null,this.aRevokedCert=new Array},this._initialize()},i.lang.extend(he.asn1.x509.TBSCertList,he.asn1.ASN1Object),he.asn1.x509.CRLEntry=function(e){he.asn1.x509.CRLEntry.superclass.constructor.call(this);var t=he.asn1;this.setCertSerial=function(e){this.sn=new t.DERInteger(e)},this.setRevocationDate=function(e){this.time=new t.x509.Time(e)},this.getEncodedHex=function(){var e=new t.DERSequence({array:[this.sn,this.time]});return this.TLV=e.getEncodedHex(),this.TLV},void 0!==e&&(void 0!==e.time&&this.setRevocationDate(e.time),void 0!==e.sn&&this.setCertSerial(e.sn))},i.lang.extend(he.asn1.x509.CRLEntry,he.asn1.ASN1Object),he.asn1.x509.X500Name=function(e){he.asn1.x509.X500Name.superclass.constructor.call(this),this.asn1Array=new Array;var t,n=he.asn1,r=n.x509,i=De;this.setByString=function(e){var t=e.split("/");t.shift();for(var n=[],i=0;i<t.length;i++)if(t[i].match(/^[^=]+=.+$/))n.push(t[i]);else{var o=n.length-1;n[o]=n[o]+"/"+t[i]}for(i=0;i<n.length;i++)this.asn1Array.push(new r.RDN({str:n[i]}))},this.setByLdapString=function(e){var t=r.X500Name.ldapToOneline(e);this.setByString(t)},this.setByObject=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=new he.asn1.x509.RDN({str:t+"="+e[t]});this.asn1Array?this.asn1Array.push(n):this.asn1Array=[n]}},this.getEncodedHex=function(){if("string"==typeof this.hTLV)return this.hTLV;var e=new n.DERSequence({array:this.asn1Array});return this.hTLV=e.getEncodedHex(),this.hTLV},void 0!==e&&(void 0!==e.str?this.setByString(e.str):void 0!==e.ldapstr?this.setByLdapString(e.ldapstr):"object"==typeof e&&this.setByObject(e),void 0!==e.certissuer&&((t=new We).hex=i(e.certissuer),this.hTLV=t.getIssuerHex()),void 0!==e.certsubject&&((t=new We).hex=i(e.certsubject),this.hTLV=t.getSubjectHex()))},i.lang.extend(he.asn1.x509.X500Name,he.asn1.ASN1Object),he.asn1.x509.X500Name.onelineToLDAP=function(e){if("/"!==e.substr(0,1))throw"malformed input";var t=(e=e.substr(1)).split("/");return t.reverse(),(t=t.map(function(e){return e.replace(/,/,"\\,")})).join(",")},he.asn1.x509.X500Name.ldapToOneline=function(e){for(var t=e.split(","),n=!1,r=[],i=0;t.length>0;i++){var o=t.shift();if(!0===n){var s=(r.pop()+","+o).replace(/\\,/g,",");r.push(s),n=!1}else r.push(o);"\\"===o.substr(-1,1)&&(n=!0)}return(r=r.map(function(e){return e.replace("/","\\/")})).reverse(),"/"+r.join("/")},he.asn1.x509.RDN=function(e){he.asn1.x509.RDN.superclass.constructor.call(this),this.asn1Array=new Array,this.addByString=function(e){this.asn1Array.push(new he.asn1.x509.AttributeTypeAndValue({str:e}))},this.addByMultiValuedString=function(e){for(var t=he.asn1.x509.RDN.parseString(e),n=0;n<t.length;n++)this.addByString(t[n])},this.getEncodedHex=function(){var e=new he.asn1.DERSet({array:this.asn1Array});return this.TLV=e.getEncodedHex(),this.TLV},void 0!==e&&void 0!==e.str&&this.addByMultiValuedString(e.str)},i.lang.extend(he.asn1.x509.RDN,he.asn1.ASN1Object),he.asn1.x509.RDN.parseString=function(e){for(var t=e.split(/\+/),n=!1,r=[],i=0;t.length>0;i++){var o=t.shift();if(!0===n){var s=(r.pop()+"+"+o).replace(/\\\+/g,"+");r.push(s),n=!1}else r.push(o);"\\"===o.substr(-1,1)&&(n=!0)}var a=!1,u=[];for(i=0;r.length>0;i++){if(o=r.shift(),!0===a){var c=u.pop();o.match(/"$/)?(s=(c+"+"+o).replace(/^([^=]+)="(.*)"$/,"$1=$2"),u.push(s),a=!1):u.push(c+"+"+o)}else u.push(o);o.match(/^[^=]+="/)&&(a=!0)}return u},he.asn1.x509.AttributeTypeAndValue=function(e){he.asn1.x509.AttributeTypeAndValue.superclass.constructor.call(this);var t=he.asn1;this.setByString=function(e){var t=e.match(/^([^=]+)=(.+)$/);if(!t)throw"malformed attrTypeAndValueStr: "+e;this.setByAttrTypeAndValueStr(t[1],t[2])},this.setByAttrTypeAndValueStr=function(e,t){this.typeObj=he.asn1.x509.OID.atype2obj(e);var n="utf8";"C"==e&&(n="prn"),this.valueObj=this.getValueObj(n,t)},this.getValueObj=function(e,n){if("utf8"==e)return new t.DERUTF8String({str:n});if("prn"==e)return new t.DERPrintableString({str:n});if("tel"==e)return new t.DERTeletexString({str:n});if("ia5"==e)return new t.DERIA5String({str:n});throw"unsupported directory string type: type="+e+" value="+n},this.getEncodedHex=function(){var e=new t.DERSequence({array:[this.typeObj,this.valueObj]});return this.TLV=e.getEncodedHex(),this.TLV},void 0!==e&&void 0!==e.str&&this.setByString(e.str)},i.lang.extend(he.asn1.x509.AttributeTypeAndValue,he.asn1.ASN1Object),he.asn1.x509.SubjectPublicKeyInfo=function(e){he.asn1.x509.SubjectPublicKeyInfo.superclass.constructor.call(this);var t=he.asn1,n=t.DERInteger,r=t.DERBitString,i=t.DERObjectIdentifier,o=t.DERSequence,s=t.ASN1Util.newObject,a=t.x509.AlgorithmIdentifier;this.getASN1Object=function(){if(null==this.asn1AlgId||null==this.asn1SubjPKey)throw"algId and/or subjPubKey not set";return new o({array:[this.asn1AlgId,this.asn1SubjPKey]})},this.getEncodedHex=function(){var e=this.getASN1Object();return this.hTLV=e.getEncodedHex(),this.hTLV},this.setPubKey=function(e){try{if(e instanceof se){var t=s({seq:[{int:{bigint:e.n}},{int:{int:e.e}}]}).getEncodedHex();this.asn1AlgId=new a({name:"rsaEncryption"}),this.asn1SubjPKey=new r({hex:"00"+t})}}catch(e){}try{if(e instanceof he.crypto.ECDSA){var o=new i({name:e.curveName});this.asn1AlgId=new a({name:"ecPublicKey",asn1params:o}),this.asn1SubjPKey=new r({hex:"00"+e.pubKeyHex})}}catch(e){}try{if(e instanceof he.crypto.DSA){o=new s({seq:[{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}}]}),this.asn1AlgId=new a({name:"dsa",asn1params:o});var u=new n({bigint:e.y});this.asn1SubjPKey=new r({hex:"00"+u.getEncodedHex()})}}catch(e){}},void 0!==e&&this.setPubKey(e)},i.lang.extend(he.asn1.x509.SubjectPublicKeyInfo,he.asn1.ASN1Object),he.asn1.x509.Time=function(e){he.asn1.x509.Time.superclass.constructor.call(this);var t=he.asn1,n=t.DERUTCTime,r=t.DERGeneralizedTime;this.setTimeParams=function(e){this.timeParams=e},this.getEncodedHex=function(){var e=null;return e=null!=this.timeParams?"utc"==this.type?new n(this.timeParams):new r(this.timeParams):"utc"==this.type?new n:new r,this.TLV=e.getEncodedHex(),this.TLV},this.type="utc",void 0!==e&&(void 0!==e.type?this.type=e.type:void 0!==e.str&&(e.str.match(/^[0-9]{12}Z$/)&&(this.type="utc"),e.str.match(/^[0-9]{14}Z$/)&&(this.type="gen")),this.timeParams=e)},i.lang.extend(he.asn1.x509.Time,he.asn1.ASN1Object),he.asn1.x509.AlgorithmIdentifier=function(e){he.asn1.x509.AlgorithmIdentifier.superclass.constructor.call(this),this.nameAlg=null,this.asn1Alg=null,this.asn1Params=null,this.paramEmpty=!1;var t=he.asn1;if(this.getEncodedHex=function(){if(null===this.nameAlg&&null===this.asn1Alg)throw"algorithm not specified";null!==this.nameAlg&&null===this.asn1Alg&&(this.asn1Alg=t.x509.OID.name2obj(this.nameAlg));var e=[this.asn1Alg];null!==this.asn1Params&&e.push(this.asn1Params);var n=new t.DERSequence({array:e});return this.hTLV=n.getEncodedHex(),this.hTLV},void 0!==e&&(void 0!==e.name&&(this.nameAlg=e.name),void 0!==e.asn1params&&(this.asn1Params=e.asn1params),void 0!==e.paramempty&&(this.paramEmpty=e.paramempty)),null===this.asn1Params&&!1===this.paramEmpty&&null!==this.nameAlg){var n=this.nameAlg.toLowerCase();"withdsa"!==n.substr(-7,7)&&"withecdsa"!==n.substr(-9,9)&&(this.asn1Params=new t.DERNull)}},i.lang.extend(he.asn1.x509.AlgorithmIdentifier,he.asn1.ASN1Object),he.asn1.x509.GeneralName=function(e){he.asn1.x509.GeneralName.superclass.constructor.call(this);var t={rfc822:"81",dns:"82",dn:"a4",uri:"86",ip:"87"},n=he.asn1,r=n.DEROctetString,i=n.DERIA5String,o=n.DERTaggedObject,s=n.ASN1Object,a=n.x509.X500Name,u=De;this.explicit=!1,this.setByParam=function(e){var n=null;if(void 0!==e){if(void 0!==e.rfc822&&(this.type="rfc822",n=new i({str:e[this.type]})),void 0!==e.dns&&(this.type="dns",n=new i({str:e[this.type]})),void 0!==e.uri&&(this.type="uri",n=new i({str:e[this.type]})),void 0!==e.dn&&(this.type="dn",this.explicit=!0,n=new a({str:e.dn})),void 0!==e.ldapdn&&(this.type="dn",this.explicit=!0,n=new a({ldapstr:e.ldapdn})),void 0!==e.certissuer){this.type="dn",this.explicit=!0;var c=null;if((h=e.certissuer).match(/^[0-9A-Fa-f]+$/),-1!=h.indexOf("-----BEGIN ")&&(c=u(h)),null==c)throw"certissuer param not cert";(d=new We).hex=c;var l=d.getIssuerHex();(n=new s).hTLV=l}if(void 0!==e.certsubj){var h,d;if(this.type="dn",this.explicit=!0,c=null,(h=e.certsubj).match(/^[0-9A-Fa-f]+$/),-1!=h.indexOf("-----BEGIN ")&&(c=u(h)),null==c)throw"certsubj param not cert";(d=new We).hex=c,l=d.getSubjectHex(),(n=new s).hTLV=l}if(void 0!==e.ip){this.type="ip",this.explicit=!1;var p,f=e.ip,g="malformed IP address";if(f.match(/^[0-9.]+[.][0-9.]+$/)){if(8!==(p=Ue("["+f.split(".").join(",")+"]")).length)throw g}else if(f.match(/^[0-9A-Fa-f:]+:[0-9A-Fa-f:]+$/))p=je(f);else{if(!f.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw g;p=f}n=new r({hex:p})}if(null==this.type)throw"unsupported type in params="+e;this.asn1Obj=new o({explicit:this.explicit,tag:t[this.type],obj:n})}},this.getEncodedHex=function(){return this.asn1Obj.getEncodedHex()},void 0!==e&&this.setByParam(e)},i.lang.extend(he.asn1.x509.GeneralName,he.asn1.ASN1Object),he.asn1.x509.GeneralNames=function(e){he.asn1.x509.GeneralNames.superclass.constructor.call(this);var t=he.asn1;this.setByParamArray=function(e){for(var n=0;n<e.length;n++){var r=new t.x509.GeneralName(e[n]);this.asn1Array.push(r)}},this.getEncodedHex=function(){return new t.DERSequence({array:this.asn1Array}).getEncodedHex()},this.asn1Array=new Array,void 0!==e&&this.setByParamArray(e)},i.lang.extend(he.asn1.x509.GeneralNames,he.asn1.ASN1Object),he.asn1.x509.DistributionPointName=function(e){he.asn1.x509.DistributionPointName.superclass.constructor.call(this);var t=he.asn1,n=t.DERTaggedObject;if(this.getEncodedHex=function(){if("full"!=this.type)throw"currently type shall be 'full': "+this.type;return this.asn1Obj=new n({explicit:!1,tag:this.tag,obj:this.asn1V}),this.hTLV=this.asn1Obj.getEncodedHex(),this.hTLV},void 0!==e){if(!t.x509.GeneralNames.prototype.isPrototypeOf(e))throw"This class supports GeneralNames only as argument";this.type="full",this.tag="a0",this.asn1V=e}},i.lang.extend(he.asn1.x509.DistributionPointName,he.asn1.ASN1Object),he.asn1.x509.DistributionPoint=function(e){he.asn1.x509.DistributionPoint.superclass.constructor.call(this);var t=he.asn1;this.getEncodedHex=function(){var e=new t.DERSequence;if(null!=this.asn1DP){var n=new t.DERTaggedObject({explicit:!0,tag:"a0",obj:this.asn1DP});e.appendASN1Object(n)}return this.hTLV=e.getEncodedHex(),this.hTLV},void 0!==e&&void 0!==e.dpobj&&(this.asn1DP=e.dpobj)},i.lang.extend(he.asn1.x509.DistributionPoint,he.asn1.ASN1Object),he.asn1.x509.OID=new function(e){this.atype2oidList={CN:"2.5.4.3",L:"2.5.4.7",ST:"2.5.4.8",O:"2.5.4.10",OU:"2.5.4.11",C:"2.5.4.6",STREET:"2.5.4.9",DC:"0.9.2342.19200300.100.1.25",UID:"0.9.2342.19200300.100.1.1",SN:"2.5.4.4",T:"2.5.4.12",DN:"2.5.4.49",E:"1.2.840.113549.1.9.1",description:"2.5.4.13",businessCategory:"2.5.4.15",postalCode:"2.5.4.17",serialNumber:"2.5.4.5",uniqueIdentifier:"2.5.4.45",organizationIdentifier:"2.5.4.97",jurisdictionOfIncorporationL:"1.3.6.1.4.1.311.60.2.1.1",jurisdictionOfIncorporationSP:"1.3.6.1.4.1.311.60.2.1.2",jurisdictionOfIncorporationC:"1.3.6.1.4.1.311.60.2.1.3"},this.name2oidList={sha1:"1.3.14.3.2.26",sha256:"2.16.840.1.101.3.4.2.1",sha384:"2.16.840.1.101.3.4.2.2",sha512:"2.16.840.1.101.3.4.2.3",sha224:"2.16.840.1.101.3.4.2.4",md5:"1.2.840.113549.2.5",md2:"1.3.14.7.2.2.1",ripemd160:"1.3.36.3.2.1",MD2withRSA:"1.2.840.113549.1.1.2",MD4withRSA:"1.2.840.113549.1.1.3",MD5withRSA:"1.2.840.113549.1.1.4",SHA1withRSA:"1.2.840.113549.1.1.5",SHA224withRSA:"1.2.840.113549.1.1.14",SHA256withRSA:"1.2.840.113549.1.1.11",SHA384withRSA:"1.2.840.113549.1.1.12",SHA512withRSA:"1.2.840.113549.1.1.13",SHA1withECDSA:"1.2.840.10045.4.1",SHA224withECDSA:"1.2.840.10045.4.3.1",SHA256withECDSA:"1.2.840.10045.4.3.2",SHA384withECDSA:"1.2.840.10045.4.3.3",SHA512withECDSA:"1.2.840.10045.4.3.4",dsa:"1.2.840.10040.4.1",SHA1withDSA:"1.2.840.10040.4.3",SHA224withDSA:"2.16.840.1.101.3.4.3.1",SHA256withDSA:"2.16.840.1.101.3.4.3.2",rsaEncryption:"1.2.840.113549.1.1.1",commonName:"2.5.4.3",countryName:"2.5.4.6",localityName:"2.5.4.7",stateOrProvinceName:"2.5.4.8",streetAddress:"2.5.4.9",organizationName:"2.5.4.10",organizationalUnitName:"2.5.4.11",domainComponent:"0.9.2342.19200300.100.1.25",userId:"0.9.2342.19200300.100.1.1",surname:"2.5.4.4",title:"2.5.4.12",distinguishedName:"2.5.4.49",emailAddress:"1.2.840.113549.1.9.1",description:"2.5.4.13",businessCategory:"2.5.4.15",postalCode:"2.5.4.17",uniqueIdentifier:"2.5.4.45",organizationIdentifier:"2.5.4.97",jurisdictionOfIncorporationL:"1.3.6.1.4.1.311.60.2.1.1",jurisdictionOfIncorporationSP:"1.3.6.1.4.1.311.60.2.1.2",jurisdictionOfIncorporationC:"1.3.6.1.4.1.311.60.2.1.3",subjectKeyIdentifier:"2.5.29.14",keyUsage:"2.5.29.15",subjectAltName:"2.5.29.17",issuerAltName:"2.5.29.18",basicConstraints:"2.5.29.19",nameConstraints:"2.5.29.30",cRLDistributionPoints:"2.5.29.31",certificatePolicies:"2.5.29.32",authorityKeyIdentifier:"2.5.29.35",policyConstraints:"2.5.29.36",extKeyUsage:"2.5.29.37",authorityInfoAccess:"1.3.6.1.5.5.7.1.1",ocsp:"1.3.6.1.5.5.7.48.1",caIssuers:"1.3.6.1.5.5.7.48.2",anyExtendedKeyUsage:"2.5.29.37.0",serverAuth:"1.3.6.1.5.5.7.3.1",clientAuth:"1.3.6.1.5.5.7.3.2",codeSigning:"1.3.6.1.5.5.7.3.3",emailProtection:"1.3.6.1.5.5.7.3.4",timeStamping:"1.3.6.1.5.5.7.3.8",ocspSigning:"1.3.6.1.5.5.7.3.9",ecPublicKey:"1.2.840.10045.2.1",secp256r1:"1.2.840.10045.3.1.7",secp256k1:"1.3.132.0.10",secp384r1:"1.3.132.0.34",pkcs5PBES2:"1.2.840.113549.1.5.13",pkcs5PBKDF2:"1.2.840.113549.1.5.12","des-EDE3-CBC":"1.2.840.113549.3.7",data:"1.2.840.113549.1.7.1","signed-data":"1.2.840.113549.1.7.2","enveloped-data":"1.2.840.113549.1.7.3","digested-data":"1.2.840.113549.1.7.5","encrypted-data":"1.2.840.113549.1.7.6","authenticated-data":"1.2.840.113549.1.9.16.1.2",tstinfo:"1.2.840.113549.1.9.16.1.4",extensionRequest:"1.2.840.113549.1.9.14"},this.objCache={},this.name2obj=function(e){if(void 0!==this.objCache[e])return this.objCache[e];if(void 0===this.name2oidList[e])throw"Name of ObjectIdentifier not defined: "+e;var t=new he.asn1.DERObjectIdentifier({oid:this.name2oidList[e]});return this.objCache[e]=t,t},this.atype2obj=function(e){if(void 0!==this.objCache[e])return this.objCache[e];if(void 0===this.atype2oidList[e])throw"AttributeType name undefined: "+e;var t=new he.asn1.DERObjectIdentifier({oid:this.atype2oidList[e]});return this.objCache[e]=t,t}},he.asn1.x509.OID.oid2name=function(e){var t=he.asn1.x509.OID.name2oidList;for(var n in t)if(t[n]==e)return n;return""},he.asn1.x509.OID.oid2atype=function(e){var t=he.asn1.x509.OID.atype2oidList;for(var n in t)if(t[n]==e)return n;return e},he.asn1.x509.OID.name2oid=function(e){var t=he.asn1.x509.OID.name2oidList;return void 0===t[e]?"":t[e]},he.asn1.x509.X509Util={},he.asn1.x509.X509Util.newCertPEM=function(e){var t=he.asn1.x509,n=t.Certificate,r=new(0,t.TBSCertificate);if(void 0===e.serial)throw"serial number undefined.";if(r.setSerialNumberByParam(e.serial),"string"!=typeof e.sigalg.name)throw"unproper signature algorithm name";if(r.setSignatureAlgByParam(e.sigalg),void 0===e.issuer)throw"issuer name undefined.";if(r.setIssuerByParam(e.issuer),void 0===e.notbefore)throw"notbefore undefined.";if(r.setNotBeforeByParam(e.notbefore),void 0===e.notafter)throw"notafter undefined.";if(r.setNotAfterByParam(e.notafter),void 0===e.subject)throw"subject name undefined.";if(r.setSubjectByParam(e.subject),void 0===e.sbjpubkey)throw"subject public key undefined.";if(r.setSubjectPublicKeyByGetKey(e.sbjpubkey),void 0!==e.ext&&void 0!==e.ext.length)for(var i=0;i<e.ext.length;i++)for(key in e.ext[i])r.appendExtensionByName(key,e.ext[i][key]);if(void 0===e.cakey&&void 0===e.sighex)throw"param cakey and sighex undefined.";var o=null;return e.cakey&&(o=new n({tbscertobj:r,prvkeyobj:!0===e.cakey.isPrivate?e.cakey:Le.getKey.apply(null,e.cakey)})).sign(),e.sighex&&(o=new n({tbscertobj:r})).setSignatureHex(e.sighex),o.getPEMString()},void 0!==he&&he||(he={}),void 0!==he.lang&&he.lang||(he.lang={}),he.lang.String=function(){},"function"==typeof Buffer?(de=function(e){return be(new Buffer(e,"utf8").toString("base64"))},pe=function(e){return new Buffer(we(e),"base64").toString("utf8")}):(de=function(e){return _e(Re(Be(e)))},pe=function(e){return decodeURIComponent(Oe(Se(e)))}),he.lang.String.isInteger=function(e){return!!e.match(/^[0-9]+$/)||!!e.match(/^-[0-9]+$/)},he.lang.String.isHex=function(e){return!(e.length%2!=0||!e.match(/^[0-9a-f]+$/)&&!e.match(/^[0-9A-F]+$/))},he.lang.String.isBase64=function(e){return!(!(e=e.replace(/\s+/g,"")).match(/^[0-9A-Za-z+\/]+={0,3}$/)||e.length%4!=0)},he.lang.String.isBase64URL=function(e){return!e.match(/[+/=]/)&&(e=we(e),he.lang.String.isBase64(e))},he.lang.String.isIntegerArray=function(e){return!!(e=e.replace(/\s+/g,"")).match(/^\[[0-9,]+\]$/)},void 0!==he&&he||(he={}),void 0!==he.crypto&&he.crypto||(he.crypto={}),he.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:v.algo.MD5,sha1:v.algo.SHA1,sha224:v.algo.SHA224,sha256:v.algo.SHA256,sha384:v.algo.SHA384,sha512:v.algo.SHA512,ripemd160:v.algo.RIPEMD160},this.getDigestInfoHex=function(e,t){if(void 0===this.DIGESTINFOHEAD[t])throw"alg not supported in Util.DIGESTINFOHEAD: "+t;return this.DIGESTINFOHEAD[t]+e},this.getPaddedDigestInfoHex=function(e,t,n){var r=this.getDigestInfoHex(e,t),i=n/4;if(r.length+22>i)throw"key is too short for SigAlg: keylen="+n+","+t;for(var o="0001",s="00"+r,a="",u=i-o.length-s.length,c=0;c<u;c+=2)a+="ff";return o+a+s},this.hashString=function(e,t){return new he.crypto.MessageDigest({alg:t}).digestString(e)},this.hashHex=function(e,t){return new he.crypto.MessageDigest({alg:t}).digestHex(e)},this.sha1=function(e){return new he.crypto.MessageDigest({alg:"sha1",prov:"cryptojs"}).digestString(e)},this.sha256=function(e){return new he.crypto.MessageDigest({alg:"sha256",prov:"cryptojs"}).digestString(e)},this.sha256Hex=function(e){return new he.crypto.MessageDigest({alg:"sha256",prov:"cryptojs"}).digestHex(e)},this.sha512=function(e){return new he.crypto.MessageDigest({alg:"sha512",prov:"cryptojs"}).digestString(e)},this.sha512Hex=function(e){return new he.crypto.MessageDigest({alg:"sha512",prov:"cryptojs"}).digestHex(e)}},he.crypto.Util.md5=function(e){return new he.crypto.MessageDigest({alg:"md5",prov:"cryptojs"}).digestString(e)},he.crypto.Util.ripemd160=function(e){return new he.crypto.MessageDigest({alg:"ripemd160",prov:"cryptojs"}).digestString(e)},he.crypto.Util.SECURERANDOMGEN=new re,he.crypto.Util.getRandomHexOfNbytes=function(e){var t=new Array(e);return he.crypto.Util.SECURERANDOMGEN.nextBytes(t),ye(t)},he.crypto.Util.getRandomBigIntegerOfNbytes=function(e){return new E(he.crypto.Util.getRandomHexOfNbytes(e),16)},he.crypto.Util.getRandomHexOfNbits=function(e){var t=e%8,n=new Array((e-t)/8+1);return he.crypto.Util.SECURERANDOMGEN.nextBytes(n),n[0]=(255<<t&255^255)&n[0],ye(n)},he.crypto.Util.getRandomBigIntegerOfNbits=function(e){return new E(he.crypto.Util.getRandomHexOfNbits(e),16)},he.crypto.Util.getRandomBigIntegerZeroToMax=function(e){for(var t=e.bitLength();;){var n=he.crypto.Util.getRandomBigIntegerOfNbits(t);if(-1!=e.compareTo(n))return n}},he.crypto.Util.getRandomBigIntegerMinToMax=function(e,t){var n=e.compareTo(t);if(1==n)throw"biMin is greater than biMax";if(0==n)return e;var r=t.subtract(e);return he.crypto.Util.getRandomBigIntegerZeroToMax(r).add(e)},he.crypto.MessageDigest=function(e){this.setAlgAndProvider=function(e,t){if(null!==(e=he.crypto.MessageDigest.getCanonicalAlgName(e))&&void 0===t&&(t=he.crypto.Util.DEFAULTPROVIDER[e]),-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(e)&&"cryptojs"==t){try{this.md=he.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[e].create()}catch(t){throw"setAlgAndProvider hash alg set fail alg="+e+"/"+t}this.updateString=function(e){this.md.update(e)},this.updateHex=function(e){var t=v.enc.Hex.parse(e);this.md.update(t)},this.digest=function(){return this.md.finalize().toString(v.enc.Hex)},this.digestString=function(e){return this.updateString(e),this.digest()},this.digestHex=function(e){return this.updateHex(e),this.digest()}}if(-1!=":sha256:".indexOf(e)&&"sjcl"==t){try{this.md=new sjcl.hash.sha256}catch(t){throw"setAlgAndProvider hash alg set fail alg="+e+"/"+t}this.updateString=function(e){this.md.update(e)},this.updateHex=function(e){var t=sjcl.codec.hex.toBits(e);this.md.update(t)},this.digest=function(){var e=this.md.finalize();return sjcl.codec.hex.fromBits(e)},this.digestString=function(e){return this.updateString(e),this.digest()},this.digestHex=function(e){return this.updateHex(e),this.digest()}}},this.updateString=function(e){throw"updateString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.updateHex=function(e){throw"updateHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digest=function(){throw"digest() not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestString=function(e){throw"digestString(str) not supported for this alg/prov: "+this.algName+"/"+this.provName},this.digestHex=function(e){throw"digestHex(hex) not supported for this alg/prov: "+this.algName+"/"+this.provName},void 0!==e&&void 0!==e.alg&&(this.algName=e.alg,void 0===e.prov&&(this.provName=he.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName))},he.crypto.MessageDigest.getCanonicalAlgName=function(e){return"string"==typeof e&&(e=(e=e.toLowerCase()).replace(/-/,"")),e},he.crypto.MessageDigest.getHashLength=function(e){var t=he.crypto.MessageDigest,n=t.getCanonicalAlgName(e);if(void 0===t.HASHLENGTH[n])throw"not supported algorithm: "+e;return t.HASHLENGTH[n]},he.crypto.MessageDigest.HASHLENGTH={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,ripemd160:20},he.crypto.Mac=function(e){this.setAlgAndProvider=function(e,t){if(null==(e=e.toLowerCase())&&(e="hmacsha1"),"hmac"!=(e=e.toLowerCase()).substr(0,4))throw"setAlgAndProvider unsupported HMAC alg: "+e;void 0===t&&(t=he.crypto.Util.DEFAULTPROVIDER[e]),this.algProv=e+"/"+t;var n=e.substr(4);if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(n)&&"cryptojs"==t){try{this.mac=v.algo.HMAC.create(he.crypto.Util.CRYPTOJSMESSAGEDIGESTNAME[n],this.pass)}catch(e){throw"setAlgAndProvider hash alg set fail hashAlg="+n+"/"+e}this.updateString=function(e){this.mac.update(e)},this.updateHex=function(e){var t=v.enc.Hex.parse(e);this.mac.update(t)},this.doFinal=function(){return this.mac.finalize().toString(v.enc.Hex)},this.doFinalString=function(e){return this.updateString(e),this.doFinal()},this.doFinalHex=function(e){return this.updateHex(e),this.doFinal()}}},this.updateString=function(e){throw"updateString(str) not supported for this alg/prov: "+this.algProv},this.updateHex=function(e){throw"updateHex(hex) not supported for this alg/prov: "+this.algProv},this.doFinal=function(){throw"digest() not supported for this alg/prov: "+this.algProv},this.doFinalString=function(e){throw"digestString(str) not supported for this alg/prov: "+this.algProv},this.doFinalHex=function(e){throw"digestHex(hex) not supported for this alg/prov: "+this.algProv},this.setPassword=function(e){if("string"==typeof e){var t=e;return e.length%2!=1&&e.match(/^[0-9A-Fa-f]+$/)||(t=Ce(e)),void(this.pass=v.enc.Hex.parse(t))}if("object"!=typeof e)throw"KJUR.crypto.Mac unsupported password type: "+e;if(t=null,void 0!==e.hex){if(e.hex.length%2!=0||!e.hex.match(/^[0-9A-Fa-f]+$/))throw"Mac: wrong hex password: "+e.hex;t=e.hex}if(void 0!==e.utf8&&(t=Ee(e.utf8)),void 0!==e.rstr&&(t=Ce(e.rstr)),void 0!==e.b64&&(t=_(e.b64)),void 0!==e.b64u&&(t=Se(e.b64u)),null==t)throw"KJUR.crypto.Mac unsupported password type: "+e;this.pass=v.enc.Hex.parse(t)},void 0!==e&&(void 0!==e.pass&&this.setPassword(e.pass),void 0!==e.alg&&(this.algName=e.alg,void 0===e.prov&&(this.provName=he.crypto.Util.DEFAULTPROVIDER[this.algName]),this.setAlgAndProvider(this.algName,this.provName)))},he.crypto.Signature=function(e){var t=null;if(this._setAlgNames=function(){var e=this.algName.match(/^(.+)with(.+)$/);e&&(this.mdAlgName=e[1].toLowerCase(),this.pubkeyAlgName=e[2].toLowerCase())},this._zeroPaddingOfSignature=function(e,t){for(var n="",r=t/4-e.length,i=0;i<r;i++)n+="0";return n+e},this.setAlgAndProvider=function(e,t){if(this._setAlgNames(),"cryptojs/jsrsa"!=t)throw"provider not supported: "+t;if(-1!=":md5:sha1:sha224:sha256:sha384:sha512:ripemd160:".indexOf(this.mdAlgName)){try{this.md=new he.crypto.MessageDigest({alg:this.mdAlgName})}catch(e){throw"setAlgAndProvider hash alg set fail alg="+this.mdAlgName+"/"+e}this.init=function(e,t){var n=null;try{n=void 0===t?Le.getKey(e):Le.getKey(e,t)}catch(e){throw"init failed:"+e}if(!0===n.isPrivate)this.prvKey=n,this.state="SIGN";else{if(!0!==n.isPublic)throw"init failed.:"+n;this.pubKey=n,this.state="VERIFY"}},this.updateString=function(e){this.md.updateString(e)},this.updateHex=function(e){this.md.updateHex(e)},this.sign=function(){if(this.sHashHex=this.md.digest(),void 0!==this.ecprvhex&&void 0!==this.eccurvename){var e=new he.crypto.ECDSA({curve:this.eccurvename});this.hSign=e.signHex(this.sHashHex,this.ecprvhex)}else if(this.prvKey instanceof se&&"rsaandmgf1"===this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHashPSS(this.sHashHex,this.mdAlgName,this.pssSaltLen);else if(this.prvKey instanceof se&&"rsa"===this.pubkeyAlgName)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex,this.mdAlgName);else if(this.prvKey instanceof he.crypto.ECDSA)this.hSign=this.prvKey.signWithMessageHash(this.sHashHex);else{if(!(this.prvKey instanceof he.crypto.DSA))throw"Signature: unsupported private key alg: "+this.pubkeyAlgName;this.hSign=this.prvKey.signWithMessageHash(this.sHashHex)}return this.hSign},this.signString=function(e){return this.updateString(e),this.sign()},this.signHex=function(e){return this.updateHex(e),this.sign()},this.verify=function(e){if(this.sHashHex=this.md.digest(),void 0!==this.ecpubhex&&void 0!==this.eccurvename)return new he.crypto.ECDSA({curve:this.eccurvename}).verifyHex(this.sHashHex,e,this.ecpubhex);if(this.pubKey instanceof se&&"rsaandmgf1"===this.pubkeyAlgName)return this.pubKey.verifyWithMessageHashPSS(this.sHashHex,e,this.mdAlgName,this.pssSaltLen);if(this.pubKey instanceof se&&"rsa"===this.pubkeyAlgName)return this.pubKey.verifyWithMessageHash(this.sHashHex,e);if(void 0!==he.crypto.ECDSA&&this.pubKey instanceof he.crypto.ECDSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,e);if(void 0!==he.crypto.DSA&&this.pubKey instanceof he.crypto.DSA)return this.pubKey.verifyWithMessageHash(this.sHashHex,e);throw"Signature: unsupported public key alg: "+this.pubkeyAlgName}}},this.init=function(e,t){throw"init(key, pass) not supported for this alg:prov="+this.algProvName},this.updateString=function(e){throw"updateString(str) not supported for this alg:prov="+this.algProvName},this.updateHex=function(e){throw"updateHex(hex) not supported for this alg:prov="+this.algProvName},this.sign=function(){throw"sign() not supported for this alg:prov="+this.algProvName},this.signString=function(e){throw"digestString(str) not supported for this alg:prov="+this.algProvName},this.signHex=function(e){throw"digestHex(hex) not supported for this alg:prov="+this.algProvName},this.verify=function(e){throw"verify(hSigVal) not supported for this alg:prov="+this.algProvName},this.initParams=e,void 0!==e&&(void 0!==e.alg&&(this.algName=e.alg,this.provName=void 0===e.prov?he.crypto.Util.DEFAULTPROVIDER[this.algName]:e.prov,this.algProvName=this.algName+":"+this.provName,this.setAlgAndProvider(this.algName,this.provName),this._setAlgNames()),void 0!==e.psssaltlen&&(this.pssSaltLen=e.psssaltlen),void 0!==e.prvkeypem)){if(void 0!==e.prvkeypas)throw"both prvkeypem and prvkeypas parameters not supported";try{t=Le.getKey(e.prvkeypem),this.init(t)}catch(e){throw"fatal error to load pem private key: "+e}}},he.crypto.Cipher=function(e){},he.crypto.Cipher.encrypt=function(e,t,n){if(t instanceof se&&t.isPublic){var r=he.crypto.Cipher.getAlgByKeyAndName(t,n);if("RSA"===r)return t.encrypt(e);if("RSAOAEP"===r)return t.encryptOAEP(e,"sha1");var i=r.match(/^RSAOAEP(\d+)$/);if(null!==i)return t.encryptOAEP(e,"sha"+i[1]);throw"Cipher.encrypt: unsupported algorithm for RSAKey: "+n}throw"Cipher.encrypt: unsupported key or algorithm"},he.crypto.Cipher.decrypt=function(e,t,n){if(t instanceof se&&t.isPrivate){var r=he.crypto.Cipher.getAlgByKeyAndName(t,n);if("RSA"===r)return t.decrypt(e);if("RSAOAEP"===r)return t.decryptOAEP(e,"sha1");var i=r.match(/^RSAOAEP(\d+)$/);if(null!==i)return t.decryptOAEP(e,"sha"+i[1]);throw"Cipher.decrypt: unsupported algorithm for RSAKey: "+n}throw"Cipher.decrypt: unsupported key or algorithm"},he.crypto.Cipher.getAlgByKeyAndName=function(e,t){if(e instanceof se){if(-1!=":RSA:RSAOAEP:RSAOAEP224:RSAOAEP256:RSAOAEP384:RSAOAEP512:".indexOf(t))return t;if(null===t||void 0===t)return"RSA";throw"getAlgByKeyAndName: not supported algorithm name for RSAKey: "+t}throw"getAlgByKeyAndName: not supported algorithm name: "+t},he.crypto.OID=new function(){this.oidhex2name={"2a864886f70d010101":"rsaEncryption","2a8648ce3d0201":"ecPublicKey","2a8648ce380401":"dsa","2a8648ce3d030107":"secp256r1","2b8104001f":"secp192k1","2b81040021":"secp224r1","2b8104000a":"secp256k1","2b81040023":"secp521r1","2b81040022":"secp384r1","2a8648ce380403":"SHA1withDSA","608648016503040301":"SHA224withDSA","608648016503040302":"SHA256withDSA"}},void 0!==he&&he||(he={}),void 0!==he.crypto&&he.crypto||(he.crypto={}),he.crypto.ECDSA=function(e){var t=new re;this.type="EC",this.isPrivate=!1,this.isPublic=!1,this.getBigRandom=function(e){return new E(e.bitLength(),t).mod(e.subtract(E.ONE)).add(E.ONE)},this.setNamedCurve=function(e){this.ecparams=he.crypto.ECParameterDB.getByName(e),this.prvKeyHex=null,this.pubKeyHex=null,this.curveName=e},this.setPrivateKeyHex=function(e){this.isPrivate=!0,this.prvKeyHex=e},this.setPublicKeyHex=function(e){this.isPublic=!0,this.pubKeyHex=e},this.getPublicKeyXYHex=function(){var e=this.pubKeyHex;if("04"!==e.substr(0,2))throw"this method supports uncompressed format(04) only";var t=this.ecparams.keylen/4;if(e.length!==2+2*t)throw"malformed public key hex length";var n={};return n.x=e.substr(2,t),n.y=e.substr(2+t),n},this.getShortNISTPCurveName=function(){var e=this.curveName;return"secp256r1"===e||"NIST P-256"===e||"P-256"===e||"prime256v1"===e?"P-256":"secp384r1"===e||"NIST P-384"===e||"P-384"===e?"P-384":null},this.generateKeyPairHex=function(){var e=this.getBigRandom(this.ecparams.n),t=this.ecparams.G.multiply(e),n=t.getX().toBigInteger(),r=t.getY().toBigInteger(),i=this.ecparams.keylen/4,o=("0000000000"+e.toString(16)).slice(-i),s="04"+("0000000000"+n.toString(16)).slice(-i)+("0000000000"+r.toString(16)).slice(-i);return this.setPrivateKeyHex(o),this.setPublicKeyHex(s),{ecprvhex:o,ecpubhex:s}},this.signWithMessageHash=function(e){return this.signHex(e,this.prvKeyHex)},this.signHex=function(e,t){var n=new E(t,16),r=this.ecparams.n,i=new E(e,16);do{var o=this.getBigRandom(r),s=this.ecparams.G.multiply(o).getX().toBigInteger().mod(r)}while(s.compareTo(E.ZERO)<=0);var a=o.modInverse(r).multiply(i.add(n.multiply(s))).mod(r);return he.crypto.ECDSA.biRSSigToASN1Sig(s,a)},this.sign=function(e,t){var n=t,r=this.ecparams.n,i=E.fromByteArrayUnsigned(e);do{var o=this.getBigRandom(r),s=this.ecparams.G.multiply(o).getX().toBigInteger().mod(r)}while(s.compareTo(E.ZERO)<=0);var a=o.modInverse(r).multiply(i.add(n.multiply(s))).mod(r);return this.serializeSig(s,a)},this.verifyWithMessageHash=function(e,t){return this.verifyHex(e,t,this.pubKeyHex)},this.verifyHex=function(e,t,n){var r,i,o,s=he.crypto.ECDSA.parseSigHex(t);r=s.r,i=s.s,o=ue.decodeFromHex(this.ecparams.curve,n);var a=new E(e,16);return this.verifyRaw(a,r,i,o)},this.verify=function(e,t,n){var r,i,o;if(Bitcoin.Util.isArray(t)){var s=this.parseSig(t);r=s.r,i=s.s}else{if("object"!=typeof t||!t.r||!t.s)throw"Invalid value for signature";r=t.r,i=t.s}if(n instanceof ue)o=n;else{if(!Bitcoin.Util.isArray(n))throw"Invalid format for pubkey value, must be byte array or ECPointFp";o=ue.decodeFrom(this.ecparams.curve,n)}var a=E.fromByteArrayUnsigned(e);return this.verifyRaw(a,r,i,o)},this.verifyRaw=function(e,t,n,r){var i=this.ecparams.n,o=this.ecparams.G;if(t.compareTo(E.ONE)<0||t.compareTo(i)>=0)return!1;if(n.compareTo(E.ONE)<0||n.compareTo(i)>=0)return!1;var s=n.modInverse(i),a=e.multiply(s).mod(i),u=t.multiply(s).mod(i);return o.multiply(a).add(r.multiply(u)).getX().toBigInteger().mod(i).equals(t)},this.serializeSig=function(e,t){var n=e.toByteArraySigned(),r=t.toByteArraySigned(),i=[];return i.push(2),i.push(n.length),(i=i.concat(n)).push(2),i.push(r.length),(i=i.concat(r)).unshift(i.length),i.unshift(48),i},this.parseSig=function(e){var t;if(48!=e[0])throw new Error("Signature not a valid DERSequence");if(2!=e[t=2])throw new Error("First element in signature must be a DERInteger");var n=e.slice(t+2,t+2+e[t+1]);if(2!=e[t+=2+e[t+1]])throw new Error("Second element in signature must be a DERInteger");var r=e.slice(t+2,t+2+e[t+1]);return t+=2+e[t+1],{r:E.fromByteArrayUnsigned(n),s:E.fromByteArrayUnsigned(r)}},this.parseSigCompact=function(e){if(65!==e.length)throw"Signature has the wrong length";var t=e[0]-27;if(t<0||t>7)throw"Invalid signature type";var n=this.ecparams.n;return{r:E.fromByteArrayUnsigned(e.slice(1,33)).mod(n),s:E.fromByteArrayUnsigned(e.slice(33,65)).mod(n),i:t}},this.readPKCS5PrvKeyHex=function(e){var t,n,r,i=he.crypto.ECDSA.getName,o=fe.getVbyList;if(!1===fe.isASN1HEX(e))throw"not ASN.1 hex string";try{t=o(e,0,[2,0],"06"),n=o(e,0,[1],"04");try{r=o(e,0,[3,0],"03").substr(2)}catch(e){}}catch(e){throw"malformed PKCS#1/5 plain ECC private key"}if(this.curveName=i(t),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(r),this.setPrivateKeyHex(n),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(e){var t,n,r,i=he.crypto.ECDSA.getName,o=fe.getVbyList;if(!1===fe.isASN1HEX(e))throw"not ASN.1 hex string";try{o(e,0,[1,0],"06"),t=o(e,0,[1,1],"06"),n=o(e,0,[2,0,1],"04");try{r=o(e,0,[2,0,2,0],"03").substr(2)}catch(e){}}catch(e){throw"malformed PKCS#8 plain ECC private key"}if(this.curveName=i(t),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(r),this.setPrivateKeyHex(n),this.isPublic=!1},this.readPKCS8PubKeyHex=function(e){var t,n,r=he.crypto.ECDSA.getName,i=fe.getVbyList;if(!1===fe.isASN1HEX(e))throw"not ASN.1 hex string";try{i(e,0,[0,0],"06"),t=i(e,0,[0,1],"06"),n=i(e,0,[1],"03").substr(2)}catch(e){throw"malformed PKCS#8 ECC public key"}if(this.curveName=r(t),null===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(n)},this.readCertPubKeyHex=function(e,t){5!==t&&(t=6);var n,r,i=he.crypto.ECDSA.getName,o=fe.getVbyList;if(!1===fe.isASN1HEX(e))throw"not ASN.1 hex string";try{n=o(e,0,[0,t,0,1],"06"),r=o(e,0,[0,t,1],"03").substr(2)}catch(e){throw"malformed X.509 certificate ECC public key"}if(this.curveName=i(n),null===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(r)},void 0!==e&&void 0!==e.curve&&(this.curveName=e.curve),void 0===this.curveName&&(this.curveName="secp256r1"),this.setNamedCurve(this.curveName),void 0!==e&&(void 0!==e.prv&&this.setPrivateKeyHex(e.prv),void 0!==e.pub&&this.setPublicKeyHex(e.pub))},he.crypto.ECDSA.parseSigHex=function(e){var t=he.crypto.ECDSA.parseSigHexInHexRS(e);return{r:new E(t.r,16),s:new E(t.s,16)}},he.crypto.ECDSA.parseSigHexInHexRS=function(e){var t=fe.getChildIdx,n=fe.getV;if("30"!=e.substr(0,2))throw"signature is not a ASN.1 sequence";var r=t(e,0);if(2!=r.length)throw"number of signature ASN.1 sequence elements seem wrong";var i=r[0],o=r[1];if("02"!=e.substr(i,2))throw"1st item of sequene of signature is not ASN.1 integer";if("02"!=e.substr(o,2))throw"2nd item of sequene of signature is not ASN.1 integer";return{r:n(e,i),s:n(e,o)}},he.crypto.ECDSA.asn1SigToConcatSig=function(e){var t=he.crypto.ECDSA.parseSigHexInHexRS(e),n=t.r,r=t.s;if("00"==n.substr(0,2)&&n.length%32==2&&(n=n.substr(2)),"00"==r.substr(0,2)&&r.length%32==2&&(r=r.substr(2)),n.length%32==30&&(n="00"+n),r.length%32==30&&(r="00"+r),n.length%32!=0)throw"unknown ECDSA sig r length error";if(r.length%32!=0)throw"unknown ECDSA sig s length error";return n+r},he.crypto.ECDSA.concatSigToASN1Sig=function(e){if(e.length/2*8%128!=0)throw"unknown ECDSA concatinated r-s sig  length error";var t=e.substr(0,e.length/2),n=e.substr(e.length/2);return he.crypto.ECDSA.hexRSSigToASN1Sig(t,n)},he.crypto.ECDSA.hexRSSigToASN1Sig=function(e,t){var n=new E(e,16),r=new E(t,16);return he.crypto.ECDSA.biRSSigToASN1Sig(n,r)},he.crypto.ECDSA.biRSSigToASN1Sig=function(e,t){var n=he.asn1,r=new n.DERInteger({bigint:e}),i=new n.DERInteger({bigint:t});return new n.DERSequence({array:[r,i]}).getEncodedHex()},he.crypto.ECDSA.getName=function(e){return"2a8648ce3d030107"===e?"secp256r1":"2b8104000a"===e?"secp256k1":"2b81040022"===e?"secp384r1":-1!=="|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(e)?"secp256r1":-1!=="|secp256k1|".indexOf(e)?"secp256k1":-1!=="|secp384r1|NIST P-384|P-384|".indexOf(e)?"secp384r1":null},void 0!==he&&he||(he={}),void 0!==he.crypto&&he.crypto||(he.crypto={}),he.crypto.ECParameterDB=new function(){var e={},t={};function n(e){return new E(e,16)}this.getByName=function(n){var r=n;if(void 0!==t[r]&&(r=t[n]),void 0!==e[r])return e[r];throw"unregistered EC curve name: "+r},this.regist=function(r,i,o,s,a,u,c,l,h,d,p,f){e[r]={};var g=n(o),v=n(s),y=n(a),m=n(u),b=n(c),w=new ce(g,v,y),_=w.decodePointHex("04"+l+h);e[r].name=r,e[r].keylen=i,e[r].curve=w,e[r].G=_,e[r].n=m,e[r].h=b,e[r].oid=p,e[r].info=f;for(var S=0;S<d.length;S++)t[d[S]]=r}},he.crypto.ECParameterDB.regist("secp128r1",128,"FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC","E87579C11079F43DD824993C2CEE5ED3","FFFFFFFE0000000075A30D1B9038A115","1","161FF7528B899B2D0C28607CA52C5B86","CF5AC8395BAFEB13C02DA292DDED7A83",[],"","secp128r1 : SECG curve over a 128 bit prime field"),he.crypto.ECParameterDB.regist("secp160k1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73","0","7","0100000000000000000001B8FA16DFAB9ACA16B6B3","1","3B4C382CE37AA192A4019E763036F4F5DD4D7EBB","938CF935318FDCED6BC28286531733C3F03C4FEE",[],"","secp160k1 : SECG curve over a 160 bit prime field"),he.crypto.ECParameterDB.regist("secp160r1",160,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC","1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45","0100000000000000000001F4C8F927AED3CA752257","1","4A96B5688EF573284664698968C38BB913CBFC82","23A628553168947D59DCC912042351377AC5FB32",[],"","secp160r1 : SECG curve over a 160 bit prime field"),he.crypto.ECParameterDB.regist("secp192k1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37","0","3","FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D","1","DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D","9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D",[]),he.crypto.ECParameterDB.regist("secp192r1",192,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC","64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1","FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831","1","188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012","07192B95FFC8DA78631011ED6B24CDD573F977A11E794811",[]),he.crypto.ECParameterDB.regist("secp224r1",224,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE","B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4","FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D","1","B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21","BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34",[]),he.crypto.ECParameterDB.regist("secp256k1",256,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","0","7","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","1","79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8",[]),he.crypto.ECParameterDB.regist("secp256r1",256,"FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF","FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC","5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B","FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551","1","6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296","4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5",["NIST P-256","P-256","prime256v1"]),he.crypto.ECParameterDB.regist("secp384r1",384,"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFF0000000000000000FFFFFFFC","B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875AC656398D8A2ED19D2A85C8EDD3EC2AEF","FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF581A0DB248B0A77AECEC196ACCC52973","1","AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A385502F25DBF55296C3A545E3872760AB7","3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f",["NIST P-384","P-384"]),he.crypto.ECParameterDB.regist("secp521r1",521,"1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC","051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00","1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409","1","C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66","011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650",["NIST P-521","P-521"]);var Le=function(){var e=function(e,n,r){return t(v.AES,e,n,r)},t=function(e,t,n,r){var i=v.enc.Hex.parse(t),o=v.enc.Hex.parse(n),s=v.enc.Hex.parse(r),a={};a.key=o,a.iv=s,a.ciphertext=i;var u=e.decrypt(a,o,{iv:s});return v.enc.Hex.stringify(u)},n=function(e,t,n){return r(v.AES,e,t,n)},r=function(e,t,n,r){var i=v.enc.Hex.parse(t),o=v.enc.Hex.parse(n),s=v.enc.Hex.parse(r),a=e.encrypt(i,o,{iv:s}),u=v.enc.Hex.parse(a.toString());return v.enc.Base64.stringify(u)},i={"AES-256-CBC":{proc:e,eproc:n,keylen:32,ivlen:16},"AES-192-CBC":{proc:e,eproc:n,keylen:24,ivlen:16},"AES-128-CBC":{proc:e,eproc:n,keylen:16,ivlen:16},"DES-EDE3-CBC":{proc:function(e,n,r){return t(v.TripleDES,e,n,r)},eproc:function(e,t,n){return r(v.TripleDES,e,t,n)},keylen:24,ivlen:8},"DES-CBC":{proc:function(e,n,r){return t(v.DES,e,n,r)},eproc:function(e,t,n){return r(v.DES,e,t,n)},keylen:8,ivlen:8}},o=function(e){var t={},n=e.match(new RegExp("DEK-Info: ([^,]+),([0-9A-Fa-f]+)","m"));n&&(t.cipher=n[1],t.ivsalt=n[2]);var r=e.match(new RegExp("-----BEGIN ([A-Z]+) PRIVATE KEY-----"));r&&(t.type=r[1]);var i=-1,o=0;-1!=e.indexOf("\r\n\r\n")&&(i=e.indexOf("\r\n\r\n"),o=2),-1!=e.indexOf("\n\n")&&(i=e.indexOf("\n\n"),o=1);var s=e.indexOf("-----END");if(-1!=i&&-1!=s){var a=e.substring(i+2*o,s-o);a=a.replace(/\s+/g,""),t.data=a}return t},s=function(e,t,n){for(var r=n.substring(0,16),o=v.enc.Hex.parse(r),s=v.enc.Utf8.parse(t),a=i[e].keylen+i[e].ivlen,u="",c=null;;){var l=v.algo.MD5.create();if(null!=c&&l.update(c),l.update(s),l.update(o),c=l.finalize(),(u+=v.enc.Hex.stringify(c)).length>=2*a)break}var h={};return h.keyhex=u.substr(0,2*i[e].keylen),h.ivhex=u.substr(2*i[e].keylen,2*i[e].ivlen),h},a=function(e,t,n,r){var o=v.enc.Base64.parse(e),s=v.enc.Hex.stringify(o);return(0,i[t].proc)(s,n,r)};return{version:"1.0.0",parsePKCS5PEM:function(e){return o(e)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(e,t,n){return s(e,t,n)},decryptKeyB64:function(e,t,n,r){return a(e,t,n,r)},getDecryptedKeyHex:function(e,t){var n=o(e),r=n.cipher,i=n.ivsalt,u=n.data,c=s(r,t,i);return a(u,r,c.keyhex,i)},getEncryptedPKCS5PEMFromPrvKeyHex:function(e,t,n,r,o){var a="";if(void 0!==r&&null!=r||(r="AES-256-CBC"),void 0===i[r])throw"KEYUTIL unsupported algorithm: "+r;void 0!==o&&null!=o||(o=function(e){var t=v.lib.WordArray.random(i[r].ivlen);return v.enc.Hex.stringify(t)}().toUpperCase());var u=function(e,t,n,r){return(0,i[t].eproc)(e,n,o)}(t,r,s(r,n,o).keyhex);return a="-----BEGIN "+e+" PRIVATE KEY-----\r\n",a+="Proc-Type: 4,ENCRYPTED\r\n",a+="DEK-Info: "+r+","+o+"\r\n",a+="\r\n",(a+=u.replace(/(.{64})/g,"$1\r\n"))+"\r\n-----END "+e+" PRIVATE KEY-----\r\n"},parseHexOfEncryptedPKCS8:function(e){var t=fe.getChildIdx,n=fe.getV,r={},i=t(e,0);if(2!=i.length)throw"malformed format: SEQUENCE(0).items != 2: "+i.length;r.ciphertext=n(e,i[1]);var o=t(e,i[0]);if(2!=o.length)throw"malformed format: SEQUENCE(0.0).items != 2: "+o.length;if("2a864886f70d01050d"!=n(e,o[0]))throw"this only supports pkcs5PBES2";var s=t(e,o[1]);if(2!=o.length)throw"malformed format: SEQUENCE(0.0.1).items != 2: "+s.length;var a=t(e,s[1]);if(2!=a.length)throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+a.length;if("2a864886f70d0307"!=n(e,a[0]))throw"this only supports TripleDES";r.encryptionSchemeAlg="TripleDES",r.encryptionSchemeIV=n(e,a[1]);var u=t(e,s[0]);if(2!=u.length)throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+u.length;if("2a864886f70d01050c"!=n(e,u[0]))throw"this only supports pkcs5PBKDF2";var c=t(e,u[1]);if(c.length<2)throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+c.length;r.pbkdf2Salt=n(e,c[0]);var l=n(e,c[1]);try{r.pbkdf2Iter=parseInt(l,16)}catch(e){throw"malformed format pbkdf2Iter: "+l}return r},getPBKDF2KeyHexFromParam:function(e,t){var n=v.enc.Hex.parse(e.pbkdf2Salt),r=v.PBKDF2(t,n,{keySize:6,iterations:e.pbkdf2Iter});return v.enc.Hex.stringify(r)},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(e,t){var n=De(e,"ENCRYPTED PRIVATE KEY"),r=this.parseHexOfEncryptedPKCS8(n),i=Le.getPBKDF2KeyHexFromParam(r,t),o={};o.ciphertext=v.enc.Hex.parse(r.ciphertext);var s=v.enc.Hex.parse(i),a=v.enc.Hex.parse(r.encryptionSchemeIV),u=v.TripleDES.decrypt(o,s,{iv:a});return v.enc.Hex.stringify(u)},getKeyFromEncryptedPKCS8PEM:function(e,t){var n=this._getPlainPKCS8HexFromEncryptedPKCS8PEM(e,t);return this.getKeyFromPlainPrivatePKCS8Hex(n)},parsePlainPrivatePKCS8Hex:function(e){var t=fe,n=t.getChildIdx,r=t.getV,i={algparam:null};if("30"!=e.substr(0,2))throw"malformed plain PKCS8 private key(code:001)";var o=n(e,0);if(3!=o.length)throw"malformed plain PKCS8 private key(code:002)";if("30"!=e.substr(o[1],2))throw"malformed PKCS8 private key(code:003)";var s=n(e,o[1]);if(2!=s.length)throw"malformed PKCS8 private key(code:004)";if("06"!=e.substr(s[0],2))throw"malformed PKCS8 private key(code:005)";if(i.algoid=r(e,s[0]),"06"==e.substr(s[1],2)&&(i.algparam=r(e,s[1])),"04"!=e.substr(o[2],2))throw"malformed PKCS8 private key(code:006)";return i.keyidx=t.getVidx(e,o[2]),i},getKeyFromPlainPrivatePKCS8PEM:function(e){var t=De(e,"PRIVATE KEY");return this.getKeyFromPlainPrivatePKCS8Hex(t)},getKeyFromPlainPrivatePKCS8Hex:function(e){var t,n=this.parsePlainPrivatePKCS8Hex(e);if("2a864886f70d010101"==n.algoid)t=new se;else if("2a8648ce380401"==n.algoid)t=new he.crypto.DSA;else{if("2a8648ce3d0201"!=n.algoid)throw"unsupported private key algorithm";t=new he.crypto.ECDSA}return t.readPKCS8PrvKeyHex(e),t},_getKeyFromPublicPKCS8Hex:function(e){var t,n=fe.getVbyList(e,0,[0,0],"06");if("2a864886f70d010101"===n)t=new se;else if("2a8648ce380401"===n)t=new he.crypto.DSA;else{if("2a8648ce3d0201"!==n)throw"unsupported PKCS#8 public key hex";t=new he.crypto.ECDSA}return t.readPKCS8PubKeyHex(e),t},parsePublicRawRSAKeyHex:function(e){var t=fe.getChildIdx,n=fe.getV,r={};if("30"!=e.substr(0,2))throw"malformed RSA key(code:001)";var i=t(e,0);if(2!=i.length)throw"malformed RSA key(code:002)";if("02"!=e.substr(i[0],2))throw"malformed RSA key(code:003)";if(r.n=n(e,i[0]),"02"!=e.substr(i[1],2))throw"malformed RSA key(code:004)";return r.e=n(e,i[1]),r},parsePublicPKCS8Hex:function(e){var t=fe,n=t.getChildIdx,r=t.getV,i={algparam:null},o=n(e,0);if(2!=o.length)throw"outer DERSequence shall have 2 elements: "+o.length;var s=o[0];if("30"!=e.substr(s,2))throw"malformed PKCS8 public key(code:001)";var a=n(e,s);if(2!=a.length)throw"malformed PKCS8 public key(code:002)";if("06"!=e.substr(a[0],2))throw"malformed PKCS8 public key(code:003)";if(i.algoid=r(e,a[0]),"06"==e.substr(a[1],2)?i.algparam=r(e,a[1]):"30"==e.substr(a[1],2)&&(i.algparam={},i.algparam.p=t.getVbyList(e,a[1],[0],"02"),i.algparam.q=t.getVbyList(e,a[1],[1],"02"),i.algparam.g=t.getVbyList(e,a[1],[2],"02")),"03"!=e.substr(o[1],2))throw"malformed PKCS8 public key(code:004)";return i.key=r(e,o[1]).substr(2),i}}}();Le.getKey=function(e,t,n){var r,i=(b=fe).getChildIdx,o=b.getVbyList,s=he.crypto,a=s.ECDSA,u=s.DSA,c=se,l=De,h=Le;if(void 0!==c&&e instanceof c)return e;if(void 0!==a&&e instanceof a)return e;if(void 0!==u&&e instanceof u)return e;if(void 0!==e.curve&&void 0!==e.xy&&void 0===e.d)return new a({pub:e.xy,curve:e.curve});if(void 0!==e.curve&&void 0!==e.d)return new a({prv:e.d,curve:e.curve});if(void 0===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0===e.d)return(D=new c).setPublic(e.n,e.e),D;if(void 0===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d&&void 0!==e.p&&void 0!==e.q&&void 0!==e.dp&&void 0!==e.dq&&void 0!==e.co&&void 0===e.qi)return(D=new c).setPrivateEx(e.n,e.e,e.d,e.p,e.q,e.dp,e.dq,e.co),D;if(void 0===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d&&void 0===e.p)return(D=new c).setPrivate(e.n,e.e,e.d),D;if(void 0!==e.p&&void 0!==e.q&&void 0!==e.g&&void 0!==e.y&&void 0===e.x)return(D=new u).setPublic(e.p,e.q,e.g,e.y),D;if(void 0!==e.p&&void 0!==e.q&&void 0!==e.g&&void 0!==e.y&&void 0!==e.x)return(D=new u).setPrivate(e.p,e.q,e.g,e.y,e.x),D;if("RSA"===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0===e.d)return(D=new c).setPublic(Se(e.n),Se(e.e)),D;if("RSA"===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d&&void 0!==e.p&&void 0!==e.q&&void 0!==e.dp&&void 0!==e.dq&&void 0!==e.qi)return(D=new c).setPrivateEx(Se(e.n),Se(e.e),Se(e.d),Se(e.p),Se(e.q),Se(e.dp),Se(e.dq),Se(e.qi)),D;if("RSA"===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d)return(D=new c).setPrivate(Se(e.n),Se(e.e),Se(e.d)),D;if("EC"===e.kty&&void 0!==e.crv&&void 0!==e.x&&void 0!==e.y&&void 0===e.d){var d=(P=new a({curve:e.crv})).ecparams.keylen/4,p=("0000000000"+Se(e.x)).slice(-d),f=("0000000000"+Se(e.y)).slice(-d);return P.setPublicKeyHex(g="04"+p+f),P}if("EC"===e.kty&&void 0!==e.crv&&void 0!==e.x&&void 0!==e.y&&void 0!==e.d){d=(P=new a({curve:e.crv})).ecparams.keylen/4;var g="04"+(p=("0000000000"+Se(e.x)).slice(-d))+(f=("0000000000"+Se(e.y)).slice(-d)),v=("0000000000"+Se(e.d)).slice(-d);return P.setPublicKeyHex(g),P.setPrivateKeyHex(v),P}if("pkcs5prv"===n){var y,m=e,b=fe;if(9===(y=i(m,0)).length)(D=new c).readPKCS5PrvKeyHex(m);else if(6===y.length)(D=new u).readPKCS5PrvKeyHex(m);else{if(!(y.length>2&&"04"===m.substr(y[1],2)))throw"unsupported PKCS#1/5 hexadecimal key";(D=new a).readPKCS5PrvKeyHex(m)}return D}if("pkcs8prv"===n)return h.getKeyFromPlainPrivatePKCS8Hex(e);if("pkcs8pub"===n)return h._getKeyFromPublicPKCS8Hex(e);if("x509pub"===n)return We.getPublicKeyFromCertHex(e);if(-1!=e.indexOf("-END CERTIFICATE-",0)||-1!=e.indexOf("-END X509 CERTIFICATE-",0)||-1!=e.indexOf("-END TRUSTED CERTIFICATE-",0))return We.getPublicKeyFromCertPEM(e);if(-1!=e.indexOf("-END PUBLIC KEY-")){var w=De(e,"PUBLIC KEY");return h._getKeyFromPublicPKCS8Hex(w)}if(-1!=e.indexOf("-END RSA PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var _=l(e,"RSA PRIVATE KEY");return h.getKey(_,null,"pkcs5prv")}if(-1!=e.indexOf("-END DSA PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var S=o(r=l(e,"DSA PRIVATE KEY"),0,[1],"02"),x=o(r,0,[2],"02"),F=o(r,0,[3],"02"),C=o(r,0,[4],"02"),A=o(r,0,[5],"02");return(D=new u).setPrivate(new E(S,16),new E(x,16),new E(F,16),new E(C,16),new E(A,16)),D}if(-1!=e.indexOf("-END PRIVATE KEY-"))return h.getKeyFromPlainPrivatePKCS8PEM(e);if(-1!=e.indexOf("-END RSA PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var k=h.getDecryptedKeyHex(e,t),T=new se;return T.readPKCS5PrvKeyHex(k),T}if(-1!=e.indexOf("-END EC PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var P,D=o(r=h.getDecryptedKeyHex(e,t),0,[1],"04"),I=o(r,0,[2,0],"06"),N=o(r,0,[3,0],"03").substr(2);if(void 0===he.crypto.OID.oidhex2name[I])throw"undefined OID(hex) in KJUR.crypto.OID: "+I;return(P=new a({curve:he.crypto.OID.oidhex2name[I]})).setPublicKeyHex(N),P.setPrivateKeyHex(D),P.isPublic=!1,P}if(-1!=e.indexOf("-END DSA PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED"))return S=o(r=h.getDecryptedKeyHex(e,t),0,[1],"02"),x=o(r,0,[2],"02"),F=o(r,0,[3],"02"),C=o(r,0,[4],"02"),A=o(r,0,[5],"02"),(D=new u).setPrivate(new E(S,16),new E(x,16),new E(F,16),new E(C,16),new E(A,16)),D;if(-1!=e.indexOf("-END ENCRYPTED PRIVATE KEY-"))return h.getKeyFromEncryptedPKCS8PEM(e,t);throw"not supported argument"},Le.generateKeypair=function(e,t){if("RSA"==e){var n=t;(s=new se).generate(n,"10001"),s.isPrivate=!0,s.isPublic=!0;var r=new se,i=s.n.toString(16),o=s.e.toString(16);return r.setPublic(i,o),r.isPrivate=!1,r.isPublic=!0,(a={}).prvKeyObj=s,a.pubKeyObj=r,a}if("EC"==e){var s,a,u=t,c=new he.crypto.ECDSA({curve:u}).generateKeyPairHex();return(s=new he.crypto.ECDSA({curve:u})).setPublicKeyHex(c.ecpubhex),s.setPrivateKeyHex(c.ecprvhex),s.isPrivate=!0,s.isPublic=!1,(r=new he.crypto.ECDSA({curve:u})).setPublicKeyHex(c.ecpubhex),r.isPrivate=!1,r.isPublic=!0,(a={}).prvKeyObj=s,a.pubKeyObj=r,a}throw"unknown algorithm: "+e},Le.getPEM=function(e,t,n,r,i,o){var s=he.asn1,a=s.DERObjectIdentifier,u=s.DERInteger,c=s.ASN1Util.newObject,l=he.crypto,h=l.DSA,d=l.ECDSA,p=se;function f(e){return c({seq:[{int:0},{int:{bigint:e.n}},{int:e.e},{int:{bigint:e.d}},{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.dmp1}},{int:{bigint:e.dmq1}},{int:{bigint:e.coeff}}]})}function g(e){return c({seq:[{int:1},{octstr:{hex:e.prvKeyHex}},{tag:["a0",!0,{oid:{name:e.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]}]})}function y(e){return c({seq:[{int:0},{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}},{int:{bigint:e.y}},{int:{bigint:e.x}}]})}if((void 0!==p&&e instanceof p||void 0!==h&&e instanceof h||void 0!==d&&e instanceof d)&&1==e.isPublic&&(void 0===t||"PKCS8PUB"==t))return Pe(_=new(0,s.x509.SubjectPublicKeyInfo)(e).getEncodedHex(),"PUBLIC KEY");if("PKCS1PRV"==t&&void 0!==p&&e instanceof p&&(void 0===n||null==n)&&1==e.isPrivate)return Pe(_=f(e).getEncodedHex(),"RSA PRIVATE KEY");if("PKCS1PRV"==t&&void 0!==d&&e instanceof d&&(void 0===n||null==n)&&1==e.isPrivate){var m=new a({name:e.curveName}).getEncodedHex(),b=g(e).getEncodedHex(),w="";return(w+=Pe(m,"EC PARAMETERS"))+Pe(b,"EC PRIVATE KEY")}if("PKCS1PRV"==t&&void 0!==h&&e instanceof h&&(void 0===n||null==n)&&1==e.isPrivate)return Pe(_=y(e).getEncodedHex(),"DSA PRIVATE KEY");if("PKCS5PRV"==t&&void 0!==p&&e instanceof p&&void 0!==n&&null!=n&&1==e.isPrivate){var _=f(e).getEncodedHex();return void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",_,n,r,o)}if("PKCS5PRV"==t&&void 0!==d&&e instanceof d&&void 0!==n&&null!=n&&1==e.isPrivate)return _=g(e).getEncodedHex(),void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",_,n,r,o);if("PKCS5PRV"==t&&void 0!==h&&e instanceof h&&void 0!==n&&null!=n&&1==e.isPrivate)return _=y(e).getEncodedHex(),void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",_,n,r,o);var S=function(e,t){var n=E(e,t);return new c({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:n.pbkdf2Salt}},{int:n.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:n.encryptionSchemeIV}}]}]}]},{octstr:{hex:n.ciphertext}}]}).getEncodedHex()},E=function(e,t){var n=v.lib.WordArray.random(8),r=v.lib.WordArray.random(8),i=v.PBKDF2(t,n,{keySize:6,iterations:100}),o=v.enc.Hex.parse(e),s=v.TripleDES.encrypt(o,i,{iv:r})+"",a={};return a.ciphertext=s,a.pbkdf2Salt=v.enc.Hex.stringify(n),a.pbkdf2Iter=100,a.encryptionSchemeAlg="DES-EDE3-CBC",a.encryptionSchemeIV=v.enc.Hex.stringify(r),a};if("PKCS8PRV"==t&&void 0!=p&&e instanceof p&&1==e.isPrivate){var x=f(e).getEncodedHex();return _=c({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:x}}]}).getEncodedHex(),void 0===n||null==n?Pe(_,"PRIVATE KEY"):Pe(b=S(_,n),"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==t&&void 0!==d&&e instanceof d&&1==e.isPrivate)return x=new c({seq:[{int:1},{octstr:{hex:e.prvKeyHex}},{tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]}]}).getEncodedHex(),_=c({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:e.curveName}}]},{octstr:{hex:x}}]}).getEncodedHex(),void 0===n||null==n?Pe(_,"PRIVATE KEY"):Pe(b=S(_,n),"ENCRYPTED PRIVATE KEY");if("PKCS8PRV"==t&&void 0!==h&&e instanceof h&&1==e.isPrivate)return x=new u({bigint:e.x}).getEncodedHex(),_=c({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}}]}]},{octstr:{hex:x}}]}).getEncodedHex(),void 0===n||null==n?Pe(_,"PRIVATE KEY"):Pe(b=S(_,n),"ENCRYPTED PRIVATE KEY");throw"unsupported object nor format"},Le.getKeyFromCSRPEM=function(e){var t=De(e,"CERTIFICATE REQUEST");return Le.getKeyFromCSRHex(t)},Le.getKeyFromCSRHex=function(e){var t=Le.parseCSRHex(e);return Le.getKey(t.p8pubkeyhex,null,"pkcs8pub")},Le.parseCSRHex=function(e){var t=fe.getChildIdx,n=fe.getTLV,r={},i=e;if("30"!=i.substr(0,2))throw"malformed CSR(code:001)";var o=t(i,0);if(o.length<1)throw"malformed CSR(code:002)";if("30"!=i.substr(o[0],2))throw"malformed CSR(code:003)";var s=t(i,o[0]);if(s.length<3)throw"malformed CSR(code:004)";return r.p8pubkeyhex=n(i,s[2]),r},Le.getJWKFromKey=function(e){var t={};if(e instanceof se&&e.isPrivate)return t.kty="RSA",t.n=_e(e.n.toString(16)),t.e=_e(e.e.toString(16)),t.d=_e(e.d.toString(16)),t.p=_e(e.p.toString(16)),t.q=_e(e.q.toString(16)),t.dp=_e(e.dmp1.toString(16)),t.dq=_e(e.dmq1.toString(16)),t.qi=_e(e.coeff.toString(16)),t;if(e instanceof se&&e.isPublic)return t.kty="RSA",t.n=_e(e.n.toString(16)),t.e=_e(e.e.toString(16)),t;if(e instanceof he.crypto.ECDSA&&e.isPrivate){if("P-256"!==(r=e.getShortNISTPCurveName())&&"P-384"!==r)throw"unsupported curve name for JWT: "+r;var n=e.getPublicKeyXYHex();return t.kty="EC",t.crv=r,t.x=_e(n.x),t.y=_e(n.y),t.d=_e(e.prvKeyHex),t}if(e instanceof he.crypto.ECDSA&&e.isPublic){var r;if("P-256"!==(r=e.getShortNISTPCurveName())&&"P-384"!==r)throw"unsupported curve name for JWT: "+r;return n=e.getPublicKeyXYHex(),t.kty="EC",t.crv=r,t.x=_e(n.x),t.y=_e(n.y),t}throw"not supported key object"},se.getPosArrayOfChildrenFromHex=function(e){return fe.getChildIdx(e,0)},se.getHexValueArrayOfChildrenFromHex=function(e){var t,n=fe.getV,r=n(e,(t=se.getPosArrayOfChildrenFromHex(e))[0]),i=n(e,t[1]),o=n(e,t[2]),s=n(e,t[3]),a=n(e,t[4]),u=n(e,t[5]),c=n(e,t[6]),l=n(e,t[7]),h=n(e,t[8]);return(t=new Array).push(r,i,o,s,a,u,c,l,h),t},se.prototype.readPrivateKeyFromPEMString=function(e){var t=De(e),n=se.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])},se.prototype.readPKCS5PrvKeyHex=function(e){var t=se.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},se.prototype.readPKCS8PrvKeyHex=function(e){var t,n,r,i,o,s,a,u,c=fe.getVbyList;if(!1===fe.isASN1HEX(e))throw"not ASN.1 hex string";try{t=c(e,0,[2,0,1],"02"),n=c(e,0,[2,0,2],"02"),r=c(e,0,[2,0,3],"02"),i=c(e,0,[2,0,4],"02"),o=c(e,0,[2,0,5],"02"),s=c(e,0,[2,0,6],"02"),a=c(e,0,[2,0,7],"02"),u=c(e,0,[2,0,8],"02")}catch(e){throw"malformed PKCS#8 plain RSA private key"}this.setPrivateEx(t,n,r,i,o,s,a,u)},se.prototype.readPKCS5PubKeyHex=function(e){var t=fe,n=t.getV;if(!1===t.isASN1HEX(e))throw"keyHex is not ASN.1 hex string";var r=t.getChildIdx(e,0);if(2!==r.length||"02"!==e.substr(r[0],2)||"02"!==e.substr(r[1],2))throw"wrong hex for PKCS#5 public key";var i=n(e,r[0]),o=n(e,r[1]);this.setPublic(i,o)},se.prototype.readPKCS8PubKeyHex=function(e){var t=fe;if(!1===t.isASN1HEX(e))throw"not ASN.1 hex string";if("06092a864886f70d010101"!==t.getTLVbyList(e,0,[0,0]))throw"not PKCS8 RSA public key";var n=t.getTLVbyList(e,0,[1,0]);this.readPKCS5PubKeyHex(n)},se.prototype.readCertPubKeyHex=function(e,t){var n,r;(n=new We).readCertHex(e),r=n.getPublicKeyHex(),this.readPKCS8PubKeyHex(r)};var Ke=new RegExp("");function qe(e,t){for(var n="",r=t/4-e.length,i=0;i<r;i++)n+="0";return n+e}function ze(e,t,n){for(var r="",i=0;r.length<t;)r+=Fe(n(Ce(e+String.fromCharCode.apply(String,[(4278190080&i)>>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return r}function Ze(e){for(var t in he.crypto.Util.DIGESTINFOHEAD){var n=he.crypto.Util.DIGESTINFOHEAD[t],r=n.length;if(e.substring(0,r)==n)return[t,e.substring(r)]}return[]}function We(){var e=fe,t=e.getChildIdx,n=e.getV,r=e.getTLV,i=e.getVbyList,o=e.getTLVbyList,s=e.getIdxbyList,a=e.getVidx,u=e.oidname,c=We,l=De;this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){return null===this.hex||0!==this.version?this.version:"a003020102"!==o(this.hex,0,[0,0])?(this.version=1,this.foffset=-1,1):(this.version=3,3)},this.getSerialNumberHex=function(){return i(this.hex,0,[0,1+this.foffset],"02")},this.getSignatureAlgorithmField=function(){return u(i(this.hex,0,[0,2+this.foffset,0],"06"))},this.getIssuerHex=function(){return o(this.hex,0,[0,3+this.foffset],"30")},this.getIssuerString=function(){return c.hex2dn(this.getIssuerHex())},this.getSubjectHex=function(){return o(this.hex,0,[0,5+this.foffset],"30")},this.getSubjectString=function(){return c.hex2dn(this.getSubjectHex())},this.getNotBefore=function(){var e=i(this.hex,0,[0,4+this.foffset,0]);return e=e.replace(/(..)/g,"%$1"),decodeURIComponent(e)},this.getNotAfter=function(){var e=i(this.hex,0,[0,4+this.foffset,1]);return e=e.replace(/(..)/g,"%$1"),decodeURIComponent(e)},this.getPublicKeyHex=function(){return e.getTLVbyList(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyIdx=function(){return s(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyContentIdx=function(){var e=this.getPublicKeyIdx();return s(this.hex,e,[1,0],"30")},this.getPublicKey=function(){return Le.getKey(this.getPublicKeyHex(),null,"pkcs8pub")},this.getSignatureAlgorithmName=function(){return u(i(this.hex,0,[1,0],"06"))},this.getSignatureValueHex=function(){return i(this.hex,0,[2],"03",!0)},this.verifySignature=function(e){var t=this.getSignatureAlgorithmName(),n=this.getSignatureValueHex(),r=o(this.hex,0,[0],"30"),i=new he.crypto.Signature({alg:t});return i.init(e),i.updateHex(r),i.verify(n)},this.parseExt=function(){if(3!==this.version)return-1;var n=s(this.hex,0,[0,7,0],"30"),r=t(this.hex,n);this.aExtInfo=new Array;for(var o=0;o<r.length;o++){var u={critical:!1},c=0;3===t(this.hex,r[o]).length&&(u.critical=!0,c=1),u.oid=e.hextooidstr(i(this.hex,r[o],[0],"06"));var l=s(this.hex,r[o],[1+c]);u.vidx=a(this.hex,l),this.aExtInfo.push(u)}},this.getExtInfo=function(e){var t=this.aExtInfo,n=e;if(e.match(/^[0-9.]+$/)||(n=he.asn1.x509.OID.name2oid(e)),""!==n)for(var r=0;r<t.length;r++)if(t[r].oid===n)return t[r]},this.getExtBasicConstraints=function(){var e=this.getExtInfo("basicConstraints");if(void 0===e)return e;var t=n(this.hex,e.vidx);if(""===t)return{};if("0101ff"===t)return{cA:!0};if("0101ff02"===t.substr(0,8)){var r=n(t,6);return{cA:!0,pathLen:parseInt(r,16)}}throw"basicConstraints parse error"},this.getExtKeyUsageBin=function(){var e=this.getExtInfo("keyUsage");if(void 0===e)return"";var t=n(this.hex,e.vidx);if(t.length%2!=0||t.length<=2)throw"malformed key usage value";var r=parseInt(t.substr(0,2)),i=parseInt(t.substr(2),16).toString(2);return i.substr(0,i.length-r)},this.getExtKeyUsageString=function(){for(var e=this.getExtKeyUsageBin(),t=new Array,n=0;n<e.length;n++)"1"==e.substr(n,1)&&t.push(We.KEYUSAGE_NAME[n]);return t.join(",")},this.getExtSubjectKeyIdentifier=function(){var e=this.getExtInfo("subjectKeyIdentifier");return void 0===e?e:n(this.hex,e.vidx)},this.getExtAuthorityKeyIdentifier=function(){var e=this.getExtInfo("authorityKeyIdentifier");if(void 0===e)return e;for(var i={},o=r(this.hex,e.vidx),s=t(o,0),a=0;a<s.length;a++)"80"===o.substr(s[a],2)&&(i.kid=n(o,s[a]));return i},this.getExtExtKeyUsageName=function(){var e=this.getExtInfo("extKeyUsage");if(void 0===e)return e;var i=new Array,o=r(this.hex,e.vidx);if(""===o)return i;for(var s=t(o,0),a=0;a<s.length;a++)i.push(u(n(o,s[a])));return i},this.getExtSubjectAltName=function(){for(var e=this.getExtSubjectAltName2(),t=new Array,n=0;n<e.length;n++)"DNS"===e[n][0]&&t.push(e[n][1]);return t},this.getExtSubjectAltName2=function(){var e,i,o,s=this.getExtInfo("subjectAltName");if(void 0===s)return s;for(var a=new Array,u=r(this.hex,s.vidx),c=t(u,0),l=0;l<c.length;l++)o=u.substr(c[l],2),e=n(u,c[l]),"81"===o&&(i=xe(e),a.push(["MAIL",i])),"82"===o&&(i=xe(e),a.push(["DNS",i])),"84"===o&&(i=We.hex2dn(e,0),a.push(["DN",i])),"86"===o&&(i=xe(e),a.push(["URI",i])),"87"===o&&(i=Me(e),a.push(["IP",i]));return a},this.getExtCRLDistributionPointsURI=function(){var e=this.getExtInfo("cRLDistributionPoints");if(void 0===e)return e;for(var n=new Array,r=t(this.hex,e.vidx),o=0;o<r.length;o++)try{var s=xe(i(this.hex,r[o],[0,0,0],"86"));n.push(s)}catch(e){}return n},this.getExtAIAInfo=function(){var e=this.getExtInfo("authorityInfoAccess");if(void 0===e)return e;for(var n={ocsp:[],caissuer:[]},r=t(this.hex,e.vidx),o=0;o<r.length;o++){var s=i(this.hex,r[o],[0],"06"),a=i(this.hex,r[o],[1],"86");"2b06010505073001"===s&&n.ocsp.push(xe(a)),"2b06010505073002"===s&&n.caissuer.push(xe(a))}return n},this.getExtCertificatePolicies=function(){var e=this.getExtInfo("certificatePolicies");if(void 0===e)return e;for(var o=r(this.hex,e.vidx),s=[],a=t(o,0),c=0;c<a.length;c++){var l={},h=t(o,a[c]);if(l.id=u(n(o,h[0])),2===h.length)for(var d=t(o,h[1]),p=0;p<d.length;p++){var f=i(o,d[p],[0],"06");"2b06010505070201"===f?l.cps=xe(i(o,d[p],[1])):"2b06010505070202"===f&&(l.unotice=xe(i(o,d[p],[1,0])))}s.push(l)}return s},this.readCertPEM=function(e){this.readCertHex(l(e))},this.readCertHex=function(e){this.hex=e,this.getVersion();try{s(this.hex,0,[0,7],"a3"),this.parseExt()}catch(e){}},this.getInfo=function(){var e,t,n;if(e="Basic Fields\n",e+="  serial number: "+this.getSerialNumberHex()+"\n",e+="  signature algorithm: "+this.getSignatureAlgorithmField()+"\n",e+="  issuer: "+this.getIssuerString()+"\n",e+="  notBefore: "+this.getNotBefore()+"\n",e+="  notAfter: "+this.getNotAfter()+"\n",e+="  subject: "+this.getSubjectString()+"\n",e+="  subject public key info: \n",e+="    key algorithm: "+(t=this.getPublicKey()).type+"\n","RSA"===t.type&&(e+="    n="+Ve(t.n.toString(16)).substr(0,16)+"...\n",e+="    e="+Ve(t.e.toString(16))+"\n"),void 0!==(n=this.aExtInfo)&&null!==n){e+="X509v3 Extensions:\n";for(var r=0;r<n.length;r++){var i=n[r],o=he.asn1.x509.OID.oid2name(i.oid);""===o&&(o=i.oid);var s="";if(!0===i.critical&&(s="CRITICAL"),e+="  "+o+" "+s+":\n","basicConstraints"===o){var a=this.getExtBasicConstraints();void 0===a.cA?e+="    {}\n":(e+="    cA=true",void 0!==a.pathLen&&(e+=", pathLen="+a.pathLen),e+="\n")}else if("keyUsage"===o)e+="    "+this.getExtKeyUsageString()+"\n";else if("subjectKeyIdentifier"===o)e+="    "+this.getExtSubjectKeyIdentifier()+"\n";else if("authorityKeyIdentifier"===o){var u=this.getExtAuthorityKeyIdentifier();void 0!==u.kid&&(e+="    kid="+u.kid+"\n")}else if("extKeyUsage"===o)e+="    "+this.getExtExtKeyUsageName().join(", ")+"\n";else if("subjectAltName"===o)e+="    "+this.getExtSubjectAltName2()+"\n";else if("cRLDistributionPoints"===o)e+="    "+this.getExtCRLDistributionPointsURI()+"\n";else if("authorityInfoAccess"===o){var c=this.getExtAIAInfo();void 0!==c.ocsp&&(e+="    ocsp: "+c.ocsp.join(",")+"\n"),void 0!==c.caissuer&&(e+="    caissuer: "+c.caissuer.join(",")+"\n")}else if("certificatePolicies"===o)for(var l=this.getExtCertificatePolicies(),h=0;h<l.length;h++)void 0!==l[h].id&&(e+="    policy oid: "+l[h].id+"\n"),void 0!==l[h].cps&&(e+="    cps: "+l[h].cps+"\n")}}return(e+="signature algorithm: "+this.getSignatureAlgorithmName()+"\n")+"signature: "+this.getSignatureValueHex().substr(0,16)+"...\n"}}Ke.compile("[^0-9a-f]","gi"),se.prototype.sign=function(e,t){var n=he.crypto.Util.hashString(e,t);return this.signWithMessageHash(n,t)},se.prototype.signWithMessageHash=function(e,t){var n=ie(he.crypto.Util.getPaddedDigestInfoHex(e,t,this.n.bitLength()),16);return qe(this.doPrivate(n).toString(16),this.n.bitLength())},se.prototype.signPSS=function(e,t,n){var r,i=(r=Ce(e),he.crypto.Util.hashHex(r,t));return void 0===n&&(n=-1),this.signWithMessageHashPSS(i,t,n)},se.prototype.signWithMessageHashPSS=function(e,t,n){var r,i=Fe(e),o=i.length,s=this.n.bitLength()-1,a=Math.ceil(s/8),u=function(e){return he.crypto.Util.hashHex(e,t)};if(-1===n||void 0===n)n=o;else if(-2===n)n=a-o-2;else if(n<-2)throw"invalid salt length";if(a<o+n+2)throw"data too long";var c="";n>0&&(c=new Array(n),(new re).nextBytes(c),c=String.fromCharCode.apply(String,c));var l=Fe(u(Ce("\0\0\0\0\0\0\0\0"+i+c))),h=[];for(r=0;r<a-n-o-2;r+=1)h[r]=0;var d=String.fromCharCode.apply(String,h)+"\x01"+c,p=ze(l,d.length,u),f=[];for(r=0;r<d.length;r+=1)f[r]=d.charCodeAt(r)^p.charCodeAt(r);for(f[0]&=~(65280>>8*a-s&255),r=0;r<o;r++)f.push(l.charCodeAt(r));return f.push(188),qe(this.doPrivate(new E(f)).toString(16),this.n.bitLength())},se.prototype.verify=function(e,t){var n=ie(t=(t=t.replace(Ke,"")).replace(/[ \n]+/g,""),16);if(n.bitLength()>this.n.bitLength())return 0;var r=Ze(this.doPublic(n).toString(16).replace(/^1f+00/,""));return 0!=r.length&&r[1]==he.crypto.Util.hashString(e,r[0])},se.prototype.verifyWithMessageHash=function(e,t){var n=ie(t=(t=t.replace(Ke,"")).replace(/[ \n]+/g,""),16);if(n.bitLength()>this.n.bitLength())return 0;var r=Ze(this.doPublic(n).toString(16).replace(/^1f+00/,""));return 0!=r.length&&r[1]==e},se.prototype.verifyPSS=function(e,t,n,r){var i,o=(i=Ce(e),he.crypto.Util.hashHex(i,n));return void 0===r&&(r=-1),this.verifyWithMessageHashPSS(o,t,n,r)},se.prototype.verifyWithMessageHashPSS=function(e,t,n,r){var i=new E(t,16);if(i.bitLength()>this.n.bitLength())return!1;var o,s=function(e){return he.crypto.Util.hashHex(e,n)},a=Fe(e),u=a.length,c=this.n.bitLength()-1,l=Math.ceil(c/8);if(-1===r||void 0===r)r=u;else if(-2===r)r=l-u-2;else if(r<-2)throw"invalid salt length";if(l<u+r+2)throw"data too long";var h=this.doPublic(i).toByteArray();for(o=0;o<h.length;o+=1)h[o]&=255;for(;h.length<l;)h.unshift(0);if(188!==h[l-1])throw"encoded message does not end in 0xbc";var d=(h=String.fromCharCode.apply(String,h)).substr(0,l-u-1),p=h.substr(d.length,u),f=65280>>8*l-c&255;if(0!=(d.charCodeAt(0)&f))throw"bits beyond keysize not zero";var g=ze(p,d.length,s),v=[];for(o=0;o<d.length;o+=1)v[o]=d.charCodeAt(o)^g.charCodeAt(o);v[0]&=~f;var y=l-u-r-2;for(o=0;o<y;o+=1)if(0!==v[o])throw"leftmost octets not zero";if(1!==v[y])throw"0x01 marker not found";return p===Fe(s(Ce("\0\0\0\0\0\0\0\0"+a+String.fromCharCode.apply(String,v.slice(-r)))))},se.SALT_LEN_HLEN=-1,se.SALT_LEN_MAX=-2,se.SALT_LEN_RECOVER=-2,We.hex2dn=function(e,t){if(void 0===t&&(t=0),"30"!==e.substr(t,2))throw"malformed DN";for(var n=new Array,r=fe.getChildIdx(e,t),i=0;i<r.length;i++)n.push(We.hex2rdn(e,r[i]));return"/"+(n=n.map(function(e){return e.replace("/","\\/")})).join("/")},We.hex2rdn=function(e,t){if(void 0===t&&(t=0),"31"!==e.substr(t,2))throw"malformed RDN";for(var n=new Array,r=fe.getChildIdx(e,t),i=0;i<r.length;i++)n.push(We.hex2attrTypeValue(e,r[i]));return(n=n.map(function(e){return e.replace("+","\\+")})).join("+")},We.hex2attrTypeValue=function(e,t){var n=fe,r=n.getV;if(void 0===t&&(t=0),"30"!==e.substr(t,2))throw"malformed attribute type and value";var i=n.getChildIdx(e,t);2!==i.length||e.substr(i[0],2);var o=r(e,i[0]),s=he.asn1.ASN1Util.oidHexToInt(o);return he.asn1.x509.OID.oid2atype(s)+"="+Fe(r(e,i[1]))},We.getPublicKeyFromCertHex=function(e){var t=new We;return t.readCertHex(e),t.getPublicKey()},We.getPublicKeyFromCertPEM=function(e){var t=new We;return t.readCertPEM(e),t.getPublicKey()},We.getPublicKeyInfoPropOfCertPEM=function(e){var t,n,r=fe.getVbyList,i={algparam:null};return(t=new We).readCertPEM(e),n=t.getPublicKeyHex(),i.keyhex=r(n,0,[1],"03").substr(2),i.algoid=r(n,0,[0,0],"06"),"2a8648ce3d0201"===i.algoid&&(i.algparam=r(n,0,[0,1],"06")),i},We.KEYUSAGE_NAME=["digitalSignature","nonRepudiation","keyEncipherment","dataEncipherment","keyAgreement","keyCertSign","cRLSign","encipherOnly","decipherOnly"],void 0!==he&&he||(he={}),void 0!==he.jws&&he.jws||(he.jws={}),he.jws.JWS=function(){var e=he.jws.JWS.isSafeJSONString;this.parseJWS=function(t,n){if(void 0===this.parsedJWS||!n&&void 0===this.parsedJWS.sigvalH){var r=t.match(/^([^.]+)\.([^.]+)\.([^.]+)$/);if(null==r)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";var i=r[1],o=r[2],s=r[3],a=i+"."+o;if(this.parsedJWS={},this.parsedJWS.headB64U=i,this.parsedJWS.payloadB64U=o,this.parsedJWS.sigvalB64U=s,this.parsedJWS.si=a,!n){var u=Se(s),c=ie(u,16);this.parsedJWS.sigvalH=u,this.parsedJWS.sigvalBI=c}var l=pe(i),h=pe(o);if(this.parsedJWS.headS=l,this.parsedJWS.payloadS=h,!e(l,this.parsedJWS,"headP"))throw"malformed JSON string for JWS Head: "+l}}},he.jws.JWS.sign=function(e,t,n,r,i){var o,s,a,u=he.jws.JWS,c=u.readSafeJSONString,l=u.isSafeJSONString,h=he.crypto,d=h.Mac,p=h.Signature,f=JSON;if("string"!=typeof t&&"object"!=typeof t)throw"spHeader must be JSON string or object: "+t;if("object"==typeof t&&(o=f.stringify(s=t)),"string"==typeof t){if(!l(o=t))throw"JWS Head is not safe JSON string: "+o;s=c(o)}if(a=n,"object"==typeof n&&(a=f.stringify(n)),""!=e&&null!=e||void 0===s.alg||(e=s.alg),""!=e&&null!=e&&void 0===s.alg&&(s.alg=e,o=f.stringify(s)),e!==s.alg)throw"alg and sHeader.alg doesn't match: "+e+"!="+s.alg;var g=null;if(void 0===u.jwsalg2sigalg[e])throw"unsupported alg name: "+e;g=u.jwsalg2sigalg[e];var v=de(o)+"."+de(a),y="";if("Hmac"==g.substr(0,4)){if(void 0===r)throw"mac key shall be specified for HS* alg";var m=new d({alg:g,prov:"cryptojs",pass:r});m.updateString(v),y=m.doFinal()}else{var b;-1!=g.indexOf("withECDSA")?((b=new p({alg:g})).init(r,i),b.updateString(v),hASN1Sig=b.sign(),y=he.crypto.ECDSA.asn1SigToConcatSig(hASN1Sig)):"none"!=g&&((b=new p({alg:g})).init(r,i),b.updateString(v),y=b.sign())}return v+"."+_e(y)},he.jws.JWS.verify=function(e,t,n){var r,i=he.jws.JWS,o=i.readSafeJSONString,s=he.crypto,a=s.ECDSA,u=s.Mac,c=s.Signature;r=se;var l=e.split(".");if(3!==l.length)return!1;var h,d,p=l[0]+"."+l[1],f=Se(l[2]),g=o(pe(l[0]));if(void 0===g.alg)throw"algorithm not specified in header";if(d=(h=g.alg).substr(0,2),null!=n&&"[object Array]"===Object.prototype.toString.call(n)&&n.length>0&&-1==(":"+n.join(":")+":").indexOf(":"+h+":"))throw"algorithm '"+h+"' not accepted in the list";if("none"!=h&&null===t)throw"key shall be specified to verify.";if("string"==typeof t&&-1!=t.indexOf("-----BEGIN ")&&(t=Le.getKey(t)),!("RS"!=d&&"PS"!=d||t instanceof r))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==d&&!(t instanceof a))throw"key shall be a ECDSA obj for ES* algs";var v=null;if(void 0===i.jwsalg2sigalg[g.alg])throw"unsupported alg name: "+h;if("none"==(v=i.jwsalg2sigalg[h]))throw"not supported";if("Hmac"==v.substr(0,4)){if(void 0===t)throw"hexadecimal key shall be specified for HMAC";var y=new u({alg:v,pass:t});return y.updateString(p),f==y.doFinal()}if(-1!=v.indexOf("withECDSA")){var m,b=null;try{b=a.concatSigToASN1Sig(f)}catch(e){return!1}return(m=new c({alg:v})).init(t),m.updateString(p),m.verify(b)}return(m=new c({alg:v})).init(t),m.updateString(p),m.verify(f)},he.jws.JWS.parse=function(e){var t,n,r=e.split("."),i={};if(2!=r.length&&3!=r.length)throw"malformed sJWS: wrong number of '.' splitted elements";return t=r[1],3==r.length&&(n=r[2]),i.headerObj=he.jws.JWS.readSafeJSONString(pe(r[0])),i.payloadObj=he.jws.JWS.readSafeJSONString(pe(t)),i.headerPP=JSON.stringify(i.headerObj,null,"  "),i.payloadPP=null==i.payloadObj?pe(t):JSON.stringify(i.payloadObj,null,"  "),void 0!==n&&(i.sigHex=Se(n)),i},he.jws.JWS.verifyJWT=function(e,t,n){var r=he.jws,i=r.JWS,o=i.readSafeJSONString,s=i.inArray,a=i.includedArray,u=e.split("."),c=u[0],l=u[1],h=(Se(u[2]),o(pe(c))),d=o(pe(l));if(void 0===h.alg)return!1;if(void 0===n.alg)throw"acceptField.alg shall be specified";if(!s(h.alg,n.alg))return!1;if(void 0!==d.iss&&"object"==typeof n.iss&&!s(d.iss,n.iss))return!1;if(void 0!==d.sub&&"object"==typeof n.sub&&!s(d.sub,n.sub))return!1;if(void 0!==d.aud&&"object"==typeof n.aud)if("string"==typeof d.aud){if(!s(d.aud,n.aud))return!1}else if("object"==typeof d.aud&&!a(d.aud,n.aud))return!1;var p=r.IntDate.getNow();return void 0!==n.verifyAt&&"number"==typeof n.verifyAt&&(p=n.verifyAt),void 0!==n.gracePeriod&&"number"==typeof n.gracePeriod||(n.gracePeriod=0),!(void 0!==d.exp&&"number"==typeof d.exp&&d.exp+n.gracePeriod<p||void 0!==d.nbf&&"number"==typeof d.nbf&&p<d.nbf-n.gracePeriod||void 0!==d.iat&&"number"==typeof d.iat&&p<d.iat-n.gracePeriod||void 0!==d.jti&&void 0!==n.jti&&d.jti!==n.jti||!i.verify(e,t,n.alg))},he.jws.JWS.includedArray=function(e,t){var n=he.jws.JWS.inArray;if(null===e)return!1;if("object"!=typeof e)return!1;if("number"!=typeof e.length)return!1;for(var r=0;r<e.length;r++)if(!n(e[r],t))return!1;return!0},he.jws.JWS.inArray=function(e,t){if(null===t)return!1;if("object"!=typeof t)return!1;if("number"!=typeof t.length)return!1;for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1},he.jws.JWS.jwsalg2sigalg={HS256:"HmacSHA256",HS384:"HmacSHA384",HS512:"HmacSHA512",RS256:"SHA256withRSA",RS384:"SHA384withRSA",RS512:"SHA512withRSA",ES256:"SHA256withECDSA",ES384:"SHA384withECDSA",PS256:"SHA256withRSAandMGF1",PS384:"SHA384withRSAandMGF1",PS512:"SHA512withRSAandMGF1",none:"none"},he.jws.JWS.isSafeJSONString=function(e,t,n){var r=null;try{return"object"!=typeof(r=le(e))?0:r.constructor===Array?0:(t&&(t[n]=r),1)}catch(e){return 0}},he.jws.JWS.readSafeJSONString=function(e){var t=null;try{return"object"!=typeof(t=le(e))?null:t.constructor===Array?null:t}catch(e){return null}},he.jws.JWS.getEncodedSignatureValueFromJWS=function(e){var t=e.match(/^[^.]+\.[^.]+\.([^.]+)$/);if(null==t)throw"JWS signature is not a form of 'Head.Payload.SigValue'.";return t[1]},he.jws.JWS.getJWKthumbprint=function(e){if("RSA"!==e.kty&&"EC"!==e.kty&&"oct"!==e.kty)throw"unsupported algorithm for JWK Thumprint";var t="{";if("RSA"===e.kty){if("string"!=typeof e.n||"string"!=typeof e.e)throw"wrong n and e value for RSA key";t+='"e":"'+e.e+'",',t+='"kty":"'+e.kty+'",',t+='"n":"'+e.n+'"}'}else if("EC"===e.kty){if("string"!=typeof e.crv||"string"!=typeof e.x||"string"!=typeof e.y)throw"wrong crv, x and y value for EC key";t+='"crv":"'+e.crv+'",',t+='"kty":"'+e.kty+'",',t+='"x":"'+e.x+'",',t+='"y":"'+e.y+'"}'}else if("oct"===e.kty){if("string"!=typeof e.k)throw"wrong k value for oct(symmetric) key";t+='"kty":"'+e.kty+'",',t+='"k":"'+e.k+'"}'}var n=Ce(t);return _e(he.crypto.Util.hashHex(n,"sha256"))},he.jws.IntDate={},he.jws.IntDate.get=function(e){var t=he.jws.IntDate,n=t.getNow,r=t.getZulu;if("now"==e)return n();if("now + 1hour"==e)return n()+3600;if("now + 1day"==e)return n()+86400;if("now + 1month"==e)return n()+2592e3;if("now + 1year"==e)return n()+31536e3;if(e.match(/Z$/))return r(e);if(e.match(/^[0-9]+$/))return parseInt(e);throw"unsupported format: "+e},he.jws.IntDate.getZulu=function(e){return Ne(e)},he.jws.IntDate.getNow=function(){return~~(new Date/1e3)},he.jws.IntDate.intDate2UTCString=function(e){return new Date(1e3*e).toUTCString()},he.jws.IntDate.intDate2Zulu=function(e){var t=new Date(1e3*e);return("0000"+t.getUTCFullYear()).slice(-4)+("00"+(t.getUTCMonth()+1)).slice(-2)+("00"+t.getUTCDate()).slice(-2)+("00"+t.getUTCHours()).slice(-2)+("00"+t.getUTCMinutes()).slice(-2)+("00"+t.getUTCSeconds()).slice(-2)+"Z"},t.SecureRandom=re,t.rng_seed_time=X,t.BigInteger=E,t.RSAKey=se,t.ECDSA=he.crypto.ECDSA,t.DSA=he.crypto.DSA,t.Signature=he.crypto.Signature,t.MessageDigest=he.crypto.MessageDigest,t.Mac=he.crypto.Mac,t.Cipher=he.crypto.Cipher,t.KEYUTIL=Le,t.ASN1HEX=fe,t.X509=We,t.CryptoJS=v,t.b64tohex=_,t.b64toBA=S,t.stoBA=ge,t.BAtos=ve,t.BAtohex=ye,t.stohex=me,t.stob64=function(e){return w(me(e))},t.stob64u=function(e){return be(w(me(e)))},t.b64utos=function(e){return ve(S(we(e)))},t.b64tob64u=be,t.b64utob64=we,t.hex2b64=w,t.hextob64u=_e,t.b64utohex=Se,t.utf8tob64u=de,t.b64utoutf8=pe,t.utf8tob64=function(e){return w(Re(Be(e)))},t.b64toutf8=function(e){return decodeURIComponent(Oe(_(e)))},t.utf8tohex=Ee,t.hextoutf8=xe,t.hextorstr=Fe,t.rstrtohex=Ce,t.hextob64=Ae,t.hextob64nl=ke,t.b64nltohex=Te,t.hextopem=Pe,t.pemtohex=De,t.hextoArrayBuffer=function(e){if(e.length%2!=0)throw"input is not even length";if(null==e.match(/^[0-9A-Fa-f]+$/))throw"input is not hexadecimal";for(var t=new ArrayBuffer(e.length/2),n=new DataView(t),r=0;r<e.length/2;r++)n.setUint8(r,parseInt(e.substr(2*r,2),16));return t},t.ArrayBuffertohex=function(e){for(var t="",n=new DataView(e),r=0;r<e.byteLength;r++)t+=("00"+n.getUint8(r).toString(16)).slice(-2);return t},t.zulutomsec=Ie,t.zulutosec=Ne,t.zulutodate=function(e){return new Date(Ie(e))},t.datetozulu=function(e,t,n){var r,i=e.getUTCFullYear();if(t){if(i<1950||2049<i)throw"not proper year for UTCTime: "+i;r=(""+i).slice(-2)}else r=("000"+i).slice(-4);if(r+=("0"+(e.getUTCMonth()+1)).slice(-2),r+=("0"+e.getUTCDate()).slice(-2),r+=("0"+e.getUTCHours()).slice(-2),r+=("0"+e.getUTCMinutes()).slice(-2),r+=("0"+e.getUTCSeconds()).slice(-2),n){var o=e.getUTCMilliseconds();0!==o&&(r+="."+(o=(o=("00"+o).slice(-3)).replace(/0+$/g,"")))}return r+"Z"},t.uricmptohex=Re,t.hextouricmp=Oe,t.ipv6tohex=je,t.hextoipv6=He,t.hextoip=Me,t.iptohex=function(e){var t="malformed IP address";if(!(e=e.toLowerCase(e)).match(/^[0-9.]+$/)){if(e.match(/^[0-9a-f:]+$/)&&-1!==e.indexOf(":"))return je(e);throw t}var n=e.split(".");if(4!==n.length)throw t;var r="";try{for(var i=0;i<4;i++)r+=("0"+parseInt(n[i]).toString(16)).slice(-2);return r}catch(e){throw t}},t.encodeURIComponentAll=Be,t.newline_toUnix=function(e){return e.replace(/\r\n/gm,"\n")},t.newline_toDos=function(e){return(e=e.replace(/\r\n/gm,"\n")).replace(/\n/gm,"\r\n")},t.hextoposhex=Ve,t.intarystrtohex=Ue,t.strdiffidx=function(e,t){var n=e.length;e.length>t.length&&(n=t.length);for(var r=0;r<n;r++)if(e.charCodeAt(r)!=t.charCodeAt(r))return r;return e.length!=t.length?n:-1},t.KJUR=he,t.crypto=he.crypto,t.asn1=he.asn1,t.jws=he.jws,t.lang=he.lang},m0Pp:function(e,t,n){var r=n("2OiF");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},ne8i:function(e,t,n){var r=n("RYi7"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},nh4g:function(e,t,n){e.exports=!n("eeVq")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},s1Zv:function(e,t){(()=>{"use strict";if(!window.customElements)return;const e=window.HTMLElement,t=window.customElements.define,n=window.customElements.get,r=new Map,i=new Map;let o=!1,s=!1;window.HTMLElement=function(){if(!o){const e=r.get(this.constructor),t=n.call(window.customElements,e);return s=!0,new t}o=!1},window.HTMLElement.prototype=e.prototype,Object.defineProperty(window,"customElements",{value:window.customElements,configurable:!0,writable:!0}),Object.defineProperty(window.customElements,"define",{value:(n,a)=>{const u=a.prototype,c=class extends e{constructor(){super(),Object.setPrototypeOf(this,u),s||(o=!0,a.call(this)),s=!1}},l=c.prototype;c.observedAttributes=a.observedAttributes,l.connectedCallback=u.connectedCallback,l.disconnectedCallback=u.disconnectedCallback,l.attributeChangedCallback=u.attributeChangedCallback,l.adoptedCallback=u.adoptedCallback,r.set(a,n),i.set(n,a),t.call(window.customElements,n,c)},configurable:!0,writable:!0}),Object.defineProperty(window.customElements,"get",{value:e=>i.get(e),configurable:!0,writable:!0})})()},s5qY:function(e,t,n){var r=n("0/R4");e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},uAtd:function(e,t,n){var r=n("T39b"),i=n("Q3ne"),o=n("N6cJ"),s=n("y3w9"),a=n("OP3Y"),u=o.keys,c=o.key,l=function(e,t){var n=u(e,t),o=a(e);if(null===o)return n;var s=l(o,t);return s.length?n.length?i(new r(n.concat(s))):s:n};o.exp({getMetadataKeys:function(e){return l(s(e),arguments.length<2?void 0:c(arguments[1]))}})},vhPU:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on  "+e);return e}},w2a5:function(e,t,n){var r=n("aCFj"),i=n("ne8i"),o=n("d/Gc");e.exports=function(e){return function(t,n,s){var a,u=r(t),c=i(u.length),l=o(s,c);if(e&&n!=n){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}},wmvG:function(e,t,n){"use strict";var r=n("hswa").f,i=n("Kuth"),o=n("3Lyj"),s=n("m0Pp"),a=n("9gX7"),u=n("SlkY"),c=n("Afnz"),l=n("1TsA"),h=n("elZq"),d=n("nh4g"),p=n("Z6vF").fastKey,f=n("s5qY"),g=d?"_s":"size",v=function(e,t){var n,r=p(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,c){var l=e(function(e,r){a(e,l,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[g]=0,void 0!=r&&u(r,n,e[c],e)});return o(l.prototype,{clear:function(){for(var e=f(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[g]=0},delete:function(e){var n=f(this,t),r=v(n,e);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[g]--}return!!r},forEach:function(e){f(this,t);for(var n,r=s(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!v(f(this,t),e)}}),d&&r(l.prototype,"size",{get:function(){return f(this,t)[g]}}),l},def:function(e,t,n){var r,i,o=v(e,t);return o?o.v=n:(e._l=o={i:i=p(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o),r&&(r.n=o),e[g]++,"F"!==i&&(e._i[i]=o)),e},getEntry:v,setStrong:function(e,t,n){c(e,t,function(e,n){this._t=f(e,t),this._k=n,this._l=void 0},function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?l(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,l(1))},n?"entries":"values",!n,!0),h(t)}}},xpql:function(e,t,n){e.exports=!n("nh4g")&&!n("eeVq")(function(){return 7!=Object.defineProperty(n("Iw71")("div"),"a",{get:function(){return 7}}).a})},y3w9:function(e,t,n){var r=n("0/R4");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},ylqs:function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},zRwo:function(e,t,n){var r=n("6FMO");e.exports=function(e,t){return new(r(e))(t)}},zUnb:function(e,t,n){"use strict";n.r(t),n("hN/g");var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};function i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};function s(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function u(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(a(arguments[t]));return e}function c(e){return"function"==typeof e}var l=!1,h={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){l=e},get useDeprecatedSynchronousErrorHandling(){return l}};function d(e){setTimeout(function(){throw e})}var p={closed:!0,next:function(e){},error:function(e){if(h.useDeprecatedSynchronousErrorHandling)throw e;d(e)},complete:function(){}},f=Array.isArray||function(e){return e&&"number"==typeof e.length};function g(e){return null!=e&&"object"==typeof e}var v,y={e:{}};function m(){try{return v.apply(this,arguments)}catch(e){return y.e=e,y}}function b(e){return v=e,m}var w=function(e){function t(n){var r=e.call(this,n?n.length+" errors occurred during unsubscription:\n  "+n.map(function(e,t){return t+1+") "+e.toString()}).join("\n  "):"")||this;return r.errors=n,r.name="UnsubscriptionError",Object.setPrototypeOf(r,t.prototype),r}return i(t,e),t}(Error),_=function(){function e(e){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,e&&(this._unsubscribe=e)}var t;return e.prototype.unsubscribe=function(){var e,t=!1;if(!this.closed){var n=this._parent,r=this._parents,i=this._unsubscribe,o=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var s=-1,a=r?r.length:0;n;)n.remove(this),n=++s<a&&r[s]||null;if(c(i)&&b(i).call(this)===y&&(t=!0,e=e||(y.e instanceof w?S(y.e.errors):[y.e])),f(o))for(s=-1,a=o.length;++s<a;){var u=o[s];if(g(u)&&b(u.unsubscribe).call(u)===y){t=!0,e=e||[];var l=y.e;l instanceof w?e=e.concat(S(l.errors)):e.push(l)}}if(t)throw new w(e)}},e.prototype.add=function(t){if(!t||t===e.EMPTY)return e.EMPTY;if(t===this)return this;var n=t;switch(typeof t){case"function":n=new e(t);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.prototype._addParent=function(e){var t=this._parent,n=this._parents;t&&t!==e?n?-1===n.indexOf(e)&&n.push(e):this._parents=[e]:this._parent=e},e.EMPTY=((t=new e).closed=!0,t),e}();function S(e){return e.reduce(function(e,t){return e.concat(t instanceof w?t.errors:t)},[])}var E="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("rxSubscriber"):"@@rxSubscriber",x=function(e){function t(t,n,r){var i,o=e.call(this)||this;switch(o.syncErrorValue=null,o.syncErrorThrown=!1,o.syncErrorThrowable=!1,o.isStopped=!1,arguments.length){case 0:o.destination=p;break;case 1:if(!t){o.destination=p;break}if("object"==typeof t){if((i=t)instanceof x||"syncErrorThrowable"in i&&i[E]){var s=t[E]();o.syncErrorThrowable=s.syncErrorThrowable,o.destination=s,s.add(o)}else o.syncErrorThrowable=!0,o.destination=new F(o,t);break}default:o.syncErrorThrowable=!0,o.destination=new F(o,t,n,r)}return o}return i(t,e),t.prototype[E]=function(){return this},t.create=function(e,n,r){var i=new t(e,n,r);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parent,t=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=e,this._parents=t,this},t}(_),F=function(e){function t(t,n,r,i){var o,s=e.call(this)||this;s._parentSubscriber=t;var a=s;return c(n)?o=n:n&&(o=n.next,r=n.error,i=n.complete,n!==p&&(c((a=Object.create(n)).unsubscribe)&&s.add(a.unsubscribe.bind(a)),a.unsubscribe=s.unsubscribe.bind(s))),s._context=a,s._next=o,s._error=r,s._complete=i,s}return i(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;h.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=h.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):d(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;d(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};h.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),h.useDeprecatedSynchronousErrorHandling)throw e;d(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!h.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return h.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(d(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(x),C="function"==typeof Symbol&&Symbol.observable||"@@observable";var A=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,i=function(e,t,n){if(e){if(e instanceof x)return e;if(e[E])return e[E]()}return e||t||n?new x(e,t,n):new x(p)}(e,t,n);if(r?r.call(i,this.source):i.add(this.source||!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),h.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){h.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=k(t))(function(t,r){var i;i=n.subscribe(function(t){try{e(t)}catch(e){r(e),i&&i.unsubscribe()}},r,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[C]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:((n=e)?1===n.length?n[0]:function(e){return n.reduce(function(e,t){return t(e)},e)}:function(){})(this);var n},e.prototype.toPromise=function(e){var t=this;return new(e=k(e))(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function k(e){if(e||(e=h.Promise||Promise),!e)throw new Error("no Promise impl found");return e}function T(e){return e&&"function"==typeof e.schedule}var P=function(e){function t(t,n,r){var i=e.call(this)||this;return i.parent=t,i.outerValue=n,i.outerIndex=r,i.index=0,i}return i(t,e),t.prototype._next=function(e){this.parent.notifyNext(this.outerValue,e,this.outerIndex,this.index++,this)},t.prototype._error=function(e){this.parent.notifyError(e,this),this.unsubscribe()},t.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},t}(x),D=function(e){return function(t){for(var n=0,r=e.length;n<r&&!t.closed;n++)t.next(e[n]);t.closed||t.complete()}},I=function(e){return function(t){return e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,d),t}},N=function(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}(),R=function(e){return function(t){for(var n=e[N]();;){var r=n.next();if(r.done){t.complete();break}if(t.next(r.value),t.closed)break}return"function"==typeof n.return&&t.add(function(){n.return&&n.return()}),t}},O=function(e){return function(t){var n=e[C]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(t)}},j=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function H(e){return e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}var M=function(e){if(e instanceof A)return function(t){return e._isScalar?(t.next(e.value),void t.complete()):e.subscribe(t)};if(j(e))return D(e);if(H(e))return I(e);if(e&&"function"==typeof e[N])return R(e);if(e&&"function"==typeof e[C])return O(e);var t=g(e)?"an invalid object":"'"+e+"'";throw new TypeError("You provided "+t+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")},B=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},t.prototype.notifyError=function(e,t){this.destination.error(e)},t.prototype.notifyComplete=function(e){this.destination.complete()},t}(x);function V(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new U(e,t))}}var U=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new L(e,this.project,this.thisArg))},e}(),L=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return i(t,e),t.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(x);function K(e,t){return new A(t?function(n){var r=new _,i=0;return r.add(t.schedule(function(){i!==e.length?(n.next(e[i++]),n.closed||r.add(this.schedule())):n.complete()})),r}:D(e))}function q(e,t,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof t?function(r){return r.pipe(q(function(n,r){return(i=e(n,r),i instanceof A?i:new A(M(i))).pipe(V(function(e,i){return t(n,e,r,i)}));var i},n))}:("number"==typeof t&&(n=t),function(t){return t.lift(new z(e,n))})}var z=function(){function e(e,t){void 0===t&&(t=Number.POSITIVE_INFINITY),this.project=e,this.concurrent=t}return e.prototype.call=function(e,t){return t.subscribe(new Z(e,this.project,this.concurrent))},e}(),Z=function(e){function t(t,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=e.call(this,t)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return i(t,e),t.prototype._next=function(e){this.active<this.concurrent?this._tryNext(e):this.buffer.push(e)},t.prototype._tryNext=function(e){var t,n=this.index++;try{t=this.project(e,n)}catch(e){return void this.destination.error(e)}this.active++,this._innerSub(t,e,n)},t.prototype._innerSub=function(e,t,n){var r,i;this.add((r=e,i=new P(this,t,n),M(r)(i)))},t.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},t.prototype.notifyNext=function(e,t,n,r,i){this.destination.next(t)},t.prototype.notifyComplete=function(e){var t=this.buffer;this.remove(e),this.active--,t.length>0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(B);function W(e){return e}function J(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Number.POSITIVE_INFINITY,r=null,i=e[e.length-1];return T(i)?(r=e.pop(),e.length>1&&"number"==typeof e[e.length-1]&&(n=e.pop())):"number"==typeof i&&(n=e.pop()),null===r&&1===e.length&&e[0]instanceof A?e[0]:function(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),q(W,e)}(n)(K(e,r))}var G=function(e){function t(){var n=e.call(this,"object unsubscribed")||this;return n.name="ObjectUnsubscribedError",Object.setPrototypeOf(n,t.prototype),n}return i(t,e),t}(Error),Y=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return i(t,e),t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},t}(_),X=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return i(t,e),t}(x),Q=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return i(t,e),t.prototype[E]=function(){return new X(this)},t.prototype.lift=function(e){var t=new $(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new G;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].next(e)},t.prototype.error=function(e){if(this.closed)throw new G;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),i=0;i<n;i++)r[i].error(e);this.observers.length=0},t.prototype.complete=function(){if(this.closed)throw new G;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new G;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new G;return this.hasError?(e.error(this.thrownError),_.EMPTY):this.isStopped?(e.complete(),_.EMPTY):(this.observers.push(e),new Y(this,e))},t.prototype.asObservable=function(){var e=new A;return e.source=this,e},t.create=function(e,t){return new $(e,t)},t}(A),$=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return i(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):_.EMPTY},t}(Q);function ee(){return function(e){return e.lift(new te(e))}}var te=function(){function e(e){this.connectable=e}return e.prototype.call=function(e,t){var n=this.connectable;n._refCount++;var r=new ne(e,n),i=t.subscribe(r);return r.closed||(r.connection=n.connect()),i},e}(),ne=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return i(t,e),t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._refCount;if(t<=0)this.connection=null;else if(e._refCount=t-1,t>1)this.connection=null;else{var n=this.connection,r=e._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},t}(x),re=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype.connect=function(){var e=this._connection;return e||(this._isComplete=!1,(e=this._connection=new _).add(this.source.subscribe(new oe(this.getSubject(),this))),e.closed?(this._connection=null,e=_.EMPTY):this._connection=e),e},t.prototype.refCount=function(){return ee()(this)},t}(A).prototype,ie={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:re._subscribe},_isComplete:{value:re._isComplete,writable:!0},getSubject:{value:re.getSubject},connect:{value:re.connect},refCount:{value:re.refCount}},oe=function(e){function t(t,n){var r=e.call(this,t)||this;return r.connectable=n,r}return i(t,e),t.prototype._error=function(t){this._unsubscribe(),e.prototype._error.call(this,t)},t.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),e.prototype._complete.call(this)},t.prototype._unsubscribe=function(){var e=this.connectable;if(e){this.connectable=null;var t=e._connection;e._refCount=0,e._subject=null,e._connection=null,t&&t.unsubscribe()}},t}(X);function se(){return new Q}function ae(e){return{providedIn:e.providedIn||null,factory:e.factory,value:void 0}}var ue=function(){function e(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.ngInjectableDef=void 0!==t?ae({providedIn:t.providedIn||"root",factory:t.factory}):void 0}return e.prototype.toString=function(){return"InjectionToken "+this._desc},e}(),ce="__parameters__";function le(e,t,n){var r=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(e){var r=e.apply(void 0,u(t));for(var i in r)this[i]=r[i]}}}(t);function i(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this instanceof i)return r.apply(this,e),this;var n,o=new((n=i).bind.apply(n,u([void 0],e)));return s.annotation=o,s;function s(e,t,n){for(var r=e.hasOwnProperty(ce)?e[ce]:Object.defineProperty(e,ce,{value:[]})[ce];r.length<=n;)r.push(null);return(r[n]=r[n]||[]).push(o),e}}return n&&(i.prototype=Object.create(n.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i}var he=function(e){return e[e.OnPush=0]="OnPush",e[e.Default=1]="Default",e}(he||(he={})),de=function(e){return e[e.CheckOnce=0]="CheckOnce",e[e.Checked=1]="Checked",e[e.CheckAlways=2]="CheckAlways",e[e.Detached=3]="Detached",e[e.Errored=4]="Errored",e[e.Destroyed=5]="Destroyed",e}(de||(de={}));Function;var pe="undefined"!=typeof window&&window,fe="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,ge="undefined"!=typeof global&&global,ve=pe||ge||fe,ye=Promise.resolve(0),me=null;function be(){if(!me){var e=ve.Symbol;if(e&&e.iterator)me=e.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),n=0;n<t.length;++n){var r=t[n];"entries"!==r&&"size"!==r&&Map.prototype[r]===Map.prototype.entries&&(me=r)}}return me}function we(e){"undefined"==typeof Zone?ye.then(function(){e&&e.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",e)}function _e(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function Se(e){if("string"==typeof e)return e;if(e instanceof Array)return"["+e.map(Se).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return""+e.overriddenName;if(e.name)return""+e.name;var t=e.toString();if(null==t)return""+t;var n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function Ee(e){return e.__forward_ref__=Ee,e.toString=function(){return Se(this())},e}function xe(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")&&e.__forward_ref__===Ee?e():e}var Fe=le("Inject",function(e){return{token:e}}),Ce=le("Optional"),Ae=le("Self"),ke=le("SkipSelf"),Te="__source",Pe=new Object,De=new ue("INJECTOR"),Ie=function(){function e(){}return e.prototype.get=function(e,t){if(void 0===t&&(t=Pe),t===Pe)throw new Error("NullInjectorError: No provider for "+Se(e)+"!");return t},e}(),Ne=function(){function e(){}return e.create=function(e,t){return Array.isArray(e)?new Ke(e,t):new Ke(e.providers,e.parent,e.name||null)},e.THROW_IF_NOT_FOUND=Pe,e.NULL=new Ie,e.ngInjectableDef=ae({providedIn:"any",factory:function(){return Ge(De)}}),e}(),Re=function(e){return e},Oe=[],je=Re,He=function(){return Array.prototype.slice.call(arguments)},Me={},Be=function(e){for(var t in e)if(e[t]===Me)return t;throw Error("!prop")}({provide:String,useValue:Me}),Ve=Ne.NULL,Ue=/\n/gm,Le="\u0275",Ke=function(){function e(e,t,n){void 0===t&&(t=Ve),void 0===n&&(n=null),this.parent=t,this.source=n;var r=this._records=new Map;r.set(Ne,{token:Ne,fn:Re,deps:Oe,value:this,useNew:!1}),r.set(De,{token:De,fn:Re,deps:Oe,value:this,useNew:!1}),function e(t,n){if(n)if((n=xe(n))instanceof Array)for(var r=0;r<n.length;r++)e(t,n[r]);else{if("function"==typeof n)throw Ze("Function/Class not supported",n);if(!n||"object"!=typeof n||!n.provide)throw Ze("Unexpected provider",n);var i=xe(n.provide),o=function(e){var t=function(e){var t=Oe,n=e.deps;if(n&&n.length){t=[];for(var r=0;r<n.length;r++){var i=6;if((u=xe(n[r]))instanceof Array)for(var o=0,s=u;o<s.length;o++){var a=s[o];a instanceof Ce||a==Ce?i|=1:a instanceof ke||a==ke?i&=-3:a instanceof Ae||a==Ae?i&=-5:u=a instanceof Fe?a.token:xe(a)}t.push({token:u,options:i})}}else if(e.useExisting){var u;t=[{token:u=xe(e.useExisting),options:6}]}else if(!(n||Be in e))throw Ze("'deps' required",e);return t}(e),n=Re,r=Oe,i=!1,o=xe(e.provide);if(Be in e)r=e.useValue;else if(e.useFactory)n=e.useFactory;else if(e.useExisting);else if(e.useClass)i=!0,n=xe(e.useClass);else{if("function"!=typeof o)throw Ze("StaticProvider does not have [useValue|useFactory|useExisting|useClass] or [provide] is not newable",e);i=!0,n=o}return{deps:t,fn:n,useNew:i,value:r}}(n);if(!0===n.multi){var s=t.get(i);if(s){if(s.fn!==He)throw qe(i)}else t.set(i,s={token:n.provide,deps:[],useNew:!1,fn:He,value:Oe});s.deps.push({token:i=n,options:6})}var a=t.get(i);if(a&&a.fn==He)throw qe(i);t.set(i,o)}}(r,e)}return e.prototype.get=function(e,t,n){void 0===n&&(n=0);var r=this._records.get(e);try{return function e(t,n,r,i,o,s){try{return function(t,n,r,i,o,s){var a,c;if(!n||4&s)2&s||(a=i.get(t,o,0));else{if((a=n.value)==je)throw Error(Le+"Circular dependency");if(a===Oe){n.value=je;var l=n.useNew,h=n.fn,d=n.deps,p=Oe;if(d.length){p=[];for(var f=0;f<d.length;f++){var g=d[f],v=g.options,y=2&v?r.get(g.token):void 0;p.push(e(g.token,y,r,y||4&v?i:Ve,1&v?null:Ne.THROW_IF_NOT_FOUND,0))}}n.value=a=l?new((c=h).bind.apply(c,u([void 0],p))):h.apply(void 0,p)}}return a}(t,n,r,i,o,s)}catch(e){throw e instanceof Error||(e=new Error(e)),(e.ngTempTokenPath=e.ngTempTokenPath||[]).unshift(t),n&&n.value==je&&(n.value=Oe),e}}(e,r,this._records,this.parent,t,n)}catch(t){var i=t.ngTempTokenPath;throw e[Te]&&i.unshift(e[Te]),t.message=ze("\n"+t.message,i,this.source),t.ngTokenPath=i,t.ngTempTokenPath=null,t}},e.prototype.toString=function(){var e=[];return this._records.forEach(function(t,n){return e.push(Se(n))}),"StaticInjector["+e.join(", ")+"]"},e}();function qe(e){return Ze("Cannot mix multi providers and regular providers",e)}function ze(e,t,n){void 0===n&&(n=null),e=e&&"\n"===e.charAt(0)&&e.charAt(1)==Le?e.substr(2):e;var r=Se(t);if(t instanceof Array)r=t.map(Se).join(" -> ");else if("object"==typeof t){var i=[];for(var o in t)if(t.hasOwnProperty(o)){var s=t[o];i.push(o+":"+("string"==typeof s?JSON.stringify(s):Se(s)))}r="{"+i.join(", ")+"}"}return"StaticInjectorError"+(n?"("+n+")":"")+"["+r+"]: "+e.replace(Ue,"\n  ")}function Ze(e,t){return new Error(ze(e,t))}var We=void 0;function Je(e){var t=We;return We=e,t}function Ge(e,t){if(void 0===t&&(t=0),void 0===We)throw new Error("inject() must be called from an injection context");if(null===We){var n=e.ngInjectableDef;if(n&&"root"==n.providedIn)return void 0===n.value?n.value=n.factory():n.value;throw new Error("Injector: NOT_FOUND ["+Se(e)+"]")}return We.get(e,8&t?null:void 0,t)}String;var Ye=function(e){return e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None",e}(Ye||(Ye={})),Xe=new function(e){this.full="6.0.2",this.major="6.0.2".split(".")[0],this.minor="6.0.2".split(".")[1],this.patch="6.0.2".split(".").slice(2).join(".")}("6.0.2"),Qe="ngDebugContext",$e="ngOriginalError",et="ngErrorLogger";function tt(e){return e[Qe]}function nt(e){return e[$e]}function rt(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e.error.apply(e,u(t))}var it=function(){function e(){this._console=console}return e.prototype.handleError=function(e){var t=this._findOriginalError(e),n=this._findContext(e),r=function(e){return e[et]||rt}(e);r(this._console,"ERROR",e),t&&r(this._console,"ORIGINAL ERROR",t),n&&r(this._console,"ERROR CONTEXT",n)},e.prototype._findContext=function(e){return e?tt(e)?tt(e):this._findContext(nt(e)):null},e.prototype._findOriginalError=function(e){for(var t=nt(e);t&&nt(t);)t=nt(t);return t},e}(),ot=new ue("The presence of this token marks an injector as being the root injector.");function st(e){return!!e&&"function"==typeof e.then}var at=new ue("Application Initializer"),ut=function(){function e(e){var t=this;this.appInits=e,this.initialized=!1,this.done=!1,this.donePromise=new Promise(function(e,n){t.resolve=e,t.reject=n})}return e.prototype.runInitializers=function(){var e=this;if(!this.initialized){var t=[],n=function(){e.done=!0,e.resolve()};if(this.appInits)for(var r=0;r<this.appInits.length;r++){var i=this.appInits[r]();st(i)&&t.push(i)}Promise.all(t).then(function(){n()}).catch(function(t){e.reject(t)}),0===t.length&&n(),this.initialized=!0}},e}(),ct=new ue("AppId");function lt(){return""+ht()+ht()+ht()}function ht(){return String.fromCharCode(97+Math.floor(25*Math.random()))}var dt=new ue("Platform Initializer"),pt=new ue("Platform ID"),ft=new ue("appBootstrapListener"),gt=function(){function e(){}return e.prototype.log=function(e){console.log(e)},e.prototype.warn=function(e){console.warn(e)},e.ctorParameters=function(){return[]},e}();function vt(){throw new Error("Runtime compiler is not loaded")}var yt=function(){function e(){}return e.prototype.compileModuleSync=function(e){throw vt()},e.prototype.compileModuleAsync=function(e){throw vt()},e.prototype.compileModuleAndAllComponentsSync=function(e){throw vt()},e.prototype.compileModuleAndAllComponentsAsync=function(e){throw vt()},e.prototype.clearCache=function(){},e.prototype.clearCacheFor=function(e){},e}(),mt=function(){},bt=function(){};function wt(e){var t=Error("No component factory found for "+Se(e)+". Did you add it to @NgModule.entryComponents?");return t[Et]=e,t}var _t,St,Et="ngComponent",xt=function(){function e(){}return e.prototype.resolveComponentFactory=function(e){throw wt(e)},e}(),Ft=function(){function e(){}return e.NULL=new xt,e}(),Ct=function(){function e(e,t,n){this._parent=t,this._ngModule=n,this._factories=new Map;for(var r=0;r<e.length;r++){var i=e[r];this._factories.set(i.componentType,i)}}return e.prototype.resolveComponentFactory=function(e){var t=this._factories.get(e);if(!t&&this._parent&&(t=this._parent.resolveComponentFactory(e)),!t)throw wt(e);return new At(t,this._ngModule)},e}(),At=function(e){function t(t,n){var r=e.call(this)||this;return r.factory=t,r.ngModule=n,r.selector=t.selector,r.componentType=t.componentType,r.ngContentSelectors=t.ngContentSelectors,r.inputs=t.inputs,r.outputs=t.outputs,r}return i(t,e),t.prototype.create=function(e,t,n,r){return this.factory.create(e,t,n,r||this.ngModule)},t}(bt),kt=function(){},Tt=function(){var e=ve.wtf;return!(!e||!(_t=e.trace)||(St=_t.events,0))}();function Pt(e,t){return null}var Dt=Tt?function(e,t){return void 0===t&&(t=null),St.createScope(e,t)}:function(e,t){return Pt},It=Tt?function(e,t){return _t.leaveScope(e,t),t}:function(e,t){return t},Nt=function(e){function t(t){void 0===t&&(t=!1);var n=e.call(this)||this;return n.__isAsync=t,n}return i(t,e),t.prototype.emit=function(t){e.prototype.next.call(this,t)},t.prototype.subscribe=function(t,n,r){var i,o=function(e){return null},s=function(){return null};t&&"object"==typeof t?(i=this.__isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(o=this.__isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(s=this.__isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(i=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},n&&(o=this.__isAsync?function(e){setTimeout(function(){return n(e)})}:function(e){n(e)}),r&&(s=this.__isAsync?function(){setTimeout(function(){return r()})}:function(){r()}));var a=e.prototype.subscribe.call(this,i,o,s);return t instanceof _&&t.add(a),a},t}(Q),Rt=function(){function e(e){var t,n=e.enableLongStackTrace,r=void 0!==n&&n;if(this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Nt(!1),this.onMicrotaskEmpty=new Nt(!1),this.onStable=new Nt(!1),this.onError=new Nt(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched(),this._nesting=0,this._outer=this._inner=Zone.current,Zone.wtfZoneSpec&&(this._inner=this._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(this._inner=this._inner.fork(new Zone.TaskTrackingZoneSpec)),r&&Zone.longStackTraceZoneSpec&&(this._inner=this._inner.fork(Zone.longStackTraceZoneSpec)),(t=this)._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:function(e,n,r,i,o,s){try{return Mt(t),e.invokeTask(r,i,o,s)}finally{Bt(t)}},onInvoke:function(e,n,r,i,o,s,a){try{return Mt(t),e.invoke(r,i,o,s,a)}finally{Bt(t)}},onHasTask:function(e,n,r,i){e.hasTask(r,i),n===r&&("microTask"==i.change?(t.hasPendingMicrotasks=i.microTask,Ht(t)):"macroTask"==i.change&&(t.hasPendingMacrotasks=i.macroTask))},onHandleError:function(e,n,r,i){return e.handleError(r,i),t.runOutsideAngular(function(){return t.onError.emit(i)}),!1}})}return e.isInAngularZone=function(){return!0===Zone.current.get("isAngularZone")},e.assertInAngularZone=function(){if(!e.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")},e.assertNotInAngularZone=function(){if(e.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")},e.prototype.run=function(e,t,n){return this._inner.run(e,t,n)},e.prototype.runTask=function(e,t,n,r){var i=this._inner,o=i.scheduleEventTask("NgZoneEvent: "+r,e,jt,Ot,Ot);try{return i.runTask(o,t,n)}finally{i.cancelTask(o)}},e.prototype.runGuarded=function(e,t,n){return this._inner.runGuarded(e,t,n)},e.prototype.runOutsideAngular=function(e){return this._outer.run(e)},e}();function Ot(){}var jt={};function Ht(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(function(){return e.onStable.emit(null)})}finally{e.isStable=!0}}}function Mt(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Bt(e){e._nesting--,Ht(e)}var Vt,Ut=function(){function e(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Nt,this.onMicrotaskEmpty=new Nt,this.onStable=new Nt,this.onError=new Nt}return e.prototype.run=function(e){return e()},e.prototype.runGuarded=function(e){return e()},e.prototype.runOutsideAngular=function(e){return e()},e.prototype.runTask=function(e){return e()},e}(),Lt=function(){function e(e){var t=this;this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents(),e.run(function(){t.taskTrackingZone=Zone.current.get("TaskTrackingZone")})}return e.prototype._watchAngularEvents=function(){var e=this;this._ngZone.onUnstable.subscribe({next:function(){e._didWork=!0,e._isZoneStable=!1}}),this._ngZone.runOutsideAngular(function(){e._ngZone.onStable.subscribe({next:function(){Rt.assertNotInAngularZone(),we(function(){e._isZoneStable=!0,e._runCallbacksIfReady()})}})})},e.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount},e.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount},e.prototype.isStable=function(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks},e.prototype._runCallbacksIfReady=function(){var e=this;if(this.isStable())we(function(){for(;0!==e._callbacks.length;){var t=e._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(e._didWork)}e._didWork=!1});else{var t=this.getPendingTasks();this._callbacks=this._callbacks.filter(function(e){return!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)}),this._didWork=!0}},e.prototype.getPendingTasks=function(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(function(e){return{source:e.source,isPeriodic:e.data.isPeriodic,delay:e.data.delay,creationLocation:e.creationLocation,xhr:e.data.target}}):[]},e.prototype.addCallback=function(e,t,n){var r=this,i=-1;t&&t>0&&(i=setTimeout(function(){r._callbacks=r._callbacks.filter(function(e){return e.timeoutId!==i}),e(r._didWork,r.getPendingTasks())},t)),this._callbacks.push({doneCb:e,timeoutId:i,updateCb:n})},e.prototype.whenStable=function(e,t,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(e,t,n),this._runCallbacksIfReady()},e.prototype.getPendingRequestCount=function(){return this._pendingCount},e.prototype.findProviders=function(e,t,n){return[]},e}(),Kt=function(){function e(){this._applications=new Map,qt.addToWindow(this)}return e.prototype.registerApplication=function(e,t){this._applications.set(e,t)},e.prototype.unregisterApplication=function(e){this._applications.delete(e)},e.prototype.unregisterAllApplications=function(){this._applications.clear()},e.prototype.getTestability=function(e){return this._applications.get(e)||null},e.prototype.getAllTestabilities=function(){return Array.from(this._applications.values())},e.prototype.getAllRootElements=function(){return Array.from(this._applications.keys())},e.prototype.findTestabilityInTree=function(e,t){return void 0===t&&(t=!0),qt.findTestabilityInTree(this,e,t)},e.ctorParameters=function(){return[]},e}(),qt=new(function(){function e(){}return e.prototype.addToWindow=function(e){},e.prototype.findTestabilityInTree=function(e,t,n){return null},e}()),zt=!0,Zt=!1,Wt=new ue("AllowMultipleToken");function Jt(){return Zt=!0,zt}var Gt=function(e,t){this.name=e,this.token=t};function Yt(e,t,n){void 0===n&&(n=[]);var r="Platform: "+t,i=new ue(r);return function(t){void 0===t&&(t=[]);var o=Xt();if(!o||o.injector.get(Wt,!1))if(e)e(n.concat(t).concat({provide:i,useValue:!0}));else{var s=n.concat(t).concat({provide:i,useValue:!0});!function(e){if(Vt&&!Vt.destroyed&&!Vt.injector.get(Wt,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");Vt=e.get(Qt);var t=e.get(dt,null);t&&t.forEach(function(e){return e()})}(Ne.create({providers:s,name:r}))}return function(e){var t=Xt();if(!t)throw new Error("No platform exists!");if(!t.injector.get(e,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return t}(i)}}function Xt(){return Vt&&!Vt.destroyed?Vt:null}var Qt=function(){function e(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}return e.prototype.bootstrapModuleFactory=function(e,t){var n,r=this,i="noop"===(n=t?t.ngZone:void 0)?new Ut:("zone.js"===n?void 0:n)||new Rt({enableLongStackTrace:Jt()}),o=[{provide:Rt,useValue:i}];return i.run(function(){var t=Ne.create({providers:o,parent:r.injector,name:e.moduleType.name}),n=e.create(t),s=n.injector.get(it,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return n.onDestroy(function(){return tn(r._modules,n)}),i.runOutsideAngular(function(){return i.onError.subscribe({next:function(e){s.handleError(e)}})}),function(e,t,i){try{var o=((s=n.injector.get(ut)).runInitializers(),s.donePromise.then(function(){return r._moduleDoBootstrap(n),n}));return st(o)?o.catch(function(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}):o}catch(n){throw t.runOutsideAngular(function(){return e.handleError(n)}),n}var s}(s,i)})},e.prototype.bootstrapModule=function(e,t){var n=this;void 0===t&&(t=[]);var r=this.injector.get(mt),i=$t({},t);return r.createCompiler([i]).compileModuleAsync(e).then(function(e){return n.bootstrapModuleFactory(e,i)})},e.prototype._moduleDoBootstrap=function(e){var t=e.injector.get(en);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(function(e){return t.bootstrap(e)});else{if(!e.instance.ngDoBootstrap)throw new Error("The module "+Se(e.instance.constructor)+' was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.');e.instance.ngDoBootstrap(t)}this._modules.push(e)},e.prototype.onDestroy=function(e){this._destroyListeners.push(e)},Object.defineProperty(e.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(function(e){return e.destroy()}),this._destroyListeners.forEach(function(e){return e()}),this._destroyed=!0},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!0,configurable:!0}),e}();function $t(e,t){return Array.isArray(t)?t.reduce($t,e):o({},e,t)}var en=function(){function e(e,t,n,r,i,o){var s=this;this._zone=e,this._console=t,this._injector=n,this._exceptionHandler=r,this._componentFactoryResolver=i,this._initStatus=o,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=Jt(),this._zone.onMicrotaskEmpty.subscribe({next:function(){s._zone.run(function(){s.tick()})}});var a=new A(function(e){s._stable=s._zone.isStable&&!s._zone.hasPendingMacrotasks&&!s._zone.hasPendingMicrotasks,s._zone.runOutsideAngular(function(){e.next(s._stable),e.complete()})}),u=new A(function(e){var t;s._zone.runOutsideAngular(function(){t=s._zone.onStable.subscribe(function(){Rt.assertNotInAngularZone(),we(function(){s._stable||s._zone.hasPendingMacrotasks||s._zone.hasPendingMicrotasks||(s._stable=!0,e.next(!0))})})});var n=s._zone.onUnstable.subscribe(function(){Rt.assertInAngularZone(),s._stable&&(s._stable=!1,s._zone.runOutsideAngular(function(){e.next(!1)}))});return function(){t.unsubscribe(),n.unsubscribe()}});this.isStable=J(a,u.pipe(function(e){return ee()((t=se,function(e){var n;n="function"==typeof t?t:function(){return t};var r=Object.create(e,ie);return r.source=e,r.subjectFactory=n,r})(e));var t}))}return e.prototype.bootstrap=function(e,t){var n,r=this;if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");n=e instanceof bt?e:this._componentFactoryResolver.resolveComponentFactory(e),this.componentTypes.push(n.componentType);var i=n instanceof At?null:this._injector.get(kt),o=n.create(Ne.NULL,[],t||n.selector,i);o.onDestroy(function(){r._unloadComponent(o)});var s=o.injector.get(Lt,null);return s&&o.injector.get(Kt).registerApplication(o.location.nativeElement,s),this._loadComponent(o),Jt()&&this._console.log("Angular is running in the development mode. Call enableProdMode() to enable the production mode."),o},e.prototype.tick=function(){var t=this;if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");var n=e._tickScope();try{this._runningTick=!0,this._views.forEach(function(e){return e.detectChanges()}),this._enforceNoNewChanges&&this._views.forEach(function(e){return e.checkNoChanges()})}catch(e){this._zone.runOutsideAngular(function(){return t._exceptionHandler.handleError(e)})}finally{this._runningTick=!1,It(n)}},e.prototype.attachView=function(e){var t=e;this._views.push(t),t.attachToAppRef(this)},e.prototype.detachView=function(e){var t=e;tn(this._views,t),t.detachFromAppRef()},e.prototype._loadComponent=function(e){this.attachView(e.hostView),this.tick(),this.components.push(e),this._injector.get(ft,[]).concat(this._bootstrapListeners).forEach(function(t){return t(e)})},e.prototype._unloadComponent=function(e){this.detachView(e.hostView),tn(this.components,e)},e.prototype.ngOnDestroy=function(){this._views.slice().forEach(function(e){return e.destroy()})},Object.defineProperty(e.prototype,"viewCount",{get:function(){return this._views.length},enumerable:!0,configurable:!0}),e._tickScope=Dt("ApplicationRef#tick()"),e}();function tn(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var nn=function(){},rn=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(rn||(rn={})),on=function(e){this.nativeElement=e},sn=function(){function e(){this.dirty=!0,this._results=[],this.changes=new Nt,this.length=0}return e.prototype.map=function(e){return this._results.map(e)},e.prototype.filter=function(e){return this._results.filter(e)},e.prototype.find=function(e){return this._results.find(e)},e.prototype.reduce=function(e,t){return this._results.reduce(e,t)},e.prototype.forEach=function(e){this._results.forEach(e)},e.prototype.some=function(e){return this._results.some(e)},e.prototype.toArray=function(){return this._results.slice()},e.prototype[be()]=function(){return this._results[be()]()},e.prototype.toString=function(){return this._results.toString()},e.prototype.reset=function(e){this._results=function e(t){return t.reduce(function(t,n){var r=Array.isArray(n)?e(n):n;return t.concat(r)},[])}(e),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]},e.prototype.notifyOnChanges=function(){this.changes.emit(this)},e.prototype.setDirty=function(){this.dirty=!0},e.prototype.destroy=function(){this.changes.complete(),this.changes.unsubscribe()},e}(),an=function(){},un=function(){function e(e,t,n){this._debugContext=n,this.nativeNode=e,t&&t instanceof cn?t.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(e.prototype,"injector",{get:function(){return this._debugContext.injector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentInstance",{get:function(){return this._debugContext.component},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._debugContext.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){return this._debugContext.references},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"providerTokens",{get:function(){return this._debugContext.providerTokens},enumerable:!0,configurable:!0}),e}(),cn=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.properties={},i.attributes={},i.classes={},i.styles={},i.childNodes=[],i.nativeElement=t,i}return i(t,e),t.prototype.addChild=function(e){e&&(this.childNodes.push(e),e.parent=this)},t.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);-1!==t&&(e.parent=null,this.childNodes.splice(t,1))},t.prototype.insertChildrenAfter=function(e,t){var n,r=this,i=this.childNodes.indexOf(e);-1!==i&&((n=this.childNodes).splice.apply(n,u([i+1,0],t)),t.forEach(function(e){e.parent&&e.parent.removeChild(e),e.parent=r}))},t.prototype.insertBefore=function(e,t){var n=this.childNodes.indexOf(e);-1===n?this.addChild(t):(t.parent&&t.parent.removeChild(t),t.parent=this,this.childNodes.splice(n,0,t))},t.prototype.query=function(e){return this.queryAll(e)[0]||null},t.prototype.queryAll=function(e){var t=[];return function e(t,n,r){t.childNodes.forEach(function(t){t instanceof cn&&(n(t)&&r.push(t),e(t,n,r))})}(this,e,t),t},t.prototype.queryAllNodes=function(e){var t=[];return function e(t,n,r){t instanceof cn&&t.childNodes.forEach(function(t){n(t)&&r.push(t),t instanceof cn&&e(t,n,r)})}(this,e,t),t},Object.defineProperty(t.prototype,"children",{get:function(){return this.childNodes.filter(function(e){return e instanceof t})},enumerable:!0,configurable:!0}),t.prototype.triggerEventHandler=function(e,t){this.listeners.forEach(function(n){n.name==e&&n.callback(t)})},t}(un),ln=new Map;function hn(e){return ln.get(e)||null}function dn(e){ln.set(e.nativeNode,e)}function pn(e,t){var n=vn(e),r=vn(t);return n&&r?function(e,t,n){for(var r=e[be()](),i=t[be()]();;){var o=r.next(),s=i.next();if(o.done&&s.done)return!0;if(o.done||s.done)return!1;if(!n(o.value,s.value))return!1}}(e,t,pn):!(n||!e||"object"!=typeof e&&"function"!=typeof e||r||!t||"object"!=typeof t&&"function"!=typeof t)||_e(e,t)}var fn=function(){function e(e){this.wrapped=e}return e.wrap=function(t){return new e(t)},e.unwrap=function(t){return e.isWrapped(t)?t.wrapped:t},e.isWrapped=function(t){return t instanceof e},e}(),gn=function(){function e(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}return e.prototype.isFirstChange=function(){return this.firstChange},e}();function vn(e){return!!yn(e)&&(Array.isArray(e)||!(e instanceof Map)&&be()in e)}function yn(e){return null!==e&&("function"==typeof e||"object"==typeof e)}var mn=function(){function e(){}return e.prototype.supports=function(e){return vn(e)},e.prototype.create=function(e){return new wn(e)},e}(),bn=function(e,t){return t},wn=function(){function e(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||bn}return e.prototype.forEachItem=function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)},e.prototype.forEachOperation=function(e){for(var t=this._itHead,n=this._removalsHead,r=0,i=null;t||n;){var o=!n||t&&t.currentIndex<xn(n,r,i)?t:n,s=xn(o,r,i),a=o.currentIndex;if(o===n)r--,n=n._nextRemoved;else if(t=t._next,null==o.previousIndex)r++;else{i||(i=[]);var u=s-r,c=a-r;if(u!=c){for(var l=0;l<u;l++){var h=l<i.length?i[l]:i[l]=0,d=h+l;c<=d&&d<u&&(i[l]=h+1)}i[o.previousIndex]=c-u}}s!==a&&e(o,s,a)}},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},e.prototype.forEachMovedItem=function(e){var t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)},e.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},e.prototype.forEachIdentityChange=function(e){var t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)e(t)},e.prototype.diff=function(e){if(null==e&&(e=[]),!vn(e))throw new Error("Error trying to diff '"+Se(e)+"'. Only arrays and iterables are allowed");return this.check(e)?this:null},e.prototype.onDestroy=function(){},e.prototype.check=function(e){var t=this;this._reset();var n,r,i,o=this._itHead,s=!1;if(Array.isArray(e)){this.length=e.length;for(var a=0;a<this.length;a++)i=this._trackByFn(a,r=e[a]),null!==o&&_e(o.trackById,i)?(s&&(o=this._verifyReinsertion(o,r,i,a)),_e(o.item,r)||this._addIdentityChange(o,r)):(o=this._mismatch(o,r,i,a),s=!0),o=o._next}else n=0,function(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t(e[n]);else for(var r=e[be()](),i=void 0;!(i=r.next()).done;)t(i.value)}(e,function(e){i=t._trackByFn(n,e),null!==o&&_e(o.trackById,i)?(s&&(o=t._verifyReinsertion(o,e,i,n)),_e(o.item,e)||t._addIdentityChange(o,e)):(o=t._mismatch(o,e,i,n),s=!0),o=o._next,n++}),this.length=n;return this._truncate(o),this.collection=e,this.isDirty},Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead},enumerable:!0,configurable:!0}),e.prototype._reset=function(){if(this.isDirty){var e=void 0,t=void 0;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}},e.prototype._mismatch=function(e,t,n,r){var i;return null===e?i=this._itTail:(i=e._prev,this._remove(e)),null!==(e=null===this._linkedRecords?null:this._linkedRecords.get(n,r))?(_e(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,i,r)):null!==(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(_e(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,i,r)):e=this._addAfter(new _n(t,n),i,r),e},e.prototype._verifyReinsertion=function(e,t,n,r){var i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==i?e=this._reinsertAfter(i,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e},e.prototype._truncate=function(e){for(;null!==e;){var t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)},e.prototype._reinsertAfter=function(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);var r=e._prevRemoved,i=e._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e},e.prototype._moveAfter=function(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e},e.prototype._addAfter=function(e,t,n){return this._insertAfter(e,t,n),this._additionsTail=null===this._additionsTail?this._additionsHead=e:this._additionsTail._nextAdded=e,e},e.prototype._insertAfter=function(e,t,n){var r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new En),this._linkedRecords.put(e),e.currentIndex=n,e},e.prototype._remove=function(e){return this._addToRemovals(this._unlink(e))},e.prototype._unlink=function(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);var t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e},e.prototype._addToMoves=function(e,t){return e.previousIndex===t?e:(this._movesTail=null===this._movesTail?this._movesHead=e:this._movesTail._nextMoved=e,e)},e.prototype._addToRemovals=function(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new En),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e},e.prototype._addIdentityChange=function(e,t){return e.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=e:this._identityChangesTail._nextIdentityChange=e,e},e}(),_n=function(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null},Sn=function(){function e(){this._head=null,this._tail=null}return e.prototype.add=function(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)},e.prototype.get=function(e,t){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||t<=n.currentIndex)&&_e(n.trackById,e))return n;return null},e.prototype.remove=function(e){var t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head},e}(),En=function(){function e(){this.map=new Map}return e.prototype.put=function(e){var t=e.trackById,n=this.map.get(t);n||(n=new Sn,this.map.set(t,n)),n.add(e)},e.prototype.get=function(e,t){var n=this.map.get(e);return n?n.get(e,t):null},e.prototype.remove=function(e){var t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.map.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.map.clear()},e}();function xn(e,t,n){var r=e.previousIndex;if(null===r)return r;var i=0;return n&&r<n.length&&(i=n[r]),r+t+i}var Fn=function(){function e(){}return e.prototype.supports=function(e){return e instanceof Map||yn(e)},e.prototype.create=function(){return new Cn},e}(),Cn=function(){function e(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),e.prototype.forEachItem=function(e){var t;for(t=this._mapHead;null!==t;t=t._next)e(t)},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachChangedItem=function(e){var t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},e.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},e.prototype.diff=function(e){if(e){if(!(e instanceof Map||yn(e)))throw new Error("Error trying to diff '"+Se(e)+"'. Only maps and objects are allowed")}else e=new Map;return this.check(e)?this:null},e.prototype.onDestroy=function(){},e.prototype.check=function(e){var t=this;this._reset();var n=this._mapHead;if(this._appendAfter=null,this._forEach(e,function(e,r){if(n&&n.key===r)t._maybeAddToChanges(n,e),t._appendAfter=n,n=n._next;else{var i=t._getOrCreateRecordForKey(r,e);n=t._insertBeforeOrAppend(n,i)}}),n){n._prev&&(n._prev._next=null),this._removalsHead=n;for(var r=n;null!==r;r=r._nextRemoved)r===this._mapHead&&(this._mapHead=null),this._records.delete(r.key),r._nextRemoved=r._next,r.previousValue=r.currentValue,r.currentValue=null,r._prev=null,r._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty},e.prototype._insertBeforeOrAppend=function(e,t){if(e){var n=e._prev;return t._next=e,t._prev=n,e._prev=t,n&&(n._next=t),e===this._mapHead&&(this._mapHead=t),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=t,t._prev=this._appendAfter):this._mapHead=t,this._appendAfter=t,null},e.prototype._getOrCreateRecordForKey=function(e,t){if(this._records.has(e)){var n=this._records.get(e);this._maybeAddToChanges(n,t);var r=n._prev,i=n._next;return r&&(r._next=i),i&&(i._prev=r),n._next=null,n._prev=null,n}var o=new An(e);return this._records.set(e,o),o.currentValue=t,this._addToAdditions(o),o},e.prototype._reset=function(){if(this.isDirty){var e=void 0;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}},e.prototype._maybeAddToChanges=function(e,t){_e(t,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=t,this._addToChanges(e))},e.prototype._addToAdditions=function(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)},e.prototype._addToChanges=function(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)},e.prototype._forEach=function(e,t){e instanceof Map?e.forEach(t):Object.keys(e).forEach(function(n){return t(e[n],n)})},e}(),An=function(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null},kn=function(){function e(e){this.factories=e}return e.create=function(t,n){if(null!=n){var r=n.factories.slice();t=t.concat(r)}return new e(t)},e.extend=function(t){return{provide:e,useFactory:function(n){if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return e.create(t,n)},deps:[[e,new ke,new Ce]]}},e.prototype.find=function(e){var t,n=this.factories.find(function(t){return t.supports(e)});if(null!=n)return n;throw new Error("Cannot find a differ supporting object '"+e+"' of type '"+((t=e).name||typeof t)+"'")},e.ngInjectableDef=ae({providedIn:"root",factory:function(){return new e([new mn])}}),e}(),Tn=function(){function e(e){this.factories=e}return e.create=function(t,n){if(n){var r=n.factories.slice();t=t.concat(r)}return new e(t)},e.extend=function(t){return{provide:e,useFactory:function(n){if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return e.create(t,n)},deps:[[e,new ke,new Ce]]}},e.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(t)return t;throw new Error("Cannot find a differ supporting object '"+e+"'")},e}(),Pn=[new Fn],Dn=new kn([new mn]),In=new Tn(Pn),Nn=Yt(null,"core",[{provide:pt,useValue:"unknown"},{provide:Qt,deps:[Ne]},{provide:Kt,deps:[]},{provide:gt,deps:[]}]),Rn=new ue("LocaleId"),On=function(e){return e[e.Error=0]="Error",e[e.Warning=1]="Warning",e[e.Ignore=2]="Ignore",e}(On||(On={}));function jn(){return Dn}function Hn(){return In}function Mn(e){return e||"en-US"}var Bn=function(e){},Vn=function(){function e(e){if(this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),this.inertBodyElement=this.inertDocument.body,null==this.inertBodyElement){var t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t),this.inertBodyElement=this.inertDocument.createElement("body"),t.appendChild(this.inertBodyElement)}this.inertBodyElement.innerHTML='<svg><g onload="this.parentNode.remove()"></g></svg>',!this.inertBodyElement.querySelector||this.inertBodyElement.querySelector("svg")?(this.inertBodyElement.innerHTML='<svg><p><style><img src="</style><img src=x onerror=alert(1)//">',this.getInertBodyElement=this.inertBodyElement.querySelector&&this.inertBodyElement.querySelector("svg img")&&function(){try{return!!window.DOMParser}catch(e){return!1}}()?this.getInertBodyElement_DOMParser:this.getInertBodyElement_InertDocument):this.getInertBodyElement=this.getInertBodyElement_XHR}return e.prototype.getInertBodyElement_XHR=function(e){e="<body><remove></remove>"+e+"</body>";try{e=encodeURI(e)}catch(e){return null}var t=new XMLHttpRequest;t.responseType="document",t.open("GET","data:text/html;charset=utf-8,"+e,!1),t.send(null);var n=t.response.body;return n.removeChild(n.firstChild),n},e.prototype.getInertBodyElement_DOMParser=function(e){e="<body><remove></remove>"+e+"</body>";try{var t=(new window.DOMParser).parseFromString(e,"text/html").body;return t.removeChild(t.firstChild),t}catch(e){return null}},e.prototype.getInertBodyElement_InertDocument=function(e){var t=this.inertDocument.createElement("template");return"content"in t?(t.innerHTML=e,t):(this.inertBodyElement.innerHTML=e,this.defaultDoc.documentMode&&this.stripCustomNsAttrs(this.inertBodyElement),this.inertBodyElement)},e.prototype.stripCustomNsAttrs=function(e){for(var t=e.attributes,n=t.length-1;0<n;n--){var r=t.item(n).name;"xmlns:ns1"!==r&&0!==r.indexOf("ns1:")||e.removeAttribute(r)}for(var i=e.firstChild;i;)i.nodeType===Node.ELEMENT_NODE&&this.stripCustomNsAttrs(i),i=i.nextSibling},e}(),Un=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,Ln=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+\/]+=*$/i;function Kn(e){return(e=String(e)).match(Un)||e.match(Ln)?e:(Jt()&&console.warn("WARNING: sanitizing unsafe URL value "+e+" (see http://g.co/ng/security#xss)"),"unsafe:"+e)}function qn(e){var t,n,r={};try{for(var i=s(e.split(",")),o=i.next();!o.done;o=i.next())r[o.value]=!0}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function zn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,i={};try{for(var o=s(e),a=o.next();!a.done;a=o.next()){var u=a.value;for(var c in u)u.hasOwnProperty(c)&&(i[c]=!0)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}var Zn,Wn=qn("area,br,col,hr,img,wbr"),Jn=qn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Gn=qn("rp,rt"),Yn=zn(Gn,Jn),Xn=zn(Wn,zn(Jn,qn("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),zn(Gn,qn("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Yn),Qn=qn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),$n=qn("srcset"),er=zn(Qn,$n,qn("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width")),tr=function(){function e(){this.sanitizedSomething=!1,this.buf=[]}return e.prototype.sanitizeChildren=function(e){for(var t=e.firstChild;t;)if(t.nodeType===Node.ELEMENT_NODE?this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,t.firstChild)t=t.firstChild;else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);var n=this.checkClobberedElement(t,t.nextSibling);if(n){t=n;break}t=this.checkClobberedElement(t,t.parentNode)}return this.buf.join("")},e.prototype.startElement=function(e){var t=e.nodeName.toLowerCase();if(Xn.hasOwnProperty(t)){this.buf.push("<"),this.buf.push(t);for(var n,r=e.attributes,i=0;i<r.length;i++){var o=r.item(i),s=o.name,a=s.toLowerCase();if(er.hasOwnProperty(a)){var u=o.value;Qn[a]&&(u=Kn(u)),$n[a]&&(n=u,u=(n=String(n)).split(",").map(function(e){return Kn(e.trim())}).join(", ")),this.buf.push(" ",s,'="',ir(u),'"')}else this.sanitizedSomething=!0}this.buf.push(">")}else this.sanitizedSomething=!0},e.prototype.endElement=function(e){var t=e.nodeName.toLowerCase();Xn.hasOwnProperty(t)&&!Wn.hasOwnProperty(t)&&(this.buf.push("</"),this.buf.push(t),this.buf.push(">"))},e.prototype.chars=function(e){this.buf.push(ir(e))},e.prototype.checkClobberedElement=function(e,t){if(t&&(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error("Failed to sanitize html because the element is clobbered: "+e.outerHTML);return t},e}(),nr=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rr=/([^\#-~ |!])/g;function ir(e){return e.replace(/&/g,"&amp;").replace(nr,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(rr,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function or(e){return"content"in e&&function(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var sr=new RegExp("^([-,.\"'%_!# a-zA-Z0-9]+|(?:(?:matrix|translate|scale|rotate|skew|perspective)(?:X|Y|3d)?|(?:rgb|hsl)a?|(?:repeating-)?(?:linear|radial)-gradient|(?:calc|attr))\\([-0-9.%, #a-zA-Z]+\\))$","g"),ar=/^url\(([^)]+)\)$/,ur=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(ur||(ur={})),cr=function(){};function lr(e,t,n){var r=e.state,i=1792&r;return i===t?(e.state=-1793&r|n,e.initIndex=-1,!0):i===n}function hr(e,t,n){return(1792&e.state)===t&&e.initIndex<=n&&(e.initIndex=n+1,!0)}function dr(e,t){return e.nodes[t]}function pr(e,t){return e.nodes[t]}function fr(e,t){return e.nodes[t]}function gr(e,t){return e.nodes[t]}function vr(e,t){return e.nodes[t]}var yr={setCurrentNode:void 0,createRootView:void 0,createEmbeddedView:void 0,createComponentView:void 0,createNgModuleRef:void 0,overrideProvider:void 0,overrideComponentView:void 0,clearOverrides:void 0,checkAndUpdateView:void 0,checkNoChangesView:void 0,destroyView:void 0,resolveDep:void 0,createDebugContext:void 0,handleEvent:void 0,updateDirectives:void 0,updateRenderer:void 0,dirtyParentQueries:void 0};function mr(e,t,n,r){var i="ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '"+t+"'. Current value: '"+n+"'.";return r&&(i+=" It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?"),function(e,t){var n=new Error(e);return br(n,t),n}(i,e)}function br(e,t){e[Qe]=t,e[et]=t.logError.bind(t)}function wr(e){return new Error("ViewDestroyedError: Attempt to use a destroyed view: "+e)}var _r=function(){},Sr=new Map;function Er(e){var t=Sr.get(e);return t||(t=Se(e)+"_"+Sr.size,Sr.set(e,t)),t}var xr="$$undefined",Fr="$$empty";function Cr(e){return{id:xr,styles:e.styles,encapsulation:e.encapsulation,data:e.data}}var Ar=0;function kr(e,t,n,r){return!(!(2&e.state)&&_e(e.oldValues[t.bindingIndex+n],r))}function Tr(e,t,n,r){return!!kr(e,t,n,r)&&(e.oldValues[t.bindingIndex+n]=r,!0)}function Pr(e,t,n,r){var i=e.oldValues[t.bindingIndex+n];if(1&e.state||!pn(i,r)){var o=t.bindings[n].name;throw mr(yr.createDebugContext(e,t.nodeIndex),o+": "+i,o+": "+r,0!=(1&e.state))}}function Dr(e){for(var t=e;t;)2&t.def.flags&&(t.state|=8),t=t.viewContainerParent||t.parent}function Ir(e,t){for(var n=e;n&&n!==t;)n.state|=64,n=n.viewContainerParent||n.parent}function Nr(e,t,n,r){try{return Dr(33554432&e.def.nodes[t].flags?pr(e,t).componentView:e),yr.handleEvent(e,t,n,r)}catch(t){e.root.errorHandler.handleError(t)}}function Rr(e){return e.parent?pr(e.parent,e.parentNodeDef.nodeIndex):null}function Or(e){return e.parent?e.parentNodeDef.parent:null}function jr(e,t){switch(201347067&t.flags){case 1:return pr(e,t.nodeIndex).renderElement;case 2:return dr(e,t.nodeIndex).renderText}}function Hr(e){return!!e.parent&&!!(32768&e.parentNodeDef.flags)}function Mr(e){return!(!e.parent||32768&e.parentNodeDef.flags)}function Br(e){var t={},n=0,r={};return e&&e.forEach(function(e){var i=a(e,2),o=i[0],s=i[1];"number"==typeof o?(t[o]=s,n|=function(e){return 1<<e%32}(o)):r[o]=s}),{matchedQueries:t,references:r,matchedQueryIds:n}}function Vr(e,t){return e.map(function(e){var n,r,i;return Array.isArray(e)?(r=(i=a(e,2))[0],n=i[1]):(r=0,n=e),n&&("function"==typeof n||"object"==typeof n)&&t&&Object.defineProperty(n,Te,{value:t,configurable:!0}),{flags:r,token:n,tokenKey:Er(n)}})}function Ur(e,t,n){var r=n.renderParent;return r?0==(1&r.flags)||0==(33554432&r.flags)||r.element.componentRendererType&&r.element.componentRendererType.encapsulation===Ye.Native?pr(e,n.renderParent.nodeIndex).renderElement:void 0:t}var Lr=new WeakMap;function Kr(e){var t=Lr.get(e);return t||((t=e(function(){return _r})).factory=e,Lr.set(e,t)),t}function qr(e,t,n,r,i){3===t&&(n=e.renderer.parentNode(jr(e,e.def.lastRenderRootNode))),zr(e,t,0,e.def.nodes.length-1,n,r,i)}function zr(e,t,n,r,i,o,s){for(var a=n;a<=r;a++){var u=e.def.nodes[a];11&u.flags&&Wr(e,u,t,i,o,s),a+=u.childCount}}function Zr(e,t,n,r,i,o){for(var s=e;s&&!Hr(s);)s=s.parent;for(var a=s.parent,u=Or(s),c=u.nodeIndex+u.childCount,l=u.nodeIndex+1;l<=c;l++){var h=a.def.nodes[l];h.ngContentIndex===t&&Wr(a,h,n,r,i,o),l+=h.childCount}if(!a.parent){var d=e.root.projectableNodes[t];if(d)for(l=0;l<d.length;l++)Jr(e,d[l],n,r,i,o)}}function Wr(e,t,n,r,i,o){if(8&t.flags)Zr(e,t.ngContent.index,n,r,i,o);else{var s=jr(e,t);if(3===n&&33554432&t.flags&&48&t.bindingFlags?(16&t.bindingFlags&&Jr(e,s,n,r,i,o),32&t.bindingFlags&&Jr(pr(e,t.nodeIndex).componentView,s,n,r,i,o)):Jr(e,s,n,r,i,o),16777216&t.flags)for(var a=pr(e,t.nodeIndex).viewContainer._embeddedViews,u=0;u<a.length;u++)qr(a[u],n,r,i,o);1&t.flags&&!t.element.name&&zr(e,n,t.nodeIndex+1,t.nodeIndex+t.childCount,r,i,o)}}function Jr(e,t,n,r,i,o){var s=e.renderer;switch(n){case 1:s.appendChild(r,t);break;case 2:s.insertBefore(r,t,i);break;case 3:s.removeChild(r,t);break;case 0:o.push(t)}}var Gr=/^:([^:]+):(.+)$/;function Yr(e){if(":"===e[0]){var t=e.match(Gr);return[t[1],t[2]]}return["",e]}function Xr(e){for(var t=0,n=0;n<e.length;n++)t|=e[n].flags;return t}function Qr(e,t,n,r,i,o,s,u,c,l,h,d){void 0===s&&(s=[]),l||(l=_r);var p=Br(n),f=p.matchedQueries,g=p.references,v=p.matchedQueryIds,y=null,m=null;o&&(y=(D=a(Yr(o),2))[0],m=D[1]),u=u||[];for(var b=new Array(u.length),w=0;w<u.length;w++){var _=a(u[w],3),S=_[0],E=_[2],x=a(Yr(_[1]),2),F=x[0],C=x[1],A=void 0,k=void 0;switch(15&S){case 4:k=E;break;case 1:case 8:A=E}b[w]={flags:S,ns:F,name:C,nonMinifiedName:C,securityContext:A,suffix:k}}c=c||[];var T=new Array(c.length);for(w=0;w<c.length;w++){var P=a(c[w],2);T[w]={type:0,target:P[0],eventName:P[1],propName:null}}var D,I=(s=s||[]).map(function(e){var t=a(e,2),n=t[1],r=a(Yr(t[0]),2);return[r[0],r[1],n]});return d=function(e){if(e&&e.id===xr){var t=null!=e.encapsulation&&e.encapsulation!==Ye.None||e.styles.length||Object.keys(e.data).length;e.id=t?"c"+Ar++:Fr}return e&&e.id===Fr&&(e=null),e||null}(d),h&&(t|=33554432),{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:t|=1,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:f,matchedQueryIds:v,references:g,ngContentIndex:r,childCount:i,bindings:b,bindingFlags:Xr(b),outputs:T,element:{ns:y,name:m,attrs:I,template:null,componentProvider:null,componentView:h||null,componentRendererType:d,publicProviders:null,allProviders:null,handleEvent:l||_r},provider:null,text:null,query:null,ngContent:null}}function $r(e,t,n){var r,i=n.element,o=e.root.selectorOrNode,s=e.renderer;if(e.parent||!o){r=i.name?s.createElement(i.name,i.ns):s.createComment("");var u=Ur(e,t,n);u&&s.appendChild(u,r)}else r=s.selectRootElement(o);if(i.attrs)for(var c=0;c<i.attrs.length;c++){var l=a(i.attrs[c],3);s.setAttribute(r,l[1],l[2],l[0])}return r}function ei(e,t,n,r){for(var i=0;i<n.outputs.length;i++){var o=n.outputs[i],s=ti(e,n.nodeIndex,(h=o.eventName,(l=o.target)?l+":"+h:h)),a=o.target,u=e;"component"===o.target&&(a=null,u=t);var c=u.renderer.listen(a||r,o.eventName,s);e.disposables[n.outputIndex+i]=c}var l,h}function ti(e,t,n){return function(r){return Nr(e,t,n,r)}}function ni(e,t,n,r){if(!Tr(e,t,n,r))return!1;var i=t.bindings[n],o=pr(e,t.nodeIndex),s=o.renderElement,a=i.name;switch(15&i.flags){case 1:!function(e,t,n,r,i,o){var s=t.securityContext,a=s?e.root.sanitizer.sanitize(s,o):o;a=null!=a?a.toString():null;var u=e.renderer;null!=o?u.setAttribute(n,i,a,r):u.removeAttribute(n,i,r)}(e,i,s,i.ns,a,r);break;case 2:!function(e,t,n,r){var i=e.renderer;r?i.addClass(t,n):i.removeClass(t,n)}(e,s,a,r);break;case 4:!function(e,t,n,r,i){var o=e.root.sanitizer.sanitize(ur.STYLE,i);if(null!=o){o=o.toString();var s=t.suffix;null!=s&&(o+=s)}else o=null;var a=e.renderer;null!=o?a.setStyle(n,r,o):a.removeStyle(n,r)}(e,i,s,a,r);break;case 8:!function(e,t,n,r,i){var o=t.securityContext,s=o?e.root.sanitizer.sanitize(o,i):i;e.renderer.setProperty(n,r,s)}(33554432&t.flags&&32&i.flags?o.componentView:e,i,s,a,r)}return!0}var ri=new Object,ii=Er(Ne),oi=Er(De),si=Er(kt);function ai(e,t,n,r){return n=xe(n),{index:-1,deps:Vr(r,Se(t)),flags:e,token:t,value:n}}function ui(e,t,n){void 0===n&&(n=Ne.THROW_IF_NOT_FOUND);var r,i,o=Je(e);try{if(8&t.flags)return t.token;if(2&t.flags&&(n=null),1&t.flags)return e._parent.get(t.token,n);var s=t.tokenKey;switch(s){case ii:case oi:case si:return e}var a=e._def.providersByKey[s];if(a){var u=e._providers[a.index];return void 0===u&&(u=e._providers[a.index]=ci(e,a)),u===ri?void 0:u}if(t.token.ngInjectableDef&&(r=e,null!=(i=t.token.ngInjectableDef).providedIn&&(function(e,t){return e._def.modules.indexOf(i.providedIn)>-1}(r)||"root"===i.providedIn&&r._def.isRoot))){var c=e._providers.length;return e._def.providersByKey[t.tokenKey]={flags:5120,value:t.token.ngInjectableDef.factory,deps:[],index:c,token:t.token},e._providers[c]=ri,e._providers[c]=ci(e,e._def.providersByKey[t.tokenKey])}return e._parent.get(t.token,n)}finally{Je(o)}}function ci(e,t){var n;switch(201347067&t.flags){case 512:n=function(e,t,n){var r=n.length;switch(r){case 0:return new t;case 1:return new t(ui(e,n[0]));case 2:return new t(ui(e,n[0]),ui(e,n[1]));case 3:return new t(ui(e,n[0]),ui(e,n[1]),ui(e,n[2]));default:for(var i=new Array(r),o=0;o<r;o++)i[o]=ui(e,n[o]);return new(t.bind.apply(t,u([void 0],i)))}}(e,t.value,t.deps);break;case 1024:n=function(e,t,n){var r=n.length;switch(r){case 0:return t();case 1:return t(ui(e,n[0]));case 2:return t(ui(e,n[0]),ui(e,n[1]));case 3:return t(ui(e,n[0]),ui(e,n[1]),ui(e,n[2]));default:for(var i=Array(r),o=0;o<r;o++)i[o]=ui(e,n[o]);return t.apply(void 0,u(i))}}(e,t.value,t.deps);break;case 2048:n=ui(e,t.deps[0]);break;case 256:n=t.value}return n===ri||null==n||"object"!=typeof n||131072&t.flags||"function"!=typeof n.ngOnDestroy||(t.flags|=131072),void 0===n?ri:n}function li(e,t){var n=e.viewContainer._embeddedViews;if((null==t||t>=n.length)&&(t=n.length-1),t<0)return null;var r=n[t];return r.viewContainerParent=null,fi(n,t),yr.dirtyParentQueries(r),di(r),r}function hi(e,t,n){var r=t?jr(t,t.def.lastRenderRootNode):e.renderElement;qr(n,2,n.renderer.parentNode(r),n.renderer.nextSibling(r),void 0)}function di(e){qr(e,3,null,null,void 0)}function pi(e,t,n){t>=e.length?e.push(n):e.splice(t,0,n)}function fi(e,t){t>=e.length-1?e.pop():e.splice(t,1)}var gi=new Object;function vi(e,t,n,r,i,o){return new yi(e,t,n,r,i,o)}var yi=function(e){function t(t,n,r,i,o,s){var a=e.call(this)||this;return a.selector=t,a.componentType=n,a._inputs=i,a._outputs=o,a.ngContentSelectors=s,a.viewDefFactory=r,a}return i(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){var e=[],t=this._inputs;for(var n in t)e.push({propName:n,templateName:t[n]});return e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){var e=[];for(var t in this._outputs)e.push({propName:t,templateName:this._outputs[t]});return e},enumerable:!0,configurable:!0}),t.prototype.create=function(e,t,n,r){if(!r)throw new Error("ngModule should be provided");var i=Kr(this.viewDefFactory),o=i.nodes[0].element.componentProvider.nodeIndex,s=yr.createRootView(e,t||[],n,i,r,gi),a=fr(s,o).instance;return n&&s.renderer.setAttribute(pr(s,0).renderElement,"ng-version",Xe.full),new mi(s,new Si(s),a)},t}(bt),mi=function(e){function t(t,n,r){var i=e.call(this)||this;return i._view=t,i._viewRef=n,i._component=r,i._elDef=i._view.def.nodes[0],i.hostView=n,i.changeDetectorRef=n,i.instance=r,i}return i(t,e),Object.defineProperty(t.prototype,"location",{get:function(){return new on(pr(this._view,this._elDef.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return new Ci(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentType",{get:function(){return this._component.constructor},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this._viewRef.destroy()},t.prototype.onDestroy=function(e){this._viewRef.onDestroy(e)},t}(function(){});function bi(e,t,n){return new wi(e,t,n)}var wi=function(){function e(e,t,n){this._view=e,this._elDef=t,this._data=n,this._embeddedViews=[]}return Object.defineProperty(e.prototype,"element",{get:function(){return new on(this._data.renderElement)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return new Ci(this._view,this._elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parentInjector",{get:function(){for(var e=this._view,t=this._elDef.parent;!t&&e;)t=Or(e),e=e.parent;return e?new Ci(e,t):new Ci(this._view,null)},enumerable:!0,configurable:!0}),e.prototype.clear=function(){for(var e=this._embeddedViews.length-1;e>=0;e--){var t=li(this._data,e);yr.destroyView(t)}},e.prototype.get=function(e){var t=this._embeddedViews[e];if(t){var n=new Si(t);return n.attachToViewContainerRef(this),n}return null},Object.defineProperty(e.prototype,"length",{get:function(){return this._embeddedViews.length},enumerable:!0,configurable:!0}),e.prototype.createEmbeddedView=function(e,t,n){var r=e.createEmbeddedView(t||{});return this.insert(r,n),r},e.prototype.createComponent=function(e,t,n,r,i){var o=n||this.parentInjector;i||e instanceof At||(i=o.get(kt));var s=e.create(o,r,void 0,i);return this.insert(s.hostView,t),s},e.prototype.insert=function(e,t){if(e.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");var n,r,i,o,s=e;return i=s._view,o=(n=this._data).viewContainer._embeddedViews,null!==(r=t)&&void 0!==r||(r=o.length),i.viewContainerParent=this._view,pi(o,r,i),function(e,t){var n=Rr(t);if(n&&n!==e&&!(16&t.state)){t.state|=16;var r=n.template._projectedViews;r||(r=n.template._projectedViews=[]),r.push(t),function(e,n){if(!(4&n.flags)){t.parent.def.nodeFlags|=4,n.flags|=4;for(var r=n.parent;r;)r.childFlags|=4,r=r.parent}}(0,t.parentNodeDef)}}(n,i),yr.dirtyParentQueries(i),hi(n,r>0?o[r-1]:null,i),s.attachToViewContainerRef(this),e},e.prototype.move=function(e,t){if(e.destroyed)throw new Error("Cannot move a destroyed View in a ViewContainer!");var n,r,i,o,s,a=this._embeddedViews.indexOf(e._view);return i=t,s=(o=(n=this._data).viewContainer._embeddedViews)[r=a],fi(o,r),null==i&&(i=o.length),pi(o,i,s),yr.dirtyParentQueries(s),di(s),hi(n,i>0?o[i-1]:null,s),e},e.prototype.indexOf=function(e){return this._embeddedViews.indexOf(e._view)},e.prototype.remove=function(e){var t=li(this._data,e);t&&yr.destroyView(t)},e.prototype.detach=function(e){var t=li(this._data,e);return t?new Si(t):null},e}();function _i(e){return new Si(e)}var Si=function(){function e(e){this._view=e,this._viewContainerRef=null,this._appRef=null}return Object.defineProperty(e.prototype,"rootNodes",{get:function(){return qr(this._view,0,void 0,void 0,e=[]),e;var e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return 0!=(128&this._view.state)},enumerable:!0,configurable:!0}),e.prototype.markForCheck=function(){Dr(this._view)},e.prototype.detach=function(){this._view.state&=-5},e.prototype.detectChanges=function(){var e=this._view.root.rendererFactory;e.begin&&e.begin();try{yr.checkAndUpdateView(this._view)}finally{e.end&&e.end()}},e.prototype.checkNoChanges=function(){yr.checkNoChangesView(this._view)},e.prototype.reattach=function(){this._view.state|=4},e.prototype.onDestroy=function(e){this._view.disposables||(this._view.disposables=[]),this._view.disposables.push(e)},e.prototype.destroy=function(){this._appRef?this._appRef.detachView(this):this._viewContainerRef&&this._viewContainerRef.detach(this._viewContainerRef.indexOf(this)),yr.destroyView(this._view)},e.prototype.detachFromAppRef=function(){this._appRef=null,di(this._view),yr.dirtyParentQueries(this._view)},e.prototype.attachToAppRef=function(e){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=e},e.prototype.attachToViewContainerRef=function(e){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=e},e}();function Ei(e,t){return new xi(e,t)}var xi=function(e){function t(t,n){var r=e.call(this)||this;return r._parentView=t,r._def=n,r}return i(t,e),t.prototype.createEmbeddedView=function(e){return new Si(yr.createEmbeddedView(this._parentView,this._def,this._def.element.template,e))},Object.defineProperty(t.prototype,"elementRef",{get:function(){return new on(pr(this._parentView,this._def.nodeIndex).renderElement)},enumerable:!0,configurable:!0}),t}(an);function Fi(e,t){return new Ci(e,t)}var Ci=function(){function e(e,t){this.view=e,this.elDef=t}return e.prototype.get=function(e,t){return void 0===t&&(t=Ne.THROW_IF_NOT_FOUND),yr.resolveDep(this.view,this.elDef,!!this.elDef&&0!=(33554432&this.elDef.flags),{flags:0,token:e,tokenKey:Er(e)},t)},e}();function Ai(e){return new ki(e.renderer)}var ki=function(){function e(e){this.delegate=e}return e.prototype.selectRootElement=function(e){return this.delegate.selectRootElement(e)},e.prototype.createElement=function(e,t){var n=a(Yr(t),2),r=this.delegate.createElement(n[1],n[0]);return e&&this.delegate.appendChild(e,r),r},e.prototype.createViewRoot=function(e){return e},e.prototype.createTemplateAnchor=function(e){var t=this.delegate.createComment("");return e&&this.delegate.appendChild(e,t),t},e.prototype.createText=function(e,t){var n=this.delegate.createText(t);return e&&this.delegate.appendChild(e,n),n},e.prototype.projectNodes=function(e,t){for(var n=0;n<t.length;n++)this.delegate.appendChild(e,t[n])},e.prototype.attachViewAfter=function(e,t){for(var n=this.delegate.parentNode(e),r=this.delegate.nextSibling(e),i=0;i<t.length;i++)this.delegate.insertBefore(n,t[i],r)},e.prototype.detachView=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=this.delegate.parentNode(n);this.delegate.removeChild(r,n)}},e.prototype.destroyView=function(e,t){for(var n=0;n<t.length;n++)this.delegate.destroyNode(t[n])},e.prototype.listen=function(e,t,n){return this.delegate.listen(e,t,n)},e.prototype.listenGlobal=function(e,t,n){return this.delegate.listen(e,t,n)},e.prototype.setElementProperty=function(e,t,n){this.delegate.setProperty(e,t,n)},e.prototype.setElementAttribute=function(e,t,n){var r=a(Yr(t),2),i=r[0],o=r[1];null!=n?this.delegate.setAttribute(e,o,n,i):this.delegate.removeAttribute(e,o,i)},e.prototype.setBindingDebugInfo=function(e,t,n){},e.prototype.setElementClass=function(e,t,n){n?this.delegate.addClass(e,t):this.delegate.removeClass(e,t)},e.prototype.setElementStyle=function(e,t,n){null!=n?this.delegate.setStyle(e,t,n):this.delegate.removeStyle(e,t)},e.prototype.invokeElementMethod=function(e,t,n){e[t].apply(e,n)},e.prototype.setText=function(e,t){this.delegate.setValue(e,t)},e.prototype.animate=function(){throw new Error("Renderer.animate is no longer supported!")},e}();function Ti(e,t,n,r){return new Pi(e,t,n,r)}var Pi=function(){function e(e,t,n,r){this._moduleType=e,this._parent=t,this._bootstrapComponents=n,this._def=r,this._destroyListeners=[],this._destroyed=!1,this.injector=this,function(e){for(var t=e._def,n=e._providers=new Array(t.providers.length),r=0;r<t.providers.length;r++){var i=t.providers[r];4096&i.flags||void 0===n[r]&&(n[r]=ci(e,i))}}(this)}return e.prototype.get=function(e,t,n){void 0===t&&(t=Ne.THROW_IF_NOT_FOUND),void 0===n&&(n=0);var r=0;return 4&n?r|=1:2&n&&(r|=4),ui(this,{token:e,tokenKey:Er(e),flags:r},t)},Object.defineProperty(e.prototype,"instance",{get:function(){return this.get(this._moduleType)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentFactoryResolver",{get:function(){return this.get(Ft)},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){if(this._destroyed)throw new Error("The ng module "+Se(this.instance.constructor)+" has already been destroyed.");this._destroyed=!0,function(e,t){for(var n=e._def,r=new Set,i=0;i<n.providers.length;i++)if(131072&n.providers[i].flags){var o=e._providers[i];if(o&&o!==ri){var s=o.ngOnDestroy;"function"!=typeof s||r.has(o)||(s.apply(o),r.add(o))}}}(this),this._destroyListeners.forEach(function(e){return e()})},e.prototype.onDestroy=function(e){this._destroyListeners.push(e)},e}(),Di=Er(function(){}),Ii=Er(function(){}),Ni=Er(on),Ri=Er(function(){}),Oi=Er(an),ji=Er(function(){}),Hi=Er(Ne),Mi=Er(De);function Bi(e,t,n,r,i,o,s,u){var c=[];if(s)for(var l in s){var h=a(s[l],2);c[h[0]]={flags:8,name:l,nonMinifiedName:h[1],ns:null,securityContext:null,suffix:null}}var d=[];if(u)for(var p in u)d.push({type:1,propName:p,target:null,eventName:u[p]});return function(e,t,n,r,i,o,s,a,u){var c=Br(n),l=c.matchedQueries,h=c.references,d=c.matchedQueryIds;u||(u=[]),a||(a=[]),o=xe(o);var p=Vr(s,Se(i));return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:t,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:l,matchedQueryIds:d,references:h,ngContentIndex:-1,childCount:r,bindings:a,bindingFlags:Xr(a),outputs:u,element:null,provider:{token:i,value:o,deps:p},text:null,query:null,ngContent:null}}(e,t|=16384,n,r,i,i,o,c,d)}function Vi(e,t){return qi(e,t)}function Ui(e,t){for(var n=e;n.parent&&!Hr(n);)n=n.parent;return zi(n.parent,Or(n),!0,t.provider.value,t.provider.deps)}function Li(e,t){var n=zi(e,t.parent,(32768&t.flags)>0,t.provider.value,t.provider.deps);if(t.outputs.length)for(var r=0;r<t.outputs.length;r++){var i=t.outputs[r],o=n[i.propName].subscribe(Ki(e,t.parent.nodeIndex,i.eventName));e.disposables[t.outputIndex+r]=o.unsubscribe.bind(o)}return n}function Ki(e,t,n){return function(r){return Nr(e,t,n,r)}}function qi(e,t){var n=(8192&t.flags)>0,r=t.provider;switch(201347067&t.flags){case 512:return zi(e,t.parent,n,r.value,r.deps);case 1024:return function(e,t,n,r,i){var o=i.length;switch(o){case 0:return r();case 1:return r(Wi(e,t,n,i[0]));case 2:return r(Wi(e,t,n,i[0]),Wi(e,t,n,i[1]));case 3:return r(Wi(e,t,n,i[0]),Wi(e,t,n,i[1]),Wi(e,t,n,i[2]));default:for(var s=Array(o),a=0;a<o;a++)s[a]=Wi(e,t,n,i[a]);return r.apply(void 0,u(s))}}(e,t.parent,n,r.value,r.deps);case 2048:return Wi(e,t.parent,n,r.deps[0]);case 256:return r.value}}function zi(e,t,n,r,i){var o=i.length;switch(o){case 0:return new r;case 1:return new r(Wi(e,t,n,i[0]));case 2:return new r(Wi(e,t,n,i[0]),Wi(e,t,n,i[1]));case 3:return new r(Wi(e,t,n,i[0]),Wi(e,t,n,i[1]),Wi(e,t,n,i[2]));default:for(var s=new Array(o),a=0;a<o;a++)s[a]=Wi(e,t,n,i[a]);return new(r.bind.apply(r,u([void 0],s)))}}var Zi={};function Wi(e,t,n,r,i){if(void 0===i&&(i=Ne.THROW_IF_NOT_FOUND),8&r.flags)return r.token;var o=e;2&r.flags&&(i=null);var s=r.tokenKey;s===ji&&(n=!(!t||!t.element.componentView)),t&&1&r.flags&&(n=!1,t=t.parent);for(var a=e;a;){if(t)switch(s){case Di:return Ai(Ji(a,t,n));case Ii:return Ji(a,t,n).renderer;case Ni:return new on(pr(a,t.nodeIndex).renderElement);case Ri:return pr(a,t.nodeIndex).viewContainer;case Oi:if(t.element.template)return pr(a,t.nodeIndex).template;break;case ji:return _i(Ji(a,t,n));case Hi:case Mi:return Fi(a,t);default:var u=(n?t.element.allProviders:t.element.publicProviders)[s];if(u){var c=fr(a,u.nodeIndex);return c||(c={instance:qi(a,u)},a.nodes[u.nodeIndex]=c),c.instance}}n=Hr(a),t=Or(a),a=a.parent,4&r.flags&&(a=null)}var l=o.root.injector.get(r.token,Zi);return l!==Zi||i===Zi?l:o.root.ngModule.injector.get(r.token,i)}function Ji(e,t,n){var r;if(n)r=pr(e,t.nodeIndex).componentView;else for(r=e;r.parent&&!Hr(r);)r=r.parent;return r}function Gi(e,t,n,r,i,o){if(32768&n.flags){var s=pr(e,n.parent.nodeIndex).componentView;2&s.def.flags&&(s.state|=8)}if(t.instance[n.bindings[r].name]=i,524288&n.flags){o=o||{};var a=fn.unwrap(e.oldValues[n.bindingIndex+r]);o[n.bindings[r].nonMinifiedName]=new gn(a,i,0!=(2&e.state))}return e.oldValues[n.bindingIndex+r]=i,o}function Yi(e,t){if(e.def.nodeFlags&t)for(var n=e.def.nodes,r=0,i=0;i<n.length;i++){var o=n[i],s=o.parent;for(!s&&o.flags&t&&Qi(e,i,o.flags&t,r++),0==(o.childFlags&t)&&(i+=o.childCount);s&&1&s.flags&&i===s.nodeIndex+s.childCount;)s.directChildFlags&t&&(r=Xi(e,s,t,r)),s=s.parent}}function Xi(e,t,n,r){for(var i=t.nodeIndex+1;i<=t.nodeIndex+t.childCount;i++){var o=e.def.nodes[i];o.flags&n&&Qi(e,i,o.flags&n,r++),i+=o.childCount}return r}function Qi(e,t,n,r){var i=fr(e,t);if(i){var o=i.instance;o&&(yr.setCurrentNode(e,t),1048576&n&&hr(e,512,r)&&o.ngAfterContentInit(),2097152&n&&o.ngAfterContentChecked(),4194304&n&&hr(e,768,r)&&o.ngAfterViewInit(),8388608&n&&o.ngAfterViewChecked(),131072&n&&o.ngOnDestroy())}}function $i(e){for(var t=e.def.nodeMatchedQueries;e.parent&&Mr(e);){var n=e.parentNodeDef;e=e.parent;for(var r=n.nodeIndex+n.childCount,i=0;i<=r;i++)67108864&(o=e.def.nodes[i]).flags&&536870912&o.flags&&(o.query.filterId&t)===o.query.filterId&&vr(e,i).setDirty(),!(1&o.flags&&i+o.childCount<n.nodeIndex)&&67108864&o.childFlags&&536870912&o.childFlags||(i+=o.childCount)}if(134217728&e.def.nodeFlags)for(i=0;i<e.def.nodes.length;i++){var o;134217728&(o=e.def.nodes[i]).flags&&536870912&o.flags&&vr(e,i).setDirty(),i+=o.childCount}}function eo(e,t){var n=vr(e,t.nodeIndex);if(n.dirty){var r,i=void 0;if(67108864&t.flags){var o=t.parent.parent;i=to(e,o.nodeIndex,o.nodeIndex+o.childCount,t.query,[]),r=fr(e,t.parent.nodeIndex).instance}else 134217728&t.flags&&(i=to(e,0,e.def.nodes.length-1,t.query,[]),r=e.component);n.reset(i);for(var s=t.query.bindings,a=!1,u=0;u<s.length;u++){var c=s[u],l=void 0;switch(c.bindingType){case 0:l=n.first;break;case 1:l=n,a=!0}r[c.propName]=l}a&&n.notifyOnChanges()}}function to(e,t,n,r,i){for(var o=t;o<=n;o++){var s=e.def.nodes[o],a=s.matchedQueries[r.id];if(null!=a&&i.push(no(e,s,a)),1&s.flags&&s.element.template&&(s.element.template.nodeMatchedQueries&r.filterId)===r.filterId){var u=pr(e,o);if((s.childMatchedQueries&r.filterId)===r.filterId&&(to(e,o+1,o+s.childCount,r,i),o+=s.childCount),16777216&s.flags)for(var c=u.viewContainer._embeddedViews,l=0;l<c.length;l++){var h=c[l],d=Rr(h);d&&d===u&&to(h,0,h.def.nodes.length-1,r,i)}var p=u.template._projectedViews;if(p)for(l=0;l<p.length;l++){var f=p[l];to(f,0,f.def.nodes.length-1,r,i)}}(s.childMatchedQueries&r.filterId)!==r.filterId&&(o+=s.childCount)}return i}function no(e,t,n){if(null!=n)switch(n){case 1:return pr(e,t.nodeIndex).renderElement;case 0:return new on(pr(e,t.nodeIndex).renderElement);case 2:return pr(e,t.nodeIndex).template;case 3:return pr(e,t.nodeIndex).viewContainer;case 4:return fr(e,t.nodeIndex).instance}}function ro(e,t,n){var r=Ur(e,t,n);r&&Zr(e,n.ngContent.index,1,r,null,void 0)}function io(e,t,n){for(var r=new Array(n.length-1),i=1;i<n.length;i++)r[i-1]={flags:8,name:null,ns:null,nonMinifiedName:null,securityContext:null,suffix:n[i]};return{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:e,flags:2,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:t,childCount:0,bindings:r,bindingFlags:8,outputs:[],element:null,provider:null,text:{prefix:n[0]},query:null,ngContent:null}}function oo(e,t,n){var r,i=e.renderer;r=i.createText(n.text.prefix);var o=Ur(e,t,n);return o&&i.appendChild(o,r),{renderText:r}}function so(e,t){return(null!=e?e.toString():"")+t.suffix}function ao(e,t,n,r){for(var i=0,o=0,s=0,a=0,u=0,c=null,l=null,h=!1,d=!1,p=null,f=0;f<t.length;f++){var g=t[f];if(g.nodeIndex=f,g.parent=c,g.bindingIndex=i,g.outputIndex=o,g.renderParent=l,s|=g.flags,u|=g.matchedQueryIds,g.element){var v=g.element;v.publicProviders=c?c.element.publicProviders:Object.create(null),v.allProviders=v.publicProviders,h=!1,d=!1,g.element.template&&(u|=g.element.template.nodeMatchedQueries)}if(co(c,g,t.length),i+=g.bindings.length,o+=g.outputs.length,!l&&3&g.flags&&(p=g),20224&g.flags){h||(h=!0,c.element.publicProviders=Object.create(c.element.publicProviders),c.element.allProviders=c.element.publicProviders);var y=0!=(32768&g.flags);0==(8192&g.flags)||y?c.element.publicProviders[Er(g.provider.token)]=g:(d||(d=!0,c.element.allProviders=Object.create(c.element.publicProviders)),c.element.allProviders[Er(g.provider.token)]=g),y&&(c.element.componentProvider=g)}if(c?(c.childFlags|=g.flags,c.directChildFlags|=g.flags,c.childMatchedQueries|=g.matchedQueryIds,g.element&&g.element.template&&(c.childMatchedQueries|=g.element.template.nodeMatchedQueries)):a|=g.flags,g.childCount>0)c=g,uo(g)||(l=g);else for(;c&&f===c.nodeIndex+c.childCount;){var m=c.parent;m&&(m.childFlags|=c.childFlags,m.childMatchedQueries|=c.childMatchedQueries),l=(c=m)&&uo(c)?c.renderParent:c}}return{factory:null,nodeFlags:s,rootNodeFlags:a,nodeMatchedQueries:u,flags:e,nodes:t,updateDirectives:n||_r,updateRenderer:r||_r,handleEvent:function(e,n,r,i){return t[n].element.handleEvent(e,r,i)},bindingCount:i,outputCount:o,lastRenderRootNode:p}}function uo(e){return 0!=(1&e.flags)&&null===e.element.name}function co(e,t,n){var r=t.element&&t.element.template;if(r){if(!r.lastRenderRootNode)throw new Error("Illegal State: Embedded templates without nodes are not allowed!");if(r.lastRenderRootNode&&16777216&r.lastRenderRootNode.flags)throw new Error("Illegal State: Last root node of a template can't have embedded views, at index "+t.nodeIndex+"!")}if(20224&t.flags&&0==(1&(e?e.flags:0)))throw new Error("Illegal State: StaticProvider/Directive nodes need to be children of elements or anchors, at index "+t.nodeIndex+"!");if(t.query){if(67108864&t.flags&&(!e||0==(16384&e.flags)))throw new Error("Illegal State: Content Query nodes need to be children of directives, at index "+t.nodeIndex+"!");if(134217728&t.flags&&e)throw new Error("Illegal State: View Query nodes have to be top level nodes, at index "+t.nodeIndex+"!")}if(t.childCount){var i=e?e.nodeIndex+e.childCount:n-1;if(t.nodeIndex<=i&&t.nodeIndex+t.childCount>i)throw new Error("Illegal State: childCount of node leads outside of parent, at index "+t.nodeIndex+"!")}}function lo(e,t,n,r){var i=fo(e.root,e.renderer,e,t,n);return go(i,e.component,r),vo(i),i}function ho(e,t,n){var r=fo(e,e.renderer,null,null,t);return go(r,n,n),vo(r),r}function po(e,t,n,r){var i,o=t.element.componentRendererType;return i=o?e.root.rendererFactory.createRenderer(r,o):e.root.renderer,fo(e.root,i,e,t.element.componentProvider,n)}function fo(e,t,n,r,i){var o=new Array(i.nodes.length),s=i.outputCount?new Array(i.outputCount):null;return{def:i,parent:n,viewContainerParent:null,parentNodeDef:r,context:null,component:null,nodes:o,state:13,root:e,renderer:t,oldValues:new Array(i.bindingCount),disposables:s,initIndex:-1}}function go(e,t,n){e.component=t,e.context=n}function vo(e){var t;Hr(e)&&(t=pr(e.parent,e.parentNodeDef.parent.nodeIndex).renderElement);for(var n=e.def,r=e.nodes,i=0;i<n.nodes.length;i++){var o=n.nodes[i];yr.setCurrentNode(e,i);var s=void 0;switch(201347067&o.flags){case 1:var a=$r(e,t,o),u=void 0;if(33554432&o.flags){var c=Kr(o.element.componentView);u=yr.createComponentView(e,o,c,a)}ei(e,u,o,a),s={renderElement:a,componentView:u,viewContainer:null,template:o.element.template?Ei(e,o):void 0},16777216&o.flags&&(s.viewContainer=bi(e,o,s));break;case 2:s=oo(e,t,o);break;case 512:case 1024:case 2048:case 256:(s=r[i])||4096&o.flags||(s={instance:Vi(e,o)});break;case 16:s={instance:Ui(e,o)};break;case 16384:(s=r[i])||(s={instance:Li(e,o)}),32768&o.flags&&go(pr(e,o.parent.nodeIndex).componentView,s.instance,s.instance);break;case 32:case 64:case 128:s={value:void 0};break;case 67108864:case 134217728:s=new sn;break;case 8:ro(e,t,o),s=void 0}r[i]=s}Fo(e,xo.CreateViewNodes),To(e,201326592,268435456,0)}function yo(e){wo(e),yr.updateDirectives(e,1),Co(e,xo.CheckNoChanges),yr.updateRenderer(e,1),Fo(e,xo.CheckNoChanges),e.state&=-97}function mo(e){1&e.state?(e.state&=-2,e.state|=2):e.state&=-3,lr(e,0,256),wo(e),yr.updateDirectives(e,0),Co(e,xo.CheckAndUpdate),To(e,67108864,536870912,0);var t=lr(e,256,512);Yi(e,2097152|(t?1048576:0)),yr.updateRenderer(e,0),Fo(e,xo.CheckAndUpdate),To(e,134217728,536870912,0),Yi(e,8388608|((t=lr(e,512,768))?4194304:0)),2&e.def.flags&&(e.state&=-9),e.state&=-97,lr(e,768,1024)}function bo(e,t,n,r,i,o,s,a,c,l,h,d,p){return 0===n?function(e,t,n,r,i,o,s,a,u,c,l,h){switch(201347067&t.flags){case 1:return function(e,t,n,r,i,o,s,a,u,c,l,h){var d=t.bindings.length,p=!1;return d>0&&ni(e,t,0,n)&&(p=!0),d>1&&ni(e,t,1,r)&&(p=!0),d>2&&ni(e,t,2,i)&&(p=!0),d>3&&ni(e,t,3,o)&&(p=!0),d>4&&ni(e,t,4,s)&&(p=!0),d>5&&ni(e,t,5,a)&&(p=!0),d>6&&ni(e,t,6,u)&&(p=!0),d>7&&ni(e,t,7,c)&&(p=!0),d>8&&ni(e,t,8,l)&&(p=!0),d>9&&ni(e,t,9,h)&&(p=!0),p}(e,t,n,r,i,o,s,a,u,c,l,h);case 2:return function(e,t,n,r,i,o,s,a,u,c,l,h){var d=!1,p=t.bindings,f=p.length;if(f>0&&Tr(e,t,0,n)&&(d=!0),f>1&&Tr(e,t,1,r)&&(d=!0),f>2&&Tr(e,t,2,i)&&(d=!0),f>3&&Tr(e,t,3,o)&&(d=!0),f>4&&Tr(e,t,4,s)&&(d=!0),f>5&&Tr(e,t,5,a)&&(d=!0),f>6&&Tr(e,t,6,u)&&(d=!0),f>7&&Tr(e,t,7,c)&&(d=!0),f>8&&Tr(e,t,8,l)&&(d=!0),f>9&&Tr(e,t,9,h)&&(d=!0),d){var g=t.text.prefix;f>0&&(g+=so(n,p[0])),f>1&&(g+=so(r,p[1])),f>2&&(g+=so(i,p[2])),f>3&&(g+=so(o,p[3])),f>4&&(g+=so(s,p[4])),f>5&&(g+=so(a,p[5])),f>6&&(g+=so(u,p[6])),f>7&&(g+=so(c,p[7])),f>8&&(g+=so(l,p[8])),f>9&&(g+=so(h,p[9]));var v=dr(e,t.nodeIndex).renderText;e.renderer.setValue(v,g)}return d}(e,t,n,r,i,o,s,a,u,c,l,h);case 16384:return function(e,t,n,r,i,o,s,a,u,c,l,h){var d=fr(e,t.nodeIndex),p=d.instance,f=!1,g=void 0,v=t.bindings.length;return v>0&&kr(e,t,0,n)&&(f=!0,g=Gi(e,d,t,0,n,g)),v>1&&kr(e,t,1,r)&&(f=!0,g=Gi(e,d,t,1,r,g)),v>2&&kr(e,t,2,i)&&(f=!0,g=Gi(e,d,t,2,i,g)),v>3&&kr(e,t,3,o)&&(f=!0,g=Gi(e,d,t,3,o,g)),v>4&&kr(e,t,4,s)&&(f=!0,g=Gi(e,d,t,4,s,g)),v>5&&kr(e,t,5,a)&&(f=!0,g=Gi(e,d,t,5,a,g)),v>6&&kr(e,t,6,u)&&(f=!0,g=Gi(e,d,t,6,u,g)),v>7&&kr(e,t,7,c)&&(f=!0,g=Gi(e,d,t,7,c,g)),v>8&&kr(e,t,8,l)&&(f=!0,g=Gi(e,d,t,8,l,g)),v>9&&kr(e,t,9,h)&&(f=!0,g=Gi(e,d,t,9,h,g)),g&&p.ngOnChanges(g),65536&t.flags&&hr(e,256,t.nodeIndex)&&p.ngOnInit(),262144&t.flags&&p.ngDoCheck(),f}(e,t,n,r,i,o,s,a,u,c,l,h);case 32:case 64:case 128:return function(e,t,n,r,i,o,s,a,u,c,l,h){var d=t.bindings,p=!1,f=d.length;if(f>0&&Tr(e,t,0,n)&&(p=!0),f>1&&Tr(e,t,1,r)&&(p=!0),f>2&&Tr(e,t,2,i)&&(p=!0),f>3&&Tr(e,t,3,o)&&(p=!0),f>4&&Tr(e,t,4,s)&&(p=!0),f>5&&Tr(e,t,5,a)&&(p=!0),f>6&&Tr(e,t,6,u)&&(p=!0),f>7&&Tr(e,t,7,c)&&(p=!0),f>8&&Tr(e,t,8,l)&&(p=!0),f>9&&Tr(e,t,9,h)&&(p=!0),p){var g=gr(e,t.nodeIndex),v=void 0;switch(201347067&t.flags){case 32:v=new Array(d.length),f>0&&(v[0]=n),f>1&&(v[1]=r),f>2&&(v[2]=i),f>3&&(v[3]=o),f>4&&(v[4]=s),f>5&&(v[5]=a),f>6&&(v[6]=u),f>7&&(v[7]=c),f>8&&(v[8]=l),f>9&&(v[9]=h);break;case 64:v={},f>0&&(v[d[0].name]=n),f>1&&(v[d[1].name]=r),f>2&&(v[d[2].name]=i),f>3&&(v[d[3].name]=o),f>4&&(v[d[4].name]=s),f>5&&(v[d[5].name]=a),f>6&&(v[d[6].name]=u),f>7&&(v[d[7].name]=c),f>8&&(v[d[8].name]=l),f>9&&(v[d[9].name]=h);break;case 128:var y=n;switch(f){case 1:v=y.transform(n);break;case 2:v=y.transform(r);break;case 3:v=y.transform(r,i);break;case 4:v=y.transform(r,i,o);break;case 5:v=y.transform(r,i,o,s);break;case 6:v=y.transform(r,i,o,s,a);break;case 7:v=y.transform(r,i,o,s,a,u);break;case 8:v=y.transform(r,i,o,s,a,u,c);break;case 9:v=y.transform(r,i,o,s,a,u,c,l);break;case 10:v=y.transform(r,i,o,s,a,u,c,l,h)}}g.value=v}return p}(e,t,n,r,i,o,s,a,u,c,l,h);default:throw"unreachable"}}(e,t,r,i,o,s,a,c,l,h,d,p):function(e,t,n){switch(201347067&t.flags){case 1:return function(e,t,n){for(var r=!1,i=0;i<n.length;i++)ni(e,t,i,n[i])&&(r=!0);return r}(e,t,n);case 2:return function(e,t,n){for(var r=t.bindings,i=!1,o=0;o<n.length;o++)Tr(e,t,o,n[o])&&(i=!0);if(i){var s="";for(o=0;o<n.length;o++)s+=so(n[o],r[o]);s=t.text.prefix+s;var a=dr(e,t.nodeIndex).renderText;e.renderer.setValue(a,s)}return i}(e,t,n);case 16384:return function(e,t,n){for(var r=fr(e,t.nodeIndex),i=r.instance,o=!1,s=void 0,a=0;a<n.length;a++)kr(e,t,a,n[a])&&(o=!0,s=Gi(e,r,t,a,n[a],s));return s&&i.ngOnChanges(s),65536&t.flags&&hr(e,256,t.nodeIndex)&&i.ngOnInit(),262144&t.flags&&i.ngDoCheck(),o}(e,t,n);case 32:case 64:case 128:return function(e,t,n){for(var r=t.bindings,i=!1,o=0;o<n.length;o++)Tr(e,t,o,n[o])&&(i=!0);if(i){var s=gr(e,t.nodeIndex),a=void 0;switch(201347067&t.flags){case 32:a=n;break;case 64:for(a={},o=0;o<n.length;o++)a[r[o].name]=n[o];break;case 128:var c=n[0],l=n.slice(1);a=c.transform.apply(c,u(l))}s.value=a}return i}(e,t,n);default:throw"unreachable"}}(e,t,r)}function wo(e){var t=e.def;if(4&t.nodeFlags)for(var n=0;n<t.nodes.length;n++){var r=t.nodes[n];if(4&r.flags){var i=pr(e,n).template._projectedViews;if(i)for(var o=0;o<i.length;o++){var s=i[o];s.state|=32,Ir(s,e)}}else 0==(4&r.childFlags)&&(n+=r.childCount)}}function _o(e,t,n,r,i,o,s,a,u,c,l,h,d){return 0===n?function(e,t,n,r,i,o,s,a,u,c,l,h){var d=t.bindings.length;d>0&&Pr(e,t,0,n),d>1&&Pr(e,t,1,r),d>2&&Pr(e,t,2,i),d>3&&Pr(e,t,3,o),d>4&&Pr(e,t,4,s),d>5&&Pr(e,t,5,a),d>6&&Pr(e,t,6,u),d>7&&Pr(e,t,7,c),d>8&&Pr(e,t,8,l),d>9&&Pr(e,t,9,h)}(e,t,r,i,o,s,a,u,c,l,h,d):function(e,t,n){for(var r=0;r<n.length;r++)Pr(e,t,r,n[r])}(e,t,r),!1}function So(e,t){if(vr(e,t.nodeIndex).dirty)throw mr(yr.createDebugContext(e,t.nodeIndex),"Query "+t.query.id+" not dirty","Query "+t.query.id+" dirty",0!=(1&e.state))}function Eo(e){if(!(128&e.state)){if(Co(e,xo.Destroy),Fo(e,xo.Destroy),Yi(e,131072),e.disposables)for(var t=0;t<e.disposables.length;t++)e.disposables[t]();!function(e){if(16&e.state){var t=Rr(e);if(t){var n=t.template._projectedViews;n&&(fi(n,n.indexOf(e)),yr.dirtyParentQueries(e))}}}(e),e.renderer.destroyNode&&function(e){for(var t=e.def.nodes.length,n=0;n<t;n++){var r=e.def.nodes[n];1&r.flags?e.renderer.destroyNode(pr(e,n).renderElement):2&r.flags?e.renderer.destroyNode(dr(e,n).renderText):(67108864&r.flags||134217728&r.flags)&&vr(e,n).destroy()}}(e),Hr(e)&&e.renderer.destroy(),e.state|=128}}var xo=function(e){return e[e.CreateViewNodes=0]="CreateViewNodes",e[e.CheckNoChanges=1]="CheckNoChanges",e[e.CheckNoChangesProjectedViews=2]="CheckNoChangesProjectedViews",e[e.CheckAndUpdate=3]="CheckAndUpdate",e[e.CheckAndUpdateProjectedViews=4]="CheckAndUpdateProjectedViews",e[e.Destroy=5]="Destroy",e}(xo||(xo={}));function Fo(e,t){var n=e.def;if(33554432&n.nodeFlags)for(var r=0;r<n.nodes.length;r++){var i=n.nodes[r];33554432&i.flags?Ao(pr(e,r).componentView,t):0==(33554432&i.childFlags)&&(r+=i.childCount)}}function Co(e,t){var n=e.def;if(16777216&n.nodeFlags)for(var r=0;r<n.nodes.length;r++){var i=n.nodes[r];if(16777216&i.flags)for(var o=pr(e,r).viewContainer._embeddedViews,s=0;s<o.length;s++)Ao(o[s],t);else 0==(16777216&i.childFlags)&&(r+=i.childCount)}}function Ao(e,t){var n=e.state;switch(t){case xo.CheckNoChanges:0==(128&n)&&(12==(12&n)?yo(e):64&n&&ko(e,xo.CheckNoChangesProjectedViews));break;case xo.CheckNoChangesProjectedViews:0==(128&n)&&(32&n?yo(e):64&n&&ko(e,t));break;case xo.CheckAndUpdate:0==(128&n)&&(12==(12&n)?mo(e):64&n&&ko(e,xo.CheckAndUpdateProjectedViews));break;case xo.CheckAndUpdateProjectedViews:0==(128&n)&&(32&n?mo(e):64&n&&ko(e,t));break;case xo.Destroy:Eo(e);break;case xo.CreateViewNodes:vo(e)}}function ko(e,t){Co(e,t),Fo(e,t)}function To(e,t,n,r){if(e.def.nodeFlags&t&&e.def.nodeFlags&n)for(var i=e.def.nodes.length,o=0;o<i;o++){var s=e.def.nodes[o];if(s.flags&t&&s.flags&n)switch(yr.setCurrentNode(e,s.nodeIndex),r){case 0:eo(e,s);break;case 1:So(e,s)}s.childFlags&t&&s.childFlags&n||(o+=s.childCount)}}var Po=!1;function Do(e,t,n,r,i,o){return ho(No(e,i,i.injector.get(nn),t,n),r,o)}function Io(e,t,n,r,i,o){var s=i.injector.get(nn),a=No(e,i,new ps(s),t,n),u=Ko(r);return hs(Qo.create,ho,null,[a,u,o])}function No(e,t,n,r,i){var o=t.injector.get(cr),s=t.injector.get(it);return{ngModule:t,injector:e,projectableNodes:r,selectorOrNode:i,sanitizer:o,rendererFactory:n,renderer:n.createRenderer(null,null),errorHandler:s}}function Ro(e,t,n,r){var i=Ko(n);return hs(Qo.create,lo,null,[e,t,i,r])}function Oo(e,t,n,r){return n=Bo.get(t.element.componentProvider.provider.token)||Ko(n),hs(Qo.create,po,null,[e,t,n,r])}function jo(e,t,n,r){return Ti(e,t,n,function(e){var t=function(e){var t=!1,n=!1;return 0===Ho.size?{hasOverrides:t,hasDeprecatedOverrides:n}:(e.providers.forEach(function(e){var r=Ho.get(e.token);3840&e.flags&&r&&(t=!0,n=n||r.deprecatedBehavior)}),e.modules.forEach(function(e){Mo.forEach(function(r,i){i.ngInjectableDef.providedIn===e&&(t=!0,n=n||r.deprecatedBehavior)})}),{hasOverrides:t,hasDeprecatedOverrides:n})}(e),n=t.hasDeprecatedOverrides;return t.hasOverrides?(function(e){for(var t=0;t<e.providers.length;t++){var r=e.providers[t];n&&(r.flags|=4096);var i=Ho.get(r.token);i&&(r.flags=-3841&r.flags|i.flags,r.deps=Vr(i.deps),r.value=i.value)}if(Mo.size>0){var o=new Set(e.modules);Mo.forEach(function(t,r){if(o.has(r.ngInjectableDef.providedIn)){var i={token:r,flags:t.flags|(n?4096:0),deps:Vr(t.deps),value:t.value,index:e.providers.length};e.providers.push(i),e.providersByKey[Er(r)]=i}})}}(e=e.factory(function(){return _r})),e):e}(r))}var Ho=new Map,Mo=new Map,Bo=new Map;function Vo(e){Ho.set(e.token,e),"function"==typeof e.token&&e.token.ngInjectableDef&&"function"==typeof e.token.ngInjectableDef.providedIn&&Mo.set(e.token,e)}function Uo(e,t){var n=Kr(Kr(t.viewDefFactory).nodes[0].element.componentView);Bo.set(e,n)}function Lo(){Ho.clear(),Mo.clear(),Bo.clear()}function Ko(e){if(0===Ho.size)return e;var t=function(e){for(var t=[],n=null,r=0;r<e.nodes.length;r++){var i=e.nodes[r];1&i.flags&&(n=i),n&&3840&i.flags&&Ho.has(i.provider.token)&&(t.push(n.nodeIndex),n=null)}return t}(e);if(0===t.length)return e;e=e.factory(function(){return _r});for(var n=0;n<t.length;n++)r(e,t[n]);return e;function r(e,t){for(var n=t+1;n<e.nodes.length;n++){var r=e.nodes[n];if(1&r.flags)return;if(3840&r.flags){var i=r.provider,o=Ho.get(i.token);o&&(r.flags=-3841&r.flags|o.flags,i.deps=Vr(o.deps),i.value=o.value)}}}}function qo(e,t,n,r,i,o,s,a,u,c,l,h,d){var p=e.def.nodes[t];return bo(e,p,n,r,i,o,s,a,u,c,l,h,d),224&p.flags?gr(e,t).value:void 0}function zo(e,t,n,r,i,o,s,a,u,c,l,h,d){var p=e.def.nodes[t];return _o(e,p,n,r,i,o,s,a,u,c,l,h,d),224&p.flags?gr(e,t).value:void 0}function Zo(e){return hs(Qo.detectChanges,mo,null,[e])}function Wo(e){return hs(Qo.checkNoChanges,yo,null,[e])}function Jo(e){return hs(Qo.destroy,Eo,null,[e])}var Go,Yo,Xo,Qo=function(e){return e[e.create=0]="create",e[e.detectChanges=1]="detectChanges",e[e.checkNoChanges=2]="checkNoChanges",e[e.destroy=3]="destroy",e[e.handleEvent=4]="handleEvent",e}(Qo||(Qo={}));function $o(e,t){Yo=e,Xo=t}function es(e,t,n,r){return $o(e,t),hs(Qo.handleEvent,e.def.handleEvent,null,[e,t,n,r])}function ts(e,t){if(128&e.state)throw wr(Qo[Go]);return $o(e,as(e,0)),e.def.updateDirectives(function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=e.def.nodes[n];return 0===t?rs(e,s,r,i):is(e,s,r,i),16384&s.flags&&$o(e,as(e,n)),224&s.flags?gr(e,s.nodeIndex).value:void 0},e)}function ns(e,t){if(128&e.state)throw wr(Qo[Go]);return $o(e,us(e,0)),e.def.updateRenderer(function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];var s=e.def.nodes[n];return 0===t?rs(e,s,r,i):is(e,s,r,i),3&s.flags&&$o(e,us(e,n)),224&s.flags?gr(e,s.nodeIndex).value:void 0},e)}function rs(e,t,n,r){if(bo.apply(void 0,u([e,t,n],r))){var i=1===n?r[0]:r;if(16384&t.flags){for(var o={},s=0;s<t.bindings.length;s++){var a=t.bindings[s],c=i[s];8&a.flags&&(o[(p=a.nonMinifiedName,"ng-reflect-"+(p=p.replace(/[$@]/g,"_").replace(os,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return"-"+e[1].toLowerCase()})))]=ss(c))}var l=t.parent,h=pr(e,l.nodeIndex).renderElement;if(l.element.name)for(var d in o)null!=(c=o[d])?e.renderer.setAttribute(h,d,c):e.renderer.removeAttribute(h,d);else e.renderer.setValue(h,"bindings="+JSON.stringify(o,null,2))}}var p}function is(e,t,n,r){_o.apply(void 0,u([e,t,n],r))}var os=/([A-Z])/g;function ss(e){try{return null!=e?e.toString().slice(0,30):e}catch(e){return"[ERROR] Exception while trying to serialize the value"}}function as(e,t){for(var n=t;n<e.def.nodes.length;n++){var r=e.def.nodes[n];if(16384&r.flags&&r.bindings&&r.bindings.length)return n}return null}function us(e,t){for(var n=t;n<e.def.nodes.length;n++){var r=e.def.nodes[n];if(3&r.flags&&r.bindings&&r.bindings.length)return n}return null}var cs=function(){function e(e,t){this.view=e,this.nodeIndex=t,null==t&&(this.nodeIndex=t=0),this.nodeDef=e.def.nodes[t];for(var n=this.nodeDef,r=e;n&&0==(1&n.flags);)n=n.parent;if(!n)for(;!n&&r;)n=Or(r),r=r.parent;this.elDef=n,this.elView=r}return Object.defineProperty(e.prototype,"elOrCompView",{get:function(){return pr(this.elView,this.elDef.nodeIndex).componentView||this.view},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return Fi(this.elView,this.elDef)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"component",{get:function(){return this.elOrCompView.component},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this.elOrCompView.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"providerTokens",{get:function(){var e=[];if(this.elDef)for(var t=this.elDef.nodeIndex+1;t<=this.elDef.nodeIndex+this.elDef.childCount;t++){var n=this.elView.def.nodes[t];20224&n.flags&&e.push(n.provider.token),t+=n.childCount}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"references",{get:function(){var e={};if(this.elDef){ls(this.elView,this.elDef,e);for(var t=this.elDef.nodeIndex+1;t<=this.elDef.nodeIndex+this.elDef.childCount;t++){var n=this.elView.def.nodes[t];20224&n.flags&&ls(this.elView,n,e),t+=n.childCount}}return e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentRenderElement",{get:function(){var e=function(e){for(;e&&!Hr(e);)e=e.parent;return e.parent?pr(e.parent,Or(e).nodeIndex):null}(this.elOrCompView);return e?e.renderElement:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"renderNode",{get:function(){return 2&this.nodeDef.flags?jr(this.view,this.nodeDef):jr(this.elView,this.elDef)},enumerable:!0,configurable:!0}),e.prototype.logError=function(e){for(var t,n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];2&this.nodeDef.flags?(t=this.view.def,n=this.nodeDef.nodeIndex):(t=this.elView.def,n=this.elDef.nodeIndex);var o=function(e,t){for(var n=-1,r=0;r<=t;r++)3&e.nodes[r].flags&&n++;return n}(t,n),s=-1;t.factory(function(){return++s===o?(t=e.error).bind.apply(t,u([e],r)):_r;var t}),s<o&&(e.error("Illegal state: the ViewDefinitionFactory did not call the logger!"),e.error.apply(e,u(r)))},e}();function ls(e,t,n){for(var r in t.references)n[r]=no(e,t,t.references[r])}function hs(e,t,n,r){var i=Go,o=Yo,s=Xo;try{Go=e;var a=t.apply(n,r);return Yo=o,Xo=s,Go=i,a}catch(e){if(tt(e)||!Yo)throw e;throw function(e,t){return e instanceof Error||(e=new Error(e.toString())),br(e,t),e}(e,ds())}}function ds(){return Yo?new cs(Yo,Xo):null}var ps=function(){function e(e){this.delegate=e}return e.prototype.createRenderer=function(e,t){return new fs(this.delegate.createRenderer(e,t))},e.prototype.begin=function(){this.delegate.begin&&this.delegate.begin()},e.prototype.end=function(){this.delegate.end&&this.delegate.end()},e.prototype.whenRenderingDone=function(){return this.delegate.whenRenderingDone?this.delegate.whenRenderingDone():Promise.resolve(null)},e}(),fs=function(){function e(e){this.delegate=e,this.data=this.delegate.data}return e.prototype.destroyNode=function(e){!function(e){ln.delete(e.nativeNode)}(hn(e)),this.delegate.destroyNode&&this.delegate.destroyNode(e)},e.prototype.destroy=function(){this.delegate.destroy()},e.prototype.createElement=function(e,t){var n=this.delegate.createElement(e,t),r=ds();if(r){var i=new cn(n,null,r);i.name=e,dn(i)}return n},e.prototype.createComment=function(e){var t=this.delegate.createComment(e),n=ds();return n&&dn(new un(t,null,n)),t},e.prototype.createText=function(e){var t=this.delegate.createText(e),n=ds();return n&&dn(new un(t,null,n)),t},e.prototype.appendChild=function(e,t){var n=hn(e),r=hn(t);n&&r&&n instanceof cn&&n.addChild(r),this.delegate.appendChild(e,t)},e.prototype.insertBefore=function(e,t,n){var r=hn(e),i=hn(t),o=hn(n);r&&i&&r instanceof cn&&r.insertBefore(o,i),this.delegate.insertBefore(e,t,n)},e.prototype.removeChild=function(e,t){var n=hn(e),r=hn(t);n&&r&&n instanceof cn&&n.removeChild(r),this.delegate.removeChild(e,t)},e.prototype.selectRootElement=function(e){var t=this.delegate.selectRootElement(e),n=ds();return n&&dn(new cn(t,null,n)),t},e.prototype.setAttribute=function(e,t,n,r){var i=hn(e);i&&i instanceof cn&&(i.attributes[r?r+":"+t:t]=n),this.delegate.setAttribute(e,t,n,r)},e.prototype.removeAttribute=function(e,t,n){var r=hn(e);r&&r instanceof cn&&(r.attributes[n?n+":"+t:t]=null),this.delegate.removeAttribute(e,t,n)},e.prototype.addClass=function(e,t){var n=hn(e);n&&n instanceof cn&&(n.classes[t]=!0),this.delegate.addClass(e,t)},e.prototype.removeClass=function(e,t){var n=hn(e);n&&n instanceof cn&&(n.classes[t]=!1),this.delegate.removeClass(e,t)},e.prototype.setStyle=function(e,t,n,r){var i=hn(e);i&&i instanceof cn&&(i.styles[t]=n),this.delegate.setStyle(e,t,n,r)},e.prototype.removeStyle=function(e,t,n){var r=hn(e);r&&r instanceof cn&&(r.styles[t]=null),this.delegate.removeStyle(e,t,n)},e.prototype.setProperty=function(e,t,n){var r=hn(e);r&&r instanceof cn&&(r.properties[t]=n),this.delegate.setProperty(e,t,n)},e.prototype.listen=function(e,t,n){if("string"!=typeof e){var r=hn(e);r&&r.listeners.push(new function(e,t){this.name=e,this.callback=t}(t,n))}return this.delegate.listen(e,t,n)},e.prototype.parentNode=function(e){return this.delegate.parentNode(e)},e.prototype.nextSibling=function(e){return this.delegate.nextSibling(e)},e.prototype.setValue=function(e,t){return this.delegate.setValue(e,t)},e}(),gs=function(e){function t(t,n,r){var i=e.call(this)||this;return i.moduleType=t,i._bootstrapComponents=n,i._ngModuleDefFactory=r,i}return i(t,e),t.prototype.create=function(e){!function(){if(!Po){Po=!0;var e=Jt()?{setCurrentNode:$o,createRootView:Io,createEmbeddedView:Ro,createComponentView:Oo,createNgModuleRef:jo,overrideProvider:Vo,overrideComponentView:Uo,clearOverrides:Lo,checkAndUpdateView:Zo,checkNoChangesView:Wo,destroyView:Jo,createDebugContext:function(e,t){return new cs(e,t)},handleEvent:es,updateDirectives:ts,updateRenderer:ns}:{setCurrentNode:function(){},createRootView:Do,createEmbeddedView:lo,createComponentView:po,createNgModuleRef:Ti,overrideProvider:_r,overrideComponentView:_r,clearOverrides:_r,checkAndUpdateView:mo,checkNoChangesView:yo,destroyView:Eo,createDebugContext:function(e,t){return new cs(e,t)},handleEvent:function(e,t,n,r){return e.def.handleEvent(e,t,n,r)},updateDirectives:function(e,t){return e.def.updateDirectives(0===t?qo:zo,e)},updateRenderer:function(e,t){return e.def.updateRenderer(0===t?qo:zo,e)}};yr.setCurrentNode=e.setCurrentNode,yr.createRootView=e.createRootView,yr.createEmbeddedView=e.createEmbeddedView,yr.createComponentView=e.createComponentView,yr.createNgModuleRef=e.createNgModuleRef,yr.overrideProvider=e.overrideProvider,yr.overrideComponentView=e.overrideComponentView,yr.clearOverrides=e.clearOverrides,yr.checkAndUpdateView=e.checkAndUpdateView,yr.checkNoChangesView=e.checkNoChangesView,yr.destroyView=e.destroyView,yr.resolveDep=Wi,yr.createDebugContext=e.createDebugContext,yr.handleEvent=e.handleEvent,yr.updateDirectives=e.updateDirectives,yr.updateRenderer=e.updateRenderer,yr.dirtyParentQueries=$i}}();var t=Kr(this._ngModuleDefFactory);return yr.createNgModuleRef(this.moduleType,e||Ne.NULL,this._bootstrapComponents,t)},t}(function(){});"undefined"==typeof ngDevMode&&("undefined"!=typeof window&&(window.ngDevMode=!0),"undefined"!=typeof self&&(self.ngDevMode=!0),"undefined"!=typeof global&&(global.ngDevMode=!0));var vs=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(vs||(vs={})),ys=Element.prototype,ms=ys.matches||ys.matchesSelector||ys.mozMatchesSelector||ys.msMatchesSelector||ys.oMatchesSelector||ys.webkitMatchesSelector,bs={schedule:function(e,t){var n=setTimeout(e,t);return function(){return clearTimeout(n)}},scheduleBeforeRender:function(e){if("undefined"==typeof window)return bs.schedule(e,0);if(void 0===window.requestAnimationFrame)return bs.schedule(e,16);var t=window.requestAnimationFrame(e);return function(){return window.cancelAnimationFrame(t)}}};function ws(e,t,n){var r=n;return function(e){return e.nodeType===Node.ELEMENT_NODE}(e)&&t.some(function(t,n){return!("*"===t||!function(t,n){return ms.call(e,n)}(0,t)||(r=n,0))}),r}var _s=function(){function e(e,t){this.component=e,this.injector=t,this.componentFactory=t.get(Ft).resolveComponentFactory(e)}return e.prototype.create=function(e){return new Ss(this.componentFactory,e)},e}(),Ss=function(){function e(e,t){this.componentFactory=e,this.injector=t,this.inputChanges=null,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.uninitializedInputs=new Set}return e.prototype.connect=function(e){if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);this.componentRef||this.initializeComponent(e)},e.prototype.disconnect=function(){var e=this;this.componentRef&&null===this.scheduledDestroyFn&&(this.scheduledDestroyFn=bs.schedule(function(){e.componentRef&&(e.componentRef.destroy(),e.componentRef=null)},10))},e.prototype.getInputValue=function(e){return this.componentRef?this.componentRef.instance[e]:this.initialInputValues.get(e)},e.prototype.setInputValue=function(e,t){var n,r;(n=t)===(r=this.getInputValue(e))||n!=n&&r!=r||(this.componentRef?(this.recordInputChange(e,t),this.componentRef.instance[e]=t,this.scheduleDetectChanges()):this.initialInputValues.set(e,t))},e.prototype.initializeComponent=function(e){var t=Ne.create({providers:[],parent:this.injector}),n=function(t,n){var r=e.childNodes,i=n.map(function(){return[]}),o=-1;n.some(function(e,t){return"*"===e&&(o=t,!0)});for(var s=0,a=r.length;s<a;++s){var u=r[s],c=ws(u,n,o);-1!==c&&i[c].push(u)}return i}(0,this.componentFactory.ngContentSelectors);this.componentRef=this.componentFactory.create(t,n,e),this.implementsOnChanges="function"==typeof this.componentRef.instance.ngOnChanges,this.initializeInputs(),this.initializeOutputs(),this.detectChanges(),this.injector.get(en).attachView(this.componentRef.hostView)},e.prototype.initializeInputs=function(){var e=this;this.componentFactory.inputs.forEach(function(t){var n=t.propName,r=e.initialInputValues.get(n);r?e.setInputValue(n,r):e.uninitializedInputs.add(n)}),this.initialInputValues.clear()},e.prototype.initializeOutputs=function(){var e=this,t=this.componentFactory.outputs.map(function(t){var n=t.templateName;return e.componentRef.instance[t.propName].pipe(V(function(e){return{name:n,value:e}}))});this.events=J.apply(void 0,u(t))},e.prototype.callNgOnChanges=function(){if(this.implementsOnChanges&&null!==this.inputChanges){var e=this.inputChanges;this.inputChanges=null,this.componentRef.instance.ngOnChanges(e)}},e.prototype.scheduleDetectChanges=function(){var e=this;this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=bs.scheduleBeforeRender(function(){e.scheduledChangeDetectionFn=null,e.detectChanges()}))},e.prototype.recordInputChange=function(e,t){if(!this.componentRef||this.implementsOnChanges){null===this.inputChanges&&(this.inputChanges={});var n=this.inputChanges[e];if(n)n.currentValue=t;else{var r=this.uninitializedInputs.has(e);this.uninitializedInputs.delete(e);var i=r?void 0:this.getInputValue(e);this.inputChanges[e]=new gn(i,t,r)}}},e.prototype.detectChanges=function(){this.componentRef&&(this.callNgOnChanges(),this.componentRef.changeDetectorRef.detectChanges())},e}(),Es=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ngElementEventsSubscription=null,t}return i(t,e),t}(HTMLElement);function xs(e,t){var n=function(e,n){return t.injector.get(Ft).resolveComponentFactory(e).inputs}(e),r=t.strategyFactory||new _s(e,t.injector),o=function(e){var t={};return e.forEach(function(e){var n,r=e.propName;t[(n=e.templateName,n.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}))]=r}),t}(n),s=function(e){function n(n){var i=e.call(this)||this;return i.ngElementStrategy=r.create(n||t.injector),i}return i(n,e),n.prototype.attributeChangedCallback=function(e,n,i,s){this.ngElementStrategy||(this.ngElementStrategy=r.create(t.injector)),this.ngElementStrategy.setInputValue(o[e],i)},n.prototype.connectedCallback=function(){var e=this;this.ngElementStrategy||(this.ngElementStrategy=r.create(t.injector)),this.ngElementStrategy.connect(this),this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(function(t){var n=function(t,n,r){if("function"!=typeof CustomEvent){var i=e.ownerDocument.createEvent("CustomEvent");return i.initCustomEvent(n,!1,!1,r),i}return new CustomEvent(n,{bubbles:!1,cancelable:!1,detail:r})}(0,t.name,t.value);e.dispatchEvent(n)})},n.prototype.disconnectedCallback=function(){this.ngElementStrategy&&this.ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)},n.observedAttributes=Object.keys(o),n}(Es);return n.map(function(e){return e.propName}).forEach(function(e){Object.defineProperty(s.prototype,e,{get:function(){return this.ngElementStrategy.getInputValue(e)},set:function(t){this.ngElementStrategy.setInputValue(e,t)},configurable:!0,enumerable:!0})}),s}let Fs={debug(){},info(){},warn(){},error(){}};const Cs=0,As=1,ks=2,Ts=3,Ps=4;let Ds,Is;class Ns{static get NONE(){return Cs}static get ERROR(){return As}static get WARN(){return ks}static get INFO(){return Ts}static get DEBUG(){return Ps}static reset(){Is=Ts,Ds=Fs}static get level(){return Is}static set level(e){if(!(Cs<=e&&e<=Ps))throw new Error("Invalid log level");Is=e}static get logger(){return Ds}static set logger(e){if(!e.debug&&e.info&&(e.debug=e.info),!(e.debug&&e.info&&e.warn&&e.error))throw new Error("Invalid logger");Ds=e}static debug(...e){Is>=Ps&&Ds.debug.apply(Ds,Array.from(e))}static info(...e){Is>=Ts&&Ds.info.apply(Ds,Array.from(e))}static warn(...e){Is>=ks&&Ds.warn.apply(Ds,Array.from(e))}static error(...e){Is>=As&&Ds.error.apply(Ds,Array.from(e))}}Ns.reset();const Rs={setInterval:function(e,t){return setInterval(e,t)},clearInterval:function(e){return clearInterval(e)}};let Os=!1,js=null;class Hs{static _testing(){Os=!0}static get location(){if(!Os)return location}static get localStorage(){if(!Os&&"undefined"!=typeof window)return localStorage}static get sessionStorage(){if(!Os&&"undefined"!=typeof window)return sessionStorage}static setXMLHttpRequest(e){js=e}static get XMLHttpRequest(){if(!Os&&"undefined"!=typeof window)return js||XMLHttpRequest}static get timer(){if(!Os)return Rs}}class Ms{constructor({prefix:e="oidc.",store:t=Hs.localStorage}={}){this._store=t,this._prefix=e}set(e,t){return Ns.debug("WebStorageStateStore.set",e),this._store.setItem(e=this._prefix+e,t),Promise.resolve()}get(e){Ns.debug("WebStorageStateStore.get",e);let t=this._store.getItem(e=this._prefix+e);return Promise.resolve(t)}remove(e){Ns.debug("WebStorageStateStore.remove",e);let t=this._store.getItem(e=this._prefix+e);return this._store.removeItem(e),Promise.resolve(t)}getAllKeys(){Ns.debug("WebStorageStateStore.getAllKeys");var e=[];for(let t=0;t<this._store.length;t++){let n=this._store.key(t);0===n.indexOf(this._prefix)&&e.push(n.substr(this._prefix.length))}return Promise.resolve(e)}}class Bs{constructor(e=Hs.XMLHttpRequest){this._XMLHttpRequest=e}getJson(e,t){if(!e)throw Ns.error("JsonService.getJson: No url passed"),new Error("url");return Ns.debug("JsonService.getJson, url: ",e),new Promise((n,r)=>{var i=new this._XMLHttpRequest;i.open("GET",e),i.onload=function(){if(Ns.debug("JsonService.getJson: HTTP response received, status",i.status),200===i.status){var t=i.getResponseHeader("Content-Type");if(t&&t.startsWith("application/json"))try{n(JSON.parse(i.responseText))}catch(e){Ns.error("JsonService.getJson: Error parsing JSON response",e.message),r(e)}else r(Error("Invalid response Content-Type: "+t+", from URL: "+e))}else r(Error(i.statusText+" ("+i.status+")"))},i.onerror=function(){Ns.error("JsonService.getJson: network error"),r(Error("Network Error"))},t&&(Ns.debug("JsonService.getJson: token passed, setting Authorization header"),i.setRequestHeader("Authorization","Bearer "+t)),i.send()})}}const Vs=".well-known/openid-configuration";class Us{constructor(e,t=Bs){if(!e)throw Ns.error("MetadataService: No settings passed to MetadataService"),new Error("settings");this._settings=e,this._jsonService=new t}get metadataUrl(){return this._metadataUrl||(this._settings.metadataUrl?this._metadataUrl=this._settings.metadataUrl:(this._metadataUrl=this._settings.authority,this._metadataUrl&&this._metadataUrl.indexOf(Vs)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=Vs))),this._metadataUrl}getMetadata(){return this._settings.metadata?(Ns.debug("MetadataService.getMetadata: Returning metadata from settings"),Promise.resolve(this._settings.metadata)):this.metadataUrl?(Ns.debug("MetadataService.getMetadata: getting metadata from",this.metadataUrl),this._jsonService.getJson(this.metadataUrl).then(e=>(Ns.debug("MetadataService.getMetadata: json received"),this._settings.metadata=e,e))):(Ns.error("MetadataService.getMetadata: No authority or metadataUrl configured on settings"),Promise.reject(new Error("No authority or metadataUrl configured on settings")))}getIssuer(){return this._getMetadataProperty("issuer")}getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")}getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")}getTokenEndpoint(){return this._getMetadataProperty("token_endpoint",!0)}getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)}getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)}getRevocationEndpoint(){return this._getMetadataProperty("revocation_endpoint",!0)}_getMetadataProperty(e,t=!1){return Ns.debug("MetadataService.getMetadataProperty for: "+e),this.getMetadata().then(n=>{if(Ns.debug("MetadataService.getMetadataProperty: metadata recieved"),void 0===n[e]){if(!0===t)return void Ns.warn("MetadataService.getMetadataProperty: Metadata does not contain optional property "+e);throw Ns.error("MetadataService.getMetadataProperty: Metadata does not contain property "+e),new Error("Metadata does not contain property "+e)}return n[e]})}getSigningKeys(){return this._settings.signingKeys?(Ns.debug("MetadataService.getSigningKeys: Returning signingKeys from settings"),Promise.resolve(this._settings.signingKeys)):this._getMetadataProperty("jwks_uri").then(e=>(Ns.debug("MetadataService.getSigningKeys: jwks_uri received",e),this._jsonService.getJson(e).then(e=>{if(Ns.debug("MetadataService.getSigningKeys: key set received",e),!e.keys)throw Ns.error("MetadataService.getSigningKeys: Missing keys on keyset"),new Error("Missing keys on keyset");return this._settings.signingKeys=e.keys,this._settings.signingKeys})))}}class Ls{constructor(e,t=Bs,n=Us){if(!e)throw Ns.error("UserInfoService.ctor: No settings passed"),new Error("settings");this._settings=e,this._jsonService=new t,this._metadataService=new n(this._settings)}getClaims(e){return e?this._metadataService.getUserInfoEndpoint().then(t=>(Ns.debug("UserInfoService.getClaims: received userinfo url",t),this._jsonService.getJson(t,e).then(e=>(Ns.debug("UserInfoService.getClaims: claims received",e),e)))):(Ns.error("UserInfoService.getClaims: No token passed"),Promise.reject(new Error("A token is required")))}}class Ks extends Error{constructor({error:e,error_description:t,error_uri:n,state:r}={}){if(!e)throw Ns.error("No error passed to ErrorResponse"),new Error("error");super(t||e),this.name="ErrorResponse",this.error=e,this.error_description=t,this.error_uri=n,this.state=r}}var qs=n("lW0m");const zs=["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"];class Zs{static parseJwt(e){Ns.debug("JoseUtil.parseJwt");try{var t=qs.jws.JWS.parse(e);return{header:t.headerObj,payload:t.payloadObj}}catch(e){Ns.error(e)}}static validateJwt(e,t,n,r,i,o){Ns.debug("JoseUtil.validateJwt");try{if("RSA"===t.kty)if(t.e&&t.n)t=qs.KEYUTIL.getKey(t);else{if(!t.x5c||!t.x5c.length)return Ns.error("JoseUtil.validateJwt: RSA key missing key material",t),Promise.reject(new Error("RSA key missing key material"));var s=Object(qs.b64tohex)(t.x5c[0]);t=qs.X509.getPublicKeyFromCertHex(s)}else{if("EC"!==t.kty)return Ns.error("JoseUtil.validateJwt: Unsupported key type",t&&t.kty),Promise.reject(new Error("Unsupported key type: "+t&&t.kty));if(!(t.crv&&t.x&&t.y))return Ns.error("JoseUtil.validateJwt: EC key missing key material",t),Promise.reject(new Error("EC key missing key material"));t=qs.KEYUTIL.getKey(t)}return Zs._validateJwt(e,t,n,r,i,o)}catch(e){return Ns.error(e&&e.message||e),Promise.reject("JWT validation failed")}}static _validateJwt(e,t,n,r,i,o){i||(i=0),o||(o=parseInt(Date.now()/1e3));var s=Zs.parseJwt(e).payload;if(!s.iss)return Ns.error("JoseUtil._validateJwt: issuer was not provided"),Promise.reject(new Error("issuer was not provided"));if(s.iss!==n)return Ns.error("JoseUtil._validateJwt: Invalid issuer in token",s.iss),Promise.reject(new Error("Invalid issuer in token: "+s.iss));if(!s.aud)return Ns.error("JoseUtil._validateJwt: aud was not provided"),Promise.reject(new Error("aud was not provided"));if(!(s.aud===r||Array.isArray(s.aud)&&s.aud.indexOf(r)>=0))return Ns.error("JoseUtil._validateJwt: Invalid audience in token",s.aud),Promise.reject(new Error("Invalid audience in token: "+s.aud));var a=o+i,u=o-i;if(!s.iat)return Ns.error("JoseUtil._validateJwt: iat was not provided"),Promise.reject(new Error("iat was not provided"));if(a<s.iat)return Ns.error("JoseUtil._validateJwt: iat is in the future",s.iat),Promise.reject(new Error("iat is in the future: "+s.iat));if(s.nbf&&a<s.nbf)return Ns.error("JoseUtil._validateJwt: nbf is in the future",s.nbf),Promise.reject(new Error("nbf is in the future: "+s.nbf));if(!s.exp)return Ns.error("JoseUtil._validateJwt: exp was not provided"),Promise.reject(new Error("exp was not provided"));if(s.exp<u)return Ns.error("JoseUtil._validateJwt: exp is in the past",s.exp),Promise.reject(new Error("exp is in the past:"+s.exp));try{if(!qs.jws.JWS.verify(e,t,zs))return Ns.error("JoseUtil._validateJwt: signature validation failed"),Promise.reject(new Error("signature validation failed"))}catch(e){return Ns.error(e&&e.message||e),Promise.reject(new Error("signature validation failed"))}return Promise.resolve()}static hashString(e,t){try{return qs.crypto.Util.hashString(e,t)}catch(e){Ns.error(e)}}static hexToBase64Url(e){try{return Object(qs.hextob64u)(e)}catch(e){Ns.error(e)}}}const Ws=["nonce","at_hash","iat","nbf","exp","aud","iss","c_hash"];class Js{constructor(e,t=Us,n=Ls,r=Zs){if(!e)throw Ns.error("ResponseValidator.ctor: No settings passed to ResponseValidator"),new Error("settings");this._settings=e,this._metadataService=new t(this._settings),this._userInfoService=new n(this._settings),this._joseUtil=r}validateSigninResponse(e,t){return Ns.debug("ResponseValidator.validateSigninResponse"),this._processSigninParams(e,t).then(t=>(Ns.debug("ResponseValidator.validateSigninResponse: state processed"),this._validateTokens(e,t).then(e=>(Ns.debug("ResponseValidator.validateSigninResponse: tokens validated"),this._processClaims(e).then(e=>(Ns.debug("ResponseValidator.validateSigninResponse: claims processed"),e))))))}validateSignoutResponse(e,t){return e.id!==t.state?(Ns.error("ResponseValidator.validateSignoutResponse: State does not match"),Promise.reject(new Error("State does not match"))):(Ns.debug("ResponseValidator.validateSignoutResponse: state validated"),t.state=e.data,t.error?(Ns.warn("ResponseValidator.validateSignoutResponse: Response was error",t.error),Promise.reject(new Ks(t))):Promise.resolve(t))}_processSigninParams(e,t){if(e.id!==t.state)return Ns.error("ResponseValidator._processSigninParams: State does not match"),Promise.reject(new Error("State does not match"));if(!e.client_id)return Ns.error("ResponseValidator._processSigninParams: No client_id on state"),Promise.reject(new Error("No client_id on state"));if(!e.authority)return Ns.error("ResponseValidator._processSigninParams: No authority on state"),Promise.reject(new Error("No authority on state"));if(this._settings.authority){if(this._settings.authority&&this._settings.authority!==e.authority)return Ns.error("ResponseValidator._processSigninParams: authority mismatch on settings vs. signin state"),Promise.reject(new Error("authority mismatch on settings vs. signin state"))}else this._settings.authority=e.authority;if(this._settings.client_id){if(this._settings.client_id&&this._settings.client_id!==e.client_id)return Ns.error("ResponseValidator._processSigninParams: client_id mismatch on settings vs. signin state"),Promise.reject(new Error("client_id mismatch on settings vs. signin state"))}else this._settings.client_id=e.client_id;return Ns.debug("ResponseValidator._processSigninParams: state validated"),t.state=e.data,t.error?(Ns.warn("ResponseValidator._processSigninParams: Response was error",t.error),Promise.reject(new Ks(t))):e.nonce&&!t.id_token?(Ns.error("ResponseValidator._processSigninParams: Expecting id_token in response"),Promise.reject(new Error("No id_token in response"))):!e.nonce&&t.id_token?(Ns.error("ResponseValidator._processSigninParams: Not expecting id_token in response"),Promise.reject(new Error("Unexpected id_token in response"))):Promise.resolve(t)}_processClaims(e){if(e.isOpenIdConnect){if(Ns.debug("ResponseValidator._processClaims: response is OIDC, processing claims"),e.profile=this._filterProtocolClaims(e.profile),this._settings.loadUserInfo&&e.access_token)return Ns.debug("ResponseValidator._processClaims: loading user info"),this._userInfoService.getClaims(e.access_token).then(t=>(Ns.debug("ResponseValidator._processClaims: user info claims received from user info endpoint"),t.sub!==e.profile.sub?(Ns.error("ResponseValidator._processClaims: sub from user info endpoint does not match sub in access_token"),Promise.reject(new Error("sub from user info endpoint does not match sub in access_token"))):(e.profile=this._mergeClaims(e.profile,t),Ns.debug("ResponseValidator._processClaims: user info claims received, updated profile:",e.profile),e)));Ns.debug("ResponseValidator._processClaims: not loading user info")}else Ns.debug("ResponseValidator._processClaims: response is not OIDC, not processing claims");return Promise.resolve(e)}_mergeClaims(e,t){var n=Object.assign({},e);for(let i in t){var r=t[i];Array.isArray(r)||(r=[r]);for(let e=0;e<r.length;e++){let t=r[e];n[i]?Array.isArray(n[i])?n[i].indexOf(t)<0&&n[i].push(t):n[i]!==t&&(n[i]=[n[i],t]):n[i]=t}}return n}_filterProtocolClaims(e){Ns.debug("ResponseValidator._filterProtocolClaims, incoming claims:",e);var t=Object.assign({},e);return this._settings._filterProtocolClaims?(Ws.forEach(e=>{delete t[e]}),Ns.debug("ResponseValidator._filterProtocolClaims: protocol claims filtered",t)):Ns.debug("ResponseValidator._filterProtocolClaims: protocol claims not filtered"),t}_validateTokens(e,t){return t.id_token?t.access_token?(Ns.debug("ResponseValidator._validateTokens: Validating id_token and access_token"),this._validateIdTokenAndAccessToken(e,t)):(Ns.debug("ResponseValidator._validateTokens: Validating id_token"),this._validateIdToken(e,t)):(Ns.debug("ResponseValidator._validateTokens: No id_token to validate"),Promise.resolve(t))}_validateIdTokenAndAccessToken(e,t){return this._validateIdToken(e,t).then(e=>this._validateAccessToken(e))}_validateIdToken(e,t){if(!e.nonce)return Ns.error("ResponseValidator._validateIdToken: No nonce on state"),Promise.reject(new Error("No nonce on state"));let n=this._joseUtil.parseJwt(t.id_token);if(!n||!n.header||!n.payload)return Ns.error("ResponseValidator._validateIdToken: Failed to parse id_token",n),Promise.reject(new Error("Failed to parse id_token"));if(e.nonce!==n.payload.nonce)return Ns.error("ResponseValidator._validateIdToken: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"));var r=n.header.kid;return this._metadataService.getIssuer().then(i=>(Ns.debug("ResponseValidator._validateIdToken: Received issuer"),this._metadataService.getSigningKeys().then(o=>{if(!o)return Ns.error("ResponseValidator._validateIdToken: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));let s;if(Ns.debug("ResponseValidator._validateIdToken: Received signing keys"),r)s=o.filter(e=>e.kid===r)[0];else{if((o=this._filterByAlg(o,n.header.alg)).length>1)return Ns.error("ResponseValidator._validateIdToken: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));s=o[0]}if(!s)return Ns.error("ResponseValidator._validateIdToken: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));let a=e.client_id,u=this._settings.clockSkew;return Ns.debug("ResponseValidator._validateIdToken: Validaing JWT; using clock skew (in seconds) of: ",u),this._joseUtil.validateJwt(t.id_token,s,i,a,u).then(()=>(Ns.debug("ResponseValidator._validateIdToken: JWT validation successful"),n.payload.sub?(t.profile=n.payload,t):(Ns.error("ResponseValidator._validateIdToken: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))))})))}_filterByAlg(e,t){var n=null;if(t.startsWith("RS"))n="RSA";else if(t.startsWith("PS"))n="PS";else{if(!t.startsWith("ES"))return Ns.debug("ResponseValidator._filterByAlg: alg not supported: ",t),[];n="EC"}return Ns.debug("ResponseValidator._filterByAlg: Looking for keys that match kty: ",n),e=e.filter(e=>e.kty===n),Ns.debug("ResponseValidator._filterByAlg: Number of keys that match kty: ",n,e.length),e}_validateAccessToken(e){if(!e.profile)return Ns.error("ResponseValidator._validateAccessToken: No profile loaded from id_token"),Promise.reject(new Error("No profile loaded from id_token"));if(!e.profile.at_hash)return Ns.error("ResponseValidator._validateAccessToken: No at_hash in id_token"),Promise.reject(new Error("No at_hash in id_token"));if(!e.id_token)return Ns.error("ResponseValidator._validateAccessToken: No id_token"),Promise.reject(new Error("No id_token"));let t=this._joseUtil.parseJwt(e.id_token);if(!t||!t.header)return Ns.error("ResponseValidator._validateAccessToken: Failed to parse id_token",t),Promise.reject(new Error("Failed to parse id_token"));var n=t.header.alg;if(!n||5!==n.length)return Ns.error("ResponseValidator._validateAccessToken: Unsupported alg:",n),Promise.reject(new Error("Unsupported alg: "+n));var r=n.substr(2,3);if(!r)return Ns.error("ResponseValidator._validateAccessToken: Unsupported alg:",n,r),Promise.reject(new Error("Unsupported alg: "+n));if(256!==(r=parseInt(r))&&384!==r&&512!==r)return Ns.error("ResponseValidator._validateAccessToken: Unsupported alg:",n,r),Promise.reject(new Error("Unsupported alg: "+n));let i="sha"+r;var o=this._joseUtil.hashString(e.access_token,i);if(!o)return Ns.error("ResponseValidator._validateAccessToken: access_token hash failed:",i),Promise.reject(new Error("Failed to validate at_hash"));var s=o.substr(0,o.length/2),a=this._joseUtil.hexToBase64Url(s);return a!==e.profile.at_hash?(Ns.error("ResponseValidator._validateAccessToken: Failed to validate at_hash",a,e.profile.at_hash),Promise.reject(new Error("Failed to validate at_hash"))):(Ns.debug("ResponseValidator._validateAccessToken: success"),Promise.resolve(e))}}const Gs=".well-known/openid-configuration",Ys="id_token",Xs="openid",Qs=300,$s=300;class ea{constructor({authority:e,metadataUrl:t,metadata:n,signingKeys:r,client_id:i,client_secret:o,response_type:s=Ys,scope:a=Xs,redirect_uri:u,post_logout_redirect_uri:c,prompt:l,display:h,max_age:d,ui_locales:p,acr_values:f,resource:g,filterProtocolClaims:v=!0,loadUserInfo:y=!0,staleStateAge:m=Qs,clockSkew:b=$s,stateStore:w=new Ms,ResponseValidatorCtor:_=Js,MetadataServiceCtor:S=Us,extraQueryParams:E={}}={}){this._authority=e,this._metadataUrl=t,this._metadata=n,this._signingKeys=r,this._client_id=i,this._client_secret=o,this._response_type=s,this._scope=a,this._redirect_uri=u,this._post_logout_redirect_uri=c,this._prompt=l,this._display=h,this._max_age=d,this._ui_locales=p,this._acr_values=f,this._resource=g,this._filterProtocolClaims=!!v,this._loadUserInfo=!!y,this._staleStateAge=m,this._clockSkew=b,this._stateStore=w,this._validator=new _(this),this._metadataService=new S(this),this._extraQueryParams="object"==typeof E?E:{}}get client_id(){return this._client_id}set client_id(e){if(this._client_id)throw Ns.error("OidcClientSettings.set_client_id: client_id has already been assigned."),new Error("client_id has already been assigned.");this._client_id=e}get client_secret(){return this._client_secret}get response_type(){return this._response_type}get scope(){return this._scope}get redirect_uri(){return this._redirect_uri}get post_logout_redirect_uri(){return this._post_logout_redirect_uri}get prompt(){return this._prompt}get display(){return this._display}get max_age(){return this._max_age}get ui_locales(){return this._ui_locales}get acr_values(){return this._acr_values}get resource(){return this._resource}get authority(){return this._authority}set authority(e){if(this._authority)throw Ns.error("OidcClientSettings.set_authority: authority has already been assigned."),new Error("authority has already been assigned.");this._authority=e}get metadataUrl(){return this._metadataUrl||(this._metadataUrl=this.authority,this._metadataUrl&&this._metadataUrl.indexOf(Gs)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=Gs)),this._metadataUrl}get metadata(){return this._metadata}set metadata(e){this._metadata=e}get signingKeys(){return this._signingKeys}set signingKeys(e){this._signingKeys=e}get filterProtocolClaims(){return this._filterProtocolClaims}get loadUserInfo(){return this._loadUserInfo}get staleStateAge(){return this._staleStateAge}get clockSkew(){return this._clockSkew}get stateStore(){return this._stateStore}get validator(){return this._validator}get metadataService(){return this._metadataService}get extraQueryParams(){return this._extraQueryParams}set extraQueryParams(e){this._extraQueryParams="object"==typeof e?e:{}}}class ta{static addQueryParam(e,t,n){return e.indexOf("?")<0&&(e+="?"),"?"!==e[e.length-1]&&(e+="&"),e+=encodeURIComponent(t),(e+="=")+encodeURIComponent(n)}static parseUrlFragment(e,t="#",n=Hs){"string"!=typeof e&&(e=n.location.href);var r=e.lastIndexOf(t);r>=0&&(e=e.substr(r+1));for(var i,o={},s=/([^&=]+)=([^&]*)/g,a=0;i=s.exec(e);)if(o[decodeURIComponent(i[1])]=decodeURIComponent(i[2]),a++>50)return Ns.error("UrlUtility.parseUrlFragment: response exceeded expected number of parameters",e),{error:"Response exceeded expected number of parameters"};for(var u in o)return o;return{}}}function na(){for(var e="xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx",t="0123456789abcdef",n=0,r="",i=0;i<e.length;i++)"-"!==e[i]&&"4"!==e[i]&&(n=16*Math.random()|0),"x"===e[i]?r+=t[n]:"y"===e[i]?(n&=3,r+=t[n|=8]):r+=e[i];return r}class ra{constructor({id:e,data:t,created:n}={}){this._id=e||na(),this._data=t,this._created="number"==typeof n&&n>0?n:parseInt(Date.now()/1e3)}get id(){return this._id}get data(){return this._data}get created(){return this._created}toStorageString(){return Ns.debug("State.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created})}static fromStorageString(e){return Ns.debug("State.fromStorageString"),new ra(JSON.parse(e))}static clearStaleState(e,t){var n=Date.now()/1e3-t;return e.getAllKeys().then(t=>{Ns.debug("State.clearStaleState: got keys",t);var r=[];for(let o=0;o<t.length;o++){let s=t[o];var i=e.get(s).then(t=>{let r=!1;if(t)try{var i=ra.fromStorageString(t);Ns.debug("State.clearStaleState: got item from key: ",s,i.created),i.created<=n&&(r=!0)}catch(e){Ns.error("State.clearStaleState: Error parsing state for key",s,e.message),r=!0}else Ns.debug("State.clearStaleState: no item in storage for key: ",s),r=!0;if(r)return Ns.debug("State.clearStaleState: removed item for key: ",s),e.remove(s)});r.push(i)}return Ns.debug("State.clearStaleState: waiting on promise count:",r.length),Promise.all(r)})}}class ia extends ra{constructor({nonce:e,authority:t,client_id:n}={}){super(arguments[0]),!0===e?this._nonce=na():e&&(this._nonce=e),this._authority=t,this._client_id=n}get nonce(){return this._nonce}get authority(){return this._authority}get client_id(){return this._client_id}toStorageString(){return Ns.debug("SigninState.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,nonce:this.nonce,authority:this.authority,client_id:this.client_id})}static fromStorageString(e){Ns.debug("SigninState.fromStorageString");var t=JSON.parse(e);return new ia(t)}}class oa{constructor({url:e,client_id:t,redirect_uri:n,response_type:r,scope:i,authority:o,data:s,prompt:a,display:u,max_age:c,ui_locales:l,id_token_hint:h,login_hint:d,acr_values:p,resource:f,request:g,request_uri:v,extraQueryParams:y}){if(!e)throw Ns.error("SigninRequest.ctor: No url passed"),new Error("url");if(!t)throw Ns.error("SigninRequest.ctor: No client_id passed"),new Error("client_id");if(!n)throw Ns.error("SigninRequest.ctor: No redirect_uri passed"),new Error("redirect_uri");if(!r)throw Ns.error("SigninRequest.ctor: No response_type passed"),new Error("response_type");if(!i)throw Ns.error("SigninRequest.ctor: No scope passed"),new Error("scope");if(!o)throw Ns.error("SigninRequest.ctor: No authority passed"),new Error("authority");let m=oa.isOidc(r);this.state=new ia({nonce:m,data:s,client_id:t,authority:o}),e=ta.addQueryParam(e,"client_id",t),e=ta.addQueryParam(e,"redirect_uri",n),e=ta.addQueryParam(e,"response_type",r),e=ta.addQueryParam(e,"scope",i),e=ta.addQueryParam(e,"state",this.state.id),m&&(e=ta.addQueryParam(e,"nonce",this.state.nonce));var b={prompt:a,display:u,max_age:c,ui_locales:l,id_token_hint:h,login_hint:d,acr_values:p,resource:f,request:g,request_uri:v};for(let w in b)b[w]&&(e=ta.addQueryParam(e,w,b[w]));for(let w in y)e=ta.addQueryParam(e,w,y[w]);this.url=e}static isOidc(e){return!!e.split(/\s+/g).filter(function(e){return"id_token"===e})[0]}static isOAuth(e){return!!e.split(/\s+/g).filter(function(e){return"token"===e})[0]}}const sa="openid";class aa{constructor(e){var t=ta.parseUrlFragment(e,"#");this.error=t.error,this.error_description=t.error_description,this.error_uri=t.error_uri,this.state=t.state,this.id_token=t.id_token,this.session_state=t.session_state,this.access_token=t.access_token,this.token_type=t.token_type,this.scope=t.scope,this.profile=void 0;let n=parseInt(t.expires_in);if("number"==typeof n&&n>0){let e=parseInt(Date.now()/1e3);this.expires_at=e+n}}get expires_in(){if(this.expires_at){let e=parseInt(Date.now()/1e3);return this.expires_at-e}}get expired(){let e=this.expires_in;if(void 0!==e)return e<=0}get scopes(){return(this.scope||"").split(" ")}get isOpenIdConnect(){return this.scopes.indexOf(sa)>=0||!!this.id_token}}class ua{constructor({url:e,id_token_hint:t,post_logout_redirect_uri:n,data:r}){if(!e)throw Ns.error("SignoutRequest.ctor: No url passed"),new Error("url");t&&(e=ta.addQueryParam(e,"id_token_hint",t)),n&&(e=ta.addQueryParam(e,"post_logout_redirect_uri",n),r&&(this.state=new ra({data:r}),e=ta.addQueryParam(e,"state",this.state.id))),this.url=e}}class ca{constructor(e){var t=ta.parseUrlFragment(e,"?");this.error=t.error,this.error_description=t.error_description,this.error_uri=t.error_uri,this.state=t.state}}class la{constructor(e={}){this._settings=e instanceof ea?e:new ea(e)}get _stateStore(){return this.settings.stateStore}get _validator(){return this.settings.validator}get _metadataService(){return this.settings.metadataService}get settings(){return this._settings}get metadataService(){return this._metadataService}createSigninRequest({response_type:e,scope:t,redirect_uri:n,data:r,state:i,prompt:o,display:s,max_age:a,ui_locales:u,id_token_hint:c,login_hint:l,acr_values:h,resource:d,request:p,request_uri:f,extraQueryParams:g}={},v){Ns.debug("OidcClient.createSigninRequest");let y=this._settings.client_id;e=e||this._settings.response_type,t=t||this._settings.scope,n=n||this._settings.redirect_uri,o=o||this._settings.prompt,s=s||this._settings.display,a=a||this._settings.max_age,u=u||this._settings.ui_locales,h=h||this._settings.acr_values,d=d||this._settings.resource,g=g||this._settings.extraQueryParams;let m=this._settings.authority;return this._metadataService.getAuthorizationEndpoint().then(b=>{Ns.debug("OidcClient.createSigninRequest: Received authorization endpoint",b);let w=new oa({url:b,client_id:y,redirect_uri:n,response_type:e,scope:t,data:r||i,authority:m,prompt:o,display:s,max_age:a,ui_locales:u,id_token_hint:c,login_hint:l,acr_values:h,resource:d,request:p,request_uri:f,extraQueryParams:g});var _=w.state;return(v=v||this._stateStore).set(_.id,_.toStorageString()).then(()=>w)})}processSigninResponse(e,t){Ns.debug("OidcClient.processSigninResponse");var n=new aa(e);return n.state?(t=t||this._stateStore).remove(n.state).then(e=>{if(!e)throw Ns.error("OidcClient.processSigninResponse: No matching state found in storage"),new Error("No matching state found in storage");let t=ia.fromStorageString(e);return Ns.debug("OidcClient.processSigninResponse: Received state from storage; validating response"),this._validator.validateSigninResponse(t,n)}):(Ns.error("OidcClient.processSigninResponse: No state in response"),Promise.reject(new Error("No state in response")))}createSignoutRequest({id_token_hint:e,data:t,state:n,post_logout_redirect_uri:r}={},i){return Ns.debug("OidcClient.createSignoutRequest"),r=r||this._settings.post_logout_redirect_uri,this._metadataService.getEndSessionEndpoint().then(o=>{if(!o)throw Ns.error("OidcClient.createSignoutRequest: No end session endpoint url returned"),new Error("no end session endpoint");Ns.debug("OidcClient.createSignoutRequest: Received end session endpoint",o);let s=new ua({url:o,id_token_hint:e,post_logout_redirect_uri:r,data:t||n});var a=s.state;return a&&(Ns.debug("OidcClient.createSignoutRequest: Signout request has state to persist"),(i=i||this._stateStore).set(a.id,a.toStorageString())),s})}processSignoutResponse(e,t){Ns.debug("OidcClient.processSignoutResponse");var n=new ca(e);return n.state?(t=t||this._stateStore).remove(n.state).then(e=>{if(!e)throw Ns.error("OidcClient.processSignoutResponse: No matching state found in storage"),new Error("No matching state found in storage");let t=ra.fromStorageString(e);return Ns.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"),this._validator.validateSignoutResponse(t,n)}):(Ns.debug("OidcClient.processSignoutResponse: No state in response"),n.error?(Ns.warn("OidcClient.processSignoutResponse: Response was error: ",n.error),Promise.reject(new Ks(n))):Promise.resolve(n))}clearStaleState(e){return Ns.debug("OidcClient.clearStaleState"),ra.clearStaleState(e=e||this._stateStore,this.settings.staleStateAge)}}class ha{prepare(){return Promise.resolve(this)}navigate(e){return e&&e.url?(window.location=e.url,Promise.resolve()):(Ns.error("RedirectNavigator.navigate: No url provided"),Promise.reject(new Error("No url provided")))}get url(){return window.location.href}}const da=500,pa="location=no,toolbar=no,width=500,height=500,left=100,top=100;",fa="_blank";class ga{constructor(e){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t}),this._popup=window.open("",e.popupWindowTarget||fa,e.popupWindowFeatures||pa),this._popup&&(Ns.debug("PopupWindow.ctor: popup successfully created"),this._checkForPopupClosedTimer=window.setInterval(this._checkForPopupClosed.bind(this),da))}get promise(){return this._promise}navigate(e){return this._popup?e&&e.url?(Ns.debug("PopupWindow.navigate: Setting URL in popup"),this._id=e.id,this._id&&(window["popupCallback_"+e.id]=this._callback.bind(this)),this._popup.focus(),this._popup.window.location=e.url):(this._error("PopupWindow.navigate: no url provided"),this._error("No url provided")):this._error("PopupWindow.navigate: Error opening popup window"),this.promise}_success(e){this._cleanup(),Ns.debug("PopupWindow.callback: Successful response from popup window"),this._resolve(e)}_error(e){this._cleanup(),Ns.debug("PopupWindow.error: ",e),Ns.error(e),this._reject(new Error(e))}close(){this._cleanup(!1)}_cleanup(e){Ns.debug("PopupWindow.cleanup"),window.clearInterval(this._checkForPopupClosedTimer),this._checkForPopupClosedTimer=null,delete window["popupCallback_"+this._id],this._popup&&!e&&this._popup.close(),this._popup=null}_checkForPopupClosed(){this._popup&&!this._popup.closed||this._error("PopupWindow.checkForPopupClosed: Popup window closed")}_callback(e,t){this._cleanup(t),e?(Ns.debug("PopupWindow.callback success"),this._success({url:e})):(Ns.debug("PopupWindow.callback: Invalid response from popup"),this._error("Invalid response from popup"))}static notifyOpener(e,t,n){if(window.opener&&(e=e||window.location.href)){var r=ta.parseUrlFragment(e,n);if(r.state){var i=window.opener["popupCallback_"+r.state];i?(Ns.debug("PopupWindow.notifyOpener: passing url message to opener"),i(e,t)):Ns.warn("PopupWindow.notifyOpener: no matching callback found on opener")}else Ns.warn("PopupWindow.notifyOpener: no state found in response url")}}}class va{prepare(e){let t=new ga(e);return Promise.resolve(t)}callback(e,t,n){Ns.debug("PopupNavigator.callback");try{return ga.notifyOpener(e,t,n),Promise.resolve()}catch(e){return Promise.reject(e)}}}const ya=1e4;class ma{constructor(e){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t}),this._boundMessageEvent=this._message.bind(this),window.addEventListener("message",this._boundMessageEvent,!1),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.style.display="none",this._frame.style.width=0,this._frame.style.height=0,window.document.body.appendChild(this._frame)}navigate(e){if(e&&e.url){let t=e.silentRequestTimeout||ya;Ns.debug("IFrameWindow.navigate: Using timeout of:",t),this._timer=window.setTimeout(this._timeout.bind(this),t),this._frame.src=e.url}else this._error("No url provided");return this.promise}get promise(){return this._promise}_success(e){this._cleanup(),Ns.debug("IFrameWindow: Successful response from frame window"),this._resolve(e)}_error(e){this._cleanup(),Ns.error(e),this._reject(new Error(e))}close(){this._cleanup()}_cleanup(){this._frame&&(Ns.debug("IFrameWindow: cleanup"),window.removeEventListener("message",this._boundMessageEvent,!1),window.clearTimeout(this._timer),window.document.body.removeChild(this._frame),this._timer=null,this._frame=null,this._boundMessageEvent=null)}_timeout(){Ns.debug("IFrameWindow.timeout"),this._error("Frame window timed out")}_message(e){if(Ns.debug("IFrameWindow.message"),this._timer&&e.origin===this._origin&&e.source===this._frame.contentWindow){let t=e.data;t?this._success({url:t}):this._error("Invalid response from frame")}}get _origin(){return location.protocol+"//"+location.host}static notifyParent(e){Ns.debug("IFrameWindow.notifyParent"),window.parent&&window!==window.parent&&(e=e||window.location.href)&&(Ns.debug("IFrameWindow.notifyParent: posting url message to parent"),window.parent.postMessage(e,location.protocol+"//"+location.host))}}class ba{prepare(e){let t=new ma(e);return Promise.resolve(t)}callback(e){Ns.debug("IFrameNavigator.callback");try{return ma.notifyParent(e),Promise.resolve()}catch(e){return Promise.reject(e)}}}const wa=60,_a=2e3;class Sa extends ea{constructor({popup_redirect_uri:e,popup_post_logout_redirect_uri:t,popupWindowFeatures:n,popupWindowTarget:r,silent_redirect_uri:i,silentRequestTimeout:o,automaticSilentRenew:s=!1,includeIdTokenInSilentRenew:a=!0,monitorSession:u=!0,checkSessionInterval:c=_a,stopCheckSessionOnError:l=!0,revokeAccessTokenOnSignout:h=!1,accessTokenExpiringNotificationTime:d=wa,redirectNavigator:p=new ha,popupNavigator:f=new va,iframeNavigator:g=new ba,userStore:v=new Ms({store:Hs.sessionStorage})}={}){super(arguments[0]),this._popup_redirect_uri=e,this._popup_post_logout_redirect_uri=t,this._popupWindowFeatures=n,this._popupWindowTarget=r,this._silent_redirect_uri=i,this._silentRequestTimeout=o,this._automaticSilentRenew=!!s,this._includeIdTokenInSilentRenew=a,this._accessTokenExpiringNotificationTime=d,this._monitorSession=u,this._checkSessionInterval=c,this._stopCheckSessionOnError=l,this._revokeAccessTokenOnSignout=h,this._redirectNavigator=p,this._popupNavigator=f,this._iframeNavigator=g,this._userStore=v}get popup_redirect_uri(){return this._popup_redirect_uri}get popup_post_logout_redirect_uri(){return this._popup_post_logout_redirect_uri}get popupWindowFeatures(){return this._popupWindowFeatures}get popupWindowTarget(){return this._popupWindowTarget}get silent_redirect_uri(){return this._silent_redirect_uri}get silentRequestTimeout(){return this._silentRequestTimeout}get automaticSilentRenew(){return!(!this.silent_redirect_uri||!this._automaticSilentRenew)}get includeIdTokenInSilentRenew(){return this._includeIdTokenInSilentRenew}get accessTokenExpiringNotificationTime(){return this._accessTokenExpiringNotificationTime}get monitorSession(){return this._monitorSession}get checkSessionInterval(){return this._checkSessionInterval}get stopCheckSessionOnError(){return this._stopCheckSessionOnError}get revokeAccessTokenOnSignout(){return this._revokeAccessTokenOnSignout}get redirectNavigator(){return this._redirectNavigator}get popupNavigator(){return this._popupNavigator}get iframeNavigator(){return this._iframeNavigator}get userStore(){return this._userStore}}class Ea{constructor({id_token:e,session_state:t,access_token:n,token_type:r,scope:i,profile:o,expires_at:s,state:a}){this.id_token=e,this.session_state=t,this.access_token=n,this.token_type=r,this.scope=i,this.profile=o,this.expires_at=s,this.state=a}get expires_in(){if(this.expires_at){let e=parseInt(Date.now()/1e3);return this.expires_at-e}}get expired(){let e=this.expires_in;if(void 0!==e)return e<=0}get scopes(){return(this.scope||"").split(" ")}toStorageString(){return Ns.debug("User.toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(e){return Ns.debug("User.fromStorageString"),new Ea(JSON.parse(e))}}class xa{constructor(e){this._name=e,this._callbacks=[]}addHandler(e){this._callbacks.push(e)}removeHandler(e){var t=this._callbacks.findIndex(t=>t===e);t>=0&&this._callbacks.splice(t,1)}raise(...e){Ns.debug("Event: Raising event: "+this._name);for(let t=0;t<this._callbacks.length;t++)this._callbacks[t](...e)}}const Fa=5;class Ca extends xa{constructor(e,t=Hs.timer,n){super(e),this._timer=t,this._nowFunc=n||(()=>Date.now()/1e3)}get now(){return parseInt(this._nowFunc())}init(e){e<=0&&(e=1),e=parseInt(e);var t=this.now+e;if(this.expiration===t&&this._timerHandle)Ns.debug("Timer.init timer "+this._name+" skipping initialization since already initialized for expiration:",this.expiration);else{this.cancel(),Ns.debug("Timer.init timer "+this._name+" for duration:",e),this._expiration=t;var n=Fa;e<n&&(n=e),this._timerHandle=this._timer.setInterval(this._callback.bind(this),1e3*n)}}get expiration(){return this._expiration}cancel(){this._timerHandle&&(Ns.debug("Timer.cancel: ",this._name),this._timer.clearInterval(this._timerHandle),this._timerHandle=null)}_callback(){Ns.debug("Timer.callback; "+this._name+" timer expires in:",this._expiration-this.now),this._expiration<=this.now&&(this.cancel(),super.raise())}}const Aa=60;class ka{constructor({accessTokenExpiringNotificationTime:e=Aa,accessTokenExpiringTimer:t=new Ca("Access token expiring"),accessTokenExpiredTimer:n=new Ca("Access token expired")}={}){this._accessTokenExpiringNotificationTime=e,this._accessTokenExpiring=t,this._accessTokenExpired=n}load(e){if(e.access_token&&void 0!==e.expires_in){let t=e.expires_in;if(Ns.debug("AccessTokenEvents.load: access token present, remaining duration:",t),t>0){let e=t-this._accessTokenExpiringNotificationTime;e<=0&&(e=1),Ns.debug("AccessTokenEvents.load: registering expiring timer in:",e),this._accessTokenExpiring.init(e)}else Ns.debug("AccessTokenEvents.load: canceling existing expiring timer becase we're past expiration."),this._accessTokenExpiring.cancel();let n=t+1;Ns.debug("AccessTokenEvents.load: registering expired timer in:",n),this._accessTokenExpired.init(n)}else this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()}unload(){Ns.debug("AccessTokenEvents.unload: canceling existing access token timers"),this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()}addAccessTokenExpiring(e){this._accessTokenExpiring.addHandler(e)}removeAccessTokenExpiring(e){this._accessTokenExpiring.removeHandler(e)}addAccessTokenExpired(e){this._accessTokenExpired.addHandler(e)}removeAccessTokenExpired(e){this._accessTokenExpired.removeHandler(e)}}class Ta extends ka{constructor(e){super(e),this._userLoaded=new xa("User loaded"),this._userUnloaded=new xa("User unloaded"),this._silentRenewError=new xa("Silent renew error"),this._userSignedOut=new xa("User signed out"),this._userSessionChanged=new xa("User session changed")}load(e,t=!0){Ns.debug("UserManagerEvents.load"),super.load(e),t&&this._userLoaded.raise(e)}unload(){Ns.debug("UserManagerEvents.unload"),super.unload(),this._userUnloaded.raise()}addUserLoaded(e){this._userLoaded.addHandler(e)}removeUserLoaded(e){this._userLoaded.removeHandler(e)}addUserUnloaded(e){this._userUnloaded.addHandler(e)}removeUserUnloaded(e){this._userUnloaded.removeHandler(e)}addSilentRenewError(e){this._silentRenewError.addHandler(e)}removeSilentRenewError(e){this._silentRenewError.removeHandler(e)}_raiseSilentRenewError(e){Ns.debug("UserManagerEvents._raiseSilentRenewError",e.message),this._silentRenewError.raise(e)}addUserSignedOut(e){this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}_raiseUserSignedOut(e){Ns.debug("UserManagerEvents._raiseUserSignedOut"),this._userSignedOut.raise(e)}addUserSessionChanged(e){this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}_raiseUserSessionChanged(e){Ns.debug("UserManagerEvents._raiseUserSessionChanged"),this._userSessionChanged.raise(e)}}class Pa{constructor(e){this._userManager=e}start(){this._callback||(this._callback=this._tokenExpiring.bind(this),this._userManager.events.addAccessTokenExpiring(this._callback),this._userManager.getUser().then(e=>{}).catch(e=>{Ns.error("SilentRenewService.start: Error from getUser:",e.message)}))}stop(){this._callback&&(this._userManager.events.removeAccessTokenExpiring(this._callback),delete this._callback)}_tokenExpiring(){this._userManager.signinSilent().then(e=>{Ns.debug("SilentRenewService._tokenExpiring: Silent token renewal successful")},e=>{Ns.error("SilentRenewService._tokenExpiring: Error from signinSilent:",e.message),this._userManager.events._raiseSilentRenewError(e)})}}const Da=2e3;class Ia{constructor(e,t,n,r,i=!0){this._callback=e,this._client_id=t,this._url=n,this._interval=r||Da,this._stopOnError=i;var o=n.indexOf("/",n.indexOf("//")+2);this._frame_origin=n.substr(0,o),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.style.display="none",this._frame.style.width=0,this._frame.style.height=0,this._frame.src=n}load(){return new Promise(e=>{this._frame.onload=(()=>{e()}),window.document.body.appendChild(this._frame),this._boundMessageEvent=this._message.bind(this),window.addEventListener("message",this._boundMessageEvent,!1)})}_message(e){e.origin===this._frame_origin&&e.source===this._frame.contentWindow&&("error"===e.data?(Ns.error("CheckSessionIFrame: error message from check session op iframe"),this._stopOnError&&this.stop()):"changed"===e.data?(Ns.debug("CheckSessionIFrame: changed message from check session op iframe"),this.stop(),this._callback()):Ns.debug("CheckSessionIFrame: "+e.data+" message from check session op iframe"))}start(e){this._session_state!==e&&(Ns.debug("CheckSessionIFrame.start"),this.stop(),this._session_state=e,this._timer=window.setInterval(()=>{this._frame.contentWindow.postMessage(this._client_id+" "+this._session_state,this._frame_origin)},this._interval))}stop(){this._session_state=null,this._timer&&(Ns.debug("CheckSessionIFrame.stop"),window.clearInterval(this._timer),this._timer=null)}}class Na{constructor(e,t=Ia){if(!e)throw Ns.error("SessionMonitor.ctor: No user manager passed to SessionMonitor"),new Error("userManager");this._userManager=e,this._CheckSessionIFrameCtor=t,this._userManager.events.addUserLoaded(this._start.bind(this)),this._userManager.events.addUserUnloaded(this._stop.bind(this)),this._userManager.getUser().then(e=>{e&&this._start(e)}).catch(e=>{Ns.error("SessionMonitor ctor: error from getUser:",e.message)})}get _settings(){return this._userManager.settings}get _metadataService(){return this._userManager.metadataService}get _client_id(){return this._settings.client_id}get _checkSessionInterval(){return this._settings.checkSessionInterval}get _stopCheckSessionOnError(){return this._settings.stopCheckSessionOnError}_start(e){let t=e.session_state;t&&(this._sub=e.profile.sub,this._sid=e.profile.sid,Ns.debug("SessionMonitor._start: session_state:",t,", sub:",this._sub),this._checkSessionIFrame?this._checkSessionIFrame.start(t):this._metadataService.getCheckSessionIframe().then(e=>{if(e){Ns.debug("SessionMonitor._start: Initializing check session iframe");let n=this._client_id,r=this._checkSessionInterval,i=this._stopCheckSessionOnError;this._checkSessionIFrame=new this._CheckSessionIFrameCtor(this._callback.bind(this),n,e,r,i),this._checkSessionIFrame.load().then(()=>{this._checkSessionIFrame.start(t)})}else Ns.warn("SessionMonitor._start: No check session iframe found in the metadata")}).catch(e=>{Ns.error("SessionMonitor._start: Error from getCheckSessionIframe:",e.message)}))}_stop(){this._sub=null,this._sid=null,this._checkSessionIFrame&&(Ns.debug("SessionMonitor._stop"),this._checkSessionIFrame.stop())}_callback(){this._userManager.querySessionStatus().then(e=>{var t=!0;e?e.sub===this._sub?(t=!1,this._checkSessionIFrame.start(e.session_state),e.sid===this._sid?Ns.debug("SessionMonitor._callback: Same sub still logged in at OP, restarting check session iframe; session_state:",e.session_state):(Ns.debug("SessionMonitor._callback: Same sub still logged in at OP, session state has changed, restarting check session iframe; session_state:",e.session_state),this._userManager.events._raiseUserSessionChanged())):Ns.debug("SessionMonitor._callback: Different subject signed into OP:",e.sub):Ns.debug("SessionMonitor._callback: Subject no longer signed into OP"),t&&(Ns.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed out event"),this._userManager.events._raiseUserSignedOut())}).catch(e=>{Ns.debug("SessionMonitor._callback: Error calling queryCurrentSigninSession; raising signed out event",e.message),this._userManager.events._raiseUserSignedOut()})}}const Ra="access_token";class Oa{constructor(e,t=Hs.XMLHttpRequest,n=Us){if(!e)throw Ns.error("TokenRevocationClient.ctor: No settings provided"),new Error("No settings provided.");this._settings=e,this._XMLHttpRequestCtor=t,this._metadataService=new n(this._settings)}revoke(e,t){if(!e)throw Ns.error("TokenRevocationClient.revoke: No accessToken provided"),new Error("No accessToken provided.");return this._metadataService.getRevocationEndpoint().then(n=>{if(n)return Ns.error("TokenRevocationClient.revoke: Revoking access token"),this._revoke(n,this._settings.client_id,this._settings.client_secret,e);if(t)throw Ns.error("TokenRevocationClient.revoke: Revocation not supported"),new Error("Revocation not supported")})}_revoke(e,t,n,r){return new Promise((i,o)=>{var s=new this._XMLHttpRequestCtor;s.open("POST",e),s.onload=(()=>{Ns.debug("TokenRevocationClient.revoke: HTTP response received, status",s.status),200===s.status?i():o(Error(s.statusText+" ("+s.status+")"))});var a="client_id="+encodeURIComponent(t);n&&(a+="&client_secret="+encodeURIComponent(n)),a+="&token_type_hint="+encodeURIComponent(Ra),a+="&token="+encodeURIComponent(r),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.send(a)})}}class ja extends la{constructor(e={},t=Pa,n=Na,r=Oa){e instanceof Sa||(e=new Sa(e)),super(e),this._events=new Ta(e),this._silentRenewService=new t(this),this.settings.automaticSilentRenew&&(Ns.debug("UserManager.ctor: automaticSilentRenew is configured, setting up silent renew"),this.startSilentRenew()),this.settings.monitorSession&&(Ns.debug("UserManager.ctor: monitorSession is configured, setting up session monitor"),this._sessionMonitor=new n(this)),this._tokenRevocationClient=new r(this._settings)}get _redirectNavigator(){return this.settings.redirectNavigator}get _popupNavigator(){return this.settings.popupNavigator}get _iframeNavigator(){return this.settings.iframeNavigator}get _userStore(){return this.settings.userStore}get events(){return this._events}getUser(){return this._loadUser().then(e=>e?(Ns.info("UserManager.getUser: user loaded"),this._events.load(e,!1),e):(Ns.info("UserManager.getUser: user not found in storage"),null))}removeUser(){return this.storeUser(null).then(()=>{Ns.info("UserManager.removeUser: user removed from storage"),this._events.unload()})}signinRedirect(e){return this._signinStart(e,this._redirectNavigator).then(()=>{Ns.info("UserManager.signinRedirect: successful")})}signinRedirectCallback(e){return this._signinEnd(e||this._redirectNavigator.url).then(e=>(e&&(e.profile&&e.profile.sub?Ns.info("UserManager.signinRedirectCallback: successful, signed in sub: ",e.profile.sub):Ns.info("UserManager.signinRedirectCallback: no sub")),e))}signinPopup(e={}){let t=e.redirect_uri||this.settings.popup_redirect_uri||this.settings.redirect_uri;return t?(e.redirect_uri=t,e.display="popup",this._signin(e,this._popupNavigator,{startUrl:t,popupWindowFeatures:e.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:e.popupWindowTarget||this.settings.popupWindowTarget}).then(e=>(e&&(e.profile&&e.profile.sub?Ns.info("UserManager.signinPopup: signinPopup successful, signed in sub: ",e.profile.sub):Ns.info("UserManager.signinPopup: no sub")),e))):(Ns.error("UserManager.signinPopup: No popup_redirect_uri or redirect_uri configured"),Promise.reject(new Error("No popup_redirect_uri or redirect_uri configured")))}signinPopupCallback(e){return this._signinCallback(e,this._popupNavigator).then(e=>(e&&(e.profile&&e.profile.sub?Ns.info("UserManager.signinPopupCallback: successful, signed in sub: ",e.profile.sub):Ns.info("UserManager.signinPopupCallback: no sub")),e))}signinSilent(e={}){let t,n=e.redirect_uri||this.settings.silent_redirect_uri;return n?(e.redirect_uri=n,e.prompt="none",(t=e.id_token_hint||!this.settings.includeIdTokenInSilentRenew?Promise.resolve():this._loadUser().then(t=>{e.id_token_hint=t&&t.id_token})).then(()=>this._signin(e,this._iframeNavigator,{startUrl:n,silentRequestTimeout:e.silentRequestTimeout||this.settings.silentRequestTimeout})).then(e=>(e&&(e.profile&&e.profile.sub?Ns.info("UserManager.signinSilent: successful, signed in sub: ",e.profile.sub):Ns.info("UserManager.signinSilent: no sub")),e))):(Ns.error("UserManager.signinSilent: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))}signinSilentCallback(e){return this._signinCallback(e,this._iframeNavigator).then(e=>(e&&(e.profile&&e.profile.sub?Ns.info("UserManager.signinSilentCallback: successful, signed in sub: ",e.profile.sub):Ns.info("UserManager.signinSilentCallback: no sub")),e))}querySessionStatus(e={}){let t=e.redirect_uri||this.settings.silent_redirect_uri;return t?(e.redirect_uri=t,e.prompt="none",e.response_type="id_token",e.scope="openid",this._signinStart(e,this._iframeNavigator,{startUrl:t,silentRequestTimeout:e.silentRequestTimeout||this.settings.silentRequestTimeout}).then(e=>this.processSigninResponse(e.url).then(e=>{if(Ns.debug("UserManager.querySessionStatus: got signin response"),e.session_state&&e.profile.sub&&e.profile.sid)return Ns.info("UserManager.querySessionStatus: querySessionStatus success for sub: ",e.profile.sub),{session_state:e.session_state,sub:e.profile.sub,sid:e.profile.sid};Ns.info("querySessionStatus successful, user not authenticated")}))):(Ns.error("UserManager.querySessionStatus: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))}_signin(e,t,n={}){return this._signinStart(e,t,n).then(e=>this._signinEnd(e.url))}_signinStart(e,t,n={}){return t.prepare(n).then(t=>(Ns.debug("UserManager._signinStart: got navigator window handle"),this.createSigninRequest(e).then(e=>(Ns.debug("UserManager._signinStart: got signin request"),n.url=e.url,n.id=e.state.id,t.navigate(n))).catch(e=>{throw t.close&&(Ns.debug("UserManager._signinStart: Error after preparing navigator, closing navigator window"),t.close()),e})))}_signinEnd(e){return this.processSigninResponse(e).then(e=>{Ns.debug("UserManager._signinEnd: got signin response");let t=new Ea(e);return this.storeUser(t).then(()=>(Ns.debug("UserManager._signinEnd: user stored"),this._events.load(t),t))})}_signinCallback(e,t){return Ns.debug("UserManager._signinCallback"),t.callback(e)}signoutRedirect(e={}){let t=e.post_logout_redirect_uri||this.settings.post_logout_redirect_uri;return t&&(e.post_logout_redirect_uri=t),this._signoutStart(e,this._redirectNavigator).then(()=>{Ns.info("UserManager.signoutRedirect: successful")})}signoutRedirectCallback(e){return this._signoutEnd(e||this._redirectNavigator.url).then(e=>(Ns.info("UserManager.signoutRedirectCallback: successful"),e))}signoutPopup(e={}){let t=e.post_logout_redirect_uri||this.settings.popup_post_logout_redirect_uri||this.settings.post_logout_redirect_uri;return e.post_logout_redirect_uri=t,e.display="popup",e.post_logout_redirect_uri&&(e.state=e.state||{}),this._signout(e,this._popupNavigator,{startUrl:t,popupWindowFeatures:e.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:e.popupWindowTarget||this.settings.popupWindowTarget}).then(()=>{Ns.info("UserManager.signinPopup: successful")})}signoutPopupCallback(e,t){return void 0===t&&"boolean"==typeof e&&(e=null,t=!0),this._popupNavigator.callback(e,t,"?").then(()=>{Ns.info("UserManager.signoutPopupCallback: successful")})}_signout(e,t,n={}){return this._signoutStart(e,t,n).then(e=>this._signoutEnd(e.url))}_signoutStart(e={},t,n={}){return t.prepare(n).then(t=>(Ns.debug("UserManager._signoutStart: got navigator window handle"),this._loadUser().then(r=>(Ns.debug("UserManager._signoutStart: loaded current user from storage"),(this._settings.revokeAccessTokenOnSignout?this._revokeInternal(r):Promise.resolve()).then(()=>{var i=e.id_token_hint||r&&r.id_token;return i&&(Ns.debug("UserManager._signoutStart: Setting id_token into signout request"),e.id_token_hint=i),this.removeUser().then(()=>(Ns.debug("UserManager._signoutStart: user removed, creating signout request"),this.createSignoutRequest(e).then(e=>(Ns.debug("UserManager._signoutStart: got signout request"),n.url=e.url,e.state&&(n.id=e.state.id),t.navigate(n)))))}))).catch(e=>{throw t.close&&(Ns.debug("UserManager._signoutStart: Error after preparing navigator, closing navigator window"),t.close()),e})))}_signoutEnd(e){return this.processSignoutResponse(e).then(e=>(Ns.debug("UserManager._signoutEnd: got signout response"),e))}revokeAccessToken(){return this._loadUser().then(e=>this._revokeInternal(e,!0).then(t=>{if(t)return Ns.debug("UserManager.revokeAccessToken: removing token properties from user and re-storing"),e.access_token=null,e.expires_at=null,e.token_type=null,this.storeUser(e).then(()=>{Ns.debug("UserManager.revokeAccessToken: user stored"),this._events.load(e)})})).then(()=>{Ns.info("UserManager.revokeAccessToken: access token revoked successfully")})}_revokeInternal(e,t){var n=e&&e.access_token;return!n||n.indexOf(".")>=0?(Ns.debug("UserManager.revokeAccessToken: no need to revoke due to no user, token, or JWT format"),Promise.resolve(!1)):this._tokenRevocationClient.revoke(n,t).then(()=>!0)}startSilentRenew(){this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}_loadUser(){return this._userStore.get(this._userStoreKey).then(e=>e?(Ns.debug("UserManager._loadUser: user storageString loaded"),Ea.fromStorageString(e)):(Ns.debug("UserManager._loadUser: no user storageString"),null))}storeUser(e){if(e){Ns.debug("UserManager.storeUser: storing user");var t=e.toStorageString();return this._userStore.set(this._userStoreKey,t)}return Ns.debug("storeUser.storeUser: removing user"),this._userStore.remove(this._userStoreKey)}}var Ha=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new G;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(Q),Ma=new A(function(e){return e.complete()});var Ba=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Va(e,this.predicate,this.thisArg))},e}(),Va=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return i(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(x),Ua=function(){},La=void 0,Ka=["en",[["a","p"],["AM","PM"],La],[["AM","PM"],La,La],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],La,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],La,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",La,"{1} 'at' {0}",La],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"$","US Dollar",{},function(e){var t=Math.floor(Math.abs(e)),n=e.toString().replace(/^[^.]*\.?/,"").length;return 1===t&&0===n?1:5}],qa={},za=function(e){return e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency",e[e.Scientific=3]="Scientific",e}(za||(za={})),Za=function(e){return e[e.Zero=0]="Zero",e[e.One=1]="One",e[e.Two=2]="Two",e[e.Few=3]="Few",e[e.Many=4]="Many",e[e.Other=5]="Other",e}(Za||(Za={})),Wa=function(e){return e[e.Format=0]="Format",e[e.Standalone=1]="Standalone",e}(Wa||(Wa={})),Ja=function(e){return e[e.Narrow=0]="Narrow",e[e.Abbreviated=1]="Abbreviated",e[e.Wide=2]="Wide",e[e.Short=3]="Short",e}(Ja||(Ja={})),Ga=function(e){return e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e[e.Full=3]="Full",e}(Ga||(Ga={})),Ya=function(e){return e[e.Decimal=0]="Decimal",e[e.Group=1]="Group",e[e.List=2]="List",e[e.PercentSign=3]="PercentSign",e[e.PlusSign=4]="PlusSign",e[e.MinusSign=5]="MinusSign",e[e.Exponential=6]="Exponential",e[e.SuperscriptingExponent=7]="SuperscriptingExponent",e[e.PerMille=8]="PerMille",e[e[1/0]=9]="Infinity",e[e.NaN=10]="NaN",e[e.TimeSeparator=11]="TimeSeparator",e[e.CurrencyDecimal=12]="CurrencyDecimal",e[e.CurrencyGroup=13]="CurrencyGroup",e}(Ya||(Ya={})),Xa=function(e){return e[e.Sunday=0]="Sunday",e[e.Monday=1]="Monday",e[e.Tuesday=2]="Tuesday",e[e.Wednesday=3]="Wednesday",e[e.Thursday=4]="Thursday",e[e.Friday=5]="Friday",e[e.Saturday=6]="Saturday",e}(Xa||(Xa={})),Qa=function(e){return e[e.Short=0]="Short",e[e.ShortGMT=1]="ShortGMT",e[e.Long=2]="Long",e[e.Extended=3]="Extended",e}(Qa||(Qa={})),$a=function(e){return e[e.FullYear=0]="FullYear",e[e.Month=1]="Month",e[e.Date=2]="Date",e[e.Hours=3]="Hours",e[e.Minutes=4]="Minutes",e[e.Seconds=5]="Seconds",e[e.Milliseconds=6]="Milliseconds",e[e.Day=7]="Day",e}($a||($a={})),eu=function(e){return e[e.DayPeriods=0]="DayPeriods",e[e.Days=1]="Days",e[e.Months=2]="Months",e[e.Eras=3]="Eras",e}(eu||(eu={})),tu=new ue("UseV4Plurals"),nu=function(){},ru=function(e){function t(t,n){var r=e.call(this)||this;return r.locale=t,r.deprecatedPluralFn=n,r}return i(t,e),t.prototype.getPluralCategory=function(e,t){switch(this.deprecatedPluralFn?this.deprecatedPluralFn(t||this.locale,e):function(e){return function(e){var t=e.toLowerCase().replace(/_/g,"-"),n=qa[t];if(n)return n;var r=t.split("-")[0];if(n=qa[r])return n;if("en"===r)return Ka;throw new Error('Missing locale data for the locale "'+e+'".')}(e)[18]}(t||this.locale)(e)){case Za.Zero:return"zero";case Za.One:return"one";case Za.Two:return"two";case Za.Few:return"few";case Za.Many:return"many";default:return"other"}},t}(nu);function iu(e,t){t=encodeURIComponent(t);try{for(var n=s(e.split(";")),r=n.next();!r.done;r=n.next()){var i=r.value,o=i.indexOf("="),u=a(-1==o?[i,""]:[i.slice(0,o),i.slice(o+1)],2),c=u[1];if(u[0].trim()===t)return decodeURIComponent(c)}}catch(e){l={error:e}}finally{try{r&&!r.done&&(h=n.return)&&h.call(n)}finally{if(l)throw l.error}}return null;var l,h}var ou=function(){},su=new ue("DocumentToken"),au=function(){},uu=function(){},cu=function(){function e(e){var t=this;this.normalizedNames=new Map,this.lazyUpdate=null,e?this.lazyInit="string"==typeof e?function(){t.headers=new Map,e.split("\n").forEach(function(e){var n=e.indexOf(":");if(n>0){var r=e.slice(0,n),i=r.toLowerCase(),o=e.slice(n+1).trim();t.maybeSetNormalizedName(r,i),t.headers.has(i)?t.headers.get(i).push(o):t.headers.set(i,[o])}})}:function(){t.headers=new Map,Object.keys(e).forEach(function(n){var r=e[n],i=n.toLowerCase();"string"==typeof r&&(r=[r]),r.length>0&&(t.headers.set(i,r),t.maybeSetNormalizedName(n,i))})}:this.headers=new Map}return e.prototype.has=function(e){return this.init(),this.headers.has(e.toLowerCase())},e.prototype.get=function(e){this.init();var t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null},e.prototype.keys=function(){return this.init(),Array.from(this.normalizedNames.values())},e.prototype.getAll=function(e){return this.init(),this.headers.get(e.toLowerCase())||null},e.prototype.append=function(e,t){return this.clone({name:e,value:t,op:"a"})},e.prototype.set=function(e,t){return this.clone({name:e,value:t,op:"s"})},e.prototype.delete=function(e,t){return this.clone({name:e,value:t,op:"d"})},e.prototype.maybeSetNormalizedName=function(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)},e.prototype.init=function(){var t=this;this.lazyInit&&(this.lazyInit instanceof e?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(function(e){return t.applyUpdate(e)}),this.lazyUpdate=null))},e.prototype.copyFrom=function(e){var t=this;e.init(),Array.from(e.headers.keys()).forEach(function(n){t.headers.set(n,e.headers.get(n)),t.normalizedNames.set(n,e.normalizedNames.get(n))})},e.prototype.clone=function(t){var n=new e;return n.lazyInit=this.lazyInit&&this.lazyInit instanceof e?this.lazyInit:this,n.lazyUpdate=(this.lazyUpdate||[]).concat([t]),n},e.prototype.applyUpdate=function(e){var t=e.name.toLowerCase();switch(e.op){case"a":case"s":var n=e.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(e.name,t);var r=("a"===e.op?this.headers.get(t):void 0)||[];r.push.apply(r,u(n)),this.headers.set(t,r);break;case"d":var i=e.value;if(i){var o=this.headers.get(t);if(!o)return;0===(o=o.filter(function(e){return-1===i.indexOf(e)})).length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,o)}else this.headers.delete(t),this.normalizedNames.delete(t)}},e.prototype.forEach=function(e){var t=this;this.init(),Array.from(this.normalizedNames.keys()).forEach(function(n){return e(t.normalizedNames.get(n),t.headers.get(n))})},e}(),lu=function(){function e(){}return e.prototype.encodeKey=function(e){return hu(e)},e.prototype.encodeValue=function(e){return hu(e)},e.prototype.decodeKey=function(e){return decodeURIComponent(e)},e.prototype.decodeValue=function(e){return decodeURIComponent(e)},e}();function hu(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}var du=function(){function e(e){void 0===e&&(e={});var t,n,r,i=this;if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new lu,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=(t=e.fromString,n=this.encoder,r=new Map,t.length>0&&t.split("&").forEach(function(e){var t=e.indexOf("="),i=a(-1==t?[n.decodeKey(e),""]:[n.decodeKey(e.slice(0,t)),n.decodeValue(e.slice(t+1))],2),o=i[0],s=i[1],u=r.get(o)||[];u.push(s),r.set(o,u)}),r)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(function(t){var n=e.fromObject[t];i.map.set(t,Array.isArray(n)?n:[n])})):this.map=null}return e.prototype.has=function(e){return this.init(),this.map.has(e)},e.prototype.get=function(e){this.init();var t=this.map.get(e);return t?t[0]:null},e.prototype.getAll=function(e){return this.init(),this.map.get(e)||null},e.prototype.keys=function(){return this.init(),Array.from(this.map.keys())},e.prototype.append=function(e,t){return this.clone({param:e,value:t,op:"a"})},e.prototype.set=function(e,t){return this.clone({param:e,value:t,op:"s"})},e.prototype.delete=function(e,t){return this.clone({param:e,value:t,op:"d"})},e.prototype.toString=function(){var e=this;return this.init(),this.keys().map(function(t){var n=e.encoder.encodeKey(t);return e.map.get(t).map(function(t){return n+"="+e.encoder.encodeValue(t)}).join("&")}).join("&")},e.prototype.clone=function(t){var n=new e({encoder:this.encoder});return n.cloneFrom=this.cloneFrom||this,n.updates=(this.updates||[]).concat([t]),n},e.prototype.init=function(){var e=this;null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(function(t){return e.map.set(t,e.cloneFrom.map.get(t))}),this.updates.forEach(function(t){switch(t.op){case"a":case"s":var n=("a"===t.op?e.map.get(t.param):void 0)||[];n.push(t.value),e.map.set(t.param,n);break;case"d":if(void 0===t.value){e.map.delete(t.param);break}var r=e.map.get(t.param)||[],i=r.indexOf(t.value);-1!==i&&r.splice(i,1),r.length>0?e.map.set(t.param,r):e.map.delete(t.param)}}),this.cloneFrom=null)},e}();function pu(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer}function fu(e){return"undefined"!=typeof Blob&&e instanceof Blob}function gu(e){return"undefined"!=typeof FormData&&e instanceof FormData}var vu=function(){function e(e,t,n,r){var i;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase(),function(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==n?n:null,i=r):i=n,i&&(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.params&&(this.params=i.params)),this.headers||(this.headers=new cu),this.params){var o=this.params.toString();if(0===o.length)this.urlWithParams=t;else{var s=t.indexOf("?");this.urlWithParams=t+(-1===s?"?":s<t.length-1?"&":"")+o}}else this.params=new du,this.urlWithParams=t}return e.prototype.serializeBody=function(){return null===this.body?null:pu(this.body)||fu(this.body)||gu(this.body)||"string"==typeof this.body?this.body:this.body instanceof du?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()},e.prototype.detectContentTypeHeader=function(){return null===this.body?null:gu(this.body)?null:fu(this.body)?this.body.type||null:pu(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof du?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||Array.isArray(this.body)?"application/json":null},e.prototype.clone=function(t){void 0===t&&(t={});var n=t.method||this.method,r=t.url||this.url,i=t.responseType||this.responseType,o=void 0!==t.body?t.body:this.body,s=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,a=void 0!==t.reportProgress?t.reportProgress:this.reportProgress,u=t.headers||this.headers,c=t.params||this.params;return void 0!==t.setHeaders&&(u=Object.keys(t.setHeaders).reduce(function(e,n){return e.set(n,t.setHeaders[n])},u)),t.setParams&&(c=Object.keys(t.setParams).reduce(function(e,n){return e.set(n,t.setParams[n])},c)),new e(n,r,o,{params:c,headers:u,reportProgress:a,responseType:i,withCredentials:s})},e}(),yu=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(yu||(yu={})),mu=function(){return function(e,t,n){void 0===t&&(t=200),void 0===n&&(n="OK"),this.headers=e.headers||new cu,this.status=void 0!==e.status?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}}(),bu=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.type=yu.ResponseHeader,n}return i(t,e),t.prototype.clone=function(e){return void 0===e&&(e={}),new t({headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})},t}(mu),wu=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,t)||this;return n.type=yu.Response,n.body=void 0!==t.body?t.body:null,n}return i(t,e),t.prototype.clone=function(e){return void 0===e&&(e={}),new t({body:void 0!==e.body?e.body:this.body,headers:e.headers||this.headers,status:void 0!==e.status?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})},t}(mu),_u=function(e){function t(t){var n=e.call(this,t,0,"Unknown Error")||this;return n.name="HttpErrorResponse",n.ok=!1,n.message=n.status>=200&&n.status<300?"Http failure during parsing for "+(t.url||"(unknown url)"):"Http failure response for "+(t.url||"(unknown url)")+": "+t.status+" "+t.statusText,n.error=t.error||null,n}return i(t,e),t}(mu);function Su(e,t){return{body:t,headers:e.headers,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials}}var Eu=function(){function e(e){this.handler=e}return e.prototype.request=function(e,t,n){var r,i=this;if(void 0===n&&(n={}),e instanceof vu)r=e;else{var o;o=n.headers instanceof cu?n.headers:new cu(n.headers);var s=void 0;n.params&&(s=n.params instanceof du?n.params:new du({fromObject:n.params})),r=new vu(e,t,void 0!==n.body?n.body:null,{headers:o,params:s,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}var a=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,r,i=e[e.length-1];switch(T(i)?e.pop():i=void 0,e.length){case 0:return function(e){return e?function(e){return new A(function(t){return e.schedule(function(){return t.complete()})})}(e):Ma}(i);case 1:return i?K(e,i):(n=e[0],(r=new A(function(e){e.next(n),e.complete()}))._isScalar=!0,r.value=n,r);default:return K(e,i)}}(r).pipe(q(function(e){return i.handler.handle(e)},void 0,1));if(e instanceof vu||"events"===n.observe)return a;var u,c=a.pipe((u=function(e){return e instanceof wu},function(e){return e.lift(new Ba(u,void 0))}));switch(n.observe||"body"){case"body":switch(r.responseType){case"arraybuffer":return c.pipe(V(function(e){if(null!==e.body&&!(e.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return e.body}));case"blob":return c.pipe(V(function(e){if(null!==e.body&&!(e.body instanceof Blob))throw new Error("Response is not a Blob.");return e.body}));case"text":return c.pipe(V(function(e){if(null!==e.body&&"string"!=typeof e.body)throw new Error("Response is not a string.");return e.body}));case"json":default:return c.pipe(V(function(e){return e.body}))}case"response":return c;default:throw new Error("Unreachable: unhandled observe type "+n.observe+"}")}},e.prototype.delete=function(e,t){return void 0===t&&(t={}),this.request("DELETE",e,t)},e.prototype.get=function(e,t){return void 0===t&&(t={}),this.request("GET",e,t)},e.prototype.head=function(e,t){return void 0===t&&(t={}),this.request("HEAD",e,t)},e.prototype.jsonp=function(e,t){return this.request("JSONP",e,{params:(new du).append(t,"JSONP_CALLBACK"),observe:"body",responseType:"json"})},e.prototype.options=function(e,t){return void 0===t&&(t={}),this.request("OPTIONS",e,t)},e.prototype.patch=function(e,t,n){return void 0===n&&(n={}),this.request("PATCH",e,Su(n,t))},e.prototype.post=function(e,t,n){return void 0===n&&(n={}),this.request("POST",e,Su(n,t))},e.prototype.put=function(e,t,n){return void 0===n&&(n={}),this.request("PUT",e,Su(n,t))},e}(),xu=function(){function e(e,t){this.next=e,this.interceptor=t}return e.prototype.handle=function(e){return this.interceptor.intercept(e,this.next)},e}(),Fu=new ue("HTTP_INTERCEPTORS"),Cu=function(){function e(){}return e.prototype.intercept=function(e,t){return t.handle(e)},e}(),Au=/^\)\]\}',?\n/,ku=function(){},Tu=function(){function e(){}return e.prototype.build=function(){return new XMLHttpRequest},e}(),Pu=function(){function e(e){this.xhrFactory=e}return e.prototype.handle=function(e){var t=this;if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without JsonpClientModule installed.");return new A(function(n){var r=t.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach(function(e,t){return r.setRequestHeader(e,t.join(","))}),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){var i=e.detectContentTypeHeader();null!==i&&r.setRequestHeader("Content-Type",i)}if(e.responseType){var o=e.responseType.toLowerCase();r.responseType="json"!==o?o:"text"}var s=e.serializeBody(),a=null,u=function(){if(null!==a)return a;var t=1223===r.status?204:r.status,n=r.statusText||"OK",i=new cu(r.getAllResponseHeaders()),o=function(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(r)||e.url;return a=new bu({headers:i,status:t,statusText:n,url:o})},c=function(){var t=u(),i=t.headers,o=t.status,s=t.statusText,a=t.url,c=null;204!==o&&(c=void 0===r.response?r.responseText:r.response),0===o&&(o=c?200:0);var l=o>=200&&o<300;if("json"===e.responseType&&"string"==typeof c){var h=c;c=c.replace(Au,"");try{c=""!==c?JSON.parse(c):null}catch(e){c=h,l&&(l=!1,c={error:e,text:c})}}l?(n.next(new wu({body:c,headers:i,status:o,statusText:s,url:a||void 0})),n.complete()):n.error(new _u({error:c,headers:i,status:o,statusText:s,url:a||void 0}))},l=function(e){var t=new _u({error:e,status:r.status||0,statusText:r.statusText||"Unknown Error"});n.error(t)},h=!1,d=function(t){h||(n.next(u()),h=!0);var i={type:yu.DownloadProgress,loaded:t.loaded};t.lengthComputable&&(i.total=t.total),"text"===e.responseType&&r.responseText&&(i.partialText=r.responseText),n.next(i)},p=function(e){var t={type:yu.UploadProgress,loaded:e.loaded};e.lengthComputable&&(t.total=e.total),n.next(t)};return r.addEventListener("load",c),r.addEventListener("error",l),e.reportProgress&&(r.addEventListener("progress",d),null!==s&&r.upload&&r.upload.addEventListener("progress",p)),r.send(s),n.next({type:yu.Sent}),function(){r.removeEventListener("error",l),r.removeEventListener("load",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==s&&r.upload&&r.upload.removeEventListener("progress",p)),r.abort()}})},e}(),Du=new ue("XSRF_COOKIE_NAME"),Iu=new ue("XSRF_HEADER_NAME"),Nu=function(){},Ru=function(){function e(e,t,n){this.doc=e,this.platform=t,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}return e.prototype.getToken=function(){if("server"===this.platform)return null;var e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=iu(e,this.cookieName),this.lastCookieString=e),this.lastToken},e}(),Ou=function(){function e(e,t){this.tokenService=e,this.headerName=t}return e.prototype.intercept=function(e,t){var n=e.url.toLowerCase();if("GET"===e.method||"HEAD"===e.method||n.startsWith("http://")||n.startsWith("https://"))return t.handle(e);var r=this.tokenService.getToken();return null===r||e.headers.has(this.headerName)||(e=e.clone({headers:e.headers.set(this.headerName,r)})),t.handle(e)},e}(),ju=function(){function e(e,t){this.backend=e,this.injector=t,this.chain=null}return e.prototype.handle=function(e){if(null===this.chain){var t=this.injector.get(Fu,[]);this.chain=t.reduceRight(function(e,t){return new xu(e,t)},this.backend)}return this.chain.handle(e)},e}(),Hu=function(){function e(){}return e.disable=function(){return{ngModule:e,providers:[{provide:Ou,useClass:Cu}]}},e.withOptions=function(t){return void 0===t&&(t={}),{ngModule:e,providers:[t.cookieName?{provide:Du,useValue:t.cookieName}:[],t.headerName?{provide:Iu,useValue:t.headerName}:[]]}},e}(),Mu=function(){},Bu=function(){function e(e){if(this.http=e,this.identity=null,this._identitySource=new Q,this.identity$=this._identitySource.asObservable(),this.user=null,this._userSource=new Ha(null),this.user$=this._userSource.asObservable(),!window.ngAuthOidcConfig)throw new Error("Missing configuration! Please provide one.");this.usrMngrSettings=Object.assign({userStore:new Ms({store:window.localStorage})},window.ngAuthOidcConfig),this.manager=new ja(this.usrMngrSettings),this.subscribeManagerEvents()}return e.prototype.isLoggedIn=function(){return null!==this.identity&&!this.identity.expired},e.prototype.getAuthorizationHeaderValue=function(){return this.identity.token_type+" "+this.identity.access_token},e.prototype.startAuthentication=function(){return-1===window.location.href.indexOf("login.html")&&localStorage.setItem("redirectUrl",window.location.href),this.manager.signinRedirect()},e.prototype.completeAuthentication=function(){var e=this;return console.log("auth-completed"),this.manager.signinRedirectCallback().then(function(t){e.setIdentity(t),window.location.href=localStorage.getItem("redirectUrl")||"/"}).catch(function(e){})},e.prototype.verifyAuthentication=function(){var e=this;return new Promise(function(t,n){e.manager.getUser().then(function(r){r?(console.log("manager.getUser with identity"),e.setIdentity(r),t(r)):-1===window.location.pathname.indexOf("auth-completed")&&(console.log("manager.getUser without identity and not on auth-completed"),console.log("trying manager.signinSilent to check if user is authenticated"),e.tryRetrieveIdentity(t,n))}).catch(function(e){n(new Error("Unauthorized request"))})})},e.prototype.getUserInfo=function(){var e=this;this.http.get(this.usrMngrSettings.authority+"/connect/userinfo").subscribe(function(t){e.user=t,e._userSource.next(e.user)},function(e){return console.log(e)})},e.prototype.logout=function(){return this.manager.signoutRedirect()},e.prototype.subscribeManagerEvents=function(){var e=this;this.manager.events.addUserLoaded(function(t){console.log("User Loaded Event Handler"),e.setIdentity(t),e._identitySource.next(t)}),this.manager.events.addAccessTokenExpired(function(){return e.logout()})},e.prototype.setIdentity=function(e){var t=this;this.identity=e,e&&setTimeout(function(){return t.getUserInfo()},0)},e.prototype.tryRetrieveIdentity=function(e,t){var n=this;this.manager.signinSilent().then(function(r){if(r)return n.setIdentity(r),e(r);t(new Error("Unauthorized request"))}).catch(function(e){t(new Error("Unauthorized request"))})},e.ngInjectableDef=ae({factory:function(){return new e(Ge(Eu))},token:e,providedIn:"root"}),e}(),Vu=function(){function e(e){this.auth=e,this.onVerified=new Nt,this.onRefreshed=new Nt}return e.prototype.ngOnInit=function(){var e=this;this.auth.verifyAuthentication().then(function(t){e.onVerified.emit({identity:t,headers:{authorization:e.auth.getAuthorizationHeaderValue()}}),e.auth.identity$.subscribe(function(t){e.onRefreshed.emit({identity:t,headers:{authorization:e.auth.getAuthorizationHeaderValue()}})})}).catch(function(t){console.log(t),-1===window.location.href.indexOf(e.signInUrl||"login.html")&&localStorage.setItem("redirectUrl",window.location.href),window.location.href=e.signInUrl||"/login.html"})},e}(),Uu=function(){function e(e){this.auth=e}return e.prototype.ngOnInit=function(){this.auth.completeAuthentication()},e}(),Lu=function(){function e(e){this.authService=e,this.loggingIn=!1}return e.prototype.ngOnInit=function(){},e.prototype.signIn=function(){this.loggingIn=!0,this.authService.startAuthentication()},e}(),Ku=function(){function e(e){this.authService=e,this.signingOut=!1}return e.prototype.ngOnInit=function(){},e.prototype.signOut=function(){this.signingOut=!0,this.authService.logout()},e}(),qu=function(){function e(e){this.injector=e;var t=xs(Vu,{injector:e});customElements.define("auth-guard",t);var n=xs(Lu,{injector:e});customElements.define("auth-login",n);var r=xs(Uu,{injector:e});customElements.define("auth-completed",r);var i=xs(Ku,{injector:e});customElements.define("auth-signout",i)}return e.prototype.ngDoBootstrap=function(){},e}(),zu=Cr({encapsulation:1,styles:[],data:{}});function Zu(e){return ao(0,[],null,null)}var Wu=vi("app-ng-auth-guard",Vu,function(e){return ao(0,[(e()(),Qr(0,0,null,null,1,"app-ng-auth-guard",[],null,null,null,Zu,zu)),Bi(1,114688,null,0,Vu,[Bu],null,null)],function(e,t){e(t,1,0)},null)},{signInUrl:"signInUrl"},{onVerified:"onVerified",onRefreshed:"onRefreshed"},[]),Ju=Cr({encapsulation:1,styles:[],data:{}});function Gu(e){return ao(0,[{nodeIndex:-1,parent:null,renderParent:null,bindingIndex:-1,outputIndex:-1,checkIndex:-1,flags:8,childFlags:0,directChildFlags:0,childMatchedQueries:0,matchedQueries:{},matchedQueryIds:0,references:{},ngContentIndex:null,childCount:0,bindings:[],bindingFlags:0,outputs:[],element:null,provider:null,text:null,query:null,ngContent:{index:0}}],null,null)}var Yu=vi("app-ng-auth-completed",Uu,function(e){return ao(0,[(e()(),Qr(0,0,null,null,1,"app-ng-auth-completed",[],null,null,null,Gu,Ju)),Bi(1,114688,null,0,Uu,[Bu],null,null)],function(e,t){e(t,1,0)},null)},{},{},["*"]),Xu=Cr({encapsulation:1,styles:[],data:{}});function Qu(e){return ao(0,[(e()(),Qr(0,0,null,null,1,"button",[["class","btn btn-default"],["type","button"]],[[8,"disabled",0]],[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.signIn()&&r),r},null,null)),(e()(),io(-1,null,["Sign in"]))],null,function(e,t){e(t,0,0,t.component.loggingIn)})}var $u=vi("app-ng-auth-login",Lu,function(e){return ao(0,[(e()(),Qr(0,0,null,null,1,"app-ng-auth-login",[],null,null,null,Qu,Xu)),Bi(1,114688,null,0,Lu,[Bu],null,null)],function(e,t){e(t,1,0)},null)},{},{},[]),ec=Cr({encapsulation:1,styles:[],data:{}});function tc(e){return ao(0,[(e()(),Qr(0,0,null,null,1,"button",[["class","btn btn-default"],["type","button"]],[[8,"disabled",0]],[[null,"click"]],function(e,t,n){var r=!0;return"click"===t&&(r=!1!==e.component.signOut()&&r),r},null,null)),(e()(),io(-1,null,["Sign out"]))],null,function(e,t){e(t,0,0,t.component.signingOut)})}var nc=vi("app-ng-auth-signout",Ku,function(e){return ao(0,[(e()(),Qr(0,0,null,null,1,"app-ng-auth-signout",[],null,null,null,tc,ec)),Bi(1,114688,null,0,Ku,[Bu],null,null)],function(e,t){e(t,1,0)},null)},{},{},[]),rc=null;function ic(){return rc}var oc,sc={class:"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},ac={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},uc={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"};ve.Node&&(oc=ve.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))});var cc,lc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){throw new Error("parse not implemented")},t.makeCurrent=function(){var e;e=new t,rc||(rc=e)},t.prototype.hasProperty=function(e,t){return t in e},t.prototype.setProperty=function(e,t,n){e[t]=n},t.prototype.getProperty=function(e,t){return e[t]},t.prototype.invoke=function(e,t,n){var r;(r=e)[t].apply(r,u(n))},t.prototype.logError=function(e){window.console&&(console.error?console.error(e):console.log(e))},t.prototype.log=function(e){window.console&&window.console.log&&window.console.log(e)},t.prototype.logGroup=function(e){window.console&&window.console.group&&window.console.group(e)},t.prototype.logGroupEnd=function(){window.console&&window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(t.prototype,"attrToPropMap",{get:function(){return sc},enumerable:!0,configurable:!0}),t.prototype.contains=function(e,t){return oc.call(e,t)},t.prototype.querySelector=function(e,t){return e.querySelector(t)},t.prototype.querySelectorAll=function(e,t){return e.querySelectorAll(t)},t.prototype.on=function(e,t,n){e.addEventListener(t,n,!1)},t.prototype.onAndCancel=function(e,t,n){return e.addEventListener(t,n,!1),function(){e.removeEventListener(t,n,!1)}},t.prototype.dispatchEvent=function(e,t){e.dispatchEvent(t)},t.prototype.createMouseEvent=function(e){var t=this.getDefaultDocument().createEvent("MouseEvent");return t.initEvent(e,!0,!0),t},t.prototype.createEvent=function(e){var t=this.getDefaultDocument().createEvent("Event");return t.initEvent(e,!0,!0),t},t.prototype.preventDefault=function(e){e.preventDefault(),e.returnValue=!1},t.prototype.isPrevented=function(e){return e.defaultPrevented||null!=e.returnValue&&!e.returnValue},t.prototype.getInnerHTML=function(e){return e.innerHTML},t.prototype.getTemplateContent=function(e){return"content"in e&&this.isTemplateElement(e)?e.content:null},t.prototype.getOuterHTML=function(e){return e.outerHTML},t.prototype.nodeName=function(e){return e.nodeName},t.prototype.nodeValue=function(e){return e.nodeValue},t.prototype.type=function(e){return e.type},t.prototype.content=function(e){return this.hasProperty(e,"content")?e.content:e},t.prototype.firstChild=function(e){return e.firstChild},t.prototype.nextSibling=function(e){return e.nextSibling},t.prototype.parentElement=function(e){return e.parentNode},t.prototype.childNodes=function(e){return e.childNodes},t.prototype.childNodesAsList=function(e){for(var t=e.childNodes,n=new Array(t.length),r=0;r<t.length;r++)n[r]=t[r];return n},t.prototype.clearNodes=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},t.prototype.appendChild=function(e,t){e.appendChild(t)},t.prototype.removeChild=function(e,t){e.removeChild(t)},t.prototype.replaceChild=function(e,t,n){e.replaceChild(t,n)},t.prototype.remove=function(e){return e.parentNode&&e.parentNode.removeChild(e),e},t.prototype.insertBefore=function(e,t,n){e.insertBefore(n,t)},t.prototype.insertAllBefore=function(e,t,n){n.forEach(function(n){return e.insertBefore(n,t)})},t.prototype.insertAfter=function(e,t,n){e.insertBefore(n,t.nextSibling)},t.prototype.setInnerHTML=function(e,t){e.innerHTML=t},t.prototype.getText=function(e){return e.textContent},t.prototype.setText=function(e,t){e.textContent=t},t.prototype.getValue=function(e){return e.value},t.prototype.setValue=function(e,t){e.value=t},t.prototype.getChecked=function(e){return e.checked},t.prototype.setChecked=function(e,t){e.checked=t},t.prototype.createComment=function(e){return this.getDefaultDocument().createComment(e)},t.prototype.createTemplate=function(e){var t=this.getDefaultDocument().createElement("template");return t.innerHTML=e,t},t.prototype.createElement=function(e,t){return(t=t||this.getDefaultDocument()).createElement(e)},t.prototype.createElementNS=function(e,t,n){return(n=n||this.getDefaultDocument()).createElementNS(e,t)},t.prototype.createTextNode=function(e,t){return(t=t||this.getDefaultDocument()).createTextNode(e)},t.prototype.createScriptTag=function(e,t,n){var r=(n=n||this.getDefaultDocument()).createElement("SCRIPT");return r.setAttribute(e,t),r},t.prototype.createStyleElement=function(e,t){var n=(t=t||this.getDefaultDocument()).createElement("style");return this.appendChild(n,this.createTextNode(e,t)),n},t.prototype.createShadowRoot=function(e){return e.createShadowRoot()},t.prototype.getShadowRoot=function(e){return e.shadowRoot},t.prototype.getHost=function(e){return e.host},t.prototype.clone=function(e){return e.cloneNode(!0)},t.prototype.getElementsByClassName=function(e,t){return e.getElementsByClassName(t)},t.prototype.getElementsByTagName=function(e,t){return e.getElementsByTagName(t)},t.prototype.classList=function(e){return Array.prototype.slice.call(e.classList,0)},t.prototype.addClass=function(e,t){e.classList.add(t)},t.prototype.removeClass=function(e,t){e.classList.remove(t)},t.prototype.hasClass=function(e,t){return e.classList.contains(t)},t.prototype.setStyle=function(e,t,n){e.style[t]=n},t.prototype.removeStyle=function(e,t){e.style[t]=""},t.prototype.getStyle=function(e,t){return e.style[t]},t.prototype.hasStyle=function(e,t,n){var r=this.getStyle(e,t)||"";return n?r==n:r.length>0},t.prototype.tagName=function(e){return e.tagName},t.prototype.attributeMap=function(e){for(var t=new Map,n=e.attributes,r=0;r<n.length;r++){var i=n.item(r);t.set(i.name,i.value)}return t},t.prototype.hasAttribute=function(e,t){return e.hasAttribute(t)},t.prototype.hasAttributeNS=function(e,t,n){return e.hasAttributeNS(t,n)},t.prototype.getAttribute=function(e,t){return e.getAttribute(t)},t.prototype.getAttributeNS=function(e,t,n){return e.getAttributeNS(t,n)},t.prototype.setAttribute=function(e,t,n){e.setAttribute(t,n)},t.prototype.setAttributeNS=function(e,t,n,r){e.setAttributeNS(t,n,r)},t.prototype.removeAttribute=function(e,t){e.removeAttribute(t)},t.prototype.removeAttributeNS=function(e,t,n){e.removeAttributeNS(t,n)},t.prototype.templateAwareRoot=function(e){return this.isTemplateElement(e)?this.content(e):e},t.prototype.createHtmlDocument=function(){return document.implementation.createHTMLDocument("fakeTitle")},t.prototype.getDefaultDocument=function(){return document},t.prototype.getBoundingClientRect=function(e){try{return e.getBoundingClientRect()}catch(e){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}},t.prototype.getTitle=function(e){return e.title},t.prototype.setTitle=function(e,t){e.title=t||""},t.prototype.elementMatches=function(e,t){return!!this.isElementNode(e)&&(e.matches&&e.matches(t)||e.msMatchesSelector&&e.msMatchesSelector(t)||e.webkitMatchesSelector&&e.webkitMatchesSelector(t))},t.prototype.isTemplateElement=function(e){return this.isElementNode(e)&&"TEMPLATE"===e.nodeName},t.prototype.isTextNode=function(e){return e.nodeType===Node.TEXT_NODE},t.prototype.isCommentNode=function(e){return e.nodeType===Node.COMMENT_NODE},t.prototype.isElementNode=function(e){return e.nodeType===Node.ELEMENT_NODE},t.prototype.hasShadowRoot=function(e){return null!=e.shadowRoot&&e instanceof HTMLElement},t.prototype.isShadowRoot=function(e){return e instanceof DocumentFragment},t.prototype.importIntoDoc=function(e){return document.importNode(this.templateAwareRoot(e),!0)},t.prototype.adoptNode=function(e){return document.adoptNode(e)},t.prototype.getHref=function(e){return e.getAttribute("href")},t.prototype.getEventKey=function(e){var t=e.key;if(null==t){if(null==(t=e.keyIdentifier))return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),3===e.location&&uc.hasOwnProperty(t)&&(t=uc[t]))}return ac[t]||t},t.prototype.getGlobalEventTarget=function(e,t){return"window"===t?window:"document"===t?e:"body"===t?e.body:null},t.prototype.getHistory=function(){return window.history},t.prototype.getLocation=function(){return window.location},t.prototype.getBaseHref=function(e){var t,n=hc||(hc=document.querySelector("base"))?hc.getAttribute("href"):null;return null==n?null:(t=n,cc||(cc=document.createElement("a")),cc.setAttribute("href",t),"/"===cc.pathname.charAt(0)?cc.pathname:"/"+cc.pathname)},t.prototype.resetBaseElement=function(){hc=null},t.prototype.getUserAgent=function(){return window.navigator.userAgent},t.prototype.setData=function(e,t,n){this.setAttribute(e,"data-"+t,n)},t.prototype.getData=function(e,t){return this.getAttribute(e,"data-"+t)},t.prototype.getComputedStyle=function(e){return getComputedStyle(e)},t.prototype.supportsWebAnimation=function(){return"function"==typeof Element.prototype.animate},t.prototype.performanceNow=function(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()},t.prototype.supportsCookies=function(){return!0},t.prototype.getCookie=function(e){return iu(document.cookie,e)},t.prototype.setCookie=function(e,t){document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)},t}(function(e){function t(){var t=e.call(this)||this;t._animationPrefix=null,t._transitionEnd=null;try{var n=t.createElement("div",document);if(null!=t.getStyle(n,"animationName"))t._animationPrefix="";else for(var r=["Webkit","Moz","O","ms"],i=0;i<r.length;i++)if(null!=t.getStyle(n,r[i]+"AnimationName")){t._animationPrefix="-"+r[i].toLowerCase()+"-";break}var o={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};Object.keys(o).forEach(function(e){null!=t.getStyle(n,e)&&(t._transitionEnd=o[e])})}catch(e){t._animationPrefix=null,t._transitionEnd=null}return t}return i(t,e),t.prototype.getDistributedNodes=function(e){return e.getDistributedNodes()},t.prototype.resolveAndSetHref=function(e,t,n){e.href=null==n?t:t+"/../"+n},t.prototype.supportsDOMEvents=function(){return!0},t.prototype.supportsNativeShadowDOM=function(){return"function"==typeof document.body.createShadowRoot},t.prototype.getAnimationPrefix=function(){return this._animationPrefix?this._animationPrefix:""},t.prototype.getTransitionEnd=function(){return this._transitionEnd?this._transitionEnd:""},t.prototype.supportsAnimation=function(){return null!=this._animationPrefix&&null!=this._transitionEnd},t}(function(){function e(){this.resourceLoaderType=null}return Object.defineProperty(e.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(e){this._attrToPropMap=e},enumerable:!0,configurable:!0}),e}())),hc=null,dc=su;function pc(){return!!window.history.pushState}var fc=function(e){function t(t){var n=e.call(this)||this;return n._doc=t,n._init(),n}return i(t,e),t.prototype._init=function(){this.location=ic().getLocation(),this._history=ic().getHistory()},t.prototype.getBaseHrefFromDOM=function(){return ic().getBaseHref(this._doc)},t.prototype.onPopState=function(e){ic().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",e,!1)},t.prototype.onHashChange=function(e){ic().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",e,!1)},Object.defineProperty(t.prototype,"pathname",{get:function(){return this.location.pathname},set:function(e){this.location.pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"search",{get:function(){return this.location.search},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hash",{get:function(){return this.location.hash},enumerable:!0,configurable:!0}),t.prototype.pushState=function(e,t,n){pc()?this._history.pushState(e,t,n):this.location.hash=n},t.prototype.replaceState=function(e,t,n){pc()?this._history.replaceState(e,t,n):this.location.hash=n},t.prototype.forward=function(){this._history.forward()},t.prototype.back=function(){this._history.back()},t.ctorParameters=function(){return[{type:void 0,decorators:[{type:Fe,args:[dc]}]}]},t}(Ua),gc=function(){function e(e){this._doc=e,this._dom=ic()}return e.prototype.addTag=function(e,t){return void 0===t&&(t=!1),e?this._getOrCreateElement(e,t):null},e.prototype.addTags=function(e,t){var n=this;return void 0===t&&(t=!1),e?e.reduce(function(e,r){return r&&e.push(n._getOrCreateElement(r,t)),e},[]):[]},e.prototype.getTag=function(e){return e&&this._dom.querySelector(this._doc,"meta["+e+"]")||null},e.prototype.getTags=function(e){if(!e)return[];var t=this._dom.querySelectorAll(this._doc,"meta["+e+"]");return t?[].slice.call(t):[]},e.prototype.updateTag=function(e,t){if(!e)return null;t=t||this._parseSelector(e);var n=this.getTag(t);return n?this._setMetaElementAttributes(e,n):this._getOrCreateElement(e,!0)},e.prototype.removeTag=function(e){this.removeTagElement(this.getTag(e))},e.prototype.removeTagElement=function(e){e&&this._dom.remove(e)},e.prototype._getOrCreateElement=function(e,t){if(void 0===t&&(t=!1),!t){var n=this._parseSelector(e),r=this.getTag(n);if(r&&this._containsAttributes(e,r))return r}var i=this._dom.createElement("meta");this._setMetaElementAttributes(e,i);var o=this._dom.getElementsByTagName(this._doc,"head")[0];return this._dom.appendChild(o,i),i},e.prototype._setMetaElementAttributes=function(e,t){var n=this;return Object.keys(e).forEach(function(r){return n._dom.setAttribute(t,r,e[r])}),t},e.prototype._parseSelector=function(e){var t=e.name?"name":"property";return t+'="'+e[t]+'"'},e.prototype._containsAttributes=function(e,t){var n=this;return Object.keys(e).every(function(r){return n._dom.getAttribute(t,r)===e[r]})},e}(),vc=new ue("TRANSITION_ID"),yc=[{provide:at,useFactory:function(e,t,n){return function(){n.get(ut).donePromise.then(function(){var n=ic();Array.prototype.slice.apply(n.querySelectorAll(t,"style[ng-transition]")).filter(function(t){return n.getAttribute(t,"ng-transition")===e}).forEach(function(e){return n.remove(e)})})}},deps:[vc,dc,Ne],multi:!0}],mc=function(){function e(){}return e.init=function(){var t;t=new e,qt=t},e.prototype.addToWindow=function(e){ve.getAngularTestability=function(t,n){void 0===n&&(n=!0);var r=e.findTestabilityInTree(t,n);if(null==r)throw new Error("Could not find testability for element.");return r},ve.getAllAngularTestabilities=function(){return e.getAllTestabilities()},ve.getAllAngularRootElements=function(){return e.getAllRootElements()},ve.frameworkStabilizers||(ve.frameworkStabilizers=[]),ve.frameworkStabilizers.push(function(e){var t=ve.getAllAngularTestabilities(),n=t.length,r=!1,i=function(t){r=r||t,0==--n&&e(r)};t.forEach(function(e){e.whenStable(i)})})},e.prototype.findTestabilityInTree=function(e,t,n){if(null==t)return null;var r=e.getTestability(t);return null!=r?r:n?ic().isShadowRoot(t)?this.findTestabilityInTree(e,ic().getHost(t),!0):this.findTestabilityInTree(e,ic().parentElement(t),!0):null},e}(),bc=function(){function e(e){this._doc=e}return e.prototype.getTitle=function(){return ic().getTitle(this._doc)},e.prototype.setTitle=function(e){ic().setTitle(this._doc,e)},e}();function wc(e,t){"undefined"!=typeof COMPILED&&COMPILED||((ve.ng=ve.ng||{})[e]=t)}var _c={ApplicationRef:en,NgZone:Rt};function Sc(e){return hn(e)}var Ec=new ue("EventManagerPlugins"),xc=function(){function e(e,t){var n=this;this._zone=t,this._eventNameToPlugin=new Map,e.forEach(function(e){return e.manager=n}),this._plugins=e.slice().reverse()}return e.prototype.addEventListener=function(e,t,n){return this._findPluginFor(t).addEventListener(e,t,n)},e.prototype.addGlobalEventListener=function(e,t,n){return this._findPluginFor(t).addGlobalEventListener(e,t,n)},e.prototype.getZone=function(){return this._zone},e.prototype._findPluginFor=function(e){var t=this._eventNameToPlugin.get(e);if(t)return t;for(var n=this._plugins,r=0;r<n.length;r++){var i=n[r];if(i.supports(e))return this._eventNameToPlugin.set(e,i),i}throw new Error("No event manager plugin found for event "+e)},e}(),Fc=function(){function e(e){this._doc=e}return e.prototype.addGlobalEventListener=function(e,t,n){var r=ic().getGlobalEventTarget(this._doc,e);if(!r)throw new Error("Unsupported event target "+r+" for event "+t);return this.addEventListener(r,t,n)},e}(),Cc=function(){function e(){this._stylesSet=new Set}return e.prototype.addStyles=function(e){var t=this,n=new Set;e.forEach(function(e){t._stylesSet.has(e)||(t._stylesSet.add(e),n.add(e))}),this.onStylesAdded(n)},e.prototype.onStylesAdded=function(e){},e.prototype.getAllStyles=function(){return Array.from(this._stylesSet)},e}(),Ac=function(e){function t(t){var n=e.call(this)||this;return n._doc=t,n._hostNodes=new Set,n._styleNodes=new Set,n._hostNodes.add(t.head),n}return i(t,e),t.prototype._addStylesToHost=function(e,t){var n=this;e.forEach(function(e){var r=n._doc.createElement("style");r.textContent=e,n._styleNodes.add(t.appendChild(r))})},t.prototype.addHost=function(e){this._addStylesToHost(this._stylesSet,e),this._hostNodes.add(e)},t.prototype.removeHost=function(e){this._hostNodes.delete(e)},t.prototype.onStylesAdded=function(e){var t=this;this._hostNodes.forEach(function(n){return t._addStylesToHost(e,n)})},t.prototype.ngOnDestroy=function(){this._styleNodes.forEach(function(e){return ic().remove(e)})},t}(Cc),kc={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Tc=/%COMP%/g,Pc="_nghost-%COMP%",Dc="_ngcontent-%COMP%";function Ic(e,t,n){for(var r=0;r<t.length;r++){var i=t[r];Array.isArray(i)?Ic(e,i,n):(i=i.replace(Tc,e),n.push(i))}return n}function Nc(e){return function(t){!1===e(t)&&(t.preventDefault(),t.returnValue=!1)}}var Rc=function(){function e(e,t){this.eventManager=e,this.sharedStylesHost=t,this.rendererByCompId=new Map,this.defaultRenderer=new Oc(e)}return e.prototype.createRenderer=function(e,t){if(!e||!t)return this.defaultRenderer;switch(t.encapsulation){case Ye.Emulated:var n=this.rendererByCompId.get(t.id);return n||(n=new Bc(this.eventManager,this.sharedStylesHost,t),this.rendererByCompId.set(t.id,n)),n.applyToHost(e),n;case Ye.Native:return new Vc(this.eventManager,this.sharedStylesHost,e,t);default:if(!this.rendererByCompId.has(t.id)){var r=Ic(t.id,t.styles,[]);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(t.id,this.defaultRenderer)}return this.defaultRenderer}},e.prototype.begin=function(){},e.prototype.end=function(){},e}(),Oc=function(){function e(e){this.eventManager=e,this.data=Object.create(null)}return e.prototype.destroy=function(){},e.prototype.createElement=function(e,t){return t?document.createElementNS(kc[t],e):document.createElement(e)},e.prototype.createComment=function(e){return document.createComment(e)},e.prototype.createText=function(e){return document.createTextNode(e)},e.prototype.appendChild=function(e,t){e.appendChild(t)},e.prototype.insertBefore=function(e,t,n){e&&e.insertBefore(t,n)},e.prototype.removeChild=function(e,t){e&&e.removeChild(t)},e.prototype.selectRootElement=function(e){var t="string"==typeof e?document.querySelector(e):e;if(!t)throw new Error('The selector "'+e+'" did not match any elements');return t.textContent="",t},e.prototype.parentNode=function(e){return e.parentNode},e.prototype.nextSibling=function(e){return e.nextSibling},e.prototype.setAttribute=function(e,t,n,r){if(r){t=r+":"+t;var i=kc[r];i?e.setAttributeNS(i,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)},e.prototype.removeAttribute=function(e,t,n){if(n){var r=kc[n];r?e.removeAttributeNS(r,t):e.removeAttribute(n+":"+t)}else e.removeAttribute(t)},e.prototype.addClass=function(e,t){e.classList.add(t)},e.prototype.removeClass=function(e,t){e.classList.remove(t)},e.prototype.setStyle=function(e,t,n,r){r&rn.DashCase?e.style.setProperty(t,n,r&rn.Important?"important":""):e.style[t]=n},e.prototype.removeStyle=function(e,t,n){n&rn.DashCase?e.style.removeProperty(t):e.style[t]=""},e.prototype.setProperty=function(e,t,n){Hc(t,"property"),e[t]=n},e.prototype.setValue=function(e,t){e.nodeValue=t},e.prototype.listen=function(e,t,n){return Hc(t,"listener"),"string"==typeof e?this.eventManager.addGlobalEventListener(e,t,Nc(n)):this.eventManager.addEventListener(e,t,Nc(n))},e}(),jc="@".charCodeAt(0);function Hc(e,t){if(e.charCodeAt(0)===jc)throw new Error("Found the synthetic "+t+" "+e+'. Please include either "BrowserAnimationsModule" or "NoopAnimationsModule" in your application.')}var Mc,Bc=function(e){function t(t,n,r){var i=e.call(this,t)||this;i.component=r;var o=Ic(r.id,r.styles,[]);return n.addStyles(o),i.contentAttr=Dc.replace(Tc,r.id),i.hostAttr=Pc.replace(Tc,r.id),i}return i(t,e),t.prototype.applyToHost=function(t){e.prototype.setAttribute.call(this,t,this.hostAttr,"")},t.prototype.createElement=function(t,n){var r=e.prototype.createElement.call(this,t,n);return e.prototype.setAttribute.call(this,r,this.contentAttr,""),r},t}(Oc),Vc=function(e){function t(t,n,r,i){var o=e.call(this,t)||this;o.sharedStylesHost=n,o.hostEl=r,o.component=i,o.shadowRoot=r.createShadowRoot(),o.sharedStylesHost.addHost(o.shadowRoot);for(var s=Ic(i.id,i.styles,[]),a=0;a<s.length;a++){var u=document.createElement("style");u.textContent=s[a],o.shadowRoot.appendChild(u)}return o}return i(t,e),t.prototype.nodeOrShadowRoot=function(e){return e===this.hostEl?this.shadowRoot:e},t.prototype.destroy=function(){this.sharedStylesHost.removeHost(this.shadowRoot)},t.prototype.appendChild=function(t,n){return e.prototype.appendChild.call(this,this.nodeOrShadowRoot(t),n)},t.prototype.insertBefore=function(t,n,r){return e.prototype.insertBefore.call(this,this.nodeOrShadowRoot(t),n,r)},t.prototype.removeChild=function(t,n){return e.prototype.removeChild.call(this,this.nodeOrShadowRoot(t),n)},t.prototype.parentNode=function(t){return this.nodeOrShadowRoot(e.prototype.parentNode.call(this,this.nodeOrShadowRoot(t)))},t}(Oc),Uc="undefined"!=typeof Zone&&Zone.__symbol__||function(e){return"__zone_symbol__"+e},Lc=Uc("addEventListener"),Kc=Uc("removeEventListener"),qc={},zc="__zone_symbol__propagationStopped";"undefined"!=typeof Zone&&Zone[Uc("BLACK_LISTED_EVENTS")]&&(Mc={});var Zc=function(e){return!!Mc&&Mc.hasOwnProperty(e)},Wc=function(e){var t=qc[e.type];if(t){var n=this[t];if(n){var r=[e];if(1===n.length)return(s=n[0]).zone!==Zone.current?s.zone.run(s.handler,this,r):s.handler.apply(this,r);for(var i=n.slice(),o=0;o<i.length&&!0!==e[zc];o++){var s;(s=i[o]).zone!==Zone.current?s.zone.run(s.handler,this,r):s.handler.apply(this,r)}}}},Jc=function(e){function t(t,n){var r=e.call(this,t)||this;return r.ngZone=n,r.patchEvent(),r}return i(t,e),t.prototype.patchEvent=function(){if(Event&&Event.prototype&&!Event.prototype.__zone_symbol__stopImmediatePropagation){var e=Event.prototype.__zone_symbol__stopImmediatePropagation=Event.prototype.stopImmediatePropagation;Event.prototype.stopImmediatePropagation=function(){this&&(this[zc]=!0),e&&e.apply(this,arguments)}}},t.prototype.supports=function(e){return!0},t.prototype.addEventListener=function(e,t,n){var r=this,i=n;if(!e[Lc]||Rt.isInAngularZone()&&!Zc(t))e.addEventListener(t,i,!1);else{var o=qc[t];o||(o=qc[t]=Uc("ANGULAR"+t+"FALSE"));var s=e[o],a=s&&s.length>0;s||(s=e[o]=[]);var u=Zc(t)?Zone.root:Zone.current;if(0===s.length)s.push({zone:u,handler:i});else{for(var c=!1,l=0;l<s.length;l++)if(s[l].handler===i){c=!0;break}c||s.push({zone:u,handler:i})}a||e[Lc](t,Wc,!1)}return function(){return r.removeEventListener(e,t,i)}},t.prototype.removeEventListener=function(e,t,n){var r=e[Kc];if(!r)return e.removeEventListener.apply(e,[t,n,!1]);var i=qc[t],o=i&&e[i];if(!o)return e.removeEventListener.apply(e,[t,n,!1]);for(var s=!1,a=0;a<o.length;a++)if(o[a].handler===n){s=!0,o.splice(a,1);break}s?0===o.length&&r.apply(e,[t,Wc,!1]):e.removeEventListener.apply(e,[t,n,!1])},t}(Fc),Gc={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},Yc=new ue("HammerGestureConfig"),Xc=function(){function e(){this.events=[],this.overrides={}}return e.prototype.buildHammer=function(e){var t=new Hammer(e,this.options);for(var n in t.get("pinch").set({enable:!0}),t.get("rotate").set({enable:!0}),this.overrides)t.get(n).set(this.overrides[n]);return t},e}(),Qc=function(e){function t(t,n,r){var i=e.call(this,t)||this;return i._config=n,i.console=r,i}return i(t,e),t.prototype.supports=function(e){return!(!Gc.hasOwnProperty(e.toLowerCase())&&!this.isCustomEvent(e)||!window.Hammer&&(this.console.warn("Hammer.js is not loaded, can not bind '"+e+"' event."),1))},t.prototype.addEventListener=function(e,t,n){var r=this,i=this.manager.getZone();return t=t.toLowerCase(),i.runOutsideAngular(function(){var o=r._config.buildHammer(e),s=function(e){i.runGuarded(function(){n(e)})};return o.on(t,s),function(){return o.off(t,s)}})},t.prototype.isCustomEvent=function(e){return this._config.events.indexOf(e)>-1},t}(Fc),$c=["alt","control","meta","shift"],el={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},tl=function(e){function t(t){return e.call(this,t)||this}return i(t,e),t.prototype.supports=function(e){return null!=t.parseEventName(e)},t.prototype.addEventListener=function(e,n,r){var i=t.parseEventName(n),o=t.eventCallback(i.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return ic().onAndCancel(e,i.domEventName,o)})},t.parseEventName=function(e){var n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||"keydown"!==r&&"keyup"!==r)return null;var i=t._normalizeKey(n.pop()),o="";if($c.forEach(function(e){var t=n.indexOf(e);t>-1&&(n.splice(t,1),o+=e+".")}),o+=i,0!=n.length||0===i.length)return null;var s={};return s.domEventName=r,s.fullKey=o,s},t.getEventFullKey=function(e){var t="",n=ic().getEventKey(e);return" "===(n=n.toLowerCase())?n="space":"."===n&&(n="dot"),$c.forEach(function(r){r!=n&&(0,el[r])(e)&&(t+=r+".")}),t+=n},t.eventCallback=function(e,n,r){return function(i){t.getEventFullKey(i)===e&&r.runGuarded(function(){return n(i)})}},t._normalizeKey=function(e){switch(e){case"esc":return"escape";default:return e}},t}(Fc),nl=function(){},rl=function(e){function t(t){var n=e.call(this)||this;return n._doc=t,n}return i(t,e),t.prototype.sanitize=function(e,t){if(null==t)return null;switch(e){case ur.NONE:return t;case ur.HTML:return t instanceof ol?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"HTML"),function(e,t){var n=null;try{Zn=Zn||new Vn(e);var r=t?String(t):"";n=Zn.getInertBodyElement(r);var i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=n.innerHTML,n=Zn.getInertBodyElement(r)}while(r!==o);var s=new tr,a=s.sanitizeChildren(or(n)||n);return Jt()&&s.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss)."),a}finally{if(n)for(var u=or(n)||n;u.firstChild;)u.removeChild(u.firstChild)}}(this._doc,String(t)));case ur.STYLE:return t instanceof sl?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"Style"),function(e){if(!(e=String(e).trim()))return"";var t=e.match(ar);return t&&Kn(t[1])===t[1]||e.match(sr)&&function(e){for(var t=!0,n=!0,r=0;r<e.length;r++){var i=e.charAt(r);"'"===i&&n?t=!t:'"'===i&&t&&(n=!n)}return t&&n}(e)?e:(Jt()&&console.warn("WARNING: sanitizing unsafe style value "+e+" (see http://g.co/ng/security#xss)."),"unsafe")}(t));case ur.SCRIPT:if(t instanceof al)return t.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(t,"Script"),new Error("unsafe value used in a script context");case ur.URL:return t instanceof cl||t instanceof ul?t.changingThisBreaksApplicationSecurity:(this.checkNotSafeValue(t,"URL"),Kn(String(t)));case ur.RESOURCE_URL:if(t instanceof cl)return t.changingThisBreaksApplicationSecurity;throw this.checkNotSafeValue(t,"ResourceURL"),new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error("Unexpected SecurityContext "+e+" (see http://g.co/ng/security#xss)")}},t.prototype.checkNotSafeValue=function(e,t){if(e instanceof il)throw new Error("Required a safe "+t+", got a "+e.getTypeName()+" (see http://g.co/ng/security#xss)")},t.prototype.bypassSecurityTrustHtml=function(e){return new ol(e)},t.prototype.bypassSecurityTrustStyle=function(e){return new sl(e)},t.prototype.bypassSecurityTrustScript=function(e){return new al(e)},t.prototype.bypassSecurityTrustUrl=function(e){return new ul(e)},t.prototype.bypassSecurityTrustResourceUrl=function(e){return new cl(e)},t}(nl),il=function(){function e(e){this.changingThisBreaksApplicationSecurity=e}return e.prototype.toString=function(){return"SafeValue must use [property]=binding: "+this.changingThisBreaksApplicationSecurity+" (see http://g.co/ng/security#xss)"},e}(),ol=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getTypeName=function(){return"HTML"},t}(il),sl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getTypeName=function(){return"Style"},t}(il),al=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getTypeName=function(){return"Script"},t}(il),ul=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getTypeName=function(){return"URL"},t}(il),cl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.getTypeName=function(){return"ResourceURL"},t}(il),ll=Yt(Nn,"browser",[{provide:pt,useValue:"browser"},{provide:dt,useValue:function(){lc.makeCurrent(),mc.init()},multi:!0},{provide:Ua,useClass:fc,deps:[dc]},{provide:dc,useFactory:function(){return document},deps:[]}]);function hl(){return new it}var dl=function(){function e(e){if(e)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}return e.withServerTransition=function(t){return{ngModule:e,providers:[{provide:ct,useValue:t.appId},{provide:vc,useExisting:ct},yc]}},e}();"undefined"!=typeof window&&window;var pl=function(){function e(e){this.inj=e}return e.prototype.intercept=function(e,t){var n=e.headers,r=this.inj.get(Bu);r.isLoggedIn()&&(n=n.set("Authorization",r.getAuthorizationHeaderValue()));var i=e.clone({headers:n});return t.handle(i)},e}(),fl=function(e,t,n){return new gs(qu,[],function(e){return function(e){for(var t={},n=[],r=!1,i=0;i<e.length;i++){var o=e[i];o.token===ot&&(r=!0),1073741824&o.flags&&n.push(o.token),o.index=i,t[Er(o.token)]=o}return{factory:null,providersByKey:t,providers:e,modules:n,isRoot:r}}([ai(512,Ft,Ct,[[8,[Wu,Yu,$u,nc]],[3,Ft],kt]),ai(5120,Rn,Mn,[[3,Rn]]),ai(4608,nu,ru,[Rn,[2,tu]]),ai(4608,yt,yt,[]),ai(5120,ct,lt,[]),ai(5120,kn,jn,[]),ai(5120,Tn,Hn,[]),ai(4608,nl,rl,[su]),ai(6144,cr,null,[nl]),ai(4608,Yc,Xc,[]),ai(5120,Ec,function(e,t,n,r,i,o){return[new Jc(e,t),new tl(n),new Qc(r,i,o)]},[su,Rt,su,su,Yc,gt]),ai(4608,xc,xc,[Ec,Rt]),ai(135680,Ac,Ac,[su]),ai(4608,Rc,Rc,[xc,Ac]),ai(6144,nn,null,[Rc]),ai(6144,Cc,null,[Ac]),ai(4608,Lt,Lt,[Rt]),ai(4608,gc,gc,[su]),ai(4608,bc,bc,[su]),ai(4608,Nu,Ru,[su,pt,Du]),ai(4608,Ou,Ou,[Nu,Iu]),ai(5120,Fu,function(e,t){return[e,new pl(t)]},[Ou,Ne]),ai(4608,Tu,Tu,[]),ai(6144,ku,null,[Tu]),ai(4608,Pu,Pu,[ku]),ai(6144,uu,null,[Pu]),ai(4608,au,ju,[uu,Ne]),ai(4608,Eu,Eu,[au]),ai(1073742336,ou,ou,[]),ai(1024,it,hl,[]),ai(1024,at,function(e){return[(t=e,wc("probe",Sc),wc("coreTokens",o({},_c,(t||[]).reduce(function(e,t){return e[t.name]=t.token,e},{}))),function(){return Sc})];var t},[[2,Gt]]),ai(512,ut,ut,[[2,at]]),ai(131584,en,en,[Rt,gt,Ne,it,Ft,ut]),ai(1073742336,Bn,Bn,[en]),ai(1073742336,dl,dl,[[3,dl]]),ai(1073742336,Hu,Hu,[]),ai(1073742336,Mu,Mu,[]),ai(1073742336,qu,qu,[Ne]),ai(256,ot,!0,[]),ai(256,Du,"XSRF-TOKEN",[]),ai(256,Iu,"X-XSRF-TOKEN",[])])})}();(function(){if(Zt)throw new Error("Cannot enable prod mode after platform setup.");zt=!1})(),ll().bootstrapModuleFactory(fl).then(function(){}).catch(function(e){return console.log(e)})},zhAb:function(e,t,n){var r=n("aagx"),i=n("aCFj"),o=n("w2a5")(!1),s=n("YTvA")("IE_PROTO");e.exports=function(e,t){var n,a=i(e),u=0,c=[];for(n in a)n!=s&&r(a,n)&&c.push(n);for(;t.length>u;)r(a,n=t[u++])&&(~o(c,n)||c.push(n));return c}},"zq+C":function(e,t,n){var r=n("N6cJ"),i=n("y3w9"),o=r.key,s=r.map,a=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:o(arguments[2]),r=s(i(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=a.get(t);return u.delete(n),!!u.size||a.delete(t)}})}},[[3,0]]]);