git-history-ui 4.0.1 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/CODE_OF_CONDUCT.md +53 -0
- package/CONTRIBUTING.md +132 -0
- package/LICENSE +21 -0
- package/README.md +75 -15
- package/SECURITY.md +51 -0
- package/build/frontend/chunk-6DL2ZTKG.js +1 -0
- package/build/frontend/chunk-ACWXPHRR.js +1 -0
- package/build/frontend/{chunk-CFCRPNUQ.js → chunk-F6HZ5OVS.js} +1 -1
- package/build/frontend/{chunk-UHWTLUOW.js → chunk-GHSRMAIR.js} +1 -1
- package/build/frontend/chunk-J5ZVP6TN.js +9 -0
- package/build/frontend/chunk-PRY6VAFG.js +1 -0
- package/build/frontend/chunk-PXNKNORB.js +1 -0
- package/build/frontend/chunk-S56XRIZ7.js +9 -0
- package/build/frontend/chunk-STUSEB5P.js +1 -0
- package/build/frontend/chunk-UM7ESEXJ.js +5 -0
- package/build/frontend/chunk-VGAHCEAA.js +1 -0
- package/build/frontend/chunk-XLGWMKXV.js +1 -0
- package/build/frontend/chunk-Y6GOUMAT.js +1 -0
- package/build/frontend/index.html +2 -2
- package/build/frontend/main-W5NQX3FE.js +1 -0
- package/build/frontend/styles-RQGRQK4Z.css +1 -0
- package/dist/backend/aggregations.d.ts +1 -0
- package/dist/backend/aggregations.d.ts.map +1 -0
- package/dist/backend/annotations.d.ts +10 -1
- package/dist/backend/annotations.d.ts.map +1 -0
- package/dist/backend/annotations.js +84 -9
- package/dist/backend/annotations.js.map +1 -1
- package/dist/backend/breakage.d.ts +70 -0
- package/dist/backend/breakage.d.ts.map +1 -0
- package/dist/backend/breakage.js +235 -0
- package/dist/backend/breakage.js.map +1 -0
- package/dist/backend/cache/sqliteIndex.d.ts +2 -1
- package/dist/backend/cache/sqliteIndex.d.ts.map +1 -0
- package/dist/backend/cache/sqliteIndex.js +36 -23
- package/dist/backend/cache/sqliteIndex.js.map +1 -1
- package/dist/backend/dev-server.d.ts +1 -0
- package/dist/backend/dev-server.d.ts.map +1 -0
- package/dist/backend/gitService.d.ts +15 -6
- package/dist/backend/gitService.d.ts.map +1 -0
- package/dist/backend/gitService.js +148 -45
- package/dist/backend/gitService.js.map +1 -1
- package/dist/backend/grouping/prGrouping.d.ts +1 -0
- package/dist/backend/grouping/prGrouping.d.ts.map +1 -0
- package/dist/backend/grouping/prGrouping.js +41 -19
- package/dist/backend/grouping/prGrouping.js.map +1 -1
- package/dist/backend/impact.d.ts +4 -1
- package/dist/backend/impact.d.ts.map +1 -0
- package/dist/backend/impact.js +30 -16
- package/dist/backend/impact.js.map +1 -1
- package/dist/backend/insights.d.ts +1 -0
- package/dist/backend/insights.d.ts.map +1 -0
- package/dist/backend/insights.js +8 -3
- package/dist/backend/insights.js.map +1 -1
- package/dist/backend/llm/anthropicProvider.d.ts +2 -0
- package/dist/backend/llm/anthropicProvider.d.ts.map +1 -0
- package/dist/backend/llm/anthropicProvider.js +10 -4
- package/dist/backend/llm/anthropicProvider.js.map +1 -1
- package/dist/backend/llm/heuristicProvider.d.ts +2 -0
- package/dist/backend/llm/heuristicProvider.d.ts.map +1 -0
- package/dist/backend/llm/heuristicProvider.js +54 -4
- package/dist/backend/llm/heuristicProvider.js.map +1 -1
- package/dist/backend/llm/index.d.ts +7 -0
- package/dist/backend/llm/index.d.ts.map +1 -0
- package/dist/backend/llm/index.js +15 -5
- package/dist/backend/llm/index.js.map +1 -1
- package/dist/backend/llm/openaiProvider.d.ts +3 -0
- package/dist/backend/llm/openaiProvider.d.ts.map +1 -0
- package/dist/backend/llm/openaiProvider.js +29 -4
- package/dist/backend/llm/openaiProvider.js.map +1 -1
- package/dist/backend/llm/types.d.ts +3 -1
- package/dist/backend/llm/types.d.ts.map +1 -0
- package/dist/backend/presets.d.ts +1 -0
- package/dist/backend/presets.d.ts.map +1 -0
- package/dist/backend/search/datePhrase.d.ts +1 -0
- package/dist/backend/search/datePhrase.d.ts.map +1 -0
- package/dist/backend/search/nlSearch.d.ts +1 -0
- package/dist/backend/search/nlSearch.d.ts.map +1 -0
- package/dist/backend/server.d.ts +1 -0
- package/dist/backend/server.d.ts.map +1 -0
- package/dist/backend/server.js +100 -26
- package/dist/backend/server.js.map +1 -1
- package/dist/backend/snapshot.d.ts +4 -1
- package/dist/backend/snapshot.d.ts.map +1 -0
- package/dist/backend/snapshot.js +14 -9
- package/dist/backend/snapshot.js.map +1 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cli.d.ts.map +1 -0
- package/docs/API.md +70 -0
- package/docs/architecture.md +85 -0
- package/docs/configuration.md +54 -0
- package/docs/troubleshooting.md +85 -0
- package/package.json +44 -8
- package/build/frontend/chunk-4JCUQ6Y5.js +0 -1
- package/build/frontend/chunk-6VRZZB3T.js +0 -1
- package/build/frontend/chunk-EZUFC4CQ.js +0 -1
- package/build/frontend/chunk-GRG6HTLW.js +0 -9
- package/build/frontend/chunk-I4VBIHH2.js +0 -1
- package/build/frontend/chunk-OBPR2XVH.js +0 -5
- package/build/frontend/chunk-QNEGGJHP.js +0 -2
- package/build/frontend/chunk-UIWFTWLF.js +0 -1
- package/build/frontend/chunk-UNROVCUZ.js +0 -7
- package/build/frontend/chunk-UWM4ZZWH.js +0 -1
- package/build/frontend/chunk-VHEMN3MU.js +0 -1
- package/build/frontend/main-SQFBVJA6.js +0 -1
- package/build/frontend/styles-DUWPKHDX.css +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as N,$a as se,A as ee,Ib as m,Ka as D,La as a,Qa as L,Qb as f,Ra as u,Rb as P,Sa as h,V as g,Va as x,Vb as W,X as H,Xa as ie,Yb as ae,Z as p,Za as re,Zb as $,a as l,b as d,j as K,la as te,nb as b,oa as O,p as J,sa as ne,ta as C,u as Q,va as V,xb as oe}from"./chunk-OBPR2XVH.js";var me=(()=>{class n{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,i){this._renderer=t,this._elementRef=i}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(i){return new(i||n)(a(D),a(V))};static \u0275dir=u({type:n})}return n})(),T=(()=>{class n extends me{static \u0275fac=(()=>{let t;return function(r){return(t||(t=C(n)))(r||n)}})();static \u0275dir=u({type:n,features:[h]})}return n})(),I=new p("");var Se={provide:I,useExisting:g(()=>_e),multi:!0};function Ne(){let n=$()?$().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var Oe=new p(""),_e=(()=>{class n extends me{_compositionMode;_composing=!1;constructor(t,i,r){super(t,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!Ne())}writeValue(t){let i=t??"";this.setProperty("value",i)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(i){return new(i||n)(a(D),a(V),a(Oe,8))};static \u0275dir=u({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&b("input",function(o){return r._handleInput(o.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(o){return r._compositionEnd(o.target.value)})},standalone:!1,features:[m([Se]),h]})}return n})();var xe=new p(""),Pe=new p("");function ve(n){return n!=null}function ye(n){return re(n)?J(n):n}function Ce(n){let e={};return n.forEach(t=>{e=t!=null?l(l({},e),t):e}),Object.keys(e).length===0?null:e}function Ve(n,e){return e.map(t=>t(n))}function Re(n){return!n.validate}function De(n){return n.map(e=>Re(e)?e:t=>e.validate(t))}function ke(n){if(!n)return null;let e=n.filter(ve);return e.length==0?null:function(t){return Ce(Ve(t,e))}}function be(n){return n!=null?ke(De(n)):null}function je(n){if(!n)return null;let e=n.filter(ve);return e.length==0?null:function(t){let i=Ve(t,e).map(ye);return ee(i).pipe(Q(Ce))}}function Ae(n){return n!=null?je(De(n)):null}function le(n,e){return n===null?[e]:Array.isArray(n)?[...n,e]:[n,e]}function Ge(n){return n._rawValidators}function Te(n){return n._rawAsyncValidators}function q(n){return n?Array.isArray(n)?n:[n]:[]}function k(n,e){return Array.isArray(n)?n.includes(e):n===e}function ue(n,e){let t=q(e);return q(n).forEach(r=>{k(t,r)||t.push(r)}),t}function de(n,e){return q(e).filter(t=>!k(n,t))}var j=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=be(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Ae(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},z=class extends j{name;get formDirective(){return null}get path(){return null}},F=class extends j{_parent=null;name=null;valueAccessor=null},Z=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Be={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Ot=d(l({},Be),{"[class.ng-submitted]":"isSubmitted"}),xt=(()=>{class n extends Z{constructor(t){super(t)}static \u0275fac=function(i){return new(i||n)(a(F,2))};static \u0275dir=u({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&oe("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[h]})}return n})();var A="VALID",R="INVALID",_="PENDING",M="DISABLED",y=class{},G=class extends y{value;source;constructor(e,t){super(),this.value=e,this.source=t}},E=class extends y{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},w=class extends y{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},v=class extends y{status;source;constructor(e,t){super(),this.status=e,this.source=t}};function Ue(n){return(B(n)?n.validators:n)||null}function He(n){return Array.isArray(n)?be(n):n||null}function Le(n,e){return(B(e)?e.asyncValidators:n)||null}function We(n){return Array.isArray(n)?Ae(n):n||null}function B(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}var X=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return f(this.statusReactive)}set status(e){f(()=>this.statusReactive.set(e))}_status=P(()=>this.statusReactive());statusReactive=O(void 0);get valid(){return this.status===A}get invalid(){return this.status===R}get pending(){return this.status==_}get disabled(){return this.status===M}get enabled(){return this.status!==M}errors;get pristine(){return f(this.pristineReactive)}set pristine(e){f(()=>this.pristineReactive.set(e))}_pristine=P(()=>this.pristineReactive());pristineReactive=O(!0);get dirty(){return!this.pristine}get touched(){return f(this.touchedReactive)}set touched(e){f(()=>this.touchedReactive.set(e))}_touched=P(()=>this.touchedReactive());touchedReactive=O(!1);get untouched(){return!this.touched}_events=new K;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(ue(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(ue(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(de(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(de(e,this._rawAsyncValidators))}hasValidator(e){return k(this._rawValidators,e)}hasAsyncValidator(e){return k(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(d(l({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new w(!0,i))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i),t&&e.emitEvent!==!1&&this._events.next(new w(!1,i))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(d(l({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new E(!1,i))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),t&&e.emitEvent!==!1&&this._events.next(new E(!0,i))}markAsPending(e={}){this.status=_;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new v(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(d(l({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=M,this.errors=null,this._forEachChild(r=>{r.disable(d(l({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new G(this.value,i)),this._events.next(new v(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(d(l({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=A,this._forEachChild(i=>{i.enable(d(l({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(d(l({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e,t){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===A||this.status===_)&&this._runAsyncValidator(i,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new G(this.value,t)),this._events.next(new v(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(d(l({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?M:A}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=_,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let i=ye(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(e,t){let i=t?this.get(t):this;return i&&i.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new v(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,i)}_initObservables(){this.valueChanges=new x,this.statusChanges=new x}_calculateStatus(){return this._allControlsDisabled()?M:this.errors?R:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(_)?_:this._anyControlsHaveStatus(R)?R:A}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,t),r&&this._events.next(new E(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new w(this.touched,t)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){B(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let t=this._parent&&this._parent.dirty;return!e&&!!t&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=He(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=We(this._rawAsyncValidators)}};var Me=new p("",{providedIn:"root",factory:()=>Y}),Y="always";function $e(n,e){return[...e.path,n]}function qe(n,e,t=Y){Ze(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(n.disabled),Xe(n,e),Ke(n,e),Ye(n,e),ze(n,e)}function ce(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function ze(n,e){if(e.valueAccessor.setDisabledState){let t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}function Ze(n,e){let t=Ge(n);e.validator!==null?n.setValidators(le(t,e.validator)):typeof t=="function"&&n.setValidators([t]);let i=Te(n);e.asyncValidator!==null?n.setAsyncValidators(le(i,e.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();ce(e._rawValidators,r),ce(e._rawAsyncValidators,r)}function Xe(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Ee(n,e)})}function Ye(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Ee(n,e),n.updateOn!=="submit"&&n.markAsTouched()})}function Ee(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Ke(n,e){let t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}function Je(n,e){if(!n.hasOwnProperty("model"))return!1;let t=n.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function Qe(n){return Object.getPrototypeOf(n.constructor)===T}function et(n,e){if(!e)return null;Array.isArray(e);let t,i,r;return e.forEach(s=>{s.constructor===_e?t=s:Qe(s)?i=s:r=s}),r||i||t||null}function he(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function fe(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var tt=class extends X{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,i){super(Ue(t),Le(i,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),B(t)&&(t.nonNullable||t.initialValueIsDefault)&&(fe(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){he(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){he(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){fe(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var nt={provide:F,useExisting:g(()=>it)},ge=Promise.resolve(),it=(()=>{class n extends F{_changeDetectorRef;callSetDisabledState;control=new tt;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new x;constructor(t,i,r,s,o,c){super(),this._changeDetectorRef=o,this.callSetDisabledState=c,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=et(this,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),Je(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){qe(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){ge.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let i=t.isDisabled.currentValue,r=i!==0&&ae(i);ge.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?$e(t,this._parent):[t]}static \u0275fac=function(i){return new(i||n)(a(z,9),a(xe,10),a(Pe,10),a(I,10),a(W,8),a(Me,8))};static \u0275dir=u({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[m([nt]),h,ne]})}return n})();var rt={provide:I,useExisting:g(()=>st),multi:!0},st=(()=>{class n extends T{writeValue(t){this.setProperty("value",parseFloat(t))}registerOnChange(t){this.onChange=i=>{t(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=C(n)))(r||n)}})();static \u0275dir=u({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(i,r){i&1&&b("change",function(o){return r.onChange(o.target.value)})("input",function(o){return r.onChange(o.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[m([rt]),h]})}return n})();var ot={provide:I,useExisting:g(()=>Fe),multi:!0};function we(n,e){return n==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function at(n){return n.split(":")[0]}var Fe=(()=>{class n extends T{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=N(se).injector;destroyRef=N(te);cdr=N(W);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,ie({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let i=this._getOptionId(t),r=we(i,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=i=>{this.value=this._getOptionValue(i),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),t))return i;return null}_getOptionValue(t){let i=at(t);return this._optionMap.has(i)?this._optionMap.get(i):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=C(n)))(r||n)}})();static \u0275dir=u({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&b("change",function(o){return r.onChange(o.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[m([ot]),h]})}return n})(),Rt=(()=>{class n{_element;_renderer;_select;id;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(we(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select&&this._select._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select._writeValueAfterRender())}static \u0275fac=function(i){return new(i||n)(a(V),a(D),a(Fe,9))};static \u0275dir=u({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),lt={provide:I,useExisting:g(()=>Ie),multi:!0};function pe(n,e){return n==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function ut(n){return n.split(":")[0]}var Ie=(()=>{class n extends T{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let i;if(Array.isArray(t)){let r=t.map(s=>this._getOptionId(s));i=(s,o)=>{s._setSelected(r.indexOf(o.toString())>-1)}}else i=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(t){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let o=s;for(let c=0;c<o.length;c++){let S=o[c],U=this._getOptionValue(S.value);r.push(U)}}else{let o=i.options;for(let c=0;c<o.length;c++){let S=o[c];if(S.selected){let U=this._getOptionValue(S.value);r.push(U)}}}this.value=r,t(r)}}_registerOption(t){let i=(this._idCounter++).toString();return this._optionMap.set(i,t),i}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,t))return i;return null}_getOptionValue(t){let i=ut(t);return this._optionMap.has(i)?this._optionMap.get(i)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=C(n)))(r||n)}})();static \u0275dir=u({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&b("change",function(o){return r.onChange(o.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[m([lt]),h]})}return n})(),kt=(()=>{class n{_element;_renderer;_select;id;_value;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(pe(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(pe(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(a(V),a(D),a(Ie,9))};static \u0275dir=u({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();var dt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=H({})}return n})();var jt=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:Me,useValue:t.callSetDisabledState??Y}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=H({imports:[dt]})}return n})();export{_e as a,xt as b,it as c,st as d,Fe as e,Rt as f,kt as g,jt as h};
|
|
1
|
+
import{$ as N,$a as u,A as ee,Ib as oe,Ua as D,Ub as m,V as g,Va as a,X as H,Z as p,_a as L,a as l,b as d,bb as h,bc as f,cc as P,eb as x,gb as ie,gc as W,ib as re,j as K,jc as ae,kb as se,kc as $,la as te,oa as O,p as J,sa as ne,ta as C,u as Q,va as V,yb as b}from"./chunk-UM7ESEXJ.js";var me=(()=>{class n{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,i){this._renderer=t,this._elementRef=i}setProperty(t,i){this._renderer.setProperty(this._elementRef.nativeElement,t,i)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(i){return new(i||n)(a(D),a(V))};static \u0275dir=u({type:n})}return n})(),T=(()=>{class n extends me{static \u0275fac=(()=>{let t;return function(r){return(t||(t=C(n)))(r||n)}})();static \u0275dir=u({type:n,features:[h]})}return n})(),I=new p("");var Se={provide:I,useExisting:g(()=>_e),multi:!0};function Ne(){let n=$()?$().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var Oe=new p(""),_e=(()=>{class n extends me{_compositionMode;_composing=!1;constructor(t,i,r){super(t,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!Ne())}writeValue(t){let i=t??"";this.setProperty("value",i)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(i){return new(i||n)(a(D),a(V),a(Oe,8))};static \u0275dir=u({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&b("input",function(o){return r._handleInput(o.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(o){return r._compositionEnd(o.target.value)})},standalone:!1,features:[m([Se]),h]})}return n})();var xe=new p(""),Pe=new p("");function ve(n){return n!=null}function ye(n){return re(n)?J(n):n}function Ce(n){let e={};return n.forEach(t=>{e=t!=null?l(l({},e),t):e}),Object.keys(e).length===0?null:e}function Ve(n,e){return e.map(t=>t(n))}function Re(n){return!n.validate}function De(n){return n.map(e=>Re(e)?e:t=>e.validate(t))}function ke(n){if(!n)return null;let e=n.filter(ve);return e.length==0?null:function(t){return Ce(Ve(t,e))}}function be(n){return n!=null?ke(De(n)):null}function je(n){if(!n)return null;let e=n.filter(ve);return e.length==0?null:function(t){let i=Ve(t,e).map(ye);return ee(i).pipe(Q(Ce))}}function Ae(n){return n!=null?je(De(n)):null}function le(n,e){return n===null?[e]:Array.isArray(n)?[...n,e]:[n,e]}function Ge(n){return n._rawValidators}function Te(n){return n._rawAsyncValidators}function q(n){return n?Array.isArray(n)?n:[n]:[]}function k(n,e){return Array.isArray(n)?n.includes(e):n===e}function ue(n,e){let t=q(e);return q(n).forEach(r=>{k(t,r)||t.push(r)}),t}function de(n,e){return q(e).filter(t=>!k(n,t))}var j=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=be(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Ae(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},z=class extends j{name;get formDirective(){return null}get path(){return null}},F=class extends j{_parent=null;name=null;valueAccessor=null},Z=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Be={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Ot=d(l({},Be),{"[class.ng-submitted]":"isSubmitted"}),xt=(()=>{class n extends Z{constructor(t){super(t)}static \u0275fac=function(i){return new(i||n)(a(F,2))};static \u0275dir=u({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&oe("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[h]})}return n})();var A="VALID",R="INVALID",_="PENDING",M="DISABLED",y=class{},G=class extends y{value;source;constructor(e,t){super(),this.value=e,this.source=t}},E=class extends y{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},w=class extends y{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},v=class extends y{status;source;constructor(e,t){super(),this.status=e,this.source=t}};function Ue(n){return(B(n)?n.validators:n)||null}function He(n){return Array.isArray(n)?be(n):n||null}function Le(n,e){return(B(e)?e.asyncValidators:n)||null}function We(n){return Array.isArray(n)?Ae(n):n||null}function B(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}var X=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return f(this.statusReactive)}set status(e){f(()=>this.statusReactive.set(e))}_status=P(()=>this.statusReactive());statusReactive=O(void 0);get valid(){return this.status===A}get invalid(){return this.status===R}get pending(){return this.status==_}get disabled(){return this.status===M}get enabled(){return this.status!==M}errors;get pristine(){return f(this.pristineReactive)}set pristine(e){f(()=>this.pristineReactive.set(e))}_pristine=P(()=>this.pristineReactive());pristineReactive=O(!0);get dirty(){return!this.pristine}get touched(){return f(this.touchedReactive)}set touched(e){f(()=>this.touchedReactive.set(e))}_touched=P(()=>this.touchedReactive());touchedReactive=O(!1);get untouched(){return!this.touched}_events=new K;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(ue(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(ue(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(de(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(de(e,this._rawAsyncValidators))}hasValidator(e){return k(this._rawValidators,e)}hasAsyncValidator(e){return k(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(d(l({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new w(!0,i))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:i})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,i),t&&e.emitEvent!==!1&&this._events.next(new w(!1,i))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let i=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(d(l({},e),{sourceControl:i})),t&&e.emitEvent!==!1&&this._events.next(new E(!1,i))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,i),t&&e.emitEvent!==!1&&this._events.next(new E(!0,i))}markAsPending(e={}){this.status=_;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new v(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(d(l({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=M,this.errors=null,this._forEachChild(r=>{r.disable(d(l({},e),{onlySelf:!0}))}),this._updateValue();let i=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new G(this.value,i)),this._events.next(new v(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(d(l({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=A,this._forEachChild(i=>{i.enable(d(l({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(d(l({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(e,t){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===A||this.status===_)&&this._runAsyncValidator(i,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new G(this.value,t)),this._events.next(new v(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(d(l({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?M:A}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=_,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let i=ye(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((i,r)=>i&&i._find(r),this)}getError(e,t){let i=t?this.get(t):this;return i&&i.errors?i.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,i){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||i)&&this._events.next(new v(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,i)}_initObservables(){this.valueChanges=new x,this.statusChanges=new x}_calculateStatus(){return this._allControlsDisabled()?M:this.errors?R:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(_)?_:this._anyControlsHaveStatus(R)?R:A}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,t),r&&this._events.next(new E(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new w(this.touched,t)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){B(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let t=this._parent&&this._parent.dirty;return!e&&!!t&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=He(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=We(this._rawAsyncValidators)}};var Me=new p("",{providedIn:"root",factory:()=>Y}),Y="always";function $e(n,e){return[...e.path,n]}function qe(n,e,t=Y){Ze(n,e),e.valueAccessor.writeValue(n.value),(n.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(n.disabled),Xe(n,e),Ke(n,e),Ye(n,e),ze(n,e)}function ce(n,e){n.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function ze(n,e){if(e.valueAccessor.setDisabledState){let t=i=>{e.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(t),e._registerOnDestroy(()=>{n._unregisterOnDisabledChange(t)})}}function Ze(n,e){let t=Ge(n);e.validator!==null?n.setValidators(le(t,e.validator)):typeof t=="function"&&n.setValidators([t]);let i=Te(n);e.asyncValidator!==null?n.setAsyncValidators(le(i,e.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();ce(e._rawValidators,r),ce(e._rawAsyncValidators,r)}function Xe(n,e){e.valueAccessor.registerOnChange(t=>{n._pendingValue=t,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&Ee(n,e)})}function Ye(n,e){e.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&Ee(n,e),n.updateOn!=="submit"&&n.markAsTouched()})}function Ee(n,e){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function Ke(n,e){let t=(i,r)=>{e.valueAccessor.writeValue(i),r&&e.viewToModelUpdate(i)};n.registerOnChange(t),e._registerOnDestroy(()=>{n._unregisterOnChange(t)})}function Je(n,e){if(!n.hasOwnProperty("model"))return!1;let t=n.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function Qe(n){return Object.getPrototypeOf(n.constructor)===T}function et(n,e){if(!e)return null;Array.isArray(e);let t,i,r;return e.forEach(s=>{s.constructor===_e?t=s:Qe(s)?i=s:r=s}),r||i||t||null}function he(n,e){let t=n.indexOf(e);t>-1&&n.splice(t,1)}function fe(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var tt=class extends X{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,i){super(Ue(t),Le(i,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),B(t)&&(t.nonNullable||t.initialValueIsDefault)&&(fe(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){he(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){he(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){fe(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var nt={provide:F,useExisting:g(()=>it)},ge=Promise.resolve(),it=(()=>{class n extends F{_changeDetectorRef;callSetDisabledState;control=new tt;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new x;constructor(t,i,r,s,o,c){super(),this._changeDetectorRef=o,this.callSetDisabledState=c,this._parent=t,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=et(this,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let i=t.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),Je(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){qe(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){ge.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let i=t.isDisabled.currentValue,r=i!==0&&ae(i);ge.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?$e(t,this._parent):[t]}static \u0275fac=function(i){return new(i||n)(a(z,9),a(xe,10),a(Pe,10),a(I,10),a(W,8),a(Me,8))};static \u0275dir=u({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[m([nt]),h,ne]})}return n})();var rt={provide:I,useExisting:g(()=>st),multi:!0},st=(()=>{class n extends T{writeValue(t){this.setProperty("value",parseFloat(t))}registerOnChange(t){this.onChange=i=>{t(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let t;return function(r){return(t||(t=C(n)))(r||n)}})();static \u0275dir=u({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(i,r){i&1&&b("change",function(o){return r.onChange(o.target.value)})("input",function(o){return r.onChange(o.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[m([rt]),h]})}return n})();var ot={provide:I,useExisting:g(()=>Fe),multi:!0};function we(n,e){return n==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function at(n){return n.split(":")[0]}var Fe=(()=>{class n extends T{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;appRefInjector=N(se).injector;destroyRef=N(te);cdr=N(W);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,ie({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(t){this.cdr.markForCheck(),this.value=t;let i=this._getOptionId(t),r=we(i,t);this.setProperty("value",r)}registerOnChange(t){this.onChange=i=>{this.value=this._getOptionValue(i),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),t))return i;return null}_getOptionValue(t){let i=at(t);return this._optionMap.has(i)?this._optionMap.get(i):t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=C(n)))(r||n)}})();static \u0275dir=u({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&b("change",function(o){return r.onChange(o.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[m([ot]),h]})}return n})(),Rt=(()=>{class n{_element;_renderer;_select;id;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(t){this._select!=null&&(this._select._optionMap.set(this.id,t),this._setElementValue(we(this.id,t)),this._select._writeValueAfterRender())}set value(t){this._setElementValue(t),this._select&&this._select._writeValueAfterRender()}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select._writeValueAfterRender())}static \u0275fac=function(i){return new(i||n)(a(V),a(D),a(Fe,9))};static \u0275dir=u({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),lt={provide:I,useExisting:g(()=>Ie),multi:!0};function pe(n,e){return n==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${n}: ${e}`.slice(0,50))}function ut(n){return n.split(":")[0]}var Ie=(()=>{class n extends T{value;_optionMap=new Map;_idCounter=0;set compareWith(t){this._compareWith=t}_compareWith=Object.is;writeValue(t){this.value=t;let i;if(Array.isArray(t)){let r=t.map(s=>this._getOptionId(s));i=(s,o)=>{s._setSelected(r.indexOf(o.toString())>-1)}}else i=(r,s)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(t){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let o=s;for(let c=0;c<o.length;c++){let S=o[c],U=this._getOptionValue(S.value);r.push(U)}}else{let o=i.options;for(let c=0;c<o.length;c++){let S=o[c];if(S.selected){let U=this._getOptionValue(S.value);r.push(U)}}}this.value=r,t(r)}}_registerOption(t){let i=(this._idCounter++).toString();return this._optionMap.set(i,t),i}_getOptionId(t){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,t))return i;return null}_getOptionValue(t){let i=ut(t);return this._optionMap.has(i)?this._optionMap.get(i)._value:t}static \u0275fac=(()=>{let t;return function(r){return(t||(t=C(n)))(r||n)}})();static \u0275dir=u({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&b("change",function(o){return r.onChange(o.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[m([lt]),h]})}return n})(),kt=(()=>{class n{_element;_renderer;_select;id;_value;constructor(t,i,r){this._element=t,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){this._select!=null&&(this._value=t,this._setElementValue(pe(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(pe(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(a(V),a(D),a(Ie,9))};static \u0275dir=u({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();var dt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=H({})}return n})();var jt=(()=>{class n{static withConfig(t){return{ngModule:n,providers:[{provide:Me,useValue:t.callSetDisabledState??Y}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=L({type:n});static \u0275inj=H({imports:[dt]})}return n})();export{_e as a,xt as b,it as c,st as d,Fe as e,Rt as f,kt as g,jt as h};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{a as St,b as Et,c as J,d as It,e as Tt,f as mt,g as F,h as zt,i as Rt,j as Ht,k as Dt,l as Vt,m as pt,n as $t,o as At,p as Ft,q as Nt,r as gt}from"./chunk-Y6GOUMAT.js";import{e as Ot}from"./chunk-PXNKNORB.js";import{a as Pt}from"./chunk-6DL2ZTKG.js";import{$ as lt,Db as W,Eb as U,Fb as X,Hb as et,Ib as Ct,Kb as r,Lb as h,Mb as R,Nb as nt,Qa as s,Wb as Y,Yb as ct,Za as V,Zb as dt,cb as S,dc as kt,ea as O,eb as _t,fa as P,ga as K,ha as bt,lb as z,oa as G,ob as u,pb as i,pc as yt,qb as n,qc as it,rb as y,rc as wt,sa as Z,sb as Q,sc as Mt,tb as q,tc as A,ub as $,xb as tt,yb as E,zb as _}from"./chunk-UM7ESEXJ.js";var Wt=["svg"],Ut=["tooltip"],rt=class o{data=[];height=200;svgRef;tooltipRef;hideTimer=null;lastRendered=null;lastHeight=0;ngAfterViewInit(){this.render()}ngOnChanges(){this.render()}ngOnDestroy(){this.hideTimer&&clearTimeout(this.hideTimer)}render(){if(!this.svgRef||this.data===this.lastRendered&&this.height===this.lastHeight)return;this.lastRendered=this.data,this.lastHeight=this.height;let e=this.svgRef.nativeElement,t=this.tooltipRef?.nativeElement,d=e.clientWidth||600,a={top:14,right:46,bottom:28,left:42},m=Math.max(0,d-a.left-a.right),v=Math.max(0,this.height-a.top-a.bottom),b=getComputedStyle(e),g={accent:w(b,"--chart-line","#818cf8"),success:w(b,"--chart-add","#4ade80"),danger:w(b,"--chart-del","#f87171"),muted:w(b,"--fg-muted","#94a3b8"),primary:w(b,"--fg-primary","#f8fafc"),border:w(b,"--border-soft","#334155"),grid:w(b,"--graph-guide","rgba(148, 163, 184, 0.22)"),surface:w(b,"--bg-surface","#111827"),elevated:w(b,"--bg-elevated","#1f2937")},H=F(e);if(H.selectAll("*").remove(),ht(t),this.data.length===0||m<=0||v<=0)return;let f=this.data.map(l=>({date:new Date(l.date),label:l.date,commits:l.commits,additions:l.additions,deletions:l.deletions,churn:l.additions+l.deletions})).filter(l=>!Number.isNaN(l.date.getTime()));if(!f.length)return;let C=Et(f,l=>l.date);+C[0]==+C[1]&&(C[0]=new Date(+C[0]-720*60*1e3),C[1]=new Date(+C[1]+720*60*1e3));let k=$t().domain(C).range([0,m]),I=pt().domain([0,J(f,l=>l.churn)??1]).nice().range([v,0]),B=pt().domain([0,J(f,l=>l.commits)??1]).nice().range([v,0]),ot=H.append("defs").append("linearGradient").attr("id","churn-area-gradient").attr("x1","0%").attr("x2","0%").attr("y1","0%").attr("y2","100%");ot.append("stop").attr("offset","0%").attr("stop-color",g.accent).attr("stop-opacity",.24),ot.append("stop").attr("offset","100%").attr("stop-color",g.accent).attr("stop-opacity",.02);let x=H.append("g").attr("transform",`translate(${a.left},${a.top})`),c=Ht(",");x.append("g").attr("class","grid").call(mt(I).ticks(4).tickSize(-m).tickFormat(()=>"")).call(l=>l.select(".domain").remove()).call(l=>l.selectAll("line").attr("stroke",g.grid));let p=Math.max(2,Math.min(14,m/Math.max(1,f.length)*.45));x.append("g").selectAll("line.additions").data(f).join("line").attr("class","additions").attr("x1",l=>k(l.date)-p/3).attr("x2",l=>k(l.date)-p/3).attr("y1",v).attr("y2",l=>I(l.additions)).attr("stroke",g.success).attr("stroke-width",p).attr("stroke-linecap","round").attr("opacity",.75),x.append("g").selectAll("line.deletions").data(f).join("line").attr("class","deletions").attr("x1",l=>k(l.date)+p/3).attr("x2",l=>k(l.date)+p/3).attr("y1",v).attr("y2",l=>I(l.deletions)).attr("stroke",g.danger).attr("stroke-width",p).attr("stroke-linecap","round").attr("opacity",.62);let j=Nt().x(l=>k(l.date)).y0(v).y1(l=>I(l.churn)).curve(gt);x.append("path").datum(f).attr("d",j).attr("fill","url(#churn-area-gradient)");let T=Ft().x(l=>k(l.date)).y(l=>B(l.commits)).curve(gt);x.append("path").datum(f).attr("d",T).attr("stroke",g.accent).attr("stroke-width",2).attr("fill","none");let D=x.append("g").attr("display","none");D.append("line").attr("y1",0).attr("y2",v).attr("stroke",g.primary).attr("stroke-opacity",.25).attr("stroke-dasharray","3,3"),D.append("circle").attr("r",4).attr("fill",g.accent).attr("stroke",g.surface).attr("stroke-width",2),x.append("g").attr("class","axis").attr("transform",`translate(0,${v})`).call(Tt(k).ticks(Math.min(8,Math.max(3,Math.floor(m/90)))).tickSizeOuter(0)).call(ut(g)),x.append("g").attr("class","axis").call(mt(I).ticks(4).tickSizeOuter(0)).call(ut(g)),x.append("g").attr("class","axis").attr("transform",`translate(${m},0)`).call(It(B).ticks(4).tickSizeOuter(0)).call(ut(g)),x.append("text").attr("x",0).attr("y",-4).attr("fill",g.muted).attr("font-size",10).text("churn"),x.append("text").attr("x",m).attr("y",-4).attr("text-anchor","end").attr("fill",g.muted).attr("font-size",10).text("commits");let Gt=St(l=>l.date).center;H.attr("tabindex",0).on("pointermove",l=>{let[st,ft]=zt(l,x.node());if(st<0||st>m||ft<0||ft>v){ht(t),D.attr("display","none");return}let Qt=k.invert(st),M=f[Gt(f,Qt)];if(!M)return;let xt=k(M.date),vt=B(M.commits);D.attr("display",null).attr("transform",`translate(${xt},0)`),D.select("circle").attr("cy",vt),Xt(t,{x:a.left+xt,y:a.top+Math.min(vt,v-20),date:M.label,commits:c(M.commits),additions:c(M.additions),deletions:c(M.deletions),churn:c(M.churn)})}).on("pointerleave blur",()=>{D.attr("display","none"),this.hideTimer&&clearTimeout(this.hideTimer),this.hideTimer=setTimeout(()=>ht(t),80)})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=V({type:o,selectors:[["app-churn-chart"]],viewQuery:function(t,d){if(t&1&&(W(Wt,7),W(Ut,7)),t&2){let a;U(a=X())&&(d.svgRef=a.first),U(a=X())&&(d.tooltipRef=a.first)}},inputs:{data:"data",height:"height"},features:[Z],decls:16,vars:1,consts:[["svg",""],["tooltip",""],[1,"chart-shell"],["aria-hidden","true",1,"legend"],[1,"swatch","commits"],[1,"swatch","additions"],[1,"swatch","deletions"],[1,"chart-wrap"],["width","100%","aria-label","Interactive churn over time"],["hidden","",1,"tooltip"]],template:function(t,d){t&1&&(Q(0,"div",2)(1,"div",3)(2,"span"),$(3,"i",4),r(4," commits"),q(),Q(5,"span"),$(6,"i",5),r(7," additions"),q(),Q(8,"span"),$(9,"i",6),r(10," deletions"),q()(),Q(11,"div",7),K(),$(12,"svg",8,0),bt(),$(14,"div",9,1),q()()),t&2&&(s(12),z("height",d.height))},dependencies:[A],styles:["[_nghost-%COMP%]{display:block}.chart-shell[_ngcontent-%COMP%]{display:grid;gap:.45rem}.legend[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.75rem;align-items:center;color:var(--fg-muted);font-size:11px}.legend[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex;gap:.35rem;align-items:center}.swatch[_ngcontent-%COMP%]{display:inline-block;width:9px;height:9px;border-radius:999px}.swatch.commits[_ngcontent-%COMP%]{background:var(--chart-line)}.swatch.additions[_ngcontent-%COMP%]{background:var(--chart-add)}.swatch.deletions[_ngcontent-%COMP%]{background:var(--chart-del)}.chart-wrap[_ngcontent-%COMP%]{position:relative;overflow:hidden;border:1px solid var(--border-soft);border-radius:var(--radius-md);background:radial-gradient(circle at 12% 0%,var(--chart-fill),transparent 34%),linear-gradient(180deg,color-mix(in oklab,var(--bg-surface-2) 58%,transparent),transparent 70%),var(--bg-surface-2)}svg[_ngcontent-%COMP%]{display:block;outline:none}[_nghost-%COMP%] .axis text{font-size:10px;font-family:var(--font-mono, monospace)}[_nghost-%COMP%] .axis path, [_nghost-%COMP%] .axis line{shape-rendering:crispEdges}.tooltip[_ngcontent-%COMP%]{position:absolute;z-index:2;min-width:150px;max-width:240px;padding:.5rem .6rem;border:1px solid var(--border-soft);border-radius:var(--radius-sm);background:var(--bg-elevated);color:var(--fg-primary);box-shadow:var(--shadow-md);font-size:11px;line-height:1.35;pointer-events:none;transform:translate(-50%,calc(-100% - 12px))}.tooltip[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{display:block;margin-bottom:.25rem;font-size:12px}.tooltip[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;color:var(--fg-muted);font-variant-numeric:tabular-nums}.tooltip[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--fg-primary)}"],changeDetection:0})};function ut(o){return e=>{e.selectAll("text").attr("fill",o.muted),e.selectAll("path,line").attr("stroke",o.border)}}function Xt(o,e){o&&(o.hidden=!1,o.style.left=`${e.x}px`,o.style.top=`${e.y}px`,o.innerHTML=`
|
|
2
|
+
<strong>${Yt(e.date)}</strong>
|
|
3
|
+
<div class="row"><span>Commits</span><span class="value">${e.commits}</span></div>
|
|
4
|
+
<div class="row"><span>Additions</span><span class="value">+${e.additions}</span></div>
|
|
5
|
+
<div class="row"><span>Deletions</span><span class="value">-${e.deletions}</span></div>
|
|
6
|
+
<div class="row"><span>Total churn</span><span class="value">${e.churn}</span></div>
|
|
7
|
+
`)}function ht(o){o&&(o.hidden=!0)}function w(o,e,t){return o.getPropertyValue(e).trim()||t}function Yt(o){return o.replace(/[&<>"']/g,e=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[e]??e)}var Kt=["svg"];function Zt(o,e){o&1&&(i(0,"div",5)(1,"span"),r(2,"lower churn"),n(),y(3,"span",6),i(4,"span"),r(5,"higher churn"),n()())}function te(o,e){o&1&&(i(0,"div",7),r(1,"No hotspots in the current window."),n())}var at=class o{data=[];height=320;fileClick=new _t;svgRef;lastRendered=null;lastHeight=0;ngAfterViewInit(){this.render()}ngOnChanges(){this.render()}render(){if(!this.svgRef||this.data===this.lastRendered&&this.height===this.lastHeight)return;this.lastRendered=this.data,this.lastHeight=this.height;let e=this.svgRef.nativeElement,t=e.clientWidth||600,d=F(e);if(d.selectAll("*").remove(),this.data.length===0)return;let a=getComputedStyle(e),m=N(a,"--accent","#4f46e5"),v=N(a,"--fg-muted","#64748b"),b=N(a,"--fg-primary","#0f172a"),g=N(a,"--bg-surface","#ffffff"),H=N(a,"--bg-surface-2","#f3f4f6"),f=N(a,"--border-soft","#e5e7eb"),C=Dt({name:"root",children:this.data}).sum(c=>c.commits??0).sort((c,p)=>(p.value??0)-(c.value??0));Vt().size([t,this.height]).padding(2).round(!0)(C);let I=J(this.data,c=>c.additions+c.deletions)??1,B=At().domain([0,I]).interpolator(Rt(H,m)),L=d.selectAll("g").data(C.leaves()).join("g").attr("class","cell").attr("transform",c=>`translate(${c.x0},${c.y0})`).on("click",(c,p)=>this.fileClick.emit(p.data.file)).on("mouseenter",function(){F(this).select("rect").attr("stroke-width",2.5).attr("filter","url(#hotspot-glow)")}).on("mouseleave",function(){F(this).select("rect").attr("stroke-width",1).attr("filter",null)});d.append("defs").append("filter").attr("id","hotspot-glow").attr("x","-20%").attr("y","-20%").attr("width","140%").attr("height","140%").append("feDropShadow").attr("dx",0).attr("dy",4).attr("stdDeviation",4).attr("flood-color",m).attr("flood-opacity",.28),L.append("rect").attr("width",c=>c.x1-c.x0).attr("height",c=>c.y1-c.y0).attr("rx",6).attr("ry",6).attr("fill",c=>{let p=c.data;return B(p.additions+p.deletions)}).attr("stroke",f).attr("stroke-width",1),L.append("title").text(c=>{let p=c.data;return`${p.file}
|
|
8
|
+
Changed in ${p.commits} commits by ${p.authors} authors
|
|
9
|
+
Line churn: +${p.additions} -${p.deletions}`}),L.append("text").attr("class","cell-label").attr("x",4).attr("y",12).attr("font-size",10).attr("font-family","var(--font-mono, monospace)").attr("fill",b).attr("stroke",g).attr("stroke-width",2.4).attr("paint-order","stroke").attr("pointer-events","none").text(c=>{let p=c.x1-c.x0,j=c.y1-c.y0;if(p<40||j<18)return"";let T=c.data.file;return T.split("/").pop()??T}),L.append("text").attr("x",4).attr("y",26).attr("font-size",9).attr("fill",v).attr("stroke",g).attr("stroke-width",2).attr("paint-order","stroke").attr("pointer-events","none").text(c=>{let p=c.x1-c.x0,j=c.y1-c.y0;if(p<70||j<34)return"";let T=c.data;return`${T.commits} commits \xB7 ${T.authors} authors`})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=V({type:o,selectors:[["app-hotspots-treemap"]],viewQuery:function(t,d){if(t&1&&W(Kt,7),t&2){let a;U(a=X())&&(d.svgRef=a.first)}},inputs:{data:"data",height:"height"},outputs:{fileClick:"fileClick"},features:[Z],decls:5,vars:3,consts:[["svg",""],[1,"treemap-wrap"],["width","100%","aria-label","Hot files treemap. Larger boxes changed in more commits. Stronger color means more line churn."],["class","scale",4,"ngIf"],["class","empty",4,"ngIf"],[1,"scale"],[1,"scale-bar"],[1,"empty"]],template:function(t,d){t&1&&(i(0,"div",1),K(),y(1,"svg",2,0),S(3,Zt,6,0,"div",3)(4,te,2,0,"div",4),n()),t&2&&(s(),z("height",d.height),s(2),u("ngIf",d.data.length),s(),u("ngIf",d.data.length===0))},dependencies:[A,it],styles:["[_nghost-%COMP%]{display:block}.treemap-wrap[_ngcontent-%COMP%]{position:relative;overflow:hidden;border:1px solid var(--border-soft);border-radius:var(--radius-md);background:radial-gradient(circle at 15% 0%,color-mix(in oklab,var(--accent) 12%,transparent),transparent 38%),var(--bg-surface-2)}svg[_ngcontent-%COMP%]{display:block}.scale[_ngcontent-%COMP%]{position:absolute;right:.75rem;bottom:.65rem;display:inline-flex;align-items:center;gap:.45rem;padding:.28rem .5rem;border:1px solid color-mix(in oklab,var(--border-soft) 72%,transparent);border-radius:999px;background:color-mix(in oklab,var(--bg-surface) 88%,transparent);color:var(--fg-muted);font-size:10px;box-shadow:var(--shadow-sm);pointer-events:none}.scale-bar[_ngcontent-%COMP%]{width:64px;height:7px;border-radius:999px;background:linear-gradient(90deg,var(--bg-surface-2),var(--accent))}.empty[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;color:var(--fg-muted);font-size:12px}"],changeDetection:0})};function N(o,e,t){return o.getPropertyValue(e).trim()||t}function ee(o,e){if(o&1&&(i(0,"p",7),r(1),Y(2,"slice"),Y(3,"slice"),n()),o&2){let t=e.ngIf;s(),nt(" ",dt(2,2,t.windowStart,0,10)," \u2192 ",dt(3,6,t.windowEnd,0,10)," ")}}function ne(o,e){o&1&&(i(0,"div",8),r(1,"Computing insights (this may take a few seconds)\u2026"),n())}function ie(o,e){if(o&1&&(i(0,"div",9),r(1),n()),o&2){let t=e.ngIf;s(),h(t)}}function re(o,e){if(o&1&&(i(0,"li")(1,"span",35),r(2),n(),i(3,"div",36)(4,"div",37)(5,"span",38),r(6),n(),i(7,"strong"),r(8),n()(),i(9,"div",39),y(10,"div",40),n(),i(11,"span",41),r(12),Y(13,"date"),Y(14,"date"),n()()()),o&2){let t=e.$implicit,d=e.index,a=_(2);s(),et("--avatar-color",a.avatarColor(d)),s(),h(a.initials(t.author)),s(3),u("title",t.author),s(),h(t.author),s(2),R("",t.commits," commits"),s(),z("aria-label",t.commits+" commits"),s(),et("width",a.barPct(t.commits,a.maxAuthorCommits()),"%"),s(2),nt(" active ",ct(13,11,t.firstCommit,"MMM d")," - ",ct(14,14,t.lastCommit,"MMM d, y")," ")}}function ae(o,e){if(o&1){let t=tt();i(0,"li")(1,"a",42),E("click",function(){let a=O(t).$implicit,m=_(2);return P(m.openFile(a.file))}),r(2),n(),i(3,"span",43),r(4),n(),i(5,"span",43),r(6),n(),i(7,"button",44),E("click",function(){let a=O(t).$implicit,m=_(2);return P(m.openBreakage(a.file))}),r(8," \u26A0 "),n(),i(9,"span",45),r(10),n()()}if(o&2){let t=e.$implicit;s(),u("title",t.file),s(),h(t.file),s(2),R("",t.commits," commits"),s(2),R("",t.authors," authors"),s(4),nt("+",t.additions," \u2212",t.deletions)}}function oe(o,e){if(o&1){let t=tt();i(0,"li")(1,"span",46),r(2),n(),i(3,"div",47)(4,"a",42),E("click",function(){let a=O(t).$implicit,m=_(2);return P(m.openFile(a.file))}),r(5),n(),i(6,"span",48),r(7),n()(),i(8,"div",49)(9,"div",50),y(10,"div",51),n(),i(11,"span",52),r(12),n()(),i(13,"div",53)(14,"span"),r(15),n(),i(16,"span"),r(17),n(),i(18,"span"),r(19),n()(),i(20,"button",54),E("click",function(){let a=O(t).$implicit,m=_(2);return P(m.openBreakage(a.file))}),r(21," \u26A0 Breakage "),n()()}if(o&2){let t=e.$implicit,d=e.index,a=_(2);Ct("risk-high",a.riskLevel(t.riskScore)==="high")("risk-medium",a.riskLevel(t.riskScore)==="medium")("risk-low",a.riskLevel(t.riskScore)==="low"),s(2),h(d+1),s(2),u("title",t.file),s(),h(t.file),s(2),h(t.reason),s(),z("aria-label","Risk score "+a.riskScore(t.riskScore)),s(2),et("width",a.riskPct(t.riskScore),"%"),s(2),h(a.riskScore(t.riskScore)),s(3),R("",t.commits," commits"),s(2),R("",t.authors," authors"),s(2),R("",t.churn," churn")}}function se(o,e){if(o&1){let t=tt();i(0,"div",10)(1,"section",11)(2,"button",12)(3,"span",13),r(4,"Commits analyzed"),n(),i(5,"strong"),r(6),n(),i(7,"span",14),r(8,"current insight window"),n()(),i(9,"button",12)(10,"span",13),r(11,"Contributors"),n(),i(12,"strong"),r(13),n(),i(14,"span",14),r(15),n()(),i(16,"button",15),E("click",function(){let a=O(t).ngIf,m=_();return P(m.openTopHotspot(a))}),i(17,"span",13),r(18,"Hotspots"),n(),i(19,"strong"),r(20),n(),i(21,"span",14),r(22,"click to open the top file"),n()(),i(23,"button",15),E("click",function(){let a=O(t).ngIf,m=_();return P(m.openTopRisk(a))}),i(24,"span",13),r(25,"Risk alerts"),n(),i(26,"strong"),r(27),n(),i(28,"span",14),r(29,"highest churn and ownership risk"),n()()(),i(30,"section",16)(31,"div",17)(32,"div")(33,"p",18),r(34,"Ownership"),n(),i(35,"h3"),r(36,"Top contributors"),n()(),i(37,"p",19),r(38,"Who touched this repo most in the current insight window."),n()(),i(39,"ul",20),S(40,re,15,17,"li",21),n()(),i(41,"section",22)(42,"div",17)(43,"div")(44,"p",18),r(45,"Change concentration"),n(),i(46,"h3"),r(47,"Hot files"),n()(),i(48,"p",19),r(49," Bigger boxes changed in more commits. Stronger color means more line churn. Click any file to open its history. "),n()(),i(50,"div",23)(51,"span")(52,"strong"),r(53,"Size"),n(),r(54," = commit frequency"),n(),i(55,"span")(56,"strong"),r(57,"Color"),n(),r(58," = additions + deletions"),n(),i(59,"span")(60,"strong"),r(61,"People"),n(),r(62," = number of authors touching it"),n()(),i(63,"app-hotspots-treemap",24),E("fileClick",function(a){O(t);let m=_();return P(m.openFile(a))}),n(),i(64,"ul",25),S(65,ae,11,6,"li",21),n()(),i(66,"section",26)(67,"div",17)(68,"div")(69,"p",18),r(70,"Review priority"),n(),i(71,"h3"),r(72,"Risky files"),n()(),i(73,"p",19),r(74," This is a triage signal, not a bug detector. Higher scores mean the file changed a lot, changed recently, and/or has several contributors. "),n()(),i(75,"div",27),y(76,"span",28),i(77,"span"),r(78,"Low"),n(),y(79,"span",29),i(80,"span"),r(81,"Medium"),n(),y(82,"span",30),i(83,"span"),r(84,"High"),n()(),i(85,"ul",31),S(86,oe,22,17,"li",32),n()(),i(87,"section",33)(88,"h3"),r(89,"Churn over time"),n(),y(90,"app-churn-chart",34),n()()}if(o&2){let t=e.ngIf,d=_();s(6),h(t.totalCommits),s(7),h(t.totalAuthors),s(2),h(d.topContributor(t)),s(5),h(t.hotspots.length),s(7),h(t.riskyFiles.length),s(13),u("ngForOf",t.topContributors),s(23),u("data",t.hotspots),s(2),u("ngForOf",t.hotspots.slice(0,5)),s(21),u("ngForOf",t.riskyFiles),s(4),u("data",t.churnByDay)}}var jt=class o{insightsApi=lt(Pt);router=lt(Ot);bundle=G(null);loading=G(!1);error=G(null);maxAuthorCommits=G(0);constructor(){kt(()=>{this.load()})}trackByDate(e,t){return t.date}barPct(e,t){return t>0?Math.round(e/t*100):0}initials(e){let t=e.trim().split(/\s+/).filter(Boolean);if(t.length===0)return"?";let d=t[0]?.[0]??"",a=t.length>1?t[t.length-1]?.[0]??"":t[0]?.[1]??"";return`${d}${a}`.toUpperCase()}avatarColor(e){let t=["#4f46e5","#06b6d4","#10b981","#f59e0b","#ef4444","#8b5cf6"];return t[e%t.length]}riskPct(e){return Math.max(4,Math.min(100,Math.round(e*100)))}riskScore(e){return this.riskPct(e).toString()}riskLevel(e){return e>=.67?"high":e>=.34?"medium":"low"}openFile(e){this.router.navigate(["/file",encodeURIComponent(e)])}openBreakage(e){this.router.navigate(["/file",encodeURIComponent(e)],{queryParams:{tab:"breakage"}})}topContributor(e){let t=e.topContributors[0];return t?t.author:"No author data"}openTopHotspot(e){let t=e.hotspots[0]?.file;t&&this.openFile(t)}openTopRisk(e){let t=e.riskyFiles[0]?.file;t&&this.openFile(t)}load(){this.loading.set(!0),this.error.set(null),this.insightsApi.bundle({maxCommits:500}).subscribe({next:e=>{this.bundle.set(e),this.maxAuthorCommits.set(e.topContributors[0]?.commits??0),this.loading.set(!1)},error:e=>{this.error.set(e?.error?.error??"Failed to load insights"),this.loading.set(!1)}})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=V({type:o,selectors:[["app-insights"]],decls:11,vars:4,consts:[[1,"page"],[1,"head"],[1,"eyebrow"],["class","sub",4,"ngIf"],["class","empty",4,"ngIf"],["class","empty error",4,"ngIf"],["class","grid",4,"ngIf"],[1,"sub"],[1,"empty"],[1,"empty","error"],[1,"grid"],[1,"kpis"],[1,"kpi"],[1,"label"],[1,"hint"],[1,"kpi",3,"click"],[1,"card","contributors-card"],[1,"section-head"],[1,"eyebrow","mini"],[1,"meaning"],["aria-label","Top contributors by commit count",1,"contributors"],[4,"ngFor","ngForOf"],[1,"card","wide","hotspot-card"],[1,"hotspot-help"],[3,"fileClick","data"],["aria-label","Top hot files",1,"hot-list","compact"],[1,"card","wide","risk-card"],[1,"risk-legend"],[1,"legend-dot","low"],[1,"legend-dot","medium"],[1,"legend-dot","high"],["aria-label","Risky files ranked by review priority",1,"risk-list"],[3,"risk-high","risk-medium","risk-low",4,"ngFor","ngForOf"],[1,"card","wide","chart-card"],[3,"data"],[1,"avatar"],[1,"contributor-main"],[1,"contributor-row"],[1,"name",3,"title"],[1,"contributor-bar"],[1,"contributor-fill"],[1,"active-range"],[1,"path",3,"click","title"],[1,"count"],["type","button","title","Open breakage analysis",1,"breakage-link","mini",3,"click"],[1,"churn"],[1,"rank"],[1,"risk-main"],[1,"reason"],[1,"risk-meter"],[1,"risk-track"],[1,"risk-fill"],[1,"risk-score"],[1,"risk-stats"],["type","button","title","Open breakage analysis for this file",1,"breakage-link",3,"click"]],template:function(t,d){t&1&&(i(0,"div",0)(1,"header",1)(2,"div")(3,"p",2),r(4,"Repository intelligence"),n(),i(5,"h2"),r(6,"Insights"),n()(),S(7,ee,4,10,"p",3),n(),S(8,ne,2,0,"div",4)(9,ie,2,1,"div",5)(10,se,91,10,"div",6),n()),t&2&&(s(7),u("ngIf",d.bundle()),s(),u("ngIf",d.loading()),s(),u("ngIf",d.error()),s(),u("ngIf",d.bundle()))},dependencies:[A,yt,it,at,rt,Mt,wt],styles:["[_nghost-%COMP%]{display:block;flex:1;min-height:0;overflow-y:auto}.page[_ngcontent-%COMP%]{padding:1.1rem 1.25rem 1.4rem;max-width:1320px;margin:0 auto}.head[_ngcontent-%COMP%]{display:flex;align-items:end;justify-content:space-between;gap:1rem;margin-bottom:1rem}.eyebrow[_ngcontent-%COMP%]{margin:0 0 .2rem;color:var(--accent);font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:clamp(20px,2vw,28px);letter-spacing:-.03em}.head[_ngcontent-%COMP%] .sub[_ngcontent-%COMP%]{margin:0;color:var(--fg-muted);font-size:13px}.empty[_ngcontent-%COMP%]{padding:2rem;color:var(--fg-muted);text-align:center}.empty.error[_ngcontent-%COMP%]{color:var(--danger)}.grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:1rem}.kpis[_ngcontent-%COMP%]{grid-column:1 / -1;display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.75rem}.kpi[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.25rem;padding:.85rem 1rem;color:var(--fg-primary);background:radial-gradient(circle at 85% 0%,color-mix(in oklab,var(--accent) 16%,transparent),transparent 44%),var(--bg-panel);border:1px solid var(--border-soft);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);cursor:pointer;text-align:left}.kpi[_ngcontent-%COMP%]:hover{border-color:color-mix(in oklab,var(--accent) 36%,var(--border-soft));box-shadow:var(--shadow-md)}.kpi[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--fg-muted);font-size:11px;text-transform:uppercase;letter-spacing:.05em}.kpi[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-size:24px;letter-spacing:-.04em}.kpi[_ngcontent-%COMP%] .hint[_ngcontent-%COMP%]{color:var(--fg-muted);font-size:11px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card[_ngcontent-%COMP%]{background:var(--bg-panel);border:1px solid var(--border-soft);border-radius:var(--radius-lg);padding:1rem 1.25rem;box-shadow:var(--shadow-sm)}.card.wide[_ngcontent-%COMP%]{grid-column:1 / -1}.card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 .75rem;font-size:14px}.section-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:.7rem}.section-head[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:18px;letter-spacing:-.03em}.eyebrow.mini[_ngcontent-%COMP%]{margin-bottom:.1rem;font-size:10px;letter-spacing:.07em}.meaning[_ngcontent-%COMP%]{max-width:440px;margin:0;color:var(--fg-muted);font-size:12px;line-height:1.45;text-align:right}.hotspot-help[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.75rem}.hotspot-help[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem;padding:.25rem .55rem;border:1px solid var(--border-soft);border-radius:999px;background:color-mix(in oklab,var(--bg-surface) 78%,transparent);color:var(--fg-muted);font-size:11px}.hotspot-help[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--fg-primary);font-weight:700}.contributors-card[_ngcontent-%COMP%]{background:radial-gradient(circle at 88% 0%,color-mix(in oklab,var(--accent) 14%,transparent),transparent 38%),var(--bg-panel)}.contributors[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:grid;gap:.65rem}.contributors[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:grid;grid-template-columns:36px minmax(0,1fr);gap:.7rem;align-items:center;padding:.65rem;border:1px solid color-mix(in oklab,var(--border-soft) 72%,transparent);border-radius:var(--radius-md);background:color-mix(in oklab,var(--bg-surface) 62%,transparent);transition:border-color .12s,box-shadow .12s,transform .12s}.contributors[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{border-color:color-mix(in oklab,var(--accent) 36%,var(--border-soft));box-shadow:var(--shadow-md);transform:translateY(-1px)}.avatar[_ngcontent-%COMP%]{--avatar-color: var(--accent);display:inline-grid;place-items:center;width:34px;height:34px;border-radius:999px;background:radial-gradient(circle at 30% 20%,rgba(255,255,255,.28),transparent 36%),var(--avatar-color);color:#fff;font-size:12px;font-weight:800;letter-spacing:.03em;box-shadow:0 0 0 2px color-mix(in oklab,var(--bg-surface) 78%,transparent)}.contributor-main[_ngcontent-%COMP%]{min-width:0;display:grid;gap:.28rem}.contributor-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;justify-content:space-between;gap:.75rem}.name[_ngcontent-%COMP%]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg-primary);font-size:13px;font-weight:600}.contributor-row[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--fg-primary);font-size:12px;font-variant-numeric:tabular-nums}.contributor-bar[_ngcontent-%COMP%]{height:8px;border-radius:999px;overflow:hidden;background:var(--bg-surface-2);border:1px solid color-mix(in oklab,var(--border-soft) 68%,transparent)}.contributor-fill[_ngcontent-%COMP%]{height:100%;background:linear-gradient(90deg,var(--accent),#06b6d4)}.active-range[_ngcontent-%COMP%]{color:var(--fg-muted);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hot-list[_ngcontent-%COMP%], .risk-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}.hot-list.compact[_ngcontent-%COMP%]{margin-top:.75rem;max-height:168px;overflow-y:auto;border:1px solid color-mix(in oklab,var(--border-soft) 72%,transparent);border-radius:var(--radius-md);background:color-mix(in oklab,var(--bg-surface) 58%,transparent)}.hot-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;gap:.6rem;align-items:center;padding:.55rem .7rem;border-bottom:1px solid color-mix(in oklab,var(--border-soft) 50%,transparent);font-size:12px}.hot-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child, .risk-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-bottom:0}.path[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace);color:var(--accent);cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.path[_ngcontent-%COMP%]:hover{text-decoration:underline}.count[_ngcontent-%COMP%], .churn[_ngcontent-%COMP%]{color:var(--fg-muted);font-size:11px}.risk-card[_ngcontent-%COMP%]{background:radial-gradient(circle at 96% 0%,color-mix(in oklab,var(--danger) 12%,transparent),transparent 34%),var(--bg-panel)}.risk-legend[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem;margin-bottom:.75rem;padding:.28rem .55rem;border:1px solid var(--border-soft);border-radius:999px;background:color-mix(in oklab,var(--bg-surface) 72%,transparent);color:var(--fg-muted);font-size:11px}.legend-dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:999px}.legend-dot.low[_ngcontent-%COMP%]{background:var(--success)}.legend-dot.medium[_ngcontent-%COMP%]{background:var(--warning)}.legend-dot.high[_ngcontent-%COMP%]{background:var(--danger)}.risk-list[_ngcontent-%COMP%]{display:grid;gap:.65rem}.risk-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:grid;grid-template-columns:28px minmax(0,1fr) minmax(160px,220px) auto auto;gap:.85rem;align-items:center;padding:.75rem;border:1px solid color-mix(in oklab,var(--border-soft) 72%,transparent);border-radius:var(--radius-md);background:color-mix(in oklab,var(--bg-surface) 66%,transparent);box-shadow:var(--shadow-sm);transition:border-color .12s,box-shadow .12s,transform .12s}.breakage-link[_ngcontent-%COMP%]{background:transparent;border:1px solid var(--border-soft);color:var(--fg-muted);font-size:11px;padding:.25rem .55rem;border-radius:999px;cursor:pointer;white-space:nowrap;transition:color .12s,border-color .12s,background .12s}.breakage-link[_ngcontent-%COMP%]:hover{color:var(--danger, #dc2626);border-color:color-mix(in oklab,var(--danger, #dc2626) 50%,transparent);background:color-mix(in oklab,var(--danger, #dc2626) 10%,transparent)}.breakage-link.mini[_ngcontent-%COMP%]{padding:.1rem .35rem;font-size:12px;line-height:1}.risk-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{border-color:color-mix(in oklab,var(--accent) 36%,var(--border-soft));box-shadow:var(--shadow-md);transform:translateY(-1px)}.rank[_ngcontent-%COMP%]{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:999px;background:var(--bg-surface-2);color:var(--fg-muted);font-size:11px;font-weight:700;font-variant-numeric:tabular-nums}.risk-main[_ngcontent-%COMP%]{min-width:0;display:grid;gap:.25rem}.risk-meter[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:center;gap:.55rem}.risk-track[_ngcontent-%COMP%]{position:relative;height:12px;border-radius:999px;overflow:hidden;background:linear-gradient(90deg,color-mix(in oklab,var(--success) 24%,transparent) 0 33%,color-mix(in oklab,var(--warning) 26%,transparent) 33% 66%,color-mix(in oklab,var(--danger) 28%,transparent) 66% 100%);border:1px solid color-mix(in oklab,var(--border-soft) 70%,transparent)}.risk-fill[_ngcontent-%COMP%]{height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--success),var(--warning),var(--danger))}.risk-score[_ngcontent-%COMP%]{font-size:13px;font-weight:800;color:var(--fg-primary);text-align:right;font-variant-numeric:tabular-nums}.risk-stats[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.35rem;min-width:150px}.risk-stats[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{padding:.18rem .45rem;border-radius:999px;background:var(--bg-surface-2);color:var(--fg-muted);font-size:11px;white-space:nowrap}.reason[_ngcontent-%COMP%]{color:var(--fg-muted);font-size:11px}.risk-high[_ngcontent-%COMP%] .rank[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--danger) 18%,transparent);color:var(--danger)}.risk-medium[_ngcontent-%COMP%] .rank[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--warning) 18%,transparent);color:var(--warning)}.risk-low[_ngcontent-%COMP%] .rank[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--success) 16%,transparent);color:var(--success)}@media (max-width: 900px){.section-head[_ngcontent-%COMP%]{flex-direction:column}.meaning[_ngcontent-%COMP%]{text-align:left}.risk-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{grid-template-columns:28px minmax(0,1fr)}.risk-meter[_ngcontent-%COMP%], .risk-stats[_ngcontent-%COMP%], .breakage-link[_ngcontent-%COMP%]{grid-column:2}.risk-stats[_ngcontent-%COMP%]{justify-content:flex-start}.breakage-link[_ngcontent-%COMP%]{justify-self:start}}"],changeDetection:0})};export{jt as InsightsComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as w}from"./chunk-VGAHCEAA.js";import{a as G}from"./chunk-STUSEB5P.js";import{c as A,e as q}from"./chunk-PXNKNORB.js";import{a as U}from"./chunk-6DL2ZTKG.js";import{$ as C,Hb as V,Ib as b,Kb as a,Lb as c,Mb as u,Nb as T,Ob as H,Pb as $,Qa as r,Wb as y,Za as M,Zb as k,a as D,b as z,cb as m,cc as O,dc as R,ea as v,fa as x,lb as F,oa as g,ob as s,pb as i,pc as P,qb as n,qc as S,rb as B,sc as j,tc as I,vb as N,wb as L,xb as h,yb as f,zb as d}from"./chunk-UM7ESEXJ.js";function Y(t,o){t&1&&(i(0,"div",3),a(1,"Loading blame\u2026"),n())}function Z(t,o){if(t&1&&(i(0,"div",4),a(1),n()),t&2){let e=o.ngIf;r(),c(e)}}function ee(t,o){t&1&&(i(0,"div",3),a(1," No blame data (file may be binary or freshly created). "),n())}function te(t,o){if(t&1){let e=h();i(0,"div",7)(1,"div",8)(2,"code",9),f("click",function(){let p=v(e).$implicit,_=d(2);return x(_.onSelectCommit(p.hash))}),a(3),n(),i(4,"span",10),a(5),n(),i(6,"span",11),a(7),n()(),i(8,"span",12),a(9),n(),i(10,"pre",13),a(11),n()()}if(t&2){let e=o.$implicit,l=d(2);r(),b("invisible",!e.isFirstOfBlock),r(2),c(e.hash.slice(0,7)),r(2),c(e.author),r(2),c(l.shortDate(e.date)),r(2),c(e.line),r(2),c(e.content)}}function ne(t,o){if(t&1&&(i(0,"div",5),m(1,te,12,7,"div",6),n()),t&2){let e=d();r(),s("ngForOf",e.rows())("ngForTrackBy",e.trackByLine)}}var E=class t{gitService=C(w);set file(o){this._file=o,o?this.load(o):this.lines.set([])}get file(){return this._file}_file=null;onCommitClick=null;lines=g([]);loading=g(!1);error=g(null);rows=O(()=>{let o=[],e="";for(let l of this.lines())o.push(z(D({},l),{isFirstOfBlock:l.hash!==e})),e=l.hash;return o});trackByLine(o,e){return e.line}shortDate(o){return(o||"").slice(0,10)}onSelectCommit(o){this.onCommitClick&&this.onCommitClick(o)}load(o){this.loading.set(!0),this.error.set(null),this.gitService.getBlame(o).subscribe({next:e=>{this.lines.set(e),this.loading.set(!1)},error:e=>{this.error.set(e?.error?.error??"Failed to load blame"),this.loading.set(!1)}})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=M({type:t,selectors:[["app-blame"]],inputs:{file:"file",onCommitClick:"onCommitClick"},decls:4,vars:4,consts:[["class","empty",4,"ngIf"],["class","empty error",4,"ngIf"],["class","blame",4,"ngIf"],[1,"empty"],[1,"empty","error"],[1,"blame"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"row"],[1,"meta"],[1,"hash",3,"click"],[1,"author"],[1,"date"],[1,"line-no"],[1,"code"]],template:function(e,l){e&1&&m(0,Y,2,0,"div",0)(1,Z,2,1,"div",1)(2,ee,2,0,"div",0)(3,ne,2,2,"div",2),e&2&&(s("ngIf",l.loading()),r(),s("ngIf",l.error()),r(),s("ngIf",!l.loading()&&!l.error()&&l.rows().length===0&&l.file),r(),s("ngIf",l.rows().length>0))},dependencies:[I,P,S],styles:["[_nghost-%COMP%]{display:block;font-family:var(--font-mono, monospace);font-size:12.5px}.empty[_ngcontent-%COMP%]{padding:1.5rem;color:var(--fg-muted);text-align:center}.empty.error[_ngcontent-%COMP%]{color:var(--danger)}.blame[_ngcontent-%COMP%]{display:block;background:var(--bg-surface);border:1px solid var(--border-soft);border-radius:var(--radius-md);overflow:auto;max-height:70vh}.row[_ngcontent-%COMP%]{display:grid;grid-template-columns:220px 50px 1fr;align-items:center;gap:.5rem;padding:0 .5rem;border-bottom:1px solid color-mix(in oklab,var(--border-soft) 50%,transparent)}.row[_ngcontent-%COMP%]:hover{background:var(--bg-elevated)}.meta[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;font-size:11px;color:var(--fg-muted);padding:.15rem 0;border-right:1px solid var(--border-soft)}.meta.invisible[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{visibility:hidden}.hash[_ngcontent-%COMP%]{color:var(--accent);cursor:pointer;text-decoration:none}.hash[_ngcontent-%COMP%]:hover{text-decoration:underline}.author[_ngcontent-%COMP%]{max-width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.date[_ngcontent-%COMP%]{color:var(--fg-subtle)}.line-no[_ngcontent-%COMP%]{color:var(--fg-subtle);text-align:right;font-variant-numeric:tabular-nums;font-size:11px}.code[_ngcontent-%COMP%]{margin:0;padding:.15rem 0;white-space:pre;overflow-x:auto;color:var(--fg-primary)}"],changeDetection:0})};function ie(t,o){if(t&1&&(i(0,"div",11)(1,"span"),a(2),n(),i(3,"span"),a(4,"\xB7"),n(),i(5,"span"),a(6),n(),i(7,"span"),a(8,"\xB7"),n(),i(9,"span"),a(10),y(11,"slice"),n(),i(12,"span"),a(13,"\xB7"),n(),i(14,"span"),a(15),y(16,"slice"),n()()),t&2){let e=o.ngIf;r(2),u("",e.totalCommits," commits"),r(4),u("",e.contributors.length," contributors"),r(4),u("first: ",k(11,4,e.firstSeen,0,10)),r(5),u("last: ",k(16,8,e.lastTouched,0,10))}}function oe(t,o){t&1&&(i(0,"div",17),a(1,"Loading commits\u2026"),n())}function re(t,o){if(t&1&&(i(0,"div",18),a(1),n()),t&2){let e=o.ngIf;r(),c(e)}}function ae(t,o){if(t&1){let e=h();i(0,"li",19),f("click",function(){let p=v(e).$implicit,_=d(2);return x(_.onSelectCommit(p.hash))}),i(1,"code",20),a(2),n(),i(3,"div",21)(4,"span",22),a(5),n(),i(6,"span",23),a(7),y(8,"slice"),n()()()}if(t&2){let e=o.$implicit,l=d(2);b("selected",e.hash===l.state.selectedHash()),r(2),c(e.shortHash),r(3),c(e.subject),r(2),T("",e.author," \xB7 ",k(8,6,e.date,0,10))}}function le(t,o){if(t&1&&(i(0,"section",12),m(1,oe,2,0,"div",13)(2,re,2,1,"div",14),i(3,"ul",15),m(4,ae,9,10,"li",16),n()()),t&2){let e=d();r(),s("ngIf",e.loading()),r(),s("ngIf",e.error()),r(2),s("ngForOf",e.commits())}}function se(t,o){if(t&1&&(i(0,"section",24),B(1,"app-blame",25),n()),t&2){let e=d();r(),s("file",e.filePath())("onCommitClick",e.onSelectCommit.bind(e))}}function ce(t,o){t&1&&(i(0,"div",17),a(1,"Analyzing breakage history\u2026"),n())}function me(t,o){if(t&1&&(i(0,"div",18),a(1),n()),t&2){let e=o.ngIf;r(),c(e)}}function de(t,o){t&1&&(i(0,"span"),a(1,"\xB7"),n())}function pe(t,o){if(t&1&&(i(0,"span")(1,"strong"),a(2),n(),a(3),n()),t&2){let e=d().ngIf;r(2),c(e.suspects.length),r(),u(" suspect",e.suspects.length===1?"":"s")}}function ge(t,o){t&1&&(i(0,"div",46),a(1," No prior change is strongly correlated with a recent fix. "),n())}function _e(t,o){if(t&1&&(i(0,"li"),a(1),n()),t&2){let e=o.$implicit;r(),c(e)}}function fe(t,o){t&1&&(i(0,"span"),a(1,", "),n())}function ue(t,o){if(t&1){let e=h();i(0,"a",57),f("click",function(p){let _=v(e).$implicit,K=d(6);return p.stopPropagation(),x(K.onSelectCommit(_.hash))}),i(1,"code"),a(2),n(),m(3,fe,2,0,"span",27),n()}if(t&2){let e=o.$implicit,l=o.last;r(2),c(e.shortHash),r(),s("ngIf",!l)}}function ve(t,o){if(t&1&&(i(0,"div",55),a(1),m(2,ue,4,2,"a",56),n()),t&2){let e=d().$implicit;r(),u(" Linked fix",e.linkedFixes.length===1?"":"es",": "),r(),s("ngForOf",e.linkedFixes)}}function xe(t,o){if(t&1){let e=h();i(0,"li",49),f("click",function(){let p=v(e).$implicit,_=d(4);return x(_.onSelectCommit(p.hash))}),i(1,"div",50)(2,"code",20),a(3),n(),i(4,"span",51),a(5),n(),i(6,"span",22),a(7),n()(),i(8,"div",23),a(9),y(10,"slice"),n(),i(11,"ul",52),m(12,_e,2,1,"li",53),n(),m(13,ve,3,2,"div",54),n()}if(t&2){let e=o.$implicit;r(3),c(e.shortHash),r(),F("data-strong",e.score>=8?"true":"false"),r(),c(e.score),r(2),c(e.subject),r(2),H(" ",e.author," \xB7 ",k(10,9,e.date,0,10)," \xB7 ",e.churn," lines changed "),r(3),s("ngForOf",e.reasons),r(),s("ngIf",e.linkedFixes.length)}}function he(t,o){if(t&1&&(i(0,"ol",47),m(1,xe,14,13,"li",48),n()),t&2){let e=d().ngIf;r(),s("ngForOf",e.suspects)}}function be(t,o){t&1&&(i(0,"div",46),a(1," No fix/revert commits matched recent history. "),n())}function Ce(t,o){t&1&&(i(0,"span",62),a(1,"revert"),n())}function ye(t,o){t&1&&(i(0,"span",63),a(1,"fix"),n())}function ke(t,o){if(t&1){let e=h();i(0,"li",19),f("click",function(){let p=v(e).$implicit,_=d(4);return x(_.onSelectCommit(p.hash))}),i(1,"code",20),a(2),n(),i(3,"div",21)(4,"span",22),m(5,Ce,2,0,"span",60)(6,ye,2,0,"span",61),a(7),n(),i(8,"span",23),a(9),y(10,"slice"),n()()()}if(t&2){let e=o.$implicit;b("revert",e.isRevert),r(2),c(e.shortHash),r(3),s("ngIf",e.isRevert),r(),s("ngIf",e.isFix),r(),u(" ",e.subject," "),r(2),H("",e.author," \xB7 ",k(10,9,e.date,0,10)," \xB7 ",e.churn," lines")}}function Me(t,o){if(t&1&&(i(0,"ul",58),m(1,ke,11,13,"li",59),n()),t&2){let e=d().ngIf;r(),s("ngForOf",e.fixCommits)}}function Oe(t,o){if(t&1){let e=h();i(0,"li",66),f("click",function(){let p=v(e).$implicit,_=d(4);return x(_.openFile(p.file))}),i(1,"span",67),a(2),n(),i(3,"span",68),a(4),n()()}if(t&2){let e=o.$implicit;r(2),c(e.file),r(2),u("",e.count,"\xD7")}}function Pe(t,o){if(t&1&&(i(0,"article",37)(1,"header",38)(2,"h3"),a(3,"Often changed together"),n(),i(4,"span",39),a(5,"From recent fixes & suspects"),n()(),i(6,"ul",64),m(7,Oe,5,2,"li",65),n()()),t&2){let e=d().ngIf;r(7),s("ngForOf",e.coChangedFiles)}}function Se(t,o){t&1&&(i(0,"span",63),a(1,"fix"),n())}function Ie(t,o){t&1&&(i(0,"span",62),a(1,"revert"),n())}function we(t,o){if(t&1){let e=h();i(0,"li",19),f("click",function(){let p=v(e).$implicit,_=d(3);return x(_.onSelectCommit(p.hash))}),i(1,"code",20),a(2),n(),i(3,"div",21)(4,"span",22),m(5,Se,2,0,"span",61)(6,Ie,2,0,"span",60),a(7),n(),i(8,"span",23),a(9),y(10,"slice"),n()()()}if(t&2){let e=o.$implicit;b("is-fix",e.isFix||e.isRevert),r(2),c(e.shortHash),r(3),s("ngIf",e.isFix),r(),s("ngIf",e.isRevert),r(),u(" ",e.subject," "),r(2),$("",e.author," \xB7 ",k(10,10,e.date,0,10)," \xB7 +",e.additions,"/-",e.deletions)}}function Ee(t,o){if(t&1&&(N(0),i(1,"div",28)(2,"div",29),B(3,"div",30),n(),i(4,"div",31)(5,"span",32),a(6),n(),i(7,"span",33),a(8),n()(),i(9,"p",34),a(10),n(),i(11,"div",35)(12,"span")(13,"strong"),a(14),n(),a(15," recent touches"),n(),i(16,"span"),a(17,"\xB7"),n(),i(18,"span")(19,"strong"),a(20),n(),a(21," fixes/reverts"),n(),m(22,de,2,0,"span",27)(23,pe,4,2,"span",27),n()(),i(24,"div",36)(25,"article",37)(26,"header",38)(27,"h3"),a(28,"Likely culprits"),n(),i(29,"span",39),a(30,"Scored by proximity to fix commits"),n()(),m(31,ge,2,0,"div",40)(32,he,2,1,"ol",41),n(),i(33,"article",37)(34,"header",38)(35,"h3"),a(36,"Fixes & reverts on this file"),n(),i(37,"span",39),a(38),n()(),m(39,be,2,0,"div",40)(40,Me,2,1,"ul",42),n(),m(41,Pe,8,1,"article",43),i(42,"article",37)(43,"header",38)(44,"h3"),a(45,"Recent commits"),n(),i(46,"span",39),a(47),n()(),i(48,"ul",44),m(49,we,11,14,"li",45),n()()(),L()),t&2){let e=o.ngIf,l=d(2);r(),F("data-level",l.riskLevel()),r(2),V("width",e.riskScore,"%"),r(3),u("",e.riskScore,"/100"),r(2),u("",l.riskLevel()," breakage risk"),r(2),c(e.summary),r(4),c(e.commits.length),r(6),c(e.fixCount),r(2),s("ngIf",e.suspects.length),r(),s("ngIf",e.suspects.length),r(8),s("ngIf",!e.suspects.length),r(),s("ngIf",e.suspects.length),r(6),T("",e.fixCount," of ",e.commits.length," recent commits"),r(),s("ngIf",!e.fixCommits.length),r(),s("ngIf",e.fixCommits.length),r(),s("ngIf",e.coChangedFiles.length),r(6),u("Last ",e.commits.length," touches"),r(2),s("ngForOf",e.commits)}}function Fe(t,o){if(t&1&&(i(0,"section",26),m(1,ce,2,0,"div",13)(2,me,2,1,"div",14)(3,Ee,50,19,"ng-container",27),n()),t&2){let e=d();r(),s("ngIf",e.breakageLoading()),r(),s("ngIf",e.breakageError()),r(),s("ngIf",e.breakage())}}var J=class t{route=C(A);router=C(q);git=C(w);insightsApi=C(U);state=C(G);filePath=g("");stats=g(null);commits=g([]);loading=g(!1);error=g(null);tab=g("history");breakage=g(null);breakageLoading=g(!1);breakageError=g(null);riskLevel=O(()=>{let o=this.breakage()?.riskScore??0;return o>=60?"high":o>=30?"moderate":"low"});constructor(){R(()=>{let o=this.route.snapshot.paramMap.get("path")??"",e=decodeURIComponent(o),l=this.route.snapshot.queryParamMap.get("tab");(l==="breakage"||l==="blame"||l==="history")&&this.tab.set(l),this.filePath.set(e),e&&this.load(e)})}onSelectCommit(o){this.state.selectHash(o),this.router.navigate(["/"],{queryParams:{commit:o}})}goBack(){this.router.navigate(["/"])}onSelectBreakageTab(){this.tab.set("breakage"),!this.breakage()&&!this.breakageLoading()&&this.loadBreakage(this.filePath())}openFile(o){o&&this.router.navigate(["/file",encodeURIComponent(o)])}load(o){this.loading.set(!0),this.error.set(null),this.breakage.set(null),this.breakageError.set(null),this.insightsApi.fileStats(o).subscribe({next:e=>this.stats.set(e),error:()=>this.stats.set(null)}),this.git.getCommits({file:o,page:1,pageSize:200}).subscribe({next:e=>{this.commits.set(e.commits),this.loading.set(!1)},error:e=>{this.error.set(e?.error?.error??"Failed to load file history"),this.loading.set(!1)}}),this.tab()==="breakage"&&this.loadBreakage(o)}loadBreakage(o){o&&(this.breakageLoading.set(!0),this.breakageError.set(null),this.insightsApi.breakage(o).subscribe({next:e=>{this.breakage.set(e),this.breakageLoading.set(!1)},error:e=>{this.breakageError.set(e?.error?.error??"Failed to analyze breakage"),this.breakageLoading.set(!1)}}))}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=M({type:t,selectors:[["app-file-history"]],decls:18,vars:11,consts:[[1,"page"],[1,"head"],[1,"btn","btn-ghost",3,"click"],[1,"title-block"],["class","meta",4,"ngIf"],[1,"tabs"],[1,"tab",3,"click"],["title","Heuristic analysis of recent fixes/reverts and likely culprits.",1,"tab",3,"click"],["class","history",4,"ngIf"],["class","blame-tab",4,"ngIf"],["class","breakage","data-testid","breakage-tab",4,"ngIf"],[1,"meta"],[1,"history"],["class","empty",4,"ngIf"],["class","empty error",4,"ngIf"],[1,"commits"],["class","commit",3,"selected","click",4,"ngFor","ngForOf"],[1,"empty"],[1,"empty","error"],[1,"commit",3,"click"],[1,"hash"],[1,"info"],[1,"subject"],[1,"byline"],[1,"blame-tab"],[3,"file","onCommitClick"],["data-testid","breakage-tab",1,"breakage"],[4,"ngIf"],[1,"risk-card"],["aria-hidden","true",1,"risk-meter"],[1,"risk-meter-fill"],[1,"risk-meta"],[1,"risk-score"],[1,"risk-label"],[1,"summary"],[1,"risk-stats"],[1,"cards"],[1,"card"],[1,"card-head"],[1,"hint"],["class","empty inline",4,"ngIf"],["class","suspects",4,"ngIf"],["class","fixes",4,"ngIf"],["class","card",4,"ngIf"],[1,"recent"],["class","commit",3,"is-fix","click",4,"ngFor","ngForOf"],[1,"empty","inline"],[1,"suspects"],["class","suspect",3,"click",4,"ngFor","ngForOf"],[1,"suspect",3,"click"],[1,"suspect-row"],[1,"score"],[1,"reasons"],[4,"ngFor","ngForOf"],["class","linked",4,"ngIf"],[1,"linked"],["class","link",3,"click",4,"ngFor","ngForOf"],[1,"link",3,"click"],[1,"fixes"],["class","commit",3,"revert","click",4,"ngFor","ngForOf"],["class","tag",4,"ngIf"],["class","tag fix",4,"ngIf"],[1,"tag"],[1,"tag","fix"],[1,"cochanged"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"path"],[1,"count"]],template:function(e,l){e&1&&(i(0,"div",0)(1,"header",1)(2,"button",2),f("click",function(){return l.goBack()}),a(3,"\u2190 Back"),n(),i(4,"div",3)(5,"h2"),a(6),n(),m(7,ie,17,12,"div",4),n()(),i(8,"nav",5)(9,"button",6),f("click",function(){return l.tab.set("history")}),a(10," History "),n(),i(11,"button",6),f("click",function(){return l.tab.set("blame")}),a(12," Blame "),n(),i(13,"button",7),f("click",function(){return l.onSelectBreakageTab()}),a(14," Breakage Analysis "),n()(),m(15,le,5,3,"section",8)(16,se,2,2,"section",9)(17,Fe,4,3,"section",10),n()),e&2&&(r(6),c(l.filePath()),r(),s("ngIf",l.stats()),r(2),b("active",l.tab()==="history"),r(2),b("active",l.tab()==="blame"),r(2),b("active",l.tab()==="breakage"),r(2),s("ngIf",l.tab()==="history"),r(),s("ngIf",l.tab()==="blame"),r(),s("ngIf",l.tab()==="breakage"))},dependencies:[I,P,S,E,j],styles:["[_nghost-%COMP%]{display:block;flex:1;min-height:0;overflow-y:auto}.page[_ngcontent-%COMP%]{padding:1.1rem 1.25rem;max-width:1200px;margin:0 auto}.head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:1rem;padding:.9rem 1rem;background:var(--bg-panel);border:1px solid var(--border-soft);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm)}.head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:16px;font-family:var(--font-mono, monospace);word-break:break-all}.meta[_ngcontent-%COMP%]{color:var(--fg-muted);font-size:12px;display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.25rem}.tabs[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.25rem;border:1px solid var(--border-soft);border-radius:999px;background:var(--bg-panel);margin-bottom:1rem;width:fit-content}.tab[_ngcontent-%COMP%]{background:transparent;border:0;padding:.5rem .75rem;cursor:pointer;color:var(--fg-muted);border-radius:999px;font-size:13px}.tab.active[_ngcontent-%COMP%]{color:var(--accent);background:var(--accent-soft);font-weight:600}.empty[_ngcontent-%COMP%]{padding:1.5rem;color:var(--fg-muted);text-align:center;font-size:13px}.empty.error[_ngcontent-%COMP%]{color:var(--danger)}.commits[_ngcontent-%COMP%]{list-style:none;margin:0;padding:.35rem;background:var(--bg-panel);border:1px solid var(--border-soft);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm)}.commit[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:flex-start;padding:.55rem .85rem;border-radius:var(--radius-md);cursor:pointer}.commit[_ngcontent-%COMP%]:hover{background:var(--bg-elevated)}.commit.selected[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--accent) 18%,transparent)}.commit[_ngcontent-%COMP%] .hash[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace);font-size:11px;color:var(--fg-muted);padding-top:2px}.commit[_ngcontent-%COMP%] .info[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.commit[_ngcontent-%COMP%] .subject[_ngcontent-%COMP%]{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.commit[_ngcontent-%COMP%] .byline[_ngcontent-%COMP%]{font-size:11px;color:var(--fg-muted);margin-top:2px}.breakage[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.risk-card[_ngcontent-%COMP%]{padding:1rem 1.1rem;border:1px solid var(--border-soft);border-radius:var(--radius-lg);background:var(--bg-panel);box-shadow:var(--shadow-sm);display:flex;flex-direction:column;gap:.55rem}.risk-meter[_ngcontent-%COMP%]{width:100%;height:8px;background:var(--bg-elevated);border-radius:999px;overflow:hidden}.risk-meter-fill[_ngcontent-%COMP%]{height:100%;background:var(--accent);transition:width .3s ease}.risk-card[data-level=high][_ngcontent-%COMP%] .risk-meter-fill[_ngcontent-%COMP%]{background:var(--danger, #dc2626)}.risk-card[data-level=moderate][_ngcontent-%COMP%] .risk-meter-fill[_ngcontent-%COMP%]{background:var(--warning, #d97706)}.risk-card[data-level=low][_ngcontent-%COMP%] .risk-meter-fill[_ngcontent-%COMP%]{background:var(--success, #16a34a)}.risk-meta[_ngcontent-%COMP%]{display:flex;gap:.6rem;align-items:baseline;font-size:13px}.risk-score[_ngcontent-%COMP%]{font-weight:700;font-family:var(--font-mono, monospace)}.risk-label[_ngcontent-%COMP%]{color:var(--fg-muted);text-transform:capitalize}.summary[_ngcontent-%COMP%]{margin:0;font-size:13px;line-height:1.5}.risk-stats[_ngcontent-%COMP%]{display:flex;gap:.4rem;flex-wrap:wrap;font-size:12px;color:var(--fg-muted)}.risk-stats[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--fg);font-weight:600}.cards[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:1rem}.card[_ngcontent-%COMP%]{background:var(--bg-panel);border:1px solid var(--border-soft);border-radius:var(--radius-lg);box-shadow:var(--shadow-sm);padding:.85rem;display:flex;flex-direction:column;gap:.6rem;min-width:0}.card-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:baseline;gap:.5rem}.card-head[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:13px;font-weight:600}.hint[_ngcontent-%COMP%]{font-size:11px;color:var(--fg-muted)}.empty.inline[_ngcontent-%COMP%]{padding:.75rem;font-size:12px}.suspects[_ngcontent-%COMP%], .fixes[_ngcontent-%COMP%], .recent[_ngcontent-%COMP%], .cochanged[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.4rem}.suspect[_ngcontent-%COMP%]{padding:.55rem .7rem;border:1px solid var(--border-soft);border-radius:var(--radius-md);cursor:pointer;background:var(--bg-elevated)}.suspect[_ngcontent-%COMP%]:hover{border-color:var(--accent)}.suspect-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.suspect-row[_ngcontent-%COMP%] .subject[_ngcontent-%COMP%]{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}.score[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace);font-size:11px;padding:1px 6px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-weight:700}.score[data-strong=true][_ngcontent-%COMP%]{background:color-mix(in oklab,var(--danger, #dc2626) 18%,transparent);color:var(--danger, #dc2626)}.reasons[_ngcontent-%COMP%]{list-style:none;margin:.35rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.3rem}.reasons[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:11px;color:var(--fg-muted);padding:1px 6px;border-radius:6px;background:var(--bg-panel);border:1px solid var(--border-soft)}.linked[_ngcontent-%COMP%]{margin-top:.35rem;font-size:11px;color:var(--fg-muted)}.linked[_ngcontent-%COMP%] .link[_ngcontent-%COMP%]{cursor:pointer;color:var(--accent)}.linked[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace)}.tag[_ngcontent-%COMP%]{display:inline-block;font-size:10px;text-transform:uppercase;letter-spacing:.04em;padding:1px 5px;border-radius:4px;background:var(--bg-elevated);color:var(--fg-muted);margin-right:.25rem;vertical-align:middle}.tag.fix[_ngcontent-%COMP%]{background:color-mix(in oklab,var(--accent) 18%,transparent);color:var(--accent)}.commit.revert[_ngcontent-%COMP%] .tag[_ngcontent-%COMP%], .commit.is-fix[_ngcontent-%COMP%] .tag.fix[_ngcontent-%COMP%]{font-weight:600}.cochanged[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:.5rem;padding:.4rem .6rem;border-radius:var(--radius-md);cursor:pointer;font-size:12px}.cochanged[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background:var(--bg-elevated)}.cochanged[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{font-family:var(--font-mono, monospace);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.cochanged[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{color:var(--fg-muted);flex-shrink:0}"],changeDetection:0})};export{J as FileHistoryComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as f,$a as Ne,$b as Tn,Aa as tr,B as Y,Ba as rr,Ca as he,Cb as En,D as te,Da as fe,E as ue,Ea as rn,Eb as bn,Fa as nn,Fb as In,G as Wt,Ga as on,H as le,Ha as sn,Ia as an,J as it,Ja as cn,K as Q,Ka as un,L as Zt,La as re,M as qr,Na as ln,O as Gr,Q as Wr,R as _,Ra as _e,S as Yt,T as I,Ta as dn,U as w,Ua as nr,Va as k,W as R,Wa as hn,Xa as fn,Y as Zr,Ya as ir,Z as T,Za as pn,_ as m,a as l,aa as Qt,b as L,ba as Yr,bc as K,ca as de,da as j,db as gn,e as $r,eb as ne,ec as An,f as zr,fb as pe,fc as Mn,g as Hr,gc as ct,h as Ft,hb as or,i as Vt,ia as Qr,ib as vn,ic as Dn,j as V,ja as ot,jb as mn,jc as ut,k as x,ka as N,kb as sr,kc as Pe,la as Kr,lb as yn,lc as On,ma as Kt,mb as Sn,mc as _n,na as st,nb as Rn,nc as Nn,o as q,oa as at,oc as lt,p as D,pa as Xr,q as d,r as Me,rb as wn,s as Br,sa as De,t as Fr,ta as Xt,u as S,ua as Jr,uc as Pn,v as qt,va as Jt,vc as Un,w as O,wa as en,wc as Ln,x as Gt,xa as er,y as Vr,ya as tn,yb as Cn,z as nt,za as Oe}from"./chunk-UM7ESEXJ.js";var ft=new T(""),dr=(()=>{class t{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,r){this._zone=r,e.forEach(i=>{i.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,r,i,o){return this._findPluginFor(r).addEventListener(e,r,i,o)}getZone(){return this._zone}_findPluginFor(e){let r=this._eventNameToPlugin.get(e);if(r)return r;if(r=this._plugins.find(o=>o.supports(e)),!r)throw new w(5101,!1);return this._eventNameToPlugin.set(e,r),r}static \u0275fac=function(r){return new(r||t)(m(ft),m(pe))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Ue=class{_doc;constructor(n){this._doc=n}manager},ar="ng-app-id";function xn(t){for(let n of t)n.remove()}function jn(t,n){let e=n.createElement("style");return e.textContent=t,e}function $i(t,n,e,r){let i=t.head?.querySelectorAll(`style[${ar}="${n}"],link[${ar}="${n}"]`);if(i)for(let o of i)o.removeAttribute(ar),o instanceof HTMLLinkElement?r.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function ur(t,n){let e=n.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",t),e}var hr=(()=>{class t{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,r,i,o={}){this.doc=e,this.appId=r,this.nonce=i,$i(e,r,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,r){for(let i of e)this.addUsage(i,this.inline,jn);r?.forEach(i=>this.addUsage(i,this.external,ur))}removeStyles(e,r){for(let i of e)this.removeUsage(i,this.inline);r?.forEach(i=>this.removeUsage(i,this.external))}addUsage(e,r,i){let o=r.get(e);o?o.usage++:r.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,i(e,this.doc)))})}removeUsage(e,r){let i=r.get(e);i&&(i.usage--,i.usage<=0&&(xn(i.elements),r.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])xn(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[r,{elements:i}]of this.inline)i.push(this.addElement(e,jn(r,this.doc)));for(let[r,{elements:i}]of this.external)i.push(this.addElement(e,ur(r,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,r){return this.nonce&&r.setAttribute("nonce",this.nonce),e.appendChild(r)}static \u0275fac=function(r){return new(r||t)(m(N),m(er),m(tr,8),m(Oe))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),cr={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/",math:"http://www.w3.org/1998/Math/MathML"},fr=/%COMP%/g;var $n="%COMP%",zi=`_nghost-${$n}`,Hi=`_ngcontent-${$n}`,Bi=!0,Fi=new T("",{providedIn:"root",factory:()=>Bi});function Vi(t){return Hi.replace(fr,t)}function qi(t){return zi.replace(fr,t)}function zn(t,n){return n.map(e=>e.replace(fr,t))}var pr=(()=>{class t{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;platformId;ngZone;nonce;animationDisabled;maxAnimationTimeout;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;registry;constructor(e,r,i,o,s,a,c,u=null,h,v,y=null){this.eventManager=e,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=c,this.nonce=u,this.animationDisabled=h,this.maxAnimationTimeout=v,this.tracingService=y,this.platformIsServer=!1,this.defaultRenderer=new Le(e,s,c,this.platformIsServer,this.tracingService,this.registry=Qr(),this.maxAnimationTimeout)}createRenderer(e,r){if(!e||!r)return this.defaultRenderer;let i=this.getOrCreateRenderer(e,r);return i instanceof dt?i.applyToHost(e):i instanceof xe&&i.applyStyles(),i}getOrCreateRenderer(e,r){let i=this.rendererByCompId,o=i.get(r.id);if(!o){let s=this.doc,a=this.ngZone,c=this.eventManager,u=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,v=this.platformIsServer,y=this.tracingService;switch(r.encapsulation){case rr.Emulated:o=new dt(c,u,r,this.appId,h,s,a,v,y,this.registry,this.animationDisabled,this.maxAnimationTimeout);break;case rr.ShadowDom:return new lr(c,u,e,r,s,a,this.nonce,v,y,this.registry,this.maxAnimationTimeout);default:o=new xe(c,u,r,h,s,a,v,y,this.registry,this.animationDisabled,this.maxAnimationTimeout);break}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(r){return new(r||t)(m(dr),m(hr),m(er),m(Fi),m(N),m(Oe),m(pe),m(tr),m(Sn),m(Rn),m(gn,8))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Le=class{eventManager;doc;ngZone;platformIsServer;tracingService;registry;maxAnimationTimeout;data=Object.create(null);throwOnSyntheticProps=!0;constructor(n,e,r,i,o,s,a){this.eventManager=n,this.doc=e,this.ngZone=r,this.platformIsServer=i,this.tracingService=o,this.registry=s,this.maxAnimationTimeout=a}destroy(){}destroyNode=null;createElement(n,e){return e?this.doc.createElementNS(cr[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(kn(n)?n.content:n).appendChild(e)}insertBefore(n,e,r){n&&(kn(n)?n.content:n).insertBefore(e,r)}removeChild(n,e){let{elements:r}=this.registry;if(r){r.animate(e,()=>e.remove(),this.maxAnimationTimeout);return}e.remove()}selectRootElement(n,e){let r=typeof n=="string"?this.doc.querySelector(n):n;if(!r)throw new w(-5104,!1);return e||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,r,i){if(i){e=i+":"+e;let o=cr[i];o?n.setAttributeNS(o,e,r):n.setAttribute(e,r)}else n.setAttribute(e,r)}removeAttribute(n,e,r){if(r){let i=cr[r];i?n.removeAttributeNS(i,e):n.removeAttribute(`${r}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,r,i){i&(_e.DashCase|_e.Important)?n.style.setProperty(e,r,i&_e.Important?"important":""):n.style[e]=r}removeStyle(n,e,r){r&_e.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,r){n!=null&&(n[e]=r)}setValue(n,e){n.nodeValue=e}listen(n,e,r,i){if(typeof n=="string"&&(n=Pe().getGlobalEventTarget(this.doc,n),!n))throw new w(5102,!1);let o=this.decoratePreventDefault(r);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(n,e,o)),this.eventManager.addEventListener(n,e,o,i)}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;n(e)===!1&&e.preventDefault()}}};function kn(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var lr=class extends Le{sharedStylesHost;hostEl;shadowRoot;constructor(n,e,r,i,o,s,a,c,u,h,v){super(n,o,s,c,u,h,v),this.sharedStylesHost=e,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let y=i.styles;y=zn(i.id,y);for(let C of y){let M=document.createElement("style");a&&M.setAttribute("nonce",a),M.textContent=C,this.shadowRoot.appendChild(M)}let E=i.getExternalStyles?.();if(E)for(let C of E){let M=ur(C,o);a&&M.setAttribute("nonce",a),this.shadowRoot.appendChild(M)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,r){return super.insertBefore(this.nodeOrShadowRoot(n),e,r)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},xe=class extends Le{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;_animationDisabled;constructor(n,e,r,i,o,s,a,c,u,h,v,y){super(n,o,s,a,c,u,v),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=i,this._animationDisabled=h;let E=r.styles;this.styles=y?zn(y,E):E,this.styleUrls=r.getExternalStyles?.(y)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){if(this.removeStylesOnCompDestroy){if(!this._animationDisabled&&this.registry.elements){this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)},this.maxAnimationTimeout)});return}this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}}},dt=class extends xe{contentAttr;hostAttr;constructor(n,e,r,i,o,s,a,c,u,h,v,y){let E=i+"-"+r.id;super(n,e,r,o,s,a,c,u,h,v,y,E),this.contentAttr=Vi(E),this.hostAttr=qi(E)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let r=super.createElement(n,e);return super.setAttribute(r,this.contentAttr,""),r}};var pt=class t extends _n{supportsDOMEvents=!0;static makeCurrent(){On(new t)}onAndCancel(n,e,r,i){return n.addEventListener(e,r,i),()=>{n.removeEventListener(e,r,i)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=Wi();return e==null?null:Zi(e)}resetBaseElement(){je=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return Pn(document.cookie,n)}},je=null;function Wi(){return je=je||document.head.querySelector("base"),je?je.getAttribute("href"):null}function Zi(t){return new URL(t,document.baseURI).pathname}var Yi=(()=>{class t{build(){return new XMLHttpRequest}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Vn=(()=>{class t extends Ue{constructor(e){super(e)}supports(e){return!0}addEventListener(e,r,i,o){return e.addEventListener(r,i,o),()=>this.removeEventListener(e,r,i,o)}removeEventListener(e,r,i,o){return e.removeEventListener(r,i,o)}static \u0275fac=function(r){return new(r||t)(m(N))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})(),Hn=["alt","control","meta","shift"],Qi={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Ki={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},qn=(()=>{class t extends Ue{constructor(e){super(e)}supports(e){return t.parseEventName(e)!=null}addEventListener(e,r,i,o){let s=t.parseEventName(r),a=t.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Pe().onAndCancel(e,s.domEventName,a,o))}static parseEventName(e){let r=e.toLowerCase().split("."),i=r.shift();if(r.length===0||!(i==="keydown"||i==="keyup"))return null;let o=t._normalizeKey(r.pop()),s="",a=r.indexOf("code");if(a>-1&&(r.splice(a,1),s="code."),Hn.forEach(u=>{let h=r.indexOf(u);h>-1&&(r.splice(h,1),s+=u+".")}),s+=o,r.length!=0||o.length===0)return null;let c={};return c.domEventName=i,c.fullKey=s,c}static matchEventFullKeyCode(e,r){let i=Qi[e.key]||e.key,o="";return r.indexOf("code.")>-1&&(i=e.code,o="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),Hn.forEach(s=>{if(s!==i){let a=Ki[s];a(e)&&(o+=s+".")}}),o+=i,o===r)}static eventCallback(e,r,i){return o=>{t.matchEventFullKeyCode(o,e)&&i.runGuarded(()=>r(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(r){return new(r||t)(m(N))};static \u0275prov=R({token:t,factory:t.\u0275fac})}return t})();function Xi(t,n){let e=l({rootComponent:t},Ji(n));return Dn(e)}function Ji(t){return{appProviders:[...io,...t?.providers??[]],platformProviders:no}}function eo(){pt.makeCurrent()}function to(){return new Kt}function ro(){return en(document),document}var no=[{provide:Oe,useValue:Ln},{provide:tn,useValue:eo,multi:!0},{provide:N,useFactory:ro}];var io=[{provide:Yr,useValue:"root"},{provide:Kt,useFactory:to},{provide:ft,useClass:Vn,multi:!0,deps:[N]},{provide:ft,useClass:qn,multi:!0,deps:[N]},pr,hr,dr,{provide:dn,useExisting:pr},{provide:Un,useClass:Yi},[]];var Gn=(()=>{class t{_doc;constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static \u0275fac=function(r){return new(r||t)(m(N))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var ao=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:function(r){let i=null;return r?i=new(r||t):i=m(co),i},providedIn:"root"})}return t})(),co=(()=>{class t extends ao{_doc;constructor(e){super(),this._doc=e}sanitize(e,r){if(r==null)return null;switch(e){case re.NONE:return r;case re.HTML:return fe(r,"HTML")?he(r):un(this._doc,String(r)).toString();case re.STYLE:return fe(r,"Style")?he(r):r;case re.SCRIPT:if(fe(r,"Script"))return he(r);throw new w(5200,!1);case re.URL:return fe(r,"URL")?he(r):cn(String(r));case re.RESOURCE_URL:if(fe(r,"ResourceURL"))return he(r);throw new w(5201,!1);default:throw new w(5202,!1)}}bypassSecurityTrustHtml(e){return rn(e)}bypassSecurityTrustStyle(e){return nn(e)}bypassSecurityTrustScript(e){return on(e)}bypassSecurityTrustUrl(e){return sn(e)}bypassSecurityTrustResourceUrl(e){return an(e)}static \u0275fac=function(r){return new(r||t)(m(N))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p="primary",Xe=Symbol("RouteTitle"),Sr=class{params;constructor(n){this.params=n||{}}has(n){return Object.prototype.hasOwnProperty.call(this.params,n)}get(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e[0]:e}return null}getAll(n){if(this.has(n)){let e=this.params[n];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function se(t){return new Sr(t)}function ei(t,n,e){let r=e.path.split("/");if(r.length>t.length||e.pathMatch==="full"&&(n.hasChildren()||r.length<t.length))return null;let i={};for(let o=0;o<r.length;o++){let s=r[o],a=t[o];if(s[0]===":")i[s.substring(1)]=a;else if(s!==a.path)return null}return{consumed:t.slice(0,r.length),posParams:i}}function lo(t,n){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!H(t[e],n[e]))return!1;return!0}function H(t,n){let e=t?Rr(t):void 0,r=n?Rr(n):void 0;if(!e||!r||e.length!=r.length)return!1;let i;for(let o=0;o<e.length;o++)if(i=e[o],!ti(t[i],n[i]))return!1;return!0}function Rr(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t)]}function ti(t,n){if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return!1;let e=[...t].sort(),r=[...n].sort();return e.every((i,o)=>r[o]===i)}else return t===n}function ri(t){return t.length>0?t[t.length-1]:null}function Z(t){return Br(t)?t:vn(t)?D(Promise.resolve(t)):d(t)}var ho={exact:ii,subset:oi},ni={exact:fo,subset:po,ignored:()=>!0};function Wn(t,n,e){return ho[e.paths](t.root,n.root,e.matrixParams)&&ni[e.queryParams](t.queryParams,n.queryParams)&&!(e.fragment==="exact"&&t.fragment!==n.fragment)}function fo(t,n){return H(t,n)}function ii(t,n,e){if(!ie(t.segments,n.segments)||!mt(t.segments,n.segments,e)||t.numberOfChildren!==n.numberOfChildren)return!1;for(let r in n.children)if(!t.children[r]||!ii(t.children[r],n.children[r],e))return!1;return!0}function po(t,n){return Object.keys(n).length<=Object.keys(t).length&&Object.keys(n).every(e=>ti(t[e],n[e]))}function oi(t,n,e){return si(t,n,n.segments,e)}function si(t,n,e,r){if(t.segments.length>e.length){let i=t.segments.slice(0,e.length);return!(!ie(i,e)||n.hasChildren()||!mt(i,e,r))}else if(t.segments.length===e.length){if(!ie(t.segments,e)||!mt(t.segments,e,r))return!1;for(let i in n.children)if(!t.children[i]||!oi(t.children[i],n.children[i],r))return!1;return!0}else{let i=e.slice(0,t.segments.length),o=e.slice(t.segments.length);return!ie(t.segments,i)||!mt(t.segments,i,r)||!t.children[p]?!1:si(t.children[p],n,o,r)}}function mt(t,n,e){return n.every((r,i)=>ni[e](t[i].parameters,r.parameters))}var F=class{root;queryParams;fragment;_queryParamMap;constructor(n=new g([],{}),e={},r=null){this.root=n,this.queryParams=e,this.fragment=r}get queryParamMap(){return this._queryParamMap??=se(this.queryParams),this._queryParamMap}toString(){return mo.serialize(this)}},g=class{segments;children;parent=null;constructor(n,e){this.segments=n,this.children=e,Object.values(e).forEach(r=>r.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return yt(this)}},X=class{path;parameters;_parameterMap;constructor(n,e){this.path=n,this.parameters=e}get parameterMap(){return this._parameterMap??=se(this.parameters),this._parameterMap}toString(){return ci(this)}};function go(t,n){return ie(t,n)&&t.every((e,r)=>H(e.parameters,n[r].parameters))}function ie(t,n){return t.length!==n.length?!1:t.every((e,r)=>e.path===n[r].path)}function vo(t,n){let e=[];return Object.entries(t.children).forEach(([r,i])=>{r===p&&(e=e.concat(n(i,r)))}),Object.entries(t.children).forEach(([r,i])=>{r!==p&&(e=e.concat(n(i,r)))}),e}var Je=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>new ae,providedIn:"root"})}return t})(),ae=class{parse(n){let e=new Cr(n);return new F(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(n){let e=`/${ke(n.root,!0)}`,r=Ro(n.queryParams),i=typeof n.fragment=="string"?`#${yo(n.fragment)}`:"";return`${e}${r}${i}`}},mo=new ae;function yt(t){return t.segments.map(n=>ci(n)).join("/")}function ke(t,n){if(!t.hasChildren())return yt(t);if(n){let e=t.children[p]?ke(t.children[p],!1):"",r=[];return Object.entries(t.children).forEach(([i,o])=>{i!==p&&r.push(`${i}:${ke(o,!1)}`)}),r.length>0?`${e}(${r.join("//")})`:e}else{let e=vo(t,(r,i)=>i===p?[ke(t.children[p],!1)]:[`${i}:${ke(r,!1)}`]);return Object.keys(t.children).length===1&&t.children[p]!=null?`${yt(t)}/${e[0]}`:`${yt(t)}/(${e.join("//")})`}}function ai(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function gt(t){return ai(t).replace(/%3B/gi,";")}function yo(t){return encodeURI(t)}function wr(t){return ai(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function St(t){return decodeURIComponent(t)}function Zn(t){return St(t.replace(/\+/g,"%20"))}function ci(t){return`${wr(t.path)}${So(t.parameters)}`}function So(t){return Object.entries(t).map(([n,e])=>`;${wr(n)}=${wr(e)}`).join("")}function Ro(t){let n=Object.entries(t).map(([e,r])=>Array.isArray(r)?r.map(i=>`${gt(e)}=${gt(i)}`).join("&"):`${gt(e)}=${gt(r)}`).filter(e=>e);return n.length?`?${n.join("&")}`:""}var wo=/^[^\/()?;#]+/;function gr(t){let n=t.match(wo);return n?n[0]:""}var Co=/^[^\/()?;=#]+/;function Eo(t){let n=t.match(Co);return n?n[0]:""}var bo=/^[^=?&#]+/;function Io(t){let n=t.match(bo);return n?n[0]:""}var To=/^[^&#]+/;function Ao(t){let n=t.match(To);return n?n[0]:""}var Cr=class{url;remaining;constructor(n){this.url=n,this.remaining=n}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new g([],{}):new g([],this.parseChildren())}parseQueryParams(){let n={};if(this.consumeOptional("?"))do this.parseQueryParam(n);while(this.consumeOptional("&"));return n}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let n=[];for(this.peekStartsWith("(")||n.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),n.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let r={};return this.peekStartsWith("(")&&(r=this.parseParens(!1)),(n.length>0||Object.keys(e).length>0)&&(r[p]=new g(n,e)),r}parseSegment(){let n=gr(this.remaining);if(n===""&&this.peekStartsWith(";"))throw new w(4009,!1);return this.capture(n),new X(St(n),this.parseMatrixParams())}parseMatrixParams(){let n={};for(;this.consumeOptional(";");)this.parseParam(n);return n}parseParam(n){let e=Eo(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let i=gr(this.remaining);i&&(r=i,this.capture(r))}n[St(e)]=St(r)}parseQueryParam(n){let e=Io(this.remaining);if(!e)return;this.capture(e);let r="";if(this.consumeOptional("=")){let s=Ao(this.remaining);s&&(r=s,this.capture(r))}let i=Zn(e),o=Zn(r);if(n.hasOwnProperty(i)){let s=n[i];Array.isArray(s)||(s=[s],n[i]=s),s.push(o)}else n[i]=o}parseParens(n){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let r=gr(this.remaining),i=this.remaining[r.length];if(i!=="/"&&i!==")"&&i!==";")throw new w(4010,!1);let o;r.indexOf(":")>-1?(o=r.slice(0,r.indexOf(":")),this.capture(o),this.capture(":")):n&&(o=p);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[p]:new g([],s),this.consumeOptional("//")}return e}peekStartsWith(n){return this.remaining.startsWith(n)}consumeOptional(n){return this.peekStartsWith(n)?(this.remaining=this.remaining.substring(n.length),!0):!1}capture(n){if(!this.consumeOptional(n))throw new w(4011,!1)}};function ui(t){return t.segments.length>0?new g([],{[p]:t}):t}function li(t){let n={};for(let[r,i]of Object.entries(t.children)){let o=li(i);if(r===p&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))n[s]=a;else(o.segments.length>0||o.hasChildren())&&(n[r]=o)}let e=new g(t.segments,n);return Mo(e)}function Mo(t){if(t.numberOfChildren===1&&t.children[p]){let n=t.children[p];return new g(t.segments.concat(n.segments),n.children)}return t}function J(t){return t instanceof F}function di(t,n,e=null,r=null){let i=hi(t);return fi(i,n,e,r)}function hi(t){let n;function e(o){let s={};for(let c of o.children){let u=e(c);s[c.outlet]=u}let a=new g(o.url,s);return o===t&&(n=a),a}let r=e(t.root),i=ui(r);return n??i}function fi(t,n,e,r){let i=t;for(;i.parent;)i=i.parent;if(n.length===0)return vr(i,i,i,e,r);let o=Do(n);if(o.toRoot())return vr(i,i,new g([],{}),e,r);let s=Oo(o,i,t),a=s.processChildren?ze(s.segmentGroup,s.index,o.commands):gi(s.segmentGroup,s.index,o.commands);return vr(i,s.segmentGroup,a,e,r)}function Rt(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function Fe(t){return typeof t=="object"&&t!=null&&t.outlets}function vr(t,n,e,r,i){let o={};r&&Object.entries(r).forEach(([c,u])=>{o[c]=Array.isArray(u)?u.map(h=>`${h}`):`${u}`});let s;t===n?s=e:s=pi(t,n,e);let a=ui(li(s));return new F(a,o,i)}function pi(t,n,e){let r={};return Object.entries(t.children).forEach(([i,o])=>{o===n?r[i]=e:r[i]=pi(o,n,e)}),new g(t.segments,r)}var wt=class{isAbsolute;numberOfDoubleDots;commands;constructor(n,e,r){if(this.isAbsolute=n,this.numberOfDoubleDots=e,this.commands=r,n&&r.length>0&&Rt(r[0]))throw new w(4003,!1);let i=r.find(Fe);if(i&&i!==ri(r))throw new w(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function Do(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new wt(!0,0,t);let n=0,e=!1,r=t.reduce((i,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,u])=>{a[c]=typeof u=="string"?u.split("/"):u}),[...i,{outlets:a}]}if(o.segmentPath)return[...i,o.segmentPath]}return typeof o!="string"?[...i,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?e=!0:a===".."?n++:a!=""&&i.push(a))}),i):[...i,o]},[]);return new wt(e,n,r)}var me=class{segmentGroup;processChildren;index;constructor(n,e,r){this.segmentGroup=n,this.processChildren=e,this.index=r}};function Oo(t,n,e){if(t.isAbsolute)return new me(n,!0,0);if(!e)return new me(n,!1,NaN);if(e.parent===null)return new me(e,!0,0);let r=Rt(t.commands[0])?0:1,i=e.segments.length-1+r;return _o(e,i,t.numberOfDoubleDots)}function _o(t,n,e){let r=t,i=n,o=e;for(;o>i;){if(o-=i,r=r.parent,!r)throw new w(4005,!1);i=r.segments.length}return new me(r,!1,i-o)}function No(t){return Fe(t[0])?t[0].outlets:{[p]:t}}function gi(t,n,e){if(t??=new g([],{}),t.segments.length===0&&t.hasChildren())return ze(t,n,e);let r=Po(t,n,e),i=e.slice(r.commandIndex);if(r.match&&r.pathIndex<t.segments.length){let o=new g(t.segments.slice(0,r.pathIndex),{});return o.children[p]=new g(t.segments.slice(r.pathIndex),t.children),ze(o,0,i)}else return r.match&&i.length===0?new g(t.segments,{}):r.match&&!t.hasChildren()?Er(t,n,e):r.match?ze(t,0,i):Er(t,n,e)}function ze(t,n,e){if(e.length===0)return new g(t.segments,{});{let r=No(e),i={};if(Object.keys(r).some(o=>o!==p)&&t.children[p]&&t.numberOfChildren===1&&t.children[p].segments.length===0){let o=ze(t.children[p],n,e);return new g(t.segments,o.children)}return Object.entries(r).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(i[o]=gi(t.children[o],n,s))}),Object.entries(t.children).forEach(([o,s])=>{r[o]===void 0&&(i[o]=s)}),new g(t.segments,i)}}function Po(t,n,e){let r=0,i=n,o={match:!1,pathIndex:0,commandIndex:0};for(;i<t.segments.length;){if(r>=e.length)return o;let s=t.segments[i],a=e[r];if(Fe(a))break;let c=`${a}`,u=r<e.length-1?e[r+1]:null;if(i>0&&c===void 0)break;if(c&&u&&typeof u=="object"&&u.outlets===void 0){if(!Qn(c,u,s))return o;r+=2}else{if(!Qn(c,{},s))return o;r++}i++}return{match:!0,pathIndex:i,commandIndex:r}}function Er(t,n,e){let r=t.segments.slice(0,n),i=0;for(;i<e.length;){let o=e[i];if(Fe(o)){let c=Uo(o.outlets);return new g(r,c)}if(i===0&&Rt(e[0])){let c=t.segments[n];r.push(new X(c.path,Yn(e[0]))),i++;continue}let s=Fe(o)?o.outlets[p]:`${o}`,a=i<e.length-1?e[i+1]:null;s&&a&&Rt(a)?(r.push(new X(s,Yn(a))),i+=2):(r.push(new X(s,{})),i++)}return new g(r,{})}function Uo(t){let n={};return Object.entries(t).forEach(([e,r])=>{typeof r=="string"&&(r=[r]),r!==null&&(n[e]=Er(new g([],{}),0,r))}),n}function Yn(t){let n={};return Object.entries(t).forEach(([e,r])=>n[e]=`${r}`),n}function Qn(t,n,e){return t==e.path&&H(n,e.parameters)}var He="imperative",b=(function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t})(b||{}),U=class{id;url;constructor(n,e){this.id=n,this.url=e}},ce=class extends U{type=b.NavigationStart;navigationTrigger;restoredState;constructor(n,e,r="imperative",i=null){super(n,e),this.navigationTrigger=r,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},z=class extends U{urlAfterRedirects;type=b.NavigationEnd;constructor(n,e,r){super(n,e),this.urlAfterRedirects=r}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},A=(function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t[t.Aborted=4]="Aborted",t})(A||{}),Ve=(function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t})(Ve||{}),B=class extends U{reason;code;type=b.NavigationCancel;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},G=class extends U{reason;code;type=b.NavigationSkipped;constructor(n,e,r,i){super(n,e),this.reason=r,this.code=i}},Se=class extends U{error;target;type=b.NavigationError;constructor(n,e,r,i){super(n,e),this.error=r,this.target=i}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},qe=class extends U{urlAfterRedirects;state;type=b.RoutesRecognized;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ct=class extends U{urlAfterRedirects;state;type=b.GuardsCheckStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Et=class extends U{urlAfterRedirects;state;shouldActivate;type=b.GuardsCheckEnd;constructor(n,e,r,i,o){super(n,e),this.urlAfterRedirects=r,this.state=i,this.shouldActivate=o}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},bt=class extends U{urlAfterRedirects;state;type=b.ResolveStart;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},It=class extends U{urlAfterRedirects;state;type=b.ResolveEnd;constructor(n,e,r,i){super(n,e),this.urlAfterRedirects=r,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Tt=class{route;type=b.RouteConfigLoadStart;constructor(n){this.route=n}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},At=class{route;type=b.RouteConfigLoadEnd;constructor(n){this.route=n}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Mt=class{snapshot;type=b.ChildActivationStart;constructor(n){this.snapshot=n}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Dt=class{snapshot;type=b.ChildActivationEnd;constructor(n){this.snapshot=n}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Ot=class{snapshot;type=b.ActivationStart;constructor(n){this.snapshot=n}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},_t=class{snapshot;type=b.ActivationEnd;constructor(n){this.snapshot=n}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var Ge=class{},Re=class{url;navigationBehaviorOptions;constructor(n,e){this.url=n,this.navigationBehaviorOptions=e}};function Lo(t){return!(t instanceof Ge)&&!(t instanceof Re)}function xo(t,n){return t.providers&&!t._injector&&(t._injector=ir(t.providers,n,`Route: ${t.path}`)),t._injector??n}function $(t){return t.outlet||p}function jo(t,n){let e=t.filter(r=>$(r)===n);return e.push(...t.filter(r=>$(r)!==n)),e}function Ee(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let n=t.parent;n;n=n.parent){let e=n.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var Nt=class{rootInjector;outlet=null;route=null;children;attachRef=null;get injector(){return Ee(this.route?.snapshot)??this.rootInjector}constructor(n){this.rootInjector=n,this.children=new be(this.rootInjector)}},be=(()=>{class t{rootInjector;contexts=new Map;constructor(e){this.rootInjector=e}onChildOutletCreated(e,r){let i=this.getOrCreateContext(e);i.outlet=r,this.contexts.set(e,i)}onChildOutletDestroyed(e){let r=this.getContext(e);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let r=this.getContext(e);return r||(r=new Nt(this.rootInjector),this.contexts.set(e,r)),r}getContext(e){return this.contexts.get(e)||null}static \u0275fac=function(r){return new(r||t)(m(de))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Pt=class{_root;constructor(n){this._root=n}get root(){return this._root.value}parent(n){let e=this.pathFromRoot(n);return e.length>1?e[e.length-2]:null}children(n){let e=br(n,this._root);return e?e.children.map(r=>r.value):[]}firstChild(n){let e=br(n,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(n){let e=Ir(n,this._root);return e.length<2?[]:e[e.length-2].children.map(i=>i.value).filter(i=>i!==n)}pathFromRoot(n){return Ir(n,this._root).map(e=>e.value)}};function br(t,n){if(t===n.value)return n;for(let e of n.children){let r=br(t,e);if(r)return r}return null}function Ir(t,n){if(t===n.value)return[n];for(let e of n.children){let r=Ir(t,e);if(r.length)return r.unshift(n),r}return[]}var P=class{value;children;constructor(n,e){this.value=n,this.children=e}toString(){return`TreeNode(${this.value})`}};function ve(t){let n={};return t&&t.children.forEach(e=>n[e.value.outlet]=e),n}var We=class extends Pt{snapshot;constructor(n,e){super(n),this.snapshot=e,Pr(this,n)}toString(){return this.snapshot.toString()}};function vi(t){let n=ko(t),e=new x([new X("",{})]),r=new x({}),i=new x({}),o=new x({}),s=new x(""),a=new W(e,r,o,s,i,p,t,n.root);return a.snapshot=n.root,new We(new P(a,[]),n)}function ko(t){let n={},e={},r={},o=new oe([],n,r,"",e,p,t,null,{});return new Ze("",new P(o,[]))}var W=class{urlSubject;paramsSubject;queryParamsSubject;fragmentSubject;dataSubject;outlet;component;snapshot;_futureSnapshot;_routerState;_paramMap;_queryParamMap;title;url;params;queryParams;fragment;data;constructor(n,e,r,i,o,s,a,c){this.urlSubject=n,this.paramsSubject=e,this.queryParamsSubject=r,this.fragmentSubject=i,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(S(u=>u[Xe]))??d(void 0),this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(S(n=>se(n))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(S(n=>se(n))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Ut(t,n,e="emptyOnly"){let r,{routeConfig:i}=t;return n!==null&&(e==="always"||i?.path===""||!n.component&&!n.routeConfig?.loadComponent)?r={params:l(l({},n.params),t.params),data:l(l({},n.data),t.data),resolve:l(l(l(l({},t.data),n.data),i?.data),t._resolvedData)}:r={params:l({},t.params),data:l({},t.data),resolve:l(l({},t.data),t._resolvedData??{})},i&&yi(i)&&(r.resolve[Xe]=i.title),r}var oe=class{url;params;queryParams;fragment;data;outlet;component;routeConfig;_resolve;_resolvedData;_routerState;_paramMap;_queryParamMap;get title(){return this.data?.[Xe]}constructor(n,e,r,i,o,s,a,c,u){this.url=n,this.params=e,this.queryParams=r,this.fragment=i,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=se(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=se(this.queryParams),this._queryParamMap}toString(){let n=this.url.map(r=>r.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${n}', path:'${e}')`}},Ze=class extends Pt{url;constructor(n,e){super(e),this.url=n,Pr(this,e)}toString(){return mi(this._root)}};function Pr(t,n){n.value._routerState=t,n.children.forEach(e=>Pr(t,e))}function mi(t){let n=t.children.length>0?` { ${t.children.map(mi).join(", ")} } `:"";return`${t.value}${n}`}function mr(t){if(t.snapshot){let n=t.snapshot,e=t._futureSnapshot;t.snapshot=e,H(n.queryParams,e.queryParams)||t.queryParamsSubject.next(e.queryParams),n.fragment!==e.fragment&&t.fragmentSubject.next(e.fragment),H(n.params,e.params)||t.paramsSubject.next(e.params),lo(n.url,e.url)||t.urlSubject.next(e.url),H(n.data,e.data)||t.dataSubject.next(e.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Tr(t,n){let e=H(t.params,n.params)&&go(t.url,n.url),r=!t.parent!=!n.parent;return e&&!r&&(!t.parent||Tr(t.parent,n.parent))}function yi(t){return typeof t.title=="string"||t.title===null}var Si=new T(""),Ur=(()=>{class t{activated=null;get activatedComponentRef(){return this.activated}_activatedRoute=null;name=p;activateEvents=new ne;deactivateEvents=new ne;attachEvents=new ne;detachEvents=new ne;routerOutletData=Mn(void 0);parentContexts=f(be);location=f(hn);changeDetector=f(ct);inputBinder=f(kt,{optional:!0});supportsBindingToComponentInputs=!0;ngOnChanges(e){if(e.name){let{firstChange:r,previousValue:i}=e.name;if(r)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new w(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new w(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new w(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,r){this.activated=e,this._activatedRoute=r,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,r){if(this.isActivated)throw new w(4013,!1);this._activatedRoute=e;let i=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,c=new Ar(e,a,i.injector,this.routerOutletData);this.activated=i.createComponent(s,{index:i.length,injector:c,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static \u0275fac=function(r){return new(r||t)};static \u0275dir=Ne({type:t,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],features:[De]})}return t})(),Ar=class{route;childContexts;parent;outletData;constructor(n,e,r,i){this.route=n,this.childContexts=e,this.parent=r,this.outletData=i}get(n,e){return n===W?this.route:n===be?this.childContexts:n===Si?this.outletData:this.parent.get(n,e)}},kt=new T("");var Lr=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275cmp=pn({type:t,selectors:[["ng-component"]],exportAs:["emptyRouterOutlet"],decls:1,vars:0,template:function(r,i){r&1&&wn(0,"router-outlet")},dependencies:[Ur],encapsulation:2})}return t})();function xr(t){let n=t.children&&t.children.map(xr),e=n?L(l({},t),{children:n}):l({},t);return!e.component&&!e.loadComponent&&(n||e.loadChildren)&&e.outlet&&e.outlet!==p&&(e.component=Lr),e}function $o(t,n,e){let r=Ye(t,n._root,e?e._root:void 0);return new We(r,n)}function Ye(t,n,e){if(e&&t.shouldReuseRoute(n.value,e.value.snapshot)){let r=e.value;r._futureSnapshot=n.value;let i=zo(t,n,e);return new P(r,i)}else{if(t.shouldAttach(n.value)){let o=t.retrieve(n.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=n.value,s.children=n.children.map(a=>Ye(t,a)),s}}let r=Ho(n.value),i=n.children.map(o=>Ye(t,o));return new P(r,i)}}function zo(t,n,e){return n.children.map(r=>{for(let i of e.children)if(t.shouldReuseRoute(r.value,i.value.snapshot))return Ye(t,r,i);return Ye(t,r)})}function Ho(t){return new W(new x(t.url),new x(t.params),new x(t.queryParams),new x(t.fragment),new x(t.data),t.outlet,t.component,t)}var we=class{redirectTo;navigationBehaviorOptions;constructor(n,e){this.redirectTo=n,this.navigationBehaviorOptions=e}},Ri="ngNavigationCancelingError";function Lt(t,n){let{redirectTo:e,navigationBehaviorOptions:r}=J(n)?{redirectTo:n,navigationBehaviorOptions:void 0}:n,i=wi(!1,A.Redirect);return i.url=e,i.navigationBehaviorOptions=r,i}function wi(t,n){let e=new Error(`NavigationCancelingError: ${t||""}`);return e[Ri]=!0,e.cancellationCode=n,e}function Bo(t){return Ci(t)&&J(t.url)}function Ci(t){return!!t&&t[Ri]}var Fo=(t,n,e,r)=>S(i=>(new Mr(n,i.targetRouterState,i.currentRouterState,e,r).activate(t),i)),Mr=class{routeReuseStrategy;futureState;currState;forwardEvent;inputBindingEnabled;constructor(n,e,r,i,o){this.routeReuseStrategy=n,this.futureState=e,this.currState=r,this.forwardEvent=i,this.inputBindingEnabled=o}activate(n){let e=this.futureState._root,r=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,r,n),mr(this.futureState.root),this.activateChildRoutes(e,r,n)}deactivateChildRoutes(n,e,r){let i=ve(e);n.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,i[s],r),delete i[s]}),Object.values(i).forEach(o=>{this.deactivateRouteAndItsChildren(o,r)})}deactivateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(i===o)if(i.component){let s=r.getContext(i.outlet);s&&this.deactivateChildRoutes(n,e,s.children)}else this.deactivateChildRoutes(n,e,r);else o&&this.deactivateRouteAndItsChildren(e,r)}deactivateRouteAndItsChildren(n,e){n.value.component&&this.routeReuseStrategy.shouldDetach(n.value.snapshot)?this.detachAndStoreRouteSubtree(n,e):this.deactivateRouteAndOutlet(n,e)}detachAndStoreRouteSubtree(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=ve(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);if(r&&r.outlet){let s=r.outlet.detach(),a=r.children.onOutletDeactivated();this.routeReuseStrategy.store(n.value.snapshot,{componentRef:s,route:n,contexts:a})}}deactivateRouteAndOutlet(n,e){let r=e.getContext(n.value.outlet),i=r&&n.value.component?r.children:e,o=ve(n);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,i);r&&(r.outlet&&(r.outlet.deactivate(),r.children.onOutletDeactivated()),r.attachRef=null,r.route=null)}activateChildRoutes(n,e,r){let i=ve(e);n.children.forEach(o=>{this.activateRoutes(o,i[o.value.outlet],r),this.forwardEvent(new _t(o.value.snapshot))}),n.children.length&&this.forwardEvent(new Dt(n.value.snapshot))}activateRoutes(n,e,r){let i=n.value,o=e?e.value:null;if(mr(i),i===o)if(i.component){let s=r.getOrCreateContext(i.outlet);this.activateChildRoutes(n,e,s.children)}else this.activateChildRoutes(n,e,r);else if(i.component){let s=r.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){let a=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),mr(a.route.value),this.activateChildRoutes(n,null,s.children)}else s.attachRef=null,s.route=i,s.outlet&&s.outlet.activateWith(i,s.injector),this.activateChildRoutes(n,null,s.children)}else this.activateChildRoutes(n,null,r)}},xt=class{path;route;constructor(n){this.path=n,this.route=this.path[this.path.length-1]}},ye=class{component;route;constructor(n,e){this.component=n,this.route=e}};function Vo(t,n,e){let r=t._root,i=n?n._root:null;return $e(r,i,e,[r.value])}function qo(t){let n=t.routeConfig?t.routeConfig.canActivateChild:null;return!n||n.length===0?null:{node:t,guards:n}}function Ie(t,n){let e=Symbol(),r=n.get(t,e);return r===e?typeof t=="function"&&!Zr(t)?t:n.get(t):r}function $e(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=ve(n);return t.children.forEach(s=>{Go(s,o[s.value.outlet],e,r.concat([s.value]),i),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>Be(a,e.getContext(s),i)),i}function Go(t,n,e,r,i={canDeactivateChecks:[],canActivateChecks:[]}){let o=t.value,s=n?n.value:null,a=e?e.getContext(t.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=Wo(s,o,o.routeConfig.runGuardsAndResolvers);c?i.canActivateChecks.push(new xt(r)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?$e(t,n,a?a.children:null,r,i):$e(t,n,e,r,i),c&&a&&a.outlet&&a.outlet.isActivated&&i.canDeactivateChecks.push(new ye(a.outlet.component,s))}else s&&Be(n,a,i),i.canActivateChecks.push(new xt(r)),o.component?$e(t,null,a?a.children:null,r,i):$e(t,null,e,r,i);return i}function Wo(t,n,e){if(typeof e=="function")return e(t,n);switch(e){case"pathParamsChange":return!ie(t.url,n.url);case"pathParamsOrQueryParamsChange":return!ie(t.url,n.url)||!H(t.queryParams,n.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Tr(t,n)||!H(t.queryParams,n.queryParams);case"paramsChange":default:return!Tr(t,n)}}function Be(t,n,e){let r=ve(t),i=t.value;Object.entries(r).forEach(([o,s])=>{i.component?n?Be(s,n.children.getContext(o),e):Be(s,null,e):Be(s,n,e)}),i.component?n&&n.outlet&&n.outlet.isActivated?e.canDeactivateChecks.push(new ye(n.outlet.component,i)):e.canDeactivateChecks.push(new ye(null,i)):e.canDeactivateChecks.push(new ye(null,i))}function et(t){return typeof t=="function"}function Zo(t){return typeof t=="boolean"}function Yo(t){return t&&et(t.canLoad)}function Qo(t){return t&&et(t.canActivate)}function Ko(t){return t&&et(t.canActivateChild)}function Xo(t){return t&&et(t.canDeactivate)}function Jo(t){return t&&et(t.canMatch)}function Ei(t){return t instanceof Fr||t?.name==="EmptyError"}var vt=Symbol("INITIAL_VALUE");function Ce(){return _(t=>qt(t.map(n=>n.pipe(le(1),Wr(vt)))).pipe(S(n=>{for(let e of n)if(e!==!0){if(e===vt)return vt;if(e===!1||es(e))return e}return!0}),Y(n=>n!==vt),le(1)))}function es(t){return J(t)||t instanceof we}function ts(t,n){return O(e=>{let{targetSnapshot:r,currentSnapshot:i,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?d(L(l({},e),{guardsResult:!0})):rs(s,r,i,t).pipe(O(a=>a&&Zo(a)?ns(r,o,t,n):d(a)),S(a=>L(l({},e),{guardsResult:a})))})}function rs(t,n,e,r){return D(t).pipe(O(i=>cs(i.component,i.route,e,n,r)),Q(i=>i!==!0,!0))}function ns(t,n,e,r){return D(n).pipe(ue(i=>Vr(os(i.route.parent,r),is(i.route,r),as(t,i.path,e),ss(t,i.route,e))),Q(i=>i!==!0,!0))}function is(t,n){return t!==null&&n&&n(new Ot(t)),d(!0)}function os(t,n){return t!==null&&n&&n(new Mt(t)),d(!0)}function ss(t,n,e){let r=n.routeConfig?n.routeConfig.canActivate:null;if(!r||r.length===0)return d(!0);let i=r.map(o=>nt(()=>{let s=Ee(n)??e,a=Ie(o,s),c=Qo(a)?a.canActivate(n,t):j(s,()=>a(n,t));return Z(c).pipe(Q())}));return d(i).pipe(Ce())}function as(t,n,e){let r=n[n.length-1],o=n.slice(0,n.length-1).reverse().map(s=>qo(s)).filter(s=>s!==null).map(s=>nt(()=>{let a=s.guards.map(c=>{let u=Ee(s.node)??e,h=Ie(c,u),v=Ko(h)?h.canActivateChild(r,t):j(u,()=>h(r,t));return Z(v).pipe(Q())});return d(a).pipe(Ce())}));return d(o).pipe(Ce())}function cs(t,n,e,r,i){let o=n&&n.routeConfig?n.routeConfig.canDeactivate:null;if(!o||o.length===0)return d(!0);let s=o.map(a=>{let c=Ee(n)??i,u=Ie(a,c),h=Xo(u)?u.canDeactivate(t,n,e,r):j(c,()=>u(t,n,e,r));return Z(h).pipe(Q())});return d(s).pipe(Ce())}function us(t,n,e,r){let i=n.canLoad;if(i===void 0||i.length===0)return d(!0);let o=i.map(s=>{let a=Ie(s,t),c=Yo(a)?a.canLoad(n,e):j(t,()=>a(n,e));return Z(c)});return d(o).pipe(Ce(),bi(r))}function bi(t){return zr(I(n=>{if(typeof n!="boolean")throw Lt(t,n)}),S(n=>n===!0))}function ls(t,n,e,r){let i=n.canMatch;if(!i||i.length===0)return d(!0);let o=i.map(s=>{let a=Ie(s,t),c=Jo(a)?a.canMatch(n,e):j(t,()=>a(n,e));return Z(c)});return d(o).pipe(Ce(),bi(r))}var Qe=class{segmentGroup;constructor(n){this.segmentGroup=n||null}},Ke=class extends Error{urlTree;constructor(n){super(),this.urlTree=n}};function ge(t){return Me(new Qe(t))}function ds(t){return Me(new w(4e3,!1))}function hs(t){return Me(wi(!1,A.GuardRejected))}var Dr=class{urlSerializer;urlTree;constructor(n,e){this.urlSerializer=n,this.urlTree=e}lineralizeSegments(n,e){let r=[],i=e.root;for(;;){if(r=r.concat(i.segments),i.numberOfChildren===0)return d(r);if(i.numberOfChildren>1||!i.children[p])return ds(`${n.redirectTo}`);i=i.children[p]}}applyRedirectCommands(n,e,r,i,o){return fs(e,i,o).pipe(S(s=>{if(s instanceof F)throw new Ke(s);let a=this.applyRedirectCreateUrlTree(s,this.urlSerializer.parse(s),n,r);if(s[0]==="/")throw new Ke(a);return a}))}applyRedirectCreateUrlTree(n,e,r,i){let o=this.createSegmentGroup(n,e.root,r,i);return new F(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(n,e){let r={};return Object.entries(n).forEach(([i,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);r[i]=e[a]}else r[i]=o}),r}createSegmentGroup(n,e,r,i){let o=this.createSegments(n,e.segments,r,i),s={};return Object.entries(e.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(n,c,r,i)}),new g(o,s)}createSegments(n,e,r,i){return e.map(o=>o.path[0]===":"?this.findPosParam(n,o,i):this.findOrReturn(o,r))}findPosParam(n,e,r){let i=r[e.path.substring(1)];if(!i)throw new w(4001,!1);return i}findOrReturn(n,e){let r=0;for(let i of e){if(i.path===n.path)return e.splice(r),i;r++}return n}};function fs(t,n,e){if(typeof t=="string")return d(t);let r=t,{queryParams:i,fragment:o,routeConfig:s,url:a,outlet:c,params:u,data:h,title:v}=n;return Z(j(e,()=>r({params:u,data:h,queryParams:i,fragment:o,routeConfig:s,url:a,outlet:c,title:v})))}var Or={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function ps(t,n,e,r,i){let o=Ii(t,n,e);return o.matched?(r=xo(n,r),ls(r,n,e,i).pipe(S(s=>s===!0?o:l({},Or)))):d(o)}function Ii(t,n,e){if(n.path==="**")return gs(e);if(n.path==="")return n.pathMatch==="full"&&(t.hasChildren()||e.length>0)?l({},Or):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let i=(n.matcher||ei)(e,t,n);if(!i)return l({},Or);let o={};Object.entries(i.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=i.consumed.length>0?l(l({},o),i.consumed[i.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:i.consumed,remainingSegments:e.slice(i.consumed.length),parameters:s,positionalParamSegments:i.posParams??{}}}function gs(t){return{matched:!0,parameters:t.length>0?ri(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function Kn(t,n,e,r){return e.length>0&&ys(t,e,r)?{segmentGroup:new g(n,ms(r,new g(e,t.children))),slicedSegments:[]}:e.length===0&&Ss(t,e,r)?{segmentGroup:new g(t.segments,vs(t,e,r,t.children)),slicedSegments:e}:{segmentGroup:new g(t.segments,t.children),slicedSegments:e}}function vs(t,n,e,r){let i={};for(let o of e)if($t(t,n,o)&&!r[$(o)]){let s=new g([],{});i[$(o)]=s}return l(l({},r),i)}function ms(t,n){let e={};e[p]=n;for(let r of t)if(r.path===""&&$(r)!==p){let i=new g([],{});e[$(r)]=i}return e}function ys(t,n,e){return e.some(r=>$t(t,n,r)&&$(r)!==p)}function Ss(t,n,e){return e.some(r=>$t(t,n,r))}function $t(t,n,e){return(t.hasChildren()||n.length>0)&&e.pathMatch==="full"?!1:e.path===""}function Rs(t,n,e){return n.length===0&&!t.children[e]}var _r=class{};function ws(t,n,e,r,i,o,s="emptyOnly"){return new Nr(t,n,e,r,i,s,o).recognize()}var Cs=31,Nr=class{injector;configLoader;rootComponentType;config;urlTree;paramsInheritanceStrategy;urlSerializer;applyRedirects;absoluteRedirectCount=0;allowRedirects=!0;constructor(n,e,r,i,o,s,a){this.injector=n,this.configLoader=e,this.rootComponentType=r,this.config=i,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Dr(this.urlSerializer,this.urlTree)}noMatchError(n){return new w(4002,`'${n.segmentGroup}'`)}recognize(){let n=Kn(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(n).pipe(S(({children:e,rootSnapshot:r})=>{let i=new P(r,e),o=new Ze("",i),s=di(r,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(n){let e=new oe([],Object.freeze({}),Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),p,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,n,p,e).pipe(S(r=>({children:r,rootSnapshot:e})),te(r=>{if(r instanceof Ke)return this.urlTree=r.urlTree,this.match(r.urlTree.root);throw r instanceof Qe?this.noMatchError(r):r}))}processSegmentGroup(n,e,r,i,o){return r.segments.length===0&&r.hasChildren()?this.processChildren(n,e,r,o):this.processSegment(n,e,r,r.segments,i,!0,o).pipe(S(s=>s instanceof P?[s]:[]))}processChildren(n,e,r,i){let o=[];for(let s of Object.keys(r.children))s==="primary"?o.unshift(s):o.push(s);return D(o).pipe(ue(s=>{let a=r.children[s],c=jo(e,s);return this.processSegmentGroup(n,c,a,s,i)}),Gr((s,a)=>(s.push(...a),s)),Wt(null),qr(),O(s=>{if(s===null)return ge(r);let a=Ti(s);return Es(a),d(a)}))}processSegment(n,e,r,i,o,s,a){return D(e).pipe(ue(c=>this.processSegmentAgainstRoute(c._injector??n,e,c,r,i,o,s,a).pipe(te(u=>{if(u instanceof Qe)return d(null);throw u}))),Q(c=>!!c),te(c=>{if(Ei(c))return Rs(r,i,o)?d(new _r):ge(r);throw c}))}processSegmentAgainstRoute(n,e,r,i,o,s,a,c){return $(r)!==s&&(s===p||!$t(i,o,r))?ge(i):r.redirectTo===void 0?this.matchSegmentAgainstRoute(n,i,r,o,s,c):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(n,i,e,r,o,s,c):ge(i)}expandSegmentAgainstRouteUsingRedirect(n,e,r,i,o,s,a){let{matched:c,parameters:u,consumedSegments:h,positionalParamSegments:v,remainingSegments:y}=Ii(e,i,o);if(!c)return ge(e);typeof i.redirectTo=="string"&&i.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>Cs&&(this.allowRedirects=!1));let E=new oe(o,u,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Xn(i),$(i),i.component??i._loadedComponent??null,i,Jn(i)),C=Ut(E,a,this.paramsInheritanceStrategy);return E.params=Object.freeze(C.params),E.data=Object.freeze(C.data),this.applyRedirects.applyRedirectCommands(h,i.redirectTo,v,E,n).pipe(_(ee=>this.applyRedirects.lineralizeSegments(i,ee)),O(ee=>this.processSegment(n,r,e,ee.concat(y),s,!1,a)))}matchSegmentAgainstRoute(n,e,r,i,o,s){let a=ps(e,r,i,n,this.urlSerializer);return r.path==="**"&&(e.children={}),a.pipe(_(c=>c.matched?(n=r._injector??n,this.getChildConfig(n,r,i).pipe(_(({routes:u})=>{let h=r._loadedInjector??n,{parameters:v,consumedSegments:y,remainingSegments:E}=c,C=new oe(y,v,Object.freeze(l({},this.urlTree.queryParams)),this.urlTree.fragment,Xn(r),$(r),r.component??r._loadedComponent??null,r,Jn(r)),M=Ut(C,s,this.paramsInheritanceStrategy);C.params=Object.freeze(M.params),C.data=Object.freeze(M.data);let{segmentGroup:ee,slicedSegments:Bt}=Kn(e,y,E,u);if(Bt.length===0&&ee.hasChildren())return this.processChildren(h,u,ee,C).pipe(S(rt=>new P(C,rt)));if(u.length===0&&Bt.length===0)return d(new P(C,[]));let ki=$(r)===o;return this.processSegment(h,u,ee,Bt,ki?p:o,!0,C).pipe(S(rt=>new P(C,rt instanceof P?[rt]:[])))}))):ge(e)))}getChildConfig(n,e,r){return e.children?d({routes:e.children,injector:n}):e.loadChildren?e._loadedRoutes!==void 0?d({routes:e._loadedRoutes,injector:e._loadedInjector}):us(n,e,r,this.urlSerializer).pipe(O(i=>i?this.configLoader.loadChildren(n,e).pipe(I(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):hs(e))):d({routes:[],injector:n})}};function Es(t){t.sort((n,e)=>n.value.outlet===p?-1:e.value.outlet===p?1:n.value.outlet.localeCompare(e.value.outlet))}function bs(t){let n=t.value.routeConfig;return n&&n.path===""}function Ti(t){let n=[],e=new Set;for(let r of t){if(!bs(r)){n.push(r);continue}let i=n.find(o=>r.value.routeConfig===o.value.routeConfig);i!==void 0?(i.children.push(...r.children),e.add(i)):n.push(r)}for(let r of e){let i=Ti(r.children);n.push(new P(r.value,i))}return n.filter(r=>!e.has(r))}function Xn(t){return t.data||{}}function Jn(t){return t.resolve||{}}function Is(t,n,e,r,i,o){return O(s=>ws(t,n,e,r,s.extractedUrl,i,o).pipe(S(({state:a,tree:c})=>L(l({},s),{targetSnapshot:a,urlAfterRedirects:c}))))}function Ts(t,n){return O(e=>{let{targetSnapshot:r,guards:{canActivateChecks:i}}=e;if(!i.length)return d(e);let o=new Set(i.map(c=>c.route)),s=new Set;for(let c of o)if(!s.has(c))for(let u of Ai(c))s.add(u);let a=0;return D(s).pipe(ue(c=>o.has(c)?As(c,r,t,n):(c.data=Ut(c,c.parent,t).resolve,d(void 0))),I(()=>a++),Zt(1),O(c=>a===s.size?d(e):q))})}function Ai(t){let n=t.children.map(e=>Ai(e)).flat();return[t,...n]}function As(t,n,e,r){let i=t.routeConfig,o=t._resolve;return i?.title!==void 0&&!yi(i)&&(o[Xe]=i.title),nt(()=>(t.data=Ut(t,t.parent,e).resolve,Ms(o,t,n,r).pipe(S(s=>(t._resolvedData=s,t.data=l(l({},t.data),s),null)))))}function Ms(t,n,e,r){let i=Rr(t);if(i.length===0)return d({});let o={};return D(i).pipe(O(s=>Ds(t[s],n,e,r).pipe(Q(),I(a=>{if(a instanceof we)throw Lt(new ae,a);o[s]=a}))),Zt(1),S(()=>o),te(s=>Ei(s)?q:Me(s)))}function Ds(t,n,e,r){let i=Ee(n)??r,o=Ie(t,i),s=o.resolve?o.resolve(n,e):j(i,()=>o(n,e));return Z(s)}function yr(t){return _(n=>{let e=t(n);return e?D(e).pipe(S(()=>n)):d(n)})}var jr=(()=>{class t{buildTitle(e){let r,i=e.root;for(;i!==void 0;)r=this.getResolvedTitleForRoute(i)??r,i=i.children.find(o=>o.outlet===p);return r}getResolvedTitleForRoute(e){return e.data[Xe]}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>f(Mi),providedIn:"root"})}return t})(),Mi=(()=>{class t extends jr{title;constructor(e){super(),this.title=e}updateTitle(e){let r=this.buildTitle(e);r!==void 0&&this.title.setTitle(r)}static \u0275fac=function(r){return new(r||t)(m(Gn))};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Te=new T("",{providedIn:"root",factory:()=>({})}),tt=new T(""),Di=(()=>{class t{componentLoaders=new WeakMap;childrenLoaders=new WeakMap;onLoadStartListener;onLoadEndListener;compiler=f(Tn);loadComponent(e,r){if(this.componentLoaders.get(r))return this.componentLoaders.get(r);if(r._loadedComponent)return d(r._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(r);let i=Z(j(e,()=>r.loadComponent())).pipe(S(_i),_(Ni),I(s=>{this.onLoadEndListener&&this.onLoadEndListener(r),r._loadedComponent=s}),it(()=>{this.componentLoaders.delete(r)})),o=new Vt(i,()=>new V).pipe(Ft());return this.componentLoaders.set(r,o),o}loadChildren(e,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return d({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let o=Oi(r,this.compiler,e,this.onLoadEndListener).pipe(it(()=>{this.childrenLoaders.delete(r)})),s=new Vt(o,()=>new V).pipe(Ft());return this.childrenLoaders.set(r,s),s}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Oi(t,n,e,r){return Z(j(e,()=>t.loadChildren())).pipe(S(_i),_(Ni),O(i=>i instanceof fn||Array.isArray(i)?d(i):D(n.compileModuleAsync(i))),S(i=>{r&&r(t);let o,s,a=!1;return Array.isArray(i)?(s=i,a=!0):(o=i.create(e).injector,s=o.get(tt,[],{optional:!0,self:!0}).flat()),{routes:s.map(xr),injector:o}}))}function Os(t){return t&&typeof t=="object"&&"default"in t}function _i(t){return Os(t)?t.default:t}function Ni(t){return d(t)}var zt=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>f(_s),providedIn:"root"})}return t})(),_s=(()=>{class t{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,r){return e}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),Pi=new T("");var Ui=new T(""),Li=(()=>{class t{currentNavigation=at(null,{equal:()=>!1});currentTransition=null;lastSuccessfulNavigation=null;events=new V;transitionAbortWithErrorSubject=new V;configLoader=f(Di);environmentInjector=f(de);destroyRef=f(Kr);urlSerializer=f(Je);rootContexts=f(be);location=f(lt);inputBindingEnabled=f(kt,{optional:!0})!==null;titleStrategy=f(jr);options=f(Te,{optional:!0})||{};paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly";urlHandlingStrategy=f(zt);createViewTransition=f(Pi,{optional:!0});navigationErrorHandler=f(Ui,{optional:!0});navigationId=0;get hasRequestedNavigation(){return this.navigationId!==0}transitions;afterPreactivation=()=>d(void 0);rootComponentType=null;destroyed=!1;constructor(){let e=i=>this.events.next(new Tt(i)),r=i=>this.events.next(new At(i));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=e,this.destroyRef.onDestroy(()=>{this.destroyed=!0})}complete(){this.transitions?.complete()}handleNavigationRequest(e){let r=++this.navigationId;K(()=>{this.transitions?.next(L(l({},e),{extractedUrl:this.urlHandlingStrategy.extract(e.rawUrl),targetSnapshot:null,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null,abortController:new AbortController,id:r}))})}setupNavigations(e){return this.transitions=new x(null),this.transitions.pipe(Y(r=>r!==null),_(r=>{let i=!1;return d(r).pipe(_(o=>{if(this.navigationId>r.id)return this.cancelNavigationTransition(r,"",A.SupersededByNewNavigation),q;this.currentTransition=r,this.currentNavigation.set({id:o.id,initialUrl:o.rawUrl,extractedUrl:o.extractedUrl,targetBrowserUrl:typeof o.extras.browserUrl=="string"?this.urlSerializer.parse(o.extras.browserUrl):o.extras.browserUrl,trigger:o.source,extras:o.extras,previousNavigation:this.lastSuccessfulNavigation?L(l({},this.lastSuccessfulNavigation),{previousNavigation:null}):null,abort:()=>o.abortController.abort()});let s=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),a=o.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!s&&a!=="reload")return this.events.next(new G(o.id,this.urlSerializer.serialize(o.rawUrl),"",Ve.IgnoredSameUrlNavigation)),o.resolve(!1),q;if(this.urlHandlingStrategy.shouldProcessUrl(o.rawUrl))return d(o).pipe(_(c=>(this.events.next(new ce(c.id,this.urlSerializer.serialize(c.extractedUrl),c.source,c.restoredState)),c.id!==this.navigationId?q:Promise.resolve(c))),Is(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),I(c=>{r.targetSnapshot=c.targetSnapshot,r.urlAfterRedirects=c.urlAfterRedirects,this.currentNavigation.update(h=>(h.finalUrl=c.urlAfterRedirects,h));let u=new qe(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(u)}));if(s&&this.urlHandlingStrategy.shouldProcessUrl(o.currentRawUrl)){let{id:c,extractedUrl:u,source:h,restoredState:v,extras:y}=o,E=new ce(c,this.urlSerializer.serialize(u),h,v);this.events.next(E);let C=vi(this.rootComponentType).snapshot;return this.currentTransition=r=L(l({},o),{targetSnapshot:C,urlAfterRedirects:u,extras:L(l({},y),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.update(M=>(M.finalUrl=u,M)),d(r)}else return this.events.next(new G(o.id,this.urlSerializer.serialize(o.extractedUrl),"",Ve.IgnoredByUrlHandlingStrategy)),o.resolve(!1),q}),I(o=>{let s=new Ct(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot);this.events.next(s)}),S(o=>(this.currentTransition=r=L(l({},o),{guards:Vo(o.targetSnapshot,o.currentSnapshot,this.rootContexts)}),r)),ts(this.environmentInjector,o=>this.events.next(o)),I(o=>{if(r.guardsResult=o.guardsResult,o.guardsResult&&typeof o.guardsResult!="boolean")throw Lt(this.urlSerializer,o.guardsResult);let s=new Et(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects),o.targetSnapshot,!!o.guardsResult);this.events.next(s)}),Y(o=>o.guardsResult?!0:(this.cancelNavigationTransition(o,"",A.GuardRejected),!1)),yr(o=>{if(o.guards.canActivateChecks.length!==0)return d(o).pipe(I(s=>{let a=new bt(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}),_(s=>{let a=!1;return d(s).pipe(Ts(this.paramsInheritanceStrategy,this.environmentInjector),I({next:()=>a=!0,complete:()=>{a||this.cancelNavigationTransition(s,"",A.NoDataFromResolver)}}))}),I(s=>{let a=new It(s.id,this.urlSerializer.serialize(s.extractedUrl),this.urlSerializer.serialize(s.urlAfterRedirects),s.targetSnapshot);this.events.next(a)}))}),yr(o=>{let s=a=>{let c=[];if(a.routeConfig?.loadComponent){let u=Ee(a)??this.environmentInjector;c.push(this.configLoader.loadComponent(u,a.routeConfig).pipe(I(h=>{a.component=h}),S(()=>{})))}for(let u of a.children)c.push(...s(u));return c};return qt(s(o.targetSnapshot.root)).pipe(Wt(null),le(1))}),yr(()=>this.afterPreactivation()),_(()=>{let{currentSnapshot:o,targetSnapshot:s}=r,a=this.createViewTransition?.(this.environmentInjector,o.root,s.root);return a?D(a).pipe(S(()=>r)):d(r)}),S(o=>{let s=$o(e.routeReuseStrategy,o.targetSnapshot,o.currentRouterState);return this.currentTransition=r=L(l({},o),{targetRouterState:s}),this.currentNavigation.update(a=>(a.targetRouterState=s,a)),r}),I(()=>{this.events.next(new Ge)}),Fo(this.rootContexts,e.routeReuseStrategy,o=>this.events.next(o),this.inputBindingEnabled),le(1),Yt(new Hr(o=>{let s=r.abortController.signal,a=()=>o.next();return s.addEventListener("abort",a),()=>s.removeEventListener("abort",a)}).pipe(Y(()=>!i&&!r.targetRouterState),I(()=>{this.cancelNavigationTransition(r,r.abortController.signal.reason+"",A.Aborted)}))),I({next:o=>{i=!0,this.lastSuccessfulNavigation=K(this.currentNavigation),this.events.next(new z(o.id,this.urlSerializer.serialize(o.extractedUrl),this.urlSerializer.serialize(o.urlAfterRedirects))),this.titleStrategy?.updateTitle(o.targetRouterState.snapshot),o.resolve(!0)},complete:()=>{i=!0}}),Yt(this.transitionAbortWithErrorSubject.pipe(I(o=>{throw o}))),it(()=>{i||this.cancelNavigationTransition(r,"",A.SupersededByNewNavigation),this.currentTransition?.id===r.id&&(this.currentNavigation.set(null),this.currentTransition=null)}),te(o=>{if(this.destroyed)return r.resolve(!1),q;if(i=!0,Ci(o))this.events.next(new B(r.id,this.urlSerializer.serialize(r.extractedUrl),o.message,o.cancellationCode)),Bo(o)?this.events.next(new Re(o.url,o.navigationBehaviorOptions)):r.resolve(!1);else{let s=new Se(r.id,this.urlSerializer.serialize(r.extractedUrl),o,r.targetSnapshot??void 0);try{let a=j(this.environmentInjector,()=>this.navigationErrorHandler?.(s));if(a instanceof we){let{message:c,cancellationCode:u}=Lt(this.urlSerializer,a);this.events.next(new B(r.id,this.urlSerializer.serialize(r.extractedUrl),c,u)),this.events.next(new Re(a.redirectTo,a.navigationBehaviorOptions))}else throw this.events.next(s),o}catch(a){this.options.resolveNavigationPromiseOnError?r.resolve(!1):r.reject(a)}}return q}))}))}cancelNavigationTransition(e,r,i){let o=new B(e.id,this.urlSerializer.serialize(e.extractedUrl),r,i);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=K(this.currentNavigation),i=r?.targetBrowserUrl??r?.extractedUrl;return e.toString()!==i?.toString()&&!r?.extras.skipLocationChange}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Ns(t){return t!==He}var xi=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>f(Ps),providedIn:"root"})}return t})(),jt=class{shouldDetach(n){return!1}store(n,e){}shouldAttach(n){return!1}retrieve(n){return null}shouldReuseRoute(n,e){return n.routeConfig===e.routeConfig}},Ps=(()=>{class t extends jt{static \u0275fac=(()=>{let e;return function(i){return(e||(e=Xt(t)))(i||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})(),ji=(()=>{class t{urlSerializer=f(Je);options=f(Te,{optional:!0})||{};canceledNavigationResolution=this.options.canceledNavigationResolution||"replace";location=f(lt);urlHandlingStrategy=f(zt);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";currentUrlTree=new F;getCurrentUrlTree(){return this.currentUrlTree}rawUrlTree=this.currentUrlTree;getRawUrlTree(){return this.rawUrlTree}createBrowserPath({finalUrl:e,initialUrl:r,targetBrowserUrl:i}){let o=e!==void 0?this.urlHandlingStrategy.merge(e,r):r,s=i??o;return s instanceof F?this.urlSerializer.serialize(s):s}commitTransition({targetRouterState:e,finalUrl:r,initialUrl:i}){r&&e?(this.currentUrlTree=r,this.rawUrlTree=this.urlHandlingStrategy.merge(r,i),this.routerState=e):this.rawUrlTree=i}routerState=vi(null);getRouterState(){return this.routerState}stateMemento=this.createStateMemento();updateStateMemento(){this.stateMemento=this.createStateMemento()}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}resetInternalState({finalUrl:e}){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e??this.rawUrlTree)}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:()=>f(Us),providedIn:"root"})}return t})(),Us=(()=>{class t extends ji{currentPageId=0;lastSuccessfulId=-1;restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(r=>{r.type==="popstate"&&setTimeout(()=>{e(r.url,r.state,"popstate")})})}handleRouterEvent(e,r){e instanceof ce?this.updateStateMemento():e instanceof G?this.commitTransition(r):e instanceof qe?this.urlUpdateStrategy==="eager"&&(r.extras.skipLocationChange||this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof Ge?(this.commitTransition(r),this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(this.createBrowserPath(r),r)):e instanceof B&&e.code!==A.SupersededByNewNavigation&&e.code!==A.Redirect?this.restoreHistory(r):e instanceof Se?this.restoreHistory(r,!0):e instanceof z&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,{extras:r,id:i}){let{replaceUrl:o,state:s}=r;if(this.location.isCurrentPathEqualTo(e)||o){let a=this.browserPageId,c=l(l({},s),this.generateNgRouterState(i,a));this.location.replaceState(e,"",c)}else{let a=l(l({},s),this.generateNgRouterState(i,this.browserPageId+1));this.location.go(e,"",a)}}restoreHistory(e,r=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,o=this.currentPageId-i;o!==0?this.location.historyGo(o):this.getCurrentUrlTree()===e.finalUrl&&o===0&&(this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetInternalState(e),this.resetUrlToCurrentUrlTree())}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.getRawUrlTree()),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,r){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:r}:{navigationId:e}}static \u0275fac=(()=>{let e;return function(i){return(e||(e=Xt(t)))(i||t)}})();static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function kr(t,n){t.events.pipe(Y(e=>e instanceof z||e instanceof B||e instanceof Se||e instanceof G),S(e=>e instanceof z||e instanceof G?0:(e instanceof B?e.code===A.Redirect||e.code===A.SupersededByNewNavigation:!1)?2:1),Y(e=>e!==2),le(1)).subscribe(()=>{n()})}var Ls={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},xs={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},Ae=(()=>{class t{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}disposed=!1;nonRouterCurrentEntryChangeSubscription;console=f(or);stateManager=f(ji);options=f(Te,{optional:!0})||{};pendingTasks=f(Xr);urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred";navigationTransitions=f(Li);urlSerializer=f(Je);location=f(lt);urlHandlingStrategy=f(zt);injector=f(de);_events=new V;get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}navigated=!1;routeReuseStrategy=f(xi);onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore";config=f(tt,{optional:!0})?.flat()??[];componentInputBindingEnabled=!!f(kt,{optional:!0});currentNavigation=this.navigationTransitions.currentNavigation.asReadonly();constructor(){this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}eventsSubscription=new $r;subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(r=>{try{let i=this.navigationTransitions.currentTransition,o=K(this.navigationTransitions.currentNavigation);if(i!==null&&o!==null){if(this.stateManager.handleRouterEvent(r,o),r instanceof B&&r.code!==A.Redirect&&r.code!==A.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof z)this.navigated=!0;else if(r instanceof Re){let s=r.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(r.url,i.currentRawUrl),c=l({browserUrl:i.extras.browserUrl,info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||Ns(i.source)},s);this.scheduleNavigation(a,He,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}Lo(r)&&this._events.next(r)}catch(i){this.navigationTransitions.transitionAbortWithErrorSubject.next(i)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),He,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,r,i)=>{this.navigateToSyncWithBrowser(e,i,r)})}navigateToSyncWithBrowser(e,r,i){let o={replaceUrl:!0},s=i?.navigationId?i:null;if(i){let c=l({},i);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(o.state=c)}let a=this.parseUrl(e);this.scheduleNavigation(a,r,s,o).catch(c=>{this.disposed||this.injector.get(st)(c)})}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return K(this.navigationTransitions.currentNavigation)}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(xr),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this._events.unsubscribe(),this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,r={}){let{relativeTo:i,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:c}=r,u=c?this.currentUrlTree.fragment:s,h=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":h=l(l({},this.currentUrlTree.queryParams),o);break;case"preserve":h=this.currentUrlTree.queryParams;break;default:h=o||null}h!==null&&(h=this.removeEmptyProps(h));let v;try{let y=i?i.snapshot:this.routerState.snapshot.root;v=hi(y)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),v=this.currentUrlTree.root}return fi(v,e,h,u??null)}navigateByUrl(e,r={skipLocationChange:!1}){let i=J(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(o,He,null,r)}navigate(e,r={skipLocationChange:!1}){return js(e),this.navigateByUrl(this.createUrlTree(e,r),r)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,r){let i;if(r===!0?i=l({},Ls):r===!1?i=l({},xs):i=r,J(e))return Wn(this.currentUrlTree,e,i);let o=this.parseUrl(e);return Wn(this.currentUrlTree,o,i)}removeEmptyProps(e){return Object.entries(e).reduce((r,[i,o])=>(o!=null&&(r[i]=o),r),{})}scheduleNavigation(e,r,i,o,s){if(this.disposed)return Promise.resolve(!1);let a,c,u;s?(a=s.resolve,c=s.reject,u=s.promise):u=new Promise((v,y)=>{a=v,c=y});let h=this.pendingTasks.add();return kr(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(h))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(v=>Promise.reject(v))}static \u0275fac=function(r){return new(r||t)};static \u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function js(t){for(let n=0;n<t.length;n++)if(t[n]==null)throw new w(4008,!1)}var Ht=(()=>{class t{router;route;tabIndexAttribute;renderer;el;locationStrategy;reactiveHref=at(null);get href(){return K(this.reactiveHref)}set href(e){this.reactiveHref.set(e)}target;queryParams;fragment;queryParamsHandling;state;info;relativeTo;isAnchorElement;subscription;onChanges=new V;applicationErrorHandler=f(st);options=f(Te,{optional:!0});constructor(e,r,i,o,s,a){this.router=e,this.route=r,this.tabIndexAttribute=i,this.renderer=o,this.el=s,this.locationStrategy=a,this.reactiveHref.set(f(new An("href"),{optional:!0}));let c=s.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area"||!!(typeof customElements=="object"&&customElements.get(c)?.observedAttributes?.includes?.("href")),this.isAnchorElement?this.setTabIndexIfNotOnNativeEl("0"):this.subscribeToNavigationEventsIfNecessary()}subscribeToNavigationEventsIfNecessary(){if(this.subscription!==void 0||!this.isAnchorElement)return;let e=this.preserveFragment,r=i=>i==="merge"||i==="preserve";e||=r(this.queryParamsHandling),e||=!this.queryParamsHandling&&!r(this.options?.defaultQueryParamsHandling),e&&(this.subscription=this.router.events.subscribe(i=>{i instanceof z&&this.updateHref()}))}preserveFragment=!1;skipLocationChange=!1;replaceUrl=!1;setTabIndexIfNotOnNativeEl(e){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",e)}ngOnChanges(e){this.isAnchorElement&&(this.updateHref(),this.subscribeToNavigationEventsIfNecessary()),this.onChanges.next(this)}routerLinkInput=null;set routerLink(e){e==null?(this.routerLinkInput=null,this.setTabIndexIfNotOnNativeEl(null)):(J(e)?this.routerLinkInput=e:this.routerLinkInput=Array.isArray(e)?e:[e],this.setTabIndexIfNotOnNativeEl("0"))}onClick(e,r,i,o,s){let a=this.urlTree;if(a===null||this.isAnchorElement&&(e!==0||r||i||o||s||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(a,c)?.catch(u=>{this.applicationErrorHandler(u)}),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let e=this.urlTree;this.reactiveHref.set(e!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(e))??"":null)}applyAttributeValue(e,r){let i=this.renderer,o=this.el.nativeElement;r!==null?i.setAttribute(o,e,r):i.removeAttribute(o,e)}get urlTree(){return this.routerLinkInput===null?null:J(this.routerLinkInput)?this.routerLinkInput:this.router.createUrlTree(this.routerLinkInput,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}static \u0275fac=function(r){return new(r||t)(k(Ae),k(W),Jr("tabindex"),k(nr),k(Jt),k(Nn))};static \u0275dir=Ne({type:t,selectors:[["","routerLink",""]],hostVars:2,hostBindings:function(r,i){r&1&&Cn("click",function(s){return i.onClick(s.button,s.ctrlKey,s.shiftKey,s.altKey,s.metaKey)}),r&2&&yn("href",i.reactiveHref(),ln)("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",ut],skipLocationChange:[2,"skipLocationChange","skipLocationChange",ut],replaceUrl:[2,"replaceUrl","replaceUrl",ut],routerLink:"routerLink"},features:[De]})}return t})(),$s=(()=>{class t{router;element;renderer;cdr;link;links;classes=[];routerEventsSubscription;linkInputChangesSubscription;_isActive=!1;get isActive(){return this._isActive}routerLinkActiveOptions={exact:!1};ariaCurrentWhenActive;isActiveChange=new ne;constructor(e,r,i,o,s){this.router=e,this.element=r,this.renderer=i,this.cdr=o,this.link=s,this.routerEventsSubscription=e.events.subscribe(a=>{a instanceof z&&this.update()})}ngAfterContentInit(){d(this.links.changes,d(null)).pipe(Gt()).subscribe(e=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let e=[...this.links.toArray(),this.link].filter(r=>!!r).map(r=>r.onChanges);this.linkInputChangesSubscription=D(e).pipe(Gt()).subscribe(r=>{this._isActive!==this.isLinkActive(this.router)(r)&&this.update()})}set routerLinkActive(e){let r=Array.isArray(e)?e:e.split(" ");this.classes=r.filter(i=>!!i)}ngOnChanges(e){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let e=this.hasActiveLinks();this.classes.forEach(r=>{e?this.renderer.addClass(this.element.nativeElement,r):this.renderer.removeClass(this.element.nativeElement,r)}),e&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==e&&(this._isActive=e,this.cdr.markForCheck(),this.isActiveChange.emit(e))})}isLinkActive(e){let r=zs(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let o=i.urlTree;return o?e.isActive(o,r):!1}}hasActiveLinks(){let e=this.isLinkActive(this.router);return this.link&&e(this.link)||this.links.some(e)}static \u0275fac=function(r){return new(r||t)(k(Ae),k(Jt),k(nr),k(ct),k(Ht,8))};static \u0275dir=Ne({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(r,i,o){if(r&1&&En(o,Ht,5),r&2){let s;bn(s=In())&&(i.links=s)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],features:[De]})}return t})();function zs(t){return!!t.paths}var Hs=new T("");function Bs(t,...n){return Qt([{provide:tt,multi:!0,useValue:t},[],{provide:W,useFactory:Fs,deps:[Ae]},{provide:mn,multi:!0,useFactory:Vs},n.map(e=>e.\u0275providers)])}function Fs(t){return t.routerState.root}function Vs(){let t=f(ot);return n=>{let e=t.get(sr);if(n!==e.components[0])return;let r=t.get(Ae),i=t.get(qs);t.get(Gs)===1&&r.initialNavigation(),t.get(Ws,null,{optional:!0})?.setUpPreloading(),t.get(Hs,null,{optional:!0})?.init(),r.resetRootComponentType(e.componentTypes[0]),i.closed||(i.next(),i.complete(),i.unsubscribe())}}var qs=new T("",{factory:()=>new V}),Gs=new T("",{providedIn:"root",factory:()=>1});var Ws=new T("");export{Xi as a,ao as b,W as c,Ur as d,Ae as e,Ht as f,$s as g,Bs as h};
|