guito 1.0.7 → 1.0.8
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 +16 -0
- package/README.md +5 -2
- package/bin/ai-review.js +50 -6
- package/bin/commit-message.js +30 -7
- package/bin/guito-server.js +45 -38
- package/bin/ui/browser/index.html +1 -1
- package/bin/ui/browser/main-YO57LHBH.js +67 -0
- package/{guito-1.0.7.vsix → guito-1.0.8.vsix} +0 -0
- package/package.json +1 -1
- package/bin/ui/browser/main-2QNMM6BC.js +0 -67
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
var _C=Object.defineProperty,vC=Object.defineProperties;var bC=Object.getOwnPropertyDescriptors;var Jm=Object.getOwnPropertySymbols;var xC=Object.prototype.hasOwnProperty,yC=Object.prototype.propertyIsEnumerable;var eg=(n,t,e)=>t in n?_C(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,H=(n,t)=>{for(var e in t||={})xC.call(t,e)&&eg(n,e,t[e]);if(Jm)for(var e of Jm(t))yC.call(t,e)&&eg(n,e,t[e]);return n},re=(n,t)=>vC(n,bC(t));var Mn=(n,t,e)=>new Promise((i,r)=>{var o=l=>{try{a(e.next(l))}catch(h){r(h)}},s=l=>{try{a(e.throw(l))}catch(h){r(h)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,s);a((e=e.apply(n,t)).next())});var nu;function Va(){return nu}function Tn(n){let t=nu;return nu=n,t}var tg=Symbol("NotFound");function Vr(n){return n===tg||n?.name==="\u0275NotFound"}var vt=null,Ba=!1,iu=1,CC=null,Ke=Symbol("SIGNAL");function ae(n){let t=vt;return vt=n,t}function ja(){return vt}var ii={version:0,lastCleanEpoch:0,dirty:!1,producers:void 0,producersTail:void 0,consumers:void 0,consumersTail:void 0,recomputing:!1,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,kind:"unknown",producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function ri(n){if(Ba)throw new Error("");if(vt===null)return;vt.consumerOnSignalRead(n);let t=vt.producersTail;if(t!==void 0&&t.producer===n)return;let e,i=vt.recomputing;if(i&&(e=t!==void 0?t.nextProducer:vt.producers,e!==void 0&&e.producer===n)){vt.producersTail=e,e.lastReadVersion=n.version;return}let r=n.consumersTail;if(r!==void 0&&r.consumer===vt&&(!i||EC(r,vt)))return;let o=jr(vt),s={producer:n,consumer:vt,nextProducer:e,prevConsumer:r,lastReadVersion:n.version,nextConsumer:void 0};vt.producersTail=s,t!==void 0?t.nextProducer=s:vt.producers=s,o&&og(n,s)}function ng(){iu++}function Fi(n){if(!(jr(n)&&!n.dirty)&&!(!n.dirty&&n.lastCleanEpoch===iu)){if(!n.producerMustRecompute(n)&&!Vi(n)){Br(n);return}n.producerRecomputeValue(n),Br(n)}}function ru(n){if(n.consumers===void 0)return;let t=Ba;Ba=!0;try{for(let e=n.consumers;e!==void 0;e=e.nextConsumer){let i=e.consumer;i.dirty||wC(i)}}finally{Ba=t}}function ou(){return vt?.consumerAllowSignalWrites!==!1}function wC(n){n.dirty=!0,ru(n),n.consumerMarkedDirty?.(n)}function Br(n){n.dirty=!1,n.lastCleanEpoch=iu}function jn(n){return n&&ig(n),ae(n)}function ig(n){n.producersTail=void 0,n.recomputing=!0}function oi(n,t){ae(t),n&&rg(n)}function rg(n){n.recomputing=!1;let t=n.producersTail,e=t!==void 0?t.nextProducer:n.producers;if(e!==void 0){if(jr(n))do e=su(e);while(e!==void 0);t!==void 0?t.nextProducer=void 0:n.producers=void 0}}function Vi(n){for(let t=n.producers;t!==void 0;t=t.nextProducer){let e=t.producer,i=t.lastReadVersion;if(i!==e.version||(Fi(e),i!==e.version))return!0}return!1}function si(n){if(jr(n)){let t=n.producers;for(;t!==void 0;)t=su(t)}n.producers=void 0,n.producersTail=void 0,n.consumers=void 0,n.consumersTail=void 0}function og(n,t){let e=n.consumersTail,i=jr(n);if(e!==void 0?(t.nextConsumer=e.nextConsumer,e.nextConsumer=t):(t.nextConsumer=void 0,n.consumers=t),t.prevConsumer=e,n.consumersTail=t,!i)for(let r=n.producers;r!==void 0;r=r.nextProducer)og(r.producer,r)}function su(n){let t=n.producer,e=n.nextProducer,i=n.nextConsumer,r=n.prevConsumer;if(n.nextConsumer=void 0,n.prevConsumer=void 0,i!==void 0?i.prevConsumer=r:t.consumersTail=r,r!==void 0)r.nextConsumer=i;else if(t.consumers=i,!jr(t)){let o=t.producers;for(;o!==void 0;)o=su(o)}return e}function jr(n){return n.consumerIsAlwaysLive||n.consumers!==void 0}function zo(n){CC?.(n)}function EC(n,t){let e=t.producersTail;if(e!==void 0){let i=t.producers;do{if(i===n)return!0;if(i===e)break;i=i.nextProducer}while(i!==void 0)}return!1}function Uo(n,t){return Object.is(n,t)}function Go(n,t){let e=Object.create(DC);e.computation=n,t!==void 0&&(e.equal=t);let i=()=>{if(Fi(e),ri(e),e.value===Bn)throw e.error;return e.value};return i[Ke]=e,zo(e),i}var ni=Symbol("UNSET"),Li=Symbol("COMPUTING"),Bn=Symbol("ERRORED"),DC=re(H({},ii),{value:ni,dirty:!0,error:null,equal:Uo,kind:"computed",producerMustRecompute(n){return n.value===ni||n.value===Li},producerRecomputeValue(n){if(n.value===Li)throw new Error("");let t=n.value;n.value=Li;let e=jn(n),i,r=!1;try{i=n.computation(),ae(null),r=t!==ni&&t!==Bn&&i!==Bn&&n.equal(t,i)}catch(o){i=Bn,n.error=o}finally{oi(n,e)}if(r){n.value=t;return}n.value=i,n.version++}});function SC(){throw new Error}var sg=SC;function ag(n){sg(n)}function au(n){sg=n}var MC=null;function lu(n,t){let e=Object.create(Wo);e.value=n,t!==void 0&&(e.equal=t);let i=()=>lg(e);return i[Ke]=e,zo(e),[i,s=>Bi(e,s),s=>$a(e,s)]}function lg(n){return ri(n),n.value}function Bi(n,t){ou()||ag(n),n.equal(n.value,t)||(n.value=t,TC(n))}function $a(n,t){ou()||ag(n),Bi(n,t(n.value))}var Wo=re(H({},ii),{equal:Uo,value:void 0,kind:"signal"});function TC(n){n.version++,ng(),ru(n),MC?.(n)}function me(n){return typeof n=="function"}function $r(n){let e=n(i=>{Error.call(i),i.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var Ha=$r(n=>function(e){n(this),this.message=e?`${e.length} errors occurred during unsubscription:
|
|
2
|
-
${e.map((i,r)=>`${r+1}) ${i.toString()}`).join(`
|
|
3
|
-
`)}`:"",this.name="UnsubscriptionError",this.errors=e});function ji(n,t){if(n){let e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Be=class n{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let o of e)o.remove(this);else e.remove(this);let{initialTeardown:i}=this;if(me(i))try{i()}catch(o){t=o instanceof Ha?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{cg(o)}catch(s){t=t??[],s instanceof Ha?t=[...t,...s.errors]:t.push(s)}}if(t)throw new Ha(t)}}add(t){var e;if(t&&t!==this)if(this.closed)cg(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}}_hasParent(t){let{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){let{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&ji(e,t)}remove(t){let{_finalizers:e}=this;e&&ji(e,t),t instanceof n&&t._removeParent(this)}};Be.EMPTY=(()=>{let n=new Be;return n.closed=!0,n})();var cu=Be.EMPTY;function za(n){return n instanceof Be||n&&"closed"in n&&me(n.remove)&&me(n.add)&&me(n.unsubscribe)}function cg(n){me(n)?n():n.unsubscribe()}var cn={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Hr={setTimeout(n,t,...e){let{delegate:i}=Hr;return i?.setTimeout?i.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){let{delegate:t}=Hr;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function Ua(n){Hr.setTimeout(()=>{let{onUnhandledError:t}=cn;if(t)t(n);else throw n})}function qo(){}var dg=du("C",void 0,void 0);function ug(n){return du("E",void 0,n)}function pg(n){return du("N",n,void 0)}function du(n,t,e){return{kind:n,value:t,error:e}}var $i=null;function zr(n){if(cn.useDeprecatedSynchronousErrorHandling){let t=!$i;if(t&&($i={errorThrown:!1,error:null}),n(),t){let{errorThrown:e,error:i}=$i;if($i=null,e)throw i}}else n()}function fg(n){cn.useDeprecatedSynchronousErrorHandling&&$i&&($i.errorThrown=!0,$i.error=n)}var Hi=class extends Be{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,za(t)&&t.add(this)):this.destination=PC}static create(t,e,i){return new dn(t,e,i)}next(t){this.isStopped?pu(pg(t),this):this._next(t)}error(t){this.isStopped?pu(ug(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?pu(dg,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},kC=Function.prototype.bind;function uu(n,t){return kC.call(n,t)}var fu=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(i){Ga(i)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(i){Ga(i)}else Ga(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){Ga(e)}}},dn=class extends Hi{constructor(t,e,i){super();let r;if(me(t)||!t)r={next:t??void 0,error:e??void 0,complete:i??void 0};else{let o;this&&cn.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&uu(t.next,o),error:t.error&&uu(t.error,o),complete:t.complete&&uu(t.complete,o)}):r=t}this.destination=new fu(r)}};function Ga(n){cn.useDeprecatedSynchronousErrorHandling?fg(n):Ua(n)}function IC(n){throw n}function pu(n,t){let{onStoppedNotification:e}=cn;e&&Hr.setTimeout(()=>e(n,t))}var PC={closed:!0,next:qo,error:IC,complete:qo};var Ur=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Gr(n){return n}function hg(n){return n.length===0?Gr:n.length===1?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}var pe=(()=>{class n{constructor(e){e&&(this._subscribe=e)}lift(e){let i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){let o=RC(e)?e:new dn(e,i,r);return zr(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e,i){return i=mg(i),new i((r,o)=>{let s=new dn({next:a=>{try{e(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(e){var i;return(i=this.source)===null||i===void 0?void 0:i.subscribe(e)}[Ur](){return this}pipe(...e){return hg(e)(this)}toPromise(e){return e=mg(e),new e((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=t=>new n(t),n})();function mg(n){var t;return(t=n??cn.Promise)!==null&&t!==void 0?t:Promise}function OC(n){return n&&me(n.next)&&me(n.error)&&me(n.complete)}function RC(n){return n&&n instanceof Hi||OC(n)&&za(n)}function hu(n){return me(n?.lift)}function ye(n){return t=>{if(hu(t))return t.lift(function(e){try{return n(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ce(n,t,e,i,r){return new mu(n,t,e,i,r)}var mu=class extends Hi{constructor(t,e,i,r,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=e?function(a){try{e(a)}catch(l){t.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};function gg(){return ye((n,t)=>{let e=null;n._refCount++;let i=Ce(t,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount){e=null;return}let r=n._connection,o=e;e=null,r&&(!o||r===o)&&r.unsubscribe(),t.unsubscribe()});n.subscribe(i),i.closed||(e=n.connect())})}var Zo=class extends pe{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,hu(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){let t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new Be;let e=this.getSubject();t.add(this.source.subscribe(Ce(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Be.EMPTY)}return t}refCount(){return gg()(this)}};var Wr={schedule(n){let t=requestAnimationFrame,e=cancelAnimationFrame,{delegate:i}=Wr;i&&(t=i.requestAnimationFrame,e=i.cancelAnimationFrame);let r=t(o=>{e=void 0,n(o)});return new Be(()=>e?.(r))},requestAnimationFrame(...n){let{delegate:t}=Wr;return(t?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){let{delegate:t}=Wr;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0};var _g=$r(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var He=(()=>{class n extends pe{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let i=new Wa(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new _g}next(e){zr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(e)}})}error(e){zr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){zr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:i,isStopped:r,observers:o}=this;return i||r?cu:(this.currentObservers=null,o.push(e),new Be(()=>{this.currentObservers=null,ji(o,e)}))}_checkFinalizedStatuses(e){let{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){let e=new pe;return e.source=this,e}}return n.create=(t,e)=>new Wa(t,e),n})(),Wa=class extends He{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.next)===null||i===void 0||i.call(e,t)}error(t){var e,i;(i=(e=this.destination)===null||e===void 0?void 0:e.error)===null||i===void 0||i.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0||e.call(t)}_subscribe(t){var e,i;return(i=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&i!==void 0?i:cu}};var Yo=class extends He{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){let{hasError:t,thrownError:e,_value:i}=this;if(t)throw e;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}};var Qo={now(){return(Qo.delegate||Date).now()},delegate:void 0};var zi=class extends He{constructor(t=1/0,e=1/0,i=Qo){super(),this._bufferSize=t,this._windowTime=e,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,e)}next(t){let{isStopped:e,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;e||(i.push(t),!r&&i.push(o.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(t),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let s=0;s<o.length&&!t.closed;s+=i?1:2)t.next(o[s]);return this._checkFinalizedStatuses(t),e}_trimBuffer(){let{_bufferSize:t,_timestampProvider:e,_buffer:i,_infiniteTimeWindow:r}=this,o=(r?1:2)*t;if(t<1/0&&o<i.length&&i.splice(0,i.length-o),!r){let s=e.now(),a=0;for(let l=1;l<i.length&&i[l]<=s;l+=2)a=l;a&&i.splice(0,a+1)}}};var qa=class extends Be{constructor(t,e){super()}schedule(t,e=0){return this}};var Ko={setInterval(n,t,...e){let{delegate:i}=Ko;return i?.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){let{delegate:t}=Ko;return(t?.clearInterval||clearInterval)(n)},delegate:void 0};var ai=class extends qa{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){var i;if(this.closed)return this;this.state=t;let r=this.id,o=this.scheduler;return r!=null&&(this.id=this.recycleAsyncId(o,r,e)),this.pending=!0,this.delay=e,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,e),this}requestAsyncId(t,e,i=0){return Ko.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(i!=null&&this.delay===i&&this.pending===!1)return e;e!=null&&Ko.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let i=this._execute(t,e);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let i=!1,r;try{this.work(t)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:t,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,ji(i,this),t!=null&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}};var NC=1,gu,_u={};function vg(n){return n in _u?(delete _u[n],!0):!1}var bg={setImmediate(n){let t=NC++;return _u[t]=!0,gu||(gu=Promise.resolve()),gu.then(()=>vg(t)&&n()),t},clearImmediate(n){vg(n)}};var{setImmediate:AC,clearImmediate:LC}=bg,Xo={setImmediate(...n){let{delegate:t}=Xo;return(t?.setImmediate||AC)(...n)},clearImmediate(n){let{delegate:t}=Xo;return(t?.clearImmediate||LC)(n)},delegate:void 0};var Za=class extends ai{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return i!==null&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=Xo.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,e,i=0){var r;if(i!=null?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);let{actions:o}=t;e!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==e&&(Xo.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}};var qr=class n{constructor(t,e=n.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}};qr.now=Qo.now;var li=class extends qr{constructor(t,e=qr.now){super(t,e),this.actions=[],this._active=!1}flush(t){let{actions:e}=this;if(this._active){e.push(t);return}let i;this._active=!0;do if(i=t.execute(t.state,t.delay))break;while(t=e.shift());if(this._active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}};var Ya=class extends li{flush(t){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let{actions:i}=this,r;t=t||i.shift();do if(r=t.execute(t.state,t.delay))break;while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}};var vu=new Ya(Za);var Jo=new li(ai),xg=Jo;var Qa=class extends ai{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return i!==null&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=Wr.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,i=0){var r;if(i!=null?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);let{actions:o}=t;e!=null&&e===t._scheduled&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==e&&(Wr.cancelAnimationFrame(e),t._scheduled=void 0)}};var Ka=class extends li{flush(t){this._active=!0;let e;t?e=t.id:(e=this._scheduled,this._scheduled=void 0);let{actions:i}=this,r;t=t||i.shift();do if(r=t.execute(t.state,t.delay))break;while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}};var bu=new Ka(Qa);function Xa(n){return n&&me(n.schedule)}function yg(n){return n[n.length-1]}function Cg(n){return me(yg(n))?n.pop():void 0}function Zr(n){return Xa(yg(n))?n.pop():void 0}function Eg(n,t,e,i){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(m){try{h(i.next(m))}catch(w){s(w)}}function l(m){try{h(i.throw(m))}catch(w){s(w)}}function h(m){m.done?o(m.value):r(m.value).then(a,l)}h((i=i.apply(n,t||[])).next())})}function wg(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],i=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ui(n){return this instanceof Ui?(this.v=n,this):new Ui(n)}function Dg(n,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=e.apply(n,t||[]),r,o=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(T){return function(A){return Promise.resolve(A).then(T,w)}}function a(T,A){i[T]&&(r[T]=function(z){return new Promise(function(Q,U){o.push([T,z,Q,U])>1||l(T,z)})},A&&(r[T]=A(r[T])))}function l(T,A){try{h(i[T](A))}catch(z){M(o[0][3],z)}}function h(T){T.value instanceof Ui?Promise.resolve(T.value.v).then(m,w):M(o[0][2],T)}function m(T){l("next",T)}function w(T){l("throw",T)}function M(T,A){T(A),o.shift(),o.length&&l(o[0][0],o[0][1])}}function Sg(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=n[Symbol.asyncIterator],e;return t?t.call(n):(n=typeof wg=="function"?wg(n):n[Symbol.iterator](),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(o){e[o]=n[o]&&function(s){return new Promise(function(a,l){s=n[o](s),r(a,l,s.done,s.value)})}}function r(o,s,a,l){Promise.resolve(l).then(function(h){o({value:h,done:a})},s)}}var Ja=n=>n&&typeof n.length=="number"&&typeof n!="function";function el(n){return me(n?.then)}function tl(n){return me(n[Ur])}function nl(n){return Symbol.asyncIterator&&me(n?.[Symbol.asyncIterator])}function il(n){return new TypeError(`You provided ${n!==null&&typeof n=="object"?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function FC(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var rl=FC();function ol(n){return me(n?.[rl])}function sl(n){return Dg(this,arguments,function*(){let e=n.getReader();try{for(;;){let{value:i,done:r}=yield Ui(e.read());if(r)return yield Ui(void 0);yield yield Ui(i)}}finally{e.releaseLock()}})}function al(n){return me(n?.getReader)}function Ne(n){if(n instanceof pe)return n;if(n!=null){if(tl(n))return VC(n);if(Ja(n))return BC(n);if(el(n))return jC(n);if(nl(n))return Mg(n);if(ol(n))return $C(n);if(al(n))return HC(n)}throw il(n)}function VC(n){return new pe(t=>{let e=n[Ur]();if(me(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function BC(n){return new pe(t=>{for(let e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}function jC(n){return new pe(t=>{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,Ua)})}function $C(n){return new pe(t=>{for(let e of n)if(t.next(e),t.closed)return;t.complete()})}function Mg(n){return new pe(t=>{zC(n,t).catch(e=>t.error(e))})}function HC(n){return Mg(sl(n))}function zC(n,t){var e,i,r,o;return Eg(this,void 0,void 0,function*(){try{for(e=Sg(n);i=yield e.next(),!i.done;){let s=i.value;if(t.next(s),t.closed)return}}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=e.return)&&(yield o.call(e))}finally{if(r)throw r.error}}t.complete()})}function Yt(n,t,e,i=0,r=!1){let o=t.schedule(function(){e(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(o),!r)return o}function ll(n,t=0){return ye((e,i)=>{e.subscribe(Ce(i,r=>Yt(i,n,()=>i.next(r),t),()=>Yt(i,n,()=>i.complete(),t),r=>Yt(i,n,()=>i.error(r),t)))})}function cl(n,t=0){return ye((e,i)=>{i.add(n.schedule(()=>e.subscribe(i),t))})}function Tg(n,t){return Ne(n).pipe(cl(t),ll(t))}function kg(n,t){return Ne(n).pipe(cl(t),ll(t))}function Ig(n,t){return new pe(e=>{let i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}function Pg(n,t){return new pe(e=>{let i;return Yt(e,t,()=>{i=n[rl](),Yt(e,t,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){e.error(s);return}o?e.complete():e.next(r)},0,!0)}),()=>me(i?.return)&&i.return()})}function dl(n,t){if(!n)throw new Error("Iterable cannot be null");return new pe(e=>{Yt(e,t,()=>{let i=n[Symbol.asyncIterator]();Yt(e,t,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function Og(n,t){return dl(sl(n),t)}function Rg(n,t){if(n!=null){if(tl(n))return Tg(n,t);if(Ja(n))return Ig(n,t);if(el(n))return kg(n,t);if(nl(n))return dl(n,t);if(ol(n))return Pg(n,t);if(al(n))return Og(n,t)}throw il(n)}function ul(n,t){return t?Rg(n,t):Ne(n)}function Ee(...n){let t=Zr(n);return ul(n,t)}function xu(n,t){let e=me(n)?n:()=>n,i=r=>r.error(e());return new pe(t?r=>t.schedule(i,0,r):i)}function es(n){return!!n&&(n instanceof pe||me(n.lift)&&me(n.subscribe))}var Ng=$r(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function pl(n,t){let e=typeof t=="object";return new Promise((i,r)=>{let o=new dn({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{e?i(t.defaultValue):r(new Ng)}});n.subscribe(o)})}function Ag(n){return n instanceof Date&&!isNaN(n)}function Oe(n,t){return ye((e,i)=>{let r=0;e.subscribe(Ce(i,o=>{i.next(n.call(t,o,r++))}))})}var{isArray:UC}=Array;function GC(n,t){return UC(t)?n(...t):n(t)}function Lg(n){return Oe(t=>GC(n,t))}var{isArray:WC}=Array,{getPrototypeOf:qC,prototype:ZC,keys:YC}=Object;function Fg(n){if(n.length===1){let t=n[0];if(WC(t))return{args:t,keys:null};if(QC(t)){let e=YC(t);return{args:e.map(i=>t[i]),keys:e}}}return{args:n,keys:null}}function QC(n){return n&&typeof n=="object"&&qC(n)===ZC}function Vg(n,t){return n.reduce((e,i,r)=>(e[i]=t[r],e),{})}function Bg(n,t,e,i,r,o,s,a){let l=[],h=0,m=0,w=!1,M=()=>{w&&!l.length&&!h&&t.complete()},T=z=>h<i?A(z):l.push(z),A=z=>{o&&t.next(z),h++;let Q=!1;Ne(e(z,m++)).subscribe(Ce(t,U=>{r?.(U),o?T(U):t.next(U)},()=>{Q=!0},void 0,()=>{if(Q)try{for(h--;l.length&&h<i;){let U=l.shift();s?Yt(t,s,()=>A(U)):A(U)}M()}catch(U){t.error(U)}}))};return n.subscribe(Ce(t,T,()=>{w=!0,M()})),()=>{a?.()}}function Yr(n,t,e=1/0){return me(t)?Yr((i,r)=>Oe((o,s)=>t(i,o,r,s))(Ne(n(i,r))),e):(typeof t=="number"&&(e=t),ye((i,r)=>Bg(i,r,n,e)))}function jg(n=1/0){return Yr(Gr,n)}function $g(){return jg(1)}function yu(...n){return $g()(ul(n,Zr(n)))}function Cu(n){return new pe(t=>{Ne(n()).subscribe(t)})}function fl(...n){let t=Cg(n),{args:e,keys:i}=Fg(n),r=new pe(o=>{let{length:s}=e;if(!s){o.complete();return}let a=new Array(s),l=s,h=s;for(let m=0;m<s;m++){let w=!1;Ne(e[m]).subscribe(Ce(o,M=>{w||(w=!0,h--),a[m]=M},()=>l--,void 0,()=>{(!l||!w)&&(h||o.next(i?Vg(i,a):a),o.complete())}))}});return t?r.pipe(Lg(t)):r}function Hg(n=0,t,e=xg){let i=-1;return t!=null&&(Xa(t)?e=t:i=t),new pe(r=>{let o=Ag(n)?+n-e.now():n;o<0&&(o=0);let s=0;return e.schedule(function(){r.closed||(r.next(s++),0<=i?this.schedule(void 0,i):r.complete())},o)})}function ts(n,t){return ye((e,i)=>{let r=0;e.subscribe(Ce(i,o=>n.call(t,o,r++)&&i.next(o)))})}function zg(n){return ye((t,e)=>{let i=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,i){i=!1;let h=r;r=null,e.next(h)}s&&e.complete()},l=()=>{o=null,s&&e.complete()};t.subscribe(Ce(e,h=>{i=!0,r=h,o||Ne(n(h)).subscribe(o=Ce(e,a,l))},()=>{s=!0,(!i||!o||o.closed)&&e.complete()}))})}function ns(n,t=Jo){return zg(()=>Hg(n,t))}function ct(n){return ye((t,e)=>{let i=null,r=!1,o;i=t.subscribe(Ce(e,void 0,void 0,s=>{o=Ne(n(s,ct(n)(t))),i?(i.unsubscribe(),i=null,o.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(e))})}function wu(n,t){return me(t)?Yr(n,t,1):Yr(n,1)}function Eu(n,t=Jo){return ye((e,i)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let h=o;o=null,i.next(h)}};function l(){let h=s+n,m=t.now();if(m<h){r=this.schedule(void 0,h-m),i.add(r);return}a()}e.subscribe(Ce(i,h=>{o=h,s=t.now(),r||(r=t.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{o=r=null}))})}function is(n,t=Gr){return n=n??KC,ye((e,i)=>{let r,o=!0;e.subscribe(Ce(i,s=>{let a=t(s);(o||!n(r,a))&&(o=!1,r=a,i.next(s))}))})}function KC(n,t){return n===t}function ci(n){return ye((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}function Du(){return ye((n,t)=>{let e,i=!1;n.subscribe(Ce(t,r=>{let o=e;e=r,i&&t.next([o,r]),i=!0}))})}function Ug(n={}){let{connector:t=()=>new He,resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return o=>{let s,a,l,h=0,m=!1,w=!1,M=()=>{a?.unsubscribe(),a=void 0},T=()=>{M(),s=l=void 0,m=w=!1},A=()=>{let z=s;T(),z?.unsubscribe()};return ye((z,Q)=>{h++,!w&&!m&&M();let U=l=l??t();Q.add(()=>{h--,h===0&&!w&&!m&&(a=Su(A,r))}),U.subscribe(Q),!s&&h>0&&(s=new dn({next:be=>U.next(be),error:be=>{w=!0,M(),a=Su(T,e,be),U.error(be)},complete:()=>{m=!0,M(),a=Su(T,i),U.complete()}}),Ne(z).subscribe(s))})(o)}}function Su(n,t,...e){if(t===!0){n();return}if(t===!1)return;let i=new dn({next:()=>{i.unsubscribe(),n()}});return Ne(t(...e)).subscribe(i)}function Qr(n,t,e){let i,r=!1;return n&&typeof n=="object"?{bufferSize:i=1/0,windowTime:t=1/0,refCount:r=!1,scheduler:e}=n:i=n??1/0,Ug({connector:()=>new zi(i,t,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function hl(...n){let t=Zr(n);return ye((e,i)=>{(t?yu(n,e,t):yu(n,e)).subscribe(i)})}function St(n,t){return ye((e,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();e.subscribe(Ce(i,l=>{r?.unsubscribe();let h=0,m=o++;Ne(n(l,m)).subscribe(r=Ce(i,w=>i.next(t?t(l,w,m,h++):w),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Gi(n){return ye((t,e)=>{Ne(n).subscribe(Ce(e,()=>e.complete(),qo)),!e.closed&&t.subscribe(e)})}function Mu(n,t,e){let i=Object.create(XC);i.source=n,i.computation=t,e!=null&&(i.equal=e);let o=()=>{if(Fi(i),ri(i),i.value===Bn)throw i.error;return i.value};return o[Ke]=i,zo(i),o}function Gg(n,t){Fi(n),Bi(n,t),Br(n)}function Wg(n,t){Fi(n),$a(n,t),Br(n)}var XC=re(H({},ii),{value:ni,dirty:!0,error:null,equal:Uo,kind:"linkedSignal",producerMustRecompute(n){return n.value===ni||n.value===Li},producerRecomputeValue(n){if(n.value===Li)throw new Error("");let t=n.value;n.value=Li;let e=jn(n),i;try{let r=n.source(),o=t===ni||t===Bn?void 0:{source:n.sourceValue,value:t};i=n.computation(r,o),n.sourceValue=r}catch(r){i=Bn,n.error=r}finally{oi(n,e)}if(t!==ni&&i!==Bn&&n.equal(t,i)){n.value=t;return}n.value=i,n.version++}});function qg(n){let t=ae(null);try{return n()}finally{ae(t)}}var Zg=re(H({},ii),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,kind:"effect"});function Yg(n){if(n.dirty=!1,n.version>0&&!Vi(n))return;n.version++;let t=jn(n);try{n.cleanup(),n.fn()}finally{oi(n,t)}}var bl="https://angular.dev/best-practices/security#preventing-cross-site-scripting-xss",X=class extends Error{code;constructor(t,e){super(Ki(t,e)),this.code=t}};function JC(n){return`NG0${Math.abs(n)}`}function Ki(n,t){return`${JC(n)}${t?": "+t:""}`}var un=globalThis;function Te(n){for(let t in n)if(n[t]===Te)return t;throw Error("")}function Xg(n,t){for(let e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function ui(n){if(typeof n=="string")return n;if(Array.isArray(n))return`[${n.map(ui).join(", ")}]`;if(n==null)return""+n;let t=n.overriddenName||n.name;if(t)return`${t}`;let e=n.toString();if(e==null)return""+e;let i=e.indexOf(`
|
|
4
|
-
`);return i>=0?e.slice(0,i):e}function xl(n,t){return n?t?`${n} ${t}`:n:t||""}var ew=Te({__forward_ref__:Te});function Xr(n){return n.__forward_ref__=Xr,n.toString=function(){return ui(this())},n}function bt(n){return Jg(n)?n():n}function Jg(n){return typeof n=="function"&&n.hasOwnProperty(ew)&&n.__forward_ref__===Xr}function ce(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function yl(n){return tw(n,Cl)}function tw(n,t){return n.hasOwnProperty(t)&&n[t]||null}function nw(n){let t=n?.[Cl]??null;return t||null}function ku(n){return n&&n.hasOwnProperty(_l)?n[_l]:null}var Cl=Te({\u0275prov:Te}),_l=Te({\u0275inj:Te}),oe=class{_desc;ngMetadataName="InjectionToken";\u0275prov;constructor(t,e){this._desc=t,this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=ce({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function ju(n){return n&&!!n.\u0275providers}var $u=Te({\u0275cmp:Te}),Hu=Te({\u0275dir:Te}),zu=Te({\u0275pipe:Te});var Iu=Te({\u0275fac:Te}),Xi=Te({__NG_ELEMENT_ID__:Te}),Qg=Te({__NG_ENV_ID__:Te});function pn(n){return typeof n=="string"?n:n==null?"":String(n)}function e0(n){return typeof n=="function"?n.name||n.toString():typeof n=="object"&&n!=null&&typeof n.type=="function"?n.type.name||n.type.toString():pn(n)}var t0=Te({ngErrorCode:Te}),iw=Te({ngErrorMessage:Te}),rw=Te({ngTokenPath:Te});function Uu(n,t){return n0("",-200,t)}function wl(n,t){throw new X(-201,!1)}function n0(n,t,e){let i=new X(t,n);return i[t0]=t,i[iw]=n,e&&(i[rw]=e),i}function ow(n){return n[t0]}var Pu;function i0(){return Pu}function Tt(n){let t=Pu;return Pu=n,t}function Gu(n,t,e){let i=yl(n);if(i&&i.providedIn=="root")return i.value===void 0?i.value=i.factory():i.value;if(e&8)return null;if(t!==void 0)return t;wl(n,"Injector")}var sw={},Wi=sw,Ou="__NG_DI_FLAG__",Ru=class{injector;constructor(t){this.injector=t}retrieve(t,e){let i=qi(e)||0;try{return this.injector.get(t,i&8?null:Wi,i)}catch(r){if(Vr(r))return r;throw r}}};function aw(n,t=0){let e=Va();if(e===void 0)throw new X(-203,!1);if(e===null)return Gu(n,void 0,t);{let i=lw(t),r=e.retrieve(n,i);if(Vr(r)){if(i.optional)return null;throw r}return r}}function _e(n,t=0){return(i0()||aw)(bt(n),t)}function O(n,t){return _e(n,qi(t))}function qi(n){return typeof n>"u"||typeof n=="number"?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function lw(n){return{optional:!!(n&8),host:!!(n&1),self:!!(n&2),skipSelf:!!(n&4)}}function Nu(n){let t=[];for(let e=0;e<n.length;e++){let i=bt(n[e]);if(Array.isArray(i)){if(i.length===0)throw new X(900,!1);let r,o=0;for(let s=0;s<i.length;s++){let a=i[s],l=cw(a);typeof l=="number"?l===-1?r=a.token:o|=l:r=a}t.push(_e(r,o))}else t.push(_e(i))}return t}function Wu(n,t){return n[Ou]=t,n.prototype[Ou]=t,n}function cw(n){return n[Ou]}function Zi(n,t){let e=n.hasOwnProperty(Iu);return e?n[Iu]:null}function r0(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i<n.length;i++){let r=n[i],o=t[i];if(e&&(r=e(r),o=e(o)),o!==r)return!1}return!0}function o0(n){return n.flat(Number.POSITIVE_INFINITY)}function El(n,t){n.forEach(e=>Array.isArray(e)?El(e,t):t(e))}function qu(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function ls(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function s0(n,t){let e=[];for(let i=0;i<n;i++)e.push(t);return e}function a0(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(r===1)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;){let o=r-2;n[r]=n[o],r--}n[t]=e,n[t+1]=i}}function Dl(n,t,e){let i=Jr(n,t);return i>=0?n[i|1]=e:(i=~i,a0(n,i,t,e)),i}function Sl(n,t){let e=Jr(n,t);if(e>=0)return n[e|1]}function Jr(n,t){return dw(n,t,1)}function dw(n,t,e){let i=0,r=n.length>>e;for(;r!==i;){let o=i+(r-i>>1),s=n[o<<e];if(t===s)return o<<e;s>t?r=o:i=o+1}return~(r<<e)}var fi={},Qt=[],Ji=new oe(""),Zu=new oe("",-1),Yu=new oe(""),os=class{get(t,e=Wi){if(e===Wi){let r=n0("",-201);throw r.name="\u0275NotFound",r}return e}};function er(n){return n[$u]||null}function Qu(n){return n[Hu]||null}function l0(n){return n[zu]||null}function cs(n){return{\u0275providers:n}}function c0(...n){return{\u0275providers:Ku(!0,n),\u0275fromNgModule:!0}}function Ku(n,...t){let e=[],i=new Set,r,o=s=>{e.push(s)};return El(t,s=>{let a=s;vl(a,o,[],i)&&(r||=[],r.push(a))}),r!==void 0&&d0(r,o),e}function d0(n,t){for(let e=0;e<n.length;e++){let{ngModule:i,providers:r}=n[e];Xu(r,o=>{t(o,i)})}}function vl(n,t,e,i){if(n=bt(n),!n)return!1;let r=null,o=ku(n),s=!o&&er(n);if(!o&&!s){let l=n.ngModule;if(o=ku(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=n}let a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let h of l)vl(h,t,e,i)}}else if(o){if(o.imports!=null&&!a){i.add(r);let h;El(o.imports,m=>{vl(m,t,e,i)&&(h||=[],h.push(m))}),h!==void 0&&d0(h,t)}if(!a){let h=Zi(r)||(()=>new r);t({provide:r,useFactory:h,deps:Qt},r),t({provide:Yu,useValue:r,multi:!0},r),t({provide:Ji,useValue:()=>_e(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let h=n;Xu(l,m=>{t(m,h)})}}else return!1;return r!==n&&n.providers!==void 0}function Xu(n,t){for(let e of n)ju(e)&&(e=e.\u0275providers),Array.isArray(e)?Xu(e,t):t(e)}var uw=Te({provide:String,useValue:Te});function u0(n){return n!==null&&typeof n=="object"&&uw in n}function pw(n){return!!(n&&n.useExisting)}function fw(n){return!!(n&&n.useFactory)}function Yi(n){return typeof n=="function"}function p0(n){return!!n.useClass}var ds=new oe(""),ml={},Kg={},Tu;function us(){return Tu===void 0&&(Tu=new os),Tu}var Ft=class{},Qi=class extends Ft{parent;source;scopes;records=new Map;_ngOnDestroyHooks=new Set;_onDestroyHooks=[];get destroyed(){return this._destroyed}_destroyed=!1;injectorDefTypes;constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,Lu(t,s=>this.processProvider(s)),this.records.set(Zu,Kr(void 0,this)),r.has("environment")&&this.records.set(Ft,Kr(void 0,this));let o=this.records.get(ds);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(Yu,Qt,{self:!0}))}retrieve(t,e){let i=qi(e)||0;try{return this.get(t,Wi,i)}catch(r){if(Vr(r))return r;throw r}}destroy(){rs(this),this._destroyed=!0;let t=ae(null);try{for(let i of this._ngOnDestroyHooks)i.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let i of e)i()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),ae(t)}}onDestroy(t){return rs(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){rs(this);let e=Tn(this),i=Tt(void 0),r;try{return t()}finally{Tn(e),Tt(i)}}get(t,e=Wi,i){if(rs(this),t.hasOwnProperty(Qg))return t[Qg](this);let r=qi(i),o,s=Tn(this),a=Tt(void 0);try{if(!(r&4)){let h=this.records.get(t);if(h===void 0){let m=vw(t)&&yl(t);m&&this.injectableDefInScope(m)?h=Kr(Au(t),ml):h=null,this.records.set(t,h)}if(h!=null)return this.hydrate(t,h,r)}let l=r&2?us():this.parent;return e=r&8&&e===Wi?null:e,l.get(t,e)}catch(l){let h=ow(l);throw h===-200||h===-201?new X(h,null):l}finally{Tt(a),Tn(s)}}resolveInjectorInitializers(){let t=ae(null),e=Tn(this),i=Tt(void 0),r;try{let o=this.get(Ji,Qt,{self:!0});for(let s of o)s()}finally{Tn(e),Tt(i),ae(t)}}toString(){let t=[],e=this.records;for(let i of e.keys())t.push(ui(i));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=bt(t);let e=Yi(t)?t:bt(t&&t.provide),i=mw(t);if(!Yi(t)&&t.multi===!0){let r=this.records.get(e);r||(r=Kr(void 0,ml,!0),r.factory=()=>Nu(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e,i){let r=ae(null);try{if(e.value===Kg)throw Uu(ui(t));return e.value===ml&&(e.value=Kg,e.value=e.factory(void 0,i)),typeof e.value=="object"&&e.value&&_w(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{ae(r)}}injectableDefInScope(t){if(!t.providedIn)return!1;let e=bt(t.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(t){let e=this._onDestroyHooks.indexOf(t);e!==-1&&this._onDestroyHooks.splice(e,1)}};function Au(n){let t=yl(n),e=t!==null?t.factory:Zi(n);if(e!==null)return e;if(n instanceof oe)throw new X(204,!1);if(n instanceof Function)return hw(n);throw new X(204,!1)}function hw(n){if(n.length>0)throw new X(204,!1);let e=nw(n);return e!==null?()=>e.factory(n):()=>new n}function mw(n){if(u0(n))return Kr(void 0,n.useValue);{let t=Ju(n);return Kr(t,ml)}}function Ju(n,t,e){let i;if(Yi(n)){let r=bt(n);return Zi(r)||Au(r)}else if(u0(n))i=()=>bt(n.useValue);else if(fw(n))i=()=>n.useFactory(...Nu(n.deps||[]));else if(pw(n))i=(r,o)=>_e(bt(n.useExisting),o!==void 0&&o&8?8:void 0);else{let r=bt(n&&(n.useClass||n.provide));if(gw(n))i=()=>new r(...Nu(n.deps));else return Zi(r)||Au(r)}return i}function rs(n){if(n.destroyed)throw new X(205,!1)}function Kr(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function gw(n){return!!n.deps}function _w(n){return n!==null&&typeof n=="object"&&typeof n.ngOnDestroy=="function"}function vw(n){return typeof n=="function"||typeof n=="object"&&n.ngMetadataName==="InjectionToken"}function Lu(n,t){for(let e of n)Array.isArray(e)?Lu(e,t):e&&ju(e)?Lu(e.\u0275providers,t):t(e)}function eo(n,t){let e;n instanceof Qi?(rs(n),e=n):e=new Ru(n);let i,r=Tn(e),o=Tt(void 0);try{return t()}finally{Tn(r),Tt(o)}}function f0(){return i0()!==void 0||Va()!=null}var fn=0,ne=1,le=2,it=3,Xt=4,It=5,tr=6,to=7,Ue=8,Pt=9,kn=10,ke=11,no=12,ep=13,nr=14,xt=15,Hn=16,ir=17,In=18,ps=19,tp=20,$n=21,Ml=22,zn=23,zt=24,rr=25,Un=26,Ae=27,h0=1,np=6,hi=7,fs=8,or=9,Ge=10;function Pn(n){return Array.isArray(n)&&typeof n[h0]=="object"}function hn(n){return Array.isArray(n)&&n[h0]===!0}function ip(n){return(n.flags&4)!==0}function mi(n){return n.componentOffset>-1}function io(n){return(n.flags&1)===1}function On(n){return!!n.template}function ro(n){return(n[le]&512)!==0}function sr(n){return(n[le]&256)===256}var Mt=(function(n){return n[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL",n[n.ATTRIBUTE_NO_BINDING=6]="ATTRIBUTE_NO_BINDING",n})(Mt||{}),gl,ss="svg",rp="math";function m0(){return gl||(gl={},di(Mt.HTML,void 0,[["iframe",["srcdoc"]],["*",["innerHTML","outerHTML"]]]),di(Mt.STYLE,void 0,[["*",["style"]]]),di(Mt.URL,void 0,[["*",["formAction"]],["area",["href"]],["a",["href","xlink:href"]],["form",["action"]],["img",["src"]],["video",["src"]]]),di(Mt.URL,rp,[["*",["href","xlink:href"]],["annotation",["href","xlink:href"]],["annotation-xml",["href","xlink:href"]],["maction",["href","xlink:href"]],["malignmark",["href","xlink:href"]],["math",["href","xlink:href"]],["mroot",["href","xlink:href"]],["msqrt",["href","xlink:href"]],["merror",["href","xlink:href"]],["mfrac",["href","xlink:href"]],["mglyph",["href","xlink:href"]],["msub",["href","xlink:href"]],["msup",["href","xlink:href"]],["msubsup",["href","xlink:href"]],["mmultiscripts",["href","xlink:href"]],["mprescripts",["href","xlink:href"]],["mi",["href","xlink:href"]],["mn",["href","xlink:href"]],["mo",["href","xlink:href"]],["mpadded",["href","xlink:href"]],["mphantom",["href","xlink:href"]],["mrow",["href","xlink:href"]],["ms",["href","xlink:href"]],["mspace",["href","xlink:href"]],["mstyle",["href","xlink:href"]],["mtable",["href","xlink:href"]],["mtd",["href","xlink:href"]],["mtr",["href","xlink:href"]],["mtext",["href","xlink:href"]],["mover",["href","xlink:href"]],["munder",["href","xlink:href"]],["munderover",["href","xlink:href"]],["semantics",["href","xlink:href"]],["none",["href","xlink:href"]]]),di(Mt.RESOURCE_URL,void 0,[["base",["href"]],["embed",["src"]],["frame",["src"]],["iframe",["src"]],["link",["href"]],["object",["codebase","data"]]]),di(Mt.URL,ss,[["a",["href","xlink:href"]]]),di(Mt.ATTRIBUTE_NO_BINDING,ss,[["animate",["attributeName","values","to","from"]],["set",["to","attributeName"]],["animateMotion",["attributeName"]],["animateTransform",["attributeName"]]]),di(Mt.ATTRIBUTE_NO_BINDING,void 0,[["unknown",["attributeName","values","to","from","sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]],["iframe",["sandbox","allow","allowFullscreen","referrerPolicy","csp","fetchPriority"]]])),gl}function di(n,t,e){for(let[i,r]of e){let o=t&&i!=="unknown"?`:${t}:${i}`:i;o=o.toLowerCase();for(let s of r)gl[`${o}|${s.toLowerCase()}`]=n}}function g0(n,t,e){let i=m0(),r=n.toLowerCase(),o=t.toLowerCase(),s=e&&r!=="*"&&r!=="unknown"?i[`:${e}:${r}|${o}`]:void 0,a=e?i[`:${e}:*|${o}`]:void 0;return s??a??i[`${r}|${o}`]??i[`*|${o}`]??Mt.NONE}function Jt(n){for(;Array.isArray(n);)n=n[fn];return n}function op(n,t){return Jt(t[n])}function Vt(n,t){return Jt(t[n.index])}function hs(n,t){return n.data[t]}function Tl(n,t){return n[t]}function sp(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}function en(n,t){let e=t[n];return Pn(e)?e:e[fn]}function _0(n){return(n[le]&4)===4}function kl(n){return(n[le]&128)===128}function v0(n){return hn(n[it])}function tn(n,t){return t==null?null:n[t]}function ap(n){n[ir]=0}function lp(n){n[le]&1024||(n[le]|=1024,kl(n)&&gi(n))}function b0(n,t){for(;n>0;)t=t[nr],n--;return t}function ms(n){return!!(n[le]&9216||n[zt]?.dirty)}function Il(n){n[kn].changeDetectionScheduler?.notify(8),n[le]&64&&(n[le]|=1024),ms(n)&&gi(n)}function gi(n){n[kn].changeDetectionScheduler?.notify(0);let t=pi(n);for(;t!==null&&!(t[le]&8192||(t[le]|=8192,!kl(t)));)t=pi(t)}function cp(n,t){if(sr(n))throw new X(911,!1);n[$n]===null&&(n[$n]=[]),n[$n].push(t)}function x0(n,t){if(n[$n]===null)return;let e=n[$n].indexOf(t);e!==-1&&n[$n].splice(e,1)}function pi(n){let t=n[it];return hn(t)?t[it]:t}function dp(n){return n[to]??=[]}function up(n){return n.cleanup??=[]}function y0(n,t,e,i){let r=dp(t);r.push(e),n.firstCreatePass&&up(n).push(i,r.length-1)}var he={lFrame:O0(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var Fu=!1;function C0(){return he.lFrame.elementDepthCount}function w0(){he.lFrame.elementDepthCount++}function pp(){he.lFrame.elementDepthCount--}function Pl(){return he.bindingsEnabled}function fp(){return he.skipHydrationRootTNode!==null}function hp(n){return he.skipHydrationRootTNode===n}function mp(){he.skipHydrationRootTNode=null}function ie(){return he.lFrame.lView}function We(){return he.lFrame.tView}function g(n){return he.lFrame.contextLView=n,n[Ue]}function _(n){return he.lFrame.contextLView=null,n}function rt(){let n=gp();for(;n!==null&&n.type===64;)n=n.parent;return n}function gp(){return he.lFrame.currentTNode}function E0(){let n=he.lFrame,t=n.currentTNode;return n.isParent?t:t.parent}function oo(n,t){let e=he.lFrame;e.currentTNode=n,e.isParent=t}function _p(){return he.lFrame.isParent}function vp(){he.lFrame.isParent=!1}function D0(){return he.lFrame.contextLView}function bp(){return Fu}function so(n){let t=Fu;return Fu=n,t}function gs(){let n=he.lFrame,t=n.bindingRootIndex;return t===-1&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function xp(){return he.lFrame.bindingIndex}function S0(n){return he.lFrame.bindingIndex=n}function ar(){return he.lFrame.bindingIndex++}function _s(n){let t=he.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function M0(){return he.lFrame.inI18n}function T0(n,t){let e=he.lFrame;e.bindingIndex=e.bindingRootIndex=n,Ol(t)}function k0(){return he.lFrame.currentDirectiveIndex}function Ol(n){he.lFrame.currentDirectiveIndex=n}function I0(n){let t=he.lFrame.currentDirectiveIndex;return t===-1?null:n[t]}function Rl(){return he.lFrame.currentQueryIndex}function vs(n){he.lFrame.currentQueryIndex=n}function bw(n){let t=n[ne];return t.type===2?t.declTNode:t.type===1?n[It]:null}function yp(n,t,e){if(e&4){let r=t,o=n;for(;r=r.parent,r===null&&!(e&1);)if(r=bw(o),r===null||(o=o[nr],r.type&10))break;if(r===null)return!1;t=r,n=o}let i=he.lFrame=P0();return i.currentTNode=t,i.lView=n,!0}function Nl(n){let t=P0(),e=n[ne];he.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function P0(){let n=he.lFrame,t=n===null?null:n.child;return t===null?O0(n):t}function O0(n){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return n!==null&&(n.child=t),t}function R0(){let n=he.lFrame;return he.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var Cp=R0;function Al(){let n=R0();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function N0(n){return(he.lFrame.contextLView=b0(n,he.lFrame.contextLView))[Ue]}function nn(){return he.lFrame.selectedIndex}function _i(n){he.lFrame.selectedIndex=n}function bs(){let n=he.lFrame;return hs(n.tView,n.selectedIndex)}function B(){he.lFrame.currentNamespace=ss}function fe(){xw()}function xw(){he.lFrame.currentNamespace=null}function wp(){return he.lFrame.currentNamespace}var A0=!0;function Ll(){return A0}function xs(n){A0=n}function Vu(n,t=null,e=null,i){let r=L0(n,t,e,i);return r.resolveInjectorInitializers(),r}function L0(n,t=null,e=null,i,r=new Set){let o=[e||Qt,c0(n)];return i=i||(typeof n=="object"?void 0:ui(n)),new Qi(o,t||us(),i||null,r)}var kt=class n{static THROW_IF_NOT_FOUND=Wi;static NULL=new os;static create(t,e){if(Array.isArray(t))return Vu({name:""},e,t,"");{let i=t.name??"";return Vu({name:i},t.parent,t.providers,i)}}static \u0275prov=ce({token:n,providedIn:"any",factory:()=>_e(Zu)});static __NG_ELEMENT_ID__=-1},mt=new oe(""),ot=(()=>{class n{static __NG_ELEMENT_ID__=yw;static __NG_ENV_ID__=e=>e}return n})(),as=class extends ot{_lView;constructor(t){super(),this._lView=t}get destroyed(){return sr(this._lView)}onDestroy(t){let e=this._lView;return cp(e,t),()=>x0(e,t)}};function yw(){return new as(ie())}var Ht=class{_console=console;handleError(t){this._console.error("ERROR",t)}},mn=new oe("",{providedIn:"root",factory:()=>{let n=O(Ft),t;return e=>{n.destroyed&&!t?setTimeout(()=>{throw e}):(t??=n.get(Ht),t.handleError(e))}}}),F0={provide:Ji,useValue:()=>{O(Ht)},multi:!0};function v(n,t){let[e,i,r]=lu(n,t?.equal),o=e,s=o[Ke];return o.set=i,o.update=r,o.asReadonly=Fl.bind(o),o}function Fl(){let n=this[Ke];if(n.readonlyFn===void 0){let t=()=>this();t[Ke]=n,n.readonlyFn=t}return n.readonlyFn}var lr=(()=>{class n{view;node;constructor(e,i){this.view=e,this.node=i}static __NG_ELEMENT_ID__=Cw}return n})();function Cw(){return new lr(ie(),rt())}var Kt=class{},ys=new oe("",{providedIn:"root",factory:()=>!1});var Ep=new oe(""),Dp=new oe(""),vi=(()=>{class n{taskId=0;pendingTasks=new Set;destroyed=!1;pendingTask=new Yo(!1);get hasPendingTasks(){return this.destroyed?!1:this.pendingTask.value}get hasPendingTasksObservable(){return this.destroyed?new pe(e=>{e.next(!1),e.complete()}):this.pendingTask}add(){!this.hasPendingTasks&&!this.destroyed&&this.pendingTask.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.pendingTasks.size===0&&this.hasPendingTasks&&this.pendingTask.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this.hasPendingTasks&&this.pendingTask.next(!1),this.destroyed=!0,this.pendingTask.unsubscribe()}static \u0275prov=ce({token:n,providedIn:"root",factory:()=>new n})}return n})(),ao=(()=>{class n{internalPendingTasks=O(vi);scheduler=O(Kt);errorHandler=O(mn);add(){let e=this.internalPendingTasks.add();return()=>{this.internalPendingTasks.has(e)&&(this.scheduler.notify(11),this.internalPendingTasks.remove(e))}}run(e){let i=this.add();e().catch(this.errorHandler).finally(i)}static \u0275prov=ce({token:n,providedIn:"root",factory:()=>new n})}return n})();function cr(...n){}var Cs=(()=>{class n{static \u0275prov=ce({token:n,providedIn:"root",factory:()=>new Bu})}return n})(),Bu=class{dirtyEffectCount=0;queues=new Map;add(t){this.enqueue(t),this.schedule(t)}schedule(t){t.dirty&&this.dirtyEffectCount++}remove(t){let e=t.zone,i=this.queues.get(e);i.has(t)&&(i.delete(t),t.dirty&&this.dirtyEffectCount--)}enqueue(t){let e=t.zone;this.queues.has(e)||this.queues.set(e,new Set);let i=this.queues.get(e);i.has(t)||i.add(t)}flush(){for(;this.dirtyEffectCount>0;){let t=!1;for(let[e,i]of this.queues)e===null?t||=this.flushQueue(i):t||=e.run(()=>this.flushQueue(i));t||(this.dirtyEffectCount=0)}}flushQueue(t){let e=!1;for(let i of t)i.dirty&&(this.dirtyEffectCount--,e=!0,i.run());return e}};function fc(n){return{toString:n}.toString()}var Vl="__parameters__";function Pw(n){return function(...e){if(n){let i=n(...e);for(let r in i)this[r]=i[r]}}}function y_(n,t,e){return fc(()=>{let i=Pw(t);function r(...o){if(this instanceof r)return i.apply(this,o),this;let s=new r(...o);return a.annotation=s,a;function a(l,h,m){let w=l.hasOwnProperty(Vl)?l[Vl]:Object.defineProperty(l,Vl,{value:[]})[Vl];for(;w.length<=m;)w.push(null);return(w[m]=w[m]||[]).push(s),l}}return r.prototype.ngMetadataName=n,r.annotationCls=r,r})}var _f=Wu(y_("Inject",n=>({token:n})),-1),vf=Wu(y_("Optional"),8);function Ow(n){return typeof n=="function"}var Yl=class{previousValue;currentValue;firstChange;constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}};function C_(n,t,e,i){t!==null?t.applyValueToInputSignal(t,i):n[e]=i}var As=(()=>{let n=()=>w_;return n.ngInherit=!0,n})();function w_(n){return n.type.prototype.ngOnChanges&&(n.setInput=Nw),Rw}function Rw(){let n=D_(this),t=n?.current;if(t){let e=n.previous;if(e===fi)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function Nw(n,t,e,i,r){let o=this.declaredInputs[i],s=D_(n)||Aw(n,{previous:fi,current:null}),a=s.current||(s.current={}),l=s.previous,h=l[o];a[o]=new Yl(h&&h.currentValue,e,l===fi),C_(n,t,r,e)}var E_="__ngSimpleChanges__";function D_(n){return n[E_]||null}function Aw(n,t){return n[E_]=t}var V0=[];var Me=function(n,t=null,e){for(let i=0;i<V0.length;i++){let r=V0[i];r(n,t,e)}};function Lw(n,t,e){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){let s=w_(t);(e.preOrderHooks??=[]).push(n,s),(e.preOrderCheckHooks??=[]).push(n,s)}r&&(e.preOrderHooks??=[]).push(0-n,r),o&&((e.preOrderHooks??=[]).push(n,o),(e.preOrderCheckHooks??=[]).push(n,o))}function S_(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e<i;e++){let o=n.data[e].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:h,ngOnDestroy:m}=o;s&&(n.contentHooks??=[]).push(-e,s),a&&((n.contentHooks??=[]).push(e,a),(n.contentCheckHooks??=[]).push(e,a)),l&&(n.viewHooks??=[]).push(-e,l),h&&((n.viewHooks??=[]).push(e,h),(n.viewCheckHooks??=[]).push(e,h)),m!=null&&(n.destroyHooks??=[]).push(e,m)}}function Ul(n,t,e){M_(n,t,3,e)}function Gl(n,t,e,i){(n[le]&3)===e&&M_(n,t,e,i)}function Sp(n,t){let e=n[le];(e&3)===t&&(e&=16383,e+=1,n[le]=e)}function M_(n,t,e,i){let r=i!==void 0?n[ir]&65535:0,o=i??-1,s=t.length-1,a=0;for(let l=r;l<s;l++)if(typeof t[l+1]=="number"){if(a=t[l],i!=null&&a>=i)break}else t[l]<0&&(n[ir]+=65536),(a<o||o==-1)&&(Fw(n,e,t,l),n[ir]=(n[ir]&4294901760)+l+2),l++}function B0(n,t){Me(4,n,t);let e=ae(null);try{t.call(n)}finally{ae(e),Me(5,n,t)}}function Fw(n,t,e,i){let r=e[i]<0,o=e[i+1],s=r?-e[i]:e[i],a=n[s];r?n[le]>>14<n[ir]>>16&&(n[le]&3)===t&&(n[le]+=16384,B0(a,o)):B0(a,o)}var co=-1,hr=class{factory;name;injectImpl;resolving=!1;canSeeViewProviders;multi;componentProviders;index;providerFactory;constructor(t,e,i,r){this.factory=t,this.name=r,this.canSeeViewProviders=e,this.injectImpl=i}};function Vw(n){return(n.flags&8)!==0}function Bw(n){return(n.flags&16)!==0}function jw(n,t,e){let i=0;for(;i<e.length;){let r=e[i];if(typeof r=="number"){if(r!==0)break;i++;let o=e[i++],s=e[i++],a=e[i++];n.setAttribute(t,s,a,o)}else{let o=r,s=e[++i];Hw(o)?n.setProperty(t,o,s):n.setAttribute(t,o,s),i++}}return i}function $w(n){return n===3||n===4||n===6}function Hw(n){return n.charCodeAt(0)===64}function fo(n,t){if(!(t===null||t.length===0))if(n===null||n.length===0)n=t.slice();else{let e=-1;for(let i=0;i<t.length;i++){let r=t[i];typeof r=="number"?e=r:e===0||(e===-1||e===2?j0(n,e,r,null,t[++i]):j0(n,e,r,null,null))}}return n}function j0(n,t,e,i,r){let o=0,s=n.length;if(t===-1)s=-1;else for(;o<n.length;){let a=n[o++];if(typeof a=="number"){if(a===t){s=-1;break}else if(a>t){s=o-1;break}}}for(;o<n.length;){let a=n[o];if(typeof a=="number")break;if(a===e){r!==null&&(n[o+1]=r);return}o++,r!==null&&o++}s!==-1&&(n.splice(s,0,t),o=s+1),n.splice(o++,0,e),r!==null&&n.splice(o++,0,r)}function T_(n){return n!==co}function Ql(n){return n&32767}function zw(n){return n>>16}function Kl(n,t){let e=zw(n),i=t;for(;e>0;)i=i[nr],e--;return i}var Fp=!0;function Xl(n){let t=Fp;return Fp=n,t}var Uw=256,k_=Uw-1,I_=5,Gw=0,Rn={};function Ww(n,t,e){let i;typeof e=="string"?i=e.charCodeAt(0)||0:e.hasOwnProperty(Xi)&&(i=e[Xi]),i==null&&(i=e[Xi]=Gw++);let r=i&k_,o=1<<r;t.data[n+(r>>I_)]|=o}function Jl(n,t){let e=P_(n,t);if(e!==-1)return e;let i=t[ne];i.firstCreatePass&&(n.injectorIndex=t.length,Mp(i.data,n),Mp(t,null),Mp(i.blueprint,null));let r=bf(n,t),o=n.injectorIndex;if(T_(r)){let s=Ql(r),a=Kl(r,t),l=a[ne].data;for(let h=0;h<8;h++)t[o+h]=a[s+h]|l[s+h]}return t[o+8]=r,o}function Mp(n,t){n.push(0,0,0,0,0,0,0,0,t)}function P_(n,t){return n.injectorIndex===-1||n.parent&&n.parent.injectorIndex===n.injectorIndex||t[n.injectorIndex+8]===null?-1:n.injectorIndex}function bf(n,t){if(n.parent&&n.parent.injectorIndex!==-1)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;r!==null;){if(i=L_(r),i===null)return co;if(e++,r=r[nr],i.injectorIndex!==-1)return i.injectorIndex|e<<16}return co}function Vp(n,t,e){Ww(n,t,e)}function O_(n,t,e){if(e&8||n!==void 0)return n;wl(t,"NodeInjector")}function R_(n,t,e,i){if(e&8&&i===void 0&&(i=null),(e&3)===0){let r=n[Pt],o=Tt(void 0);try{return r?r.get(t,i,e&8):Gu(t,i,e&8)}finally{Tt(o)}}return O_(i,t,e)}function N_(n,t,e,i=0,r){if(n!==null){if(t[le]&2048&&!(i&2)){let s=Qw(n,t,e,i,Rn);if(s!==Rn)return s}let o=A_(n,t,e,i,Rn);if(o!==Rn)return o}return R_(t,e,i,r)}function A_(n,t,e,i,r){let o=Zw(e);if(typeof o=="function"){if(!yp(t,n,i))return i&1?O_(r,e,i):R_(t,e,i,r);try{let s;if(s=o(i),s==null&&!(i&8))wl(e);else return s}finally{Cp()}}else if(typeof o=="number"){let s=null,a=P_(n,t),l=co,h=i&1?t[xt][It]:null;for((a===-1||i&4)&&(l=a===-1?bf(n,t):t[a+8],l===co||!H0(i,!1)?a=-1:(s=t[ne],a=Ql(l),t=Kl(l,t)));a!==-1;){let m=t[ne];if($0(o,a,m.data)){let w=qw(a,t,e,s,i,h);if(w!==Rn)return w}l=t[a+8],l!==co&&H0(i,t[ne].data[a+8]===h)&&$0(o,a,t)?(s=m,a=Ql(l),t=Kl(l,t)):a=-1}}return r}function qw(n,t,e,i,r,o){let s=t[ne],a=s.data[n+8],l=i==null?mi(a)&&Fp:i!=s&&(a.type&3)!==0,h=r&1&&o===a,m=Wl(a,s,e,l,h);return m!==null?Ds(t,s,m,a,r):Rn}function Wl(n,t,e,i,r){let o=n.providerIndexes,s=t.data,a=o&1048575,l=n.directiveStart,h=n.directiveEnd,m=o>>20,w=i?a:a+m,M=r?a+m:h;for(let T=w;T<M;T++){let A=s[T];if(T<l&&e===A||T>=l&&A.type===e)return T}if(r){let T=s[l];if(T&&On(T)&&T.type===e)return l}return null}function Ds(n,t,e,i,r){let o=n[e],s=t.data;if(o instanceof hr){let a=o;if(a.resolving){let T=e0(s[e]);throw Uu(T)}let l=Xl(a.canSeeViewProviders);a.resolving=!0;let h=s[e].type||s[e],m,w=a.injectImpl?Tt(a.injectImpl):null,M=yp(n,i,0);try{o=n[e]=a.factory(void 0,r,s,n,i),t.firstCreatePass&&e>=i.directiveStart&&Lw(e,s[e],t)}finally{w!==null&&Tt(w),Xl(l),a.resolving=!1,Cp()}}return o}function Zw(n){if(typeof n=="string")return n.charCodeAt(0)||0;let t=n.hasOwnProperty(Xi)?n[Xi]:void 0;return typeof t=="number"?t>=0?t&k_:Yw:t}function $0(n,t,e){let i=1<<n;return!!(e[t+(n>>I_)]&i)}function H0(n,t){return!(n&2)&&!(n&1&&t)}var dr=class{_tNode;_lView;constructor(t,e){this._tNode=t,this._lView=e}get(t,e,i){return N_(this._tNode,this._lView,t,qi(i),e)}};function Yw(){return new dr(rt(),ie())}function Qw(n,t,e,i,r){let o=n,s=t;for(;o!==null&&s!==null&&s[le]&2048&&!ro(s);){let a=A_(o,s,e,i|2,Rn);if(a!==Rn)return a;let l=o.parent;if(!l){let h=s[tp];if(h){let m=h.get(e,Rn,i);if(m!==Rn)return m}l=L_(s),s=s[nr]}o=l}return r}function L_(n){let t=n[ne],e=t.type;return e===2?t.declTNode:e===1?n[It]:null}function Kw(){return vo(rt(),ie())}function vo(n,t){return new bn(Vt(n,t))}var bn=(()=>{class n{nativeElement;constructor(e){this.nativeElement=e}static __NG_ELEMENT_ID__=Kw}return n})();function F_(n){return n instanceof bn?n.nativeElement:n}function Xw(){return this._results[Symbol.iterator]()}var ec=class{_emitDistinctChangesOnly;dirty=!0;_onDirty=void 0;_results=[];_changesDetected=!1;_changes=void 0;length=0;first=void 0;last=void 0;get changes(){return this._changes??=new He}constructor(t=!1){this._emitDistinctChangesOnly=t}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){this.dirty=!1;let i=o0(t);(this._changesDetected=!r0(this._results,i,e))&&(this._results=i,this.length=i.length,this.last=i[this.length-1],this.first=i[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}[Symbol.iterator]=Xw};function V_(n){return(n.flags&128)===128}var xf=(function(n){return n[n.OnPush=0]="OnPush",n[n.Default=1]="Default",n})(xf||{}),B_=new Map,Jw=0;function e1(){return Jw++}function t1(n){B_.set(n[ps],n)}function Bp(n){B_.delete(n[ps])}var z0="__ngContext__";function ho(n,t){Pn(t)?(n[z0]=t[ps],t1(t)):n[z0]=t}function j_(n){return H_(n[no])}function $_(n){return H_(n[Xt])}function H_(n){for(;n!==null&&!hn(n);)n=n[Xt];return n}var jp;function yf(n){jp=n}function Cf(){if(jp!==void 0)return jp;if(typeof document<"u")return document;throw new X(210,!1)}var hc=new oe("",{providedIn:"root",factory:()=>n1}),n1="ng",mc=new oe(""),gr=new oe("",{providedIn:"platform",factory:()=>"unknown"});var gc=new oe("",{providedIn:"root",factory:()=>Cf().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var i1="h",r1="b";var z_="r";var U_="di";var G_=!1,W_=new oe("",{providedIn:"root",factory:()=>G_});var o1=(n,t,e,i)=>{};function s1(n,t,e,i){o1(n,t,e,i)}function _c(n){return(n.flags&32)===32}var a1=()=>null;function q_(n,t,e=!1){return a1(n,t,e)}function Z_(n,t){let e=n.contentQueries;if(e!==null){let i=ae(null);try{for(let r=0;r<e.length;r+=2){let o=e[r],s=e[r+1];if(s!==-1){let a=n.data[s];vs(o),a.contentQueries(2,t[s],s)}}}finally{ae(i)}}}function $p(n,t,e){vs(0);let i=ae(null);try{t(n,e)}finally{ae(i)}}function wf(n,t,e){if(ip(t)){let i=ae(null);try{let r=t.directiveStart,o=t.directiveEnd;for(let s=r;s<o;s++){let a=n.data[s];if(a.contentQueries){let l=e[s];a.contentQueries(1,l,s)}}}finally{ae(i)}}}var Gn=(function(n){return n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",n})(Gn||{});var l1="svg",c1="math",d1={"http://www.w3.org/2000/svg":l1,"http://www.w3.org/1998/Math/MathML":c1},Bl;function u1(){if(Bl===void 0&&(Bl=null,un.trustedTypes))try{Bl=un.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return Bl}function vc(n){return u1()?.createHTML(n)||n}var jl;function p1(){if(jl===void 0&&(jl=null,un.trustedTypes))try{jl=un.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return jl}function U0(n){return p1()?.createHTML(n)||n}var tc=class{changingThisBreaksApplicationSecurity;constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${bl})`}};function Ls(n){return n instanceof tc?n.changingThisBreaksApplicationSecurity:n}function Ef(n,t){let e=Y_(n);if(e!=null&&e!==t){if(e==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${bl})`)}return e===t}function Y_(n){return n instanceof tc&&n.getTypeName()||null}function f1(n){let t=new zp(n);return h1()?new Hp(t):t}var Hp=class{inertDocumentHelper;constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{let e=new window.DOMParser().parseFromString(vc(t),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(t):(e.firstChild?.remove(),e)}catch{return null}}},zp=class{defaultDoc;inertDocument;constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let e=this.inertDocument.createElement("template");return e.innerHTML=vc(t),e}};function h1(){try{return!!new window.DOMParser().parseFromString(vc(""),"text/html")}catch{return!1}}var m1=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function Df(n){return n=String(n),n.match(m1)?n:"unsafe:"+n}function Wn(n){let t={};for(let e of n.split(","))t[e]=!0;return t}function Fs(...n){let t={};for(let e of n)for(let i in e)e.hasOwnProperty(i)&&(t[i]=!0);return t}var Q_=Wn("area,br,col,hr,img,wbr"),K_=Wn("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),X_=Wn("rp,rt"),g1=Fs(X_,K_),_1=Fs(K_,Wn("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),v1=Fs(X_,Wn("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),G0=Fs(Q_,_1,v1,g1),J_=Wn("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),b1=Wn("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),x1=Wn("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),y1=Fs(J_,b1,x1),C1=Wn("script,style,template"),Up=class{sanitizedSomething=!1;buf=[];sanitizeChildren(t){let e=t.firstChild,i=!0,r=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild){r.push(e),e=D1(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let o=E1(e);if(o){e=o;break}e=r.pop()}}return this.buf.join("")}startElement(t){let e=W0(t).toLowerCase();if(!G0.hasOwnProperty(e))return this.sanitizedSomething=!0,!C1.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let i=t.attributes;for(let r=0;r<i.length;r++){let o=i.item(r),s=o.name,a=s.toLowerCase();if(!y1.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;J_[a]&&(l=Df(l)),this.buf.push(" ",s,'="',q0(l),'"')}return this.buf.push(">"),!0}endElement(t){let e=W0(t).toLowerCase();G0.hasOwnProperty(e)&&!Q_.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(q0(t))}};function w1(n,t){return(n.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function E1(n){let t=n.nextSibling;if(t&&n!==t.previousSibling)throw ev(t);return t}function D1(n){let t=n.firstChild;if(t&&w1(n,t))throw ev(t);return t}function W0(n){let t=n.nodeName;return typeof t=="string"?t:"FORM"}function ev(n){return new Error(`Failed to sanitize html because the element is clobbered: ${n.outerHTML}`)}var S1=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,M1=/([^\#-~ |!])/g;function q0(n){return n.replace(/&/g,"&").replace(S1,function(t){let e=t.charCodeAt(0),i=t.charCodeAt(1);return"&#"+((e-55296)*1024+(i-56320)+65536)+";"}).replace(M1,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}var $l;function tv(n,t){let e=null;try{$l=$l||f1(n);let i=t?String(t):"";e=$l.getInertBodyElement(i);let r=5,o=i;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=$l.getInertBodyElement(i)}while(i!==o);let a=new Up().sanitizeChildren(Z0(e)||e);return vc(a)}finally{if(e){let i=Z0(e)||e;for(;i.firstChild;)i.firstChild.remove()}}}function Z0(n){return"content"in n&&T1(n)?n.content:null}function T1(n){return n.nodeType===Node.ELEMENT_NODE&&n.nodeName==="TEMPLATE"}var k1=/^>|^->|<!--|-->|--!>|<!-$/g,I1=/(<|>)/g,P1="\u200B$1\u200B";function O1(n){return n.replace(k1,t=>t.replace(I1,P1))}function R1(n,t){return n.createText(t)}function N1(n,t,e){n.setValue(t,e)}function A1(n,t){return n.createComment(O1(t))}function nv(n,t,e){return n.createElement(t,e)}function nc(n,t,e,i,r){n.insertBefore(t,e,i,r)}function iv(n,t,e){n.appendChild(t,e)}function Y0(n,t,e,i,r){i!==null?nc(n,t,e,i,r):iv(n,t,e)}function rv(n,t,e,i){n.removeChild(null,t,e,i)}function L1(n,t,e){n.setAttribute(t,"style",e)}function F1(n,t,e){e===""?n.removeAttribute(t,"class"):n.setAttribute(t,"class",e)}function ov(n,t,e){let{mergedAttrs:i,classes:r,styles:o}=e;i!==null&&jw(n,t,i),r!==null&&F1(n,t,r),o!==null&&L1(n,t,o)}function V1(n,t=!0){if(n[0]!=":")return[null,n];let e=n.indexOf(":",1);if(e===-1){if(t)throw new Error(`Unsupported format "${n}" expecting ":namespace:name"`);return[null,n]}return[n.slice(1,e),n.slice(e+1)]}function Sf(n,t,e){if(t!==void 0&&e!==void 0&&B1(t,e)!==Mt.HTML)return n;let i=sv();return i?U0(i.sanitize(Mt.HTML,n)||""):Ef(n,"HTML")?U0(Ls(n)):tv(Cf(),pn(n))}function _r(n){let t=sv();return t?t.sanitize(Mt.URL,n)||"":Ef(n,"URL")?Ls(n):Df(pn(n))}function sv(){let n=ie();return n&&n[kn].sanitizer}function B1(n,t){let[e,i]=j1(n);return g0(i,t,e)}function j1(n){n=n.toLowerCase();let t=V1(n,!1);if(t[0])return t;let i=nn()===-1?null:bs(),r=i?.namespace;if(n==="#host"&&i?.type===2){let o=Vt(i,ie());if(o.tagName&&(n=o.tagName.toLowerCase()),r==null){let s=o.namespaceURI;r=s&&d1[s]}}return[r,n]}function Mf(n){return n.ownerDocument.defaultView}function qe(n){return n.ownerDocument}function $1(n,t,e){let i=n.length;for(;;){let r=n.indexOf(t,e);if(r===-1)return r;if(r===0||n.charCodeAt(r-1)<=32){let o=t.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}e=r+1}}var av="ng-template";function H1(n,t,e,i){let r=0;if(i){for(;r<t.length&&typeof t[r]=="string";r+=2)if(t[r]==="class"&&$1(t[r+1].toLowerCase(),e,0)!==-1)return!0}else if(Tf(n))return!1;if(r=t.indexOf(1,r),r>-1){let o;for(;++r<t.length&&typeof(o=t[r])=="string";)if(o.toLowerCase()===e)return!0}return!1}function Tf(n){return n.type===4&&n.value!==av}function z1(n,t,e){let i=n.type===4&&!e?av:n.value;return t===i}function U1(n,t,e){let i=4,r=n.attrs,o=r!==null?q1(r):0,s=!1;for(let a=0;a<t.length;a++){let l=t[a];if(typeof l=="number"){if(!s&&!gn(i)&&!gn(l))return!1;if(s&&gn(l))continue;s=!1,i=l|i&1;continue}if(!s)if(i&4){if(i=2|i&1,l!==""&&!z1(n,l,e)||l===""&&t.length===1){if(gn(i))return!1;s=!0}}else if(i&8){if(r===null||!H1(n,r,l,e)){if(gn(i))return!1;s=!0}}else{let h=t[++a],m=G1(l,r,Tf(n),e);if(m===-1){if(gn(i))return!1;s=!0;continue}if(h!==""){let w;if(m>o?w="":w=r[m+1].toLowerCase(),i&2&&h!==w){if(gn(i))return!1;s=!0}}}}return gn(i)||s}function gn(n){return(n&1)===0}function G1(n,t,e,i){if(t===null)return-1;let r=0;if(i||!e){let o=!1;for(;r<t.length;){let s=t[r];if(s===n)return r;if(s===3||s===6)o=!0;else if(s===1||s===2){let a=t[++r];for(;typeof a=="string";)a=t[++r];continue}else{if(s===4)break;if(s===0){r+=4;continue}}r+=o?1:2}return-1}else return Z1(t,n)}function lv(n,t,e=!1){for(let i=0;i<t.length;i++)if(U1(n,t[i],e))return!0;return!1}function W1(n){let t=n.attrs;if(t!=null){let e=t.indexOf(5);if((e&1)===0)return t[e+1]}return null}function q1(n){for(let t=0;t<n.length;t++){let e=n[t];if($w(e))return t}return n.length}function Z1(n,t){let e=n.indexOf(4);if(e>-1)for(e++;e<n.length;){let i=n[e];if(typeof i=="number")return-1;if(i===t)return e;e++}return-1}function Y1(n,t){e:for(let e=0;e<t.length;e++){let i=t[e];if(n.length===i.length){for(let r=0;r<n.length;r++)if(n[r]!==i[r])continue e;return!0}}return!1}function Q0(n,t){return n?":not("+t.trim()+")":t}function Q1(n){let t=n[0],e=1,i=2,r="",o=!1;for(;e<n.length;){let s=n[e];if(typeof s=="string")if(i&2){let a=n[++e];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else i&8?r+="."+s:i&4&&(r+=" "+s);else r!==""&&!gn(s)&&(t+=Q0(o,r),r=""),i=s,o=o||!gn(i);e++}return r!==""&&(t+=Q0(o,r)),t}function K1(n){return n.map(Q1).join(",")}function X1(n){let t=[],e=[],i=1,r=2;for(;i<n.length;){let o=n[i];if(typeof o=="string")r===2?o!==""&&t.push(o,n[++i]):r===8&&e.push(o);else{if(!gn(r))break;r=o}i++}return e.length&&t.push(1,...e),t}var gt={};function kf(n,t,e,i,r,o,s,a,l,h,m){let w=Ae+i,M=w+r,T=J1(w,M),A=typeof h=="function"?h():h;return T[ne]={type:n,blueprint:T,template:e,queries:null,viewQuery:a,declTNode:t,data:T.slice().fill(null,w),bindingStartIndex:w,expandoStartIndex:M,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:typeof o=="function"?o():o,pipeRegistry:typeof s=="function"?s():s,firstChild:null,schemas:l,consts:A,incompleteFirstPass:!1,ssrId:m}}function J1(n,t){let e=[];for(let i=0;i<t;i++)e.push(i<n?null:gt);return e}function eE(n){let t=n.tView;return t===null||t.incompleteFirstPass?n.tView=kf(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts,n.id):t}function If(n,t,e,i,r,o,s,a,l,h,m){let w=t.blueprint.slice();return w[fn]=r,w[le]=i|4|128|8|64|1024,(h!==null||n&&n[le]&2048)&&(w[le]|=2048),ap(w),w[it]=w[nr]=n,w[Ue]=e,w[kn]=s||n&&n[kn],w[ke]=a||n&&n[ke],w[Pt]=l||n&&n[Pt]||null,w[It]=o,w[ps]=e1(),w[tr]=m,w[tp]=h,w[xt]=t.type==2?n[xt]:w,w}function tE(n,t,e){let i=Vt(t,n),r=eE(e),o=n[kn].rendererFactory,s=Pf(n,If(n,r,null,cv(e),i,t,null,o.createRenderer(i,e),null,null,null));return n[t.index]=s}function cv(n){let t=16;return n.signals?t=4096:n.onPush&&(t=64),t}function dv(n,t,e,i){if(e===0)return-1;let r=t.length;for(let o=0;o<e;o++)t.push(i),n.blueprint.push(i),n.data.push(null);return r}function Pf(n,t){return n[no]?n[ep][Xt]=t:n[no]=t,n[ep]=t,t}function c(n=1){uv(We(),ie(),nn()+n,!1)}function uv(n,t,e,i){if(!i)if((t[le]&3)===3){let o=n.preOrderCheckHooks;o!==null&&Ul(t,o,e)}else{let o=n.preOrderHooks;o!==null&&Gl(t,o,0,e)}_i(e)}var bc=(function(n){return n[n.None=0]="None",n[n.SignalBased=1]="SignalBased",n[n.HasDecoratorInputTransform=2]="HasDecoratorInputTransform",n})(bc||{});function Gp(n,t,e,i){let r=ae(null);try{let[o,s,a]=n.inputs[e],l=null;(s&bc.SignalBased)!==0&&(l=t[o][Ke]),l!==null&&l.transformFn!==void 0?i=l.transformFn(i):a!==null&&(i=a.call(t,i)),n.setInput!==null?n.setInput(t,l,i,e,o):C_(t,l,o,i)}finally{ae(r)}}var Nn=(function(n){return n[n.Important=1]="Important",n[n.DashCase=2]="DashCase",n})(Nn||{}),nE;function Of(n,t){return nE(n,t)}function ic(n){if(!n)return 0;let t=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*t}function uo(n,t){return n.getPropertyValue(t).split(",").map(i=>i.trim())}function iE(n){let t=uo(n,"transition-property"),e=uo(n,"transition-duration"),i=uo(n,"transition-delay"),r={propertyName:"",duration:0,animationName:void 0};for(let o=0;o<t.length;o++){let s=ic(i[o])+ic(e[o]);s>r.duration&&(r.propertyName=t[o],r.duration=s)}return r}function rE(n){let t=uo(n,"animation-name"),e=uo(n,"animation-delay"),i=uo(n,"animation-duration"),r={animationName:"",propertyName:void 0,duration:0};for(let o=0;o<t.length;o++){let s=ic(e[o])+ic(i[o]);s>r.duration&&(r.animationName=t[o],r.duration=s)}return r}function pv(n,t){return n!==void 0&&n.duration>t.duration}function fv(n){return(n.animationName!=null||n.propertyName!=null)&&n.duration>0}function oE(n,t){let e=getComputedStyle(n),i=rE(e),r=iE(e),o=i.duration>r.duration?i:r;pv(t.get(n),o)||fv(o)&&t.set(n,o)}function hv(n,t,e){if(!e)return;let i=n.getAnimations();return i.length===0?oE(n,t):sE(n,t,i)}function sE(n,t,e){let i={animationName:void 0,propertyName:void 0,duration:0};for(let r of e){let o=r.effect?.getTiming(),s=typeof o?.duration=="number"?o.duration:0,a=(o?.delay??0)+s,l,h;r.animationName?h=r.animationName:l=r.transitionProperty,a>=i.duration&&(i={animationName:h,propertyName:l,duration:a})}pv(t.get(n),i)||fv(i)&&t.set(n,i)}var bi=new Set,xc=(function(n){return n[n.CHANGE_DETECTION=0]="CHANGE_DETECTION",n[n.AFTER_NEXT_RENDER=1]="AFTER_NEXT_RENDER",n})(xc||{}),Ci=new oe(""),K0=new Set;function Ln(n){K0.has(n)||(K0.add(n),performance?.mark?.("mark_feature_usage",{detail:{feature:n}}))}var mv=!1,Wp=class extends He{__isAsync;destroyRef=void 0;pendingTasks=void 0;constructor(t=!1){super(),this.__isAsync=t,f0()&&(this.destroyRef=O(ot,{optional:!0})??void 0,this.pendingTasks=O(vi,{optional:!0})??void 0)}emit(t){let e=ae(null);try{super.next(t)}finally{ae(e)}}subscribe(t,e,i){let r=t,o=e||(()=>null),s=i;if(t&&typeof t=="object"){let l=t;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=this.wrapInTimeout(o),r&&(r=this.wrapInTimeout(r)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:r,error:o,complete:s});return t instanceof Be&&t.add(a),a}wrapInTimeout(t){return e=>{let i=this.pendingTasks?.add();setTimeout(()=>{try{t(e)}finally{i!==void 0&&this.pendingTasks?.remove(i)}})}}},vn=Wp;function gv(n){let t,e;function i(){n=cr;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{n(),i()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{n(),i()})),()=>i()}function X0(n){return queueMicrotask(()=>n()),()=>{n=cr}}var Rf="isAngularZone",rc=Rf+"_ID",aE=0,we=class n{hasPendingMacrotasks=!1;hasPendingMicrotasks=!1;isStable=!0;onUnstable=new vn(!1);onMicrotaskEmpty=new vn(!1);onStable=new vn(!1);onError=new vn(!1);constructor(t){let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:i=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=mv}=t;if(typeof Zone>"u")throw new X(908,!1);Zone.assertZonePatched();let s=this;s._nesting=0,s._outer=s._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(s._inner=s._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&i,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,dE(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(Rf)===!0}static assertInAngularZone(){if(!n.isInAngularZone())throw new X(909,!1)}static assertNotInAngularZone(){if(n.isInAngularZone())throw new X(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,lE,cr,cr);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}},lE={};function Nf(n){if(n._nesting==0&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function cE(n){if(n.isCheckStableRunning||n.callbackScheduled)return;n.callbackScheduled=!0;function t(){gv(()=>{n.callbackScheduled=!1,qp(n),n.isCheckStableRunning=!0,Nf(n),n.isCheckStableRunning=!1})}n.scheduleInRootZone?Zone.root.run(()=>{t()}):n._outer.run(()=>{t()}),qp(n)}function dE(n){let t=()=>{cE(n)},e=aE++;n._inner=n._inner.fork({name:"angular",properties:{[Rf]:!0,[rc]:e,[rc+e]:!0},onInvokeTask:(i,r,o,s,a,l)=>{if(uE(l))return i.invokeTask(o,s,a,l);try{return J0(n),i.invokeTask(o,s,a,l)}finally{(n.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||n.shouldCoalesceRunChangeDetection)&&t(),e_(n)}},onInvoke:(i,r,o,s,a,l,h)=>{try{return J0(n),i.invoke(o,s,a,l,h)}finally{n.shouldCoalesceRunChangeDetection&&!n.callbackScheduled&&!pE(l)&&t(),e_(n)}},onHasTask:(i,r,o,s)=>{i.hasTask(o,s),r===o&&(s.change=="microTask"?(n._hasPendingMicrotasks=s.microTask,qp(n),Nf(n)):s.change=="macroTask"&&(n.hasPendingMacrotasks=s.macroTask))},onHandleError:(i,r,o,s)=>(i.handleError(o,s),n.runOutsideAngular(()=>n.onError.emit(s)),!1)})}function qp(n){n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&n.callbackScheduled===!0?n.hasPendingMicrotasks=!0:n.hasPendingMicrotasks=!1}function J0(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function e_(n){n._nesting--,Nf(n)}var oc=class{hasPendingMicrotasks=!1;hasPendingMacrotasks=!1;isStable=!0;onUnstable=new vn;onMicrotaskEmpty=new vn;onStable=new vn;onError=new vn;run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,r){return t.apply(e,i)}};function uE(n){return _v(n,"__ignore_ng_zone__")}function pE(n){return _v(n,"__scheduler_tick__")}function _v(n,t){return!Array.isArray(n)||n.length!==1?!1:n[0]?.data?.[t]===!0}var yc=(()=>{class n{impl=null;execute(){this.impl?.execute()}static \u0275prov=ce({token:n,providedIn:"root",factory:()=>new n})}return n})(),Af=[0,1,2,3],Lf=(()=>{class n{ngZone=O(we);scheduler=O(Kt);errorHandler=O(Ht,{optional:!0});sequences=new Set;deferredRegistrations=new Set;executing=!1;constructor(){O(Ci,{optional:!0})}execute(){let e=this.sequences.size>0;e&&Me(16),this.executing=!0;for(let i of Af)for(let r of this.sequences)if(!(r.erroredOrDestroyed||!r.hooks[i]))try{r.pipelinedValue=this.ngZone.runOutsideAngular(()=>this.maybeTrace(()=>{let o=r.hooks[i];return o(r.pipelinedValue)},r.snapshot))}catch(o){r.erroredOrDestroyed=!0,this.errorHandler?.handleError(o)}this.executing=!1;for(let i of this.sequences)i.afterRun(),i.once&&(this.sequences.delete(i),i.destroy());for(let i of this.deferredRegistrations)this.sequences.add(i);this.deferredRegistrations.size>0&&this.scheduler.notify(7),this.deferredRegistrations.clear(),e&&Me(17)}register(e){let{view:i}=e;i!==void 0?((i[rr]??=[]).push(e),gi(i),i[le]|=8192):this.executing?this.deferredRegistrations.add(e):this.addSequence(e)}addSequence(e){this.sequences.add(e),this.scheduler.notify(7)}unregister(e){this.executing&&this.sequences.has(e)?(e.erroredOrDestroyed=!0,e.pipelinedValue=void 0,e.once=!0):(this.sequences.delete(e),this.deferredRegistrations.delete(e))}maybeTrace(e,i){return i?i.run(xc.AFTER_NEXT_RENDER,e):e()}static \u0275prov=ce({token:n,providedIn:"root",factory:()=>new n})}return n})(),Ss=class{impl;hooks;view;once;snapshot;erroredOrDestroyed=!1;pipelinedValue=void 0;unregisterOnDestroy;constructor(t,e,i,r,o,s=null){this.impl=t,this.hooks=e,this.view=i,this.once=r,this.snapshot=s,this.unregisterOnDestroy=o?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.snapshot?.dispose(),this.snapshot=null}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.();let t=this.view?.[rr];t&&(this.view[rr]=t.filter(e=>e!==this))}};function Cc(n,t){let e=t?.injector??O(kt);return Ln("NgAfterNextRender"),hE(n,e,t,!0)}function fE(n){return n instanceof Function?[void 0,void 0,n,void 0]:[n.earlyRead,n.write,n.mixedReadWrite,n.read]}function hE(n,t,e,i){let r=t.get(yc);r.impl??=t.get(Lf);let o=t.get(Ci,null,{optional:!0}),s=e?.manualCleanup!==!0?t.get(ot):null,a=t.get(lr,null,{optional:!0}),l=new Ss(r.impl,fE(n),a?.view,i,s,o?.snapshot(null));return r.impl.register(l),l}var wc=new oe("",{providedIn:"root",factory:()=>({queue:new Set,isScheduled:!1,scheduler:null})});function vv(n,t,e){let i=n.get(wc);if(Array.isArray(t))for(let r of t)i.queue.add(r),e?.detachedLeaveAnimationFns?.push(r);else i.queue.add(t),e?.detachedLeaveAnimationFns?.push(t);i.scheduler&&i.scheduler(n)}function mE(n,t){let e=n.get(wc);if(t.detachedLeaveAnimationFns){for(let i of t.detachedLeaveAnimationFns)e.queue.delete(i);t.detachedLeaveAnimationFns=void 0}}function gE(n){let t=n.get(wc);t.isScheduled||(Cc(()=>{t.isScheduled=!1;for(let e of t.queue)e();t.queue.clear()},{injector:n}),t.isScheduled=!0)}function bv(n){let t=n.get(wc);t.scheduler=gE,t.scheduler(n)}function xv(n,t){for(let[e,i]of t)vv(n,i.animateFns)}function t_(n,t,e,i){let r=n?.[Un]?.enter;t!==null&&r&&r.has(e.index)&&xv(i,r)}function lo(n,t,e,i,r,o,s,a){if(r!=null){let l,h=!1;hn(r)?l=r:Pn(r)&&(h=!0,r=r[fn]);let m=Jt(r);n===0&&i!==null?(t_(a,i,o,e),s==null?iv(t,i,m):nc(t,i,m,s||null,!0)):n===1&&i!==null?(t_(a,i,o,e),nc(t,i,m,s||null,!0)):n===2?n_(a,o,e,w=>{rv(t,m,h,w)}):n===3&&n_(a,o,e,()=>{t.destroyNode(m)}),l!=null&&ME(t,n,e,l,o,i,s)}}function _E(n,t){yv(n,t),t[fn]=null,t[It]=null}function vE(n,t,e,i,r,o){i[fn]=r,i[It]=t,Dc(n,i,e,1,r,o)}function yv(n,t){t[kn].changeDetectionScheduler?.notify(9),Dc(n,t,t[ke],2,null,null)}function bE(n){let t=n[no];if(!t)return Tp(n[ne],n);for(;t;){let e=null;if(Pn(t))e=t[no];else{let i=t[Ge];i&&(e=i)}if(!e){for(;t&&!t[Xt]&&t!==n;)Pn(t)&&Tp(t[ne],t),t=t[it];t===null&&(t=n),Pn(t)&&Tp(t[ne],t),e=t&&t[Xt]}t=e}}function Ff(n,t){let e=n[or],i=e.indexOf(t);e.splice(i,1)}function Ec(n,t){if(sr(t))return;let e=t[ke];e.destroyNode&&Dc(n,t,e,3,null,null),bE(t)}function Tp(n,t){if(sr(t))return;let e=ae(null);try{t[le]&=-129,t[le]|=256,t[zt]&&si(t[zt]),CE(n,t),yE(n,t),t[ne].type===1&&t[ke].destroy();let i=t[Hn];if(i!==null&&hn(t[it])){i!==t[it]&&Ff(i,t);let r=t[In];r!==null&&r.detachView(n)}Bp(t)}finally{ae(e)}}function n_(n,t,e,i){let r=n?.[Un];if(r==null||r.leave==null||!r.leave.has(t.index))return i(!1);n&&bi.add(n),vv(e,()=>{if(r.leave&&r.leave.has(t.index)){let s=r.leave.get(t.index),a=[];if(s){for(let l=0;l<s.animateFns.length;l++){let h=s.animateFns[l],{promise:m}=h();a.push(m)}r.detachedLeaveAnimationFns=void 0}r.running=Promise.allSettled(a),xE(n,i)}else n&&bi.delete(n),i(!1)},r)}function xE(n,t){let e=n[Un]?.running;if(e){e.then(()=>{n[Un].running=void 0,bi.delete(n),t(!0)});return}t(!1)}function yE(n,t){let e=n.cleanup,i=t[to];if(e!==null)for(let s=0;s<e.length-1;s+=2)if(typeof e[s]=="string"){let a=e[s+3];a>=0?i[a]():i[-a].unsubscribe(),s+=2}else{let a=i[e[s+1]];e[s].call(a)}i!==null&&(t[to]=null);let r=t[$n];if(r!==null){t[$n]=null;for(let s=0;s<r.length;s++){let a=r[s];a()}}let o=t[zn];if(o!==null){t[zn]=null;for(let s of o)s.destroy()}}function CE(n,t){let e;if(n!=null&&(e=n.destroyHooks)!=null)for(let i=0;i<e.length;i+=2){let r=t[e[i]];if(!(r instanceof hr)){let o=e[i+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];Me(4,a,l);try{l.call(a)}finally{Me(5,a,l)}}else{Me(4,r,o);try{o.call(r)}finally{Me(5,r,o)}}}}}function Cv(n,t,e){return wE(n,t.parent,e)}function wE(n,t,e){let i=t;for(;i!==null&&i.type&168;)t=i,i=t.parent;if(i===null)return e[fn];if(mi(i)){let{encapsulation:r}=n.data[i.directiveStart+i.componentOffset];if(r===Gn.None||r===Gn.Emulated)return null}return Vt(i,e)}function wv(n,t,e){return DE(n,t,e)}function EE(n,t,e){return n.type&40?Vt(n,e):null}var DE=EE,i_;function Vf(n,t,e,i){let r=Cv(n,i,t),o=t[ke],s=i.parent||t[It],a=wv(s,i,t);if(r!=null)if(Array.isArray(e))for(let l=0;l<e.length;l++)Y0(o,r,e[l],a,!1);else Y0(o,r,e,a,!1);i_!==void 0&&i_(o,i,t,e,r)}function ws(n,t){if(t!==null){let e=t.type;if(e&3)return Vt(t,n);if(e&4)return sc(-1,n[t.index]);if(e&8){let i=t.child;if(i!==null)return ws(n,i);{let r=n[t.index];return hn(r)?sc(-1,r):Jt(r)}}else{if(e&128)return ws(n,t.next);if(e&32)return Of(t,n)()||Jt(n[t.index]);{let i=Ev(n,t);if(i!==null){if(Array.isArray(i))return i[0];let r=pi(n[xt]);return ws(r,i)}else return ws(n,t.next)}}}return null}function Ev(n,t){if(t!==null){let i=n[xt][It],r=t.projection;return i.projection[r]}return null}function sc(n,t){let e=Ge+n+1;if(e<t.length){let i=t[e],r=i[ne].firstChild;if(r!==null)return ws(i,r)}return t[hi]}function Bf(n,t,e,i,r,o,s){for(;e!=null;){let a=i[Pt];if(e.type===128){e=e.next;continue}let l=i[e.index],h=e.type;if(s&&t===0&&(l&&ho(Jt(l),i),e.flags|=2),!_c(e))if(h&8)Bf(n,t,e.child,i,r,o,!1),lo(t,n,a,r,l,e,o,i);else if(h&32){let m=Of(e,i),w;for(;w=m();)lo(t,n,a,r,w,e,o,i);lo(t,n,a,r,l,e,o,i)}else h&16?Dv(n,t,i,e,r,o):lo(t,n,a,r,l,e,o,i);e=s?e.projectionNext:e.next}}function Dc(n,t,e,i,r,o){Bf(e,i,n.firstChild,t,r,o,!1)}function SE(n,t,e){let i=t[ke],r=Cv(n,e,t),o=e.parent||t[It],s=wv(o,e,t);Dv(i,0,t,e,r,s)}function Dv(n,t,e,i,r,o){let s=e[xt],l=s[It].projection[i.projection];if(Array.isArray(l))for(let h=0;h<l.length;h++){let m=l[h];lo(t,n,e[Pt],r,m,i,o,e)}else{let h=l,m=s[it];V_(i)&&(h.flags|=128),Bf(n,t,h,m,r,o,!0)}}function ME(n,t,e,i,r,o,s){let a=i[hi],l=Jt(i);a!==l&&lo(t,n,e,o,a,r,s);for(let h=Ge;h<i.length;h++){let m=i[h];Dc(m[ne],m,n,t,o,a)}}function TE(n,t,e,i,r){if(t)r?n.addClass(e,i):n.removeClass(e,i);else{let o=i.indexOf("-")===-1?void 0:Nn.DashCase;r==null?n.removeStyle(e,i,o):(typeof r=="string"&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=Nn.Important),n.setStyle(e,i,r,o))}}function Sv(n,t,e,i,r){let o=nn(),s=i&2;try{_i(-1),s&&t.length>Ae&&uv(n,t,Ae,!1),Me(s?2:0,r,e),e(i,r)}finally{_i(o),Me(s?3:1,r,e)}}function Sc(n,t,e){AE(n,t,e),(e.flags&64)===64&&LE(n,t,e)}function Vs(n,t,e=Vt){let i=t.localNames;if(i!==null){let r=t.index+1;for(let o=0;o<i.length;o+=2){let s=i[o+1],a=s===-1?e(t,n):n[s];n[r++]=a}}}function kE(n,t,e,i){let o=i.get(W_,G_)||e===Gn.ShadowDom,s=n.selectRootElement(t,o);return IE(s),s}function IE(n){PE(n)}var PE=()=>null;function OE(n){return n==="class"?"className":n==="for"?"htmlFor":n==="formaction"?"formAction":n==="innerHtml"?"innerHTML":n==="readonly"?"readOnly":n==="tabindex"?"tabIndex":n}function RE(n,t,e,i,r,o){let s=t[ne];if(zf(n,s,t,e,i)){mi(n)&&NE(t,n.index);return}n.type&3&&(e=OE(e)),Mv(n,t,e,i,r,o)}function Mv(n,t,e,i,r,o){if(n.type&3){let s=Vt(n,t);i=o!=null?o(i,n.value||"",e):i,r.setProperty(s,e,i)}else n.type&12}function NE(n,t){let e=en(t,n);e[le]&16||(e[le]|=64)}function AE(n,t,e){let i=e.directiveStart,r=e.directiveEnd;mi(e)&&tE(t,e,n.data[i+e.componentOffset]),n.firstCreatePass||Jl(e,t);let o=e.initialInputs;for(let s=i;s<r;s++){let a=n.data[s],l=Ds(t,n,s,e);if(ho(l,t),o!==null&&jE(t,s-i,l,a,e,o),On(a)){let h=en(e.index,t);h[Ue]=Ds(t,n,s,e)}}}function LE(n,t,e){let i=e.directiveStart,r=e.directiveEnd,o=e.index,s=k0();try{_i(o);for(let a=i;a<r;a++){let l=n.data[a],h=t[a];Ol(a),(l.hostBindings!==null||l.hostVars!==0||l.hostAttrs!==null)&&FE(l,h)}}finally{_i(-1),Ol(s)}}function FE(n,t){n.hostBindings!==null&&n.hostBindings(1,t)}function jf(n,t){let e=n.directiveRegistry,i=null;if(e)for(let r=0;r<e.length;r++){let o=e[r];lv(t,o.selectors,!1)&&(i??=[],On(o)?i.unshift(o):i.push(o))}return i}function VE(n,t,e,i,r,o){let s=Vt(n,t);BE(t[ke],s,o,n.value,e,i,r)}function BE(n,t,e,i,r,o,s){if(o==null)n.removeAttribute(t,r,e);else{let a=s==null?pn(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}function jE(n,t,e,i,r,o){let s=o[t];if(s!==null)for(let a=0;a<s.length;a+=2){let l=s[a],h=s[a+1];Gp(i,e,l,h)}}function $f(n,t,e,i,r){let o=Ae+e,s=t[ne],a=r(s,t,n,i,e);t[o]=a,oo(n,!0);let l=n.type===2;return l?(ov(t[ke],a,n),(C0()===0||io(n))&&ho(a,t),w0()):ho(a,t),Ll()&&(!l||!_c(n))&&Vf(s,t,a,n),n}function Hf(n){let t=n;return _p()?vp():(t=t.parent,oo(t,!1)),t}function $E(n,t){let e=n[Pt];if(!e)return;let i;try{i=e.get(mn,null)}catch{i=null}i?.(t)}function zf(n,t,e,i,r){let o=n.inputs?.[i],s=n.hostDirectiveInputs?.[i],a=!1;if(s)for(let l=0;l<s.length;l+=2){let h=s[l],m=s[l+1],w=t.data[h];Gp(w,e[h],m,r),a=!0}if(o)for(let l of o){let h=e[l],m=t.data[l];Gp(m,h,i,r),a=!0}return a}function HE(n,t){let e=en(t,n),i=e[ne];zE(i,e);let r=e[fn];r!==null&&e[tr]===null&&(e[tr]=q_(r,e[Pt])),Me(18),Uf(i,e,e[Ue]),Me(19,e[Ue])}function zE(n,t){for(let e=t.length;e<n.blueprint.length;e++)t.push(n.blueprint[e])}function Uf(n,t,e){Nl(t);try{let i=n.viewQuery;i!==null&&$p(1,i,e);let r=n.template;r!==null&&Sv(n,t,r,1,e),n.firstCreatePass&&(n.firstCreatePass=!1),t[In]?.finishViewCreation(n),n.staticContentQueries&&Z_(n,t),n.staticViewQueries&&$p(2,n.viewQuery,e);let o=n.components;o!==null&&UE(t,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{t[le]&=-5,Al()}}function UE(n,t){for(let e=0;e<t.length;e++)HE(n,t[e])}function Bs(n,t,e,i){let r=ae(null);try{let o=t.tView,a=n[le]&4096?4096:16,l=If(n,o,e,a,null,t,null,null,i?.injector??null,i?.embeddedViewInjector??null,i?.dehydratedView??null),h=n[t.index];l[Hn]=h;let m=n[In];return m!==null&&(l[In]=m.createEmbeddedView(o)),Uf(o,l,e),l}finally{ae(r)}}function mo(n,t){return!t||t.firstChild===null||V_(n)}function Ms(n,t,e,i,r=!1){for(;e!==null;){if(e.type===128){e=r?e.projectionNext:e.next;continue}let o=t[e.index];o!==null&&i.push(Jt(o)),hn(o)&&Tv(o,i);let s=e.type;if(s&8)Ms(n,t,e.child,i);else if(s&32){let a=Of(e,t),l;for(;l=a();)i.push(l)}else if(s&16){let a=Ev(t,e);if(Array.isArray(a))i.push(...a);else{let l=pi(t[xt]);Ms(l[ne],l,a,i,!0)}}e=r?e.projectionNext:e.next}return i}function Tv(n,t){for(let e=Ge;e<n.length;e++){let i=n[e],r=i[ne].firstChild;r!==null&&Ms(i[ne],i,r,t)}n[hi]!==n[fn]&&t.push(n[hi])}function kv(n){if(n[rr]!==null){for(let t of n[rr])t.impl.addSequence(t);n[rr].length=0}}var Iv=[];function GE(n){return n[zt]??WE(n)}function WE(n){let t=Iv.pop()??Object.create(ZE);return t.lView=n,t}function qE(n){n.lView[zt]!==n&&(n.lView=null,Iv.push(n))}var ZE=re(H({},ii),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{gi(n.lView)},consumerOnSignalRead(){this.lView[zt]=this}});function YE(n){let t=n[zt]??Object.create(QE);return t.lView=n,t}var QE=re(H({},ii),{consumerIsAlwaysLive:!0,kind:"template",consumerMarkedDirty:n=>{let t=pi(n.lView);for(;t&&!Pv(t[ne]);)t=pi(t);t&&lp(t)},consumerOnSignalRead(){this.lView[zt]=this}});function Pv(n){return n.type!==2}function Ov(n){if(n[zn]===null)return;let t=!0;for(;t;){let e=!1;for(let i of n[zn])i.dirty&&(e=!0,i.zone===null||Zone.current===i.zone?i.run():i.zone.run(()=>i.run()));t=e&&!!(n[le]&8192)}}var KE=100;function Rv(n,t=0){let i=n[kn].rendererFactory,r=!1;r||i.begin?.();try{XE(n,t)}finally{r||i.end?.()}}function XE(n,t){let e=bp();try{so(!0),Zp(n,t);let i=0;for(;ms(n);){if(i===KE)throw new X(103,!1);i++,Zp(n,1)}}finally{so(e)}}function JE(n,t,e,i){if(sr(t))return;let r=t[le],o=!1,s=!1;Nl(t);let a=!0,l=null,h=null;o||(Pv(n)?(h=GE(t),l=jn(h)):ja()===null?(a=!1,h=YE(t),l=jn(h)):t[zt]&&(si(t[zt]),t[zt]=null));try{ap(t),S0(n.bindingStartIndex),e!==null&&Sv(n,t,e,2,i);let m=(r&3)===3;if(!o)if(m){let T=n.preOrderCheckHooks;T!==null&&Ul(t,T,null)}else{let T=n.preOrderHooks;T!==null&&Gl(t,T,0,null),Sp(t,0)}if(s||eD(t),Ov(t),Nv(t,0),n.contentQueries!==null&&Z_(n,t),!o)if(m){let T=n.contentCheckHooks;T!==null&&Ul(t,T)}else{let T=n.contentHooks;T!==null&&Gl(t,T,1),Sp(t,1)}nD(n,t);let w=n.components;w!==null&&Lv(t,w,0);let M=n.viewQuery;if(M!==null&&$p(2,M,i),!o)if(m){let T=n.viewCheckHooks;T!==null&&Ul(t,T)}else{let T=n.viewHooks;T!==null&&Gl(t,T,2),Sp(t,2)}if(n.firstUpdatePass===!0&&(n.firstUpdatePass=!1),t[Ml]){for(let T of t[Ml])T();t[Ml]=null}o||(kv(t),t[le]&=-73)}catch(m){throw o||gi(t),m}finally{h!==null&&(oi(h,l),a&&qE(h)),Al()}}function Nv(n,t){for(let e=j_(n);e!==null;e=$_(e))for(let i=Ge;i<e.length;i++){let r=e[i];Av(r,t)}}function eD(n){for(let t=j_(n);t!==null;t=$_(t)){if(!(t[le]&2))continue;let e=t[or];for(let i=0;i<e.length;i++){let r=e[i];lp(r)}}}function tD(n,t,e){Me(18);let i=en(t,n);Av(i,e),Me(19,i[Ue])}function Av(n,t){kl(n)&&Zp(n,t)}function Zp(n,t){let i=n[ne],r=n[le],o=n[zt],s=!!(t===0&&r&16);if(s||=!!(r&64&&t===0),s||=!!(r&1024),s||=!!(o?.dirty&&Vi(o)),s||=!1,o&&(o.dirty=!1),n[le]&=-9217,s)JE(i,n,i.template,n[Ue]);else if(r&8192){let a=ae(null);try{Ov(n),Nv(n,1);let l=i.components;l!==null&&Lv(n,l,1),kv(n)}finally{ae(a)}}}function Lv(n,t,e){for(let i=0;i<t.length;i++)tD(n,t[i],e)}function nD(n,t){let e=n.hostBindingOpCodes;if(e!==null)try{for(let i=0;i<e.length;i++){let r=e[i];if(r<0)_i(~r);else{let o=r,s=e[++i],a=e[++i];T0(s,o);let l=t[o];Me(24,l),a(2,l),Me(25,l)}}}finally{_i(-1)}}function Gf(n,t){let e=bp()?64:1088;for(n[kn].changeDetectionScheduler?.notify(t);n;){n[le]|=e;let i=pi(n);if(ro(n)&&!i)return n;n=i}return null}function Fv(n,t,e,i){return[n,!0,0,t,null,i,null,e,null,null]}function Vv(n,t){let e=Ge+t;if(e<n.length)return n[e]}function js(n,t,e,i=!0){let r=t[ne];if(iD(r,t,n,e),i){let s=sc(e,n),a=t[ke],l=a.parentNode(n[hi]);l!==null&&vE(r,n[It],a,t,l,s)}let o=t[tr];o!==null&&o.firstChild!==null&&(o.firstChild=null)}function Bv(n,t){let e=Ts(n,t);return e!==void 0&&Ec(e[ne],e),e}function Ts(n,t){if(n.length<=Ge)return;let e=Ge+t,i=n[e];if(i){let r=i[Hn];r!==null&&r!==n&&Ff(r,i),t>0&&(n[e-1][Xt]=i[Xt]);let o=ls(n,Ge+t);_E(i[ne],i);let s=o[In];s!==null&&s.detachView(o[ne]),i[it]=null,i[Xt]=null,i[le]&=-129}return i}function iD(n,t,e,i){let r=Ge+i,o=e.length;i>0&&(e[r-1][Xt]=t),i<o-Ge?(t[Xt]=e[r],qu(e,Ge+i,t)):(e.push(t),t[Xt]=null),t[it]=e;let s=t[Hn];s!==null&&e!==s&&jv(s,t);let a=t[In];a!==null&&a.insertView(n),Il(t),t[le]|=128}function jv(n,t){let e=n[or],i=t[it];if(Pn(i))n[le]|=2;else{let r=i[it][xt];t[xt]!==r&&(n[le]|=2)}e===null?n[or]=[t]:e.push(t)}var xi=class{_lView;_cdRefInjectingView;_appRef=null;_attachedToViewContainer=!1;exhaustive;get rootNodes(){let t=this._lView,e=t[ne];return Ms(e,t,e.firstChild,[])}constructor(t,e){this._lView=t,this._cdRefInjectingView=e}get context(){return this._lView[Ue]}set context(t){this._lView[Ue]=t}get destroyed(){return sr(this._lView)}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[it];if(hn(t)){let e=t[fs],i=e?e.indexOf(this):-1;i>-1&&(Ts(t,i),ls(e,i))}this._attachedToViewContainer=!1}Ec(this._lView[ne],this._lView)}onDestroy(t){cp(this._lView,t)}markForCheck(){Gf(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[le]&=-129}reattach(){Il(this._lView),this._lView[le]|=128}detectChanges(){this._lView[le]|=1024,Rv(this._lView)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new X(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=ro(this._lView),e=this._lView[Hn];e!==null&&!t&&Ff(e,this._lView),yv(this._lView[ne],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new X(902,!1);this._appRef=t;let e=ro(this._lView),i=this._lView[Hn];i!==null&&!e&&jv(i,this._lView),Il(this._lView)}};var yi=(()=>{class n{_declarationLView;_declarationTContainer;elementRef;static __NG_ELEMENT_ID__=rD;constructor(e,i,r){this._declarationLView=e,this._declarationTContainer=i,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,i){return this.createEmbeddedViewImpl(e,i)}createEmbeddedViewImpl(e,i,r){let o=Bs(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:i,dehydratedView:r});return new xi(o)}}return n})();function rD(){return Mc(rt(),ie())}function Mc(n,t){return n.type&4?new yi(t,n,vo(n,t)):null}function bo(n,t,e,i,r){let o=n.data[t];if(o===null)o=oD(n,t,e,i,r),M0()&&(o.flags|=32);else if(o.type&64){o.type=e,o.value=i,o.attrs=r;let s=E0();o.injectorIndex=s===null?-1:s.injectorIndex}return oo(o,!0),o}function oD(n,t,e,i,r){let o=gp(),s=_p(),a=s?o:o&&o.parent,l=n.data[t]=aD(n,a,e,t,i,r);return sD(n,l,o,s),l}function sD(n,t,e,i){n.firstChild===null&&(n.firstChild=t),e!==null&&(i?e.child==null&&t.parent!==null&&(e.child=t):e.next===null&&(e.next=t,t.prev=e))}function aD(n,t,e,i,r,o){let s=t?t.injectorIndex:-1,a=0;return fp()&&(a|=128),{type:e,index:i,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,namespace:wp(),attrs:o,mergedAttrs:null,localNames:null,initialInputs:null,inputs:null,hostDirectiveInputs:null,outputs:null,hostDirectiveOutputs:null,directiveToIndex:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}var M6=new RegExp(`^(\\d+)*(${r1}|${i1})*(.*)`);function lD(n){let t=n[np]??[],i=n[it][ke],r=[];for(let o of t)o.data[U_]!==void 0?r.push(o):cD(o,i);n[np]=r}function cD(n,t){let e=0,i=n.firstChild;if(i){let r=n.data[z_];for(;e<r;){let o=i.nextSibling;rv(t,i,!1),i=o,e++}}}var dD=()=>null,uD=()=>null;function ac(n,t){return dD(n,t)}function $v(n,t,e){return uD(n,t,e)}var Hv=class{},Tc=class{},Yp=class{resolveComponentFactory(t){throw new X(917,!1)}},kc=class{static NULL=new Yp},An=class{},Ic=(()=>{class n{destroyNode=null;static __NG_ELEMENT_ID__=()=>pD()}return n})();function pD(){let n=ie(),t=rt(),e=en(t.index,n);return(Pn(e)?e:n)[ke]}var zv=(()=>{class n{static \u0275prov=ce({token:n,providedIn:"root",factory:()=>null})}return n})();var ql={},Qp=class{injector;parentInjector;constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){let r=this.injector.get(t,ql,i);return r!==ql||e===ql?r:this.parentInjector.get(t,e,i)}};function lc(n,t,e){let i=e?n.styles:null,r=e?n.classes:null,o=0;if(t!==null)for(let s=0;s<t.length;s++){let a=t[s];if(typeof a=="number")o=a;else if(o==1)r=xl(r,a);else if(o==2){let l=a,h=t[++s];i=xl(i,l+": "+h+";")}}e?n.styles=i:n.stylesWithoutHost=i,e?n.classes=r:n.classesWithoutHost=r}function xn(n,t=0){let e=ie();if(e===null)return _e(n,t);let i=rt();return N_(i,e,bt(n),t)}function Uv(n,t,e,i,r){let o=i===null?null:{"":-1},s=r(n,e);if(s!==null){let a=s,l=null,h=null;for(let m of s)if(m.resolveHostDirectives!==null){[a,l,h]=m.resolveHostDirectives(s);break}mD(n,t,e,a,o,l,h)}o!==null&&i!==null&&fD(e,i,o)}function fD(n,t,e){let i=n.localNames=[];for(let r=0;r<t.length;r+=2){let o=e[t[r+1]];if(o==null)throw new X(-301,!1);i.push(t[r],o)}}function hD(n,t,e){t.componentOffset=e,(n.components??=[]).push(t.index)}function mD(n,t,e,i,r,o,s){let a=i.length,l=!1;for(let M=0;M<a;M++){let T=i[M];!l&&On(T)&&(l=!0,hD(n,e,M)),Vp(Jl(e,t),n,T.type)}yD(e,n.data.length,a);for(let M=0;M<a;M++){let T=i[M];T.providersResolver&&T.providersResolver(T)}let h=!1,m=!1,w=dv(n,t,a,null);a>0&&(e.directiveToIndex=new Map);for(let M=0;M<a;M++){let T=i[M];if(e.mergedAttrs=fo(e.mergedAttrs,T.hostAttrs),_D(n,e,t,w,T),xD(w,T,r),s!==null&&s.has(T)){let[z,Q]=s.get(T);e.directiveToIndex.set(T.type,[w,z+e.directiveStart,Q+e.directiveStart])}else(o===null||!o.has(T))&&e.directiveToIndex.set(T.type,w);T.contentQueries!==null&&(e.flags|=4),(T.hostBindings!==null||T.hostAttrs!==null||T.hostVars!==0)&&(e.flags|=64);let A=T.type.prototype;!h&&(A.ngOnChanges||A.ngOnInit||A.ngDoCheck)&&((n.preOrderHooks??=[]).push(e.index),h=!0),!m&&(A.ngOnChanges||A.ngDoCheck)&&((n.preOrderCheckHooks??=[]).push(e.index),m=!0),w++}gD(n,e,o)}function gD(n,t,e){for(let i=t.directiveStart;i<t.directiveEnd;i++){let r=n.data[i];if(e===null||!e.has(r))r_(0,t,r,i),r_(1,t,r,i),s_(t,i,!1);else{let o=e.get(r);o_(0,t,o,i),o_(1,t,o,i),s_(t,i,!0)}}}function r_(n,t,e,i){let r=n===0?e.inputs:e.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s;n===0?s=t.inputs??={}:s=t.outputs??={},s[o]??=[],s[o].push(i),Gv(t,o)}}function o_(n,t,e,i){let r=n===0?e.inputs:e.outputs;for(let o in r)if(r.hasOwnProperty(o)){let s=r[o],a;n===0?a=t.hostDirectiveInputs??={}:a=t.hostDirectiveOutputs??={},a[s]??=[],a[s].push(i,o),Gv(t,s)}}function Gv(n,t){t==="class"?n.flags|=8:t==="style"&&(n.flags|=16)}function s_(n,t,e){let{attrs:i,inputs:r,hostDirectiveInputs:o}=n;if(i===null||!e&&r===null||e&&o===null||Tf(n)){n.initialInputs??=[],n.initialInputs.push(null);return}let s=null,a=0;for(;a<i.length;){let l=i[a];if(l===0){a+=4;continue}else if(l===5){a+=2;continue}else if(typeof l=="number")break;if(!e&&r.hasOwnProperty(l)){let h=r[l];for(let m of h)if(m===t){s??=[],s.push(l,i[a+1]);break}}else if(e&&o.hasOwnProperty(l)){let h=o[l];for(let m=0;m<h.length;m+=2)if(h[m]===t){s??=[],s.push(h[m+1],i[a+1]);break}}a+=2}n.initialInputs??=[],n.initialInputs.push(s)}function _D(n,t,e,i,r){n.data[i]=r;let o=r.factory||(r.factory=Zi(r.type,!0)),s=new hr(o,On(r),xn,null);n.blueprint[i]=s,e[i]=s,vD(n,t,i,dv(n,e,r.hostVars,gt),r)}function vD(n,t,e,i,r){let o=r.hostBindings;if(o){let s=n.hostBindingOpCodes;s===null&&(s=n.hostBindingOpCodes=[]);let a=~t.index;bD(s)!=a&&s.push(a),s.push(e,i,o)}}function bD(n){let t=n.length;for(;t>0;){let e=n[--t];if(typeof e=="number"&&e<0)return e}return 0}function xD(n,t,e){if(e){if(t.exportAs)for(let i=0;i<t.exportAs.length;i++)e[t.exportAs[i]]=n;On(t)&&(e[""]=n)}}function yD(n,t,e){n.flags|=1,n.directiveStart=t,n.directiveEnd=t+e,n.providerIndexes=t}function Wf(n,t,e,i,r,o,s,a){let l=t[ne],h=l.consts,m=tn(h,s),w=bo(l,n,e,i,m);return o&&Uv(l,t,w,tn(h,a),r),w.mergedAttrs=fo(w.mergedAttrs,w.attrs),w.attrs!==null&&lc(w,w.attrs,!1),w.mergedAttrs!==null&&lc(w,w.mergedAttrs,!0),l.queries!==null&&l.queries.elementStart(l,w),w}function qf(n,t){S_(n,t),ip(t)&&n.queries.elementEnd(t)}function CD(n,t,e,i,r,o){let s=t.consts,a=tn(s,r),l=bo(t,n,e,i,a);if(l.mergedAttrs=fo(l.mergedAttrs,l.attrs),o!=null){let h=tn(s,o);l.localNames=[];for(let m=0;m<h.length;m+=2)l.localNames.push(h[m],-1)}return l.attrs!==null&&lc(l,l.attrs,!1),l.mergedAttrs!==null&&lc(l,l.mergedAttrs,!0),t.queries!==null&&t.queries.elementStart(t,l),l}function Zf(n){return qv(n)?Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n:!1}function Wv(n,t){if(Array.isArray(n))for(let e=0;e<n.length;e++)t(n[e]);else{let e=n[Symbol.iterator](),i;for(;!(i=e.next()).done;)t(i.value)}}function qv(n){return n!==null&&(typeof n=="function"||typeof n=="object")}function Yf(n,t,e){return n[t]=e}function wD(n,t){return n[t]}function rn(n,t,e){if(e===gt)return!1;let i=n[t];return Object.is(i,e)?!1:(n[t]=e,!0)}function Qf(n,t,e,i){let r=rn(n,t,e);return rn(n,t+1,i)||r}function ED(n,t,e,i,r){let o=Qf(n,t,e,i);return rn(n,t+2,r)||o}function Zl(n,t,e){return function i(r){let o=mi(n)?en(n.index,t):t;Gf(o,5);let s=t[Ue],a=a_(t,s,e,r),l=i.__ngNextListenerFn__;for(;l;)a=a_(t,s,l,r)&&a,l=l.__ngNextListenerFn__;return a}}function a_(n,t,e,i){let r=ae(null);try{return Me(6,t,e),e(i)!==!1}catch(o){return $E(n,o),!1}finally{Me(7,t,e),ae(r)}}function Zv(n,t,e,i,r,o,s,a){let l=io(n),h=!1,m=null;if(!i&&l&&(m=SD(t,e,o,n.index)),m!==null){let w=m.__ngLastListenerFn__||m;w.__ngNextListenerFn__=s,m.__ngLastListenerFn__=s,h=!0}else{let w=Vt(n,e),M=i?i(w):w;s1(e,M,o,a);let T=r.listen(M,o,a);if(!DD(o)){let A=i?z=>i(Jt(z[n.index])):n.index;Yv(A,t,e,o,a,T,!1)}}return h}function DD(n){return n.startsWith("animation")||n.startsWith("transition")}function SD(n,t,e,i){let r=n.cleanup;if(r!=null)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===e&&r[o+1]===i){let a=t[to],l=r[o+2];return a&&a.length>l?a[l]:null}typeof s=="string"&&(o+=2)}return null}function Yv(n,t,e,i,r,o,s){let a=t.firstCreatePass?up(t):null,l=dp(e),h=l.length;l.push(r,o),a&&a.push(i,n,h,(h+1)*(s?-1:1))}function l_(n,t,e,i,r,o){let s=t[e],a=t[ne],h=a.data[e].outputs[i],w=s[h].subscribe(o);Yv(n.index,a,t,r,o,w,!0)}var Kp=Symbol("BINDING");var Xp=class extends kc{ngModule;constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let e=er(t);return new ks(e,this.ngModule)}};function MD(n){return Object.keys(n).map(t=>{let[e,i,r]=n[t],o={propName:e,templateName:t,isSignal:(i&bc.SignalBased)!==0};return r&&(o.transform=r),o})}function TD(n){return Object.keys(n).map(t=>({propName:n[t],templateName:t}))}function kD(n,t,e){let i=t instanceof Ft?t:t?.injector;return i&&n.getStandaloneInjector!==null&&(i=n.getStandaloneInjector(i)||i),i?new Qp(e,i):e}function ID(n){let t=n.get(An,null);if(t===null)throw new X(407,!1);let e=n.get(zv,null),i=n.get(Kt,null);return{rendererFactory:t,sanitizer:e,changeDetectionScheduler:i,ngReflect:!1}}function PD(n,t){let e=Qv(n);return nv(t,e,e==="svg"?ss:e==="math"?rp:null)}function OD(n){if(n?.toLowerCase()==="script")throw new X(905,!1)}function Qv(n){return(n.selectors[0][0]||"div").toLowerCase()}var ks=class extends Tc{componentDef;ngModule;selector;componentType;ngContentSelectors;isBoundToModule;cachedInputs=null;cachedOutputs=null;get inputs(){return this.cachedInputs??=MD(this.componentDef.inputs),this.cachedInputs}get outputs(){return this.cachedOutputs??=TD(this.componentDef.outputs),this.cachedOutputs}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=K1(t.selectors),this.ngContentSelectors=t.ngContentSelectors??[],this.isBoundToModule=!!e}create(t,e,i,r,o,s){Me(22);let a=ae(null);try{let l=this.componentDef,h=RD(i,l,s,o),m=kD(l,r||this.ngModule,t),w=ID(m),M=w.rendererFactory.createRenderer(null,l),T=i?kE(M,i,l.encapsulation,m):PD(l,M);OD(T?.tagName);let A=s?.some(c_)||o?.some(U=>typeof U!="function"&&U.bindings.some(c_)),z=If(null,h,null,512|cv(l),null,null,w,M,m,null,q_(T,m,!0));z[Ae]=T,Nl(z);let Q=null;try{let U=Wf(Ae,z,2,"#host",()=>h.directiveRegistry,!0,0);ov(M,T,U),ho(T,z),Sc(h,z,U),wf(h,U,z),qf(h,U),e!==void 0&&AD(U,this.ngContentSelectors,e),Q=en(U.index,z),z[Ue]=Q[Ue],Uf(h,z,null)}catch(U){throw Q!==null&&Bp(Q),Bp(z),U}finally{Me(23),Al()}return new cc(this.componentType,z,!!A)}finally{ae(a)}}};function RD(n,t,e,i){let r=n?["ng-version","20.3.29"]:X1(t.selectors[0]),o=null,s=null,a=0;if(e)for(let m of e)a+=m[Kp].requiredVars,m.create&&(m.targetIdx=0,(o??=[]).push(m)),m.update&&(m.targetIdx=0,(s??=[]).push(m));if(i)for(let m=0;m<i.length;m++){let w=i[m];if(typeof w!="function")for(let M of w.bindings){a+=M[Kp].requiredVars;let T=m+1;M.create&&(M.targetIdx=T,(o??=[]).push(M)),M.update&&(M.targetIdx=T,(s??=[]).push(M))}}let l=[t];if(i)for(let m of i){let w=typeof m=="function"?m:m.type,M=Qu(w);l.push(M)}return kf(0,null,ND(o,s),1,a,l,null,null,null,[r],null)}function ND(n,t){return!n&&!t?null:e=>{if(e&1&&n)for(let i of n)i.create();if(e&2&&t)for(let i of t)i.update()}}function c_(n){let t=n[Kp].kind;return t==="input"||t==="twoWay"}var cc=class extends Hv{_rootLView;_hasInputBindings;instance;hostView;changeDetectorRef;componentType;location;previousInputValues=null;_tNode;constructor(t,e,i){super(),this._rootLView=e,this._hasInputBindings=i,this._tNode=hs(e[ne],Ae),this.location=vo(this._tNode,e),this.instance=en(this._tNode.index,e)[Ue],this.hostView=this.changeDetectorRef=new xi(e,void 0),this.componentType=t}setInput(t,e){this._hasInputBindings;let i=this._tNode;if(this.previousInputValues??=new Map,this.previousInputValues.has(t)&&Object.is(this.previousInputValues.get(t),e))return;let r=this._rootLView,o=zf(i,r[ne],r,t,e);this.previousInputValues.set(t,e);let s=en(i.index,r);Gf(s,1)}get injector(){return new dr(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function AD(n,t,e){let i=n.projection=[];for(let r=0;r<t.length;r++){let o=e[r];i.push(o!=null&&o.length?Array.from(o):null)}}var wi=(()=>{class n{static __NG_ELEMENT_ID__=LD}return n})();function LD(){let n=rt();return Xv(n,ie())}var FD=wi,Kv=class extends FD{_lContainer;_hostTNode;_hostLView;constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return vo(this._hostTNode,this._hostLView)}get injector(){return new dr(this._hostTNode,this._hostLView)}get parentInjector(){let t=bf(this._hostTNode,this._hostLView);if(T_(t)){let e=Kl(t,this._hostLView),i=Ql(t),r=e[ne].data[i+8];return new dr(r,e)}else return new dr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let e=d_(this._lContainer);return e!==null&&e[t]||null}get length(){return this._lContainer.length-Ge}createEmbeddedView(t,e,i){let r,o;typeof i=="number"?r=i:i!=null&&(r=i.index,o=i.injector);let s=ac(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(e||{},o,s);return this.insertImpl(a,r,mo(this._hostTNode,s)),a}createComponent(t,e,i,r,o,s,a){let l=t&&!Ow(t),h;if(l)h=e;else{let Q=e||{};h=Q.index,i=Q.injector,r=Q.projectableNodes,o=Q.environmentInjector||Q.ngModuleRef,s=Q.directives,a=Q.bindings}let m=l?t:new ks(er(t)),w=i||this.parentInjector;if(!o&&m.ngModule==null){let U=(l?w:this.parentInjector).get(Ft,null);U&&(o=U)}let M=er(m.componentType??{}),T=ac(this._lContainer,M?.id??null),A=T?.firstChild??null,z=m.create(w,r,A,o,s,a);return this.insertImpl(z.hostView,h,mo(this._hostTNode,T)),z}insert(t,e){return this.insertImpl(t,e,!0)}insertImpl(t,e,i){let r=t._lView;if(v0(r)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let l=r[it],h=new Kv(l,l[It],l[it]);h.detach(h.indexOf(t))}}let o=this._adjustIndex(e),s=this._lContainer;return js(s,r,o,i),t.attachToViewContainerRef(),qu(kp(s),o,t),t}move(t,e){return this.insert(t,e)}indexOf(t){let e=d_(this._lContainer);return e!==null?e.indexOf(t):-1}remove(t){let e=this._adjustIndex(t,-1),i=Ts(this._lContainer,e);i&&(ls(kp(this._lContainer),e),Ec(i[ne],i))}detach(t){let e=this._adjustIndex(t,-1),i=Ts(this._lContainer,e);return i&&ls(kp(this._lContainer),e)!=null?new xi(i):null}_adjustIndex(t,e=0){return t??this.length+e}};function d_(n){return n[fs]}function kp(n){return n[fs]||(n[fs]=[])}function Xv(n,t){let e,i=t[n.index];return hn(i)?e=i:(e=Fv(i,t,null,n),t[n.index]=e,Pf(t,e)),BD(e,t,n,i),new Kv(e,n,t)}function VD(n,t){let e=n[ke],i=e.createComment(""),r=Vt(t,n),o=e.parentNode(r);return nc(e,o,i,e.nextSibling(r),!1),i}var BD=HD,jD=()=>!1;function $D(n,t,e){return jD(n,t,e)}function HD(n,t,e,i){if(n[hi])return;let r;e.type&8?r=Jt(i):r=VD(t,e),n[hi]=r}var Jp=class n{queryList;matches=null;constructor(t){this.queryList=t}clone(){return new n(this.queryList)}setDirty(){this.queryList.setDirty()}},ef=class n{queries;constructor(t=[]){this.queries=t}createEmbeddedView(t){let e=t.queries;if(e!==null){let i=t.contentQueries!==null?t.contentQueries[0]:e.length,r=[];for(let o=0;o<i;o++){let s=e.getByIndex(o),a=this.queries[s.indexInDeclarationView];r.push(a.clone())}return new n(r)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}finishViewCreation(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)Xf(t,e).matches!==null&&this.queries[e].setDirty()}},tf=class{flags;read;predicate;constructor(t,e,i=null){this.flags=e,this.read=i,typeof t=="string"?this.predicate=ZD(t):this.predicate=t}},nf=class n{queries;constructor(t=[]){this.queries=t}elementStart(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let i=0;i<this.length;i++){let r=e!==null?e.length:0,o=this.getByIndex(i).embeddedTView(t,r);o&&(o.indexInDeclarationView=i,e!==null?e.push(o):e=[o])}return e!==null?new n(e):null}template(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},rf=class n{metadata;matches=null;indexInDeclarationView=-1;crossesNgTemplate=!1;_declarationNodeIndex;_appliesToNextNode=!0;constructor(t,e=-1){this.metadata=t,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new n(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&(this.metadata.flags&1)!==1){let e=this._declarationNodeIndex,i=t.parent;for(;i!==null&&i.type&8&&i.index!==e;)i=i.parent;return e===(i!==null?i.index:-1)}return this._appliesToNextNode}matchTNode(t,e){let i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){let o=i[r];this.matchTNodeWithReadOption(t,e,zD(e,o)),this.matchTNodeWithReadOption(t,e,Wl(e,t,o,!1,!1))}else i===yi?e.type&4&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,Wl(e,t,i,!1,!1))}matchTNodeWithReadOption(t,e,i){if(i!==null){let r=this.metadata.read;if(r!==null)if(r===bn||r===wi||r===yi&&e.type&4)this.addMatch(e.index,-2);else{let o=Wl(e,t,r,!1,!1);o!==null&&this.addMatch(e.index,o)}else this.addMatch(e.index,i)}}addMatch(t,e){this.matches===null?this.matches=[t,e]:this.matches.push(t,e)}};function zD(n,t){let e=n.localNames;if(e!==null){for(let i=0;i<e.length;i+=2)if(e[i]===t)return e[i+1]}return null}function UD(n,t){return n.type&11?vo(n,t):n.type&4?Mc(n,t):null}function GD(n,t,e,i){return e===-1?UD(t,n):e===-2?WD(n,t,i):Ds(n,n[ne],e,t)}function WD(n,t,e){if(e===bn)return vo(t,n);if(e===yi)return Mc(t,n);if(e===wi)return Xv(t,n)}function Jv(n,t,e,i){let r=t[In].queries[i];if(r.matches===null){let o=n.data,s=e.matches,a=[];for(let l=0;s!==null&&l<s.length;l+=2){let h=s[l];if(h<0)a.push(null);else{let m=o[h];a.push(GD(t,m,s[l+1],e.metadata.read))}}r.matches=a}return r.matches}function of(n,t,e,i){let r=n.queries.getByIndex(e),o=r.matches;if(o!==null){let s=Jv(n,t,r,e);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)i.push(s[a/2]);else{let h=o[a+1],m=t[-l];for(let w=Ge;w<m.length;w++){let M=m[w];M[Hn]===M[it]&&of(M[ne],M,h,i)}if(m[or]!==null){let w=m[or];for(let M=0;M<w.length;M++){let T=w[M];of(T[ne],T,h,i)}}}}}return i}function Kf(n,t){return n[In].queries[t].queryList}function qD(n,t,e){let i=new ec((e&4)===4);return y0(n,t,i,i.destroy),(t[In]??=new ef).queries.push(new Jp(i))-1}function eb(n,t,e){let i=We();return i.firstCreatePass&&(YD(i,new tf(n,t,e),-1),(t&2)===2&&(i.staticViewQueries=!0)),qD(i,ie(),t)}function ZD(n){return n.split(",").map(t=>t.trim())}function YD(n,t,e){n.queries===null&&(n.queries=new nf),n.queries.track(new rf(t,e))}function Xf(n,t){return n.queries.getByIndex(t)}function tb(n,t){let e=n[ne],i=Xf(e,t);return i.crossesNgTemplate?of(e,n,t,[]):Jv(e,n,i,t)}function nb(n,t,e){let i,r=Go(()=>{i._dirtyCounter();let o=KD(i,n);if(t&&o===void 0)throw new X(-951,!1);return o});return i=r[Ke],i._dirtyCounter=v(0),i._flatValue=void 0,r}function ib(n){return nb(!0,!1,n)}function rb(n){return nb(!0,!0,n)}function QD(n,t){let e=n[Ke];e._lView=ie(),e._queryIndex=t,e._queryList=Kf(e._lView,t),e._queryList.onDirty(()=>e._dirtyCounter.update(i=>i+1))}function KD(n,t){let e=n._lView,i=n._queryIndex;if(e===void 0||i===void 0||e[le]&4)return t?void 0:Qt;let r=Kf(e,i),o=tb(e,i);return r.reset(o,F_),t?r.first:r._changesDetected||n._flatValue===void 0?n._flatValue=r.toArray():n._flatValue}var Is=class{};var Ps=class extends Is{injector;componentFactoryResolver=new Xp(this);instance=null;constructor(t){super();let e=new Qi([...t.providers,{provide:Is,useValue:this},{provide:kc,useValue:this.componentFactoryResolver}],t.parent||us(),t.debugName,new Set(["environment"]));this.injector=e,t.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function ob(n,t,e=null){return new Ps({providers:n,parent:t,debugName:e,runEnvironmentInitializers:!0}).injector}var XD=(()=>{class n{_injector;cachedInjectors=new Map;constructor(e){this._injector=e}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let i=Ku(!1,e.type),r=i.length>0?ob([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,r)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static \u0275prov=ce({token:n,providedIn:"environment",factory:()=>new n(_e(Ft))})}return n})();function ue(n){return fc(()=>{let t=sb(n),e=re(H({},t),{decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===xf.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&n.dependencies||null,getStandaloneInjector:t.standalone?r=>r.get(XD).getOrCreateStandaloneInjector(e):null,getExternalStyles:null,signals:n.signals??!1,data:n.data||{},encapsulation:n.encapsulation||Gn.Emulated,styles:n.styles||Qt,_:null,schemas:n.schemas||null,tView:null,id:""});t.standalone&&Ln("NgStandalone"),ab(e);let i=n.dependencies;return e.directiveDefs=u_(i,JD),e.pipeDefs=u_(i,l0),e.id=nS(e),e})}function JD(n){return er(n)||Qu(n)}function eS(n,t){if(n==null)return fi;let e={};for(let i in n)if(n.hasOwnProperty(i)){let r=n[i],o,s,a,l;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o,l=r[3]||null):(o=r,s=r,a=bc.None,l=null),e[o]=[i,a,l],t[o]=s}return e}function tS(n){if(n==null)return fi;let t={};for(let e in n)n.hasOwnProperty(e)&&(t[n[e]]=e);return t}function Ei(n){return fc(()=>{let t=sb(n);return ab(t),t})}function Pc(n){return{type:n.type,name:n.name,factory:null,pure:n.pure!==!1,standalone:n.standalone??!0,onDestroy:n.type.prototype.ngOnDestroy||null}}function sb(n){let t={};return{type:n.type,providersResolver:null,factory:null,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:t,inputConfig:n.inputs||fi,exportAs:n.exportAs||null,standalone:n.standalone??!0,signals:n.signals===!0,selectors:n.selectors||Qt,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,resolveHostDirectives:null,hostDirectives:null,inputs:eS(n.inputs,t),outputs:tS(n.outputs),debugInfo:null}}function ab(n){n.features?.forEach(t=>t(n))}function u_(n,t){return n?()=>{let e=typeof n=="function"?n():n,i=[];for(let r of e){let o=t(r);o!==null&&i.push(o)}return i}:null}function nS(n){let t=0,e=typeof n.consts=="function"?"":n.consts,i=[n.selectors,n.ngContentSelectors,n.hostVars,n.hostAttrs,e,n.vars,n.decls,n.encapsulation,n.standalone,n.signals,n.exportAs,JSON.stringify(n.inputs),JSON.stringify(n.outputs),Object.getOwnPropertyNames(n.type.prototype),!!n.contentQueries,!!n.viewQuery];for(let o of i.join("|"))t=Math.imul(31,t)+o.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function iS(n){return Object.getPrototypeOf(n.prototype).constructor}function $s(n){let t=iS(n.type),e=!0,i=[n];for(;t;){let r;if(On(n))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new X(903,!1);r=t.\u0275dir}if(r){if(e){i.push(r);let s=n;s.inputs=Ip(n.inputs),s.declaredInputs=Ip(n.declaredInputs),s.outputs=Ip(n.outputs);let a=r.hostBindings;a&&lS(n,a);let l=r.viewQuery,h=r.contentQueries;if(l&&sS(n,l),h&&aS(n,h),rS(n,r),Xg(n.outputs,r.outputs),On(r)&&r.data.animation){let m=n.data;m.animation=(m.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(n),a===$s&&(e=!1)}}t=Object.getPrototypeOf(t)}oS(i)}function rS(n,t){for(let e in t.inputs){if(!t.inputs.hasOwnProperty(e)||n.inputs.hasOwnProperty(e))continue;let i=t.inputs[e];i!==void 0&&(n.inputs[e]=i,n.declaredInputs[e]=t.declaredInputs[e])}}function oS(n){let t=0,e=null;for(let i=n.length-1;i>=0;i--){let r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=fo(r.hostAttrs,e=fo(e,r.hostAttrs))}}function Ip(n){return n===fi?{}:n===Qt?[]:n}function sS(n,t){let e=n.viewQuery;e?n.viewQuery=(i,r)=>{t(i,r),e(i,r)}:n.viewQuery=t}function aS(n,t){let e=n.contentQueries;e?n.contentQueries=(i,r,o)=>{t(i,r,o),e(i,r,o)}:n.contentQueries=t}function lS(n,t){let e=n.hostBindings;e?n.hostBindings=(i,r)=>{t(i,r),e(i,r)}:n.hostBindings=t}function lb(n,t,e,i,r,o,s,a){if(e.firstCreatePass){n.mergedAttrs=fo(n.mergedAttrs,n.attrs);let m=n.tView=kf(2,n,r,o,s,e.directiveRegistry,e.pipeRegistry,null,e.schemas,e.consts,null);e.queries!==null&&(e.queries.template(e,n),m.queries=e.queries.embeddedTView(n))}a&&(n.flags|=a),oo(n,!1);let l=dS(e,t,n,i);Ll()&&Vf(e,t,l,n),ho(l,t);let h=Fv(l,t,l,n);t[i+Ae]=h,Pf(t,h),$D(h,n,t)}function cS(n,t,e,i,r,o,s,a,l,h,m){let w=e+Ae,M;return t.firstCreatePass?(M=bo(t,w,4,s||null,a||null),Pl()&&Uv(t,n,M,tn(t.consts,h),jf),S_(t,M)):M=t.data[w],lb(M,n,t,e,i,r,o,l),io(M)&&Sc(t,n,M),h!=null&&Vs(n,M,m),M}function Os(n,t,e,i,r,o,s,a,l,h,m){let w=e+Ae,M;if(t.firstCreatePass){if(M=bo(t,w,4,s||null,a||null),h!=null){let T=tn(t.consts,h);M.localNames=[];for(let A=0;A<T.length;A+=2)M.localNames.push(T[A],-1)}}else M=t.data[w];return lb(M,n,t,e,i,r,o,l),h!=null&&Vs(n,M,m),M}function yt(n,t,e,i,r,o,s,a){let l=ie(),h=We(),m=tn(h.consts,o);return cS(l,h,n,t,e,i,r,m,void 0,s,a),yt}var dS=uS;function uS(n,t,e,i){return xs(!0),t[ke].createComment("")}var Jf=new oe("");function Hs(n){return!!n&&typeof n.then=="function"}function Oc(n){return!!n&&typeof n.subscribe=="function"}var cb=new oe("");var eh=(()=>{class n{resolve;reject;initialized=!1;done=!1;donePromise=new Promise((e,i)=>{this.resolve=e,this.reject=i});appInits=O(cb,{optional:!0})??[];injector=O(kt);constructor(){}runInitializers(){if(this.initialized)return;let e=[];for(let r of this.appInits){let o=eo(this.injector,r);if(Hs(o))e.push(o);else if(Oc(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});e.push(s)}}let i=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),e.length===0&&i(),this.initialized=!0}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),db=new oe("");function ub(){au(()=>{let n="";throw new X(600,n)})}function pb(n){return n.isBoundToModule}var pS=10;var vr=(()=>{class n{_runningTick=!1;_destroyed=!1;_destroyListeners=[];_views=[];internalErrorHandler=O(mn);afterRenderManager=O(yc);zonelessEnabled=O(ys);rootEffectScheduler=O(Cs);dirtyFlags=0;tracingSnapshot=null;allTestViews=new Set;autoDetectTestViews=new Set;includeAllTestViews=!1;afterTick=new He;get allViews(){return[...(this.includeAllTestViews?this.allTestViews:this.autoDetectTestViews).keys(),...this._views]}get destroyed(){return this._destroyed}componentTypes=[];components=[];internalPendingTask=O(vi);get isStable(){return this.internalPendingTask.hasPendingTasksObservable.pipe(Oe(e=>!e))}constructor(){O(Ci,{optional:!0})}whenStable(){let e;return new Promise(i=>{e=this.isStable.subscribe({next:r=>{r&&i()}})}).finally(()=>{e.unsubscribe()})}_injector=O(Ft);_rendererFactory=null;get injector(){return this._injector}bootstrap(e,i){return this.bootstrapImpl(e,i)}bootstrapImpl(e,i,r=kt.NULL){return this._injector.get(we).run(()=>{Me(10);let s=e instanceof Tc;if(!this._injector.get(eh).done){let A="";throw new X(405,A)}let l;s?l=e:l=this._injector.get(kc).resolveComponentFactory(e),this.componentTypes.push(l.componentType);let h=pb(l)?void 0:this._injector.get(Is),m=i||l.selector,w=l.create(r,[],m,h),M=w.location.nativeElement,T=w.injector.get(Jf,null);return T?.registerApplication(M),w.onDestroy(()=>{this.detachView(w.hostView),Es(this.components,w),T?.unregisterApplication(M)}),this._loadComponent(w),Me(11,w),w})}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){Me(12),this.tracingSnapshot!==null?this.tracingSnapshot.run(xc.CHANGE_DETECTION,this.tickImpl):this.tickImpl()}tickImpl=()=>{if(this._runningTick)throw new X(101,!1);let e=ae(null);try{this._runningTick=!0,this.synchronize()}finally{this._runningTick=!1,this.tracingSnapshot?.dispose(),this.tracingSnapshot=null,ae(e),this.afterTick.next(),Me(13)}};synchronize(){this._rendererFactory===null&&!this._injector.destroyed&&(this._rendererFactory=this._injector.get(An,null,{optional:!0}));let e=0;for(;this.dirtyFlags!==0&&e++<pS;)Me(14),this.synchronizeOnce(),Me(15)}synchronizeOnce(){this.dirtyFlags&16&&(this.dirtyFlags&=-17,this.rootEffectScheduler.flush());let e=!1;if(this.dirtyFlags&7){let i=!!(this.dirtyFlags&1);this.dirtyFlags&=-8,this.dirtyFlags|=8;for(let{_lView:r}of this.allViews){if(!i&&!ms(r))continue;let o=i&&!this.zonelessEnabled?0:1;Rv(r,o),e=!0}if(this.dirtyFlags&=-5,this.syncDirtyFlagsWithViews(),this.dirtyFlags&23)return}e||(this._rendererFactory?.begin?.(),this._rendererFactory?.end?.()),this.dirtyFlags&8&&(this.dirtyFlags&=-9,this.afterRenderManager.execute()),this.syncDirtyFlagsWithViews()}syncDirtyFlagsWithViews(){if(this.allViews.some(({_lView:e})=>ms(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){let i=e;Es(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView);try{this.tick()}catch(r){this.internalErrorHandler(r)}this.components.push(e),this._injector.get(db,[]).forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Es(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new X(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function Es(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function fS(){let n,t;return{promise:new Promise((i,r)=>{n=i,t=r}),resolve:n,reject:t}}function K(n,t,e,i){let r=ie(),o=ar();if(rn(r,o,t)){let s=We(),a=bs();VE(a,r,n,t,e,i)}return K}var fb=new oe("",{providedIn:"root",factory:()=>!1});var hS=!1,zs=typeof document<"u"&&typeof document?.documentElement?.getAnimations=="function";function hb(n){return n[Pt].get(fb,hS)}function mS(n,t,e){let i=go.get(n);if(i){for(let r of t)i.classList.push(r);for(let r of e)i.cleanupFns.push(r)}else go.set(n,{classList:t,cleanupFns:e})}function th(n){let t=go.get(n);if(t){for(let e of t.cleanupFns)e();go.delete(n)}ur.delete(n)}var go=new WeakMap,ur=new WeakMap,po=new WeakMap;function p_(n,t){let e=po.get(n);if(e&&e.length>0){let i=e.findIndex(r=>r===t);i>-1&&e.splice(i,1)}e?.length===0&&po.delete(n)}function mb(n,t){let e=po.get(n)?.shift(),i=t[Hn];if(i){let o=sc(n.index,i)?.previousSibling;e&&o&&e===o&&e.dispatchEvent(new CustomEvent("animationend",{detail:{cancel:!0}}))}}function gS(n,t){po.has(n)?po.get(n)?.push(t):po.set(n,[t])}function f_(n){let t=n[Un]??={};return t.enter??=new Map}function Rc(n){let t=n[Un]??={};return t.leave??=new Map}function gb(n){let t=typeof n=="function"?n():n,e=Array.isArray(t)?t:null;return typeof t=="string"&&(e=t.trim().split(/\s+/).filter(i=>i)),e}function _S(n,t){if(!zs)return;let e=go.get(n);if(e&&e.classList.length>0&&vS(n,e.classList))for(let i of e.classList)t.removeClass(n,i);th(n)}function vS(n,t){for(let e of t)if(n.classList.contains(e))return!0;return!1}function _b(n,t){let e=ur.get(t);return e===void 0?!0:t===n.target&&(e.animationName!==void 0&&n.animationName===e.animationName||e.propertyName!==void 0&&n.propertyName===e.propertyName)}function vb(n,t,e){let i=n.get(t.index)??{animateFns:[]};i.animateFns.push(e),n.set(t.index,i)}function h_(n,t){if(n)for(let e of n)e();for(let e of t)e()}function m_(n,t){let e=Rc(n).get(t.index);e&&(e.resolvers=void 0)}function pr(n){if(Ln("NgAnimateEnter"),!zs)return pr;let t=ie();if(hb(t))return pr;let e=rt();return mb(e,t),vb(f_(t),e,()=>bS(t,e,n)),bv(t[Pt]),xv(t[Pt],f_(t)),pr}function bS(n,t,e){let i=Vt(t,n),r=n[ke],o=n[Pt].get(we),s=gb(e),a=[],l=m=>{if(m.target!==i)return;let w=m instanceof AnimationEvent?"animationend":"transitionend";o.runOutsideAngular(()=>{r.listen(i,w,h)})},h=m=>{m.target===i&&xS(m,i,r)};if(s&&s.length>0){o.runOutsideAngular(()=>{a.push(r.listen(i,"animationstart",l)),a.push(r.listen(i,"transitionstart",l))}),mS(i,s,a);for(let m of s)r.addClass(i,m);o.runOutsideAngular(()=>{requestAnimationFrame(()=>{if(hv(i,ur,zs),!ur.has(i)){for(let m of s)r.removeClass(i,m);th(i)}})})}}function xS(n,t,e){let i=go.get(t);if(!(n.target!==t||!i)&&_b(n,t)){n.stopImmediatePropagation();for(let r of i.classList)e.removeClass(t,r);th(t)}}function fr(n){if(Ln("NgAnimateLeave"),!zs)return fr;let t=ie();if(hb(t))return fr;let i=rt();return mb(i,t),vb(Rc(t),i,()=>yS(t,i,n)),bv(t[Pt]),fr}function yS(n,t,e){let{promise:i,resolve:r}=fS(),o=Vt(t,n),s=n[ke],a=n[Pt].get(we);bi.add(n),(Rc(n).get(t.index).resolvers??=[]).push(r);let l=gb(e);return l&&l.length>0?CS(o,t,n,l,s,a):r(),{promise:i,resolve:r}}function CS(n,t,e,i,r,o){_S(n,r);let s=[],a=Rc(e).get(t.index)?.resolvers,l=h=>{if(h.target===n&&(h instanceof CustomEvent||_b(h,n))){if(h.stopImmediatePropagation(),ur.delete(n),p_(t,n),Array.isArray(t.projection))for(let m of i)r.removeClass(n,m);h_(a,s),m_(e,t)}};o.runOutsideAngular(()=>{s.push(r.listen(n,"animationend",l)),s.push(r.listen(n,"transitionend",l))}),gS(t,n);for(let h of i)r.addClass(n,h);o.runOutsideAngular(()=>{requestAnimationFrame(()=>{hv(n,ur,zs),ur.has(n)||(p_(t,n),h_(a,s),m_(e,t))})})}function Nc(){return ie()[xt][Ue]}var sf=class{destroy(t){}updateValue(t,e){}swap(t,e){let i=Math.min(t,e),r=Math.max(t,e),o=this.detach(r);if(r-i>1){let s=this.detach(i);this.attach(i,o),this.attach(r,s)}else this.attach(i,o)}move(t,e){this.attach(e,this.detach(t))}};function Pp(n,t,e,i,r){return n===e&&Object.is(t,i)?1:Object.is(r(n,t),r(e,i))?-1:0}function wS(n,t,e){let i,r,o=0,s=n.length-1,a=void 0;if(Array.isArray(t)){let l=t.length-1;for(;o<=s&&o<=l;){let h=n.at(o),m=t[o],w=Pp(o,h,o,m,e);if(w!==0){w<0&&n.updateValue(o,m),o++;continue}let M=n.at(s),T=t[l],A=Pp(s,M,l,T,e);if(A!==0){A<0&&n.updateValue(s,T),s--,l--;continue}let z=e(o,h),Q=e(s,M),U=e(o,m);if(Object.is(U,Q)){let be=e(l,T);Object.is(be,z)?(n.swap(o,s),n.updateValue(s,T),l--,s--):n.move(s,o),n.updateValue(o,m),o++;continue}if(i??=new dc,r??=__(n,o,s,e),af(n,i,o,U))n.updateValue(o,m),o++,s++;else if(r.has(U))i.set(z,n.detach(o)),s--;else{let be=n.create(o,t[o]);n.attach(o,be),o++,s++}}for(;o<=l;)g_(n,i,e,o,t[o]),o++}else if(t!=null){let l=t[Symbol.iterator](),h=l.next();for(;!h.done&&o<=s;){let m=n.at(o),w=h.value,M=Pp(o,m,o,w,e);if(M!==0)M<0&&n.updateValue(o,w),o++,h=l.next();else{i??=new dc,r??=__(n,o,s,e);let T=e(o,w);if(af(n,i,o,T))n.updateValue(o,w),o++,s++,h=l.next();else if(!r.has(T))n.attach(o,n.create(o,w)),o++,s++,h=l.next();else{let A=e(o,m);i.set(A,n.detach(o)),s--}}}for(;!h.done;)g_(n,i,e,n.length,h.value),h=l.next()}for(;o<=s;)n.destroy(n.detach(s--));i?.forEach(l=>{n.destroy(l)})}function af(n,t,e,i){return t!==void 0&&t.has(i)?(n.attach(e,t.get(i)),t.delete(i),!0):!1}function g_(n,t,e,i,r){if(af(n,t,i,e(i,r)))n.updateValue(i,r);else{let o=n.create(i,r);n.attach(i,o)}}function __(n,t,e,i){let r=new Set;for(let o=t;o<=e;o++)r.add(i(o,n.at(o)));return r}var dc=class{kvMap=new Map;_vMap=void 0;has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let e=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(t,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,e){if(this.kvMap.has(t)){let i=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(i);)i=r.get(i);r.set(i,e)}else this.kvMap.set(t,e)}forEach(t){for(let[e,i]of this.kvMap)if(t(i,e),this._vMap!==void 0){let r=this._vMap;for(;r.has(i);)i=r.get(i),t(i,e)}}};function E(n,t,e,i,r,o,s,a){Ln("NgControlFlow");let l=ie(),h=We(),m=tn(h.consts,o);return Os(l,h,n,t,e,i,r,m,256,s,a),Us}function Us(n,t,e,i,r,o,s,a){Ln("NgControlFlow");let l=ie(),h=We(),m=tn(h.consts,o);return Os(l,h,n,t,e,i,r,m,512,s,a),Us}function D(n,t){Ln("NgControlFlow");let e=ie(),i=ar(),r=e[i]!==gt?e[i]:-1,o=r!==-1?uc(e,Ae+r):void 0,s=0;if(rn(e,i,n)){let a=ae(null);try{if(o!==void 0&&Bv(o,s),n!==-1){let l=Ae+n,h=uc(e,l),m=uf(e[ne],l),w=$v(h,m,e),M=Bs(e,m,t,{dehydratedView:w});js(h,M,s,mo(m,w))}}finally{ae(a)}}else if(o!==void 0){let a=Vv(o,s);a!==void 0&&(a[Ue]=t)}}var lf=class{lContainer;$implicit;$index;constructor(t,e,i){this.lContainer=t,this.$implicit=e,this.$index=i}get $count(){return this.lContainer.length-Ge}};function qn(n){return n}function Bt(n,t){return t}var cf=class{hasEmptyBlock;trackByFn;liveCollection;constructor(t,e,i){this.hasEmptyBlock=t,this.trackByFn=e,this.liveCollection=i}};function Z(n,t,e,i,r,o,s,a,l,h,m,w,M){Ln("NgControlFlow");let T=ie(),A=We(),z=l!==void 0,Q=ie(),U=a?s.bind(Q[xt][Ue]):s,be=new cf(z,U);Q[Ae+n]=be,Os(T,A,n+1,t,e,i,r,tn(A.consts,o),256),z&&Os(T,A,n+2,l,h,m,w,tn(A.consts,M),512)}var df=class extends sf{lContainer;hostLView;templateTNode;operationsCounter=void 0;needsIndexUpdate=!1;constructor(t,e,i){super(),this.lContainer=t,this.hostLView=e,this.templateTNode=i}get length(){return this.lContainer.length-Ge}at(t){return this.getLView(t)[Ue].$implicit}attach(t,e){let i=e[tr];this.needsIndexUpdate||=t!==this.length,js(this.lContainer,e,t,mo(this.templateTNode,i)),ES(this.lContainer,t)}detach(t){return this.needsIndexUpdate||=t!==this.length-1,DS(this.lContainer,t),SS(this.lContainer,t)}create(t,e){let i=ac(this.lContainer,this.templateTNode.tView.ssrId),r=Bs(this.hostLView,this.templateTNode,new lf(this.lContainer,e,t),{dehydratedView:i});return this.operationsCounter?.recordCreate(),r}destroy(t){Ec(t[ne],t),this.operationsCounter?.recordDestroy()}updateValue(t,e){this.getLView(t)[Ue].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t<this.length;t++)this.getLView(t)[Ue].$index=t}getLView(t){return MS(this.lContainer,t)}};function Y(n){let t=ae(null),e=nn();try{let i=ie(),r=i[ne],o=i[e],s=e+1,a=uc(i,s);if(o.liveCollection===void 0){let h=uf(r,s);o.liveCollection=new df(a,i,h)}else o.liveCollection.reset();let l=o.liveCollection;if(wS(l,n,o.trackByFn),l.updateIndexes(),o.hasEmptyBlock){let h=ar(),m=l.length===0;if(rn(i,h,m)){let w=e+2,M=uc(i,w);if(m){let T=uf(r,w),A=$v(M,T,i),z=Bs(i,T,void 0,{dehydratedView:A});js(M,z,0,mo(T,A))}else r.firstUpdatePass&&lD(M),Bv(M,0)}}}finally{ae(t)}}function uc(n,t){return n[t]}function ES(n,t){if(n.length<=Ge)return;let e=Ge+t,i=n[e],r=i?i[Un]:void 0;if(i&&r&&r.detachedLeaveAnimationFns&&r.detachedLeaveAnimationFns.length>0){let o=i[Pt];mE(o,r),bi.delete(i),r.detachedLeaveAnimationFns=void 0}}function DS(n,t){if(n.length<=Ge)return;let e=Ge+t,i=n[e],r=i?i[Un]:void 0;r&&r.leave&&r.leave.size>0&&(r.detachedLeaveAnimationFns=[])}function SS(n,t){return Ts(n,t)}function MS(n,t){return Vv(n,t)}function uf(n,t){return hs(n,t)}function S(n,t,e){let i=ie(),r=ar();if(rn(i,r,t)){let o=We(),s=bs();RE(s,i,n,t,i[ke],e)}return S}function pf(n,t,e,i,r){zf(t,n,e,r?"class":"style",i)}function u(n,t,e,i){let r=ie(),o=r[ne],s=n+Ae,a=o.firstCreatePass?Wf(s,r,2,t,jf,Pl(),e,i):o.data[s];if($f(a,r,n,t,bb),io(a)){let l=r[ne];Sc(l,r,a),wf(l,a,r)}return i!=null&&Vs(r,a),u}function p(){let n=We(),t=rt(),e=Hf(t);return n.firstCreatePass&&qf(n,e),hp(e)&&mp(),pp(),e.classesWithoutHost!=null&&Vw(e)&&pf(n,e,ie(),e.classesWithoutHost,!0),e.stylesWithoutHost!=null&&Bw(e)&&pf(n,e,ie(),e.stylesWithoutHost,!1),p}function j(n,t,e,i){return u(n,t,e,i),p(),j}function b(n,t,e,i){let r=ie(),o=r[ne],s=n+Ae,a=o.firstCreatePass?CD(s,o,2,t,e,i):o.data[s];return $f(a,r,n,t,bb),i!=null&&Vs(r,a),b}function y(){let n=rt(),t=Hf(n);return hp(t)&&mp(),pp(),y}function ee(n,t,e,i){return b(n,t,e,i),y(),ee}var bb=(n,t,e,i,r)=>(xs(!0),nv(t[ke],i,wp()));function nh(n,t,e){let i=ie(),r=i[ne],o=n+Ae,s=r.firstCreatePass?Wf(o,i,8,"ng-container",jf,Pl(),t,e):r.data[o];if($f(s,i,n,"ng-container",TS),io(s)){let a=i[ne];Sc(a,i,s),wf(a,s,i)}return e!=null&&Vs(i,s),nh}function ih(){let n=We(),t=rt(),e=Hf(t);return n.firstCreatePass&&qf(n,e),ih}function Ct(n,t,e){return nh(n,t,e),ih(),Ct}var TS=(n,t,e,i,r)=>(xs(!0),A1(t[ke],""));function I(){return ie()}function G(n,t,e){let i=ie(),r=ar();if(rn(i,r,t)){let o=We(),s=bs();Mv(s,i,n,t,i[ke],e)}return G}var Hl=void 0;function kS(n){let t=Math.floor(Math.abs(n)),e=n.toString().replace(/^[^.]*\.?/,"").length;return t===1&&e===0?1:5}var IS=["en",[["a","p"],["AM","PM"]],[["AM","PM"]],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Hl,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Hl,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Hl,"{1} 'at' {0}",Hl],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",kS],Op={};function Ut(n){let t=PS(n),e=v_(t);if(e)return e;let i=t.split("-")[0];if(e=v_(i),e)return e;if(i==="en")return IS;throw new X(701,!1)}function v_(n){if(!(n in Op)){let t=un.ng&&un.ng.common&&un.ng.common.locales&&un.ng.common.locales[n];return t!==void 0&&(Op[n]=t),t}return Op[n]}var Qe=(function(n){return n[n.LocaleId=0]="LocaleId",n[n.DayPeriodsFormat=1]="DayPeriodsFormat",n[n.DayPeriodsStandalone=2]="DayPeriodsStandalone",n[n.DaysFormat=3]="DaysFormat",n[n.DaysStandalone=4]="DaysStandalone",n[n.MonthsFormat=5]="MonthsFormat",n[n.MonthsStandalone=6]="MonthsStandalone",n[n.Eras=7]="Eras",n[n.FirstDayOfWeek=8]="FirstDayOfWeek",n[n.WeekendRange=9]="WeekendRange",n[n.DateFormat=10]="DateFormat",n[n.TimeFormat=11]="TimeFormat",n[n.DateTimeFormat=12]="DateTimeFormat",n[n.NumberSymbols=13]="NumberSymbols",n[n.NumberFormats=14]="NumberFormats",n[n.CurrencyCode=15]="CurrencyCode",n[n.CurrencySymbol=16]="CurrencySymbol",n[n.CurrencyName=17]="CurrencyName",n[n.Currencies=18]="Currencies",n[n.Directionality=19]="Directionality",n[n.PluralCase=20]="PluralCase",n[n.ExtraData=21]="ExtraData",n})(Qe||{});function PS(n){return n.toLowerCase().replace(/_/g,"-")}var Gs="en-US";var OS=Gs;function xb(n){typeof n=="string"&&(OS=n.toLowerCase().replace(/_/g,"-"))}function C(n,t,e){let i=ie(),r=We(),o=rt();return RS(r,i,i[ke],o,n,t,e),C}function F(n,t,e){let i=ie(),r=We(),o=rt();return(o.type&3||e)&&Zv(o,r,i,e,i[ke],n,t,Zl(o,i,t)),F}function RS(n,t,e,i,r,o,s){let a=!0,l=null;if((i.type&3||s)&&(l??=Zl(i,t,o),Zv(i,n,t,s,e,r,o,l)&&(a=!1)),a){let h=i.outputs?.[r],m=i.hostDirectiveOutputs?.[r];if(m&&m.length)for(let w=0;w<m.length;w+=2){let M=m[w],T=m[w+1];l??=Zl(i,t,o),l_(i,t,M,T,r,l)}if(h&&h.length)for(let w of h)l??=Zl(i,t,o),l_(i,t,w,r,r,l)}}function d(n=1){return N0(n)}function NS(n,t){let e=null,i=W1(n);for(let r=0;r<t.length;r++){let o=t[r];if(o==="*"){e=r;continue}if(i===null?lv(n,o,!0):Y1(i,o))return r}return e}function rh(n){let t=ie()[xt][It];if(!t.projection){let e=n?n.length:1,i=t.projection=s0(e,null),r=i.slice(),o=t.child;for(;o!==null;){if(o.type!==128){let s=n?NS(o,n):0;s!==null&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o)}o=o.next}}}function oh(n,t=0,e,i,r,o){let s=ie(),a=We(),l=i?n+1:null;l!==null&&Os(s,a,l,i,r,o,null,e);let h=bo(a,Ae+n,16,null,e||null);h.projection===null&&(h.projection=t),vp();let w=!s[tr]||fp();s[xt][It].projection[h.projection]===null&&l!==null?AS(s,a,l):w&&!_c(h)&&SE(a,s,h)}function AS(n,t,e){let i=Ae+e,r=t.data[i],o=n[i],s=ac(o,r.tView.ssrId),a=Bs(n,r,void 0,{dehydratedView:s});js(o,a,0,mo(r,s))}function sh(n,t,e){eb(n,t,e)}function ah(n){let t=ie(),e=We(),i=Rl();vs(i+1);let r=Xf(e,i);if(n.dirty&&_0(t)===((r.metadata.flags&2)===2)){if(r.matches===null)n.reset([]);else{let o=tb(t,i);n.reset(o,F_),n.notifyOnChanges()}return!0}return!1}function lh(){return Kf(ie(),Rl())}function st(n,t,e,i){QD(n,eb(t,e,i))}function Ot(n=1){vs(Rl()+n)}function _t(n){let t=D0();return Tl(t,Ae+n)}function zl(n,t){return n<<17|t<<2}function mr(n){return n>>17&32767}function LS(n){return(n&2)==2}function FS(n,t){return n&131071|t<<17}function ff(n){return n|2}function _o(n){return(n&131068)>>2}function Rp(n,t){return n&-131069|t<<2}function VS(n){return(n&1)===1}function hf(n){return n|1}function BS(n,t,e,i,r,o){let s=o?t.classBindings:t.styleBindings,a=mr(s),l=_o(s);n[i]=e;let h=!1,m;if(Array.isArray(e)){let w=e;m=w[1],(m===null||Jr(w,m)>0)&&(h=!0)}else m=e;if(r)if(l!==0){let M=mr(n[a+1]);n[i+1]=zl(M,a),M!==0&&(n[M+1]=Rp(n[M+1],i)),n[a+1]=FS(n[a+1],i)}else n[i+1]=zl(a,0),a!==0&&(n[a+1]=Rp(n[a+1],i)),a=i;else n[i+1]=zl(l,0),a===0?a=i:n[l+1]=Rp(n[l+1],i),l=i;h&&(n[i+1]=ff(n[i+1])),b_(n,m,i,!0),b_(n,m,i,!1),jS(t,m,n,i,o),s=zl(a,l),o?t.classBindings=s:t.styleBindings=s}function jS(n,t,e,i,r){let o=r?n.residualClasses:n.residualStyles;o!=null&&typeof t=="string"&&Jr(o,t)>=0&&(e[i+1]=hf(e[i+1]))}function b_(n,t,e,i){let r=n[e+1],o=t===null,s=i?mr(r):_o(r),a=!1;for(;s!==0&&(a===!1||o);){let l=n[s],h=n[s+1];$S(l,t)&&(a=!0,n[s+1]=i?hf(h):ff(h)),s=i?mr(h):_o(h)}a&&(n[e+1]=i?ff(r):hf(r))}function $S(n,t){return n===null||t==null||(Array.isArray(n)?n[1]:n)===t?!0:Array.isArray(n)&&typeof t=="string"?Jr(n,t)>=0:!1}var _n={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function HS(n){return n.substring(_n.key,_n.keyEnd)}function zS(n){return US(n),yb(n,Cb(n,0,_n.textEnd))}function yb(n,t){let e=_n.textEnd;return e===t?-1:(t=_n.keyEnd=GS(n,_n.key=t,e),Cb(n,t,e))}function US(n){_n.key=0,_n.keyEnd=0,_n.value=0,_n.valueEnd=0,_n.textEnd=n.length}function Cb(n,t,e){for(;t<e&&n.charCodeAt(t)<=32;)t++;return t}function GS(n,t,e){for(;t<e&&n.charCodeAt(t)>32;)t++;return t}function se(n,t,e){return wb(n,t,e,!1),se}function te(n,t){return wb(n,t,null,!0),te}function Xe(n){qS(JS,WS,n,!0)}function WS(n,t){for(let e=zS(t);e>=0;e=yb(t,e))Dl(n,HS(t),!0)}function wb(n,t,e,i){let r=ie(),o=We(),s=_s(2);if(o.firstUpdatePass&&Db(o,n,s,i),t!==gt&&rn(r,s,t)){let a=o.data[nn()];Sb(o,a,r,r[ke],n,r[s+1]=tM(t,e),i,s)}}function qS(n,t,e,i){let r=We(),o=_s(2);r.firstUpdatePass&&Db(r,null,o,i);let s=ie();if(e!==gt&&rn(s,o,e)){let a=r.data[nn()];if(Mb(a,i)&&!Eb(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(e=xl(l,e||"")),pf(r,a,s,e,i)}else eM(r,a,s,s[ke],s[o+1],s[o+1]=XS(n,t,e),i,o)}}function Eb(n,t){return t>=n.expandoStartIndex}function Db(n,t,e,i){let r=n.data;if(r[e+1]===null){let o=r[nn()],s=Eb(n,e);Mb(o,i)&&t===null&&!s&&(t=!1),t=ZS(r,o,t,i),BS(r,o,t,e,s,i)}}function ZS(n,t,e,i){let r=I0(n),o=i?t.residualClasses:t.residualStyles;if(r===null)(i?t.classBindings:t.styleBindings)===0&&(e=Np(null,n,t,e,i),e=Rs(e,t.attrs,i),o=null);else{let s=t.directiveStylingLast;if(s===-1||n[s]!==r)if(e=Np(r,n,t,e,i),o===null){let l=YS(n,t,i);l!==void 0&&Array.isArray(l)&&(l=Np(null,n,t,l[1],i),l=Rs(l,t.attrs,i),QS(n,t,i,l))}else o=KS(n,t,i)}return o!==void 0&&(i?t.residualClasses=o:t.residualStyles=o),e}function YS(n,t,e){let i=e?t.classBindings:t.styleBindings;if(_o(i)!==0)return n[mr(i)]}function QS(n,t,e,i){let r=e?t.classBindings:t.styleBindings;n[mr(r)]=i}function KS(n,t,e){let i,r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<r;o++){let s=n[o].hostAttrs;i=Rs(i,s,e)}return Rs(i,t.attrs,e)}function Np(n,t,e,i,r){let o=null,s=e.directiveEnd,a=e.directiveStylingLast;for(a===-1?a=e.directiveStart:a++;a<s&&(o=t[a],i=Rs(i,o.hostAttrs,r),o!==n);)a++;return n!==null&&(e.directiveStylingLast=a),i}function Rs(n,t,e){let i=e?1:2,r=-1;if(t!==null)for(let o=0;o<t.length;o++){let s=t[o];typeof s=="number"?r=s:r===i&&(Array.isArray(n)||(n=n===void 0?[]:["",n]),Dl(n,s,e?!0:t[++o]))}return n===void 0?null:n}function XS(n,t,e){if(e==null||e==="")return Qt;let i=[],r=Ls(e);if(Array.isArray(r))for(let o=0;o<r.length;o++)n(i,r[o],!0);else if(typeof r=="object")for(let o in r)r.hasOwnProperty(o)&&n(i,o,r[o]);else typeof r=="string"&&t(i,r);return i}function JS(n,t,e){let i=String(t);i!==""&&!i.includes(" ")&&Dl(n,i,e)}function eM(n,t,e,i,r,o,s,a){r===gt&&(r=Qt);let l=0,h=0,m=0<r.length?r[0]:null,w=0<o.length?o[0]:null;for(;m!==null||w!==null;){let M=l<r.length?r[l+1]:void 0,T=h<o.length?o[h+1]:void 0,A=null,z;m===w?(l+=2,h+=2,M!==T&&(A=w,z=T)):w===null||m!==null&&m<w?(l+=2,A=m):(h+=2,A=w,z=T),A!==null&&Sb(n,t,e,i,A,z,s,a),m=l<r.length?r[l]:null,w=h<o.length?o[h]:null}}function Sb(n,t,e,i,r,o,s,a){if(!(t.type&3))return;let l=n.data,h=l[a+1],m=VS(h)?x_(l,t,e,r,_o(h),s):void 0;if(!pc(m)){pc(o)||LS(h)&&(o=x_(l,null,e,r,a,s));let w=op(nn(),e);TE(i,s,w,r,o)}}function x_(n,t,e,i,r,o){let s=t===null,a;for(;r>0;){let l=n[r],h=Array.isArray(l),m=h?l[1]:l,w=m===null,M=e[r+1];M===gt&&(M=w?Qt:void 0);let T=w?Sl(M,i):m===i?M:void 0;if(h&&!pc(T)&&(T=Sl(l,i)),pc(T)&&(a=T,s))return a;let A=n[r+1];r=s?mr(A):_o(A)}if(t!==null){let l=o?t.residualClasses:t.residualStyles;l!=null&&(a=Sl(l,i))}return a}function pc(n){return n!==void 0}function tM(n,t){return n==null||n===""||(typeof t=="string"?n=n+t:typeof n=="object"&&(n=ui(Ls(n)))),n}function Mb(n,t){return(n.flags&(t?8:16))!==0}function f(n,t=""){let e=ie(),i=We(),r=n+Ae,o=i.firstCreatePass?bo(i,r,1,t,null):i.data[r],s=nM(i,e,o,t,n);e[r]=s,Ll()&&Vf(i,e,s,o),oo(o,!1)}var nM=(n,t,e,i,r)=>(xs(!0),R1(t[ke],i));function iM(n,t,e,i=""){return rn(n,ar(),e)?t+pn(e)+i:gt}function rM(n,t,e,i,r,o=""){let s=xp(),a=Qf(n,s,e,r);return _s(2),a?t+pn(e)+i+pn(r)+o:gt}function oM(n,t,e,i,r,o,s,a=""){let l=xp(),h=ED(n,l,e,r,s);return _s(3),h?t+pn(e)+i+pn(r)+o+pn(s)+a:gt}function P(n){return $("",n),P}function $(n,t,e){let i=ie(),r=iM(i,n,t,e);return r!==gt&&ch(i,nn(),r),$}function br(n,t,e,i,r){let o=ie(),s=rM(o,n,t,e,i,r);return s!==gt&&ch(o,nn(),s),br}function xo(n,t,e,i,r,o,s){let a=ie(),l=oM(a,n,t,e,i,r,o,s);return l!==gt&&ch(a,nn(),l),xo}function ch(n,t,e){let i=op(t,n);N1(n[ke],i,e)}function sM(n,t,e){let i=We();if(i.firstCreatePass){let r=On(n);mf(e,i.data,i.blueprint,r,!0),mf(t,i.data,i.blueprint,r,!1)}}function mf(n,t,e,i,r){if(n=bt(n),Array.isArray(n))for(let o=0;o<n.length;o++)mf(n[o],t,e,i,r);else{let o=We(),s=ie(),a=rt(),l=Yi(n)?n:bt(n.provide),h=Ju(n),m=a.providerIndexes&1048575,w=a.directiveStart,M=a.providerIndexes>>20;if(Yi(n)||!n.multi){let T=new hr(h,r,xn,null),A=Lp(l,t,r?m:m+M,w);A===-1?(Vp(Jl(a,s),o,l),Ap(o,n,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push(T),s.push(T)):(e[A]=T,s[A]=T)}else{let T=Lp(l,t,m+M,w),A=Lp(l,t,m,m+M),z=T>=0&&e[T],Q=A>=0&&e[A];if(r&&!Q||!r&&!z){Vp(Jl(a,s),o,l);let U=cM(r?lM:aM,e.length,r,i,h,n);!r&&Q&&(e[A].providerFactory=U),Ap(o,n,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push(U),s.push(U)}else{let U=Tb(e[r?A:T],h,!r&&i);Ap(o,n,T>-1?T:A,U)}!r&&i&&Q&&e[A].componentProviders++}}}function Ap(n,t,e,i){let r=Yi(t),o=p0(t);if(r||o){let l=(o?bt(t.useClass):t).prototype.ngOnDestroy;if(l){let h=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){let m=h.indexOf(e);m===-1?h.push(e,[i,l]):h[m+1].push(i,l)}else h.push(e,l)}}}function Tb(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function Lp(n,t,e,i){for(let r=e;r<i;r++)if(t[r]===n)return r;return-1}function aM(n,t,e,i,r){return gf(this.multi,[])}function lM(n,t,e,i,r){let o=this.multi,s;if(this.providerFactory){let a=this.providerFactory.componentProviders,l=Ds(i,i[ne],this.providerFactory.index,r);s=l.slice(0,a),gf(o,s);for(let h=a;h<l.length;h++)s.push(l[h])}else s=[],gf(o,s);return s}function gf(n,t){for(let e=0;e<n.length;e++){let i=n[e];t.push(i())}return t}function cM(n,t,e,i,r,o){let s=new hr(n,e,xn,null);return s.multi=[],s.index=t,s.componentProviders=0,Tb(s,r,i&&!e),s}function Ws(n,t=[]){return e=>{e.providersResolver=(i,r)=>sM(i,r?r(n):n,t)}}function qs(n,t,e){let i=gs()+n,r=ie();return r[i]===gt?Yf(r,i,e?t.call(e):t()):wD(r,i)}function Di(n,t,e,i){return Ib(ie(),gs(),n,t,e,i)}function kb(n,t){let e=n[t];return e===gt?void 0:e}function Ib(n,t,e,i,r,o){let s=t+e;return rn(n,s,r)?Yf(n,s+1,o?i.call(o,r):i(r)):kb(n,s+1)}function dM(n,t,e,i,r,o,s){let a=t+e;return Qf(n,a,r,o)?Yf(n,a+2,s?i.call(s,r,o):i(r,o)):kb(n,a+2)}function Si(n,t){let e=We(),i,r=n+Ae;e.firstCreatePass?(i=uM(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks??=[]).push(r,i.onDestroy)):i=e.data[r];let o=i.factory||(i.factory=Zi(i.type,!0)),s,a=Tt(xn);try{let l=Xl(!1),h=o();return Xl(l),sp(e,ie(),r,h),h}finally{Tt(a)}}function uM(n,t){if(t)for(let e=t.length-1;e>=0;e--){let i=t[e];if(n===i.name)return i}}function dh(n,t,e){let i=n+Ae,r=ie(),o=Tl(r,i);return Pb(r,i)?Ib(r,gs(),t,o.transform,e,o):o.transform(e)}function yo(n,t,e,i){let r=n+Ae,o=ie(),s=Tl(o,r);return Pb(o,r)?dM(o,gs(),t,s.transform,e,i,s):s.transform(e,i)}function Pb(n,t){return n[ne].data[t].pure}function Co(n,t){return Mc(n,t)}var pM=(()=>{class n{zone=O(we);changeDetectionScheduler=O(Kt);applicationRef=O(vr);applicationErrorHandler=O(mn);_onMicrotaskEmptySubscription;initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{try{this.applicationRef.dirtyFlags|=1,this.applicationRef._tick()}catch(e){this.applicationErrorHandler(e)}})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Ob=new oe("",{factory:()=>!1});function uh({ngZoneFactory:n,ignoreChangesOutsideZone:t,scheduleInRootZone:e}){return n??=()=>new we(re(H({},fh()),{scheduleInRootZone:e})),[{provide:we,useFactory:n},{provide:Ji,multi:!0,useFactory:()=>{let i=O(pM,{optional:!0});return()=>i.initialize()}},{provide:Ji,multi:!0,useFactory:()=>{let i=O(fM);return()=>{i.initialize()}}},t===!0?{provide:Ep,useValue:!0}:[],{provide:Dp,useValue:e??mv},{provide:mn,useFactory:()=>{let i=O(we),r=O(Ft),o;return s=>{i.runOutsideAngular(()=>{r.destroyed&&!o?setTimeout(()=>{throw s}):(o??=r.get(Ht),o.handleError(s))})}}}]}function ph(n){let t=n?.ignoreChangesOutsideZone,e=n?.scheduleInRootZone,i=uh({ngZoneFactory:()=>{let r=fh(n);return r.scheduleInRootZone=e,r.shouldCoalesceEventChangeDetection&&Ln("NgZone_CoalesceEvent"),new we(r)},ignoreChangesOutsideZone:t,scheduleInRootZone:e});return cs([{provide:Ob,useValue:!0},{provide:ys,useValue:!1},i])}function fh(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:n?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:n?.runCoalescing??!1}}var fM=(()=>{class n{subscription=new Be;initialized=!1;zone=O(we);pendingTasks=O(vi);initialize(){if(this.initialized)return;this.initialized=!0;let e=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(e=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{we.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{we.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Rb=(()=>{class n{applicationErrorHandler=O(mn);appRef=O(vr);taskService=O(vi);ngZone=O(we);zonelessEnabled=O(ys);tracing=O(Ci,{optional:!0});disableScheduling=O(Ep,{optional:!0})??!1;zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run;schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}];subscriptions=new Be;angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(rc):null;scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(O(Dp,{optional:!0})??!1);cancelScheduledCallback=null;useMicrotaskScheduler=!1;runningTick=!1;pendingRenderTaskId=null;constructor(){this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof oc||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&e===5)return;let i=!1;switch(e){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 6:{this.appRef.dirtyFlags|=2,i=!0;break}case 12:{this.appRef.dirtyFlags|=16,i=!0;break}case 13:{this.appRef.dirtyFlags|=2,i=!0;break}case 11:{i=!0;break}default:this.appRef.dirtyFlags|=8}if(this.appRef.tracingSnapshot=this.tracing?.snapshot(this.appRef.tracingSnapshot)??null,!this.shouldScheduleTick(i))return;let r=this.useMicrotaskScheduler?X0:gv;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(e){return!(this.disableScheduling&&!e||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(rc+this.angularZoneId))}tick(){if(this.runningTick||this.appRef.destroyed)return;if(this.appRef.dirtyFlags===0){this.cleanup();return}!this.zonelessEnabled&&this.appRef.dirtyFlags&7&&(this.appRef.dirtyFlags|=1);let e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(i){this.taskService.remove(e),this.applicationErrorHandler(i)}finally{this.cleanup()}this.useMicrotaskScheduler=!0,X0(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();function hM(){return typeof $localize<"u"&&$localize.locale||Gs}var Zs=new oe("",{providedIn:"root",factory:()=>O(Zs,{optional:!0,skipSelf:!0})||hM()});var Ac=class{destroyed=!1;listeners=null;errorHandler=O(Ht,{optional:!0});destroyRef=O(ot);constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0,this.listeners=null})}subscribe(t){if(this.destroyed)throw new X(953,!1);return(this.listeners??=[]).push(t),{unsubscribe:()=>{let e=this.listeners?.indexOf(t);e!==void 0&&e!==-1&&this.listeners?.splice(e,1)}}}emit(t){if(this.destroyed){console.warn(Ki(953,!1));return}if(this.listeners===null)return;let e=ae(null);try{for(let i of this.listeners)try{i(t)}catch(r){this.errorHandler?.handleError(r)}}finally{ae(e)}}};function ze(n){return qg(n)}function R(n,t){return Go(n,t?.equal)}var hh=class{[Ke];constructor(t){this[Ke]=t}destroy(){this[Ke].destroy()}};function ge(n,t){let e=t?.injector??O(kt),i=t?.manualCleanup!==!0?e.get(ot):null,r,o=e.get(lr,null,{optional:!0}),s=e.get(Kt);return o!==null?(r=_M(o.view,s,n),i instanceof as&&i._lView===o.view&&(i=null)):r=vM(n,e.get(Cs),s),r.injector=e,i!==null&&(r.onDestroyFn=i.onDestroy(()=>r.destroy())),new hh(r)}var Ab=re(H({},Zg),{cleanupFns:void 0,zone:null,onDestroyFn:cr,run(){let n=so(!1);try{Yg(this)}finally{so(n)}},cleanup(){if(!this.cleanupFns?.length)return;let n=ae(null);try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[],ae(n)}}}),mM=re(H({},Ab),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(12)},destroy(){si(this),this.onDestroyFn(),this.cleanup(),this.scheduler.remove(this)}}),gM=re(H({},Ab),{consumerMarkedDirty(){this.view[le]|=8192,gi(this.view),this.notifier.notify(13)},destroy(){si(this),this.onDestroyFn(),this.cleanup(),this.view[zn]?.delete(this)}});function _M(n,t,e){let i=Object.create(gM);return i.view=n,i.zone=typeof Zone<"u"?Zone.current:null,i.notifier=t,i.fn=Lb(i,e),n[zn]??=new Set,n[zn].add(i),i.consumerMarkedDirty(i),i}function vM(n,t,e){let i=Object.create(mM);return i.fn=Lb(i,n),i.scheduler=t,i.notifier=e,i.zone=typeof Zone<"u"?Zone.current:null,i.scheduler.add(i),i.notifier.notify(12),i}function Lb(n,t){return()=>{t(e=>(n.cleanupFns??=[]).push(e))}}var bM=n=>n;function xr(n,t){if(typeof n=="function"){let e=Mu(n,bM,t?.equal);return Nb(e,t?.debugName)}else{let e=Mu(n.source,n.computation,n.equal);return Nb(e,n.debugName)}}function Nb(n,t){let e=n[Ke],i=n;return i.set=r=>Gg(e,r),i.update=r=>Wg(e,r),i.asReadonly=Fl.bind(n),i}var $b=Symbol("InputSignalNode#UNSET"),RM=re(H({},Wo),{transformFn:void 0,applyValueToInputSignal(n,t){Bi(n,t)}});function Hb(n,t){let e=Object.create(RM);e.value=n,e.transformFn=t?.transform;function i(){if(ri(e),e.value===$b){let r=null;throw new X(-950,r)}return e.value}return i[Ke]=e,i}var NM=new oe("");NM.__NG_ELEMENT_ID__=n=>{let t=rt();if(t===null)throw new X(204,!1);if(t.type&2)return t.value;if(n&8)return null;throw new X(204,!1)};function W(n){return new Ac}function Fb(n,t){return Hb(n,t)}function AM(n){return Hb($b,n)}var N=(Fb.required=AM,Fb);function Vb(n,t){return ib(t)}function LM(n,t){return rb(t)}var dt=(Vb.required=LM,Vb);var gh=new oe(""),FM=new oe("");function Ys(n){return!n.moduleRef}function VM(n){let t=Ys(n)?n.r3Injector:n.moduleRef.injector,e=t.get(we);return e.run(()=>{Ys(n)?n.r3Injector.resolveInjectorInitializers():n.moduleRef.resolveInjectorInitializers();let i=t.get(mn),r;if(e.runOutsideAngular(()=>{r=e.onError.subscribe({next:i})}),Ys(n)){let o=()=>t.destroy(),s=n.platformInjector.get(gh);s.add(o),t.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>n.moduleRef.destroy(),s=n.platformInjector.get(gh);s.add(o),n.moduleRef.onDestroy(()=>{Es(n.allPlatformModules,n.moduleRef),r.unsubscribe(),s.delete(o)})}return jM(i,e,()=>{let o=t.get(vi),s=o.add(),a=t.get(eh);return a.runInitializers(),a.donePromise.then(()=>{let l=t.get(Zs,Gs);if(xb(l||Gs),!t.get(FM,!0))return Ys(n)?t.get(vr):(n.allPlatformModules.push(n.moduleRef),n.moduleRef);if(Ys(n)){let m=t.get(vr);return n.rootComponent!==void 0&&m.bootstrap(n.rootComponent),m}else return BM?.(n.moduleRef,n.allPlatformModules),n.moduleRef}).finally(()=>{o.remove(s)})})})}var BM;function jM(n,t,e){try{let i=e();return Hs(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n(i)),i}}var Lc=null;function $M(n=[],t){return kt.create({name:t,providers:[{provide:ds,useValue:"platform"},{provide:gh,useValue:new Set([()=>Lc=null])},...n]})}function HM(n=[]){if(Lc)return Lc;let t=$M(n);return Lc=t,ub(),zM(t),t}function zM(n){let t=n.get(mc,null);eo(n,()=>{t?.forEach(e=>e())})}var Bc=(()=>{class n{static __NG_ELEMENT_ID__=UM}return n})();function UM(n){return GM(rt(),ie(),(n&16)===16)}function GM(n,t,e){if(mi(n)&&!e){let i=en(n.index,t);return new xi(i,i)}else if(n.type&175){let i=t[xt];return new xi(i,t)}return null}var _h=class{constructor(){}supports(t){return Zf(t)}create(t){return new vh(t)}},WM=(n,t)=>t,vh=class{length=0;collection;_linkedRecords=null;_unlinkedRecords=null;_previousItHead=null;_itHead=null;_itTail=null;_additionsHead=null;_additionsTail=null;_movesHead=null;_movesTail=null;_removalsHead=null;_removalsTail=null;_identityChangesHead=null;_identityChangesTail=null;_trackByFn;constructor(t){this._trackByFn=t||WM}forEachItem(t){let e;for(e=this._itHead;e!==null;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){let s=!i||e&&e.currentIndex<Bb(i,r,o)?e:i,a=Bb(s,r,o),l=s.currentIndex;if(s===i)r--,i=i._nextRemoved;else if(e=e._next,s.previousIndex==null)r++;else{o||(o=[]);let h=a-r,m=l-r;if(h!=m){for(let M=0;M<h;M++){let T=M<o.length?o[M]:o[M]=0,A=T+M;m<=A&&A<h&&(o[M]=T+1)}let w=s.previousIndex;o[w]=m-h}}a!==l&&t(s,a,l)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;e!==null;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;e!==null;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;e!==null;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;e!==null;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;e!==null;e=e._nextIdentityChange)t(e)}diff(t){if(t==null&&(t=[]),!Zf(t))throw new X(900,!1);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._itHead,i=!1,r,o,s;if(Array.isArray(t)){this.length=t.length;for(let a=0;a<this.length;a++)o=t[a],s=this._trackByFn(a,o),e===null||!Object.is(e.trackById,s)?(e=this._mismatch(e,o,s,a),i=!0):(i&&(e=this._verifyReinsertion(e,o,s,a)),Object.is(e.item,o)||this._addIdentityChange(e,o)),e=e._next}else r=0,Wv(t,a=>{s=this._trackByFn(r,a),e===null||!Object.is(e.trackById,s)?(e=this._mismatch(e,a,s,r),i=!0):(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;t!==null;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;t!==null;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;t!==null;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,r){let o;return t===null?o=this._itTail:(o=t._prev,this._remove(t)),t=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null),t!==null?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):(t=this._linkedRecords===null?null:this._linkedRecords.get(i,r),t!==null?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new bh(e,i),o,r)),t}_verifyReinsertion(t,e,i,r){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(i,null);return o!==null?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;t!==null;){let e=t._next;this._addToRemovals(this._unlink(t)),t=e}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,i){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(t);let r=t._prevRemoved,o=t._nextRemoved;return r===null?this._removalsHead=o:r._nextRemoved=o,o===null?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail===null?this._additionsTail=this._additionsHead=t:this._additionsTail=this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){let r=e===null?this._itHead:e._next;return t._next=r,t._prev=e,r===null?this._itTail=t:r._prev=t,e===null?this._itHead=t:e._next=t,this._linkedRecords===null&&(this._linkedRecords=new Fc),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){this._linkedRecords!==null&&this._linkedRecords.remove(t);let e=t._prev,i=t._next;return e===null?this._itHead=i:e._next=i,i===null?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail===null?this._movesTail=this._movesHead=t:this._movesTail=this._movesTail._nextMoved=t),t}_addToRemovals(t){return this._unlinkedRecords===null&&(this._unlinkedRecords=new Fc),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=t:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=t,t}},bh=class{item;trackById;currentIndex=null;previousIndex=null;_nextPrevious=null;_prev=null;_next=null;_prevDup=null;_nextDup=null;_prevRemoved=null;_nextRemoved=null;_nextAdded=null;_nextMoved=null;_nextIdentityChange=null;constructor(t,e){this.item=t,this.trackById=e}},xh=class{_head=null;_tail=null;add(t){this._head===null?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;i!==null;i=i._nextDup)if((e===null||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){let e=t._prevDup,i=t._nextDup;return e===null?this._head=i:e._nextDup=i,i===null?this._tail=e:i._prevDup=e,this._head===null}},Fc=class{map=new Map;put(t){let e=t.trackById,i=this.map.get(e);i||(i=new xh,this.map.set(e,i)),i.add(t)}get(t,e){let i=t,r=this.map.get(i);return r?r.get(t,e):null}remove(t){let e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Bb(n,t,e){let i=n.previousIndex;if(i===null)return i;let r=0;return e&&i<e.length&&(r=e[i]),i+t+r}function jb(){return new jc([new _h])}var jc=(()=>{class n{factories;static \u0275prov=ce({token:n,providedIn:"root",factory:jb});constructor(e){this.factories=e}static create(e,i){if(i!=null){let r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:()=>{let i=O(n,{optional:!0,skipSelf:!0});return n.create(e,i||jb())}}}find(e){let i=this.factories.find(r=>r.supports(e));if(i!=null)return i;throw new X(901,!1)}}return n})();function zb(n){let{rootComponent:t,appProviders:e,platformProviders:i,platformRef:r}=n;Me(8);try{let o=r?.injector??HM(i),s=[uh({}),{provide:Kt,useExisting:Rb},F0,...e||[]],a=new Ps({providers:s,parent:o,debugName:"",runEnvironmentInitializers:!1});return VM({r3Injector:a.injector,platformInjector:o,rootComponent:t})}catch(o){return Promise.reject(o)}finally{Me(9)}}function Ub(n){return typeof n=="boolean"?n:n!=null&&n!=="false"}var mh=Symbol("NOT_SET"),Gb=new Set,qM=re(H({},Wo),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,value:mh,cleanup:null,consumerMarkedDirty(){if(this.sequence.impl.executing){if(this.sequence.lastPhase===null||this.sequence.lastPhase<this.phase)return;this.sequence.erroredOrDestroyed=!0}this.sequence.scheduler.notify(7)},phaseFn(n){if(this.sequence.lastPhase=this.phase,!this.dirty)return this.signal;if(this.dirty=!1,this.value!==mh&&!Vi(this))return this.signal;try{for(let r of this.cleanup??Gb)r()}finally{this.cleanup?.clear()}let t=[];n!==void 0&&t.push(n),t.push(this.registerCleanupFn);let e=jn(this),i;try{i=this.userFn.apply(null,t)}finally{oi(this,e)}return(this.value===mh||!this.equal(this.value,i))&&(this.value=i,this.version++),this.signal}}),yh=class extends Ss{scheduler;lastPhase=null;nodes=[void 0,void 0,void 0,void 0];constructor(t,e,i,r,o,s=null){super(t,[void 0,void 0,void 0,void 0],i,!1,o.get(ot),s),this.scheduler=r;for(let a of Af){let l=e[a];if(l===void 0)continue;let h=Object.create(qM);h.sequence=this,h.phase=a,h.userFn=l,h.dirty=!0,h.signal=()=>(ri(h),h.value),h.signal[Ke]=h,h.registerCleanupFn=m=>(h.cleanup??=new Set).add(m),this.nodes[a]=h,this.hooks[a]=m=>h.phaseFn(m)}}afterRun(){super.afterRun(),this.lastPhase=null}destroy(){super.destroy();for(let t of this.nodes)if(t)try{for(let e of t.cleanup??Gb)e()}finally{si(t)}}};function Qs(n,t){let e=t?.injector??O(kt),i=e.get(Kt),r=e.get(yc),o=e.get(Ci,null,{optional:!0});r.impl??=e.get(Lf);let s=n;typeof s=="function"&&(s={mixedReadWrite:n});let a=e.get(lr,null,{optional:!0}),l=new yh(r.impl,[s.earlyRead,s.write,s.mixedReadWrite,s.read],a?.view,i,e,o?.snapshot(null));return r.impl.register(l),l}var Wb=null;function Xs(){return Wb}function Ch(n){Wb??=n}var Ks=class{};var wt=(function(n){return n[n.Format=0]="Format",n[n.Standalone=1]="Standalone",n})(wt||{}),Ie=(function(n){return n[n.Narrow=0]="Narrow",n[n.Abbreviated=1]="Abbreviated",n[n.Wide=2]="Wide",n[n.Short=3]="Short",n})(Ie||{}),jt=(function(n){return n[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n[n.Full=3]="Full",n})(jt||{}),Yn={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function Zb(n){return Ut(n)[Qe.LocaleId]}function Yb(n,t,e){let i=Ut(n),r=[i[Qe.DayPeriodsFormat],i[Qe.DayPeriodsStandalone]],o=on(r,t);return on(o,e)}function Qb(n,t,e){let i=Ut(n),r=[i[Qe.DaysFormat],i[Qe.DaysStandalone]],o=on(r,t);return on(o,e)}function Kb(n,t,e){let i=Ut(n),r=[i[Qe.MonthsFormat],i[Qe.MonthsStandalone]],o=on(r,t);return on(o,e)}function Xb(n,t){let i=Ut(n)[Qe.Eras];return on(i,t)}function Js(n,t){let e=Ut(n);return on(e[Qe.DateFormat],t)}function ea(n,t){let e=Ut(n);return on(e[Qe.TimeFormat],t)}function ta(n,t){let i=Ut(n)[Qe.DateTimeFormat];return on(i,t)}function na(n,t){let e=Ut(n),i=e[Qe.NumberSymbols][t];if(typeof i>"u"){if(t===Yn.CurrencyDecimal)return e[Qe.NumberSymbols][Yn.Decimal];if(t===Yn.CurrencyGroup)return e[Qe.NumberSymbols][Yn.Group]}return i}function Jb(n){if(!n[Qe.ExtraData])throw new X(2303,!1)}function ex(n){let t=Ut(n);return Jb(t),(t[Qe.ExtraData][2]||[]).map(i=>typeof i=="string"?wh(i):[wh(i[0]),wh(i[1])])}function tx(n,t,e){let i=Ut(n);Jb(i);let r=[i[Qe.ExtraData][0],i[Qe.ExtraData][1]],o=on(r,t)||[];return on(o,e)||[]}function on(n,t){for(let e=t;e>-1;e--)if(typeof n[e]<"u")return n[e];throw new X(2304,!1)}function wh(n){let[t,e]=n.split(":");return{hours:+t,minutes:+e}}var ZM=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,$c={},YM=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,QM=256;function nx(n,t,e,i){let r=sT(n);KM(t),t=Zn(e,t)||t;let s=[],a;for(;t;)if(a=YM.exec(t),a){s=s.concat(a.slice(1));let m=s.pop();if(!m)break;t=m}else{s.push(t);break}let l=r.getTimezoneOffset();i&&(l=rx(i,l),r=oT(r,i));let h="";return s.forEach(m=>{let w=iT(m);h+=w?w(r,e,l):m==="''"?"'":m.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),h}function KM(n){if(n.length>QM)throw new X(2300,!1)}function Wc(n,t,e){let i=new Date(0);return i.setFullYear(n,t,e),i.setHours(0,0,0),i}function Zn(n,t){let e=Zb(n);if($c[e]??={},$c[e][t])return $c[e][t];let i="";switch(t){case"shortDate":i=Js(n,jt.Short);break;case"mediumDate":i=Js(n,jt.Medium);break;case"longDate":i=Js(n,jt.Long);break;case"fullDate":i=Js(n,jt.Full);break;case"shortTime":i=ea(n,jt.Short);break;case"mediumTime":i=ea(n,jt.Medium);break;case"longTime":i=ea(n,jt.Long);break;case"fullTime":i=ea(n,jt.Full);break;case"short":let r=Zn(n,"shortTime"),o=Zn(n,"shortDate");i=Hc(ta(n,jt.Short),[r,o]);break;case"medium":let s=Zn(n,"mediumTime"),a=Zn(n,"mediumDate");i=Hc(ta(n,jt.Medium),[s,a]);break;case"long":let l=Zn(n,"longTime"),h=Zn(n,"longDate");i=Hc(ta(n,jt.Long),[l,h]);break;case"full":let m=Zn(n,"fullTime"),w=Zn(n,"fullDate");i=Hc(ta(n,jt.Full),[m,w]);break}return i&&($c[e][t]=i),i}function Hc(n,t){return t&&(n=n.replace(/\{([^}]+)}/g,function(e,i){return t!=null&&i in t?t[i]:e})),n}function yn(n,t,e="-",i,r){let o="";(n<0||r&&n<=0)&&(r?n=-n+1:(n=-n,o=e));let s=String(n);for(;s.length<t;)s="0"+s;return i&&(s=s.slice(s.length-t)),o+s}function XM(n,t){return yn(n,3).substring(0,t)}function Je(n,t,e=0,i=!1,r=!1){return function(o,s){let a=JM(n,o);if((e>0||a>-e)&&(a+=e),n===3)a===0&&e===-12&&(a=12);else if(n===6)return XM(a,t);let l=na(s,Yn.MinusSign);return yn(a,t,l,i,r)}}function JM(n,t){switch(n){case 0:return t.getFullYear();case 1:return t.getMonth();case 2:return t.getDate();case 3:return t.getHours();case 4:return t.getMinutes();case 5:return t.getSeconds();case 6:return t.getMilliseconds();case 7:return t.getDay();default:throw new X(2301,!1)}}function Re(n,t,e=wt.Format,i=!1){return function(r,o){return eT(r,o,n,t,e,i)}}function eT(n,t,e,i,r,o){switch(e){case 2:return Kb(t,r,i)[n.getMonth()];case 1:return Qb(t,r,i)[n.getDay()];case 0:let s=n.getHours(),a=n.getMinutes();if(o){let h=ex(t),m=tx(t,r,i),w=h.findIndex(M=>{if(Array.isArray(M)){let[T,A]=M,z=s>=T.hours&&a>=T.minutes,Q=s<A.hours||s===A.hours&&a<A.minutes;if(T.hours<A.hours){if(z&&Q)return!0}else if(z||Q)return!0}else if(M.hours===s&&M.minutes===a)return!0;return!1});if(w!==-1)return m[w]}return Yb(t,r,i)[s<12?0:1];case 3:return Xb(t,i)[n.getFullYear()<=0?0:1];default:let l=e;throw new X(2302,!1)}}function zc(n){return function(t,e,i){let r=-1*i,o=na(e,Yn.MinusSign),s=r>0?Math.floor(r/60):Math.ceil(r/60);switch(n){case 0:return(r>=0?"+":"")+yn(s,2,o)+yn(Math.abs(r%60),2,o);case 1:return"GMT"+(r>=0?"+":"")+yn(s,1,o);case 2:return"GMT"+(r>=0?"+":"")+yn(s,2,o)+":"+yn(Math.abs(r%60),2,o);case 3:return i===0?"Z":(r>=0?"+":"")+yn(s,2,o)+":"+yn(Math.abs(r%60),2,o);default:throw new X(2310,!1)}}}var tT=0,Gc=4;function nT(n){let t=Wc(n,tT,1).getDay();return Wc(n,0,1+(t<=Gc?Gc:Gc+7)-t)}function ix(n){let t=n.getDay(),e=t===0?-3:Gc-t;return Wc(n.getFullYear(),n.getMonth(),n.getDate()+e)}function Eh(n,t=!1){return function(e,i){let r;if(t){let o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();r=1+Math.floor((s+o)/7)}else{let o=ix(e),s=nT(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return yn(r,n,na(i,Yn.MinusSign))}}function Uc(n,t=!1){return function(e,i){let o=ix(e).getFullYear();return yn(o,n,na(i,Yn.MinusSign),t)}}var Dh={};function iT(n){if(Dh[n])return Dh[n];let t;switch(n){case"G":case"GG":case"GGG":t=Re(3,Ie.Abbreviated);break;case"GGGG":t=Re(3,Ie.Wide);break;case"GGGGG":t=Re(3,Ie.Narrow);break;case"y":t=Je(0,1,0,!1,!0);break;case"yy":t=Je(0,2,0,!0,!0);break;case"yyy":t=Je(0,3,0,!1,!0);break;case"yyyy":t=Je(0,4,0,!1,!0);break;case"Y":t=Uc(1);break;case"YY":t=Uc(2,!0);break;case"YYY":t=Uc(3);break;case"YYYY":t=Uc(4);break;case"M":case"L":t=Je(1,1,1);break;case"MM":case"LL":t=Je(1,2,1);break;case"MMM":t=Re(2,Ie.Abbreviated);break;case"MMMM":t=Re(2,Ie.Wide);break;case"MMMMM":t=Re(2,Ie.Narrow);break;case"LLL":t=Re(2,Ie.Abbreviated,wt.Standalone);break;case"LLLL":t=Re(2,Ie.Wide,wt.Standalone);break;case"LLLLL":t=Re(2,Ie.Narrow,wt.Standalone);break;case"w":t=Eh(1);break;case"ww":t=Eh(2);break;case"W":t=Eh(1,!0);break;case"d":t=Je(2,1);break;case"dd":t=Je(2,2);break;case"c":case"cc":t=Je(7,1);break;case"ccc":t=Re(1,Ie.Abbreviated,wt.Standalone);break;case"cccc":t=Re(1,Ie.Wide,wt.Standalone);break;case"ccccc":t=Re(1,Ie.Narrow,wt.Standalone);break;case"cccccc":t=Re(1,Ie.Short,wt.Standalone);break;case"E":case"EE":case"EEE":t=Re(1,Ie.Abbreviated);break;case"EEEE":t=Re(1,Ie.Wide);break;case"EEEEE":t=Re(1,Ie.Narrow);break;case"EEEEEE":t=Re(1,Ie.Short);break;case"a":case"aa":case"aaa":t=Re(0,Ie.Abbreviated);break;case"aaaa":t=Re(0,Ie.Wide);break;case"aaaaa":t=Re(0,Ie.Narrow);break;case"b":case"bb":case"bbb":t=Re(0,Ie.Abbreviated,wt.Standalone,!0);break;case"bbbb":t=Re(0,Ie.Wide,wt.Standalone,!0);break;case"bbbbb":t=Re(0,Ie.Narrow,wt.Standalone,!0);break;case"B":case"BB":case"BBB":t=Re(0,Ie.Abbreviated,wt.Format,!0);break;case"BBBB":t=Re(0,Ie.Wide,wt.Format,!0);break;case"BBBBB":t=Re(0,Ie.Narrow,wt.Format,!0);break;case"h":t=Je(3,1,-12);break;case"hh":t=Je(3,2,-12);break;case"H":t=Je(3,1);break;case"HH":t=Je(3,2);break;case"m":t=Je(4,1);break;case"mm":t=Je(4,2);break;case"s":t=Je(5,1);break;case"ss":t=Je(5,2);break;case"S":t=Je(6,1);break;case"SS":t=Je(6,2);break;case"SSS":t=Je(6,3);break;case"Z":case"ZZ":case"ZZZ":t=zc(0);break;case"ZZZZZ":t=zc(3);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=zc(1);break;case"OOOO":case"ZZZZ":case"zzzz":t=zc(2);break;default:return null}return Dh[n]=t,t}function rx(n,t){n=n.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(e)?t:e}function rT(n,t){return n=new Date(n.getTime()),n.setMinutes(n.getMinutes()+t),n}function oT(n,t,e){let r=n.getTimezoneOffset(),o=rx(t,r);return rT(n,-1*(o-r))}function sT(n){if(qb(n))return n;if(typeof n=="number"&&!isNaN(n))return new Date(n);if(typeof n=="string"){if(n=n.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(n)){let[r,o=1,s=1]=n.split("-").map(a=>+a);return Wc(r,o-1,s)}let e=parseFloat(n);if(!isNaN(n-e))return new Date(e);let i;if(i=n.match(ZM))return aT(i)}let t=new Date(n);if(!qb(t))throw new X(2311,!1);return t}function aT(n){let t=new Date(0),e=0,i=0,r=n[8]?t.setUTCFullYear:t.setFullYear,o=n[8]?t.setUTCHours:t.setHours;n[9]&&(e=Number(n[9]+n[10]),i=Number(n[9]+n[11])),r.call(t,Number(n[1]),Number(n[2])-1,Number(n[3]));let s=Number(n[4]||0)-e,a=Number(n[5]||0)-i,l=Number(n[6]||0),h=Math.floor(parseFloat("0."+(n[7]||0))*1e3);return o.call(t,s,a,l,h),t}function qb(n){return n instanceof Date&&!isNaN(n.valueOf())}var ia=(()=>{class n{_viewContainerRef;_viewRef=null;ngTemplateOutletContext=null;ngTemplateOutlet=null;ngTemplateOutletInjector=null;constructor(e){this._viewContainerRef=e}ngOnChanges(e){if(this._shouldRecreateView(e)){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=i.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,i,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,i,r):!1,get:(e,i,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,i,r)}})}static \u0275fac=function(i){return new(i||n)(xn(wi))};static \u0275dir=Ei({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},features:[As]})}return n})();function ox(n,t){return new X(2100,!1)}var Sh=class{createSubscription(t,e,i){return ze(()=>t.subscribe({next:e,error:i}))}dispose(t){ze(()=>t.unsubscribe())}},Mh=class{createSubscription(t,e,i){return t.then(r=>e?.(r),r=>i?.(r)),{unsubscribe:()=>{e=null,i=null}}}dispose(t){t.unsubscribe()}},lT=new Mh,cT=new Sh,Th=(()=>{class n{_ref;_latestValue=null;markForCheckOnValueUpdate=!0;_subscription=null;_obj=null;_strategy=null;applicationErrorHandler=O(mn);constructor(e){this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){if(!this._obj){if(e)try{this.markForCheckOnValueUpdate=!1,this._subscribe(e)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i),i=>this.applicationErrorHandler(i))}_selectStrategy(e){if(Hs(e))return lT;if(Oc(e))return cT;throw ox(n,e)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}static \u0275fac=function(i){return new(i||n)(xn(Bc,16))};static \u0275pipe=Pc({name:"async",type:n,pure:!1})}return n})();var dT="mediumDate",sx=new oe(""),ax=new oe(""),ra=(()=>{class n{locale;defaultTimezone;defaultOptions;constructor(e,i,r){this.locale=e,this.defaultTimezone=i,this.defaultOptions=r}transform(e,i,r,o){if(e==null||e===""||e!==e)return null;try{let s=i??this.defaultOptions?.dateFormat??dT,a=r??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return nx(e,s,o||this.locale,a)}catch(s){throw ox(n,s.message)}}static \u0275fac=function(i){return new(i||n)(xn(Zs,16),xn(sx,24),xn(ax,24))};static \u0275pipe=Pc({name:"date",type:n,pure:!0})}return n})();function oa(n,t){t=encodeURIComponent(t);for(let e of n.split(";")){let i=e.indexOf("="),[r,o]=i==-1?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}var yr=class{};var kh="browser";function lx(n){return n===kh}var sa=class{_doc;constructor(t){this._doc=t}manager},qc=(()=>{class n extends sa{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r,o){return e.addEventListener(i,r,o),()=>this.removeEventListener(e,i,r,o)}removeEventListener(e,i,r,o){return e.removeEventListener(i,r,o)}static \u0275fac=function(i){return new(i||n)(_e(mt))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),Yc=new oe(""),Nh=(()=>{class n{_zone;_plugins;_eventNameToPlugin=new Map;constructor(e,i){this._zone=i,e.forEach(s=>{s.manager=this});let r=e.filter(s=>!(s instanceof qc));this._plugins=r.slice().reverse();let o=e.find(s=>s instanceof qc);o&&this._plugins.push(o)}addEventListener(e,i,r,o){return this._findPluginFor(i).addEventListener(e,i,r,o)}getZone(){return this._zone}_findPluginFor(e){let i=this._eventNameToPlugin.get(e);if(i)return i;if(i=this._plugins.find(o=>o.supports(e)),!i)throw new X(5101,!1);return this._eventNameToPlugin.set(e,i),i}static \u0275fac=function(i){return new(i||n)(_e(Yc),_e(we))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),Ih="ng-app-id";function cx(n){for(let t of n)t.remove()}function dx(n,t){let e=t.createElement("style");return e.textContent=n,e}function fT(n,t,e,i){let r=n.head?.querySelectorAll(`style[${Ih}="${t}"],link[${Ih}="${t}"]`);if(r)for(let o of r)o.removeAttribute(Ih),o instanceof HTMLLinkElement?i.set(o.href.slice(o.href.lastIndexOf("/")+1),{usage:0,elements:[o]}):o.textContent&&e.set(o.textContent,{usage:0,elements:[o]})}function Oh(n,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",n),e}var Ah=(()=>{class n{doc;appId;nonce;inline=new Map;external=new Map;hosts=new Set;constructor(e,i,r,o={}){this.doc=e,this.appId=i,this.nonce=r,fT(e,i,this.inline,this.external),this.hosts.add(e.head)}addStyles(e,i){for(let r of e)this.addUsage(r,this.inline,dx);i?.forEach(r=>this.addUsage(r,this.external,Oh))}removeStyles(e,i){for(let r of e)this.removeUsage(r,this.inline);i?.forEach(r=>this.removeUsage(r,this.external))}addUsage(e,i,r){let o=i.get(e);o?o.usage++:i.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(e,this.doc)))})}removeUsage(e,i){let r=i.get(e);r&&(r.usage--,r.usage<=0&&(cx(r.elements),i.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])cx(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[i,{elements:r}]of this.inline)r.push(this.addElement(e,dx(i,this.doc)));for(let[i,{elements:r}]of this.external)r.push(this.addElement(e,Oh(i,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,i){return this.nonce&&i.setAttribute("nonce",this.nonce),e.appendChild(i)}static \u0275fac=function(i){return new(i||n)(_e(mt),_e(hc),_e(gc,8),_e(gr))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),Ph={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"},Lh=/%COMP%/g;var px="%COMP%",hT=`_nghost-${px}`,mT=`_ngcontent-${px}`,gT=!0,_T=new oe("",{providedIn:"root",factory:()=>gT});function vT(n){return mT.replace(Lh,n)}function bT(n){return hT.replace(Lh,n)}function fx(n,t){return t.map(e=>e.replace(Lh,n))}var Fh=(()=>{class n{eventManager;sharedStylesHost;appId;removeStylesOnCompDestroy;doc;ngZone;nonce;tracingService;rendererByCompId=new Map;defaultRenderer;platformIsServer;constructor(e,i,r,o,s,a,l=null,h=null){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.ngZone=a,this.nonce=l,this.tracingService=h,this.platformIsServer=!1,this.defaultRenderer=new aa(e,s,a,this.platformIsServer,this.tracingService)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;let r=this.getOrCreateRenderer(e,i);return r instanceof Zc?r.applyToHost(e):r instanceof la&&r.applyStyles(),r}getOrCreateRenderer(e,i){let r=this.rendererByCompId,o=r.get(i.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,h=this.sharedStylesHost,m=this.removeStylesOnCompDestroy,w=this.platformIsServer,M=this.tracingService;switch(i.encapsulation){case Gn.Emulated:o=new Zc(l,h,i,this.appId,m,s,a,w,M);break;case Gn.ShadowDom:return new Rh(l,h,e,i,s,a,this.nonce,w,M);default:o=new la(l,h,i,m,s,a,w,M);break}r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}componentReplaced(e){this.rendererByCompId.delete(e)}static \u0275fac=function(i){return new(i||n)(_e(Nh),_e(Ah),_e(hc),_e(_T),_e(mt),_e(we),_e(gc),_e(Ci,8))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),aa=class{eventManager;doc;ngZone;platformIsServer;tracingService;data=Object.create(null);throwOnSyntheticProps=!0;constructor(t,e,i,r,o){this.eventManager=t,this.doc=e,this.ngZone=i,this.platformIsServer=r,this.tracingService=o}destroy(){}destroyNode=null;createElement(t,e){return e?this.doc.createElementNS(Ph[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(ux(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(ux(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){e.remove()}selectRootElement(t,e){let i=typeof t=="string"?this.doc.querySelector(t):t;if(!i)throw new X(-5104,!1);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;let o=Ph[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){let r=Ph[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(Nn.DashCase|Nn.Important)?t.style.setProperty(e,i,r&Nn.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&Nn.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t!=null&&(t[e]=i)}setValue(t,e){t.nodeValue=e}listen(t,e,i,r){if(typeof t=="string"&&(t=Xs().getGlobalEventTarget(this.doc,t),!t))throw new X(5102,!1);let o=this.decoratePreventDefault(i);return this.tracingService?.wrapEventListener&&(o=this.tracingService.wrapEventListener(t,e,o)),this.eventManager.addEventListener(t,e,o,r)}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;t(e)===!1&&e.preventDefault()}}};function ux(n){return n.tagName==="TEMPLATE"&&n.content!==void 0}var Rh=class extends aa{sharedStylesHost;hostEl;shadowRoot;constructor(t,e,i,r,o,s,a,l,h){super(t,o,s,l,h),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let m=r.styles;m=fx(r.id,m);for(let M of m){let T=document.createElement("style");a&&T.setAttribute("nonce",a),T.textContent=M,this.shadowRoot.appendChild(T)}let w=r.getExternalStyles?.();if(w)for(let M of w){let T=Oh(M,o);a&&T.setAttribute("nonce",a),this.shadowRoot.appendChild(T)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},la=class extends aa{sharedStylesHost;removeStylesOnCompDestroy;styles;styleUrls;constructor(t,e,i,r,o,s,a,l,h){super(t,o,s,a,l),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r;let m=i.styles;this.styles=h?fx(h,m):m,this.styleUrls=i.getExternalStyles?.(h)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&bi.size===0&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},Zc=class extends la{contentAttr;hostAttr;constructor(t,e,i,r,o,s,a,l,h){let m=r+"-"+i.id;super(t,e,i,o,s,a,l,h,m),this.contentAttr=vT(m),this.hostAttr=bT(m)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}};var Qc=class n extends Ks{supportsDOMEvents=!0;static makeCurrent(){Ch(new n)}onAndCancel(t,e,i,r){return t.addEventListener(e,i,r),()=>{t.removeEventListener(e,i,r)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=xT();return e==null?null:yT(e)}resetBaseElement(){ca=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return oa(document.cookie,t)}},ca=null;function xT(){return ca=ca||document.head.querySelector("base"),ca?ca.getAttribute("href"):null}function yT(n){return new URL(n,document.baseURI).pathname}var CT=(()=>{class n{build(){return new XMLHttpRequest}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),hx=["alt","control","meta","shift"],wT={"\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"},ET={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},mx=(()=>{class n extends sa{constructor(e){super(e)}supports(e){return n.parseEventName(e)!=null}addEventListener(e,i,r,o){let s=n.parseEventName(i),a=n.eventCallback(s.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Xs().onAndCancel(e,s.domEventName,a,o))}static parseEventName(e){let i=e.toLowerCase().split("."),r=i.shift();if(i.length===0||!(r==="keydown"||r==="keyup"))return null;let o=n._normalizeKey(i.pop()),s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),hx.forEach(h=>{let m=i.indexOf(h);m>-1&&(i.splice(m,1),s+=h+".")}),s+=o,i.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=wT[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),hx.forEach(s=>{if(s!==r){let a=ET[s];a(e)&&(o+=s+".")}}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{n.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static \u0275fac=function(i){return new(i||n)(_e(mt))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})();function Vh(n,t,e){let i=H({rootComponent:n,platformRef:e?.platformRef},DT(t));return zb(i)}function DT(n){return{appProviders:[...IT,...n?.providers??[]],platformProviders:kT}}function ST(){Qc.makeCurrent()}function MT(){return new Ht}function TT(){return yf(document),document}var kT=[{provide:gr,useValue:kh},{provide:mc,useValue:ST,multi:!0},{provide:mt,useFactory:TT}];var IT=[{provide:ds,useValue:"root"},{provide:Ht,useFactory:MT},{provide:Yc,useClass:qc,multi:!0,deps:[mt]},{provide:Yc,useClass:mx,multi:!0,deps:[mt]},Fh,Ah,Nh,{provide:An,useExisting:Fh},{provide:yr,useClass:CT},[]];var wr=class{},da=class{},Mi=class n{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(t){t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(`
|
|
5
|
-
`).forEach(e=>{let i=e.indexOf(":");if(i>0){let r=e.slice(0,i),o=e.slice(i+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,i)=>{this.addHeaderEntry(i,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,i])=>{this.setHeaderEntries(e,i)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof n?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init();for(let[e,i]of t.headers.entries())this.headers.set(e,i),this.normalizedNames.set(e,t.normalizedNames.get(e))}clone(t){let e=new n;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof n?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if(typeof i=="string"&&(i=[i]),i.length===0)return;this.maybeSetNormalizedName(t.name,e);let r=t.op==="a"?(this.headers.get(e)||[]).slice():[];r.push(...i),this.headers.set(e,r);break;case"d":let o=t.value;if(o===void 0)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=Array.isArray(o)?o:[o],a=this.headers.get(e);if(!a)return;a=a.filter(l=>s.indexOf(l)===-1),a.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,a)}break}}addHeaderEntry(t,e){let i=t.toLowerCase();this.maybeSetNormalizedName(t,i),this.headers.has(i)?this.headers.get(i).push(e):this.headers.set(i,[e])}setHeaderEntries(t,e){let i=(Array.isArray(e)?e:[e]).map(o=>o.toString()),r=t.toLowerCase();this.headers.set(r,i),this.maybeSetNormalizedName(t,r)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var Xc=class{encodeKey(t){return gx(t)}encodeValue(t){return gx(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function PT(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}var OT=/%(\d[a-f0-9])/gi,RT={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function gx(n){return encodeURIComponent(n).replace(OT,(t,e)=>RT[e]??t)}function Kc(n){return`${n}`}var ut=class n{map;encoder;updates=null;cloneFrom=null;constructor(t={}){if(this.encoder=t.encoder||new Xc,t.fromString){if(t.fromObject)throw new X(2805,!1);this.map=PT(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let i=t.fromObject[e],r=Array.isArray(i)?i.map(Kc):[Kc(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(i=>{let r=t[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new n({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){if(this.map===null&&(this.map=new Map),this.cloneFrom!==null){this.cloneFrom.init();for(let[t,e]of this.cloneFrom.map.entries())this.map.set(t,e);this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=t.op==="a"?(this.map.get(t.param)||[]).slice():[];e.push(Kc(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let i=(this.map.get(t.param)||[]).slice(),r=i.indexOf(Kc(t.value));r!==-1&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null}}};var Jc=class{map=new Map;set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function NT(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function _x(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function vx(n){return typeof Blob<"u"&&n instanceof Blob}function bx(n){return typeof FormData<"u"&&n instanceof FormData}function AT(n){return typeof URLSearchParams<"u"&&n instanceof URLSearchParams}var xx="Content-Type",yx="Accept",Cx="X-Request-URL",wx="text/plain",Ex="application/json",LT=`${Ex}, ${wx}, */*`,wo=class n{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(t,e,i,r){this.url=e,this.method=t.toUpperCase();let o;if(NT(this.method)||r?(this.body=i!==void 0?i:null,o=r):o=i,o){if(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,this.keepalive=!!o.keepalive,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),o.priority&&(this.priority=o.priority),o.cache&&(this.cache=o.cache),o.credentials&&(this.credentials=o.credentials),typeof o.timeout=="number"){if(o.timeout<1||!Number.isInteger(o.timeout))throw new X(2822,"");this.timeout=o.timeout}o.mode&&(this.mode=o.mode),o.redirect&&(this.redirect=o.redirect),o.integrity&&(this.integrity=o.integrity),o.referrer!==void 0&&(this.referrer=o.referrer),this.transferCache=o.transferCache}if(this.headers??=new Mi,this.context??=new Jc,!this.params)this.params=new ut,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let a=e.indexOf("?"),l=a===-1?"?":a<e.length-1?"&":"";this.urlWithParams=e+l+s}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||_x(this.body)||vx(this.body)||bx(this.body)||AT(this.body)?this.body:this.body instanceof ut?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||bx(this.body)?null:vx(this.body)?this.body.type||null:_x(this.body)?null:typeof this.body=="string"?wx:this.body instanceof ut?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Ex:null}clone(t={}){let e=t.method||this.method,i=t.url||this.url,r=t.responseType||this.responseType,o=t.keepalive??this.keepalive,s=t.priority||this.priority,a=t.cache||this.cache,l=t.mode||this.mode,h=t.redirect||this.redirect,m=t.credentials||this.credentials,w=t.referrer??this.referrer,M=t.integrity||this.integrity,T=t.transferCache??this.transferCache,A=t.timeout??this.timeout,z=t.body!==void 0?t.body:this.body,Q=t.withCredentials??this.withCredentials,U=t.reportProgress??this.reportProgress,be=t.headers||this.headers,qt=t.params||this.params,je=t.context??this.context;return t.setHeaders!==void 0&&(be=Object.keys(t.setHeaders).reduce((ht,lt)=>ht.set(lt,t.setHeaders[lt]),be)),t.setParams&&(qt=Object.keys(t.setParams).reduce((ht,lt)=>ht.set(lt,t.setParams[lt]),qt)),new n(e,i,z,{params:qt,headers:be,context:je,reportProgress:U,responseType:r,withCredentials:Q,transferCache:T,keepalive:o,cache:a,priority:s,timeout:A,mode:l,redirect:h,credentials:m,referrer:w,integrity:M})}},Cr=(function(n){return n[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",n})(Cr||{}),Do=class{headers;status;statusText;url;ok;type;redirected;constructor(t,e=200,i="OK"){this.headers=t.headers||new Mi,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.redirected=t.redirected,this.ok=this.status>=200&&this.status<300}},ed=class n extends Do{constructor(t={}){super(t)}type=Cr.ResponseHeader;clone(t={}){return new n({headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},ua=class n extends Do{body;constructor(t={}){super(t),this.body=t.body!==void 0?t.body:null}type=Cr.Response;clone(t={}){return new n({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0,redirected:t.redirected??this.redirected})}},Eo=class extends Do{name="HttpErrorResponse";message;error;ok=!1;constructor(t){super(t,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${t.url||"(unknown url)"}`:this.message=`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}},FT=200,VT=204;function Bh(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials,credentials:n.credentials,transferCache:n.transferCache,timeout:n.timeout,keepalive:n.keepalive,priority:n.priority,cache:n.cache,mode:n.mode,redirect:n.redirect,integrity:n.integrity,referrer:n.referrer}}var So=(()=>{class n{handler;constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof wo)o=e;else{let l;r.headers instanceof Mi?l=r.headers:l=new Mi(r.headers);let h;r.params&&(r.params instanceof ut?h=r.params:h=new ut({fromObject:r.params})),o=new wo(e,i,r.body!==void 0?r.body:null,{headers:l,context:r.context,params:h,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials,transferCache:r.transferCache,keepalive:r.keepalive,priority:r.priority,cache:r.cache,mode:r.mode,redirect:r.redirect,credentials:r.credentials,referrer:r.referrer,integrity:r.integrity,timeout:r.timeout})}let s=Ee(o).pipe(wu(l=>this.handler.handle(l)));if(e instanceof wo||r.observe==="events")return s;let a=s.pipe(ts(l=>l instanceof ua));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(Oe(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new X(2806,!1);return l.body}));case"blob":return a.pipe(Oe(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new X(2807,!1);return l.body}));case"text":return a.pipe(Oe(l=>{if(l.body!==null&&typeof l.body!="string")throw new X(2808,!1);return l.body}));default:return a.pipe(Oe(l=>l.body))}case"response":return a;default:throw new X(2809,!1)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:new ut().append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,Bh(r,i))}post(e,i,r={}){return this.request("POST",e,Bh(r,i))}put(e,i,r={}){return this.request("PUT",e,Bh(r,i))}static \u0275fac=function(i){return new(i||n)(_e(wr))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})();var BT=new oe("");function jT(n,t){return t(n)}function $T(n,t,e){return(i,r)=>eo(e,()=>t(i,o=>n(o,r)))}var $h=new oe(""),Dx=new oe(""),Sx=new oe("",{providedIn:"root",factory:()=>!0});var td=(()=>{class n extends wr{backend;injector;chain=null;pendingTasks=O(ao);contributeToStability=O(Sx);constructor(e,i){super(),this.backend=e,this.injector=i}handle(e){if(this.chain===null){let i=this.injector.get(wr,null,{skipSelf:!0}),r=i!==null&&this.backend===i,o=this.injector.get(Dx,[],r?{self:!0}:void 0),s=Array.from(new Set([...this.injector.get($h),...o]));this.chain=s.reduceRight((a,l)=>$T(a,l,this.injector),jT)}if(this.contributeToStability){let i=this.pendingTasks.add();return this.chain(e,r=>this.backend.handle(r)).pipe(ci(i))}else return this.chain(e,i=>this.backend.handle(i))}static \u0275fac=function(i){return new(i||n)(_e(da),_e(Ft))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})();var HT=/^\)\]\}',?\n/,zT=RegExp(`^${Cx}:`,"m");function UT(n){return"responseURL"in n&&n.responseURL?n.responseURL:zT.test(n.getAllResponseHeaders())?n.getResponseHeader(Cx):null}var jh=(()=>{class n{xhrFactory;constructor(e){this.xhrFactory=e}handle(e){if(e.method==="JSONP")throw new X(-2800,!1);let i=this.xhrFactory;return Ee(null).pipe(St(()=>new pe(o=>{let s=i.build();if(s.open(e.method,e.urlWithParams),e.withCredentials&&(s.withCredentials=!0),e.headers.forEach((Q,U)=>s.setRequestHeader(Q,U.join(","))),e.headers.has(yx)||s.setRequestHeader(yx,LT),!e.headers.has(xx)){let Q=e.detectContentTypeHeader();Q!==null&&s.setRequestHeader(xx,Q)}if(e.timeout&&(s.timeout=e.timeout),e.responseType){let Q=e.responseType.toLowerCase();s.responseType=Q!=="json"?Q:"text"}let a=e.serializeBody(),l=null,h=()=>{if(l!==null)return l;let Q=s.statusText||"OK",U=new Mi(s.getAllResponseHeaders()),be=UT(s)||e.url;return l=new ed({headers:U,status:s.status,statusText:Q,url:be}),l},m=()=>{let{headers:Q,status:U,statusText:be,url:qt}=h(),je=null;U!==VT&&(je=typeof s.response>"u"?s.responseText:s.response),U===0&&(U=je?FT:0);let ht=U>=200&&U<300;if(e.responseType==="json"&&typeof je=="string"){let lt=je;je=je.replace(HT,"");try{je=je!==""?JSON.parse(je):null}catch(Zt){je=lt,ht&&(ht=!1,je={error:Zt,text:je})}}ht?(o.next(new ua({body:je,headers:Q,status:U,statusText:be,url:qt||void 0})),o.complete()):o.error(new Eo({error:je,headers:Q,status:U,statusText:be,url:qt||void 0}))},w=Q=>{let{url:U}=h(),be=new Eo({error:Q,status:s.status||0,statusText:s.statusText||"Unknown Error",url:U||void 0});o.error(be)},M=w;e.timeout&&(M=Q=>{let{url:U}=h(),be=new Eo({error:new DOMException("Request timed out","TimeoutError"),status:s.status||0,statusText:s.statusText||"Request timeout",url:U||void 0});o.error(be)});let T=!1,A=Q=>{T||(o.next(h()),T=!0);let U={type:Cr.DownloadProgress,loaded:Q.loaded};Q.lengthComputable&&(U.total=Q.total),e.responseType==="text"&&s.responseText&&(U.partialText=s.responseText),o.next(U)},z=Q=>{let U={type:Cr.UploadProgress,loaded:Q.loaded};Q.lengthComputable&&(U.total=Q.total),o.next(U)};return s.addEventListener("load",m),s.addEventListener("error",w),s.addEventListener("timeout",M),s.addEventListener("abort",w),e.reportProgress&&(s.addEventListener("progress",A),a!==null&&s.upload&&s.upload.addEventListener("progress",z)),s.send(a),o.next({type:Cr.Sent}),()=>{s.removeEventListener("error",w),s.removeEventListener("abort",w),s.removeEventListener("load",m),s.removeEventListener("timeout",M),e.reportProgress&&(s.removeEventListener("progress",A),a!==null&&s.upload&&s.upload.removeEventListener("progress",z)),s.readyState!==s.DONE&&s.abort()}})))}static \u0275fac=function(i){return new(i||n)(_e(yr))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),Mx=new oe(""),GT="XSRF-TOKEN",WT=new oe("",{providedIn:"root",factory:()=>GT}),qT="X-XSRF-TOKEN",ZT=new oe("",{providedIn:"root",factory:()=>qT}),pa=class{},YT=(()=>{class n{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(e,i){this.doc=e,this.cookieName=i}getToken(){let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=oa(e,this.cookieName),this.lastCookieString=e),this.lastToken}static \u0275fac=function(i){return new(i||n)(_e(mt),_e(WT))};static \u0275prov=ce({token:n,factory:n.\u0275fac})}return n})(),QT=/^(?:https?:)?\/\//i;function KT(n,t){if(!O(Mx)||n.method==="GET"||n.method==="HEAD"||QT.test(n.url))return t(n);let e=O(pa).getToken(),i=O(ZT);return e!=null&&!n.headers.has(i)&&(n=n.clone({headers:n.headers.set(i,e)})),t(n)}var Hh=(function(n){return n[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",n[n.Fetch=6]="Fetch",n})(Hh||{});function XT(n,t){return{\u0275kind:n,\u0275providers:t}}function zh(...n){let t=[So,jh,td,{provide:wr,useExisting:td},{provide:da,useFactory:()=>O(BT,{optional:!0})??O(jh)},{provide:$h,useValue:KT,multi:!0},{provide:Mx,useValue:!0},{provide:pa,useClass:YT}];for(let e of n)t.push(...e.\u0275providers);return cs(t)}function Uh(n){return XT(Hh.Interceptors,n.map(t=>({provide:$h,useValue:t,multi:!0})))}var Tx="guitoToken";function kx(){return new URLSearchParams(window.location.search).get(Tx)??""}var Ix=(n,t)=>{let e=kx();return!e||!n.url.startsWith("/api")?t(n):t(n.clone({setHeaders:{"X-Guito-Token":e}}))};function Px(n){let t=new URL(n,window.location.origin),e=kx();return e&&t.searchParams.set(Tx,e),t.toString()}var Ox={providers:[ph({eventCoalescing:!0}),zh(Uh([Ix]))]};function JT(n,t){if(n&1){let e=I();b(0,"button",11),F("click",function(){g(e);let r=d(2);return _(r.retry.emit())}),f(1),y()}if(n&2){let e=d(2);G("disabled",e.busy()),c(),P(e.retryLabel())}}function ek(n,t){if(n&1){let e=I();b(0,"div",1),F("animationend",function(r){g(e);let o=d();return _(o.finishDismiss(r))}),B(),b(1,"svg",2),ee(2,"circle",3)(3,"path",4)(4,"circle",5),y(),fe(),b(5,"div",6)(6,"p"),f(7),y(),E(8,JT,2,2,"button",7),y(),b(9,"button",8),F("click",function(){g(e);let r=d();return _(r.dismiss())}),B(),b(10,"svg",9),ee(11,"path",10),y()()()}if(n&2){let e=d();te("closing",e.closing()),c(7),P(e.message()),c(),D(e.retryLabel()?8:-1)}}var pt=class n{message=N.required();retryLabel=N("");busy=N(!1);retry=W();dismissed=v(!1);closing=v(!1);constructor(){ge(()=>{this.message(),this.busy(),this.closing.set(!1),this.dismissed.set(!1)})}dismiss(){if(typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches){this.dismissed.set(!0);return}this.closing.set(!0)}finishDismiss(t){t.target!==t.currentTarget||!this.closing()||this.dismissed.set(!0)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-error-banner"]],inputs:{message:[1,"message"],retryLabel:[1,"retryLabel"],busy:[1,"busy"]},outputs:{retry:"retry"},decls:1,vars:1,consts:[["role","alert",1,"error-banner",3,"closing"],["role","alert",1,"error-banner",3,"animationend"],["viewBox","0 0 20 20","fill","none","aria-hidden","true",1,"error-icon"],["cx","10","cy","10","r","7.5"],["d","M10 6v4.5","stroke-linecap","round"],["cx","10","cy","13.5","r",".8","fill","currentColor","stroke","none"],[1,"error-content"],["type","button",1,"retry",3,"disabled"],["type","button","aria-label","Dismiss error","title","Dismiss error",1,"close",3,"click"],["viewBox","0 0 16 16","fill","none","aria-hidden","true"],["d","m4 4 8 8M12 4l-8 8"],["type","button",1,"retry",3,"click","disabled"]],template:function(e,i){e&1&&E(0,ek,12,4,"div",0),e&2&&D(i.message()&&!i.dismissed()?0:-1)},styles:["[_nghost-%COMP%]{display:block;flex:none;min-width:0}.error-banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;margin:8px 12px;padding:10px 12px;border:1px solid #683d38;border-left:3px solid #f48771;border-radius:6px;background:color-mix(in srgb,var(--bg-alt) 88%,#f48771);color:var(--text-bright);font-size:12px;line-height:1.5;animation:_ngcontent-%COMP%_error-banner-enter .12s ease-out}.error-banner.closing[_ngcontent-%COMP%]{pointer-events:none;animation:_ngcontent-%COMP%_error-banner-leave .1s ease-in forwards}.error-icon[_ngcontent-%COMP%]{width:20px;height:20px;flex:none;color:#f48771;stroke:currentColor;stroke-width:1.5}.error-content[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}p[_ngcontent-%COMP%]{flex:1 1 220px;min-width:0;margin:0;white-space:pre-wrap;overflow-wrap:anywhere;max-height:180px;overflow-y:auto}button[_ngcontent-%COMP%]{font:inherit;cursor:pointer;border-radius:4px;transition:background .12s}.retry[_ngcontent-%COMP%]{flex:none;padding:3px 10px;border:1px solid #89554c;background:transparent;color:#ffc0b2}.retry[_ngcontent-%COMP%]:hover:not(:disabled){background:#f4877120}.retry[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.close[_ngcontent-%COMP%]{display:grid;place-items:center;flex:none;width:26px;height:26px;margin:-3px -5px -3px 0;border:0;background:transparent;color:#e0b1a7}.close[_ngcontent-%COMP%]:hover{background:#f4877126;color:#fff}.close[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:14px;height:14px;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}button[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}@keyframes _ngcontent-%COMP%_error-banner-enter{0%{opacity:0}}@keyframes _ngcontent-%COMP%_error-banner-leave{to{opacity:0}}@media(prefers-reduced-motion:reduce){.error-banner[_ngcontent-%COMP%], .error-banner.closing[_ngcontent-%COMP%]{animation:none}button[_ngcontent-%COMP%]{transition:none}}"],changeDetection:0})};var nd=class n{http=O(So);cache=new Map;empty=Ee(null);get(t){let e=t.trim().toLowerCase();if(!e)return this.empty;let i=this.cache.get(e);if(i&&i.expires>Date.now())return i.image;this.cache.size>=500&&this.cache.delete(this.cache.keys().next().value);let r=this.http.get("/api/avatar",{params:{email:e},responseType:"blob"}).pipe(St(o=>o.size?new pe(s=>{let a=new FileReader;return a.onload=()=>{s.next(String(a.result)),s.complete()},a.onerror=()=>s.error(a.error),a.readAsDataURL(o),()=>{a.readyState===FileReader.LOADING&&a.abort()}}):this.empty),ct(()=>this.empty),Qr({bufferSize:1,refCount:!1}));return this.cache.set(e,{expires:Date.now()+36e5,image:r}),r}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})};function tk(n,t){n&1&&ee(0,"img",0),n&2&&G("src",t,_r)}function nk(n,t){if(n&1&&(b(0,"span",1),f(1),y()),n&2){let e=d();c(),P(e.initials())}}var Fn=class n{name=N("");email=N("");avatars=O(nd);initials(){return this.name().trim().split(/\s+/).slice(0,2).map(t=>t[0]??"").join("").toUpperCase()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-author-avatar"]],inputs:{name:[1,"name"],email:[1,"email"]},decls:3,vars:3,consts:[["alt","","width","24","height","24",3,"src"],["aria-hidden","true"]],template:function(e,i){if(e&1&&(E(0,tk,1,1,"img",0),Si(1,"async"),Us(2,nk,2,1,"span",1)),e&2){let r;D((r=dh(1,1,i.avatars.get(i.email())))?0:2,r)}},dependencies:[Th],styles:["[_nghost-%COMP%]{display:inline-flex;width:24px;height:24px;flex:0 0 24px;vertical-align:middle;border-radius:50%;overflow:hidden;background:#36516b}img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover}span[_ngcontent-%COMP%]{margin:auto;color:#fff;font-size:10px;line-height:24px}"],changeDetection:0})};function ik(n,t){if(n&1&&(b(0,"mark",1),f(1),y()),n&2){let e=d(2).$implicit;c(),P(e.text)}}function rk(n,t){if(n&1&&f(0),n&2){let e=d(2).$implicit;$(" ",e.text," ")}}function ok(n,t){if(n&1){let e=I();b(0,"a",2),F("click",function(r){return g(e),_(r.stopPropagation())}),E(1,ik,2,1,"mark",1)(2,rk,1,1),y()}if(n&2){let e=d().$implicit;G("href",e.href,_r),c(),D(e.match?1:2)}}function sk(n,t){if(n&1&&(b(0,"mark",1),f(1),y()),n&2){let e=d().$implicit;c(),P(e.text)}}function ak(n,t){if(n&1&&f(0),n&2){let e=d().$implicit;$(" ",e.text," ")}}function lk(n,t){if(n&1&&E(0,ok,3,2,"a",0)(1,sk,2,1,"mark",1)(2,ak,1,1),n&2){let e=t.$implicit;D(e.href?0:e.match?1:2)}}var Mo=class n{text=N("");search=N("");linking=N(null);segments=R(()=>{let t=this.text(),e=this.linking(),i=[];if(!e)i.push({text:t});else try{let o=new RegExp(e.regex,"g"),s=0;for(let a of t.matchAll(o)){let l=a.index??0;l>s&&i.push({text:t.slice(s,l)});let h=e.url.replace(/\$(\d+)/g,(m,w)=>a[Number(w)]??"");if(i.push(H({text:a[0]},/^https?:\/\//i.test(h)?{href:h}:{})),s=l+a[0].length,a[0].length===0)break}s<t.length&&i.push({text:t.slice(s)})}catch{i.push({text:t})}let r=this.search().trim().toLowerCase();return r?i.flatMap(o=>{let s=[],a=o.text.toLowerCase(),l=0;for(;l<o.text.length;){let h=a.indexOf(r,l);if(h===-1){s.push(re(H({},o),{text:o.text.slice(l),match:!1}));break}h>l&&s.push(re(H({},o),{text:o.text.slice(l,h),match:!1})),s.push(re(H({},o),{text:o.text.slice(h,h+r.length),match:!0})),l=h+r.length}return s}):i.map(o=>re(H({},o),{match:!1}))});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-issue-text"]],inputs:{text:[1,"text"],search:[1,"search"],linking:[1,"linking"]},decls:2,vars:0,consts:[["target","_blank","rel","noopener noreferrer",3,"href"],[1,"hl"],["target","_blank","rel","noopener noreferrer",3,"click","href"]],template:function(e,i){e&1&&Z(0,lk,3,1,null,null,qn),e&2&&Y(i.segments())},styles:["[_nghost-%COMP%]{display:contents}a[_ngcontent-%COMP%]{color:var(--accent);text-decoration:none}a[_ngcontent-%COMP%]:hover{text-decoration:underline}.hl[_ngcontent-%COMP%]{padding:0;color:inherit;background:#eac22c59}"],changeDetection:0})};var Cn="__working__",Ti=[{value:"",label:"Default"},{value:"opus",label:"Opus (latest)"},{value:"sonnet",label:"Sonnet (latest)"},{value:"haiku",label:"Haiku (latest)"}],id=[{value:"haiku",label:"Haiku (latest)"},{value:"sonnet",label:"Sonnet (latest)"},{value:"opus",label:"Opus (latest)"}];var et=class n{http=O(So);base="/api";mutating=v(!1);mutate(t){return Cu(()=>this.mutating()?xu(()=>({status:400,error:{error:"Another Git operation is in progress."}})):(this.mutating.set(!0),t().pipe(ci(()=>this.mutating.set(!1)))))}getRepositoryState(){return this.http.get(`${this.base}/repository-state`)}getRepoInfo(){return this.http.get(`${this.base}/repo`)}getCommits(t,e=0){let i=new ut;return t!==void 0&&(i=i.set("limit",String(t))),e>0&&(i=i.set("skip",String(e))),this.http.get(`${this.base}/commits`,{params:i})}searchCommits(t,e=!1){let i=new ut().set("query",t);return e&&(i=i.set("caseSensitive","1")),this.http.get(`${this.base}/commits/search`,{params:i})}getCommitDetail(t){return this.http.post(`${this.base}/commit/detail`,{hash:t})}getAllBranches(){return this.http.get(`${this.base}/branches/all`)}getCommitDiff(t){return this.http.post(`${this.base}/commit/diff`,{hash:t})}getWorkingChanges(){return this.http.get(`${this.base}/working-changes`)}getConflict(t){return this.http.get(`${this.base}/conflict`,{params:new ut().set("path",t)})}resolveConflict(t,e,i){return this.mutate(()=>this.http.post(`${this.base}/conflict/resolve`,{path:t,resolution:e,content:i}))}getFileContent(t,e){return this.http.post(`${this.base}/file-content`,{path:t,ref:e})}fetch(t=!1){let e=t?new ut().set("prune","1"):void 0;return this.mutate(()=>this.http.get(`${this.base}/fetch`,{params:e}))}pull(t){return this.mutate(()=>this.http.post(`${this.base}/pull`,{remote:t?.remote,branch:t?.branch,mode:t?.mode}))}push(t=!1){return this.mutate(()=>this.http.post(`${this.base}/push`,{force:t}))}sync(){return this.mutate(()=>this.http.post(`${this.base}/sync`,{}))}checkoutRef(t){return this.mutate(()=>this.http.post(`${this.base}/checkout`,t))}revertCommit(t){return this.mutate(()=>this.http.post(`${this.base}/revert`,t))}cherryPick(t){return this.mutate(()=>this.http.post(`${this.base}/cherry-pick`,t))}dropCommit(t){return this.mutate(()=>this.http.post(`${this.base}/commit/drop`,{commit:t}))}resetToCommit(t,e="soft"){return this.mutate(()=>this.http.post(`${this.base}/reset-commit`,{commit:t,mode:e}))}commit(t,e){return this.mutate(()=>this.http.post(`${this.base}/commit`,{message:t,description:e}))}generateCommitMessage(t=""){return this.http.post(`${this.base}/commit-message`,{model:t})}stage(t){return this.mutate(()=>this.http.post(`${this.base}/stage`,{files:t}))}unstage(t){return this.mutate(()=>this.http.post(`${this.base}/unstage`,{files:t}))}discard(t,e){return this.mutate(()=>this.http.post(`${this.base}/discard`,{files:t,mode:e}))}resetWorking(){return this.mutate(()=>this.http.post(`${this.base}/reset`,{}))}cleanUntracked(){return this.mutate(()=>this.http.post(`${this.base}/clean`,{}))}stashSave(t){return this.mutate(()=>this.http.post(`${this.base}/stash/save`,t))}getStashes(){return this.http.get(`${this.base}/stash/list`).pipe(Oe(t=>(t.all??[]).map((e,i)=>({index:i,hash:e.hash,message:e.message,date:e.date,author_name:e.author_name,author_email:e.author_email}))))}stashApply(t,e=!1){return this.mutate(()=>this.http.post(`${this.base}/stash/apply`,{index:t,restoreIndex:e}))}stashPop(t,e=!1){return this.mutate(()=>this.http.post(`${this.base}/stash/pop`,{index:t,restoreIndex:e}))}stashDrop(t){return this.mutate(()=>this.http.post(`${this.base}/stash/drop`,{index:t}))}getWorktrees(){return this.http.get(`${this.base}/worktrees`)}createWorktree(t,e){return this.mutate(()=>this.http.post(`${this.base}/worktrees`,{path:t,branch:e}))}removeWorktree(t){return this.mutate(()=>this.http.post(`${this.base}/worktrees/remove`,{path:t}))}getTags(){return this.http.get(`${this.base}/tags`)}createBranch(t){return this.mutate(()=>this.http.post(`${this.base}/branch/create`,t))}deleteBranch(t){return this.mutate(()=>this.http.post(`${this.base}/branch/delete`,t))}deleteRemoteBranch(t,e){return this.mutate(()=>this.http.post(`${this.base}/branch/delete-remote`,{remote:t,branch:e}))}renameBranch(t){return this.mutate(()=>this.http.post(`${this.base}/branch/rename`,t))}mergeRef(t){return this.mutate(()=>this.http.post(`${this.base}/merge`,t))}rebaseRef(t){return this.mutate(()=>this.http.post(`${this.base}/rebase`,t))}createTag(t){return this.mutate(()=>this.http.post(`${this.base}/tag/create`,t))}deleteTag(t){return this.mutate(()=>this.http.post(`${this.base}/tag/delete`,t))}pushTag(t){return this.mutate(()=>this.http.post(`${this.base}/tag/push`,t))}getSettings(){return this.http.get(`${this.base}/settings`)}saveSettings(t){return this.http.post(`${this.base}/settings`,t)}getRemotes(){return this.http.get(`${this.base}/remotes`)}saveIdentity(t){return this.http.post(`${this.base}/identity`,t)}removeIdentity(){return this.http.delete(`${this.base}/identity`)}saveRemote(t){return this.http.post(`${this.base}/remotes`,t)}removeRemote(t){return this.http.delete(`${this.base}/remotes/${encodeURIComponent(t)}`)}createPr(t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequest`,t))}searchReviewers(t){return this.http.get(`${this.base}/azure-devops/reviewers`,{params:new ut().set("query",t)}).pipe(Oe(e=>e.reviewers))}searchWorkItems(t){return this.http.get(`${this.base}/azure-devops/workitems`,{params:new ut().set("query",t)}).pipe(Oe(e=>e.workItems))}getPrTags(){return this.http.get(`${this.base}/azure-devops/tags`).pipe(Oe(t=>t.tags.map(e=>({name:e}))))}getAzureMe(){return this.http.get(`${this.base}/azure-devops/me`)}getMyPullRequests(t="active"){let e=new ut().set("status",t);return this.http.get(`${this.base}/azure-devops/pullrequests`,{params:e}).pipe(Oe(i=>i.pullRequests))}getPrDetail(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}`)}updatePr(t,e){return this.mutate(()=>this.http.patch(`${this.base}/azure-devops/pullrequests/${t}`,e))}votePr(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/vote`,{vote:e}))}updatePrReviewer(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/reviewers`,e))}setPrAutoComplete(t,e,i){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/autocomplete`,H({enabled:e},i)))}completePr(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/complete`,e??{}))}getPrThreads(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/threads`).pipe(Oe(e=>e.threads))}addPrComment(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/threads`,e))}setPrThreadStatus(t,e,i){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/threads/${e}/status`,{status:i}))}getPrChanges(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/changes`).pipe(Oe(e=>e.files))}getPrFileDiff(t,e){let i=new ut().set("path",e.path).set("oldPath",e.oldPath||"").set("changeType",e.changeType);return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/file-diff`,{params:i})}getPrWorkItems(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/workitems`).pipe(Oe(e=>e.workItems))}addPrTag(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/labels`,{name:e}))}removePrTag(t,e){return this.mutate(()=>this.http.delete(`${this.base}/azure-devops/pullrequests/${t}/labels/${encodeURIComponent(e)}`))}linkPrWorkItem(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/workitems`,{id:e}))}unlinkPrWorkItem(t,e){return this.mutate(()=>this.http.delete(`${this.base}/azure-devops/pullrequests/${t}/workitems/${e}`))}getPrChecks(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/checks`)}requeuePrCheck(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/checks/${encodeURIComponent(e)}/requeue`,{}))}abandonPr(t){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/abandon`,{}))}getAiReviewOverview(){return this.http.get(`${this.base}/azure-devops/ai-review`)}pollAiReviews(){return this.http.post(`${this.base}/azure-devops/ai-review/poll`,{}).pipe(Oe(t=>t.reviewed))}getAiReview(t){return this.http.get(`${this.base}/azure-devops/pullrequests/${t}/ai-review`).pipe(Oe(e=>e.state))}runAiReview(t,e=!1,i=""){return this.http.post(`${this.base}/azure-devops/pullrequests/${t}/ai-review`,{force:e,model:i}).pipe(Oe(r=>r.state))}postAiReviewFindings(t,e){return this.mutate(()=>this.http.post(`${this.base}/azure-devops/pullrequests/${t}/ai-review/post`,{findingIds:e}).pipe(Oe(i=>i.state)))}dismissAiReviewFindings(t,e){return this.http.post(`${this.base}/azure-devops/pullrequests/${t}/ai-review/dismiss`,{findingIds:e}).pipe(Oe(i=>i.state))}resetAiReview(t){return this.http.delete(`${this.base}/azure-devops/pullrequests/${t}/ai-review`)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})};var sn=class n{git=O(et);inVsCode=typeof window<"u"&&window.parent!==window;diffViewer=v("vscode");settingsVersion=v(0);folderRequest=0;folderResolvers=new Map;canPickFolder=this.inVsCode;constructor(){this.inVsCode&&(window.addEventListener("message",t=>{let e=t.data;if(e?.type==="guito/config"&&((e.diffViewer==="guito"||e.diffViewer==="vscode")&&this.diffViewer.set(e.diffViewer),this.settingsVersion.update(i=>i+1)),e?.type==="guito/folderSelected"&&typeof e.requestId=="number"){let i=this.folderResolvers.get(e.requestId);i&&(this.folderResolvers.delete(e.requestId),i(typeof e.path=="string"&&e.path?e.path:null))}}),this.git.getSettings().subscribe({next:t=>{t.diffViewer&&this.diffViewer.set(t.diffViewer)},error:()=>{}}))}pickFolder(){if(!this.inVsCode)return Promise.resolve(null);let t=++this.folderRequest;return window.parent.postMessage({type:"guito/pickFolder",requestId:t},"*"),new Promise(e=>this.folderResolvers.set(t,e))}openSettings(){return this.inVsCode?(window.parent.postMessage({type:"guito/openSettings"},"*"),!0):!1}openExternal(t){if(this.inVsCode){window.parent.postMessage({type:"guito/openExternal",url:t},"*");return}window.open(t,"_blank","noopener")}canOpenFile(){return this.inVsCode}canOpenRepository(){return this.inVsCode}switchRepository(t){return this.requestRepository(t,"switch")}openRepository(t){return this.requestRepository(t,"tab")}openRepositoryWindow(t){return this.requestRepository(t,"window")}requestRepository(t,e){return this.inVsCode?(window.parent.postMessage({type:"guito/openRepository",path:t,disposition:e},"*"),!0):!1}openFile(t){return this.inVsCode?(window.parent.postMessage({type:"guito/openFile",path:t},"*"),!0):!1}openMergeConflict(t){return this.inVsCode?(window.parent.postMessage({type:"guito/openMergeConflict",path:t},"*"),!0):!1}openDiff(t,e,i,r=!1){if(!this.inVsCode||this.diffViewer()!=="vscode"||t.status==="binary")return!1;let o=!r&&t.status==="added"&&!t.oldPath?"EMPTY":e;return window.parent.postMessage({type:"guito/openDiff",path:t.path,oldPath:t.oldPath,status:t.status,originalRef:o,modifiedRef:i,exactOriginal:r},"*"),!0}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})};var ck=(n,t)=>n.name.toLowerCase().localeCompare(t.name.toLowerCase()),Rx=n=>n.split("/").pop()??n,dk=(n,t)=>Rx(n.path).toLowerCase().localeCompare(Rx(t.path).toLowerCase());function To(n,t){let e={name:"",dirs:new Map,files:[],additions:0,deletions:0};for(let o of n){let s=o.path.split("/").filter(Boolean),a=e;for(let l of s.slice(0,-1)){let h=a.dirs.get(l);h||(h={name:l,dirs:new Map,files:[],additions:0,deletions:0},a.dirs.set(l,h)),h.additions+=o.additions??0,h.deletions+=o.deletions??0,a=h}a.files.push(o)}let i=[],r=(o,s,a)=>{for(let l of[...o.dirs.values()].sort(ck)){let h=s?`${s}/${l.name}`:l.name,m=t.has(h);i.push({kind:"dir",path:h,name:l.name,depth:a,collapsed:m,additions:l.additions,deletions:l.deletions}),m||r(l,h,a+1)}for(let l of[...o.files].sort(dk))i.push({kind:"file",path:l.path,name:l.path.split("/").pop()??l.path,depth:a,file:l})};return r(e,"",0),i}var ko=class n{loading=null;load(){return this.loading||(this.loading=new Promise((t,e)=>{let i=window;if(i.monaco){t(i.monaco);return}let r=document.createElement("script");r.src="vs/loader.js",r.async=!0,r.onload=()=>{let o=i.require;if(!o){e(new Error("Monaco AMD loader not found."));return}o.config({paths:{vs:"vs"}}),o(["vs/editor/editor.main"],()=>{this.applyTheme(i.monaco),t(i.monaco)})},r.onerror=()=>{this.loading=null,e(new Error("Failed to load the Monaco editor."))},document.head.appendChild(r)})),this.loading}applyTheme(t){t.editor.defineTheme("guito",{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#1e1e1e","editor.foreground":"#cccccc","editorGutter.background":"#1e1e1e","editorLineNumber.foreground":"#5a5a5a","editorLineNumber.activeForeground":"#cccccc","diffEditor.insertedTextBackground":"#89d18526","diffEditor.removedTextBackground":"#f4877126","diffEditor.insertedLineBackground":"#89d1851a","diffEditor.removedLineBackground":"#f487711a","scrollbarSlider.background":"#4a4a4a80","scrollbarSlider.hoverBackground":"#5a5a5a99","editorWidget.background":"#232323","editorWidget.border":"#3c3c3c","editorSuggestWidget.background":"#232323"}})}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})};var uk=["host"];function pk(n,t){if(n&1&&(u(0,"span",6),f(1),p()),n&2){let e=d();c(),$("+",e.file().additions)}}function fk(n,t){if(n&1&&(u(0,"span",7),f(1),p()),n&2){let e=d();c(),$("\u2212",e.file().deletions)}}function hk(n,t){n&1&&(B(),j(0,"line",11))}function mk(n,t){n&1&&(B(),j(0,"line",12))}function gk(n,t){n&1&&(u(0,"div",18),f(1,"Loading diff\u2026"),p())}function _k(n,t){if(n&1&&j(0,"app-error-banner",19),n&2){let e=d();S("message",e.error())}}function vk(n,t){n&1&&(u(0,"div",18),f(1,"Binary file not shown."),p())}var bk=0,Io=class n{git=O(et);monacoService=O(ko);file=N.required();originalRef=N.required();modifiedRef=N.required();exactOriginal=N(!1);closed=W();host=dt.required("host");loading=v(!0);error=v("");binary=v(!1);sideBySide=v(!0);destroyed=!1;editor=null;models=[];onEscape(){this.closed.emit()}ngAfterViewInit(){return Mn(this,null,function*(){this.loading.set(!0),this.error.set(""),this.binary.set(!1);try{let t=yield this.monacoService.load();if(this.destroyed)return;let e=this.file(),i=!this.exactOriginal()&&e.status==="added"&&!e.oldPath?"EMPTY":this.originalRef(),[r,o]=yield Promise.all([pl(this.git.getFileContent(this.exactOriginal()?e.path:e.oldPath||e.path,i)),pl(this.git.getFileContent(e.path,this.modifiedRef()))]);if(this.destroyed)return;if(r.binary||o.binary){this.binary.set(!0),this.loading.set(!1);return}let s=++bk,a=t.editor.createModel(r.content,void 0,t.Uri.parse(`inmemory://diff/${s}/original/${e.oldPath||e.path}`)),l=t.editor.createModel(o.content,void 0,t.Uri.parse(`inmemory://diff/${s}/modified/${e.path}`));this.models=[a,l],this.editor=t.editor.createDiffEditor(this.host().nativeElement,{theme:"guito",readOnly:!0,originalEditable:!1,renderSideBySide:this.sideBySide(),ignoreTrimWhitespace:!1,automaticLayout:!0,fontSize:12,fontFamily:"ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace",minimap:{enabled:!1},scrollBeyondLastLine:!1,renderOverviewRuler:!1,hideUnchangedRegions:{enabled:!0,contextLineCount:3},scrollbar:{verticalScrollbarSize:10,horizontalScrollbarSize:10},padding:{top:8}}),this.editor.setModel({original:a,modified:l}),this.loading.set(!1)}catch{this.error.set("Failed to load the diff."),this.loading.set(!1)}})}ngOnDestroy(){this.destroyed=!0,this.editor?.dispose(),this.editor=null;for(let t of this.models)t.dispose();this.models=[]}toggleLayout(){this.sideBySide.update(t=>!t),this.editor?.updateOptions({renderSideBySide:this.sideBySide()})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-diff-dialog"]],viewQuery:function(e,i){e&1&&st(i.host,uk,5),e&2&&Ot()},hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},inputs:{file:[1,"file"],originalRef:[1,"originalRef"],modifiedRef:[1,"modifiedRef"],exactOriginal:[1,"exactOriginal"]},outputs:{closed:"closed"},decls:25,vars:10,consts:[["host",""],[1,"backdrop",3,"click"],["role","dialog","aria-modal","true",1,"dialog"],[1,"dialog-head"],[1,"path",3,"title"],[1,"counts"],[1,"additions"],[1,"deletions"],["type","button","title","Toggle diff layout",1,"icon-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x","3","y","4","width","18","height","16","rx","2"],["x1","12","y1","4","x2","12","y2","20"],["x1","3","y1","12","x2","21","y2","12"],["type","button","title","Close","aria-label","Close diff",1,"icon-btn",3,"click"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"dialog-body"],[1,"editor-host"],[1,"state"],[3,"message"]],template:function(e,i){if(e&1){let r=I();u(0,"div",1),C("click",function(){return g(r),_(i.closed.emit())}),p(),u(1,"div",2)(2,"header",3)(3,"span"),f(4),p(),u(5,"span",4),f(6),p(),u(7,"span",5),E(8,pk,2,1,"span",6),E(9,fk,2,1,"span",7),p(),u(10,"button",8),C("click",function(){return g(r),_(i.toggleLayout())}),B(),u(11,"svg",9),j(12,"rect",10),E(13,hk,1,0,":svg:line",11)(14,mk,1,0,":svg:line",12),p()(),fe(),u(15,"button",13),C("click",function(){return g(r),_(i.closed.emit())}),B(),u(16,"svg",9),j(17,"line",14)(18,"line",15),p()()(),fe(),u(19,"div",16),j(20,"div",17,0),E(22,gk,2,0,"div",18)(23,_k,1,1,"app-error-banner",19)(24,vk,2,0,"div",18),p()()}e&2&&(c(3),Xe("status status-"+i.file().status),c(),P(i.file().status),c(),S("title",i.file().path),c(),P(i.file().path),c(2),D(i.file().additions>0?8:-1),c(),D(i.file().deletions>0?9:-1),c(),K("aria-label",i.sideBySide()?"Switch to inline view":"Switch to side-by-side view"),c(3),D(i.sideBySide()?13:14),c(9),D(i.loading()?22:i.error()?23:i.binary()?24:-1))},dependencies:[pt],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#0000008c;z-index:200}.dialog[_ngcontent-%COMP%]{position:fixed;top:4vh;left:4vw;right:4vw;bottom:4vh;display:flex;flex-direction:column;background:var(--bg);border:1px solid var(--border);border-radius:8px;box-shadow:0 12px 48px #0009;overflow:hidden;z-index:201}.dialog-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex:none;height:42px;padding:0 10px;background:var(--bg-alt);border-bottom:1px solid var(--border)}.status[_ngcontent-%COMP%]{flex:none;padding:1px 7px;border-radius:3px;font-size:10px;text-transform:uppercase;letter-spacing:.4px}.status-added[_ngcontent-%COMP%]{background:#89d18526;color:#89d185}.status-deleted[_ngcontent-%COMP%]{background:#f4877126;color:#f48771}.status-modified[_ngcontent-%COMP%]{background:#3794ff26;color:#4fc1ff}.status-renamed[_ngcontent-%COMP%]{background:#c586c026;color:#c586c0}.status-binary[_ngcontent-%COMP%]{background:#ffffff14;color:#9d9d9d}.path[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:12px;color:var(--text)}.counts[_ngcontent-%COMP%]{flex:none;display:flex;gap:6px;font-family:var(--mono);font-size:11px}.additions[_ngcontent-%COMP%]{color:#89d185}.deletions[_ngcontent-%COMP%]{color:#f48771}.icon-btn[_ngcontent-%COMP%]{flex:none;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:4px;background:transparent;color:var(--text);cursor:pointer}.icon-btn[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.dialog-body[_ngcontent-%COMP%]{position:relative;flex:1;min-height:0}.editor-host[_ngcontent-%COMP%]{position:absolute;inset:0}.state[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--bg);color:var(--text-dim);font-size:13px}"],changeDetection:0})};var xk=(n,t)=>t.path;function yk(n,t){if(n&1&&(u(0,"span",16),f(1,"\u2022"),p(),u(2,"span"),f(3),Si(4,"date"),p(),u(5,"span",16),f(6,"\u2022"),p(),u(7,"code",17),f(8),p()),n&2){let e=d();c(3),P(yo(4,2,e.commit().date,"d MMM y HH:mm")),c(5),P(e.commit().hash.slice(0,8))}}function Ck(n,t){if(n&1&&(u(0,"pre",11),j(1,"app-issue-text",7),p()),n&2){let e=d();c(),S("text",e.body())("linking",e.issueLinking())}}function wk(n,t){n&1&&(u(0,"div",13),f(1,"Loading changes\u2026"),p())}function Ek(n,t){if(n&1&&j(0,"app-error-banner",14),n&2){let e=d();S("message",e.error())}}function Dk(n,t){n&1&&(u(0,"div",13),f(1,"No changes."),p())}function Sk(n,t){n&1&&(B(),j(0,"polyline",23))}function Mk(n,t){n&1&&(B(),j(0,"polyline",24))}function Tk(n,t){if(n&1&&(u(0,"span",27),f(1),p()),n&2){let e=d(2).$implicit;c(),$("+",e.additions)}}function kk(n,t){if(n&1&&(u(0,"span",28),f(1),p()),n&2){let e=d(2).$implicit;c(),$("\u2212",e.deletions)}}function Ik(n,t){if(n&1){let e=I();u(0,"button",21),C("click",function(){g(e);let r=d().$implicit,o=d(3);return _(o.toggleDir(r.path))}),B(),u(1,"svg",22),E(2,Sk,1,0,":svg:polyline",23)(3,Mk,1,0,":svg:polyline",24),p(),fe(),u(4,"span",25),f(5),p(),u(6,"span",26),E(7,Tk,2,1,"span",27),E(8,kk,2,1,"span",28),p()()}if(n&2){let e=d().$implicit;se("padding-left",e.depth*14+8,"px"),S("title",e.path),K("aria-expanded",!e.collapsed),c(2),D(e.collapsed?2:3),c(2),S("title",e.path),c(),P(e.name),c(2),D(e.additions>0?7:-1),c(),D(e.deletions>0?8:-1)}}function Pk(n,t){if(n&1&&(u(0,"span",27),f(1),p()),n&2){let e=d(2).$implicit;c(),$("+",e.file.additions)}}function Ok(n,t){if(n&1&&(u(0,"span",28),f(1),p()),n&2){let e=d(2).$implicit;c(),$("\u2212",e.file.deletions)}}function Rk(n,t){if(n&1){let e=I();u(0,"button",29),C("click",function(){g(e);let r=d().$implicit,o=d(3);return _(o.openFile(r.file))}),u(1,"span"),f(2),p(),u(3,"span",30),f(4),p(),u(5,"span",26),E(6,Pk,2,1,"span",27),E(7,Ok,2,1,"span",28),p(),B(),u(8,"svg",31),j(9,"polyline",32),p()()}if(n&2){let e=d().$implicit;se("padding-left",e.depth*14+8,"px"),c(),Xe("file-status status-"+e.file.status),c(),P(e.file.status),c(),S("title",e.file.path),c(),P(e.name),c(2),D(e.file.additions>0?6:-1),c(),D(e.file.deletions>0?7:-1)}}function Nk(n,t){if(n&1&&E(0,Ik,9,9,"button",19)(1,Rk,10,9,"button",20),n&2){let e=t.$implicit;D(e.kind==="dir"?0:1)}}function Ak(n,t){if(n&1&&(u(0,"div",18),Z(1,Nk,2,1,null,null,xk),p()),n&2){let e=d(2);c(),Y(e.rows())}}function Lk(n,t){n&1&&E(0,Dk,2,0,"div",13)(1,Ak,3,0,"div",18),n&2&&D(t.files.length===0?0:1)}function Fk(n,t){if(n&1){let e=I();u(0,"app-diff-dialog",33),C("closed",function(){g(e);let r=d();return _(r.dialogFile.set(null))}),p()}if(n&2){let e=d();S("file",t)("originalRef",e.originalRef())("modifiedRef",e.modifiedRef())}}var rd=class n{git=O(et);vscode=O(sn);commit=N.required();issueLinking=N(null);fileListView=N("flat");closed=W();diff=v(null);loading=v(!1);error=v("");dialogFile=v(null);collapsed=v(new Set);rows=R(()=>{let t=this.diff()?.files??[];return this.fileListView()!=="tree"?t.map(e=>({kind:"file",path:e.path,name:e.path,depth:0,file:e})):To(t,this.collapsed())});body=v("");bodySub=null;workingHash=Cn;isWorking=R(()=>this.commit().hash===this.workingHash);originalRef=R(()=>this.isWorking()?"HEAD":`${this.commit().hash}^`);modifiedRef=R(()=>this.isWorking()?"WORKING":this.commit().hash);constructor(){ge(()=>{this.loadDiff(this.commit().hash),this.loadBody(this.commit())})}ngOnDestroy(){this.bodySub?.unsubscribe()}openFile(t){this.vscode.openDiff(t,this.originalRef(),this.modifiedRef())||this.dialogFile.set(t)}toggleDir(t){this.collapsed.update(e=>{let i=new Set(e);return i.has(t)?i.delete(t):i.add(t),i})}loadBody(t){if(this.bodySub?.unsubscribe(),this.body.set(""),t.body!==void 0){this.body.set(t.body);return}this.bodySub=this.git.getCommitDetail(t.hash).subscribe({next:e=>this.body.set(e.body??""),error:()=>this.body.set("")})}loadDiff(t){if(this.loading.set(!0),this.error.set(""),this.diff.set(null),this.dialogFile.set(null),t===Cn){this.git.getWorkingChanges().subscribe({next:e=>{this.loading.set(!1),this.diff.set({hash:Cn,files:e.files})},error:()=>{this.loading.set(!1),this.error.set("Failed to load the working changes.")}});return}this.git.getCommitDiff(t).subscribe({next:e=>{this.loading.set(!1),this.diff.set(e)},error:()=>{this.loading.set(!1),this.error.set("Failed to load the commit diff.")}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-commit-detail"]],inputs:{commit:[1,"commit"],issueLinking:[1,"issueLinking"],fileListView:[1,"fileListView"]},outputs:{closed:"closed"},decls:19,vars:9,consts:[[1,"detail"],[1,"detail-head"],["title","Close",1,"close-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"subject"],[3,"text","linking"],[1,"meta"],[3,"name","email"],[1,"author"],[1,"body"],[1,"detail-body"],[1,"state"],[3,"message"],[3,"file","originalRef","modifiedRef"],[1,"separator"],[1,"hash"],[1,"file-list"],["type","button",1,"file-row","dir-row",3,"title","paddingLeft"],["type","button",1,"file-row",3,"paddingLeft"],["type","button",1,"file-row","dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron","dir-chevron"],["points","9 6 15 12 9 18"],["points","6 9 12 15 18 9"],[1,"file-path","dir-name",3,"title"],[1,"file-counts"],[1,"additions"],[1,"deletions"],["type","button",1,"file-row",3,"click"],[1,"file-path",3,"title"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron"],["points","9 18 15 12 9 6"],[3,"closed","file","originalRef","modifiedRef"]],template:function(e,i){if(e&1&&(u(0,"aside",0)(1,"header",1)(2,"button",2),C("click",function(){return i.closed.emit()}),B(),u(3,"svg",3),j(4,"line",4)(5,"line",5),p()(),fe(),u(6,"h2",6),j(7,"app-issue-text",7),p(),u(8,"div",8),j(9,"app-author-avatar",9),u(10,"span",10),f(11),p(),E(12,yk,9,5),p(),E(13,Ck,2,2,"pre",11),p(),u(14,"div",12),E(15,wk,2,0,"div",13)(16,Ek,1,1,"app-error-banner",14)(17,Lk,2,1),p()(),E(18,Fk,1,3,"app-diff-dialog",15)),e&2){let r,o;c(7),S("text",i.commit().message)("linking",i.issueLinking()),c(2),S("name",i.commit().author_name)("email",i.commit().author_email),c(2),P(i.commit().author_name),c(),D(i.isWorking()?-1:12),c(),D(i.body().trim()?13:-1),c(2),D(i.loading()?15:i.error()?16:(r=i.diff())?17:-1,r),c(3),D((o=i.dialogFile())?18:-1,o)}},dependencies:[pt,Fn,Io,Mo,ra],styles:["[_nghost-%COMP%]{--panel-width: 480px;display:block;position:relative;flex:none;width:var(--panel-width);min-height:0;overflow:hidden}.detail[_ngcontent-%COMP%]{position:absolute;inset:0 auto 0 0;width:var(--panel-width);display:flex;flex-direction:column;min-height:0;background:var(--bg-alt);border-left:1px solid var(--border)}@keyframes _ngcontent-%COMP%_panel-enter{0%{width:0}to{width:var(--panel-width)}}@keyframes _ngcontent-%COMP%_panel-leave{0%{width:var(--panel-width)}to{width:0}}.panel-enter[_nghost-%COMP%]{animation:_ngcontent-%COMP%_panel-enter .18s cubic-bezier(.05,.7,.1,1)}.panel-leave[_nghost-%COMP%]{animation:_ngcontent-%COMP%_panel-leave .15s cubic-bezier(.3,0,.8,.15) forwards}@media(prefers-reduced-motion:reduce){.panel-enter[_nghost-%COMP%], .panel-leave[_nghost-%COMP%]{animation:none}}.file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;padding:6px;gap:2px;overflow-y:auto}.file-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px;border:none;border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;text-align:left;cursor:pointer}.file-row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.chevron[_ngcontent-%COMP%]{flex:none;width:13px;height:13px;fill:none;stroke:var(--text-dim);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.dir-row[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{width:11px;height:11px}.dir-name[_ngcontent-%COMP%]{font-weight:600}.file-row[_ngcontent-%COMP%]:hover .chevron[_ngcontent-%COMP%]{stroke:var(--accent)}.detail-head[_ngcontent-%COMP%]{flex:none;padding:14px 16px 12px;border-bottom:1px solid var(--border);position:relative}.close-btn[_ngcontent-%COMP%]{position:absolute;top:10px;right:10px;width:26px;height:26px;display:inline-flex;align-items:center;justify-content:center;border:none;border-radius:4px;background:transparent;color:var(--text);cursor:pointer}.close-btn[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.close-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.subject[_ngcontent-%COMP%]{margin:0 30px 10px 0;font-size:14px;font-weight:600;color:var(--text-bright);word-break:break-word}.meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--text-dim);font-size:12px}.avatar[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;color:#1e1e1e;font-size:10px;font-weight:700}.author[_ngcontent-%COMP%]{color:var(--text)}.hash[_ngcontent-%COMP%]{font-family:var(--mono);color:var(--accent);background:#3794ff1a;padding:1px 6px;border-radius:3px}.body[_ngcontent-%COMP%]{margin:10px 0 0;padding:8px 10px;background:#ffffff0a;border-radius:4px;font-size:12px;font-family:inherit;color:var(--text);white-space:pre-wrap;word-break:break-word;max-height:160px;overflow-y:auto}.detail-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.state[_ngcontent-%COMP%]{padding:24px;text-align:center;color:var(--text-dim)}.file-status[_ngcontent-%COMP%]{flex:none;padding:0 6px;border-radius:3px;font-size:10px;text-transform:uppercase;letter-spacing:.4px}.status-added[_ngcontent-%COMP%]{background:#89d18526;color:#89d185}.status-deleted[_ngcontent-%COMP%]{background:#f4877126;color:#f48771}.status-modified[_ngcontent-%COMP%]{background:#3794ff26;color:#4fc1ff}.status-renamed[_ngcontent-%COMP%]{background:#c586c026;color:#c586c0}.status-binary[_ngcontent-%COMP%]{background:#ffffff14;color:#9d9d9d}.file-path[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:12px;color:var(--text)}.file-counts[_ngcontent-%COMP%]{flex:none;font-family:var(--mono);font-size:11px}.additions[_ngcontent-%COMP%]{color:#89d185}.deletions[_ngcontent-%COMP%]{color:#f48771}.binary[_ngcontent-%COMP%]{padding:12px;color:var(--text-dim);font-size:12px}"],changeDetection:0})};function fa(n,t=0){return Vk(n)?Number(n):arguments.length===2?t:0}function Vk(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function Nx(n){return n instanceof bn?n.nativeElement:n}var Gh;try{Gh=typeof Intl<"u"&&Intl.v8BreakIterator}catch{Gh=!1}var od=(()=>{class n{_platformId=O(gr);isBrowser=this._platformId?lx(this._platformId):typeof document=="object"&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||Gh)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var Bk=new oe("cdk-dir-doc",{providedIn:"root",factory:jk});function jk(){return O(mt)}var $k=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function Hk(n){let t=n?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?$k.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var Ax=(()=>{class n{get value(){return this.valueSignal()}valueSignal=v("ltr");change=new vn;constructor(){let e=O(Bk,{optional:!0});if(e){let i=e.body?e.body.dir:null,r=e.documentElement?e.documentElement.dir:null;this.valueSignal.set(Hk(i||r||"ltr"))}}ngOnDestroy(){this.change.complete()}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var wn=(function(n){return n[n.NORMAL=0]="NORMAL",n[n.NEGATED=1]="NEGATED",n[n.INVERTED=2]="INVERTED",n})(wn||{}),sd,Er;function Lx(){if(Er==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return Er=!1,Er;if(document.documentElement?.style&&"scrollBehavior"in document.documentElement.style)Er=!0;else{let n=Element.prototype.scrollTo;n?Er=!/\{\s*\[native code\]\s*\}/.test(n.toString()):Er=!1}}return Er}function Po(){if(typeof document!="object"||!document)return wn.NORMAL;if(sd==null){let n=document.createElement("div"),t=n.style;n.dir="rtl",t.width="1px",t.overflow="auto",t.visibility="hidden",t.pointerEvents="none",t.position="absolute";let e=document.createElement("div"),i=e.style;i.width="2px",i.height="1px",n.appendChild(e),document.body.appendChild(n),sd=wn.NORMAL,n.scrollLeft===0&&(n.scrollLeft=1,sd=n.scrollLeft===0?wn.NEGATED:wn.INVERTED),n.remove()}return sd}var ad=class{};function Fx(n){return n&&typeof n.connect=="function"&&!(n instanceof Zo)}var ld=class extends ad{_data;constructor(t){super(),this._data=t}connect(){return es(this._data)?this._data:Ee(this._data)}disconnect(){}},ha=(function(n){return n[n.REPLACED=0]="REPLACED",n[n.INSERTED=1]="INSERTED",n[n.MOVED=2]="MOVED",n[n.REMOVED=3]="REMOVED",n})(ha||{}),Wh=new oe("_ViewRepeater"),cd=class{viewCacheSize=20;_viewCache=[];applyChanges(t,e,i,r,o){t.forEachOperation((s,a,l)=>{let h,m;if(s.previousIndex==null){let w=()=>i(s,a,l);h=this._insertView(w,l,e,r(s)),m=h?ha.INSERTED:ha.REPLACED}else l==null?(this._detachAndCacheView(a,e),m=ha.REMOVED):(h=this._moveView(a,l,e,r(s)),m=ha.MOVED);o&&o({context:h?.context,operation:m,record:s})})}detach(){for(let t of this._viewCache)t.destroy();this._viewCache=[]}_insertView(t,e,i,r){let o=this._insertViewFromCache(e,i);if(o){o.context.$implicit=r;return}let s=t();return i.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(t,e){let i=e.detach(t);this._maybeCacheView(i,e)}_moveView(t,e,i,r){let o=i.get(t);return i.move(o,e),o.context.$implicit=r,o}_maybeCacheView(t,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(t);else{let i=e.indexOf(t);i===-1?t.destroy():e.remove(i)}}_insertViewFromCache(t,e){let i=this._viewCache.pop();return i&&e.insert(i,t),i||null}};var zk=["contentWrapper"],Uk=["*"],jx=new oe("VIRTUAL_SCROLL_STRATEGY"),qh=class{_scrolledIndexChange=new He;scrolledIndexChange=this._scrolledIndexChange.pipe(is());_viewport=null;_itemSize;_minBufferPx;_maxBufferPx;constructor(t,e,i){this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i}attach(t){this._viewport=t,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(t,e,i){i<e,this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(t,e){this._viewport&&this._viewport.scrollToOffset(t*this._itemSize,e)}_updateTotalContentSize(){this._viewport&&this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let t=this._viewport.getRenderedRange(),e={start:t.start,end:t.end},i=this._viewport.getViewportSize(),r=this._viewport.getDataLength(),o=this._viewport.measureScrollOffset(),s=this._itemSize>0?o/this._itemSize:0;if(e.end>r){let l=Math.ceil(i/this._itemSize),h=Math.max(0,Math.min(s,r-l));s!=h&&(s=h,o=h*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(r,e.start+l))}let a=o-e.start*this._itemSize;if(a<this._minBufferPx&&e.start!=0){let l=Math.ceil((this._maxBufferPx-a)/this._itemSize);e.start=Math.max(0,e.start-l),e.end=Math.min(r,Math.ceil(s+(i+this._minBufferPx)/this._itemSize))}else{let l=e.end*this._itemSize-(o+i);if(l<this._minBufferPx&&e.end!=r){let h=Math.ceil((this._maxBufferPx-l)/this._itemSize);h>0&&(e.end=Math.min(r,e.end+h),e.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(Math.round(this._itemSize*e.start)),this._scrolledIndexChange.next(Math.floor(s))}};function Gk(n){return n._scrollStrategy}var $x=(()=>{class n{get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=fa(e)}_itemSize=20;get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=fa(e)}_minBufferPx=100;get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=fa(e)}_maxBufferPx=200;_scrollStrategy=new qh(this.itemSize,this.minBufferPx,this.maxBufferPx);ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}static \u0275fac=function(i){return new(i||n)};static \u0275dir=Ei({type:n,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},features:[Ws([{provide:jx,useFactory:Gk,deps:[Xr(()=>n)]}]),As]})}return n})(),Wk=20,qk=(()=>{class n{_ngZone=O(we);_platform=O(od);_renderer=O(An).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new He;_scrolledCount=0;scrollContainers=new Map;register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=Wk){return this._platform.isBrowser?new pe(i=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));let r=e>0?this._scrolled.pipe(ns(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):Ee()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){let r=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(ts(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(e){let i=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,e)&&i.push(o)}),i}_scrollableContainsElement(e,i){let r=Nx(i),o=e.getElementRef().nativeElement;do if(r==o)return!0;while(r=r.parentElement);return!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Hx=(()=>{class n{elementRef=O(bn);scrollDispatcher=O(qk);ngZone=O(we);dir=O(Ax,{optional:!0});_scrollElement=this.elementRef.nativeElement;_destroyed=new He;_renderer=O(Ic);_cleanupScroll;_elementScrolled=new He;constructor(){}ngOnInit(){this._cleanupScroll=this.ngZone.runOutsideAngular(()=>this._renderer.listen(this._scrollElement,"scroll",e=>this._elementScrolled.next(e))),this.scrollDispatcher.register(this)}ngOnDestroy(){this._cleanupScroll?.(),this._elementScrolled.complete(),this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let i=this.elementRef.nativeElement,r=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=r?e.end:e.start),e.right==null&&(e.right=r?e.start:e.end),e.bottom!=null&&(e.top=i.scrollHeight-i.clientHeight-e.bottom),r&&Po()!=wn.NORMAL?(e.left!=null&&(e.right=i.scrollWidth-i.clientWidth-e.left),Po()==wn.INVERTED?e.left=e.right:Po()==wn.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=i.scrollWidth-i.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let i=this.elementRef.nativeElement;Lx()?i.scrollTo(e):(e.top!=null&&(i.scrollTop=e.top),e.left!=null&&(i.scrollLeft=e.left))}measureScrollOffset(e){let i="left",r="right",o=this.elementRef.nativeElement;if(e=="top")return o.scrollTop;if(e=="bottom")return o.scrollHeight-o.clientHeight-o.scrollTop;let s=this.dir&&this.dir.value=="rtl";return e=="start"?e=s?r:i:e=="end"&&(e=s?i:r),s&&Po()==wn.INVERTED?e==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&Po()==wn.NEGATED?e==i?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==i?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}static \u0275fac=function(i){return new(i||n)};static \u0275dir=Ei({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]]})}return n})(),Zk=20,Yk=(()=>{class n{_platform=O(od);_listeners;_viewportSize;_change=new He;_document=O(mt);constructor(){let e=O(we),i=O(An).createRenderer(null,null);e.runOutsideAngular(()=>{if(this._platform.isBrowser){let r=o=>this._change.next(o);this._listeners=[i.listen("window","resize",r),i.listen("window","orientationchange",r)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(e=>e()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,i=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect(),s=-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,a=-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0;return{top:s,left:a}}change(e=Zk){return e>0?this._change.pipe(ns(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Vx=new oe("VIRTUAL_SCROLLABLE"),Qk=(()=>{class n extends Hx{constructor(){super()}measureViewportSize(e){let i=this.elementRef.nativeElement;return e==="horizontal"?i.clientWidth:i.clientHeight}static \u0275fac=function(i){return new(i||n)};static \u0275dir=Ei({type:n,features:[$s]})}return n})();function Kk(n,t){return n.start==t.start&&n.end==t.end}var Xk=typeof requestAnimationFrame<"u"?bu:vu,ma=(()=>{class n extends Qk{elementRef=O(bn);_changeDetectorRef=O(Bc);_scrollStrategy=O(jx,{optional:!0});scrollable=O(Vx,{optional:!0});_platform=O(od);_detachedSubject=new He;_renderedRangeSubject=new He;get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}_orientation="vertical";appendOnly=!1;scrolledIndexChange=new pe(e=>this._scrollStrategy.scrolledIndexChange.subscribe(i=>Promise.resolve().then(()=>this.ngZone.run(()=>e.next(i)))));_contentWrapper;renderedRangeStream=this._renderedRangeSubject;_totalContentSize=0;_totalContentWidth=v("");_totalContentHeight=v("");_renderedContentTransform;_renderedRange={start:0,end:0};_dataLength=0;_viewportSize=0;_forOf;_renderedContentOffset=0;_renderedContentOffsetNeedsRewrite=!1;_changeDetectionNeeded=v(!1);_runAfterChangeDetection=[];_viewportChanges=Be.EMPTY;_injector=O(kt);_isDestroyed=!1;constructor(){super();let e=O(Yk);this._scrollStrategy,this._viewportChanges=e.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this);let i=ge(()=>{this._changeDetectionNeeded()&&this._doChangeDetection()},{injector:O(vr).injector});O(ot).onDestroy(()=>{i.destroy()})}ngOnInit(){this._platform.isBrowser&&(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(hl(null),ns(0,Xk),Gi(this._destroyed)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),this._isDestroyed=!0,super.ngOnDestroy()}attach(e){this._forOf,this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(Gi(this._detachedSubject)).subscribe(i=>{let r=i.length;r!==this._dataLength&&(this._dataLength=r,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(e){return this.getElementRef().nativeElement.getBoundingClientRect()[e]}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){Kk(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,i="to-start"){e=this.appendOnly&&i==="to-start"?0:e;let r=this.dir&&this.dir.value=="rtl",o=this.orientation=="horizontal",s=o?"X":"Y",l=`translate${s}(${Number((o&&r?-1:1)*e)}px)`;this._renderedContentOffset=e,i==="to-end"&&(l+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,i="auto"){let r={behavior:i};this.orientation==="horizontal"?r.start=e:r.top=e,this.scrollable.scrollTo(r)}scrollToIndex(e,i="auto"){this._scrollStrategy.scrollToIndex(e,i)}measureScrollOffset(e){let i;return this.scrollable==this?i=r=>super.measureScrollOffset(r):i=r=>this.scrollable.measureScrollOffset(r),Math.max(0,i(e??(this.orientation==="horizontal"?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let i,r="left",o="right",s=this.dir?.value=="rtl";e=="start"?i=s?o:r:e=="end"?i=s?r:o:e?i=e:i=this.orientation==="horizontal"?"left":"top";let a=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-a}measureRenderedContentSize(){let e=this._contentWrapper.nativeElement;return this.orientation==="horizontal"?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),!ze(this._changeDetectionNeeded)&&this.ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this.ngZone.run(()=>{this._changeDetectionNeeded.set(!0)})})})}_doChangeDetection(){this._isDestroyed||this.ngZone.run(()=>{this._changeDetectorRef.markForCheck(),this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,Cc(()=>{this._changeDetectionNeeded.set(!1);let e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let i of e)i()},{injector:this._injector})})}_calculateSpacerSize(){this._totalContentHeight.set(this.orientation==="horizontal"?"":`${this._totalContentSize}px`),this._totalContentWidth.set(this.orientation==="horizontal"?`${this._totalContentSize}px`:"")}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=ue({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(i,r){if(i&1&&sh(zk,7),i&2){let o;ah(o=lh())&&(r._contentWrapper=o.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(i,r){i&2&&te("cdk-virtual-scroll-orientation-horizontal",r.orientation==="horizontal")("cdk-virtual-scroll-orientation-vertical",r.orientation!=="horizontal")},inputs:{orientation:"orientation",appendOnly:[2,"appendOnly","appendOnly",Ub]},outputs:{scrolledIndexChange:"scrolledIndexChange"},features:[Ws([{provide:Hx,useFactory:(e,i)=>e||i,deps:[[new vf,new _f(Vx)],n]}]),$s],ngContentSelectors:Uk,decls:4,vars:4,consts:[["contentWrapper",""],[1,"cdk-virtual-scroll-content-wrapper"],[1,"cdk-virtual-scroll-spacer"]],template:function(i,r){i&1&&(rh(),b(0,"div",1,0),oh(2),y(),ee(3,"div",2)),i&2&&(c(3),se("width",r._totalContentWidth())("height",r._totalContentHeight()))},styles:[`cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}
|
|
6
|
-
`],encapsulation:2,changeDetection:0})}return n})();function Bx(n,t,e){let i=e;if(!i.getBoundingClientRect)return 0;let r=i.getBoundingClientRect();return n==="horizontal"?t==="start"?r.left:r.right:t==="start"?r.top:r.bottom}var zx=(()=>{class n{_viewContainerRef=O(wi);_template=O(yi);_differs=O(jc);_viewRepeater=O(Wh);_viewport=O(ma,{skipSelf:!0});viewChange=new He;_dataSourceChanges=new He;get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,Fx(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new ld(es(e)?e:Array.from(e||[])))}_cdkVirtualForOf;get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(e){this._needsUpdate=!0,this._cdkVirtualForTrackBy=e?(i,r)=>e(i+(this._renderedRange?this._renderedRange.start:0),r):void 0}_cdkVirtualForTrackBy;set cdkVirtualForTemplate(e){e&&(this._needsUpdate=!0,this._template=e)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(e){this._viewRepeater.viewCacheSize=fa(e)}dataStream=this._dataSourceChanges.pipe(hl(null),Du(),St(([e,i])=>this._changeDataSource(e,i)),Qr(1));_differ=null;_data;_renderedItems;_renderedRange;_needsUpdate=!1;_destroyed=new He;constructor(){let e=O(we);this.dataStream.subscribe(i=>{this._data=i,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(Gi(this._destroyed)).subscribe(i=>{this._renderedRange=i,this.viewChange.observers.length&&e.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(e,i){if(e.start>=e.end)return 0;e.start<this._renderedRange.start||e.end>this._renderedRange.end;let r=e.start-this._renderedRange.start,o=e.end-e.start,s,a;for(let l=0;l<o;l++){let h=this._viewContainerRef.get(l+r);if(h&&h.rootNodes.length){s=a=h.rootNodes[0];break}}for(let l=o-1;l>-1;l--){let h=this._viewContainerRef.get(l+r);if(h&&h.rootNodes.length){a=h.rootNodes[h.rootNodes.length-1];break}}return s&&a?Bx(i,"end",a)-Bx(i,"start",s):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let e=this._differ.diff(this._renderedItems);e?this._applyChanges(e):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){this._renderedRange&&(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((e,i)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(e,i):i)),this._needsUpdate=!0)}_changeDataSource(e,i){return e&&e.disconnect(this),this._needsUpdate=!0,i?i.connect(this):Ee()}_updateContext(){let e=this._data.length,i=this._viewContainerRef.length;for(;i--;){let r=this._viewContainerRef.get(i);r.context.index=this._renderedRange.start+i,r.context.count=e,this._updateComputedContextProperties(r.context),r.detectChanges()}}_applyChanges(e){this._viewRepeater.applyChanges(e,this._viewContainerRef,(o,s,a)=>this._getEmbeddedViewArgs(o,a),o=>o.item),e.forEachIdentityChange(o=>{let s=this._viewContainerRef.get(o.currentIndex);s.context.$implicit=o.item});let i=this._data.length,r=this._viewContainerRef.length;for(;r--;){let o=this._viewContainerRef.get(r);o.context.index=this._renderedRange.start+r,o.context.count=i,this._updateComputedContextProperties(o.context)}}_updateComputedContextProperties(e){e.first=e.index===0,e.last=e.index===e.count-1,e.even=e.index%2===0,e.odd=!e.even}_getEmbeddedViewArgs(e,i){return{templateRef:this._template,context:{$implicit:e.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:i}}static ngTemplateContextGuard(e,i){return!0}static \u0275fac=function(i){return new(i||n)};static \u0275dir=Ei({type:n,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},features:[Ws([{provide:Wh,useClass:cd}])]})}return n})();function dd(n){let t=[],e=new Int32Array(n.length),i=r=>{let o=t.indexOf(r);return o===-1&&(o=t.indexOf(null),o===-1&&(t.push(null),o=t.length-1),t[o]=r),o};for(let r=0;r<n.length;r++){let{hash:o,parents:s}=n[r],a=t.map((h,m)=>h===o?m:-1).filter(h=>h!==-1),l;if(a.length>0){l=a[0];for(let h=1;h<a.length;h++)t[a[h]]=null}else l=i(o);t[l]=s[0]??null;for(let h=1;h<s.length;h++)i(s[h]);e[r]=l}return e}var Ux=["#3794ff","#4ec9b0","#d7ba7d","#c586c0","#89d185","#ce9178","#d16969","#569cd6","#b5cea8","#dcdcaa"];function Zh(n){return Ux[Math.abs(n)%Ux.length]}var Jk=2e3,ud=class n{worker=null;workerBroken=!1;nextId=0;pending=new Map;compute(t){return t.length<=Jk?Ee(dd(t)):new pe(e=>{let i=this.ensureWorker();if(!i){e.next(dd(t)),e.complete();return}let r=++this.nextId;this.pending.set(r,{rows:t,subscriber:e});let o=setTimeout(()=>this.fallback(),15e3);try{i.postMessage({id:r,hashes:t.map(s=>s.hash),parents:t.map(s=>[...s.parents])})}catch{this.fallback()}return()=>{clearTimeout(o),this.pending.delete(r)}})}fallback(){this.workerBroken=!0,this.worker?.terminate(),this.worker=null;for(let[t,e]of this.pending)this.pending.delete(t),e.subscriber.next(dd(e.rows)),e.subscriber.complete()}ensureWorker(){if(this.worker)return this.worker;if(this.workerBroken||typeof Worker>"u")return null;try{return this.worker=new Worker(new URL("worker-O4G7QTZ6.js",import.meta.url),{type:"module"}),this.worker.onmessage=t=>{let e=this.pending.get(t.data.id);if(e){if(!(t.data.lanes instanceof Int32Array)||t.data.lanes.length!==e.rows.length){this.fallback();return}e.subscriber.next(t.data.lanes),e.subscriber.complete()}},this.worker.onerror=()=>this.fallback(),this.worker.onmessageerror=()=>this.fallback(),this.worker}catch{return this.fallback(),null}}ngOnDestroy(){this.worker?.terminate();for(let t of this.pending.values())t.subscriber.complete();this.pending.clear()}static \u0275fac=function(e){return new(e||n)};static \u0275prov=ce({token:n,factory:n.\u0275fac,providedIn:"root"})};function Gx(n){return n?n.split(",").map(t=>t.trim()).filter(Boolean).map(t=>t.startsWith("HEAD -> ")?{type:"head",name:t.slice(8)}:t==="HEAD"?{type:"head",name:"HEAD"}:t.startsWith("tag: ")?{type:"tag",name:t.slice(5)}:t.includes("/")?{type:"remote",name:t}:{type:"local",name:t}):[]}function Yh(n){let t=n.refs;return t?t==="HEAD"||t.startsWith("HEAD,")||t.startsWith("HEAD ->"):!1}function pd(n,t){if(typeof localStorage>"u")return t;try{let e=localStorage.getItem(n);return e===null?t:JSON.parse(e)}catch{return t}}function fd(n,t){if(!(typeof localStorage>"u"))try{localStorage.setItem(n,JSON.stringify(t))}catch{}}var eI=(n,t)=>t.index,tI=(n,t)=>t.hash,nI=(n,t)=>t.name;function iI(n,t){if(n&1){let e=I();u(0,"div",20)(1,"span",5),f(2,"Graph"),p(),u(3,"div",6),C("mousedown",function(r){g(e);let o=d();return _(o.startResize("graph",r))}),p()()}if(n&2){let e=d();se("width",e.graphColumnWidth(),"px")}}function rI(n,t){if(n&1&&(u(0,"div",35),B(),u(1,"svg",36),j(2,"path",37)(3,"path",38),p()()),n&2){let e=d(2);se("width",e.graphColumnWidth(),"px")}}function oI(n,t){if(n&1&&(u(0,"span",39),f(1),p()),n&2){let e=d();c(),$("",e.staged.length," staged")}}function sI(n,t){if(n&1&&(u(0,"span",40),f(1),p()),n&2){let e=d();c(),$("",e.unstaged.length," unstaged")}}function aI(n,t){if(n&1&&(u(0,"span",41),f(1),p()),n&2){let e=d();c(),$("",e.untracked.length," untracked")}}function lI(n,t){if(n&1&&(E(0,oI,2,1,"span",39),E(1,sI,2,1,"span",40),E(2,aI,2,1,"span",41)),n&2){let e=t;D(e.staged.length>0?0:-1),c(),D(e.unstaged.length>0?1:-1),c(),D(e.untracked.length>0?2:-1)}}function cI(n,t){if(n&1){let e=I();u(0,"div",21),C("click",function(){g(e);let r=d();return _(r.commitClick.emit(r.workingCommit()))})("contextmenu",function(r){g(e);let o=d();return _(o.onWorkingContextMenu(r))}),E(1,rI,4,2,"div",22),u(2,"div",23)(3,"span",24),B(),u(4,"svg",25),j(5,"circle",26)(6,"path",27)(7,"path",28)(8,"path",29)(9,"path",30),p(),fe(),u(10,"span",31),f(11,"Uncommitted changes"),p()(),E(12,lI,3,3),p(),u(13,"div",32),f(14,"\u2014"),p(),u(15,"div",33),f(16),p(),u(17,"div",34),f(18,"\u2014"),p()()}if(n&2){let e,i=d();se("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),te("selected",i.selectedHash()===i.workingHash),c(),D(i.showGraph()?1:-1),c(),se("width",i.descriptionWidth(),"px"),c(10),D((e=i.workingChanges())?12:-1,e),c(),se("width",i.columnWidths().date,"px"),c(2),se("width",i.columnWidths().author,"px"),c(),P(i.identity().name||"You"),c(),se("width",i.columnWidths().commit,"px")}}function dI(n,t){if(n&1&&(u(0,"div",35),B(),u(1,"svg",49),j(2,"path",44)(3,"line",45),p()()),n&2){let e=d(2);se("width",e.graphColumnWidth(),"px")}}function uI(n,t){if(n&1&&(u(0,"mark",50),f(1),p()),n&2){let e=d().$implicit;c(),P(e.text)}}function pI(n,t){if(n&1&&f(0),n&2){let e=d().$implicit;$(" ",e.text," ")}}function fI(n,t){if(n&1&&E(0,uI,2,1,"mark",50)(1,pI,1,1),n&2){let e=t.$implicit;D(e.match?0:1)}}function hI(n,t){if(n&1&&(j(0,"app-author-avatar",51),f(1)),n&2){let e=d().$implicit;S("name",e.author_name)("email",e.author_email??""),c(),$(" ",e.author_name," ")}}function mI(n,t){if(n&1){let e=I();u(0,"div",42),C("click",function(){let r=g(e).$implicit,o=d();return _(o.commitClick.emit(o.stashCommit(r)))})("contextmenu",function(r){let o=g(e).$implicit,s=d();return _(s.onStashContextMenu(r,o))}),E(1,dI,4,2,"div",22),u(2,"div",23)(3,"span",43),B(),u(4,"svg",25),j(5,"path",44)(6,"line",45),p(),fe(),u(7,"span",31),f(8),p()(),u(9,"span",46),Z(10,fI,2,1,null,null,qn),p()(),u(12,"div",32),f(13),Si(14,"date"),p(),u(15,"div",47),E(16,hI,2,3),p(),u(17,"div",48),f(18),p()()}if(n&2){let e=t.$implicit,i=d();se("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),te("selected",i.selectedHash()===e.hash),c(),D(i.showGraph()?1:-1),c(),se("width",i.descriptionWidth(),"px"),c(),S("title",i.stashLabel(e)),c(5),P(i.stashLabel(e)),c(),S("title",e.message),c(),Y(i.highlight(e.message)),c(2),se("width",i.columnWidths().date,"px"),c(),$(" ",e.date?yo(14,23,e.date,"d MMM y HH:mm"):"\u2014"," "),c(2),se("width",i.columnWidths().author,"px"),S("title",e.author_name),c(),D(e.author_name?16:-1),c(),se("width",i.columnWidths().commit,"px"),S("title",e.hash),c(),$(" ",e.hash.slice(0,8)," ")}}function gI(n,t){if(n&1&&(u(0,"div",13),j(1,"span",52),f(2),p()),n&2){let e=d();c(2),P(e.pendingLabel())}}function _I(n,t){if(n&1&&(B(),j(0,"path",55)),n&2){let e=t.$implicit;K("d",e.d)("stroke",e.color)}}function vI(n,t){if(n&1&&(B(),j(0,"circle",56)),n&2){let e=d().$implicit;K("cx",e.x)("cy",e.y)("stroke",e.color)}}function bI(n,t){if(n&1&&(B(),j(0,"circle",57)),n&2){let e=d().$implicit;K("cx",e.x)("cy",e.y)("fill",e.color)}}function xI(n,t){if(n&1&&E(0,vI,1,3,":svg:circle",56)(1,bI,1,3,":svg:circle",57),n&2){let e=t.$implicit;D(e.isHead?0:1)}}function yI(n,t){if(n&1&&(u(0,"div",53),B(),u(1,"svg",54)(2,"g"),Z(3,_I,1,2,":svg:path",55,qn),Z(5,xI,2,1,null,null,tI),p()()()),n&2){let e=d();se("width",e.viewportWidth(),"px"),c(),se("transform",e.horizontalTransform()),K("width",e.graphWidth()),c(),K("transform","translate(0 "+-e.scrollTop()+")"),c(),Y(e.edges()),c(2),Y(e.nodes())}}function CI(n,t){if(n&1&&j(0,"div",35),n&2){let e=d(2);se("width",e.graphColumnWidth(),"px")}}function wI(n,t){n&1&&(B(),u(0,"svg",25),j(1,"line",63)(2,"circle",64)(3,"circle",65)(4,"path",66),p())}function EI(n,t){n&1&&(B(),u(0,"svg",25),j(1,"path",67)(2,"line",68),p())}function DI(n,t){if(n&1){let e=I();u(0,"span",62),C("contextmenu",function(r){let o=g(e).$implicit,s=d().$implicit,a=d();return _(a.onBadgeContextMenu(r,s.commit,o))}),E(1,wI,5,0,":svg:svg",25)(2,EI,3,0,":svg:svg",25),u(3,"span",31),f(4),p()()}if(n&2){let e=t.$implicit;Xe("badge badge-"+e.type),c(),D(e.type==="head"||e.type==="local"?1:e.type==="tag"?2:-1),c(3),P(e.name)}}function SI(n,t){if(n&1&&(u(0,"mark",50),f(1),p()),n&2){let e=d().$implicit;c(),P(e.text)}}function MI(n,t){if(n&1&&f(0),n&2){let e=d().$implicit;$(" ",e.text," ")}}function TI(n,t){if(n&1&&E(0,SI,2,1,"mark",50)(1,MI,1,1),n&2){let e=t.$implicit;D(e.match?0:1)}}function kI(n,t){if(n&1){let e=I();u(0,"div",58),C("click",function(){let r=g(e).$implicit,o=d();return _(o.commitClick.emit(r.commit))})("contextmenu",function(r){let o=g(e).$implicit,s=d();return _(s.onRowContextMenu(r,o.commit))}),E(1,CI,1,2,"div",22),u(2,"div",23),Z(3,DI,5,4,"span",59,nI),u(5,"span",60),j(6,"app-issue-text",61),p()(),u(7,"div",32),f(8),Si(9,"date"),p(),u(10,"div",47),j(11,"app-author-avatar",51),Z(12,TI,2,1,null,null,qn),p(),u(14,"div",48),f(15),p()()}if(n&2){let e=t.$implicit,i=d();se("width",i.tableWidth(),"px"),te("selected",e.commit.hash===i.selectedHash()),c(),D(i.showGraph()?1:-1),c(),se("width",i.descriptionWidth(),"px"),c(),Y(i.badges(e.commit)),c(2),te("head",i.isHead(e.commit)),c(),S("text",e.commit.message)("search",i.search())("linking",i.issueLinking()),c(),se("width",i.columnWidths().date,"px"),c(),$(" ",yo(9,24,e.commit.date,"d MMM y HH:mm")," "),c(2),se("width",i.columnWidths().author,"px"),S("title",e.commit.author_name),c(),S("name",e.commit.author_name)("email",e.commit.author_email),c(),Y(i.highlight(e.commit.author_name)),c(2),se("width",i.columnWidths().commit,"px"),S("title",e.commit.hash),c(),$(" ",e.commit.hash.slice(0,8)," ")}}function II(n,t){if(n&1&&(u(0,"div",18),f(1),p()),n&2){let e=d();c(),P(e.search().trim()?"No matching commits":"No commits to show")}}function PI(n,t){if(n&1){let e=I();u(0,"div",19)(1,"button",69),C("click",function(){g(e);let r=d();return _(r.onLoadMoreCommits())}),f(2,"Load more commits"),p(),u(3,"button",69),C("click",function(){g(e);let r=d();return _(r.onLoadAllCommits())}),f(4),p()()}if(n&2){let e=d();c(4),$("Load all (",e.unloaded(),")")}}var an=34,Qh=14,Wx=10,OI=72,qx=10,Yx="guito.columnWidths",Zx={graph:0,description:480,date:132,author:150,commit:84},RI={graph:0,description:48,date:48,author:48,commit:48};function NI(){let n=pd(Yx,{}),t=H({},Zx);for(let e of Object.keys(Zx)){let i=n[e];typeof i=="number"&&Number.isFinite(i)&&i>=RI[e]&&(t[e]=i)}return t}var hd=class n{commits=N.required();selectedHash=N.required();identity=N({name:"",email:""});search=N("");showGraph=N(!0);selectedBranches=N([]);showRemote=N(!0);workingChanges=N(null);stashes=N([]);showStashes=N(!1);showTags=N(!0);issueLinking=N(null);unloaded=N(0);historyLoading=N(!1);loadingLabel=N("");scrollToHash=N(null);graphLoading=v(!1);pendingLabel=R(()=>this.loadingLabel()||(this.graphLoading()?"Drawing commit graph...":""));commitClick=W();contextMenu=W();loadMoreRequested=W();loadAllRequested=W();rowHeight=an;graph=O(ud);viewport=dt(ma);zone=O(we);scrollTop=v(0);scrollLeft=v(0);viewportWidth=v(0);viewportHeight=v(0);constructor(){ge(()=>{let t=this.commits();this.updateGraph(t)}),Qs(()=>{this.graphCommits(),this.columnWidths();let t=this.viewport();t&&ze(()=>{t.checkViewportSize(),this.measureViewport()})}),Qs(()=>{this.selectedBranches(),this.showRemote(),this.showGraph(),this.showGraph()||this.search();let t=this.viewport();t&&ze(()=>{t.scrollToOffset(0),this.measureViewport()})}),ge(()=>{let t=this.scrollToHash();if(!t)return;let e=this.graphCommits().findIndex(r=>r.commit.hash===t.hash);if(e===-1)return;let i=this.viewport();i&&ze(()=>this.scrollToIndex(i,e))}),ge(t=>{let e=this.viewport();if(!e)return;let i=new ResizeObserver(()=>{this.zone.run(()=>{e.checkViewportSize(),this.measureViewport()})});i.observe(e.elementRef.nativeElement);let r=e.elementScrolled().subscribe(()=>{this.zone.run(()=>{this.measureViewport(),this.autoLoadMore(e.elementRef.nativeElement)})});t(()=>{i.disconnect(),r.unsubscribe()})}),ge(()=>{this.viewportWidth(),this.graphCommits(),ze(()=>{let t=this.viewportWidth()-this.graphColumnWidth()-this.columnWidths().date-this.columnWidths().author-this.columnWidths().commit-this.columnWidths().description;this.fillerWidth.set(Math.max(0,t))})})}measureViewport(){let t=this.viewport()?.elementRef.nativeElement;t&&(this.scrollTop.set(t.scrollTop),this.scrollLeft.set(t.scrollLeft),this.viewportWidth.set(t.clientWidth),this.viewportHeight.set(t.clientHeight))}autoLoadMore(t){if(this.unloaded()<=0||this.historyLoading()||t.clientHeight===0)return;t.scrollHeight-t.scrollTop-t.clientHeight<=t.clientHeight&&this.loadMoreRequested.emit()}scrollToIndex(t,e){let i=t.elementRef.nativeElement,r=i.clientHeight||this.viewportHeight(),o=Math.max(0,e*an-(r-an)/2),s=0,a=()=>{t.scrollToOffset(o),this.measureViewport(),Math.abs(i.scrollTop-o)>1&&++s<10&&requestAnimationFrame(a)};a()}columnWidths=v(NI());graphCommits=v([]);graphSubscription=null;updateGraph(t){if(this.graphSubscription?.unsubscribe(),!this.showGraph()){this.graphLoading.set(!1),this.graphCommits.set(t.map(e=>({commit:e,lane:0,parents:[]})));return}this.graphLoading.set(!0),this.graphSubscription=this.graph.compute(t).subscribe(e=>{e.length===t.length&&(this.graphLoading.set(!1),this.graphCommits.set(t.map((i,r)=>({commit:i,lane:e[r],parents:i.parents??[]}))))})}graphWidth=R(()=>{let t=this.graphCommits().reduce((e,i)=>Math.max(e,i.lane),0)+1;return Math.max(OI,Wx*2+t*Qh)});graphColumnWidth=R(()=>this.showGraph()?Math.max(this.graphWidth(),this.columnWidths().graph):0);fillerWidth=v(0);descriptionWidth=R(()=>this.columnWidths().description+this.fillerWidth());tableWidth=R(()=>this.graphColumnWidth()+this.columnWidths().date+this.columnWidths().author+this.columnWidths().commit+this.descriptionWidth());horizontalTransform=R(()=>"translateX("+-this.scrollLeft()+"px)");graphHeight=R(()=>this.graphCommits().length*an);allEdges=R(()=>{let t=this.graphCommits(),e=new Map,i=new Map;t.forEach((o,s)=>{e.set(o.commit.hash,s),i.set(o.commit.hash,o.lane)});let r=[];for(let o=0;o<t.length;o++){let s=t[o];for(let a of s.parents){let l=e.get(a);r.push({childRow:o,childLane:s.lane,parentRow:l??-1,parentLane:l===void 0?s.lane:i.get(a)??s.lane})}}return r});visibleRange=R(()=>{let t=this.graphCommits().length;if(t===0||this.viewportHeight()===0)return{start:0,end:0};let e=Math.max(0,Math.floor(this.scrollTop()/an)-qx),i=Math.min(t,Math.ceil((this.scrollTop()+this.viewportHeight())/an)+qx);return{start:e,end:i}});nodes=R(()=>{let{start:t,end:e}=this.visibleRange(),i=[];for(let r=t;r<e;r++){let o=this.graphCommits()[r];i.push({hash:o.commit.hash,x:this.laneX(o.lane),y:r*an+an/2,color:Zh(o.lane),isHead:Yh(o.commit)})}return i});edges=R(()=>{let t=this.allEdges(),{start:e,end:i}=this.visibleRange(),r=this.graphHeight(),o=[];for(let s of t){let a=s.parentRow,l=Math.min(s.childRow,a<0?s.childRow:a);if((a<0?Number.MAX_SAFE_INTEGER:Math.max(s.childRow,a))<e||l>=i)continue;let m=Zh(s.childLane),w=this.laneX(s.childLane),M=s.childRow*an+an/2;if(a<0){o.push({d:`M ${w} ${M} L ${w} ${r}`,color:m});continue}let T=this.laneX(s.parentLane),A=a*an+an/2;if(w===T)o.push({d:`M ${w} ${M} L ${T} ${A}`,color:m});else{let z=(M+A)/2;o.push({d:`M ${w} ${M} C ${w} ${z} ${T} ${z} ${T} ${A}`,color:m})}}return o});hasWorkingChanges=R(()=>{let t=this.workingChanges();return!!t&&t.staged.length+t.unstaged.length+t.untracked.length+t.conflicted.length>0});workingHash=Cn;workingCommit=R(()=>({hash:Cn,date:new Date().toISOString(),message:"Uncommitted changes",refs:"",body:"",author_name:this.identity().name||"You",author_email:this.identity().email,parents:[]}));visibleStashes=R(()=>this.showStashes()?this.stashes():[]);stashCommit(t){return{hash:t.hash,date:t.date??"",message:t.message,refs:"",author_name:t.author_name??"",author_email:t.author_email??"",parents:[]}}stashLabel(t){return`stash@{${t.index}}`}resizeState=null;startResize(t,e){if(e.preventDefault(),e.stopPropagation(),t==="graph")this.resizeState={column:t,startX:e.clientX,startWidth:this.graphColumnWidth()};else if(t==="description"){let i=this.descriptionWidth();this.columnWidths.update(r=>re(H({},r),{description:i})),this.fillerWidth.set(0),this.resizeState={column:t,startX:e.clientX,startWidth:i}}else this.resizeState={column:t,startX:e.clientX,startWidth:this.columnWidths()[t]};document.addEventListener("mousemove",this.onResizeMove),document.addEventListener("mouseup",this.onResizeEnd)}onResizeMove=t=>{let e=this.resizeState;if(!e)return;let i=t.clientX-e.startX,r=e.column==="graph"?this.graphWidth():48,o=Math.max(r,e.startWidth+i);this.columnWidths.update(s=>re(H({},s),{[e.column]:o}))};onResizeEnd=()=>{this.resizeState&&fd(Yx,this.columnWidths()),this.resizeState=null,document.removeEventListener("mousemove",this.onResizeMove),document.removeEventListener("mouseup",this.onResizeEnd)};ngOnDestroy(){this.onResizeEnd(),this.graphSubscription?.unsubscribe()}onRowContextMenu(t,e){t.preventDefault(),t.stopPropagation(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:{kind:"commit",commit:e}})}onBadgeContextMenu(t,e,i){t.preventDefault(),t.stopPropagation(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:{kind:i.type==="tag"?"tag":"branch",commit:e,branch:i}})}onWorkingContextMenu(t){t.preventDefault(),t.stopPropagation(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:{kind:"working"}})}onStashContextMenu(t,e){t.preventDefault(),t.stopPropagation(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:{kind:"stash",stash:e}})}highlight(t){let e=this.search().trim().toLowerCase();if(!e||!t)return[{text:t,match:!1}];let i=[],r=t.toLowerCase(),o=0,s=r.indexOf(e);for(;s!==-1;)s>o&&i.push({text:t.slice(o,s),match:!1}),i.push({text:t.slice(s,s+e.length),match:!0}),o=s+e.length,s=r.indexOf(e,o);return o<t.length&&i.push({text:t.slice(o),match:!1}),i.length>0?i:[{text:t,match:!1}]}onLoadMoreCommits(){this.loadMoreRequested.emit()}onLoadAllCommits(){this.loadAllRequested.emit()}trackByHash(t,e){return e.commit.hash}badges(t){let e=this.selectedBranches(),i=this.showRemote();return Gx(t.refs).filter(r=>r.type==="tag"&&!this.showTags()||r.type==="remote"&&!i?!1:!e.length||r.type==="tag"?!0:e.includes(r.name))}isHead(t){return Yh(t)}laneX(t){return Wx+Qh/2+t*Qh}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-commit-table"]],viewQuery:function(e,i){e&1&&st(i.viewport,ma,5),e&2&&Ot()},inputs:{commits:[1,"commits"],selectedHash:[1,"selectedHash"],identity:[1,"identity"],search:[1,"search"],showGraph:[1,"showGraph"],selectedBranches:[1,"selectedBranches"],showRemote:[1,"showRemote"],workingChanges:[1,"workingChanges"],stashes:[1,"stashes"],showStashes:[1,"showStashes"],showTags:[1,"showTags"],issueLinking:[1,"issueLinking"],unloaded:[1,"unloaded"],historyLoading:[1,"historyLoading"],loadingLabel:[1,"loadingLabel"],scrollToHash:[1,"scrollToHash"]},outputs:{commitClick:"commitClick",contextMenu:"contextMenu",loadMoreRequested:"loadMoreRequested",loadAllRequested:"loadAllRequested"},decls:31,vars:24,consts:[[1,"table"],[1,"pinned-clip"],[1,"table-head"],[1,"head-cell","cell-graph",3,"width"],[1,"head-cell","cell-desc"],[1,"head-label"],[1,"resizer",3,"mousedown"],[1,"head-cell","cell-date"],[1,"head-cell","cell-author"],[1,"head-cell","cell-commit"],[1,"row","working-row",3,"width","transform","selected"],[1,"row","stash-row",3,"width","transform","selected"],[1,"table-body"],["role","status",1,"table-loading"],[1,"list-container"],[1,"graph-clip",3,"width"],[1,"list-viewport",3,"itemSize"],["class","row",3,"width","selected","click","contextmenu",4,"cdkVirtualFor","cdkVirtualForOf","cdkVirtualForTrackBy"],[1,"empty"],[1,"load-actions"],[1,"head-cell","cell-graph"],[1,"row","working-row",3,"click","contextmenu"],[1,"cell","cell-graph",3,"width"],[1,"cell","cell-desc"],[1,"badge","badge-working"],["viewBox","0 0 24 24","aria-hidden","true",1,"badge-icon"],["cx","12","cy","12","r","3"],["d","M12 2v3"],["d","M12 19v3"],["d","M2 12h3"],["d","M19 12h3"],[1,"badge-name"],[1,"cell","cell-date"],[1,"cell","cell-author"],[1,"cell","cell-commit"],[1,"cell","cell-graph"],["viewBox","0 0 24 24","aria-hidden","true",1,"working-icon"],["d","M12 20h9"],["d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"],[1,"count-badge","count-staged"],[1,"count-badge","count-unstaged"],[1,"count-badge","count-untracked"],[1,"row","stash-row",3,"click","contextmenu"],[1,"badge","badge-stash",3,"title"],["d","M21 8v13H3V8M1 3h22v5H1z"],["x1","10","y1","12","x2","14","y2","12"],[1,"message",3,"title"],[1,"cell","cell-author",3,"title"],[1,"cell","cell-commit",3,"title"],["viewBox","0 0 24 24","aria-hidden","true",1,"stash-icon"],[1,"hl"],[3,"name","email"],[1,"spinner"],[1,"graph-clip"],["aria-hidden","true",1,"graph-overlay"],["fill","none","stroke-width","2"],["r","5.5","fill","#1e1e1e","stroke-width","2"],["r","4"],[1,"row",3,"click","contextmenu"],[3,"class"],[1,"message"],[3,"text","search","linking"],[3,"contextmenu"],["x1","6","y1","3","x2","6","y2","15"],["cx","18","cy","6","r","3"],["cx","6","cy","18","r","3"],["d","M18 9a9 9 0 0 1-9 9"],["d","M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.83z"],["x1","7","y1","7","x2","7.01","y2","7"],[1,"load-more",3,"click"]],template:function(e,i){e&1&&(u(0,"div",0)(1,"div",1)(2,"div",2),E(3,iI,4,2,"div",3),u(4,"div",4)(5,"span",5),f(6,"Description"),p(),u(7,"div",6),C("mousedown",function(o){return i.startResize("description",o)}),p()(),u(8,"div",7)(9,"span",5),f(10,"Date"),p(),u(11,"div",6),C("mousedown",function(o){return i.startResize("date",o)}),p()(),u(12,"div",8)(13,"span",5),f(14,"Author"),p(),u(15,"div",6),C("mousedown",function(o){return i.startResize("author",o)}),p()(),u(16,"div",9)(17,"span",5),f(18,"Commit"),p(),u(19,"div",6),C("mousedown",function(o){return i.startResize("commit",o)}),p()()(),E(20,cI,19,17,"div",10),Z(21,mI,19,26,"div",11,eI),p(),u(23,"div",12),E(24,gI,3,1,"div",13),u(25,"div",14),E(26,yI,7,6,"div",15),u(27,"cdk-virtual-scroll-viewport",16),yt(28,kI,16,27,"div",17),p(),E(29,II,2,1,"div",18),p(),E(30,PI,5,1,"div",19),p()()),e&2&&(K("aria-busy",!!i.pendingLabel()),c(),se("width",i.viewportWidth(),"px"),c(),se("width",i.tableWidth(),"px")("transform",i.horizontalTransform()),c(),D(i.showGraph()?3:-1),c(),se("width",i.descriptionWidth(),"px"),c(4),se("width",i.columnWidths().date,"px"),c(4),se("width",i.columnWidths().author,"px"),c(4),se("width",i.columnWidths().commit,"px"),c(4),D(i.hasWorkingChanges()?20:-1),c(),Y(i.visibleStashes()),c(3),D(i.pendingLabel()?24:-1),c(2),D(i.showGraph()?26:-1),c(),S("itemSize",i.rowHeight),c(),S("cdkVirtualForOf",i.graphCommits())("cdkVirtualForTrackBy",i.trackByHash),c(),D(!i.pendingLabel()&&i.graphCommits().length===0?29:-1),c(),D(i.unloaded()>0&&!i.historyLoading()?30:-1))},dependencies:[Fn,$x,zx,ma,Mo,ra],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0}.table[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;width:100%;min-width:0;min-height:0}.table-head[_ngcontent-%COMP%]{display:flex;align-items:center;height:30px;flex:none;border-bottom:1px solid var(--border);background:var(--bg-alt);font-size:12px;font-weight:600;color:var(--text-bright);-webkit-user-select:none;user-select:none}.head-cell[_ngcontent-%COMP%]{position:relative;padding:0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:none}.head-cell.cell-desc[_ngcontent-%COMP%]{flex:none;min-width:0}.resizer[_ngcontent-%COMP%]{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;z-index:1}.resizer[_ngcontent-%COMP%]:hover, .resizer.active[_ngcontent-%COMP%]{background:var(--accent)}.table-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}.list-container[_ngcontent-%COMP%]{position:relative;flex:1;min-height:0}.list-viewport[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%}.graph-overlay[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;pointer-events:none}.row[_ngcontent-%COMP%]{display:flex;align-items:center;height:34px;flex:none;cursor:pointer;-webkit-user-select:none;user-select:none}.row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.row.selected[_ngcontent-%COMP%]{background:#04395e}.cell[_ngcontent-%COMP%]{padding:0 10px;overflow:hidden;white-space:nowrap;color:var(--text);min-width:0}.cell-graph[_ngcontent-%COMP%]{flex:none}.cell-desc[_ngcontent-%COMP%]{flex:none;display:flex;align-items:center;gap:6px}.cell-date[_ngcontent-%COMP%]{flex:none;text-align:right;color:var(--text-dim)}.cell-author[_ngcontent-%COMP%]{flex:none;text-align:right;text-overflow:ellipsis}.cell-commit[_ngcontent-%COMP%]{flex:none;text-align:right;font-family:var(--mono);color:var(--text-dim)}.working-row[_ngcontent-%COMP%]{flex:none;border-bottom:1px solid var(--border);background:#d7ba7d0a}.working-row[_ngcontent-%COMP%]:hover{background:#d7ba7d14}.working-row.selected[_ngcontent-%COMP%]{background:#4d3a12}.working-icon[_ngcontent-%COMP%]{width:14px;height:14px;margin-left:4px;fill:none;stroke:#d7ba7d;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.badge-working[_ngcontent-%COMP%]{background:#d7ba7d24;color:#d7ba7d;border-color:#d7ba7d66}.stash-row[_ngcontent-%COMP%]{flex:none;background:#c586c00a}.stash-row[_ngcontent-%COMP%]:hover{background:#c586c014}.stash-row.selected[_ngcontent-%COMP%]{background:#4d2a49}.stash-row[_ngcontent-%COMP%]:last-child{border-bottom:1px solid var(--border)}.stash-icon[_ngcontent-%COMP%]{width:14px;height:14px;margin-left:4px;fill:none;stroke:#c586c0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.badge-stash[_ngcontent-%COMP%]{background:#c586c024;color:#c586c0;border-color:#c586c066}.count-badge[_ngcontent-%COMP%]{flex:none;padding:1px 7px;border-radius:10px;font-size:11px;line-height:16px;white-space:nowrap}.count-staged[_ngcontent-%COMP%]{background:#89d18524;color:#89d185}.count-unstaged[_ngcontent-%COMP%]{background:#f4877124;color:#f48771}.count-untracked[_ngcontent-%COMP%]{background:#3794ff24;color:#4fc1ff}.hl[_ngcontent-%COMP%]{background:#613214;color:#f5c04a;border-radius:2px;padding:0 1px}.message[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;font-weight:400}.message.head[_ngcontent-%COMP%]{font-weight:600;color:var(--text-bright)}.badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;flex:none;padding:1px 7px;border-radius:10px;border:1px solid transparent;font-size:11px;line-height:16px;white-space:nowrap}.badge-head[_ngcontent-%COMP%]{background:#0078d4;color:#fff}.badge-local[_ngcontent-%COMP%]{background:#3794ff24;color:#4fc1ff;border-color:#3794ff66}.badge-remote[_ngcontent-%COMP%]{background:#ffffff0f;color:#b8b8b8;border-color:#4a4a4a}.badge-tag[_ngcontent-%COMP%]{background:#d7ba7d1f;color:#d7ba7d;border-color:#d7ba7d66}.badge-icon[_ngcontent-%COMP%]{width:10px;height:10px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.badge-name[_ngcontent-%COMP%]{max-width:160px;overflow:hidden;text-overflow:ellipsis}.empty[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:240px;color:var(--text-dim)}.load-more[_ngcontent-%COMP%]{display:block;width:100%;padding:10px;background:transparent;border:none;border-top:1px solid var(--border);color:var(--accent);cursor:pointer;font-size:12px;font-family:inherit}.load-more[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.load-actions[_ngcontent-%COMP%]{display:flex;border-top:1px solid var(--border)}.load-actions[_ngcontent-%COMP%] .load-more[_ngcontent-%COMP%]{border-top:none}.load-actions[_ngcontent-%COMP%] .load-more[_ngcontent-%COMP%] + .load-more[_ngcontent-%COMP%]{border-left:1px solid var(--border)}.history-loading[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:10px;border-top:1px solid var(--border);color:var(--text-dim);font-size:12px}.pinned-clip[_ngcontent-%COMP%]{overflow:hidden;flex:none;max-width:100%}.table-body[_ngcontent-%COMP%]{position:relative}.graph-clip[_ngcontent-%COMP%]{position:absolute;inset:0 auto 0 0;overflow:hidden;pointer-events:none;z-index:1}.table-head[_ngcontent-%COMP%], .row[_ngcontent-%COMP%]{box-sizing:border-box}.head-cell.cell-desc[_ngcontent-%COMP%], .cell-desc[_ngcontent-%COMP%]{min-width:280px}.empty[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}.table-loading[_ngcontent-%COMP%]{position:absolute;top:8px;left:50%;transform:translate(-50%);z-index:3;display:flex;align-items:center;gap:8px;padding:8px 12px;border:1px solid var(--border);border-radius:4px;background:var(--bg-alt);color:var(--text);font-size:12px;white-space:nowrap}.spinner[_ngcontent-%COMP%]{width:14px;height:14px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner[_ngcontent-%COMP%]{animation:none}}.cell-author[_ngcontent-%COMP%] app-author-avatar[_ngcontent-%COMP%]{margin-right:6px}"],changeDetection:0})};function AI(n,t){n&1&&ee(0,"div",2)}function LI(n,t){if(n&1){let e=I();b(0,"button",4),F("click",function(){g(e);let r=d().$implicit,o=d(2);return _(o.onSelect(r))}),f(1),y()}if(n&2){let e=d().$implicit;te("danger",e.danger),G("disabled",e.disabled),c(),$(" ",e.label," ")}}function FI(n,t){if(n&1&&E(0,AI,1,0,"div",2)(1,LI,2,4,"button",3),n&2){let e=t.$implicit;D(e.separator?0:1)}}function VI(n,t){if(n&1){let e=I();b(0,"div",0),F("click",function(){g(e);let r=d();return _(r.closed.emit())})("contextmenu",function(r){g(e);let o=d();return r.preventDefault(),_(o.closed.emit())}),y(),b(1,"div",1),Z(2,FI,2,1,null,null,qn),y()}if(n&2){let e=d();c(),se("left",e.left(),"px")("top",e.top(),"px"),c(),Y(t.items)}}var Oo=class n{menu=N.required();select=W();closed=W();left=R(()=>{let t=this.menu();return t?Math.max(4,Math.min(t.x,window.innerWidth-250)):0});top=R(()=>{let t=this.menu();if(!t)return 0;let e=t.items.length*30+12;return Math.max(4,Math.min(t.y,window.innerHeight-e-8))});onEscape(){this.menu()&&this.closed.emit()}onSelect(t){t.disabled||!t.action||(this.select.emit(t.action),this.closed.emit())}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-context-menu"]],hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},inputs:{menu:[1,"menu"]},outputs:{select:"select",closed:"closed"},decls:1,vars:1,consts:[[1,"backdrop",3,"click","contextmenu"],["role","menu",1,"menu"],[1,"separator"],["role","menuitem",1,"item",3,"danger","disabled"],["role","menuitem",1,"item",3,"click","disabled"]],template:function(e,i){if(e&1&&E(0,VI,4,4),e&2){let r;D((r=i.menu())?0:-1,r)}},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:300}.menu[_ngcontent-%COMP%]{position:fixed;min-width:210px;max-width:300px;padding:4px;display:flex;flex-direction:column;background:var(--bg-alt);border:1px solid var(--border);border-radius:6px;box-shadow:0 6px 24px #0000008c;z-index:301}.item[_ngcontent-%COMP%]{display:block;width:100%;padding:6px 10px;border:none;border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;text-align:left;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.item[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.item[_ngcontent-%COMP%]:disabled{color:var(--text-dim);opacity:.55;cursor:default}.item.danger[_ngcontent-%COMP%]{color:var(--red)}.item.danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#f487711f;color:#f48771}.separator[_ngcontent-%COMP%]{height:1px;margin:4px 6px;background:var(--border);flex:none}"],changeDetection:0})};function tt(n){n||(n=O(ot));let t=new pe(e=>{if(n.destroyed){e.next();return}return n.onDestroy(e.next.bind(e))});return e=>e.pipe(Gi(t))}function Dr(n,t){let e=t?.injector??O(kt),i=new zi(1),r=ge(()=>{let o;try{o=n()}catch(s){ze(()=>i.error(s));return}ze(()=>i.next(o))},{injector:e,manualCleanup:!0});return e.get(ot).onDestroy(()=>{r.destroy(),i.complete()}),i.asObservable()}var Qx=(n,t)=>t.id;function BI(n,t){if(n&1){let e=I();u(0,"span",2)(1,"span",7),f(2),p(),u(3,"button",8),C("click",function(){let r=g(e).$implicit,o=d();return _(o.remove.emit(r))}),f(4," \xD7 "),p()()}if(n&2){let e=t.$implicit,i=d();c(),S("title",e.description??e.label),c(),P(e.label),c(),S("disabled",i.disabled()),K("aria-label","Remove "+e.label)}}function jI(n,t){if(n&1){let e=I();u(0,"button",9),C("mousedown",function(r){return g(e),_(r.preventDefault())})("click",function(){g(e);let r=d();return _(r.trailingAction.emit())}),f(1),p()}if(n&2){let e=d();te("on",e.trailingPressed()),S("title",e.trailingLabel())("disabled",e.disabled()),K("aria-pressed",e.trailingPressed())("aria-label",e.trailingLabel()),c(),$(" ",e.trailingIcon()," ")}}function $I(n,t){if(n&1&&j(0,"app-error-banner",5),n&2){let e=d();S("message",e.error())}}function HI(n,t){n&1&&(u(0,"li",10),f(1,"Searching..."),p())}function zI(n,t){n&1&&(u(0,"li",10),f(1,"No matches"),p())}function UI(n,t){if(n&1&&(u(0,"span",14),f(1),p()),n&2){let e=d().$implicit;c(),P(e.description)}}function GI(n,t){if(n&1){let e=I();u(0,"li",12),C("mousedown",function(r){let o=g(e).$implicit,s=d(2);return _(s.onSuggestionMouseDown(r,o))}),u(1,"span",13),f(2),p(),E(3,UI,2,1,"span",14),p()}if(n&2){let e=t.$implicit,i=t.$index,r=d(2);te("active",i===r.highlight()),K("aria-selected",i===r.highlight()),c(2),P(e.label),c(),D(e.description?3:-1)}}function WI(n,t){if(n&1&&(u(0,"ul",6),E(1,HI,2,0,"li",10),E(2,zI,2,0,"li",10),Z(3,GI,4,5,"li",11,Qx),p()),n&2){let e=d();c(),D(e.loading()?1:-1),c(),D(!e.loading()&&!e.error()&&!e.suggestions().length?2:-1),c(),Y(e.suggestions())}}var Ro=class n{placeholder=N("");chips=N([]);suggestions=N([]);loading=N(!1);query=N("");disabled=N(!1);allowFreeText=N(!1);error=N("");trailingIcon=N("");trailingLabel=N("");trailingPressed=N(!1);queryChange=W();select=W();remove=W();trailingAction=W();open=v(!1);highlight=v(0);onInput(t){this.queryChange.emit(t.target.value),this.open.set(!0),this.highlight.set(0)}onKeydown(t){let e=this.suggestions();if(t.key==="ArrowDown"&&e.length)t.preventDefault(),this.highlight.update(i=>Math.min(i+1,e.length-1));else if(t.key==="ArrowUp"&&e.length)t.preventDefault(),this.highlight.update(i=>Math.max(i-1,0));else if(t.key==="Enter"){t.preventDefault();let i=e[this.highlight()];if(i){this.pick(i);return}let r=this.query().trim();this.allowFreeText()&&r&&(this.open.set(!1),this.select.emit({id:r.toLowerCase(),label:r}))}else t.key==="Escape"&&this.open()&&(t.stopPropagation(),this.open.set(!1))}pick(t){this.open.set(!1),this.select.emit(t)}onSuggestionMouseDown(t,e){t.preventDefault(),this.pick(e)}onBlur(){setTimeout(()=>this.open.set(!1),120)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-chip-input"]],inputs:{placeholder:[1,"placeholder"],chips:[1,"chips"],suggestions:[1,"suggestions"],loading:[1,"loading"],query:[1,"query"],disabled:[1,"disabled"],allowFreeText:[1,"allowFreeText"],error:[1,"error"],trailingIcon:[1,"trailingIcon"],trailingLabel:[1,"trailingLabel"],trailingPressed:[1,"trailingPressed"]},outputs:{queryChange:"queryChange",select:"select",remove:"remove",trailingAction:"trailingAction"},decls:8,vars:6,consts:[[1,"chip-input"],[1,"chip-row"],[1,"chip"],["type","text",1,"chip-query",3,"input","keydown","focus","blur","value","disabled"],["type","button",1,"chip-trailing",3,"on","title","disabled"],[3,"message"],["role","listbox",1,"suggestions"],[1,"chip-label",3,"title"],["type","button",1,"chip-remove",3,"click","disabled"],["type","button",1,"chip-trailing",3,"mousedown","click","title","disabled"],[1,"suggestion-hint"],["role","option",3,"active"],["role","option",3,"mousedown"],[1,"suggestion-label"],[1,"suggestion-desc"]],template:function(e,i){e&1&&(u(0,"div",0)(1,"div",1),Z(2,BI,5,4,"span",2,Qx),u(4,"input",3),C("input",function(o){return i.onInput(o)})("keydown",function(o){return i.onKeydown(o)})("focus",function(){return i.open.set(!0)})("blur",function(){return i.onBlur()}),p(),E(5,jI,2,7,"button",4),p(),E(6,$I,1,1,"app-error-banner",5),E(7,WI,5,2,"ul",6),p()),e&2&&(c(2),Y(i.chips()),c(2),S("value",i.query())("disabled",i.disabled()),K("placeholder",i.chips().length?"":i.placeholder()),c(),D(i.trailingIcon()?5:-1),c(),D(i.error()?6:-1),c(),D(i.open()&&(i.loading()||i.suggestions().length>0||i.query().trim())?7:-1))},dependencies:[pt],styles:[".chip-input[_ngcontent-%COMP%]{position:relative}.chip-row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:4px;align-items:center;padding:4px 6px;border:1px solid var(--border);border-radius:4px;background:var(--bg)}.chip-row[_ngcontent-%COMP%]:focus-within{border-color:var(--accent)}.chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:2px;padding:2px 4px 2px 8px;border-radius:3px;background:var(--bg-hover);font-size:12px;color:var(--text);max-width:100%}.chip-label[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chip-remove[_ngcontent-%COMP%]{border:none;background:transparent;color:var(--text-dim);font-size:13px;line-height:1;cursor:pointer;padding:2px 4px}.chip-remove[_ngcontent-%COMP%]:hover:not(:disabled){color:#f48771}.chip-query[_ngcontent-%COMP%]{flex:1;min-width:90px;border:none;background:transparent;color:var(--text);font-size:12px;font-family:inherit;outline:none;padding:2px}.chip-trailing[_ngcontent-%COMP%]{flex:none;width:22px;height:22px;padding:0;border:none;border-radius:3px;background:transparent;color:var(--text-dim);font-size:14px;line-height:1;cursor:pointer}.chip-trailing[_ngcontent-%COMP%]:hover:not(:disabled), .chip-trailing.on[_ngcontent-%COMP%]{color:#dcb67a;background:#dcb67a1f}.suggestions[_ngcontent-%COMP%]{position:absolute;top:100%;left:0;right:0;z-index:20;margin:4px 0 0;padding:4px 0;list-style:none;background:var(--bg-alt);border:1px solid var(--border);border-radius:4px;box-shadow:0 6px 18px #00000080;max-height:200px;overflow-y:auto}.suggestions[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:6px 10px;font-size:12px;cursor:pointer}.suggestions[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover, .suggestions[_ngcontent-%COMP%] li.active[_ngcontent-%COMP%]{background:var(--bg-hover)}.suggestion-hint[_ngcontent-%COMP%]{color:var(--text-dim);cursor:default}.suggestion-label[_ngcontent-%COMP%]{color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.suggestion-desc[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"],changeDetection:0})};function em(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Mr=em();function ny(n){Mr=n}var va={exec:()=>null};function Se(n,t=""){let e=typeof n=="string"?n:n.source,i={replace:(r,o)=>{let s=typeof o=="string"?o:o.source;return s=s.replace(Rt.caret,"$1"),e=e.replace(r,s),i},getRegex:()=>new RegExp(e,t)};return i}var Rt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},qI=/^(?:[ \t]*(?:\n|$))+/,ZI=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,YI=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ba=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,QI=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tm=/(?:[*+-]|\d{1,9}[.)])/,iy=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ry=Se(iy).replace(/bull/g,tm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),KI=Se(iy).replace(/bull/g,tm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),nm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,XI=/^[^\n]+/,im=/(?!\s*\])(?:\\.|[^\[\]\\])+/,JI=Se(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",im).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),eP=Se(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tm).getRegex(),xd="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",rm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,tP=Se("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",rm).replace("tag",xd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),oy=Se(nm).replace("hr",ba).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xd).getRegex(),nP=Se(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",oy).getRegex(),om={blockquote:nP,code:ZI,def:JI,fences:YI,heading:QI,hr:ba,html:tP,lheading:ry,list:eP,newline:qI,paragraph:oy,table:va,text:XI},Kx=Se("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ba).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xd).getRegex(),iP=re(H({},om),{lheading:KI,table:Kx,paragraph:Se(nm).replace("hr",ba).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Kx).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xd).getRegex()}),rP=re(H({},om),{html:Se(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",rm).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:va,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Se(nm).replace("hr",ba).replace("heading",` *#{1,6} *[^
|
|
7
|
-
]`).replace("lheading",ry).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),oP=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,sP=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,sy=/^( {2,}|\\)\n(?!\s*$)/,aP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,yd=/[\p{P}\p{S}]/u,sm=/[\s\p{P}\p{S}]/u,ay=/[^\s\p{P}\p{S}]/u,lP=Se(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,sm).getRegex(),ly=/(?!~)[\p{P}\p{S}]/u,cP=/(?!~)[\s\p{P}\p{S}]/u,dP=/(?:[^\s\p{P}\p{S}]|~)/u,uP=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,cy=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,pP=Se(cy,"u").replace(/punct/g,yd).getRegex(),fP=Se(cy,"u").replace(/punct/g,ly).getRegex(),dy="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hP=Se(dy,"gu").replace(/notPunctSpace/g,ay).replace(/punctSpace/g,sm).replace(/punct/g,yd).getRegex(),mP=Se(dy,"gu").replace(/notPunctSpace/g,dP).replace(/punctSpace/g,cP).replace(/punct/g,ly).getRegex(),gP=Se("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ay).replace(/punctSpace/g,sm).replace(/punct/g,yd).getRegex(),_P=Se(/\\(punct)/,"gu").replace(/punct/g,yd).getRegex(),vP=Se(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),bP=Se(rm).replace("(?:-->|$)","-->").getRegex(),xP=Se("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",bP).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_d=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,yP=Se(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",_d).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),uy=Se(/^!?\[(label)\]\[(ref)\]/).replace("label",_d).replace("ref",im).getRegex(),py=Se(/^!?\[(ref)\](?:\[\])?/).replace("ref",im).getRegex(),CP=Se("reflink|nolink(?!\\()","g").replace("reflink",uy).replace("nolink",py).getRegex(),am={_backpedal:va,anyPunctuation:_P,autolink:vP,blockSkip:uP,br:sy,code:sP,del:va,emStrongLDelim:pP,emStrongRDelimAst:hP,emStrongRDelimUnd:gP,escape:oP,link:yP,nolink:py,punctuation:lP,reflink:uy,reflinkSearch:CP,tag:xP,text:aP,url:va},wP=re(H({},am),{link:Se(/^!?\[(label)\]\((.*?)\)/).replace("label",_d).getRegex(),reflink:Se(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_d).getRegex()}),Kh=re(H({},am),{emStrongRDelimAst:mP,emStrongLDelim:fP,url:Se(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),EP=re(H({},Kh),{br:Se(sy).replace("{2,}","*").getRegex(),text:Se(Kh.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),md={normal:om,gfm:iP,pedantic:rP},ga={normal:am,gfm:Kh,breaks:EP,pedantic:wP},DP={"&":"&","<":"<",">":">",'"':""","'":"'"},Xx=n=>DP[n];function Vn(n,t){if(t){if(Rt.escapeTest.test(n))return n.replace(Rt.escapeReplace,Xx)}else if(Rt.escapeTestNoEncode.test(n))return n.replace(Rt.escapeReplaceNoEncode,Xx);return n}function Jx(n){try{n=encodeURI(n).replace(Rt.percentDecode,"%")}catch{return null}return n}function ey(n,t){let e=n.replace(Rt.findPipe,(o,s,a)=>{let l=!1,h=s;for(;--h>=0&&a[h]==="\\";)l=!l;return l?"|":" |"}),i=e.split(Rt.splitPipe),r=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(Rt.slashPipe,"|");return i}function _a(n,t,e){let i=n.length;if(i===0)return"";let r=0;for(;r<i;){let o=n.charAt(i-r-1);if(o===t&&!e)r++;else if(o!==t&&e)r++;else break}return n.slice(0,i-r)}function SP(n,t){if(n.indexOf(t[1])===-1)return-1;let e=0;for(let i=0;i<n.length;i++)if(n[i]==="\\")i++;else if(n[i]===t[0])e++;else if(n[i]===t[1]&&(e--,e<0))return i;return e>0?-2:-1}function ty(n,t,e,i,r){let o=t.href,s=t.title||null,a=n[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:n[0].charAt(0)==="!"?"image":"link",raw:e,href:o,title:s,text:a,tokens:i.inlineTokens(a)};return i.state.inLink=!1,l}function MP(n,t,e){let i=n.match(e.other.indentCodeCompensation);if(i===null)return t;let r=i[1];return t.split(`
|
|
8
|
-
`).map(o=>{let s=o.match(e.other.beginningSpace);if(s===null)return o;let[a]=s;return a.length>=r.length?o.slice(r.length):o}).join(`
|
|
9
|
-
`)}var vd=class{options;rules;lexer;constructor(n){this.options=n||Mr}space(n){let t=this.rules.block.newline.exec(n);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(n){let t=this.rules.block.code.exec(n);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:_a(e,`
|
|
10
|
-
`)}}}fences(n){let t=this.rules.block.fences.exec(n);if(t){let e=t[0],i=MP(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(n){let t=this.rules.block.heading.exec(n);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let i=_a(e,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(e=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(n){let t=this.rules.block.hr.exec(n);if(t)return{type:"hr",raw:_a(t[0],`
|
|
11
|
-
`)}}blockquote(n){let t=this.rules.block.blockquote.exec(n);if(t){let e=_a(t[0],`
|
|
12
|
-
`).split(`
|
|
13
|
-
`),i="",r="",o=[];for(;e.length>0;){let s=!1,a=[],l;for(l=0;l<e.length;l++)if(this.rules.other.blockquoteStart.test(e[l]))a.push(e[l]),s=!0;else if(!s)a.push(e[l]);else break;e=e.slice(l);let h=a.join(`
|
|
14
|
-
`),m=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
15
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
16
|
-
${h}`:h,r=r?`${r}
|
|
17
|
-
${m}`:m;let w=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,o,!0),this.lexer.state.top=w,e.length===0)break;let M=o.at(-1);if(M?.type==="code")break;if(M?.type==="blockquote"){let T=M,A=T.raw+`
|
|
18
|
-
`+e.join(`
|
|
19
|
-
`),z=this.blockquote(A);o[o.length-1]=z,i=i.substring(0,i.length-T.raw.length)+z.raw,r=r.substring(0,r.length-T.text.length)+z.text;break}else if(M?.type==="list"){let T=M,A=T.raw+`
|
|
20
|
-
`+e.join(`
|
|
21
|
-
`),z=this.list(A);o[o.length-1]=z,i=i.substring(0,i.length-M.raw.length)+z.raw,r=r.substring(0,r.length-T.raw.length)+z.raw,e=A.substring(o.at(-1).raw.length).split(`
|
|
22
|
-
`);continue}}return{type:"blockquote",raw:i,tokens:o,text:r}}}list(n){let t=this.rules.block.list.exec(n);if(t){let e=t[1].trim(),i=e.length>1,r={type:"list",raw:"",ordered:i,start:i?+e.slice(0,-1):"",loose:!1,items:[]};e=i?`\\d{1,9}\\${e.slice(-1)}`:`\\${e}`,this.options.pedantic&&(e=i?e:"[*+-]");let o=this.rules.other.listItemRegex(e),s=!1;for(;n;){let l=!1,h="",m="";if(!(t=o.exec(n))||this.rules.block.hr.test(n))break;h=t[0],n=n.substring(h.length);let w=t[2].split(`
|
|
23
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,U=>" ".repeat(3*U.length)),M=n.split(`
|
|
24
|
-
`,1)[0],T=!w.trim(),A=0;if(this.options.pedantic?(A=2,m=w.trimStart()):T?A=t[1].length+1:(A=t[2].search(this.rules.other.nonSpaceChar),A=A>4?1:A,m=w.slice(A),A+=t[1].length),T&&this.rules.other.blankLine.test(M)&&(h+=M+`
|
|
25
|
-
`,n=n.substring(M.length+1),l=!0),!l){let U=this.rules.other.nextBulletRegex(A),be=this.rules.other.hrRegex(A),qt=this.rules.other.fencesBeginRegex(A),je=this.rules.other.headingBeginRegex(A),ht=this.rules.other.htmlBeginRegex(A);for(;n;){let lt=n.split(`
|
|
26
|
-
`,1)[0],Zt;if(M=lt,this.options.pedantic?(M=M.replace(this.rules.other.listReplaceNesting," "),Zt=M):Zt=M.replace(this.rules.other.tabCharGlobal," "),qt.test(M)||je.test(M)||ht.test(M)||U.test(M)||be.test(M))break;if(Zt.search(this.rules.other.nonSpaceChar)>=A||!M.trim())m+=`
|
|
27
|
-
`+Zt.slice(A);else{if(T||w.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||qt.test(w)||je.test(w)||be.test(w))break;m+=`
|
|
28
|
-
`+M}!T&&!M.trim()&&(T=!0),h+=lt+`
|
|
29
|
-
`,n=n.substring(lt.length+1),w=Zt.slice(A)}}r.loose||(s?r.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(s=!0));let z=null,Q;this.options.gfm&&(z=this.rules.other.listIsTask.exec(m),z&&(Q=z[0]!=="[ ] ",m=m.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:h,task:!!z,checked:Q,loose:!1,text:m,tokens:[]}),r.raw+=h}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l=0;l<r.items.length;l++)if(this.lexer.state.top=!1,r.items[l].tokens=this.lexer.blockTokens(r.items[l].text,[]),!r.loose){let h=r.items[l].tokens.filter(w=>w.type==="space"),m=h.length>0&&h.some(w=>this.rules.other.anyLine.test(w.raw));r.loose=m}if(r.loose)for(let l=0;l<r.items.length;l++)r.items[l].loose=!0;return r}}html(n){let t=this.rules.block.html.exec(n);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(n){let t=this.rules.block.def.exec(n);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:r}}}table(n){let t=this.rules.block.table.exec(n);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let e=ey(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
30
|
-
`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(e.length===i.length){for(let s of i)this.rules.other.tableAlignRight.test(s)?o.align.push("right"):this.rules.other.tableAlignCenter.test(s)?o.align.push("center"):this.rules.other.tableAlignLeft.test(s)?o.align.push("left"):o.align.push(null);for(let s=0;s<e.length;s++)o.header.push({text:e[s],tokens:this.lexer.inline(e[s]),header:!0,align:o.align[s]});for(let s of r)o.rows.push(ey(s,o.header.length).map((a,l)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:o.align[l]})));return o}}lheading(n){let t=this.rules.block.lheading.exec(n);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(n){let t=this.rules.block.paragraph.exec(n);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
31
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(n){let t=this.rules.block.text.exec(n);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(n){let t=this.rules.inline.escape.exec(n);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(n){let t=this.rules.inline.tag.exec(n);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(n){let t=this.rules.inline.link.exec(n);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let o=_a(e.slice(0,-1),"\\");if((e.length-o.length)%2===0)return}else{let o=SP(t[2],"()");if(o===-2)return;if(o>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let i=t[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?i=i.slice(1):i=i.slice(1,-1)),ty(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(n,t){let e;if((e=this.rules.inline.reflink.exec(n))||(e=this.rules.inline.nolink.exec(n))){let i=(e[2]||e[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[i.toLowerCase()];if(!r){let o=e[0].charAt(0);return{type:"text",raw:o,text:o}}return ty(e,r,e[0],this.lexer,this.rules)}}emStrong(n,t,e=""){let i=this.rules.inline.emStrongLDelim.exec(n);if(!i||i[3]&&e.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!e||this.rules.inline.punctuation.exec(e)){let o=[...i[0]].length-1,s,a,l=o,h=0,m=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,t=t.slice(-1*n.length+o);(i=m.exec(t))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(a=[...s].length,i[3]||i[4]){l+=a;continue}else if((i[5]||i[6])&&o%3&&!((o+a)%3)){h+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l+h);let w=[...i[0]][0].length,M=n.slice(0,o+i.index+w+a);if(Math.min(o,a)%2){let A=M.slice(1,-1);return{type:"em",raw:M,text:A,tokens:this.lexer.inlineTokens(A)}}let T=M.slice(2,-2);return{type:"strong",raw:M,text:T,tokens:this.lexer.inlineTokens(T)}}}}codespan(n){let t=this.rules.inline.code.exec(n);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return i&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(n){let t=this.rules.inline.br.exec(n);if(t)return{type:"br",raw:t[0]}}del(n){let t=this.rules.inline.del.exec(n);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(n){let t=this.rules.inline.autolink.exec(n);if(t){let e,i;return t[2]==="@"?(e=t[1],i="mailto:"+e):(e=t[1],i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(n){let t;if(t=this.rules.inline.url.exec(n)){let e,i;if(t[2]==="@")e=t[0],i="mailto:"+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);e=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(n){let t=this.rules.inline.text.exec(n);if(t){let e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},Qn=class Xh{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Mr,this.options.tokenizer=this.options.tokenizer||new vd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:Rt,block:md.normal,inline:ga.normal};this.options.pedantic?(e.block=md.pedantic,e.inline=ga.pedantic):this.options.gfm&&(e.block=md.gfm,this.options.breaks?e.inline=ga.breaks:e.inline=ga.gfm),this.tokenizer.rules=e}static get rules(){return{block:md,inline:ga}}static lex(t,e){return new Xh(e).lex(t)}static lexInline(t,e){return new Xh(e).inlineTokens(t)}lex(t){t=t.replace(Rt.carriageReturn,`
|
|
32
|
-
`),this.blockTokens(t,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let i=this.inlineQueue[e];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],i=!1){for(this.options.pedantic&&(t=t.replace(Rt.tabCharGlobal," ").replace(Rt.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(s=>(r=s.call({lexer:this},t,e))?(t=t.substring(r.raw.length),e.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let s=e.at(-1);r.raw.length===1&&s!==void 0?s.raw+=`
|
|
33
|
-
`:e.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let s=e.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
|
|
34
|
-
`+r.raw,s.text+=`
|
|
35
|
-
`+r.text,this.inlineQueue.at(-1).src=s.text):e.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let s=e.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=`
|
|
36
|
-
`+r.raw,s.text+=`
|
|
37
|
-
`+r.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startBlock){let s=1/0,a=t.slice(1),l;this.options.extensions.startBlock.forEach(h=>{l=h.call({lexer:this},a),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(o=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let s=e.at(-1);i&&s?.type==="paragraph"?(s.raw+=`
|
|
38
|
-
`+r.raw,s.text+=`
|
|
39
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):e.push(r),i=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let s=e.at(-1);s?.type==="text"?(s.raw+=`
|
|
40
|
-
`+r.raw,s.text+=`
|
|
41
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):e.push(r);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let i=t,r=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)a.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,r.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,s="";for(;t;){o||(s=""),o=!1;let a;if(this.options.extensions?.inline?.some(h=>(a=h.call({lexer:this},t,e))?(t=t.substring(a.raw.length),e.push(a),!0):!1))continue;if(a=this.tokenizer.escape(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.tag(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.link(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(a.raw.length);let h=e.at(-1);a.type==="text"&&h?.type==="text"?(h.raw+=a.raw,h.text+=a.text):e.push(a);continue}if(a=this.tokenizer.emStrong(t,i,s)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.codespan(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.br(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.del(t)){t=t.substring(a.raw.length),e.push(a);continue}if(a=this.tokenizer.autolink(t)){t=t.substring(a.raw.length),e.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(t))){t=t.substring(a.raw.length),e.push(a);continue}let l=t;if(this.options.extensions?.startInline){let h=1/0,m=t.slice(1),w;this.options.extensions.startInline.forEach(M=>{w=M.call({lexer:this},m),typeof w=="number"&&w>=0&&(h=Math.min(h,w))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(a=this.tokenizer.inlineText(l)){t=t.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(s=a.raw.slice(-1)),o=!0;let h=e.at(-1);h?.type==="text"?(h.raw+=a.raw,h.text+=a.text):e.push(a);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return e}},bd=class{options;parser;constructor(n){this.options=n||Mr}space(n){return""}code({text:n,lang:t,escaped:e}){let i=(t||"").match(Rt.notSpaceStart)?.[0],r=n.replace(Rt.endingNewline,"")+`
|
|
42
|
-
`;return i?'<pre><code class="language-'+Vn(i)+'">'+(e?r:Vn(r,!0))+`</code></pre>
|
|
43
|
-
`:"<pre><code>"+(e?r:Vn(r,!0))+`</code></pre>
|
|
44
|
-
`}blockquote({tokens:n}){return`<blockquote>
|
|
45
|
-
${this.parser.parse(n)}</blockquote>
|
|
46
|
-
`}html({text:n}){return n}heading({tokens:n,depth:t}){return`<h${t}>${this.parser.parseInline(n)}</h${t}>
|
|
47
|
-
`}hr(n){return`<hr>
|
|
48
|
-
`}list(n){let t=n.ordered,e=n.start,i="";for(let s=0;s<n.items.length;s++){let a=n.items[s];i+=this.listitem(a)}let r=t?"ol":"ul",o=t&&e!==1?' start="'+e+'"':"";return"<"+r+o+`>
|
|
49
|
-
`+i+"</"+r+`>
|
|
50
|
-
`}listitem(n){let t="";if(n.task){let e=this.checkbox({checked:!!n.checked});n.loose?n.tokens[0]?.type==="paragraph"?(n.tokens[0].text=e+" "+n.tokens[0].text,n.tokens[0].tokens&&n.tokens[0].tokens.length>0&&n.tokens[0].tokens[0].type==="text"&&(n.tokens[0].tokens[0].text=e+" "+Vn(n.tokens[0].tokens[0].text),n.tokens[0].tokens[0].escaped=!0)):n.tokens.unshift({type:"text",raw:e+" ",text:e+" ",escaped:!0}):t+=e+" "}return t+=this.parser.parse(n.tokens,!!n.loose),`<li>${t}</li>
|
|
51
|
-
`}checkbox({checked:n}){return"<input "+(n?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:n}){return`<p>${this.parser.parseInline(n)}</p>
|
|
52
|
-
`}table(n){let t="",e="";for(let r=0;r<n.header.length;r++)e+=this.tablecell(n.header[r]);t+=this.tablerow({text:e});let i="";for(let r=0;r<n.rows.length;r++){let o=n.rows[r];e="";for(let s=0;s<o.length;s++)e+=this.tablecell(o[s]);i+=this.tablerow({text:e})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
53
|
-
<thead>
|
|
54
|
-
`+t+`</thead>
|
|
55
|
-
`+i+`</table>
|
|
56
|
-
`}tablerow({text:n}){return`<tr>
|
|
57
|
-
${n}</tr>
|
|
58
|
-
`}tablecell(n){let t=this.parser.parseInline(n.tokens),e=n.header?"th":"td";return(n.align?`<${e} align="${n.align}">`:`<${e}>`)+t+`</${e}>
|
|
59
|
-
`}strong({tokens:n}){return`<strong>${this.parser.parseInline(n)}</strong>`}em({tokens:n}){return`<em>${this.parser.parseInline(n)}</em>`}codespan({text:n}){return`<code>${Vn(n,!0)}</code>`}br(n){return"<br>"}del({tokens:n}){return`<del>${this.parser.parseInline(n)}</del>`}link({href:n,title:t,tokens:e}){let i=this.parser.parseInline(e),r=Jx(n);if(r===null)return i;n=r;let o='<a href="'+n+'"';return t&&(o+=' title="'+Vn(t)+'"'),o+=">"+i+"</a>",o}image({href:n,title:t,text:e,tokens:i}){i&&(e=this.parser.parseInline(i,this.parser.textRenderer));let r=Jx(n);if(r===null)return Vn(e);n=r;let o=`<img src="${n}" alt="${e}"`;return t&&(o+=` title="${Vn(t)}"`),o+=">",o}text(n){return"tokens"in n&&n.tokens?this.parser.parseInline(n.tokens):"escaped"in n&&n.escaped?n.text:Vn(n.text)}},lm=class{strong({text:n}){return n}em({text:n}){return n}codespan({text:n}){return n}del({text:n}){return n}html({text:n}){return n}text({text:n}){return n}link({text:n}){return""+n}image({text:n}){return""+n}br(){return""}},Kn=class Jh{options;renderer;textRenderer;constructor(t){this.options=t||Mr,this.options.renderer=this.options.renderer||new bd,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new lm}static parse(t,e){return new Jh(e).parse(t)}static parseInline(t,e){return new Jh(e).parseInline(t)}parse(t,e=!0){let i="";for(let r=0;r<t.length;r++){let o=t[r];if(this.options.extensions?.renderers?.[o.type]){let a=o,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){i+=l||"";continue}}let s=o;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let a=s,l=this.renderer.text(a);for(;r+1<t.length&&t[r+1].type==="text";)a=t[++r],l+=`
|
|
60
|
-
`+this.renderer.text(a);e?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}parseInline(t,e=this.renderer){let i="";for(let r=0;r<t.length;r++){let o=t[r];if(this.options.extensions?.renderers?.[o.type]){let a=this.options.extensions.renderers[o.type].call({parser:this},o);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=a||"";continue}}let s=o;switch(s.type){case"escape":{i+=e.text(s);break}case"html":{i+=e.html(s);break}case"link":{i+=e.link(s);break}case"image":{i+=e.image(s);break}case"strong":{i+=e.strong(s);break}case"em":{i+=e.em(s);break}case"codespan":{i+=e.codespan(s);break}case"br":{i+=e.br(s);break}case"del":{i+=e.del(s);break}case"text":{i+=e.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return i}},gd=class{options;block;constructor(t){this.options=t||Mr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?Qn.lex:Qn.lexInline}provideParser(){return this.block?Kn.parse:Kn.parseInline}},TP=class{defaults=em();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Kn;Renderer=bd;TextRenderer=lm;Lexer=Qn;Tokenizer=vd;Hooks=gd;constructor(...n){this.use(...n)}walkTokens(n,t){let e=[];for(let i of n)switch(e=e.concat(t.call(this,i)),i.type){case"table":{let r=i;for(let o of r.header)e=e.concat(this.walkTokens(o.tokens,t));for(let o of r.rows)for(let s of o)e=e.concat(this.walkTokens(s.tokens,t));break}case"list":{let r=i;e=e.concat(this.walkTokens(r.items,t));break}default:{let r=i;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let s=r[o].flat(1/0);e=e.concat(this.walkTokens(s,t))}):r.tokens&&(e=e.concat(this.walkTokens(r.tokens,t)))}}return e}use(...n){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return n.forEach(e=>{let i=H({},e);if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let o=t.renderers[r.name];o?t.renderers[r.name]=function(...s){let a=r.renderer.apply(this,s);return a===!1&&(a=o.apply(this,s)),a}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),i.extensions=t),e.renderer){let r=this.defaults.renderer||new bd(this.defaults);for(let o in e.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let s=o,a=e.renderer[s],l=r[s];r[s]=(...h)=>{let m=a.apply(r,h);return m===!1&&(m=l.apply(r,h)),m||""}}i.renderer=r}if(e.tokenizer){let r=this.defaults.tokenizer||new vd(this.defaults);for(let o in e.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let s=o,a=e.tokenizer[s],l=r[s];r[s]=(...h)=>{let m=a.apply(r,h);return m===!1&&(m=l.apply(r,h)),m}}i.tokenizer=r}if(e.hooks){let r=this.defaults.hooks||new gd;for(let o in e.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let s=o,a=e.hooks[s],l=r[s];gd.passThroughHooks.has(o)?r[s]=h=>{if(this.defaults.async)return Promise.resolve(a.call(r,h)).then(w=>l.call(r,w));let m=a.call(r,h);return l.call(r,m)}:r[s]=(...h)=>{let m=a.apply(r,h);return m===!1&&(m=l.apply(r,h)),m}}i.hooks=r}if(e.walkTokens){let r=this.defaults.walkTokens,o=e.walkTokens;i.walkTokens=function(s){let a=[];return a.push(o.call(this,s)),r&&(a=a.concat(r.call(this,s))),a}}this.defaults=H(H({},this.defaults),i)}),this}setOptions(n){return this.defaults=H(H({},this.defaults),n),this}lexer(n,t){return Qn.lex(n,t??this.defaults)}parser(n,t){return Kn.parse(n,t??this.defaults)}parseMarkdown(n){return(e,i)=>{let r=H({},i),o=H(H({},this.defaults),r),s=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=n);let a=o.hooks?o.hooks.provideLexer():n?Qn.lex:Qn.lexInline,l=o.hooks?o.hooks.provideParser():n?Kn.parse:Kn.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(e):e).then(h=>a(h,o)).then(h=>o.hooks?o.hooks.processAllTokens(h):h).then(h=>o.walkTokens?Promise.all(this.walkTokens(h,o.walkTokens)).then(()=>h):h).then(h=>l(h,o)).then(h=>o.hooks?o.hooks.postprocess(h):h).catch(s);try{o.hooks&&(e=o.hooks.preprocess(e));let h=a(e,o);o.hooks&&(h=o.hooks.processAllTokens(h)),o.walkTokens&&this.walkTokens(h,o.walkTokens);let m=l(h,o);return o.hooks&&(m=o.hooks.postprocess(m)),m}catch(h){return s(h)}}}onError(n,t){return e=>{if(e.message+=`
|
|
61
|
-
Please report this to https://github.com/markedjs/marked.`,n){let i="<p>An error occurred:</p><pre>"+Vn(e.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(e);throw e}}},Sr=new TP;function De(n,t){return Sr.parse(n,t)}De.options=De.setOptions=function(n){return Sr.setOptions(n),De.defaults=Sr.defaults,ny(De.defaults),De};De.getDefaults=em;De.defaults=Mr;De.use=function(...n){return Sr.use(...n),De.defaults=Sr.defaults,ny(De.defaults),De};De.walkTokens=function(n,t){return Sr.walkTokens(n,t)};De.parseInline=Sr.parseInline;De.Parser=Kn;De.parser=Kn.parse;De.Renderer=bd;De.TextRenderer=lm;De.Lexer=Qn;De.lexer=Qn.lex;De.Tokenizer=vd;De.Hooks=gd;De.parse=De;var tQ=De.options,nQ=De.setOptions,iQ=De.use,rQ=De.walkTokens,oQ=De.parseInline;var sQ=Kn.parse,aQ=Qn.lex;function fy(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,i=Array(t);e<t;e++)i[e]=n[e];return i}function kP(n){if(Array.isArray(n))return n}function IP(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var i,r,o,s,a=[],l=!0,h=!1;try{if(o=(e=e.call(n)).next,t!==0)for(;!(l=(i=o.call(e)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(m){h=!0,r=m}finally{try{if(!l&&e.return!=null&&(s=e.return(),Object(s)!==s))return}finally{if(h)throw r}}return a}}function PP(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
62
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OP(n,t){return kP(n)||IP(n,t)||RP(n,t)||PP()}function RP(n,t){if(n){if(typeof n=="string")return fy(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?fy(n,t):void 0}}var Ty=Object.entries,hy=Object.setPrototypeOf,NP=Object.isFrozen,AP=Object.getPrototypeOf,LP=Object.getOwnPropertyDescriptor,at=Object.freeze,ft=Object.seal,No=Object.create,ky=typeof Reflect<"u"&&Reflect,mm=ky.apply,gm=ky.construct;at||(at=function(t){return t});ft||(ft=function(t){return t});mm||(mm=function(t,e){for(var i=arguments.length,r=new Array(i>2?i-2:0),o=2;o<i;o++)r[o-2]=arguments[o];return t.apply(e,r)});gm||(gm=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return new t(...i)});var kr=nt(Array.prototype.forEach),FP=nt(Array.prototype.lastIndexOf),my=nt(Array.prototype.pop),xa=nt(Array.prototype.push),VP=nt(Array.prototype.splice),Ao=Array.isArray,wa=nt(String.prototype.toLowerCase),cm=nt(String.prototype.toString),gy=nt(String.prototype.match),ya=nt(String.prototype.replace),_y=nt(String.prototype.indexOf),BP=nt(String.prototype.trim),jP=nt(Number.prototype.toString),$P=nt(Boolean.prototype.toString),vy=typeof BigInt>"u"?null:nt(BigInt.prototype.toString),by=typeof Symbol>"u"?null:nt(Symbol.prototype.toString),$t=nt(Object.prototype.hasOwnProperty),Ca=nt(Object.prototype.toString),Et=nt(RegExp.prototype.test),Tr=HP(TypeError);function nt(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return mm(n,t,i)}}function HP(n){return function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return gm(n,e)}}function xe(n,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wa;if(hy&&hy(n,null),!Ao(t))return n;let i=t.length;for(;i--;){let r=t[i];if(typeof r=="string"){let o=e(r);o!==r&&(NP(t)||(t[i]=o),r=o)}n[r]=!0}return n}function zP(n){for(let t=0;t<n.length;t++)$t(n,t)||(n[t]=null);return n}function Wt(n){let t=No(null);for(let i of Ty(n)){var e=OP(i,2);let r=e[0],o=e[1];$t(n,r)&&(Ao(o)?t[r]=zP(o):o&&typeof o=="object"&&o.constructor===Object?t[r]=Wt(o):t[r]=o)}return t}function UP(n){switch(typeof n){case"string":return n;case"number":return jP(n);case"boolean":return $P(n);case"bigint":return vy?vy(n):"0";case"symbol":return by?by(n):"Symbol()";case"undefined":return Ca(n);case"function":case"object":{if(n===null)return Ca(n);let t=n,e=ln(t,"toString");if(typeof e=="function"){let i=e(t);return typeof i=="string"?i:Ca(i)}return Ca(n)}default:return Ca(n)}}function ln(n,t){for(;n!==null;){let i=LP(n,t);if(i){if(i.get)return nt(i.get);if(typeof i.value=="function")return nt(i.value)}n=AP(n)}function e(){return null}return e}function GP(n){try{return Et(n,""),!0}catch{return!1}}var xy=at(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),dm=at(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),um=at(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),WP=at(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),pm=at(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),qP=at(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),yy=at(["#text"]),Cy=at(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),fm=at(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),wy=at(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Cd=at(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ZP=ft(/{{[\w\W]*|^[\w\W]*}}/g),YP=ft(/<%[\w\W]*|^[\w\W]*%>/g),QP=ft(/\${[\w\W]*/g),KP=ft(/^data-[\-\w.\u00B7-\uFFFF]+$/),XP=ft(/^aria-[\-\w]+$/),Ey=ft(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),JP=ft(/^(?:\w+script|data):/i),eO=ft(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tO=ft(/^html$/i),nO=ft(/^[a-z][.\w]*(-[.\w]+)+$/i),Dy=ft(/<[/\w!]/g),Sy=ft(/<[/\w]/g),iO=ft(/<\/no(script|embed|frames)/i),rO=ft(/\/>/i),Gt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Iy=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],oO=at(xe({},Iy)),sO=(function(){let n={};return kr(Iy,t=>{n[t]=ft(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),at(n)})(),aO=function(){return typeof window>"u"?null:window},lO=function(t,e){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null,r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(i=e.getAttribute(r));let o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},My=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ki=function(t,e,i,r){return $t(t,e)&&Ao(t[e])?xe(r.base?Wt(r.base):{},t[e],r.transform):i},hm=function(t,e,i){let r=$t(t,e)?t[e]:void 0;return r&&typeof r=="object"?Wt(r):i()};function Py(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:aO(),t=V=>Py(V);if(t.version="3.4.15",t.removed=[],!n||!n.document||n.document.nodeType!==Gt.document||!n.Element)return t.isSupported=!1,t;let e=n.document,i=e,r=i.currentScript;n.DocumentFragment;let o=n.HTMLTemplateElement,s=n.Node,a=n.Element,l=n.NodeFilter,h=n.NamedNodeMap;h===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;let m=n.DOMParser,w=n.trustedTypes,M=a.prototype,T=ln(M,"cloneNode"),A=ln(M,"remove"),z=ln(M,"removeAttributeNode"),Q=ln(M,"nextSibling"),U=ln(M,"childNodes"),be=ln(M,"parentNode"),qt=ln(M,"shadowRoot"),je=ln(M,"attributes"),ht=s&&s.prototype?ln(s.prototype,"nodeType"):null,lt=s&&s.prototype?ln(s.prototype,"nodeName"):null,Zt=s&&s.prototype?ln(s.prototype,"ownerDocument"):null,Vo=function(x){return ht?ht(x):x.nodeType},Vd=function(x){return lt?lt(x):x.nodeName};if(typeof o=="function"){let V=e.createElement("template");V.content&&V.content.ownerDocument&&(e=V.content.ownerDocument)}let Nt,Oi="",Bd,xm=!1,Bo=0,ym=function(){if(Bo>0)throw Tr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Pr=function(x){ym(),Bo++;try{return Nt.createHTML(x)}finally{Bo--}},zy=function(x){ym(),Bo++;try{return Nt.createScriptURL(x)}finally{Bo--}},Uy=function(){return xm||(Bd=lO(w,r),xm=!0),Bd},Da=e,jd=Da.implementation,Cm=Da.createNodeIterator,Gy=Da.createDocumentFragment,Wy=Da.getElementsByTagName,qy=i.importNode,Le=My();t.isSupported=typeof Ty=="function"&&typeof be=="function"&&jd&&jd.createHTMLDocument!==void 0;let Zy=ZP,Yy=YP,Qy=QP,Ky=KP,Xy=XP,Jy=JP,wm=eO,eC=nO,Em=Ey,Fe=null,$d=xe({},[...xy,...dm,...um,...pm,...yy]),Ve=null,Hd=xe({},[...Cy,...fm,...wy,...Cd]),En=Object.seal(No(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),jo=null,Dm=null,Jn=Object.seal(No(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Sm=!0,zd=!0,Mm=!1,Tm=!0,ei=!1,Ri=!0,Ni=!1,Ud=!1,Sa=null,Ma=null,Gd=!1,Or=!1,Ta=!1,ka=!1,km=!0,Im=!1,Pm="user-content-",Wd=!0,qd=!1,Rr={},Nr=null,Om=xe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Rm=null,Nm=xe({},["audio","video","img","source","image","track"]),Am=null,Lm=xe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ia="http://www.w3.org/1998/Math/MathML",Pa="http://www.w3.org/2000/svg",Dn="http://www.w3.org/1999/xhtml",Ar=Dn,Zd=!1,Yd=null,tC=xe({},[Ia,Pa,Dn],cm),Fm=at(["mi","mo","mn","ms","mtext"]),Qd=xe({},Fm),Vm=at(["annotation-xml"]),Kd=xe({},Vm),nC=xe({},["title","style","font","a","script"]),$o=null,iC=["application/xhtml+xml","text/html"],rC="text/html",Ye=null,Lr=null,oC=e.createElement("form"),Bm=function(x){return x instanceof RegExp||x instanceof Function},Xd=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Lr&&Lr===x)return;(!x||typeof x!="object")&&(x={}),x=Wt(x),$o=iC.indexOf(x.PARSER_MEDIA_TYPE)===-1?rC:x.PARSER_MEDIA_TYPE,Ye=$o==="application/xhtml+xml"?cm:wa,Fe=ki(x,"ALLOWED_TAGS",$d,{transform:Ye}),Ve=ki(x,"ALLOWED_ATTR",Hd,{transform:Ye}),Yd=ki(x,"ALLOWED_NAMESPACES",tC,{transform:cm}),Am=ki(x,"ADD_URI_SAFE_ATTR",Lm,{transform:Ye,base:Lm}),Rm=ki(x,"ADD_DATA_URI_TAGS",Nm,{transform:Ye,base:Nm}),Nr=ki(x,"FORBID_CONTENTS",Om,{transform:Ye}),jo=ki(x,"FORBID_TAGS",Wt({}),{transform:Ye}),Dm=ki(x,"FORBID_ATTR",Wt({}),{transform:Ye}),Rr=$t(x,"USE_PROFILES")?x.USE_PROFILES&&typeof x.USE_PROFILES=="object"?Wt(x.USE_PROFILES):x.USE_PROFILES:!1,Sm=x.ALLOW_ARIA_ATTR!==!1,zd=x.ALLOW_DATA_ATTR!==!1,Mm=x.ALLOW_UNKNOWN_PROTOCOLS||!1,Tm=x.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ei=x.SAFE_FOR_TEMPLATES||!1,Ri=x.SAFE_FOR_XML!==!1,Ni=x.WHOLE_DOCUMENT||!1,Or=x.RETURN_DOM||!1,Ta=x.RETURN_DOM_FRAGMENT||!1,ka=x.RETURN_TRUSTED_TYPE||!1,Gd=x.FORCE_BODY||!1,km=x.SANITIZE_DOM!==!1,Im=x.SANITIZE_NAMED_PROPS||!1,Wd=x.KEEP_CONTENT!==!1,qd=x.IN_PLACE||!1,Em=GP(x.ALLOWED_URI_REGEXP)?x.ALLOWED_URI_REGEXP:Ey,Ar=typeof x.NAMESPACE=="string"?x.NAMESPACE:Dn,Qd=hm(x,"MATHML_TEXT_INTEGRATION_POINTS",()=>xe({},Fm)),Kd=hm(x,"HTML_INTEGRATION_POINTS",()=>xe({},Vm));let k=hm(x,"CUSTOM_ELEMENT_HANDLING",()=>No(null));if(En=No(null),$t(k,"tagNameCheck")&&Bm(k.tagNameCheck)&&(En.tagNameCheck=k.tagNameCheck),$t(k,"attributeNameCheck")&&Bm(k.attributeNameCheck)&&(En.attributeNameCheck=k.attributeNameCheck),$t(k,"allowCustomizedBuiltInElements")&&typeof k.allowCustomizedBuiltInElements=="boolean"&&(En.allowCustomizedBuiltInElements=k.allowCustomizedBuiltInElements),ft(En),ei&&(zd=!1),Ta&&(Or=!0),Rr&&(Fe=xe({},yy),Ve=No(null),Rr.html===!0&&(xe(Fe,xy),xe(Ve,Cy)),Rr.svg===!0&&(xe(Fe,dm),xe(Ve,fm),xe(Ve,Cd)),Rr.svgFilters===!0&&(xe(Fe,um),xe(Ve,fm),xe(Ve,Cd)),Rr.mathMl===!0&&(xe(Fe,pm),xe(Ve,wy),xe(Ve,Cd))),Jn.tagCheck=null,Jn.attributeCheck=null,$t(x,"ADD_TAGS")&&(typeof x.ADD_TAGS=="function"?Jn.tagCheck=x.ADD_TAGS:Ao(x.ADD_TAGS)&&(Fe===$d&&(Fe=Wt(Fe)),xe(Fe,x.ADD_TAGS,Ye))),$t(x,"ADD_ATTR")&&(typeof x.ADD_ATTR=="function"?Jn.attributeCheck=x.ADD_ATTR:Ao(x.ADD_ATTR)&&(Ve===Hd&&(Ve=Wt(Ve)),xe(Ve,x.ADD_ATTR,Ye))),$t(x,"ADD_FORBID_CONTENTS")&&Ao(x.ADD_FORBID_CONTENTS)&&(Nr===Om&&(Nr=Wt(Nr)),xe(Nr,x.ADD_FORBID_CONTENTS,Ye)),Wd&&(Fe["#text"]=!0),Ni&&xe(Fe,["html","head","body"]),Fe.table&&(xe(Fe,["tbody"]),delete jo.tbody),x.TRUSTED_TYPES_POLICY){if(typeof x.TRUSTED_TYPES_POLICY.createHTML!="function")throw Tr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof x.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Tr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let L=Nt;Nt=x.TRUSTED_TYPES_POLICY;try{Oi=Pr("")}catch(q){throw Nt=L,q}}else x.TRUSTED_TYPES_POLICY===null?(Nt=void 0,Oi=""):(Nt===void 0&&(Nt=Uy()),Nt&&typeof Oi=="string"&&(Oi=Pr("")));at&&at(x),Lr=x},jm=xe({},[...dm,...um,...WP]),$m=xe({},[...pm,...qP]),sC=function(x,k,L){return k.namespaceURI===Dn?x==="svg":k.namespaceURI===Ia?x==="svg"&&(L==="annotation-xml"||Qd[L]):!!jm[x]},aC=function(x,k,L){return k.namespaceURI===Dn?x==="math":k.namespaceURI===Pa?x==="math"&&Kd[L]:!!$m[x]},lC=function(x,k,L){return k.namespaceURI===Pa&&!Kd[L]||k.namespaceURI===Ia&&!Qd[L]?!1:!$m[x]&&(nC[x]||!jm[x])},cC=function(x){let k=be(x);(!k||!k.tagName)&&(k={namespaceURI:Ar,tagName:"template"});let L=wa(x.tagName),q=wa(k.tagName);return Yd[x.namespaceURI]?x.namespaceURI===Pa?sC(L,k,q):x.namespaceURI===Ia?aC(L,k,q):x.namespaceURI===Dn?lC(L,k,q):!!($o==="application/xhtml+xml"&&Yd[x.namespaceURI]):!1},ti=function(x){xa(t.removed,{element:x});try{be(x).removeChild(x)}catch{if(A(x),!be(x))throw Tr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Hm=function(x,k,L){try{z(x,k)}catch{try{x.removeAttribute(L)}catch{}}},Oa=function(x){Ra(x);let k=U(x);if(k){let q=[];kr(k,J=>{xa(q,J)}),kr(q,J=>{try{A(J)}catch{}})}let L=je(x);if(L)for(let q=L.length-1;q>=0;--q){let J=L[q],de=J&&J.name;typeof de=="string"&&Hm(x,J,de)}},Ai=function(x,k,L){if(!L)try{L=k.getAttributeNode(x)}catch{L=null}xa(t.removed,{attribute:L||null,from:k});try{L?z(k,L):k.removeAttribute(x)}catch{try{k.removeAttribute(x)}catch{}}if(x==="is")if(Or||Ta)try{ti(k)}catch{}else try{k.setAttribute(x,"")}catch{}},dC=function(x){let k=je(x);if(k)for(let L=k.length-1;L>=0;--L){let q=k[L],J=q&&q.name;typeof J!="string"||Ve[Ye(J)]||Hm(x,q,J)}},Ra=function(x){let k=[x];for(;k.length>0;){let L=k.pop();Vo(L)===Gt.element&&dC(L);let J=U(L);if(J)for(let de=J.length-1;de>=0;--de)k.push(J[de])}},zm=function(x,k){return Ri?x==="patchsrc"?!0:x==="for"&&k!=="label"&&k!=="output":!1},uC=function(x){if(!Ri)return;let k=[x];for(;k.length>0;){let L=k.pop(),q=Vo(L);if(q===Gt.processingInstruction||q===Gt.comment&&Et(Sy,L.data)){try{A(L)}catch{}continue}if(q===Gt.element){let de=L,Pe=Ye(Vd(L));try{de.hasAttribute&&de.hasAttribute("patchsrc")&&de.removeAttribute("patchsrc"),de.hasAttribute&&de.hasAttribute("for")&&zm("for",Pe)&&de.removeAttribute("for")}catch{}}let J=U(L);if(J)for(let de=J.length-1;de>=0;--de)k.push(J[de])}},Um=function(x){let k=null,L=null;if(Gd)x="<remove></remove>"+x;else{let de=gy(x,/^[\r\n\t ]+/);L=de&&de[0]}$o==="application/xhtml+xml"&&Ar===Dn&&(x='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+x+"</body></html>");let q=Nt?Pr(x):x;if(Ar===Dn)try{k=new m().parseFromString(q,$o)}catch{}if(!k||!k.documentElement){k=jd.createDocument(Ar,"template",null);try{k.documentElement.innerHTML=Zd?Oi:q}catch{}}let J=k.body||k.documentElement;return x&&L&&J.insertBefore(e.createTextNode(L),J.childNodes[0]||null),Ar===Dn?Wy.call(k,Ni?"html":"body")[0]:Ni?k.documentElement:J},Gm=function(x){let k=Zt?Zt(x):x.ownerDocument;return Cm.call(k||x,x,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Na=function(x){return x=ya(x,Zy," "),x=ya(x,Yy," "),x=ya(x,Qy," "),x},Jd=function(x){var k;x.normalize();let L=Zt?Zt(x):x.ownerDocument,q=Cm.call(L||x,x,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),J=q.nextNode();for(;J;)J.data=Na(J.data),J=q.nextNode();let de=(k=x.querySelectorAll)===null||k===void 0?void 0:k.call(x,"template");de&&kr(de,Pe=>{Fr(Pe.content)&&Jd(Pe.content)})},Aa=function(x){let k=lt?lt(x):null;return typeof k!="string"||Ye(k)!=="form"?!1:typeof x.nodeName!="string"||typeof x.textContent!="string"||typeof x.removeChild!="function"||x.attributes!==je(x)||typeof x.removeAttribute!="function"||typeof x.removeAttributeNode!="function"||typeof x.getAttributeNode!="function"||typeof x.setAttribute!="function"||typeof x.namespaceURI!="string"||typeof x.insertBefore!="function"||typeof x.hasChildNodes!="function"||x.nodeType!==ht(x)||x.childNodes!==U(x)},Fr=function(x){if(!ht||typeof x!="object"||x===null)return!1;try{return ht(x)===Gt.documentFragment}catch{return!1}},Ho=function(x){if(!ht||typeof x!="object"||x===null)return!1;try{return typeof ht(x)=="number"}catch{return!1}};function Sn(V,x,k){V.length!==0&&kr(V,L=>{L.call(t,x,k,Lr)})}let pC=function(x,k){return!!(Ri&&x.hasChildNodes()&&!Ho(x.firstElementChild)&&Et(Dy,x.textContent)&&Et(Dy,x.innerHTML)||Ri&&x.namespaceURI===Dn&&oO[k]&&(Ho(x.firstElementChild)||typeof x.textContent=="string"&&Et(sO[k],x.textContent))||x.nodeType===Gt.processingInstruction||Ri&&x.nodeType===Gt.comment&&Et(Sy,x.data))},La=function(x,k){if(x instanceof RegExp)return Et(x,k);if(x instanceof Function){for(var L=arguments.length,q=new Array(L>2?L-2:0),J=2;J<L;J++)q[J-2]=arguments[J];return!!x(k,...q)}return!1},fC=function(x,k,L){if(!jo[k]&&Qm(k)&&La(En.tagNameCheck,k))return!1;if(Wd&&!Nr[k]){let q=be(x),J=U(x);if(J&&q){let de=J.length;for(let Pe=de-1;Pe>=0;--Pe){let $e=x===L?T(J[Pe],!0):J[Pe];q.insertBefore($e,Q(x))}}}return ti(x),!0},Wm=function(x,k,L,q){return x.length===0?k:k===L||k===q?Wt(k):k},qm=function(x,k){return x===k||be(x)!==null?!1:(qd&&Ra(x),!0)},Zm=function(x,k){if(Sn(Le.beforeSanitizeElements,x,null),qm(x,k))return!0;if(Aa(x))return ti(x),!0;let L=Ye(Vd(x));if(Fe=Wm(Le.uponSanitizeElement,Fe,$d,Sa),Sn(Le.uponSanitizeElement,x,{tagName:L,allowedTags:Fe}),qm(x,k))return!0;if(pC(x,L))return ti(x),!0;if(jo[L]||!(Jn.tagCheck instanceof Function&&Jn.tagCheck(L))&&!Fe[L]){let J=fC(x,L,k);return J===!1&&Sn(Le.afterSanitizeElements,x,null),J}if(Vo(x)===Gt.element&&!cC(x)||(L==="noscript"||L==="noembed"||L==="noframes")&&Et(iO,x.innerHTML))return ti(x),!0;if(ei&&x.nodeType===Gt.text){let J=Na(x.textContent);x.textContent!==J&&(xa(t.removed,{element:x.cloneNode()}),x.textContent=J)}return Sn(Le.afterSanitizeElements,x,null),!1},Ym=function(x,k,L){if(Dm[k]||zm(k,x)||km&&(k==="id"||k==="name")&&(L in e||L in oC))return!1;let q=Ve[k]||Jn.attributeCheck instanceof Function&&Jn.attributeCheck(k,x);return zd&&Et(Ky,k)||Sm&&Et(Xy,k)?!0:q?Am[k]||Et(Em,ya(L,wm,""))||(k==="src"||k==="xlink:href"||k==="href")&&x!=="script"&&_y(L,"data:")===0&&Rm[x]||Mm&&!Et(Jy,ya(L,wm,""))?!0:!L:Qm(x)&&La(En.tagNameCheck,x)&&La(En.attributeNameCheck,k,x)||k==="is"&&En.allowCustomizedBuiltInElements&&La(En.tagNameCheck,L)},hC=xe({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Qm=function(x){return!hC[wa(x)]&&Et(eC,x)},mC=function(x,k,L,q){if(Nt&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!L)switch(w.getAttributeType(x,k)){case"TrustedHTML":return Pr(q);case"TrustedScriptURL":return zy(q)}return q},gC=function(x,k,L,q){try{return L?x.setAttributeNS(L,k,q):x.setAttribute(k,q),Aa(x)?(ti(x),!1):!0}catch{return Ai(k,x),!1}},Km=function(x){Sn(Le.beforeSanitizeAttributes,x,null);let k=x.attributes;if(!k||Aa(x))return;Ve=Wm(Le.uponSanitizeAttribute,Ve,Hd,Ma);let L={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ve,forceKeepAttr:void 0},q=k.length,J=Ye(x.nodeName);for(;q--;){let de=k[q],Pe=de.name,$e=de.namespaceURI,At=de.value,Lt=Ye(Pe),tu=At,Dt=Pe==="value"?tu:BP(tu),Xm=!1;if(L.attrName=Lt,L.attrValue=Dt,L.keepAttr=!0,L.forceKeepAttr=void 0,Sn(Le.uponSanitizeAttribute,x,L),Dt=L.attrValue,Im&&(Lt==="id"||Lt==="name")&&_y(Dt,Pm)!==0&&(Ai(Pe,x,de),Dt=Pm+Dt,Xm=!0),Ri&&Et(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Dt)){Ai(Pe,x,de);continue}if(Lt==="attributename"&&gy(Dt,"href")){Ai(Pe,x,de);continue}if(!L.forceKeepAttr){if(!L.keepAttr){Ai(Pe,x,de);continue}if(!Tm&&Et(rO,Dt)){Ai(Pe,x,de);continue}if(ei&&(Dt=Na(Dt)),!Ym(J,Lt,Dt)){Ai(Pe,x,de);continue}Dt=mC(J,Lt,$e,Dt),Dt!==tu&&gC(x,Pe,$e,Dt)&&Xm&&my(t.removed)}}Sn(Le.afterSanitizeAttributes,x,null)},Fa=function(x){let k=null,L=Gm(x);for(Sn(Le.beforeSanitizeShadowDOM,x,null);k=L.nextNode();)if(Sn(Le.uponSanitizeShadowNode,k,null),Zm(k,x),Km(k),Fr(k.content)&&Fa(k.content),Vo(k)===Gt.element){let q=qt(k);Fr(q)&&(eu(q),Fa(q))}Sn(Le.afterSanitizeShadowDOM,x,null)},eu=function(x){let k=[{node:x,shadow:null}];for(;k.length>0;){let L=k.pop();if(L.shadow){Fa(L.shadow);continue}let q=L.node,de=Vo(q)===Gt.element,Pe=U(q);if(Pe)for(let $e=Pe.length-1;$e>=0;--$e)k.push({node:Pe[$e],shadow:null});if(de){let $e=lt?lt(q):null;if(typeof $e=="string"&&Ye($e)==="template"){let At=q.content;Fr(At)&&k.push({node:At,shadow:null})}}if(de){let $e=qt(q);Fr($e)&&k.push({node:null,shadow:$e},{node:$e,shadow:null})}}};return t.sanitize=function(V){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=null,L=null,q=null,J=null;if(Zd=!V,Zd&&(V="<!-->"),typeof V!="string"&&!Ho(V)&&(V=UP(V),typeof V!="string"))throw Tr("dirty is not a string, aborting");if(!t.isSupported)return V;Ud?(Fe=Sa,Ve=Ma):Xd(x),(Le.uponSanitizeElement.length>0||Le.uponSanitizeAttribute.length>0)&&(Fe=Wt(Fe)),Le.uponSanitizeAttribute.length>0&&(Ve=Wt(Ve)),t.removed=[];let de=qd&&typeof V!="string"&&Ho(V);if(de){uC(V);let At=Vd(V);if(typeof At=="string"){let Lt=Ye(At);if(!Fe[Lt]||jo[Lt])throw Oa(V),Tr("root node is forbidden and cannot be sanitized in-place")}if(Aa(V))throw Oa(V),Tr("root node is clobbered and cannot be sanitized in-place");try{eu(V)}catch(Lt){throw Oa(V),Lt}}else if(Ho(V))k=Um("<!---->"),L=k.ownerDocument.importNode(V,!0),L.nodeType===Gt.element&&L.nodeName==="BODY"||L.nodeName==="HTML"?k=L:k.appendChild(L),eu(k);else{if(!Or&&!ei&&!Ni&&V.indexOf("<")===-1)return Nt&&ka?Pr(V):V;if(k=Um(V),!k)return Or?null:ka?Oi:""}k&&Gd&&ti(k.firstChild);let Pe=de?V:k;try{let At=Gm(Pe);for(;q=At.nextNode();)Zm(q,Pe),Km(q),Fr(q.content)&&Fa(q.content)}catch(At){throw de&&(Oa(V),kr(t.removed,Lt=>{Lt.element&&Ra(Lt.element)})),At}if(de)return kr(t.removed,At=>{At.element&&Ra(At.element)}),ei&&Jd(V),V;if(Or){if(ei&&Jd(k),Ta)for(J=Gy.call(k.ownerDocument);k.firstChild;)J.appendChild(k.firstChild);else J=k;return(Ve.shadowroot||Ve.shadowrootmode)&&(J=qy.call(i,J,!0)),J}let $e=Ni?k.outerHTML:k.innerHTML;return Ni&&Fe["!doctype"]&&k.ownerDocument&&k.ownerDocument.doctype&&k.ownerDocument.doctype.name&&Et(tO,k.ownerDocument.doctype.name)&&($e="<!DOCTYPE "+k.ownerDocument.doctype.name+`>
|
|
63
|
-
`+$e),ei&&($e=Na($e)),Nt&&ka?Pr($e):$e},t.setConfig=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Xd(V),Ud=!0,Sa=Fe,Ma=Ve},t.clearConfig=function(){Lr=null,Ud=!1,Sa=null,Ma=null,Nt=Bd,Oi=""},t.isValidAttribute=function(V,x,k){Lr||Xd({});let L=Ye(V),q=Ye(x);return Ym(L,q,k)},t.addHook=function(V,x){typeof x=="function"&&$t(Le,V)&&xa(Le[V],x)},t.removeHook=function(V,x){if($t(Le,V)){if(x!==void 0){let k=FP(Le[V],x);return k===-1?void 0:VP(Le[V],k,1)[0]}return my(Le[V])}},t.removeHooks=function(V){$t(Le,V)&&(Le[V]=[])},t.removeAllHooks=function(){Le=My()},t}var Oy=Py();var Ii=class n{markdown=N.required();html=R(()=>{let t=(this.markdown()??"").trim();return t?Oy.sanitize(De.parse(t,{async:!1})):""});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-markdown-text"]],inputs:{markdown:[1,"markdown"]},decls:1,vars:1,consts:[[1,"markdown",3,"innerHTML"]],template:function(e,i){e&1&&ee(0,"div",0),e&2&&G("innerHTML",i.html(),Sf)},styles:[".markdown[_ngcontent-%COMP%]{color:var(--text);font-size:13px;line-height:1.55;word-wrap:break-word}.markdown[_ngcontent-%COMP%] [_ngcontent-%COMP%]:first-child{margin-top:0}.markdown[_ngcontent-%COMP%] [_ngcontent-%COMP%]:last-child{margin-bottom:0}.markdown[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 8px}.markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:var(--text-bright);font-size:14px;font-weight:600;margin:14px 0 6px}.markdown[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:16px}.markdown[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] ol[_ngcontent-%COMP%]{margin:0 0 8px;padding-left:22px}.markdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin:2px 0}.markdown[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:var(--mono);font-size:12px;background:var(--bg);border:1px solid var(--border);border-radius:3px;padding:1px 4px}.markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:var(--bg);border:1px solid var(--border);border-radius:4px;padding:8px 10px;overflow-x:auto;margin:0 0 8px}.markdown[_ngcontent-%COMP%] pre[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:none;border:none;padding:0}.markdown[_ngcontent-%COMP%] blockquote[_ngcontent-%COMP%]{border-left:3px solid var(--border);color:var(--text-dim);margin:0 0 8px;padding:2px 10px}.markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--accent);text-decoration:none}.markdown[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.markdown[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border-collapse:collapse;margin:0 0 8px}.markdown[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .markdown[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:1px solid var(--border);padding:4px 8px;text-align:left}.markdown[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%}.markdown[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border:none;border-top:1px solid var(--border);margin:10px 0}"],changeDetection:0})};var _m=(n,t)=>t.name;function cO(n,t){if(n&1&&(u(0,"a",10),f(1," Open in Azure DevOps "),p()),n&2){let e=d();S("href",e.url,_r)}}function dO(n,t){if(n&1&&(u(0,"p",14),f(1),p()),n&2){let e=t.$implicit;c(),P(e)}}function uO(n,t){if(n&1&&Z(0,dO,2,1,"p",14,Bt),n&2){let e=d();Y(e.warnings)}}function pO(n,t){if(n&1){let e=I();u(0,"div",8)(1,"p",9),f(2),p(),E(3,cO,2,1,"a",10),u(4,"p",11),f(5),p(),E(6,uO,2,0),p(),u(7,"div",12)(8,"button",13),C("click",function(){g(e);let r=d();return _(r.closed.emit())}),f(9,"Close"),p()()}if(n&2){let e=t;c(2),$("\u2714 Pull Request #",e.id," created"),c(),D(e.url?3:-1),c(2),$("Source branch: ",e.branch),c(),D(e.warnings!=null&&e.warnings.length?6:-1)}}function fO(n,t){if(n&1){let e=I();u(0,"textarea",37),C("input",function(r){g(e);let o=d(2);return _(o.onDescriptionInput(r))}),p()}if(n&2){let e=d(2);S("value",e.description())}}function hO(n,t){if(n&1&&j(0,"app-markdown-text",38),n&2){let e=d(3);S("markdown",e.description())}}function mO(n,t){n&1&&(u(0,"span",39),f(1,"Nothing to preview"),p())}function gO(n,t){if(n&1&&(u(0,"div",23),E(1,hO,1,1,"app-markdown-text",38)(2,mO,2,0,"span",39),p()),n&2){let e=d(2);c(),D(e.description().trim()?1:2)}}function _O(n,t){if(n&1&&(u(0,"option",26),f(1),p()),n&2){let e=t.$implicit,i=d(2);S("value",e.name)("selected",i.source()===e.name),c(),$(" ",e.name," ")}}function vO(n,t){if(n&1&&(u(0,"option",26),f(1),p()),n&2){let e=t.$implicit,i=d(2);S("value",e.name)("selected",i.source()===e.name),c(),$(" ",e.name," ")}}function bO(n,t){n&1&&(u(0,"p",11),f(1," A new branch (pr/xxxxxx) will be created from the current HEAD and pushed before the pull request is created. "),p())}function xO(n,t){if(n&1&&(u(0,"option",26),f(1),p()),n&2){let e=t.$implicit,i=d(2);S("value",e.name)("selected",i.target()===e.name),c(),$(" ",e.name," ")}}function yO(n,t){if(n&1&&(u(0,"p",11),f(1),p()),n&2){let e=d(2);c(),$('Press Enter to add "',e.tagQuery().trim(),'" as a new tag.')}}function CO(n,t){if(n&1&&j(0,"app-error-banner",34),n&2){let e=d(2);S("message",e.error())}}function wO(n,t){if(n&1){let e=I();u(0,"div",15)(1,"label",16)(2,"span",17),f(3,"Title"),p(),u(4,"input",18),C("input",function(r){g(e);let o=d();return _(o.onTitleInput(r))}),p()(),u(5,"div",16)(6,"div",19)(7,"span",17),f(8,"Description"),p(),u(9,"div",20)(10,"button",21),C("click",function(){g(e);let r=d();return _(r.descriptionMode.set("write"))}),f(11," Write "),p(),u(12,"button",21),C("click",function(){g(e);let r=d();return _(r.descriptionMode.set("preview"))}),f(13," Preview "),p()()(),E(14,fO,1,1,"textarea",22)(15,gO,3,1,"div",23),p(),u(16,"label",16)(17,"span",17),f(18,"Source branch"),p(),u(19,"select",24),C("change",function(r){g(e);let o=d();return _(o.onSourceChange(r))}),u(20,"optgroup",25)(21,"option",26),f(22," \u2795 Create new branch (random name) "),p()(),u(23,"optgroup",27),Z(24,_O,2,3,"option",26,_m),p(),u(26,"optgroup",28),Z(27,vO,2,3,"option",26,_m),p()()(),E(29,bO,2,0,"p",11),u(30,"label",16)(31,"span",17),f(32,"Target branch"),p(),u(33,"select",24),C("change",function(r){g(e);let o=d();return _(o.onTargetChange(r))}),Z(34,xO,2,3,"option",26,_m),p()(),u(36,"label",29)(37,"input",30),C("change",function(r){g(e);let o=d();return _(o.isDraft.set(r.target.checked))}),p(),f(38," Create as draft "),p(),u(39,"label",16)(40,"span",17),f(41,"Required reviewers"),p(),u(42,"app-chip-input",31),C("queryChange",function(r){g(e);let o=d();return _(o.requiredReviewerQuery.set(r))})("select",function(r){g(e);let o=d();return _(o.addRequiredReviewer(r))})("remove",function(r){g(e);let o=d();return _(o.removeRequiredReviewer(r))}),p()(),u(43,"label",16)(44,"span",17),f(45,"Optional reviewers"),p(),u(46,"app-chip-input",31),C("queryChange",function(r){g(e);let o=d();return _(o.optionalReviewerQuery.set(r))})("select",function(r){g(e);let o=d();return _(o.addOptionalReviewer(r))})("remove",function(r){g(e);let o=d();return _(o.removeOptionalReviewer(r))}),p()(),u(47,"label",16)(48,"span",17),f(49,"Work items"),p(),u(50,"app-chip-input",32),C("queryChange",function(r){g(e);let o=d();return _(o.workItemQuery.set(r))})("select",function(r){g(e);let o=d();return _(o.addWorkItem(r))})("remove",function(r){g(e);let o=d();return _(o.removeWorkItem(r))}),p()(),u(51,"label",16)(52,"span",17),f(53,"Tags"),p(),u(54,"app-chip-input",33),C("queryChange",function(r){g(e);let o=d();return _(o.tagQuery.set(r))})("select",function(r){g(e);let o=d();return _(o.addTag(r))})("remove",function(r){g(e);let o=d();return _(o.removeTag(r))}),p()(),E(55,yO,2,1,"p",11),E(56,CO,1,1,"app-error-banner",34),p(),u(57,"div",12)(58,"button",35),C("click",function(){g(e);let r=d();return _(r.closed.emit())}),f(59," Cancel "),p(),u(60,"button",36),C("click",function(){g(e);let r=d();return _(r.create())}),f(61),p()()}if(n&2){let e=d();c(4),S("value",e.title()),c(6),te("active",e.descriptionMode()==="write"),S("disabled",e.creating()),K("aria-selected",e.descriptionMode()==="write"),c(2),te("active",e.descriptionMode()==="preview"),S("disabled",e.creating()),K("aria-selected",e.descriptionMode()==="preview"),c(2),D(e.descriptionMode()==="write"?14:15),c(7),S("value",e.newBranchValue)("selected",e.source()===e.newBranchValue),c(3),Y(e.localBranches()),c(3),Y(e.remoteBranches()),c(2),D(e.source()===e.newBranchValue?29:-1),c(5),Y(e.remoteBranches()),c(3),S("checked",e.isDraft())("disabled",e.creating()),c(5),S("chips",e.requiredReviewers())("suggestions",e.requiredReviewerSuggestions())("loading",e.requiredReviewersLoading())("error",e.requiredReviewersError())("query",e.requiredReviewerQuery()),c(4),S("chips",e.optionalReviewers())("suggestions",e.optionalReviewerSuggestions())("loading",e.optionalReviewersLoading())("error",e.optionalReviewersError())("query",e.optionalReviewerQuery()),c(4),S("chips",e.workItemChips())("suggestions",e.workItemSuggestions())("loading",e.workItemsLoading())("error",e.workItemsError())("query",e.workItemQuery()),c(4),S("chips",e.tagChips())("suggestions",e.filteredTagSuggestions())("loading",e.tagsLoading())("error",e.tagsError())("query",e.tagQuery())("allowFreeText",!0),c(),D(e.tagQuery().trim()&&!e.tagSuggestions().length&&!e.tagsLoading()?55:-1),c(),D(e.error()?56:-1),c(2),S("disabled",e.creating()),c(2),S("disabled",!e.canCreate()),c(),$(" ",e.creating()?"Creating...":"Create Pull Request"," ")}}var Ry="__new__",wd=class n{git=O(et);destroyRef=O(ot);branches=N.required();closed=W();created=W();newBranchValue=Ry;isDraft=v(!1);title=v("");description=v("");descriptionMode=v("write");source=v("");target=v("");creating=v(!1);error=v("");result=v(null);requiredReviewers=v([]);optionalReviewers=v([]);workItemChips=v([]);tagChips=v([]);requiredReviewerQuery=v("");optionalReviewerQuery=v("");workItemQuery=v("");tagQuery=v("");requiredReviewerSuggestions=v([]);optionalReviewerSuggestions=v([]);workItemSuggestions=v([]);tagSuggestions=v([]);requiredReviewersLoading=v(!1);optionalReviewersLoading=v(!1);requiredReviewersError=v("");optionalReviewersError=v("");workItemsError=v("");tagsError=v("");workItemsLoading=v(!1);tagsLoading=v(!1);localBranches=R(()=>this.branches().filter(t=>!t.remote));remoteBranches=R(()=>this.branches().filter(t=>t.remote));canCreate=R(()=>!this.creating()&&!!this.target()&&!!this.source());filteredTagSuggestions=R(()=>{let t=this.tagQuery().trim().toLowerCase();return t?this.tagSuggestions().filter(e=>e.label.toLowerCase().includes(t)):this.tagSuggestions()});constructor(){this.bindLookup(this.requiredReviewerQuery,this.requiredReviewerSuggestions,this.requiredReviewersLoading,this.requiredReviewersError,t=>this.git.searchReviewers(t),t=>({id:t.id,label:t.label,description:t.description}),2),this.bindLookup(this.optionalReviewerQuery,this.optionalReviewerSuggestions,this.optionalReviewersLoading,this.optionalReviewersError,t=>this.git.searchReviewers(t),t=>({id:t.id,label:t.label,description:t.description}),2),this.bindLookup(this.workItemQuery,this.workItemSuggestions,this.workItemsLoading,this.workItemsError,t=>this.git.searchWorkItems(t),t=>({id:String(t.id),label:`#${t.id} ${t.title}`,description:t.state}),1)}bindLookup(t,e,i,r,o,s,a){Dr(t).pipe(St(l=>(e.set([]),r.set(""),i.set(l.trim().length>=a),l.trim().length<a?Ee([]):new pe(h=>{let m=setTimeout(()=>{h.next(l.trim()),h.complete()},300);return()=>clearTimeout(m)}).pipe(St(o),ct(h=>(r.set(h?.error?.error||"Unable to load suggestions. Try searching again."),Ee([])))))),tt(this.destroyRef)).subscribe(l=>{e.set(l.map(s)),i.set(!1)})}ngOnInit(){let t=this.branches(),e=t.find(s=>s.current&&!s.remote),i=t.find(s=>!s.remote);this.source.set(e?.name??i?.name??""),this.title()||this.title.set(e?.name??"");let r=t.filter(s=>s.remote),o=r.find(s=>s.name==="origin/main")??r.find(s=>s.name==="origin/master");this.target.set(o?.name??r[0]?.name??""),this.tagsLoading.set(!0),this.git.getPrTags().pipe(tt(this.destroyRef)).subscribe({next:s=>{this.tagSuggestions.set(s.map(a=>({id:a.name.toLowerCase(),label:a.name}))),this.tagsLoading.set(!1)},error:s=>{this.tagsError.set(s?.error?.error||"Unable to load tags. You can still add a tag with Enter."),this.tagSuggestions.set([]),this.tagsLoading.set(!1)}})}onEscape(){this.creating()||this.closed.emit()}onBackdropClick(){this.creating()||this.closed.emit()}onTitleInput(t){this.title.set(t.target.value)}onDescriptionInput(t){this.description.set(t.target.value)}onSourceChange(t){this.source.set(t.target.value)}onTargetChange(t){this.target.set(t.target.value)}isReviewerSelected(t){return[...this.requiredReviewers(),...this.optionalReviewers()].some(e=>e.id===t)}addRequiredReviewer(t){this.requiredReviewerQuery.set(""),this.requiredReviewerSuggestions.set([]),this.isReviewerSelected(t.id)||this.requiredReviewers.update(e=>[...e,t])}addOptionalReviewer(t){this.optionalReviewerQuery.set(""),this.optionalReviewerSuggestions.set([]),this.isReviewerSelected(t.id)||this.optionalReviewers.update(e=>[...e,t])}removeRequiredReviewer(t){this.requiredReviewers.update(e=>e.filter(i=>i.id!==t.id))}removeOptionalReviewer(t){this.optionalReviewers.update(e=>e.filter(i=>i.id!==t.id))}addWorkItem(t){this.workItemQuery.set(""),this.workItemSuggestions.set([]),this.workItemChips().some(e=>e.id===t.id)||this.workItemChips.update(e=>[...e,t])}removeWorkItem(t){this.workItemChips.update(e=>e.filter(i=>i.id!==t.id))}addTag(t){this.tagQuery.set(""),this.tagChips().some(e=>e.id===t.id)||this.tagChips.update(e=>[...e,t])}removeTag(t){this.tagChips.update(e=>e.filter(i=>i.id!==t.id))}create(){if(!this.canCreate())return;let t=this.source()===Ry;this.creating.set(!0),this.error.set("");let e=[...this.requiredReviewers().map(o=>({id:o.id,required:!0})),...this.optionalReviewers().map(o=>({id:o.id,required:!1}))],i=this.workItemChips().map(o=>Number(o.id)).filter(o=>Number.isInteger(o)&&o>0),r=this.tagChips().map(o=>o.label);this.git.createPr({sourceBranch:t?"":this.source(),targetBranch:this.target(),title:this.title().trim()||void 0,description:this.description().trim()||void 0,newBranch:t,isDraft:this.isDraft(),reviewers:e.length?e:void 0,workItems:i.length?i:void 0,labels:r.length?r:void 0}).subscribe({next:o=>{this.creating.set(!1),this.result.set(o),this.created.emit(o)},error:o=>{this.creating.set(!1),this.error.set(this.errorMessage(o))}})}errorMessage(t){let e=t;return e?.status===400&&e.error?.error?e.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-create-pr-dialog"]],hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},inputs:{branches:[1,"branches"]},outputs:{closed:"closed",created:"created"},decls:11,vars:2,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","create-pr-title",1,"dialog"],[1,"dialog-head"],["id","create-pr-title",1,"title"],["type","button","title","Close","aria-label","Close dialog",1,"icon-btn",3,"click","disabled"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"success"],[1,"success-line"],["target","_blank","rel","noopener",1,"pr-link",3,"href"],[1,"hint"],[1,"actions"],["type","button",1,"btn","btn-primary",3,"click"],[1,"warning"],[1,"form"],[1,"field"],[1,"field-label"],["type","text","placeholder","Pull request title",1,"input",3,"input","value"],[1,"field-head"],["role","tablist","aria-label","Description editor mode",1,"segmented"],["type","button","role","tab",3,"click","disabled"],["rows","3","placeholder","Optional description",1,"input","description",3,"value"],[1,"description-preview","input"],[1,"input",3,"change"],["label","New branch"],[3,"value","selected"],["label","Local branches"],["label","Remote branches"],[1,"draft-option"],["type","checkbox",3,"change","checked","disabled"],["placeholder","Search users by name or email",3,"queryChange","select","remove","chips","suggestions","loading","error","query"],["placeholder","Search by id or title",3,"queryChange","select","remove","chips","suggestions","loading","error","query"],["placeholder","Add tags (Enter to add)",3,"queryChange","select","remove","chips","suggestions","loading","error","query","allowFreeText"],[3,"message"],["type","button",1,"btn",3,"click","disabled"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["rows","3","placeholder","Optional description",1,"input","description",3,"input","value"],[3,"markdown"],[1,"preview-empty"]],template:function(e,i){if(e&1&&(u(0,"div",0),C("click",function(){return i.onBackdropClick()}),p(),u(1,"div",1)(2,"header",2)(3,"h3",3),f(4,"Create Pull Request"),p(),u(5,"button",4),C("click",function(){return i.closed.emit()}),B(),u(6,"svg",5),j(7,"line",6)(8,"line",7),p()()(),E(9,pO,10,4)(10,wO,62,41),p()),e&2){let r;c(5),S("disabled",i.creating()),c(4),D((r=i.result())?9:10,r)}},dependencies:[pt,Ro,Ii],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;z-index:400}.dialog[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(480px,calc(100vw - 48px));max-height:calc(100vh - 64px);overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:12px;background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;box-shadow:0 10px 36px #0009;z-index:401}.dialog-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px}.title[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:600;color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--text-dim);cursor:pointer}.icon-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.field-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px}.segmented[_ngcontent-%COMP%]{display:inline-flex;border:1px solid var(--border);border-radius:4px;overflow:hidden}.segmented[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:2px 10px;border:none;background:transparent;color:var(--text-dim);font-size:11px;font-family:inherit;cursor:pointer}.segmented[_ngcontent-%COMP%] button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{border-left:1px solid var(--border)}.segmented[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:var(--accent);color:var(--bg)}.segmented[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.description-preview[_ngcontent-%COMP%]{min-height:74px;max-height:320px;overflow-y:auto}.preview-empty[_ngcontent-%COMP%]{color:var(--text-dim);font-style:italic}.field-label[_ngcontent-%COMP%]{font-size:12px;color:var(--text-dim)}.input[_ngcontent-%COMP%]{padding:7px 10px;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font-size:13px;font-family:inherit;outline:none}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}textarea.description[_ngcontent-%COMP%]{resize:vertical;min-height:60px}.hint[_ngcontent-%COMP%]{margin:-6px 0 0;font-size:11px;color:var(--text-dim)}.warning[_ngcontent-%COMP%]{margin:0;padding:8px 10px;border:1px solid #8a6c10;border-radius:4px;background:#8a6c1026;color:#dcb67a;font-size:12px;word-break:break-word}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px}.btn[_ngcontent-%COMP%]{padding:6px 14px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.btn-primary[_ngcontent-%COMP%]{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#2b7cd3}.success[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.success-line[_ngcontent-%COMP%]{margin:0;font-size:13px;color:#4ec9b0}.pr-link[_ngcontent-%COMP%]{font-size:13px;color:var(--accent);text-decoration:none}.pr-link[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};var EO=["focusEl"],DO=(n,t)=>t.name,Lo=(n,t)=>t.value;function SO(n,t){if(n&1&&(u(0,"p",8),f(1),p()),n&2){let e=d();c(),P(e.contextLine())}}function MO(n,t){if(n&1&&(u(0,"option",19),f(1),p()),n&2){let e=t.$implicit,i=d(2);S("value",e.name)("selected",e.name===i.remote()),c(),P(e.name)}}function TO(n,t){n&1&&(u(0,"p",20),f(1,"No remotes configured"),p())}function kO(n,t){if(n&1){let e=I();u(0,"label",17),f(1,"Remote"),p(),u(2,"select",18),C("change",function(r){g(e);let o=d();return _(o.onRemote(r))}),Z(3,MO,2,3,"option",19,DO),p(),E(5,TO,2,0,"p",20)}if(n&2){let e=d();c(2),S("disabled",e.busy()||!e.hasRemotes()),c(),Y(e.remotes()),c(2),D(e.noRemotes()?5:-1)}}function IO(n,t){if(n&1){let e=I();u(0,"label",25),f(1,"Message"),p(),u(2,"textarea",26),C("input",function(r){g(e);let o=d(2);return _(o.setText(r,o.tagMessage))}),p()}if(n&2){let e=d(2);c(2),S("value",e.tagMessage())("disabled",e.busy())}}function PO(n,t){n&1&&Ct(0)}function OO(n,t){if(n&1&&yt(0,PO,1,0,"ng-container",27),n&2){d(2);let e=_t(11);S("ngTemplateOutlet",e)}}function RO(n,t){if(n&1){let e=I();u(0,"label",21),f(1,"Tag name"),p(),u(2,"input",22,1),C("input",function(r){g(e);let o=d();return _(o.setText(r,o.tagName))}),p(),u(4,"label",12)(5,"input",23),C("change",function(r){g(e);let o=d();return _(o.tagAnnotated.set(o.check(r)))}),p(),u(6,"span"),f(7,"Annotate tag"),p()(),E(8,IO,3,2),u(9,"label",12)(10,"input",24),C("change",function(r){g(e);let o=d();return _(o.pushAfter.set(o.check(r)))}),p(),u(11,"span"),f(12,"Push tag after creation"),p()(),E(13,OO,1,1,"ng-container")}if(n&2){let e=d();c(2),S("value",e.tagName())("disabled",e.busy()),c(3),S("checked",e.tagAnnotated())("disabled",e.busy()),c(3),D(e.tagAnnotated()?8:-1),c(2),S("checked",e.pushAfter())("disabled",e.busy()||e.noRemotes()),c(3),D(e.pushAfter()?13:-1)}}function NO(n,t){n&1&&Ct(0)}function AO(n,t){if(n&1&&yt(0,NO,1,0,"ng-container",27),n&2){d(2);let e=_t(11);S("ngTemplateOutlet",e)}}function LO(n,t){if(n&1){let e=I();u(0,"label",28),f(1,"Branch name"),p(),u(2,"input",29,1),C("input",function(r){g(e);let o=d();return _(o.setText(r,o.branchName))}),p(),u(4,"label",12)(5,"input",30),C("change",function(r){g(e);let o=d();return _(o.checkoutAfter.set(o.check(r)))}),p(),u(6,"span"),f(7,"Check out after creation"),p()(),u(8,"label",12)(9,"input",31),C("change",function(r){g(e);let o=d();return _(o.publishBranch.set(o.check(r)))}),p(),u(10,"span"),f(11,"Publish and set upstream"),p()(),E(12,AO,1,1,"ng-container")}if(n&2){let e=d();c(2),S("value",e.branchName())("disabled",e.busy()),c(3),S("checked",e.checkoutAfter())("disabled",e.busy()),c(4),S("checked",e.publishBranch())("disabled",e.busy()||e.noRemotes()),c(3),D(e.publishBranch()?12:-1)}}function FO(n,t){n&1&&Ct(0)}function VO(n,t){if(n&1&&yt(0,FO,1,0,"ng-container",27),n&2){d(3);let e=_t(11);S("ngTemplateOutlet",e)}}function BO(n,t){if(n&1){let e=I();u(0,"label",38),f(1,"Branch name"),p(),u(2,"input",39),C("input",function(r){g(e);let o=d(2);return _(o.setText(r,o.remoteBranchName))}),p(),u(3,"label",12)(4,"input",40),C("change",function(r){g(e);let o=d(2);return _(o.publishBranch.set(o.check(r)))}),p(),u(5,"span"),f(6,"Publish and set upstream"),p()(),E(7,VO,1,1,"ng-container")}if(n&2){let e=d(2);c(2),S("value",e.remoteBranchName())("disabled",e.busy()),c(2),S("checked",e.publishBranch())("disabled",e.busy()||e.noRemotes()),c(3),D(e.publishBranch()?7:-1)}}function jO(n,t){if(n&1){let e=I();u(0,"div",32)(1,"button",33,1),C("click",function(){g(e);let r=d();return _(r.checkoutMode.set("detach"))}),j(3,"span",34),u(4,"span",35)(5,"span",36),f(6,"Detached HEAD"),p(),u(7,"span",37),f(8," Check out the commit without a branch. New commits will not belong to any branch. "),p()()(),u(9,"button",33),C("click",function(){g(e);let r=d();return _(r.checkoutMode.set("branch"))}),j(10,"span",34),u(11,"span",35)(12,"span",36),f(13,"New branch"),p(),u(14,"span",37),f(15,"Create and check out a branch at this commit."),p()()()(),E(16,BO,8,5)}if(n&2){let e=d();c(),te("selected",e.checkoutMode()==="detach"),S("disabled",e.busy()),K("aria-checked",e.checkoutMode()==="detach"),c(8),te("selected",e.checkoutMode()==="branch"),S("disabled",e.busy()),K("aria-checked",e.checkoutMode()==="branch"),c(7),D(e.checkoutMode()==="branch"?16:-1)}}function $O(n,t){if(n&1){let e=I();u(0,"label",38),f(1,"Local branch name"),p(),u(2,"input",41),C("input",function(r){g(e);let o=d(3);return _(o.setText(r,o.remoteBranchName))}),p()}if(n&2){let e=d(3);c(2),S("value",e.remoteBranchName())("disabled",e.busy())}}function HO(n,t){if(n&1){let e=I();u(0,"div",32)(1,"button",33,1),C("click",function(){g(e);let r=d(2);return _(r.remoteCheckoutMode.set("track"))}),j(3,"span",34),u(4,"span",35)(5,"span",36),f(6,"Create local tracking branch"),p(),u(7,"span",37),f(8),p()()(),u(9,"button",33),C("click",function(){g(e);let r=d(2);return _(r.remoteCheckoutMode.set("detach"))}),j(10,"span",34),u(11,"span",35)(12,"span",36),f(13,"Detached checkout"),p(),u(14,"span",37),f(15," Check out the commit without creating a branch. "),p()()()(),E(16,$O,3,2)}if(n&2){let e=d(2);c(),te("selected",e.remoteCheckoutMode()==="track"),S("disabled",e.busy()),K("aria-checked",e.remoteCheckoutMode()==="track"),c(7),$(" Creates a local branch that tracks ",e.state().ref,". "),c(),te("selected",e.remoteCheckoutMode()==="detach"),S("disabled",e.busy()),K("aria-checked",e.remoteCheckoutMode()==="detach"),c(7),D(e.remoteCheckoutMode()==="track"?16:-1)}}function zO(n,t){if(n&1&&E(0,HO,17,10),n&2){let e=d();D(e.state().isRemote?0:-1)}}function UO(n,t){if(n&1&&(u(0,"span",37),f(1),p()),n&2){let e=d().$implicit;c(),P(e.description)}}function GO(n,t){if(n&1){let e=I();u(0,"button",33),C("click",function(){let r=g(e).$implicit,o=d(3);return _(o.mainline.set(+r.value))}),j(1,"span",34),u(2,"span",35)(3,"span",36),f(4),p(),E(5,UO,2,1,"span",37),p()()}if(n&2){let e=t.$implicit,i=d(3);te("selected",i.mainline()===+e.value),S("disabled",i.busy()),K("aria-checked",i.mainline()===+e.value),c(4),P(e.label),c(),D(e.description?5:-1)}}function WO(n,t){if(n&1&&(u(0,"p",20),f(1,"This commit is a merge commit. Choose the parent to pick the changes from:"),p(),u(2,"div",45),Z(3,GO,6,6,"button",46,Lo),p()),n&2){let e=d(2);c(3),Y(e.mainlineChoices())}}function qO(n,t){if(n&1){let e=I();u(0,"label",12)(1,"input",42,1),C("change",function(r){g(e);let o=d();return _(o.noCommit.set(o.check(r)))}),p(),u(3,"span"),f(4,"No commit \u2014 stage the picked changes only"),p()(),u(5,"label",12)(6,"input",43),C("change",function(r){g(e);let o=d();return _(o.recordSource.set(o.check(r)))}),p(),u(7,"span"),f(8,"Append source commit hash to the message"),p()(),u(9,"label",12)(10,"input",44),C("change",function(r){g(e);let o=d();return _(o.signoff.set(o.check(r)))}),p(),u(11,"span"),f(12,"Sign off"),p()(),E(13,WO,5,0)}if(n&2){let e=d();c(),S("checked",e.noCommit())("disabled",e.busy()),c(5),S("checked",e.recordSource())("disabled",e.busy()),c(4),S("checked",e.signoff())("disabled",e.busy()),c(3),D(e.isMerge()?13:-1)}}function ZO(n,t){if(n&1&&(u(0,"span",37),f(1),p()),n&2){let e=d().$implicit;c(),P(e.description)}}function YO(n,t){if(n&1){let e=I();u(0,"button",33),C("click",function(){let r=g(e).$implicit,o=d(3);return _(o.mainline.set(+r.value))}),j(1,"span",34),u(2,"span",35)(3,"span",36),f(4),p(),E(5,ZO,2,1,"span",37),p()()}if(n&2){let e=t.$implicit,i=d(3);te("selected",i.mainline()===+e.value),S("disabled",i.busy()),K("aria-checked",i.mainline()===+e.value),c(4),P(e.label),c(),D(e.description?5:-1)}}function QO(n,t){if(n&1&&(u(0,"p",20),f(1,"This commit is a merge commit. Choose the parent to revert changes against:"),p(),u(2,"div",45),Z(3,YO,6,6,"button",46,Lo),p()),n&2){let e=d(2);c(3),Y(e.mainlineChoices())}}function KO(n,t){if(n&1){let e=I();u(0,"label",12)(1,"input",42,1),C("change",function(r){g(e);let o=d();return _(o.noCommit.set(o.check(r)))}),p(),u(3,"span"),f(4,"No commit \u2014 stage the reverted changes only"),p()(),u(5,"label",12)(6,"input",44),C("change",function(r){g(e);let o=d();return _(o.signoff.set(o.check(r)))}),p(),u(7,"span"),f(8,"Sign off"),p()(),E(9,QO,5,0)}if(n&2){let e=d();c(),S("checked",e.noCommit())("disabled",e.busy()),c(5),S("checked",e.signoff())("disabled",e.busy()),c(3),D(e.isMerge()?9:-1)}}function XO(n,t){if(n&1&&(u(0,"p",9),f(1),p()),n&2){let e=d();c(),$(" This removes the selected commit and rewrites the history of ",e.state().currentBranch||"the current branch",". Descendant commits are replayed and their hashes change. ")}}function JO(n,t){if(n&1&&(u(0,"span",37),f(1),p()),n&2){let e=d().$implicit;c(),P(e.description)}}function e2(n,t){if(n&1){let e=I();u(0,"button",33,1),C("click",function(){let r=g(e).$implicit,o=d(2);return _(o.mergeMode.set(r.value))}),j(2,"span",34),u(3,"span",35)(4,"span",36),f(5),p(),E(6,JO,2,1,"span",37),p()()}if(n&2){let e=t.$implicit,i=d(2);te("selected",i.mergeMode()===e.value)("danger",e.danger),S("disabled",i.busy()),K("aria-checked",i.mergeMode()===e.value),c(5),P(e.label),c(),D(e.description?6:-1)}}function t2(n,t){if(n&1){let e=I();u(0,"label",12)(1,"input",50),C("change",function(r){g(e);let o=d(2);return _(o.mergeNoCommit.set(o.check(r)))}),p(),u(2,"span"),f(3,"No commit \u2014 leave the merge staged"),p()()}if(n&2){let e=d(2);c(),S("checked",e.mergeNoCommit())("disabled",e.busy())}}function n2(n,t){if(n&1){let e=I();u(0,"div",47),Z(1,e2,7,8,"button",48,Lo),p(),E(3,t2,4,2,"label",12),u(4,"label",12)(5,"input",49),C("change",function(r){g(e);let o=d();return _(o.autostash.set(o.check(r)))}),p(),u(6,"span"),f(7,"Autostash \u2014 stash uncommitted changes during the merge"),p()()}if(n&2){let e=d();c(),Y(e.mergeChoices),c(2),D(e.mergeMode()==="default"||e.mergeMode()==="no-ff"?3:-1),c(2),S("checked",e.autostash())("disabled",e.busy())}}function i2(n,t){if(n&1){let e=I();u(0,"p",8),f(1,"Rebasing rewrites the current branch's commits on top of the target."),p(),u(2,"label",12)(3,"input",51,1),C("change",function(r){g(e);let o=d();return _(o.autostash.set(o.check(r)))}),p(),u(5,"span"),f(6,"Autostash \u2014 stash uncommitted changes during the rebase"),p()(),u(7,"label",12)(8,"input",52),C("change",function(r){g(e);let o=d();return _(o.preserveMerges.set(o.check(r)))}),p(),u(9,"span"),f(10,"Preserve merges \u2014 keep merge commits while rebasing"),p()()}if(n&2){let e=d();c(3),S("checked",e.autostash())("disabled",e.busy()),c(5),S("checked",e.preserveMerges())("disabled",e.busy())}}function r2(n,t){if(n&1&&(u(0,"span",37),f(1),p()),n&2){let e=d().$implicit;c(),P(e.description)}}function o2(n,t){if(n&1){let e=I();u(0,"button",33,1),C("click",function(){let r=g(e).$implicit,o=d(2);return _(o.resetMode.set(r.value))}),j(2,"span",34),u(3,"span",35)(4,"span",36),f(5),p(),E(6,r2,2,1,"span",37),p()()}if(n&2){let e=t.$implicit,i=d(2);te("selected",i.resetMode()===e.value)("danger",e.danger),S("disabled",i.busy()),K("aria-checked",i.resetMode()===e.value),c(5),P(e.label),c(),D(e.description?6:-1)}}function s2(n,t){if(n&1&&(u(0,"div",10),Z(1,o2,7,8,"button",48,Lo),p()),n&2){let e=d();c(),Y(e.resetChoices)}}function a2(n,t){n&1&&Ct(0)}function l2(n,t){if(n&1){let e=I();yt(0,a2,1,0,"ng-container",27),u(1,"label",12)(2,"input",53),C("change",function(r){g(e);let o=d();return _(o.pushForce.set(o.check(r)))}),p(),u(3,"span",54),f(4,"Force update \u2014 overwrite the remote tag"),p()()}if(n&2){let e=d(),i=_t(11);S("ngTemplateOutlet",i),c(2),S("checked",e.pushForce())("disabled",e.busy()||!e.hasRemotes())}}function c2(n,t){n&1&&Ct(0)}function d2(n,t){if(n&1&&yt(0,c2,1,0,"ng-container",27),n&2){d(2);let e=_t(11);S("ngTemplateOutlet",e)}}function u2(n,t){if(n&1){let e=I();u(0,"p",9),f(1,"The tag will be deleted locally."),p(),u(2,"label",12)(3,"input",55),C("change",function(r){g(e);let o=d();return _(o.deleteRemoteToo.set(o.check(r)))}),p(),u(4,"span"),f(5,"Also delete the tag on the remote"),p()(),E(6,d2,1,1,"ng-container")}if(n&2){let e=d();c(3),S("checked",e.deleteRemoteToo())("disabled",e.busy()||e.noRemotes()),c(3),D(e.deleteRemoteToo()?6:-1)}}function p2(n,t){n&1&&Ct(0)}function f2(n,t){if(n&1&&yt(0,p2,1,0,"ng-container",27),n&2){d(2);let e=_t(11);S("ngTemplateOutlet",e)}}function h2(n,t){if(n&1){let e=I();u(0,"label",56),f(1,"New branch name"),p(),u(2,"input",57,1),C("input",function(r){g(e);let o=d();return _(o.renameName.set(r.target.value))}),p(),u(4,"label",12)(5,"input",58),C("change",function(r){g(e);let o=d();return _(o.publishRename.set(o.check(r)))}),p(),u(6,"span"),f(7,"Publish the new branch name"),p()(),u(8,"label",12)(9,"input",59),C("change",function(r){g(e);let o=d();return _(o.deleteRemoteOld.set(o.check(r)))}),p(),u(10,"span"),f(11,"Delete the old branch on the remote"),p()(),E(12,f2,1,1,"ng-container")}if(n&2){let e=d();c(2),S("value",e.renameName())("disabled",e.busy()),c(3),S("checked",e.publishRename())("disabled",e.busy()||e.noRemotes()),c(4),S("checked",e.deleteRemoteOld())("disabled",e.busy()||e.noRemotes()),c(3),D(e.publishRename()||e.deleteRemoteOld()?12:-1)}}function m2(n,t){n&1&&Ct(0)}function g2(n,t){if(n&1&&yt(0,m2,1,0,"ng-container",27),n&2){d(2);let e=_t(11);S("ngTemplateOutlet",e)}}function _2(n,t){if(n&1){let e=I();u(0,"div",60)(1,"button",33,1),C("click",function(){g(e);let r=d();return _(r.deleteForce.set(!1))}),j(3,"span",34),u(4,"span",35)(5,"span",36),f(6,"Safe delete"),p(),u(7,"span",37),f(8," Git refuses when the branch contains commits that are not merged. "),p()()(),u(9,"button",33),C("click",function(){g(e);let r=d();return _(r.deleteForce.set(!0))}),j(10,"span",34),u(11,"span",35)(12,"span",61),f(13,"Force delete"),p(),u(14,"span",37),f(15," Delete even when the branch contains unmerged commits. "),p()()()(),u(16,"label",12)(17,"input",62),C("change",function(r){g(e);let o=d();return _(o.deleteRemoteToo.set(o.check(r)))}),p(),u(18,"span"),f(19,"Also delete the branch on the remote"),p()(),E(20,g2,1,1,"ng-container")}if(n&2){let e=d();c(),te("selected",!e.deleteForce()),S("disabled",e.busy()),K("aria-checked",!e.deleteForce()),c(8),te("selected",e.deleteForce()),S("disabled",e.busy()),K("aria-checked",e.deleteForce()),c(8),S("checked",e.deleteRemoteToo())("disabled",e.busy()||e.noRemotes()),c(3),D(e.deleteRemoteToo()?20:-1)}}function v2(n,t){n&1&&Ct(0)}function b2(n,t){if(n&1&&(u(0,"p",9),f(1),p(),yt(2,v2,1,0,"ng-container",27)),n&2){let e=d(),i=_t(11);c(),$("This deletes ",e.state().ref," on the selected remote."),c(),S("ngTemplateOutlet",i)}}function x2(n,t){if(n&1&&(u(0,"span",37),f(1),p()),n&2){let e=d().$implicit;c(),P(e.description)}}function y2(n,t){if(n&1){let e=I();u(0,"button",33,1),C("click",function(){let r=g(e).$implicit,o=d(2);return _(o.pullMode.set(r.value))}),j(2,"span",34),u(3,"span",35)(4,"span",36),f(5),p(),E(6,x2,2,1,"span",37),p()()}if(n&2){let e=t.$implicit,i=d(2);te("selected",i.pullMode()===e.value),S("disabled",i.busy()),K("aria-checked",i.pullMode()===e.value),c(5),P(e.label),c(),D(e.description?6:-1)}}function C2(n,t){if(n&1&&(u(0,"div",11),Z(1,y2,7,6,"button",46,Lo),p()),n&2){let e=d();c(),Y(e.pullChoices)}}function w2(n,t){if(n&1&&(u(0,"span",37),f(1),p()),n&2){let e=d().$implicit;c(),P(e.description)}}function E2(n,t){if(n&1){let e=I();u(0,"button",33),C("click",function(){let r=g(e).$implicit,o=d(2);return _(o.onStashScope(r.value))}),j(1,"span",34),u(2,"span",35)(3,"span",36),f(4),p(),E(5,w2,2,1,"span",37),p()()}if(n&2){let e=t.$implicit,i=d(2);te("selected",i.stashScope()===e.value),S("disabled",i.busy()),K("aria-checked",i.stashScope()===e.value),c(4),P(e.label),c(),D(e.description?5:-1)}}function D2(n,t){if(n&1){let e=I();u(0,"label",63),f(1,"Stash message (optional)"),p(),u(2,"input",64,1),C("input",function(r){g(e);let o=d();return _(o.setText(r,o.stashMessage))}),p(),u(4,"div",65),Z(5,E2,6,6,"button",46,Lo),p(),u(7,"label",12)(8,"input",66),C("change",function(r){g(e);let o=d();return _(o.includeUntracked.set(o.check(r)))}),p(),u(9,"span"),f(10,"Include untracked files"),p()()}if(n&2){let e=d();c(2),S("value",e.stashMessage())("disabled",e.busy()),c(3),Y(e.stashChoices),c(3),S("checked",e.includeUntracked())("disabled",e.busy()||e.stashScope()==="staged")}}function S2(n,t){if(n&1){let e=I();u(0,"label",12)(1,"input",67,1),C("change",function(r){g(e);let o=d();return _(o.restoreIndex.set(o.check(r)))}),p(),u(3,"span"),f(4,"Restore staged state \u2014 keep files staged as they were when stashed"),p()()}if(n&2){let e=d();c(),S("checked",e.restoreIndex())("disabled",e.busy())}}function M2(n,t){if(n&1){let e=I();u(0,"label",12)(1,"input",67,1),C("change",function(r){g(e);let o=d();return _(o.restoreIndex.set(o.check(r)))}),p(),u(3,"span"),f(4,"Restore staged state \u2014 keep files staged as they were when stashed"),p()()}if(n&2){let e=d();c(),S("checked",e.restoreIndex())("disabled",e.busy())}}function T2(n,t){if(n&1&&(u(0,"p",13),f(1),p()),n&2){let e=d();c(),P(e.error())}}var k2=new Set(["add-tag","create-branch","checkout-commit","push-tag","delete-tag","rename-branch","delete-branch","delete-remote-branch"]),Ed=class n{git=O(et);state=N.required();busy=N(!1);error=N("");confirmed=W();closed=W();focusEl=dt("focusEl");remote=v("");remotes=v([]);remotesLoaded=v(!1);tagName=v("");tagAnnotated=v(!1);tagMessage=v("");pushAfter=v(!1);branchName=v("");checkoutAfter=v(!1);publishBranch=v(!1);checkoutMode=v("detach");remoteCheckoutMode=v("track");remoteBranchName=v("");noCommit=v(!1);recordSource=v(!1);signoff=v(!1);mainline=v(1);mergeMode=v("default");mergeNoCommit=v(!1);autostash=v(!1);preserveMerges=v(!1);resetMode=v("soft");pushForce=v(!1);deleteRemoteToo=v(!1);deleteForce=v(!1);publishRename=v(!1);deleteRemoteOld=v(!1);renameName=v("");pullMode=v("merge");stashMessage=v("");stashScope=v("all");includeUntracked=v(!0);restoreIndex=v(!1);mergeChoices=[{value:"default",label:"Default",description:"Fast-forward when possible, otherwise create a merge commit"},{value:"no-ff",label:"No fast-forward",description:"Always create a merge commit"},{value:"ff-only",label:"Fast-forward only",description:"Refuse the merge when it cannot be fast-forwarded"},{value:"squash",label:"Squash",description:"Stage the merged changes without a merge commit"}];pullChoices=[{value:"merge",label:"Merge",description:"Create a merge commit when needed (default Git behavior)"},{value:"rebase",label:"Rebase",description:"Replay local commits on top of the pulled commits"},{value:"ff-only",label:"Fast-forward only",description:"Only update when the branch can be fast-forwarded"}];resetChoices=[{value:"soft",label:"Soft",description:"Move the branch pointer; keep the index and working tree"},{value:"mixed",label:"Mixed",description:"Unstage the changes; keep them in the working tree"},{value:"hard",label:"Hard",description:"Discard all index and working-tree changes",danger:!0}];constructor(){ge(()=>{let t=this.state();ze(()=>{this.resetDefaults(t),queueMicrotask(()=>this.focusEl()?.nativeElement.focus())})}),ge(()=>{let t=this.remotes();t.length&&(t.some(e=>e.name===this.remote())||this.remote.set(t.some(e=>e.name==="origin")?"origin":t[0].name))})}onEscape(){this.busy()||this.closed.emit()}action=R(()=>this.state().action);title=R(()=>{switch(this.action()){case"add-tag":return"Add Tag";case"create-branch":return"Create Branch";case"checkout-commit":return"Checkout Commit";case"checkout-branch":return"Checkout Branch";case"cherry-pick":return"Cherry Pick";case"revert":return"Revert Commit";case"drop-commit":return"Drop Commit";case"merge":return"Merge";case"rebase":return"Rebase";case"reset-commit":return"Reset Branch";case"push-tag":return"Push Tag";case"delete-tag":return"Delete Tag";case"rename-branch":return"Rename Branch";case"delete-branch":return"Delete Branch";case"delete-remote-branch":return"Delete Remote Branch";case"pull-branch":return"Pull";case"stash-save":return"Stash Changes";case"stash-apply":return"Apply Stash";case"stash-pop":return"Pop Stash"}});okLabel=R(()=>{switch(this.action()){case"checkout-commit":case"checkout-branch":return"Checkout";case"cherry-pick":return"Cherry Pick";case"revert":return"Revert";case"push-tag":return"Push Tag";case"delete-tag":return"Delete Tag";case"rename-branch":return"Rename";case"delete-branch":return"Delete Branch";case"delete-remote-branch":return"Delete Remote Branch";case"stash-save":return"Stash";case"stash-apply":return"Apply";case"stash-pop":return"Pop";default:return this.title()}});danger=R(()=>["revert","drop-commit","reset-commit","delete-tag","delete-branch","delete-remote-branch"].includes(this.action()));targetSummary=R(()=>{let t=this.state();return t.commit?`${t.commit.hash.slice(0,8)} ${t.commit.message}`:t.stash?`stash@{${t.stash.index}} ${t.stash.message}`:t.ref??""});targetKind=R(()=>{let t=this.state();return t.commit?"Commit":t.stash?"Stash":t.action==="add-tag"||t.action==="push-tag"||t.action==="delete-tag"?"Tag":"Branch"});contextLine=R(()=>{let t=this.state(),e=t.currentBranch||"detached HEAD";switch(t.action){case"merge":return`Merge ${this.targetSummary()} into ${e}`;case"rebase":return`Rebase ${e} onto ${this.targetSummary()}`;case"pull-branch":return`Pull ${t.ref??""} into ${e}`;case"checkout-branch":return t.isRemote?`Currently on ${e}`:`Switch the working tree from ${e} to ${t.ref??""}`;default:return""}});isMerge=R(()=>(this.state().commit?.parents.length??0)>1);parentCount=R(()=>this.state().commit?.parents.length??0);mainlineChoices=R(()=>{let t=Math.max(this.parentCount(),2);return Array.from({length:t},(e,i)=>({value:String(i+1),label:`Parent ${i+1}`,description:i===0?"First parent (the branch merged into)":"Side parent (the branch merged in)"}))});stashChoices=[{value:"all",label:"All changes",description:"Stash staged and unstaged changes"},{value:"staged",label:"Staged only",description:"Stash the index without the working tree"},{value:"unstaged",label:"Unstaged only",description:"Stash working-tree changes, keeping staged files staged"}];showRemoteSelect=R(()=>{switch(this.action()){case"add-tag":return this.pushAfter();case"create-branch":return this.publishBranch();case"checkout-commit":return this.checkoutMode()==="branch"&&this.publishBranch();case"push-tag":case"delete-remote-branch":return!0;case"delete-tag":return this.deleteRemoteToo();case"rename-branch":return this.publishRename()||this.deleteRemoteOld();case"delete-branch":return this.deleteRemoteToo();default:return!1}});hasRemotes=R(()=>this.remotes().length>0);noRemotes=R(()=>this.remotesLoaded()&&!this.hasRemotes());canSubmit=R(()=>{if(this.busy())return!1;switch(this.action()){case"add-tag":return!!this.tagName().trim()&&(!this.tagAnnotated()||!!this.tagMessage().trim())&&(!this.pushAfter()||this.hasRemotes());case"create-branch":return!!this.branchName().trim()&&(!this.publishBranch()||this.hasRemotes());case"checkout-commit":return this.checkoutMode()==="detach"||!!this.remoteBranchName().trim()&&(!this.publishBranch()||this.hasRemotes());case"checkout-branch":return this.state().isRemote?this.remoteCheckoutMode()==="detach"||!!this.remoteBranchName().trim():!0;case"delete-remote-branch":return this.hasRemotes();case"rename-branch":return!!this.renameName().trim();default:return!0}});setText(t,e){e.set(t.target.value)}check(t){return t.target.checked}onRemote(t){this.remote.set(t.target.value)}onStashScope(t){this.stashScope.set(t),this.includeUntracked.set(t!=="staged")}submit(){let t=this.state();if(!t||!this.canSubmit())return;let e=t.commit,i;switch(t.action){case"add-tag":i=H({action:"add-tag",name:this.tagName().trim(),annotate:this.tagAnnotated(),message:this.tagAnnotated()?this.tagMessage().trim():"",push:this.pushAfter(),remote:this.remote()},e?{commit:e.hash}:{});break;case"create-branch":i=H({action:"create-branch",name:this.branchName().trim(),checkout:this.checkoutAfter(),publish:this.publishBranch(),remote:this.remote()},e?{commit:e.hash}:{});break;case"checkout-commit":i={action:"checkout-commit",hash:e?.hash??"",mode:this.checkoutMode(),branchName:this.remoteBranchName().trim(),publish:this.publishBranch(),remote:this.remote()};break;case"checkout-branch":i={action:"checkout-branch",branch:t.ref??"",isRemote:!!t.isRemote,mode:t.isRemote?this.remoteCheckoutMode():"switch",branchName:this.remoteBranchName().trim()};break;case"cherry-pick":i=H({action:"cherry-pick",hash:e?.hash??"",noCommit:this.noCommit(),recordSource:this.recordSource(),signoff:this.signoff()},this.isMerge()?{mainline:this.mainline()}:{});break;case"revert":i=H({action:"revert",hash:e?.hash??"",noCommit:this.noCommit(),signoff:this.signoff()},this.isMerge()?{mainline:this.mainline()}:{});break;case"drop-commit":i={action:"drop-commit",hash:e?.hash??""};break;case"merge":i={action:"merge",source:e?.hash??t.ref??"",mode:this.mergeMode(),noCommit:this.mergeNoCommit(),autostash:this.autostash()};break;case"rebase":i={action:"rebase",onto:e?.hash??t.ref??"",autostash:this.autostash(),preserveMerges:this.preserveMerges()};break;case"reset-commit":i={action:"reset-commit",hash:e?.hash??"",mode:this.resetMode()};break;case"push-tag":i={action:"push-tag",name:t.ref??"",force:this.pushForce(),remote:this.remote()};break;case"delete-tag":i={action:"delete-tag",name:t.ref??"",deleteRemote:this.deleteRemoteToo(),remote:this.remote()};break;case"rename-branch":i={action:"rename-branch",oldName:t.ref??"",newName:this.renameName().trim(),publish:this.publishRename(),deleteRemoteOld:this.deleteRemoteOld(),remote:this.remote()};break;case"delete-branch":i={action:"delete-branch",name:t.ref??"",force:this.deleteForce(),deleteRemote:this.deleteRemoteToo(),remote:this.remote()};break;case"delete-remote-branch":i={action:"delete-remote-branch",branch:(t.ref??"").slice((t.ref??"").indexOf("/")+1),remote:this.remote()};break;case"pull-branch":i={action:"pull-branch",branch:(t.ref??"").slice((t.ref??"").indexOf("/")+1),remote:t.remote??this.remote(),mode:this.pullMode()};break;case"stash-save":i={action:"stash-save",message:this.stashMessage().trim(),scope:this.stashScope(),includeUntracked:this.stashScope()==="staged"?!1:this.includeUntracked()};break;case"stash-apply":case"stash-pop":i={action:t.action,index:t.stash?.index??0,restoreIndex:this.restoreIndex()};break}this.confirmed.emit(i)}resetDefaults(t){this.remote.set(t.remote??""),this.remotes.set([]),this.remotesLoaded.set(!1),this.tagName.set(""),this.tagAnnotated.set(!1),this.tagMessage.set(""),this.pushAfter.set(!1),this.branchName.set(""),this.checkoutAfter.set(!1),this.publishBranch.set(!1),this.checkoutMode.set("detach"),this.remoteCheckoutMode.set("track");let e=t.ref??"",i=e.indexOf("/");this.remoteBranchName.set(t.isRemote&&i>0?e.slice(i+1):""),this.renameName.set(t.action==="rename-branch"?e:""),this.noCommit.set(!1),this.recordSource.set(!1),this.signoff.set(!1),this.mainline.set(1),this.mergeMode.set("default"),this.mergeNoCommit.set(!1),this.autostash.set(!1),this.preserveMerges.set(!1),this.resetMode.set("soft"),this.pushForce.set(!1),this.deleteRemoteToo.set(!1),this.deleteForce.set(!1),this.publishRename.set(!1),this.deleteRemoteOld.set(!1),this.pullMode.set("merge");let r=t.stashScope??"all";this.stashMessage.set(""),this.stashScope.set(r),this.includeUntracked.set(r!=="staged"),this.restoreIndex.set(!1),this.loadRemotes(t.action)}loadRemotes(t){k2.has(t)&&this.git.getRemotes().subscribe({next:e=>{this.remotes.set(e),this.remotesLoaded.set(!0)},error:()=>{this.remotes.set([]),this.remotesLoaded.set(!0)}})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-git-operation-dialog"]],viewQuery:function(e,i){e&1&&st(i.focusEl,EO,5),e&2&&Ot()},hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},inputs:{state:[1,"state"],busy:[1,"busy"],error:[1,"error"]},outputs:{confirmed:"confirmed",closed:"closed"},decls:37,vars:12,consts:[["remoteSelect",""],["focusEl",""],[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","git-op-title",1,"dialog",3,"submit"],["id","git-op-title",1,"title"],[1,"target"],[1,"target-kind"],[1,"target-value",3,"title"],[1,"context"],[1,"warning"],["role","radiogroup","aria-label","Reset mode",1,"choices"],["role","radiogroup","aria-label","Integration mode",1,"choices"],[1,"checkbox-row"],["role","alert",1,"error"],[1,"actions"],["type","button",1,"btn",3,"click","disabled"],["type","submit",1,"btn","btn-primary",3,"disabled"],["for","git-op-remote",1,"field-label"],["id","git-op-remote",1,"input","select",3,"change","disabled"],[3,"value","selected"],[1,"notice"],["for","git-op-tag-name",1,"field-label"],["id","git-op-tag-name","type","text","autocomplete","off","placeholder","v1.0.0",1,"input",3,"input","value","disabled"],["id","git-op-tag-annotated","type","checkbox",3,"change","checked","disabled"],["id","git-op-tag-push","type","checkbox",3,"change","checked","disabled"],["for","git-op-tag-message",1,"field-label"],["id","git-op-tag-message","rows","3","placeholder","Release notes",1,"input",3,"input","value","disabled"],[4,"ngTemplateOutlet"],["for","git-op-branch-name",1,"field-label"],["id","git-op-branch-name","type","text","autocomplete","off","placeholder","feature/my-branch",1,"input",3,"input","value","disabled"],["id","git-op-branch-checkout","type","checkbox",3,"change","checked","disabled"],["id","git-op-branch-publish","type","checkbox",3,"change","checked","disabled"],["role","radiogroup","aria-label","Checkout mode",1,"choices"],["type","button","role","radio",1,"choice",3,"click","disabled"],["aria-hidden","true",1,"option-radio"],[1,"option-text"],[1,"option-label"],[1,"option-description"],["for","git-op-checkout-name",1,"field-label"],["id","git-op-checkout-name","type","text","autocomplete","off","placeholder","feature/my-branch",1,"input",3,"input","value","disabled"],["id","git-op-checkout-publish","type","checkbox",3,"change","checked","disabled"],["id","git-op-checkout-name","type","text","autocomplete","off",1,"input",3,"input","value","disabled"],["id","git-op-nocommit","type","checkbox",3,"change","checked","disabled"],["id","git-op-record-source","type","checkbox",3,"change","checked","disabled"],["id","git-op-signoff","type","checkbox",3,"change","checked","disabled"],["role","radiogroup","aria-label","Mainline parent",1,"choices"],["type","button","role","radio",1,"choice",3,"selected","disabled"],["role","radiogroup","aria-label","Merge mode",1,"choices"],["type","button","role","radio",1,"choice",3,"selected","danger","disabled"],["id","git-op-merge-autostash","type","checkbox",3,"change","checked","disabled"],["id","git-op-merge-nocommit","type","checkbox",3,"change","checked","disabled"],["id","git-op-rebase-autostash","type","checkbox",3,"change","checked","disabled"],["id","git-op-rebase-merges","type","checkbox",3,"change","checked","disabled"],["id","git-op-tag-force","type","checkbox",3,"change","checked","disabled"],[1,"danger-text"],["id","git-op-tag-remote","type","checkbox",3,"change","checked","disabled"],["for","git-op-rename-name",1,"field-label"],["id","git-op-rename-name","type","text","autocomplete","off",1,"input",3,"input","value","disabled"],["id","git-op-rename-publish","type","checkbox",3,"change","checked","disabled"],["id","git-op-rename-delete-old","type","checkbox",3,"change","checked","disabled"],["role","radiogroup","aria-label","Deletion mode",1,"choices"],[1,"option-label","danger-text"],["id","git-op-branch-remote","type","checkbox",3,"change","checked","disabled"],["for","git-op-stash-message",1,"field-label"],["id","git-op-stash-message","type","text","autocomplete","off","placeholder","WIP",1,"input",3,"input","value","disabled"],["role","radiogroup","aria-label","Stash scope",1,"choices"],["id","git-op-stash-untracked","type","checkbox",3,"change","checked","disabled"],["id","git-op-stash-index","type","checkbox",3,"change","checked","disabled"]],template:function(e,i){if(e&1){let r=I();u(0,"div",2),C("click",function(){return g(r),_(!i.busy()&&i.closed.emit())}),p(),u(1,"form",3),C("submit",function(s){return g(r),s.preventDefault(),_(i.submit())}),u(2,"h3",4),f(3),p(),u(4,"div",5)(5,"span",6),f(6),p(),u(7,"span",7),f(8),p()(),E(9,SO,2,1,"p",8),yt(10,kO,6,2,"ng-template",null,0,Co),E(12,RO,14,8)(13,LO,13,7)(14,jO,17,9)(15,zO,1,1)(16,qO,14,7)(17,KO,10,5)(18,XO,2,1,"p",9)(19,n2,8,3)(20,i2,11,4)(21,s2,3,0,"div",10)(22,l2,5,3)(23,u2,7,3)(24,h2,13,7)(25,_2,21,11)(26,b2,3,2)(27,C2,3,0,"div",11)(28,D2,11,4)(29,S2,5,2,"label",12)(30,M2,5,2,"label",12),E(31,T2,2,1,"p",13),u(32,"div",14)(33,"button",15),C("click",function(){return g(r),_(i.closed.emit())}),f(34,"Cancel"),p(),u(35,"button",16),f(36),p()()()}if(e&2){let r;c(3),P(i.title()),c(3),P(i.targetKind()),c(),S("title",i.targetSummary()),c(),P(i.targetSummary()),c(),D(i.contextLine()?9:-1),c(3),D((r=i.action())==="add-tag"?12:r==="create-branch"?13:r==="checkout-commit"?14:r==="checkout-branch"?15:r==="cherry-pick"?16:r==="revert"?17:r==="drop-commit"?18:r==="merge"?19:r==="rebase"?20:r==="reset-commit"?21:r==="push-tag"?22:r==="delete-tag"?23:r==="rename-branch"?24:r==="delete-branch"?25:r==="delete-remote-branch"?26:r==="pull-branch"?27:r==="stash-save"?28:r==="stash-apply"?29:r==="stash-pop"?30:-1),c(19),D(i.error()?31:-1),c(2),S("disabled",i.busy()),c(2),te("btn-danger",i.danger()),S("disabled",!i.canSubmit()),c(),$(" ",i.busy()?"Working\u2026":i.okLabel()," ")}},dependencies:[ia],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:400;background:#00000080}.dialog[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;z-index:401;width:min(480px,calc(100vw - 48px));max-height:calc(100vh - 64px);overflow-y:auto;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:8px;padding:18px;border:1px solid var(--border);border-radius:8px;background:var(--bg-alt);box-shadow:0 10px 36px #0009}.title[_ngcontent-%COMP%]{margin:0;color:var(--text-bright);font-size:14px;font-weight:600}.target[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:8px;padding:7px 10px;border:1px solid var(--border);border-radius:4px;background:var(--bg)}.target-kind[_ngcontent-%COMP%]{flex:none;padding:1px 6px;border-radius:3px;background:var(--bg-hover);color:var(--text-dim);font-size:10px;text-transform:uppercase;letter-spacing:.4px}.target-value[_ngcontent-%COMP%]{min-width:0;overflow:hidden;color:var(--text);font-size:12px;text-overflow:ellipsis;white-space:nowrap}.context[_ngcontent-%COMP%], .notice[_ngcontent-%COMP%], .warning[_ngcontent-%COMP%]{margin:0;color:var(--text-dim);font-size:12px;line-height:1.45}.notice[_ngcontent-%COMP%]{color:#dcb67a}.warning[_ngcontent-%COMP%]{color:var(--red)}.error[_ngcontent-%COMP%]{margin:0;color:var(--red);font-size:12px;line-height:1.4}.field-label[_ngcontent-%COMP%]{color:var(--text);font-size:12px;font-weight:600}.input[_ngcontent-%COMP%]{min-width:0;padding:7px 10px;border:1px solid var(--border);border-radius:4px;outline:none;background:var(--bg);color:var(--text);font:13px inherit}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.select[_ngcontent-%COMP%]{width:100%}textarea.input[_ngcontent-%COMP%]{resize:vertical}.checkbox-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:var(--text);font-size:12px;cursor:pointer}.checkbox-row[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{accent-color:var(--accent)}.checkbox-row[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled{cursor:default}.danger-text[_ngcontent-%COMP%]{color:var(--red)}.choices[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;max-height:40vh;overflow-y:auto}.choice[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:9px;padding:7px 10px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--text);font:12px inherit;text-align:left;cursor:pointer}.choice[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover)}.choice.selected[_ngcontent-%COMP%]{border-color:var(--accent);background:var(--bg-hover)}.choice[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}.choice.danger[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{color:var(--red)}.option-radio[_ngcontent-%COMP%]{flex:none;width:12px;height:12px;margin-top:2px;border:1px solid var(--border);border-radius:50%;background:var(--bg)}.choice.selected[_ngcontent-%COMP%] .option-radio[_ngcontent-%COMP%]{border-color:var(--accent);box-shadow:inset 0 0 0 2.5px var(--bg),inset 0 0 0 6px var(--accent)}.option-text[_ngcontent-%COMP%]{display:flex;min-width:0;flex-direction:column;gap:1px}.option-label[_ngcontent-%COMP%]{color:var(--text-bright);font-weight:500}.option-description[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px;line-height:1.4}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:7px}.btn[_ngcontent-%COMP%]{padding:6px 14px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font:12px inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn-primary[_ngcontent-%COMP%]{border-color:var(--accent);background:var(--accent);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#2b7cd3}.btn-danger[_ngcontent-%COMP%]{border-color:#a1260d;background:#a1260d;color:#fff}.btn-danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#8c2009}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}"],changeDetection:0})};var I2=(n,t)=>t.name,Ny=(n,t)=>t.value;function P2(n,t){n&1&&(b(0,"p"),f(1,"Repository preferences and Git configuration."),y())}function O2(n,t){if(n&1&&(b(0,"div",5),f(1),y()),n&2){let e=d();c(),P(e.error())}}function R2(n,t){if(n&1){let e=I();b(0,"div",30)(1,"strong",31),f(2),y(),b(3,"span",32),f(4),y(),b(5,"span"),f(6,"Fetch"),y(),b(7,"span",33)(8,"button",34),F("click",function(){let r=g(e).$implicit,o=d(2);return _(o.editRemote(r))}),f(9,"Edit"),y(),b(10,"button",35),F("click",function(){let r=g(e).$implicit,o=d(2);return _(o.removeRemote(r.name))}),f(11,"Remove"),y()()(),b(12,"div",36),ee(13,"span"),b(14,"span",32),f(15),y(),b(16,"span"),f(17,"Push"),y(),ee(18,"span"),y()}if(n&2){let e=t.$implicit;c(2),P(e.name),c(2),P(e.fetchUrl),c(11),P(e.pushUrl)}}function N2(n,t){n&1&&(b(0,"p",19),f(1,"No remotes configured."),y())}function A2(n,t){if(n&1){let e=I();b(0,"div",13)(1,"span"),f(2,"Issue regex"),y(),b(3,"code"),f(4),y(),b(5,"span"),f(6,"Issue URL"),y(),b(7,"code"),f(8),y(),b(9,"span"),f(10,"Scope"),y(),b(11,"strong"),f(12),y()(),b(13,"div",14)(14,"button",15),F("click",function(){g(e);let r=d(2);return _(r.editIssueLinking())}),f(15,"Edit"),y(),b(16,"button",37),F("click",function(){g(e);let r=d(2);return _(r.removeIssueLinking())}),f(17,"Remove"),y()()}if(n&2){let e=t;c(4),P(e.regex),c(4),P(e.url),c(4),P(e.useGlobally?"Global":"This repository")}}function L2(n,t){if(n&1){let e=I();b(0,"div",14)(1,"button",15),F("click",function(){g(e);let r=d(2);return _(r.editIssueLinking())}),f(2,"+ Add Issue Linking"),y()()}}function F2(n,t){if(n&1&&(b(0,"option",49),f(1),y()),n&2){let e=t.$implicit;G("value",e.value),c(),P(e.label)}}function V2(n,t){if(n&1&&(b(0,"option",49),f(1),y()),n&2){let e=t.$implicit;G("value",e.value),c(),P(e.label)}}function B2(n,t){if(n&1){let e=I();b(0,"label",38)(1,"span")(2,"strong"),f(3,"Which pull requests"),y(),b(4,"small"),f(5,"Only pull requests still open are reviewed."),y()(),b(6,"select",39),F("change",function(r){g(e);let o=d(2);return _(o.changeAiReviewScope(r.target))}),b(7,"option",40),f(8,"Where I am a reviewer"),y(),b(9,"option",41),f(10,"The ones I created"),y(),b(11,"option",42),f(12,"Every open pull request"),y()()(),b(13,"label",43)(14,"span")(15,"strong"),f(16,"Check every"),y(),b(17,"small"),f(18,"Minutes between checks for new commits."),y()(),b(19,"input",44),F("input",function(r){g(e);let o=d(2);return _(o.aiReviewPollMinutes.set(r.target.valueAsNumber))}),y()(),b(20,"label",7)(21,"span")(22,"strong"),f(23,"Include drafts"),y(),b(24,"small"),f(25,"Also review pull requests still marked as drafts."),y()(),b(26,"input",8),F("change",function(r){g(e);let o=d(2);return _(o.setChecked(r.target,"aiReviewIncludeDrafts"))}),y()(),b(27,"label",45)(28,"span")(29,"strong"),f(30,"Claude Code path"),y(),b(31,"small"),f(32,"Leave empty to look on PATH, in the standard install locations, and in the Claude Code VS Code extension's bundled copy."),y()(),b(33,"input",46),F("input",function(r){g(e);let o=d(2);return _(o.aiReviewClaudePath.set(r.target.value))}),y()(),b(34,"label",47)(35,"span")(36,"strong"),f(37,"Claude model"),y(),b(38,"small"),f(39,"Which model reviews your pull requests. Default uses whatever Claude Code itself is set to; opus, sonnet and haiku always mean the latest of that family. The model picker in a pull request's Review tab starts from this."),y()(),b(40,"select",48),F("change",function(r){g(e);let o=d(2);return _(o.changeAiReviewModel(r.target))}),Z(41,F2,2,2,"option",49,Ny),y()(),b(43,"label",50)(44,"span")(45,"strong"),f(46,"Commit message model"),y(),b(47,"small"),f(48,"Which model drafts commit messages from your pending changes. Haiku is fast and cheap enough for the job."),y()(),b(49,"select",51),F("change",function(r){g(e);let o=d(2);return _(o.changeAiReviewCommitMessageModel(r.target))}),Z(50,V2,2,2,"option",49,Ny),y()(),b(52,"label",52)(53,"span")(54,"strong"),f(55,"Reviewing instructions"),y(),b(56,"small"),f(57,"Your team's conventions, or the things you never want commented on."),y()(),b(58,"textarea",53),F("input",function(r){g(e);let o=d(2);return _(o.aiReviewInstructions.set(r.target.value))}),y()()}if(n&2){let e=d(2);c(6),G("value",e.aiReviewScope()),c(13),G("value",e.aiReviewPollMinutes()),c(7),G("checked",e.aiReviewIncludeDrafts()),c(7),G("value",e.aiReviewClaudePath()),c(7),G("value",e.aiReviewModel()),c(),Y(e.aiReviewModelOptions()),c(8),G("value",e.aiReviewCommitMessageModel()),c(),Y(e.commitMessageModelOptions()),c(8),G("value",e.aiReviewInstructions())}}function j2(n,t){if(n&1){let e=I();b(0,"div",6)(1,"fieldset")(2,"legend"),f(3,"Repository"),y(),b(4,"label",7)(5,"span")(6,"strong"),f(7,"Automatically refresh"),y(),b(8,"small"),f(9,"Reload changes made outside Guito."),y()(),b(10,"input",8),F("change",function(r){g(e);let o=d();return _(o.setChecked(r.target,"autoReload"))}),y()(),b(11,"label",7)(12,"span")(13,"strong"),f(14,"Show Git graph"),y(),b(15,"small"),f(16,"Display branch lines beside commit history."),y()(),b(17,"input",8),F("change",function(r){g(e);let o=d();return _(o.setChecked(r.target,"showGraph"))}),y()(),b(18,"label",7)(19,"span")(20,"strong"),f(21,"Show stashes"),y(),b(22,"small"),f(23,"Pin stash entries above commit history."),y()(),b(24,"input",8),F("change",function(r){g(e);let o=d();return _(o.setChecked(r.target,"showStashes"))}),y()(),b(25,"label",7)(26,"span")(27,"strong"),f(28,"Show tags"),y(),b(29,"small"),f(30,"Show tag badges attached to commits."),y()(),b(31,"input",8),F("change",function(r){g(e);let o=d();return _(o.setChecked(r.target,"showTags"))}),y()(),b(32,"label",7)(33,"span")(34,"strong"),f(35,"Show remote branches"),y(),b(36,"small"),f(37,"Include remote branches in the repository panel and branch pills."),y()(),b(38,"input",8),F("change",function(r){g(e);let o=d();return _(o.setChecked(r.target,"showRemoteBranches"))}),y()(),b(39,"label",7)(40,"span")(41,"strong"),f(42,"Expand repository panel sections"),y(),b(43,"small"),f(44,"Open the left-side panel with all sections expanded."),y()(),b(45,"input",8),F("change",function(r){g(e);let o=d();return _(o.setChecked(r.target,"sidePanelSectionsExpanded"))}),y()(),b(46,"label",9)(47,"span")(48,"strong"),f(49,"Search mode"),y(),b(50,"small"),f(51,"Navigate jumps between matches with arrows; filter shows only matching commits."),y()(),b(52,"select",10),F("change",function(r){g(e);let o=d();return _(o.changeSearchMode(r.target))}),b(53,"option",11),f(54,"Navigate matches"),y(),b(55,"option",12),f(56,"Filter matches"),y()()(),b(57,"label",7)(58,"span")(59,"strong"),f(60,"Case-sensitive search"),y(),b(61,"small"),f(62,"Only match commits and repository panel items with the same uppercase and lowercase letters and accents."),y()(),b(63,"input",8),F("change",function(r){g(e);let o=d();return _(o.setChecked(r.target,"searchCaseSensitive"))}),y()()(),b(64,"fieldset")(65,"legend"),f(66,"User details"),y(),b(67,"div",13)(68,"span"),f(69,"User name"),y(),b(70,"strong"),f(71),y(),b(72,"span"),f(73,"User email"),y(),b(74,"strong"),f(75),y()(),b(76,"div",14)(77,"button",15),F("click",function(){g(e);let r=d();return _(r.editIdentity())}),f(78,"Edit"),y(),b(79,"button",16),F("click",function(){g(e);let r=d();return _(r.removeIdentity())}),f(80,"Remove"),y()()(),b(81,"fieldset")(82,"legend"),f(83,"Remote configuration"),y(),b(84,"div",17)(85,"div",18)(86,"strong"),f(87,"Remote"),y(),b(88,"strong"),f(89,"URL"),y(),b(90,"strong"),f(91,"Type"),y(),b(92,"strong"),f(93,"Action"),y()(),Z(94,R2,19,3,null,null,I2,!1,N2,2,0,"p",19),y(),b(97,"div",14)(98,"button",15),F("click",function(){g(e);let r=d();return _(r.editRemote())}),f(99,"+ Add Remote"),y()()(),b(100,"fieldset")(101,"legend"),f(102,"Issue linking"),y(),b(103,"p",20),f(104,"Convert issue numbers in commit messages into links to your issue tracking system."),y(),E(105,A2,18,3)(106,L2,3,0,"div",14),y(),b(107,"fieldset")(108,"legend"),f(109,"Branches and tags"),y(),b(110,"label",21)(111,"input",22),F("change",function(){g(e);let r=d();return _(r.refListView.set("flat"))}),y(),b(112,"span")(113,"strong"),f(114,"Flat list"),y(),b(115,"small"),f(116,"Show each branch and tag with its full name."),y()()(),b(117,"label",21)(118,"input",22),F("change",function(){g(e);let r=d();return _(r.refListView.set("tree"))}),y(),b(119,"span")(120,"strong"),f(121,"Directory tree"),y(),b(122,"small"),f(123,"Group branches and tags into collapsible namespace folders."),y()()()(),b(124,"fieldset")(125,"legend"),f(126,"Changed files"),y(),b(127,"label",21)(128,"input",23),F("change",function(){g(e);let r=d();return _(r.fileListView.set("flat"))}),y(),b(129,"span")(130,"strong"),f(131,"Flat list"),y(),b(132,"small"),f(133,"Show each file with its full path."),y()()(),b(134,"label",21)(135,"input",23),F("change",function(){g(e);let r=d();return _(r.fileListView.set("tree"))}),y(),b(136,"span")(137,"strong"),f(138,"Directory tree"),y(),b(139,"small"),f(140,"Group files into collapsible folders."),y()()()(),b(141,"fieldset")(142,"legend"),f(143,"Azure DevOps"),y(),b(144,"label",24)(145,"span")(146,"strong"),f(147,"Server URL"),y(),b(148,"small"),f(149,"Enables pull request creation for an on-prem Azure DevOps Server."),y()(),b(150,"input",25),F("input",function(r){g(e);let o=d();return _(o.azureDevOpsUrl.set(r.target.value))}),y()(),b(151,"label",26)(152,"span")(153,"strong"),f(154,"Automatic PR branch name"),y(),b(155,"small"),f(156,"Used when creating a new branch for a pull request. Variables: username, randomstring, branch, targetbranch, title, repository, date, time, and timestamp (wrapped as dollar-brace placeholders)."),y()(),b(157,"input",27),F("input",function(r){g(e);let o=d();return _(o.prBranchNameTemplate.set(r.target.value))}),y()(),b(158,"label",7)(159,"span")(160,"strong"),f(161,"Allow merge completion"),y(),b(162,"small"),f(163,'Offer the "No fast-forward (merge commit)" and "Semi-linear merge" pull request completion strategies.'),y()(),b(164,"input",8),F("change",function(r){g(e);let o=d();return _(o.setChecked(r.target,"allowMerge"))}),y()()(),b(165,"fieldset")(166,"legend"),f(167,"Automated pull request review"),y(),b(168,"label",7)(169,"span")(170,"strong"),f(171,"Review pull requests with Claude Code"),y(),b(172,"small"),f(173,"Guito checks for pull requests, reviews every new commit, and queues the comments in the pull request's Review tab. Nothing is posted until you post it. Requires Claude Code installed and signed in on this machine."),y()(),b(174,"input",8),F("change",function(r){g(e);let o=d();return _(o.setChecked(r.target,"aiReviewEnabled"))}),y()(),E(175,B2,59,7),y()(),b(176,"footer")(177,"button",28),F("click",function(){g(e);let r=d();return _(r.closed.emit())}),f(178,"Cancel"),y(),b(179,"button",29),F("click",function(){g(e);let r=d();return _(r.save())}),f(180),y()()}if(n&2){let e,i=d();c(10),G("checked",i.autoReload()),c(7),G("checked",i.showGraph()),c(7),G("checked",i.showStashes()),c(7),G("checked",i.showTags()),c(7),G("checked",i.showRemoteBranches()),c(7),G("checked",i.sidePanelSectionsExpanded()),c(7),G("value",i.searchMode()),c(11),G("checked",i.searchCaseSensitive()),c(8),P(i.identity().name||"Not configured"),c(4),P(i.identity().email||"Not configured"),c(4),G("disabled",i.busy()),c(15),Y(i.remotes()),c(11),D((e=i.settings().issueLinking)?105:106,e),c(6),G("checked",i.refListView()==="flat"),c(7),G("checked",i.refListView()==="tree"),c(10),G("checked",i.fileListView()==="flat"),c(7),G("checked",i.fileListView()==="tree"),c(15),G("value",i.azureDevOpsUrl()),c(7),G("value",i.prBranchNameTemplate()),c(7),G("checked",i.allowMerge()),c(10),G("checked",i.aiReviewEnabled()),c(),D(i.aiReviewEnabled()?175:-1),c(2),G("disabled",i.saving()),c(2),G("disabled",i.saving()||i.busy()),c(),P(i.saving()?"Saving...":"Save settings")}}function $2(n,t){if(n&1){let e=I();b(0,"label",55)(1,"span")(2,"strong"),f(3,"User name"),y()(),b(4,"input",56),F("input",function(r){g(e);let o=d(2);return _(o.userName.set(r.target.value))}),y()(),b(5,"label",55)(6,"span")(7,"strong"),f(8,"User email"),y()(),b(9,"input",57),F("input",function(r){g(e);let o=d(2);return _(o.userEmail.set(r.target.value))}),y()()}if(n&2){let e=d(2);c(4),G("value",e.userName()),c(5),G("value",e.userEmail())}}function H2(n,t){if(n&1){let e=I();b(0,"label",55)(1,"span")(2,"strong"),f(3,"Remote name"),y()(),b(4,"input",58),F("input",function(r){g(e);let o=d(2);return _(o.remoteName.set(r.target.value))}),y()(),b(5,"label",55)(6,"span")(7,"strong"),f(8,"Fetch URL"),y()(),b(9,"input",59),F("input",function(r){g(e);let o=d(2);return _(o.fetchUrl.set(r.target.value))}),y()(),b(10,"label",55)(11,"span")(12,"strong"),f(13,"Push URL"),y(),b(14,"small"),f(15,"Leave blank to use the fetch URL."),y()(),b(16,"input",60),F("input",function(r){g(e);let o=d(2);return _(o.pushUrl.set(r.target.value))}),y()()}if(n&2){let e=d(2);c(4),G("value",e.remoteName()),c(5),G("value",e.fetchUrl()),c(7),G("value",e.pushUrl())}}function z2(n,t){if(n&1){let e=I();b(0,"p",20),f(1,"For example, regex "),b(2,"code"),f(3,"#(\\d+)"),y(),f(4," and URL "),b(5,"code"),f(6,"https://github.com/owner/repo/issues/$1"),y(),f(7," turn #123 into a link."),y(),b(8,"label",55)(9,"span")(10,"strong"),f(11,"Issue regex"),y()(),b(12,"input",61),F("input",function(r){g(e);let o=d(2);return _(o.issueRegex.set(r.target.value))}),y()(),b(13,"label",55)(14,"span")(15,"strong"),f(16,"Issue URL"),y()(),b(17,"input",62),F("input",function(r){g(e);let o=d(2);return _(o.issueUrl.set(r.target.value))}),y()(),b(18,"label",21)(19,"input",8),F("change",function(r){g(e);let o=d(2);return _(o.issueGlobal.set(r.target.checked))}),y(),b(20,"span")(21,"strong"),f(22,"Use globally"),y(),b(23,"small"),f(24,"Apply this rule to repositories without their own rule."),y()()()}if(n&2){let e=d(2);c(12),G("value",e.issueRegex()),c(5),G("value",e.issueUrl()),c(2),G("checked",e.issueGlobal())}}function U2(n,t){if(n&1){let e=I();b(0,"div",54),E(1,$2,10,2)(2,H2,17,3)(3,z2,25,3),y(),b(4,"footer")(5,"button",28),F("click",function(){g(e);let r=d();return _(r.mode.set("main"))}),f(6,"Cancel"),y(),b(7,"button",29),F("click",function(){g(e);let r=d();return _(r.mode()==="identity"?r.saveIdentity():r.mode()==="remote"?r.saveRemote():r.saveIssueLinking())}),f(8),y()()}if(n&2){let e=d();c(),D(e.mode()==="identity"?1:e.mode()==="remote"?2:3),c(4),G("disabled",e.busy()),c(2),G("disabled",e.busy()),c(),P(e.busy()?"Saving...":"Save")}}var Dd=class n{git=O(et);settings=N.required();identity=N.required();saving=N(!1);saved=W();settingsUpdated=W();identityChanged=W();repositoryChanged=W();closed=W();azureDevOpsUrl=v("");prBranchNameTemplate=v("pr/${randomstring}");autoReload=v(!0);showGraph=v(!0);showStashes=v(!1);showTags=v(!0);showRemoteBranches=v(!0);fileListView=v("flat");refListView=v("flat");sidePanelSectionsExpanded=v(!0);searchMode=v("navigate");searchCaseSensitive=v(!1);allowMerge=v(!0);aiReviewEnabled=v(!1);aiReviewScope=v("reviewer");aiReviewPollMinutes=v(30);aiReviewIncludeDrafts=v(!1);aiReviewClaudePath=v("");aiReviewModel=v("");aiReviewCommitMessageModel=v("haiku");aiReviewInstructions=v("");remotes=v([]);busy=v(!1);error=v("");mode=v("main");userName=v("");userEmail=v("");originalRemoteName=v("");remoteName=v("");fetchUrl=v("");pushUrl=v("");issueRegex=v("");issueUrl=v("");issueGlobal=v(!1);remotesLoaded=!1;constructor(){ge(()=>{let t=this.settings();this.azureDevOpsUrl.set(t.azureDevOpsUrl??""),this.prBranchNameTemplate.set(t.prBranchNameTemplate??"pr/${randomstring}"),this.autoReload.set(t.autoReload!==!1),this.showGraph.set(t.showGraph!==!1),this.showStashes.set(t.showStashes===!0),this.showTags.set(t.showTags!==!1),this.showRemoteBranches.set(t.showRemoteBranches!==!1),this.fileListView.set(t.fileListView==="tree"?"tree":"flat"),this.refListView.set(t.refListView==="tree"?"tree":"flat"),this.sidePanelSectionsExpanded.set(t.sidePanelSectionsExpanded!==!1),this.searchMode.set(t.searchMode==="filter"?"filter":"navigate"),this.searchCaseSensitive.set(t.searchCaseSensitive===!0),this.allowMerge.set(t.allowMerge!==!1);let e=t.aiReview;this.aiReviewEnabled.set(e?.enabled===!0),this.aiReviewScope.set(e?.scope??"reviewer"),this.aiReviewPollMinutes.set(e?.pollMinutes??30),this.aiReviewIncludeDrafts.set(e?.includeDrafts===!0),this.aiReviewClaudePath.set(e?.claudePath??""),this.aiReviewModel.set(e?.model??""),this.aiReviewCommitMessageModel.set(e?.commitMessageModel||"haiku"),this.aiReviewInstructions.set(e?.instructions??""),this.remotesLoaded||(this.remotesLoaded=!0,this.loadRemotes())})}onEscape(){this.saving()||this.busy()||(this.mode()==="main"?this.closed.emit():this.mode.set("main"))}setChecked(t,e){this[e].set(t.checked)}save(){this.saved.emit({azureDevOpsUrl:this.azureDevOpsUrl().trim(),prBranchNameTemplate:this.prBranchNameTemplate().trim(),autoReload:this.autoReload(),showGraph:this.showGraph(),showStashes:this.showStashes(),showTags:this.showTags(),showRemoteBranches:this.showRemoteBranches(),fileListView:this.fileListView(),refListView:this.refListView(),sidePanelSectionsExpanded:this.sidePanelSectionsExpanded(),searchMode:this.searchMode(),searchCaseSensitive:this.searchCaseSensitive(),allowMerge:this.allowMerge(),aiReview:{enabled:this.aiReviewEnabled(),scope:this.aiReviewScope(),pollMinutes:Number(this.aiReviewPollMinutes())||30,includeDrafts:this.aiReviewIncludeDrafts(),claudePath:this.aiReviewClaudePath().trim(),model:this.aiReviewModel(),commitMessageModel:this.aiReviewCommitMessageModel(),instructions:this.aiReviewInstructions()}})}changeAiReviewScope(t){let e=t.value;this.aiReviewScope.set(e==="mine"||e==="all"?e:"reviewer")}aiReviewModelOptions=R(()=>{let t=this.aiReviewModel().trim();return t&&!Ti.some(e=>e.value===t)?[...Ti,{value:t,label:t}]:Ti});commitMessageModelOptions=R(()=>{let t=this.aiReviewCommitMessageModel().trim();return t&&!id.some(e=>e.value===t)?[...id,{value:t,label:t}]:id});changeAiReviewModel(t){this.aiReviewModel.set(t.value)}changeAiReviewCommitMessageModel(t){this.aiReviewCommitMessageModel.set(t.value)}changeSearchMode(t){let e=t.value;this.searchMode.set(e==="filter"?"filter":"navigate")}editIdentity(){this.userName.set(this.identity().name),this.userEmail.set(this.identity().email),this.error.set(""),this.mode.set("identity")}saveIdentity(){this.run(this.git.saveIdentity({name:this.userName().trim(),email:this.userEmail().trim()}),t=>{this.identityChanged.emit(t),this.repositoryChanged.emit(),this.mode.set("main")})}removeIdentity(){window.confirm("Remove the repository-specific Git user name and email?")&&this.run(this.git.removeIdentity(),t=>{this.identityChanged.emit(t),this.repositoryChanged.emit()})}editRemote(t){this.originalRemoteName.set(t?.name??""),this.remoteName.set(t?.name??""),this.fetchUrl.set(t?.fetchUrl??""),this.pushUrl.set(t?.pushUrl??""),this.error.set(""),this.mode.set("remote")}saveRemote(){this.run(this.git.saveRemote({originalName:this.originalRemoteName()||void 0,name:this.remoteName().trim(),fetchUrl:this.fetchUrl().trim(),pushUrl:this.pushUrl().trim()}),t=>{this.remotes.set(t),this.repositoryChanged.emit(),this.mode.set("main")})}removeRemote(t){window.confirm(`Remove the remote "${t}" from this repository?`)&&this.run(this.git.removeRemote(t),e=>{this.remotes.set(e),this.repositoryChanged.emit()})}editIssueLinking(){let t=this.settings().issueLinking;this.issueRegex.set(t?.regex??"#(\\d+)"),this.issueUrl.set(t?.url??""),this.issueGlobal.set(t?.useGlobally??!1),this.error.set(""),this.mode.set("issue")}saveIssueLinking(){let t={regex:this.issueRegex().trim(),url:this.issueUrl().trim(),useGlobally:this.issueGlobal()};this.run(this.git.saveSettings({issueLinking:t}),e=>{this.settingsUpdated.emit(e),this.mode.set("main")})}removeIssueLinking(){window.confirm("Remove this issue-linking rule?")&&this.run(this.git.saveSettings({issueLinking:null,issueLinkingGlobal:this.settings().issueLinking?.useGlobally??!1}),t=>this.settingsUpdated.emit(t))}loadRemotes(){this.git.getRemotes().subscribe({next:t=>this.remotes.set(t),error:t=>this.error.set(this.errorMessage(t))})}run(t,e){this.busy()||(this.busy.set(!0),this.error.set(""),t.subscribe({next:i=>{this.busy.set(!1),e(i)},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}}))}errorMessage(t){return t?.error?.error??t?.message??"The setting could not be saved."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-settings-dialog"]],hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},inputs:{settings:[1,"settings"],identity:[1,"identity"],saving:[1,"saving"]},outputs:{saved:"saved",settingsUpdated:"settingsUpdated",identityChanged:"identityChanged",repositoryChanged:"repositoryChanged",closed:"closed"},decls:12,vars:5,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","settings-title",1,"dialog"],[1,"dialog-header"],["id","settings-title"],["type","button","aria-label","Close settings",1,"close-btn",3,"click","disabled"],["role","alert",1,"dialog-error"],[1,"settings-body"],[1,"setting-row"],["type","checkbox",3,"change","checked"],["for","search-mode",1,"setting-row"],["id","search-mode",3,"change","value"],["value","navigate"],["value","filter"],[1,"detail-grid"],[1,"inline-actions"],["type","button",3,"click"],["type","button",1,"danger-link",3,"click","disabled"],["role","table","aria-label","Git remotes",1,"remote-table"],["role","row",1,"remote-head"],[1,"empty"],[1,"section-help"],[1,"choice"],["type","radio","name","ref-view",3,"change","checked"],["type","radio","name","file-view",3,"change","checked"],["for","azure-devops-url",1,"text-setting"],["id","azure-devops-url","type","url","placeholder","https://server/DefaultCollection",3,"input","value"],["for","pr-branch-name-template",1,"text-setting"],["id","pr-branch-name-template","type","text","maxlength","200",3,"input","value"],["type","button",1,"btn",3,"click","disabled"],["type","button",1,"btn","primary",3,"click","disabled"],["role","row",1,"remote-row"],[1,"remote-name"],[1,"remote-url"],[1,"row-actions"],["type","button","title","Edit remote",3,"click"],["type","button","title","Remove remote",1,"danger-link",3,"click"],["role","row",1,"remote-row","push-row"],["type","button",1,"danger-link",3,"click"],["for","ai-review-scope",1,"text-setting"],["id","ai-review-scope",3,"change","value"],["value","reviewer"],["value","mine"],["value","all"],["for","ai-review-poll",1,"text-setting"],["id","ai-review-poll","type","number","min","1","max","240",3,"input","value"],["for","ai-review-path",1,"text-setting"],["id","ai-review-path","type","text","placeholder","claude",3,"input","value"],["for","ai-review-model",1,"text-setting"],["id","ai-review-model",3,"change","value"],[3,"value"],["for","ai-review-message-model",1,"text-setting"],["id","ai-review-message-model",3,"change","value"],["for","ai-review-instructions",1,"text-setting"],["id","ai-review-instructions","rows","3",3,"input","value"],[1,"editor-body"],[1,"text-setting"],["aria-label","User name",3,"input","value"],["aria-label","User email","type","email",3,"input","value"],["aria-label","Remote name","placeholder","origin",3,"input","value"],["aria-label","Fetch URL",3,"input","value"],["aria-label","Push URL",3,"input","value"],["aria-label","Issue regex",3,"input","value"],["aria-label","Issue URL","type","url",3,"input","value"]],template:function(e,i){e&1&&(b(0,"div",0),F("click",function(){return!i.saving()&&!i.busy()&&i.closed.emit()}),y(),b(1,"section",1)(2,"header",2)(3,"div")(4,"h2",3),f(5),y(),E(6,P2,2,0,"p"),y(),b(7,"button",4),F("click",function(){return i.closed.emit()}),f(8,"\xD7"),y()(),E(9,O2,2,1,"div",5),E(10,j2,181,25)(11,U2,9,4),y()),e&2&&(c(5),P(i.mode()==="main"?"Settings":i.mode()==="identity"?"Edit User Details":i.mode()==="remote"?i.originalRemoteName()?"Edit Remote":"Add Remote":"Issue Linking"),c(),D(i.mode()==="main"?6:-1),c(),G("disabled",i.saving()||i.busy()),c(2),D(i.error()?9:-1),c(),D(i.mode()==="main"?10:11))},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:400;background:#00000094}.dialog[_ngcontent-%COMP%]{position:fixed;z-index:401;top:50%;left:50%;transform:translate(-50%,-50%);width:min(760px,calc(100vw - 32px));max-height:min(820px,calc(100vh - 32px));display:flex;flex-direction:column;overflow:hidden;color:var(--text);background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;box-shadow:0 14px 42px #000000a6}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 22px 16px;border-bottom:1px solid var(--border)}h2[_ngcontent-%COMP%]{margin:0;color:var(--text-bright);font-size:18px}p[_ngcontent-%COMP%]{margin:5px 0 0;color:var(--text-dim);font-size:12px}.close-btn[_ngcontent-%COMP%]{width:28px;height:28px;border:0;border-radius:4px;color:var(--text);background:transparent;font:22px/1 inherit;cursor:pointer}.close-btn[_ngcontent-%COMP%]:hover{color:var(--text-bright);background:var(--bg-hover)}.settings-body[_ngcontent-%COMP%], .editor-body[_ngcontent-%COMP%]{min-height:0;padding:18px 22px;overflow-y:auto}.editor-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px}.dialog-error[_ngcontent-%COMP%]{margin:12px 22px 0;padding:8px 10px;color:#f48771;background:#f487711a;border:1px solid rgba(244,135,113,.35);border-radius:4px;font-size:12px}fieldset[_ngcontent-%COMP%]{margin:0 0 20px;padding:0;border:0}fieldset[_ngcontent-%COMP%]:last-child{margin-bottom:0}legend[_ngcontent-%COMP%]{width:100%;margin-bottom:6px;padding-bottom:7px;color:var(--text-bright);border-bottom:1px solid var(--border);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.setting-row[_ngcontent-%COMP%], .choice[_ngcontent-%COMP%], .text-setting[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;padding:10px 4px}.setting-row[_ngcontent-%COMP%]{justify-content:space-between;cursor:pointer}.setting-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .choice[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .text-setting[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;min-width:0;flex-direction:column;gap:3px}strong[_ngcontent-%COMP%]{color:var(--text-bright);font-size:13px;font-weight:600}small[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px;line-height:1.4}input[type=checkbox][_ngcontent-%COMP%], input[type=radio][_ngcontent-%COMP%]{accent-color:var(--accent);flex:none}select[_ngcontent-%COMP%]{min-width:150px;padding:6px 28px 6px 9px;color:var(--text);background:var(--bg);border:1px solid var(--border);border-radius:4px;font:inherit;outline:none}select[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.choice[_ngcontent-%COMP%]{align-items:flex-start;cursor:pointer}.choice[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{margin-top:3px}.detail-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:110px minmax(0,1fr);gap:7px 12px;padding:10px 4px;font-size:12px}.detail-grid[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{color:var(--text-dim)}.detail-grid[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .detail-grid[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{overflow:hidden;color:var(--text);text-overflow:ellipsis;white-space:nowrap}.inline-actions[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:14px;padding:5px 0}.inline-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:4px 7px;color:var(--text);background:transparent;border:0;border-radius:3px;font:inherit;cursor:pointer}.inline-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{color:var(--text-bright);background:var(--bg-hover)}.danger-link[_ngcontent-%COMP%]{color:#f48771!important}.remote-table[_ngcontent-%COMP%]{min-width:0;padding:8px 4px 2px;font-size:12px}.remote-head[_ngcontent-%COMP%], .remote-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:90px minmax(150px,1fr) 55px 120px;align-items:center;gap:8px;min-height:30px;border-bottom:1px solid var(--border)}.remote-head[_ngcontent-%COMP%], .remote-name[_ngcontent-%COMP%]{color:var(--text-bright)}.remote-url[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.push-row[_ngcontent-%COMP%]{color:var(--text-dim)}.row-actions[_ngcontent-%COMP%]{display:flex}.section-help[_ngcontent-%COMP%]{margin:8px 4px;line-height:1.5}.empty[_ngcontent-%COMP%]{margin:10px 0;color:var(--text-dim);text-align:center}.text-setting[_ngcontent-%COMP%]{align-items:stretch;flex-direction:column;gap:8px}.text-setting[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{box-sizing:border-box;width:100%;padding:8px 10px;color:var(--text);background:var(--bg);border:1px solid var(--border);border-radius:4px;font:inherit;outline:none}.text-setting[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;padding:14px 22px;border-top:1px solid var(--border)}.btn[_ngcontent-%COMP%]{padding:7px 14px;color:var(--text);background:transparent;border:1px solid var(--border);border-radius:4px;font:inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--text-bright);background:var(--bg-hover)}.btn.primary[_ngcontent-%COMP%]{color:#fff;background:var(--accent);border-color:var(--accent)}.btn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:default}@media(max-width:520px){.dialog[_ngcontent-%COMP%]{width:calc(100vw - 16px);max-height:calc(100vh - 16px)}.dialog-header[_ngcontent-%COMP%], .settings-body[_ngcontent-%COMP%], footer[_ngcontent-%COMP%]{padding-left:14px;padding-right:14px}}"],changeDetection:0})};var G2=["inputEl"],W2=["searchEl"],q2=(n,t)=>t.value;function Z2(n,t){if(n&1&&(b(0,"p",5),f(1),y()),n&2){let e=d();c(),P(e.label)}}function Y2(n,t){if(n&1){let e=I();b(0,"input",13,0),F("input",function(r){g(e);let o=d(3);return _(o.onSearch(r))})("keydown.enter",function(r){g(e);let o=d(3);return _(o.onSearchEnter(r))}),y()}if(n&2){let e=d(3);G("value",e.search())}}function Q2(n,t){if(n&1&&(b(0,"span",18),f(1),y()),n&2){let e=d().$implicit;c(),P(e.description)}}function K2(n,t){if(n&1){let e=I();b(0,"button",14),F("click",function(){let r=g(e).$implicit,o=d(3);return _(o.choose(r))})("dblclick",function(){g(e);let r=d(3);return _(r.confirm())}),ee(1,"span",15),b(2,"span",16)(3,"span",17),f(4),y(),E(5,Q2,2,1,"span",18),y()()}if(n&2){let e=t.$implicit,i=d(3);te("selected",i.choice()===e.value)("danger",e.danger),K("aria-checked",i.choice()===e.value),c(4),P(e.label),c(),D(e.description?5:-1)}}function X2(n,t){n&1&&(b(0,"p",12),f(1,"No matching branches"),y())}function J2(n,t){if(n&1&&(E(0,Y2,2,1,"input",9),b(1,"div",10),Z(2,K2,6,7,"button",11,q2,!1,X2,2,0,"p",12),y()),n&2){let e=d(),i=d();D(e.searchable?0:-1),c(2),Y(i.filteredOptions())}}function eR(n,t){if(n&1){let e=I();b(0,"label",19),f(1),y(),b(2,"input",20,1),F("input",function(r){g(e);let o=d(2);return _(o.onInput(r))})("keydown.enter",function(){g(e);let r=d(2);return _(r.confirm())}),y()}if(n&2){let e=d(),i=d();c(),P(e.label||e.title),c(),G("value",i.value()),K("placeholder",e.placeholder||" ")("aria-label",e.label||e.title)}}function tR(n,t){if(n&1){let e=I();b(0,"div",2),F("click",function(){g(e);let r=d();return _(r.cancelled.emit())}),y(),b(1,"div",3)(2,"h3",4),f(3),y(),E(4,Z2,2,1,"p",5),E(5,J2,5,2)(6,eR,4,4),b(7,"div",6)(8,"button",7),F("click",function(){g(e);let r=d();return _(r.cancelled.emit())}),f(9,"Cancel"),y(),b(10,"button",8),F("click",function(){g(e);let r=d();return _(r.confirm())}),f(11),y()()()}if(n&2){let e=t,i=d();c(3),P(e.title),c(),D(e.label?4:-1),c(),D(i.options().length>0?5:e.confirmOnly?-1:6),c(5),te("btn-danger",e.danger),G("disabled",i.options().length===0&&!e.confirmOnly&&!e.allowEmpty&&!i.value().trim()||e.searchable&&i.filteredOptions().length===0),c(),$(" ",e.okLabel||"OK"," ")}}var Fo=class n{state=N.required();confirmed=W();cancelled=W();value=v("");choice=v("");options=R(()=>this.state()?.options??[]);search=v("");filteredOptions=R(()=>{let t=this.search().trim().toLowerCase(),e=this.options();return t?e.filter(i=>i.label.toLowerCase().includes(t)||i.value.toLowerCase().includes(t)):e});inputEl=dt("inputEl");searchEl=dt("searchEl");constructor(){ge(()=>{let t=this.state();t&&(this.value.set(t.value??""),this.choice.set(t.options?.[0]?.value??""),this.search.set(""));let e=this.inputEl()??this.searchEl();t&&e&&(e.nativeElement.focus(),e.nativeElement.select())})}onEscape(){this.state()&&this.cancelled.emit()}onInput(t){this.value.set(t.target.value)}choose(t){this.choice.set(t.value)}onSearch(t){this.search.set(t.target.value);let e=this.filteredOptions();e.length&&!e.some(i=>i.value===this.choice())&&this.choice.set(e[0].value)}onSearchEnter(t){t.preventDefault(),this.filteredOptions().length>0&&this.confirm()}confirm(){let t=this.state();if(t){if(t.options?.length){this.confirmed.emit(this.choice());return}!t.confirmOnly&&!t.allowEmpty&&!this.value().trim()||this.confirmed.emit(t.confirmOnly?"":this.value().trim())}}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-prompt-dialog"]],viewQuery:function(e,i){e&1&&(st(i.inputEl,G2,5),st(i.searchEl,W2,5)),e&2&&Ot(2)},hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},inputs:{state:[1,"state"]},outputs:{confirmed:"confirmed",cancelled:"cancelled"},decls:1,vars:1,consts:[["searchEl",""],["inputEl",""],[1,"backdrop",3,"click"],["role","dialog","aria-modal","true",1,"dialog"],[1,"title"],[1,"label"],[1,"actions"],["type","button",1,"btn",3,"click"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["type","text","placeholder","Search\u2026","aria-label","Search options",1,"input",3,"value"],["role","radiogroup",1,"options"],["type","button","role","radio",1,"option",3,"selected","danger"],[1,"no-results"],["type","text","placeholder","Search\u2026","aria-label","Search options",1,"input",3,"input","keydown.enter","value"],["type","button","role","radio",1,"option",3,"click","dblclick"],["aria-hidden","true",1,"option-radio"],[1,"option-text"],[1,"option-label"],[1,"option-description"],["for","prompt-input",1,"sr-only"],["id","prompt-input","type","text","placeholder"," ","title","Enter a value",1,"input",3,"input","keydown.enter","value"]],template:function(e,i){if(e&1&&E(0,tR,12,7),e&2){let r;D((r=i.state())?0:-1,r)}},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000080;z-index:400}.dialog[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(420px,calc(100vw - 48px));padding:18px;display:flex;flex-direction:column;gap:12px;background:var(--bg-alt);border:1px solid var(--border);border-radius:8px;box-shadow:0 10px 36px #0009;z-index:401}.title[_ngcontent-%COMP%]{margin:0;font-size:14px;font-weight:600;color:var(--text-bright)}.label[_ngcontent-%COMP%]{margin:0;font-size:12px;color:var(--text-dim)}.input[_ngcontent-%COMP%]{padding:7px 10px;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font-size:13px;font-family:inherit;outline:none}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px}.btn[_ngcontent-%COMP%]{padding:6px 14px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font-size:12px;font-family:inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn-primary[_ngcontent-%COMP%]{background:var(--accent);border-color:var(--accent);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#2b7cd3}.btn-danger[_ngcontent-%COMP%]{background:#a1260d;border-color:#a1260d;color:#fff}.options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;max-height:40vh;overflow-y:auto}.no-results[_ngcontent-%COMP%]{margin:0;padding:8px 10px;font-size:12px;color:var(--text-dim)}.option[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font-family:inherit;text-align:left;cursor:pointer}.option[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.option.selected[_ngcontent-%COMP%]{border-color:var(--accent);background:#3794ff1f}.option-radio[_ngcontent-%COMP%]{width:13px;height:13px;margin-top:2px;border:1px solid var(--border);border-radius:50%;flex:none}.option.selected[_ngcontent-%COMP%] .option-radio[_ngcontent-%COMP%]{border-color:var(--accent);background:radial-gradient(circle,var(--accent) 0 40%,transparent 45%)}.option-text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.option-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:var(--text-bright)}.option.danger[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{color:#f48771}.option-description[_ngcontent-%COMP%]{font-size:11px;color:var(--text-dim)}.btn-danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#c42b1c}.btn[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}"],changeDetection:0})};var nR=["host"],iR=["composerInput"],Ly=(n,t)=>t.id;function rR(n,t){n&1&&(u(0,"div",3),f(1,"Loading diff..."),p())}function oR(n,t){if(n&1&&(u(0,"div",4),f(1),p()),n&2){let e=d();c(),P(e.error())}}function sR(n,t){if(n&1&&(u(0,"div",4),f(1),p()),n&2){let e=d();c(),P(e.editorError())}}function aR(n,t){n&1&&(u(0,"div",5),f(1,"Binary file not shown."),p())}function lR(n,t){n&1&&(u(0,"div",7),f(1,"Loading diff..."),p())}function cR(n,t){if(n&1){let e=I();u(0,"button",13),C("click",function(){g(e);let r=d(4);return _(r.openComposer())}),f(1," Add comment "),p()}}function dR(n,t){if(n&1&&(u(0,"div",20),j(1,"app-author-avatar",28),u(2,"div",29)(3,"div",30)(4,"span",31),f(5),p(),f(6),p(),j(7,"app-markdown-text",32),p()()),n&2){let e=t.$implicit,i=d(6);c(),S("name",e.author.name)("email",e.author.email||""),c(4),P(e.author.name),c(),$(" ",i.formatDate(e.createdAt)," "),c(),S("markdown",e.content)}}function uR(n,t){if(n&1&&(u(0,"option",27),f(1),p()),n&2){let e=t.$implicit,i=d(2).$implicit,r=d(4);S("value",e)("selected",e===i.status),c(),$(" ",r.statusLabel(e)," ")}}function pR(n,t){if(n&1){let e=I();u(0,"div",19),Z(1,dR,8,5,"div",20,Ly),u(3,"div",21)(4,"input",22),C("input",function(r){g(e);let o=d().$implicit,s=d(4);return _(s.setReplyDraft(o.id,r))})("keydown.enter",function(){g(e);let r=d().$implicit,o=d(4);return _(o.sendReply(r.id))}),p(),u(5,"button",23),C("click",function(){g(e);let r=d().$implicit,o=d(4);return _(o.sendReply(r.id))}),f(6," Reply "),p()(),u(7,"div",24)(8,"label",25),f(9," Status "),u(10,"select",26),C("change",function(r){g(e);let o=d().$implicit,s=d(4);return _(s.onStatusChange(o,r))}),Z(11,uR,2,3,"option",27,Bt),p()()()()}if(n&2){let e=d().$implicit,i=d(4);c(),Y(e.comments),c(3),S("value",i.replyDraft(e.id))("disabled",i.posting()),c(),S("disabled",i.posting()||!i.replyDraft(e.id).trim()),c(5),S("value",e.status)("disabled",i.posting()),c(),Y(i.threadStatuses)}}function fR(n,t){if(n&1){let e=I();u(0,"div",14)(1,"button",15),C("click",function(){let r=g(e).$implicit,o=d(4);return _(o.toggleThread(r.id))}),u(2,"span",16),f(3),p(),u(4,"span",17),f(5),p(),u(6,"span",18),f(7),p()(),E(8,pR,13,5,"div",19),p()}if(n&2){let e=t.$implicit,i=d(4);te("expanded",i.isExpanded(e.id)),S("id","pr-thread-"+e.id),c(2),Xe("status-"+e.status),c(),$(" ",i.statusLabel(e.status)," "),c(2),$(" ",i.threadPreview(e)," "),c(2),P(e.comments.length),c(),D(i.isExpanded(e.id)?8:-1)}}function hR(n,t){if(n&1){let e=I();u(0,"div",12)(1,"header",33)(2,"span",34),f(3,"New comment"),p(),u(4,"span",35),f(5,"Markdown supported"),p()(),u(6,"div",36)(7,"textarea",37,1),C("input",function(r){g(e);let o=d(4);return _(o.composerText.set(r.target.value))})("keydown",function(r){g(e);let o=d(4);return _(o.onComposerKeydown(r))}),p(),u(9,"div",38)(10,"span",39)(11,"kbd"),f(12,"Ctrl"),p(),f(13,"+"),u(14,"kbd"),f(15,"Enter"),p(),f(16," to comment "),p(),u(17,"span",40)(18,"button",41),C("click",function(){g(e);let r=d(4);return _(r.closeComposer())}),f(19,"Cancel"),p(),u(20,"button",42),C("click",function(){g(e);let r=d(4);return _(r.submitComposer())}),f(21," Comment "),p()()()()()}if(n&2){let e=d(4);c(7),S("value",e.composerText()),c(13),S("disabled",e.posting()||!e.composerText().trim())}}function mR(n,t){if(n&1&&(u(0,"section",8)(1,"header",9)(2,"strong"),f(3),p(),E(4,cR,2,0,"button",10),p(),Z(5,fR,9,9,"div",11,Ly),E(7,hR,22,2,"div",12),p()),n&2){let e=d(3);c(3),P(e.selectionLabel()),c(),D(e.composerOpen()?-1:4),c(),Y(e.selectedThreads()),c(2),D(e.composerOpen()?7:-1)}}function gR(n,t){if(n&1&&(j(0,"div",6,0),E(2,lR,2,0,"div",7),E(3,mR,8,3,"section",8)),n&2){let e=d(2);c(2),D(e.editorLoading()?2:-1),c(),D(e.selection()?3:-1)}}function _R(n,t){if(n&1&&E(0,aR,2,0,"div",5)(1,gR,4,2),n&2){let e=t;D(e.status==="binary"||e.binary?0:1)}}function vR(n,t){n&1&&(u(0,"div",5),f(1,"Select a file to view its changes."),p())}var bR=0,Ay={active:"Active",fixed:"Resolved",wontFix:"Won't fix",closed:"Closed",byDesign:"By design",pending:"Pending"},Sd=class n{monacoService=O(ko);host=dt("host");composerInput=dt("composerInput");diff=N(null);threads=N([]);loading=N(!1);error=N("");posting=N(!1);focus=N(null);commentSubmit=W();replySubmit=W();statusSubmit=W();threadStatuses=Object.keys(Ay);editorLoading=v(!1);editorError=v("");selection=v(null);composerOpen=v(!1);composerText=v("");expanded=v({});replyDrafts=v({});viewReady=!1;destroyed=!1;renderVersion=0;editor=null;models=[];disposables=[];decorations=[];threadsByAnchor=R(()=>{let t=new Map;for(let e of this.threads()){if(!e.filePath||e.line===null||!e.side)continue;let i=`${e.side}:${e.line}`;t.set(i,[...t.get(i)??[],e])}return t});selectedThreads=R(()=>{let t=this.selection();if(!t)return[];let e=[];for(let i=t.line;i<=t.endLine;i+=1)e.push(...this.threadsByAnchor().get(`${t.side}:${i}`)??[]);return e});constructor(){ge(()=>{let t=this.diff();this.viewReady&&queueMicrotask(()=>{this.renderDiff(t)})}),ge(()=>{this.threads(),this.viewReady&&this.updateThreadDecorations()}),ge(()=>{let t=this.focus();if(!t)return;let e=this.threadsByAnchor().get(`${t.side}:${t.line}`)??[],i={};for(let r of e)i[r.id]=!0;Object.keys(i).length&&this.expanded.update(r=>H(H({},r),i)),this.selection.set(re(H({},t),{endLine:t.line})),queueMicrotask(()=>this.revealSelection(t))})}ngAfterViewInit(){this.viewReady=!0,queueMicrotask(()=>{this.renderDiff(this.diff())})}ngOnDestroy(){this.destroyed=!0,this.disposeEditor()}openComposer(){this.selection()&&(this.composerOpen.set(!0),this.composerText.set(""),setTimeout(()=>this.composerInput()?.nativeElement.focus()))}onComposerKeydown(t){t.key==="Enter"&&(t.ctrlKey||t.metaKey)?(t.preventDefault(),this.submitComposer()):t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.closeComposer())}submitComposer(){let t=this.selection(),e=this.composerText().trim();!t||!e||(this.commentSubmit.emit(re(H({filePath:this.diff()?.path??""},t),{content:e})),this.closeComposer())}closeComposer(){this.composerOpen.set(!1),this.composerText.set("")}selectionLabel(){let t=this.selection();if(!t)return"";let e=t.side==="left"?"original":"modified";return t.line===t.endLine?`${e} line ${t.line}`:`${e} lines ${t.line}-${t.endLine}`}isExpanded(t){return this.expanded()[t]===!0}toggleThread(t){this.expanded.update(e=>re(H({},e),{[t]:!e[t]}))}replyDraft(t){return this.replyDrafts()[t]??""}setReplyDraft(t,e){let i=e.target.value;this.replyDrafts.update(r=>re(H({},r),{[t]:i}))}sendReply(t){let e=this.replyDraft(t).trim();e&&this.replySubmit.emit({threadId:t,content:e})}onStatusChange(t,e){let i=e.target.value;i&&i!==t.status&&this.statusSubmit.emit({threadId:t.id,status:i})}statusLabel(t){return Ay[t]??t}threadPreview(t){let e=t.comments[0];return e?`${e.author.name}: ${e.content}`:"Review comment"}formatDate(t){if(!t)return"";let e=new Date(t);return Number.isNaN(e.getTime())?"":e.toLocaleString()}renderDiff(t){return Mn(this,null,function*(){let e=++this.renderVersion;if(this.disposeEditor(),this.selection.set(null),this.composerOpen.set(!1),this.editorError.set(""),!(!t||t.binary||t.status==="binary")){this.editorLoading.set(!0);try{let i=yield this.monacoService.load();if(this.destroyed||e!==this.renderVersion)return;let r=this.host();if(!r)return;let o=++bR,s=(t.oldPath||t.path).replace(/^\/+/,""),a=t.path.replace(/^\/+/,""),l=i.editor.createModel(t.originalContent??this.contentFromLines(t,"left"),void 0,i.Uri.parse(`inmemory://pr-diff/${o}/original/${s}`)),h=i.editor.createModel(t.modifiedContent??this.contentFromLines(t,"right"),void 0,i.Uri.parse(`inmemory://pr-diff/${o}/modified/${a}`));this.models=[l,h],this.editor=i.editor.createDiffEditor(r.nativeElement,{theme:"guito",readOnly:!0,originalEditable:!1,renderSideBySide:!0,ignoreTrimWhitespace:!1,automaticLayout:!0,fontSize:12,fontFamily:"ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace",minimap:{enabled:!1},glyphMargin:!0,scrollBeyondLastLine:!1,renderOverviewRuler:!1,hideUnchangedRegions:{enabled:!0,contextLineCount:3},scrollbar:{verticalScrollbarSize:10,horizontalScrollbarSize:10},padding:{top:8}}),this.editor.setModel({original:l,modified:h}),this.watchSelection(this.editor.getOriginalEditor(),"left"),this.watchSelection(this.editor.getModifiedEditor(),"right"),this.updateThreadDecorations();let m=this.focus();m&&(this.selection.set(re(H({},m),{endLine:m.line})),this.revealSelection(m))}catch{e===this.renderVersion&&this.editorError.set("Failed to load the diff viewer.")}finally{e===this.renderVersion&&this.editorLoading.set(!1)}}})}watchSelection(t,e){this.disposables.push(t.onDidChangeCursorSelection(i=>{let r=i.selection;this.selection.set({line:Math.min(r.startLineNumber,r.endLineNumber),endLine:Math.max(r.startLineNumber,r.endLineNumber),side:e}),this.composerOpen.set(!1)}))}updateThreadDecorations(){if(!this.editor)return;for(let e of this.decorations)e.clear();let t=e=>this.threads().filter(i=>i.side===e&&i.line!==null).map(i=>({range:{startLineNumber:i.line,startColumn:1,endLineNumber:i.line,endColumn:1},options:{isWholeLine:!0,glyphMarginClassName:"pr-thread-glyph",glyphMarginHoverMessage:{value:"Review comment"}}}));this.decorations=[this.editor.getOriginalEditor().createDecorationsCollection(t("left")),this.editor.getModifiedEditor().createDecorationsCollection(t("right"))]}revealSelection(t){if(!this.editor)return;let e=t.side==="left"?this.editor.getOriginalEditor():this.editor.getModifiedEditor();e.setPosition({lineNumber:t.line,column:1}),e.revealLineInCenter(t.line),e.focus()}contentFromLines(t,e){return t.lines.filter(i=>i.type==="context"||(e==="left"?i.type==="del":i.type==="add")).map(i=>i.text).join(`
|
|
64
|
-
`)}disposeEditor(){for(let t of this.disposables)t.dispose();this.disposables=[];for(let t of this.decorations)t.clear();this.decorations=[],this.editor?.dispose(),this.editor=null;for(let t of this.models)t.dispose();this.models=[]}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-pr-file-diff"]],viewQuery:function(e,i){e&1&&(st(i.host,nR,5),st(i.composerInput,iR,5)),e&2&&Ot(2)},inputs:{diff:[1,"diff"],threads:[1,"threads"],loading:[1,"loading"],error:[1,"error"],posting:[1,"posting"],focus:[1,"focus"]},outputs:{commentSubmit:"commentSubmit",replySubmit:"replySubmit",statusSubmit:"statusSubmit"},decls:6,vars:1,consts:[["host",""],["composerInput",""],[1,"file-diff"],["role","status",1,"diff-status"],["role","alert",1,"diff-status","error"],[1,"diff-status"],[1,"editor-host"],["role","status",1,"editor-loading"],["aria-label","Line review",1,"review-panel"],[1,"selection-head"],["type","button",1,"btn","small","primary"],[1,"thread",3,"id","expanded"],[1,"composer"],["type","button",1,"btn","small","primary",3,"click"],[1,"thread",3,"id"],["type","button",1,"thread-head",3,"click"],[1,"thread-status"],[1,"thread-preview"],[1,"thread-count"],[1,"thread-body"],[1,"comment"],[1,"reply-row"],["type","text","placeholder","Reply...",1,"reply-input",3,"input","keydown.enter","value","disabled"],["type","button",1,"btn","small",3,"click","disabled"],[1,"thread-actions"],[1,"status-label"],[3,"change","value","disabled"],[3,"value","selected"],[3,"name","email"],[1,"comment-main"],[1,"comment-meta"],[1,"comment-author"],[3,"markdown"],[1,"composer-head"],[1,"composer-title"],[1,"composer-target"],[1,"composer-body"],["rows","3","placeholder","Leave a comment...",1,"composer-text",3,"input","keydown","value"],[1,"composer-actions"],[1,"composer-hint"],[1,"composer-buttons"],["type","button",1,"btn","small",3,"click"],["type","button",1,"btn","small","primary",3,"click","disabled"]],template:function(e,i){if(e&1&&(u(0,"div",2),E(1,rR,2,0,"div",3)(2,oR,2,1,"div",4)(3,sR,2,1,"div",4)(4,_R,2,1)(5,vR,2,0,"div",5),p()),e&2){let r;c(),D(i.loading()&&!i.diff()?1:i.error()?2:i.editorError()?3:(r=i.diff())?4:5,r)}},dependencies:[Fn,Ii],styles:["[_nghost-%COMP%]{display:block;min-width:0;min-height:0}.file-diff[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;background:var(--bg-alt)}.editor-host[_ngcontent-%COMP%]{flex:1;min-height:220px}.editor-loading[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:var(--bg-alt);color:var(--text-dim);font-size:13px}.diff-status[_ngcontent-%COMP%]{padding:16px;color:var(--text-dim);font-size:13px}.diff-status.error[_ngcontent-%COMP%]{color:var(--red)}.review-panel[_ngcontent-%COMP%]{flex:none;max-height:42%;overflow:auto;padding:8px 10px;border-top:1px solid var(--border);background:var(--bg)}.selection-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:28px;color:var(--text-dim);font-size:11px}.thread[_ngcontent-%COMP%], .composer[_ngcontent-%COMP%]{margin-top:6px;border:1px solid var(--border);border-radius:4px;background:var(--bg-alt);overflow:hidden}.thread-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;padding:5px 8px;border:none;background:transparent;color:var(--text);font-size:12px;text-align:left;cursor:pointer}.thread-head[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.thread-status[_ngcontent-%COMP%]{flex:none;border-radius:3px;padding:1px 5px;font-size:10px;font-weight:600;text-transform:uppercase}.thread-status.status-active[_ngcontent-%COMP%]{background:#3794ff2e;color:var(--accent)}.thread-status.status-fixed[_ngcontent-%COMP%]{background:#89d1852e;color:#89d185}.thread-status.status-wontFix[_ngcontent-%COMP%], .thread-status.status-closed[_ngcontent-%COMP%], .thread-status.status-byDesign[_ngcontent-%COMP%], .thread-status.status-pending[_ngcontent-%COMP%]{background:#dcb67a2e;color:#dcb67a}.thread-preview[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;color:var(--text-dim);text-overflow:ellipsis;white-space:nowrap}.thread-count[_ngcontent-%COMP%]{flex:none;color:var(--text-dim);font-size:11px}.thread-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;padding:8px;border-top:1px solid var(--border)}.comment[_ngcontent-%COMP%]{display:flex;gap:8px}.comment-main[_ngcontent-%COMP%]{flex:1;min-width:0}.comment-meta[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.comment-author[_ngcontent-%COMP%]{color:var(--text-bright);font-weight:600}.reply-row[_ngcontent-%COMP%]{display:flex;gap:6px}.reply-input[_ngcontent-%COMP%]{flex:1;min-width:0;height:26px;padding:0 8px;border:1px solid var(--border);border-radius:3px;background:var(--bg);color:var(--text)}.reply-input[_ngcontent-%COMP%]:focus, .composer-text[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 2px #3794ff40}.thread-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:6px}.status-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;color:var(--text-dim);font-size:11px}.status-label[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{height:24px;border:1px solid var(--border);border-radius:3px;background:var(--bg);color:var(--text)}.composer[_ngcontent-%COMP%]{border-color:#3794ffa6;box-shadow:0 2px 10px #00000059}.composer-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border-bottom:1px solid var(--border);background:var(--bg)}.composer-title[_ngcontent-%COMP%]{color:var(--text-bright);font-size:12px;font-weight:600}.composer-target[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.composer-body[_ngcontent-%COMP%]{padding:8px 10px 10px}.composer-text[_ngcontent-%COMP%]{display:block;width:100%;min-height:66px;padding:7px 9px;box-sizing:border-box;border:1px solid var(--border);border-radius:4px;background:var(--bg);color:var(--text);font:inherit;line-height:1.5;resize:vertical;transition:border-color .12s ease,box-shadow .12s ease}.composer-text[_ngcontent-%COMP%]::placeholder{color:var(--text-dim)}.composer-actions[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px}.composer-hint[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.composer-hint[_ngcontent-%COMP%] kbd[_ngcontent-%COMP%]{padding:1px 4px;border:1px solid var(--border);border-radius:3px;background:var(--bg);font-family:var(--mono);font-size:10px}.composer-buttons[_ngcontent-%COMP%]{display:flex;gap:6px}.btn[_ngcontent-%COMP%]{height:26px;padding:0 11px;border:1px solid var(--border);border-radius:4px;background:var(--bg-alt);color:var(--text);font:inherit;font-size:12px;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn[_ngcontent-%COMP%]:disabled{opacity:.55;cursor:default}.btn.primary[_ngcontent-%COMP%]:disabled{border-color:var(--border);background:var(--bg-alt);color:var(--text-dim);opacity:1}.btn.primary[_ngcontent-%COMP%]{border-color:#2580d8;background:#0e639c;color:#fff}.btn.primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#17b}.btn.small[_ngcontent-%COMP%]{height:24px;padding:0 10px;font-size:12px}[_nghost-%COMP%] .pr-thread-glyph{background:var(--accent);border:3px solid var(--bg-alt);border-radius:50%}"],changeDetection:0})};var vm=()=>[],Td=n=>({$implicit:n}),bm=(n,t)=>t.value,Xn=(n,t)=>t.id,xR=(n,t)=>t.path;function yR(n,t){n&1&&(u(0,"div",5),f(1,"Loading pull request..."),p())}function CR(n,t){n&1&&(u(0,"span",12),f(1,"Draft"),p())}function wR(n,t){if(n&1){let e=I();u(0,"button",28),C("click",function(){g(e);let r=d(2);return _(r.publishPr())}),f(1," Publish "),p(),u(2,"button",29),C("click",function(){g(e);let r=d(2);return _(r.openAbandonConfirm())}),f(3," Abandon "),p()}if(n&2){let e=d(2);S("disabled",e.busy()),c(2),S("disabled",e.busy())}}function ER(n,t){if(n&1){let e=I();u(0,"button",34),C("click",function(){let r=g(e).$implicit,o=d(4);return _(o.vote(r.value))}),j(1,"span"),f(2),p()}if(n&2){let e=t.$implicit,i=d(3),r=d();te("current",r.voteMeta(i.myVote).cls==="vote-"+e.icon),c(),Xe("vote-dot vote-"+e.icon),c(),$("",e.label," ")}}function DR(n,t){if(n&1&&(u(0,"div",31),Z(1,ER,3,5,"button",33,bm),p()),n&2){let e=d(3);c(),Y(e.voteOptions)}}function SR(n,t){if(n&1){let e=I();u(0,"button",29),C("click",function(){g(e);let r=d(3);return _(r.cancelAutoComplete())}),f(1," Cancel auto-complete "),p()}if(n&2){let e=d(3);S("disabled",e.busy())}}function MR(n,t){if(n&1){let e=I();u(0,"button",29),C("click",function(){g(e);let r=d(3);return _(r.openAutoComplete())}),f(1," Set auto-complete "),p()}if(n&2){let e=d(3);S("disabled",e.busy())}}function TR(n,t){if(n&1){let e=I();u(0,"div",30)(1,"button",29),C("click",function(){g(e);let r=d(2);return _(r.reviewMenuOpen.set(!r.reviewMenuOpen()))}),f(2," Review \u25BE "),p(),E(3,DR,3,0,"div",31),p(),E(4,SR,2,1,"button",32)(5,MR,2,1,"button",32),u(6,"button",28),C("click",function(){g(e);let r=d(2);return _(r.openComplete())}),f(7," Complete "),p()}if(n&2){let e=d(),i=d();c(),S("disabled",i.busy()),c(2),D(i.reviewMenuOpen()?3:-1),c(),D(e.autoCompleteSetBy?4:5),c(2),S("disabled",i.busy())}}function kR(n,t){if(n&1&&(u(0,"span",21),f(1),p()),n&2){let e=d(2);c(),P(e.pendingFindings().length)}}function IR(n,t){n&1&&(u(0,"span"),f(1,"..."),p())}function PR(n,t){if(n&1&&j(0,"app-error-banner",22),n&2){let e=d(2);S("message",e.error())}}function OR(n,t){if(n&1){let e=I();u(0,"div",36)(1,"div")(2,"strong"),f(3,"Merge conflicts"),p(),u(4,"p"),f(5," This pull request has conflicts with "),u(6,"code"),f(7),p(),f(8,". Resolve them before it can be completed. "),p()(),u(9,"button",57),C("click",function(){g(e);let r=d(3);return _(r.openInBrowser())}),f(10," Resolve in Azure DevOps "),p()()}if(n&2){let e=d(2);c(7),P(e.targetBranch)}}function RR(n,t){n&1&&(u(0,"div",37)(1,"div")(2,"strong"),f(3,"Blocked by policy"),p(),u(4,"p"),f(5," One or more merge policies reject this pull request. Check the checks below. "),p()()())}function NR(n,t){n&1&&(u(0,"div",37)(1,"div")(2,"strong"),f(3,"Merge failed"),p(),u(4,"p"),f(5," The last merge attempt failed. Check Azure DevOps for details. "),p()()())}function AR(n,t){n&1&&(u(0,"div",38)(1,"div")(2,"strong"),f(3,"Queued for merge"),p(),u(4,"p"),f(5,"The merge is in progress."),p()()())}function LR(n,t){n&1&&(u(0,"div",42),f(1,"Loading checks..."),p())}function FR(n,t){if(n&1){let e=I();u(0,"div",43)(1,"span"),f(2),p(),u(3,"button",41),C("click",function(){g(e);let r=d(3);return _(r.loadChecks())}),f(4," Retry "),p()()}if(n&2){let e=d(3);c(2),P(e.checksError()),c(),S("disabled",e.checksLoading())}}function VR(n,t){if(n&1&&(u(0,"div",58),f(1),p()),n&2){let e=t.$implicit;c(),P(e)}}function BR(n,t){if(n&1&&(u(0,"div",59),f(1),p()),n&2){let e=d(4);c(),P(e.requeueError())}}function jR(n,t){if(n&1&&Ct(0,62),n&2){let e=t.$implicit;d(5);let i=_t(49);S("ngTemplateOutlet",i)("ngTemplateOutletContext",Di(2,Td,e))}}function $R(n,t){if(n&1&&(u(0,"ul",60),Z(1,jR,1,4,"ng-container",62,Xn),p()),n&2){let e=d(5);c(),Y(e.requiredChecks())}}function HR(n,t){n&1&&j(0,"hr",61)}function zR(n,t){if(n&1&&Ct(0,62),n&2){let e=t.$implicit;d(5);let i=_t(49);S("ngTemplateOutlet",i)("ngTemplateOutletContext",Di(2,Td,e))}}function UR(n,t){if(n&1&&(u(0,"ul",60),Z(1,zR,1,4,"ng-container",62,Xn),p()),n&2){let e=d(5);c(),Y(e.optionalChecks())}}function GR(n,t){if(n&1&&(E(0,$R,3,0,"ul",60),E(1,HR,1,0,"hr",61),E(2,UR,3,0,"ul",60)),n&2){let e=d(4);D(e.requiredChecks().length?0:-1),c(),D(e.requiredChecks().length&&e.optionalChecks().length?1:-1),c(),D(e.optionalChecks().length?2:-1)}}function WR(n,t){n&1&&(u(0,"p",48),f(1,"No checks reported."),p())}function qR(n,t){if(n&1&&(Z(0,VR,2,1,"div",58,Bt),E(2,BR,2,1,"div",59),E(3,GR,3,3)(4,WR,2,0,"p",48)),n&2){let e=d(3);Y(e.checksWarnings()),c(2),D(e.requeueError()?2:-1),c(),D(e.checks().length?3:4)}}function ZR(n,t){if(n&1){let e=I();u(0,"button",57),C("click",function(){g(e);let r=d(3);return _(r.startEditing())}),f(1," Edit "),p()}}function YR(n,t){if(n&1){let e=I();u(0,"label"),f(1,"Title"),u(2,"input",63),C("input",function(r){g(e);let o=d(3);return _(o.editTitle.set(r.target.value))}),p()(),u(3,"label"),f(4,"Description"),u(5,"textarea",64),C("input",function(r){g(e);let o=d(3);return _(o.editDescription.set(r.target.value))}),p()(),u(6,"div",65)(7,"button",29),C("click",function(){g(e);let r=d(3);return _(r.editing.set(!1))}),f(8," Cancel "),p(),u(9,"button",28),C("click",function(){g(e);let r=d(3);return _(r.saveEdit())}),f(10," Save "),p()()}if(n&2){let e=d(3);c(2),S("value",e.editTitle()),c(3),S("value",e.editDescription()),c(2),S("disabled",e.busy()),c(2),S("disabled",e.busy()||!e.editTitle().trim())}}function QR(n,t){if(n&1&&j(0,"app-markdown-text",67),n&2){let e=d(3);S("markdown",e.description)}}function KR(n,t){n&1&&(u(0,"p",48),f(1,"No description provided."),p())}function XR(n,t){if(n&1&&(u(0,"h2",66),f(1),p(),E(2,QR,1,1,"app-markdown-text",67)(3,KR,2,0,"p",48)),n&2){let e=d(2);c(),P(e.title),c(),D(e.description?2:3)}}function JR(n,t){if(n&1&&Ct(0,62),n&2){let e=t.$implicit;d(3);let i=_t(51);S("ngTemplateOutlet",i)("ngTemplateOutletContext",Di(2,Td,e))}}function eN(n,t){if(n&1&&(u(0,"h3"),f(1,"Required"),p(),Z(2,JR,1,4,"ng-container",62,Xn)),n&2){let e=d(3);c(2),Y(e.requiredReviewers())}}function tN(n,t){if(n&1&&Ct(0,62),n&2){let e=t.$implicit;d(3);let i=_t(51);S("ngTemplateOutlet",i)("ngTemplateOutletContext",Di(2,Td,e))}}function nN(n,t){if(n&1&&(u(0,"h3"),f(1,"Optional"),p(),Z(2,tN,1,4,"ng-container",62,Xn)),n&2){let e=d(3);c(2),Y(e.otherReviewers())}}function iN(n,t){n&1&&(u(0,"p",48),f(1,"No reviewers."),p())}function rN(n,t){if(n&1){let e=I();u(0,"button",68),C("click",function(){g(e);let r=d(3);return _(r.toggleDraft())}),f(1," Convert to draft "),p()}if(n&2){let e=d(3);S("disabled",e.busy())}}function oN(n,t){if(n&1){let e=I();u(0,"span",69)(1,"span"),f(2),p(),u(3,"button",70),C("click",function(){let r=g(e).$implicit,o=d(4);return _(o.removeTag(r))}),f(4," \xD7 "),p()()}if(n&2){let e=t.$implicit,i=d(4);c(2),P(e),c(),S("disabled",i.busy()),K("aria-label","Remove tag "+e)}}function sN(n,t){if(n&1&&(u(0,"div",52),Z(1,oN,5,3,"span",69,Bt),p()),n&2){let e=d(2);c(),Y(e.labels)}}function aN(n,t){n&1&&(u(0,"p",48),f(1,"No tags."),p())}function lN(n,t){if(n&1){let e=I();u(0,"app-chip-input",71),C("queryChange",function(r){g(e);let o=d(3);return _(o.tagQuery.set(r))})("select",function(r){g(e);let o=d(3);return _(o.addTag(r))}),p()}if(n&2){let e=d(3);S("chips",qs(6,vm))("suggestions",e.tagSuggestions())("loading",e.tagsLoading())("query",e.tagQuery())("disabled",e.busy())("allowFreeText",!0)}}function cN(n,t){n&1&&(u(0,"div",42),f(1,"Loading work items..."),p())}function dN(n,t){if(n&1){let e=I();u(0,"div",43)(1,"span"),f(2),p(),u(3,"button",41),C("click",function(){g(e);let r=d(3);return _(r.loadWorkItems())}),f(4," Retry "),p()()}if(n&2){let e=d(3);c(2),P(e.workItemsError()),c(),S("disabled",e.workItemsLoading())}}function uN(n,t){if(n&1&&(u(0,"small"),f(1),p()),n&2){let e=d().$implicit;c(),P(e.state)}}function pN(n,t){if(n&1){let e=I();u(0,"li")(1,"button",72),C("click",function(){let r=g(e).$implicit,o=d(4);return _(o.openExternalLink(r.url))}),u(2,"span",73),f(3),p(),u(4,"span",74),f(5),p()(),E(6,uN,2,1,"small"),u(7,"button",75),C("click",function(){let r=g(e).$implicit,o=d(4);return _(o.unlinkWorkItem(r.id))}),f(8," \xD7 "),p()()}if(n&2){let e=t.$implicit,i=d(4);c(3),$("#",e.id),c(2),P(e.title),c(),D(e.state?6:-1),c(),S("disabled",i.busy()),K("aria-label","Unlink work item #"+e.id)}}function fN(n,t){if(n&1&&(u(0,"ul",55),Z(1,pN,9,5,"li",null,Xn),p()),n&2){let e=d(3);c(),Y(e.workItems())}}function hN(n,t){n&1&&(u(0,"p",48),f(1,"No related work items."),p())}function mN(n,t){if(n&1){let e=I();u(0,"app-chip-input",76),C("queryChange",function(r){g(e);let o=d(3);return _(o.workItemQuery.set(r))})("select",function(r){g(e);let o=d(3);return _(o.linkWorkItem(r))}),p()}if(n&2){let e=d(3);S("chips",qs(6,vm))("suggestions",e.workItemSuggestions())("loading",e.workItemsSearchLoading())("query",e.workItemQuery())("error",e.workItemsSearchError())("disabled",e.busy())}}function gN(n,t){if(n&1){let e=I();u(0,"div",24)(1,"main",35),E(2,OR,11,1,"div",36)(3,RR,6,0,"div",37)(4,NR,6,0,"div",37)(5,AR,6,0,"div",38),u(6,"section",39)(7,"div",40)(8,"h2"),f(9,"Checks"),p(),u(10,"button",41),C("click",function(){g(e);let r=d(2);return _(r.loadChecks())}),f(11," Refresh "),p()(),E(12,LR,2,0,"div",42)(13,FR,5,2,"div",43)(14,qR,5,2),p(),u(15,"section",44)(16,"div",40)(17,"h2"),f(18,"Details"),p(),E(19,ZR,2,0,"button",45),p(),E(20,YR,11,4)(21,XR,4,2),p()(),u(22,"aside",46)(23,"div",40)(24,"h2"),f(25,"Reviewers"),p()(),u(26,"app-chip-input",47),C("trailingAction",function(){g(e);let r=d(2);return _(r.reviewerRequired.set(!r.reviewerRequired()))})("queryChange",function(r){g(e);let o=d(2);return _(o.reviewerQuery.set(r))})("select",function(r){g(e);let o=d(2);return _(o.addReviewer(r))}),p(),E(27,eN,4,0),E(28,nN,4,0),E(29,iN,2,0,"p",48),E(30,rN,2,1,"button",49),u(31,"div",50)(32,"h3"),f(33,"Tags"),p(),u(34,"button",51),C("click",function(){g(e);let r=d(2);return _(r.toggleTagsPicker())}),f(35," + "),p()(),E(36,sN,3,0,"div",52)(37,aN,2,0,"p",48),E(38,lN,1,7,"app-chip-input",53),u(39,"div",50)(40,"h3"),f(41,"Related work items"),p(),u(42,"button",54),C("click",function(){g(e);let r=d(2);return _(r.toggleWorkItemPicker())}),f(43," + "),p()(),E(44,cN,2,0,"div",42)(45,dN,5,2,"div",43)(46,fN,3,0,"ul",55)(47,hN,2,0,"p",48),E(48,mN,1,7,"app-chip-input",56),p()()}if(n&2){let e=d(),i=d();c(2),D(e.mergeStatus==="conflicts"?2:e.mergeStatus==="rejectedByPolicy"?3:e.mergeStatus==="failure"?4:e.mergeStatus==="queued"?5:-1),c(8),S("disabled",i.checksLoading()),c(2),D(i.checksLoading()?12:i.checksError()?13:14),c(7),D(i.editing()?-1:19),c(),D(i.editing()?20:21),c(6),S("chips",qs(22,vm))("suggestions",i.reviewerSuggestions())("loading",i.reviewersLoading())("query",i.reviewerQuery())("error",i.reviewersError())("disabled",i.busy())("trailingPressed",i.reviewerRequired()),c(),D(i.requiredReviewers().length?27:-1),c(),D(i.otherReviewers().length?28:-1),c(),D(e.reviewers.length?-1:29),c(),D(e.isDraft?-1:30),c(4),S("disabled",i.busy()),c(2),D(e.labels.length?36:37),c(2),D(i.tagsPickerOpen()?38:-1),c(4),S("disabled",i.busy()),c(2),D(i.workItemsLoading()?44:i.workItemsError()?45:i.workItems().length?46:47),c(4),D(i.workItemPickerOpen()?48:-1)}}function _N(n,t){if(n&1){let e=I();u(0,"button",87),C("click",function(){g(e);let r=d().$implicit,o=d(3);return _(o.jumpToThread(r))}),f(1),p()}if(n&2){let e=d().$implicit;c(),br(" ",e.filePath,":",e.line," ")}}function vN(n,t){if(n&1&&(u(0,"option",83),f(1),p()),n&2){let e=t.$implicit,i=d(4);S("value",e),c(),P(i.statusLabel(e))}}function bN(n,t){if(n&1&&(u(0,"div",84),j(1,"app-author-avatar",14),u(2,"div")(3,"div",88)(4,"strong"),f(5),p(),f(6),p(),j(7,"app-markdown-text",67),p()()),n&2){let e=t.$implicit,i=d(4);c(),S("name",e.author.name)("email",e.author.email||""),c(4),P(e.author.name),c(),$(" \xB7 ",i.formatDate(e.createdAt)," "),c(),S("markdown",e.content)}}function xN(n,t){if(n&1){let e=I();u(0,"article",79)(1,"header")(2,"span"),f(3),p(),E(4,_N,2,2,"button",81),u(5,"select",82),C("change",function(r){let o=g(e).$implicit,s=d(3);return _(s.setThreadStatus(o.id,r.target.value))}),Z(6,vN,2,2,"option",83,Bt),p()(),Z(8,bN,8,5,"div",84,Xn),u(10,"div",85)(11,"input",86,2),C("keydown.enter",function(){let r=g(e).$implicit,o=_t(12);return d(3).replyToThread(r.id,o.value),_(o.value="")}),p(),u(13,"button",41),C("click",function(){let r=g(e).$implicit,o=_t(12);return d(3).replyToThread(r.id,o.value),_(o.value="")}),f(14," Reply "),p()()()}if(n&2){let e=t.$implicit,i=d(3);c(2),Xe("thread-status status-"+e.status),c(),P(i.statusLabel(e.status)),c(),D(e.filePath?4:-1),c(),S("value",e.status)("disabled",i.busy()),c(),Y(i.threadStatuses),c(2),Y(e.comments),c(5),S("disabled",i.busy())}}function yN(n,t){n&1&&(u(0,"div",80),f(1,"No comments yet."),p())}function CN(n,t){if(n&1){let e=I();u(0,"div",25)(1,"section",77)(2,"h2"),f(3,"Add comment"),p(),u(4,"textarea",78),C("input",function(r){g(e);let o=d(2);return _(o.newComment.set(r.target.value))}),p(),u(5,"div",65)(6,"button",28),C("click",function(){g(e);let r=d(2);return _(r.addGeneralComment())}),f(7," Comment "),p()()(),Z(8,xN,15,7,"article",79,Xn,!1,yN,2,0,"div",80),p()}if(n&2){let e=d(2);c(4),S("value",e.newComment()),c(2),S("disabled",e.busy()||!e.newComment().trim()),c(2),Y(e.threads())}}function wN(n,t){n&1&&(u(0,"div",42),f(1,"Loading the review..."),p())}function EN(n,t){if(n&1&&f(0),n&2){let e=d();$(" ",e.summary," ")}}function DN(n,t){if(n&1&&f(0),n&2){let e=d();$(" Reviewed at commit ",e.reviewedCommit.slice(0,8),". ")}}function SN(n,t){if(n&1&&(u(0,"span"),f(1),p()),n&2){let e=d();c(),$("\xB7 ",e.model)}}function MN(n,t){n&1&&(u(0,"span",100),f(1,"\xB7 new commits since this review"),p())}function TN(n,t){if(n&1&&(u(0,"p",91),E(1,EN,1,1)(2,DN,1,1),p(),u(3,"p",99),f(4),E(5,SN,2,1,"span"),E(6,MN,2,0,"span",100),p()),n&2){let e=t,i=d(3);c(),D(e.summary?1:2),c(3),xo(" ",e.passes," review",e.passes===1?"":"s"," \xB7 last run ",i.formatDate(e.reviewedAt)," "),c(),D(e.model?5:-1),c(),D(i.reviewStale()?6:-1)}}function kN(n,t){n&1&&(u(0,"p",91),f(1," This pull request has not been reviewed yet. Guito reviews it automatically while it is waiting on you, or you can run a review now. "),p())}function IN(n,t){if(n&1&&(u(0,"option",83),f(1),p()),n&2){let e=t.$implicit;S("value",e.value),c(),P(e.label)}}function PN(n,t){if(n&1){let e=I();u(0,"button",101),C("click",function(){g(e);let r=d(3);return _(r.runReview(!0))}),f(1," Review everything again "),p()}if(n&2){let e=d(3);S("disabled",e.reviewRunning())}}function ON(n,t){if(n&1&&j(0,"app-error-banner",22),n&2){let e=d(3);S("message",e.reviewError())}}function RN(n,t){if(n&1&&j(0,"app-error-banner",22),n&2){let e=d(3);S("message",e.review().error)}}function NN(n,t){if(n&1){let e=I();u(0,"section",96)(1,"label",102)(2,"input",103),C("change",function(){g(e);let r=d(3);return _(r.toggleAllFindings())}),p(),f(3),p(),u(4,"div",65)(5,"button",41),C("click",function(){g(e);let r=d(3);return _(r.dismissFindings())}),f(6," Dismiss "),p(),u(7,"button",104),C("click",function(){g(e);let r=d(3);return _(r.postFindings())}),f(8," Post to pull request "),p()()()}if(n&2){let e=d(3);c(2),S("checked",e.selectedFindings().size===e.pendingFindings().length),c(),br(" ",e.selectedFindings().size," of ",e.pendingFindings().length," selected "),c(2),S("disabled",e.reviewRunning()||!e.selectedFindings().size),c(2),S("disabled",e.reviewRunning()||!e.selectedFindings().size)}}function AN(n,t){if(n&1&&(u(0,"span"),f(1),p()),n&2){let e=d(2).$implicit;c(),$(":",e.line)}}function LN(n,t){if(n&1){let e=I();u(0,"button",87),C("click",function(){g(e);let r=d().$implicit,o=d(3);return _(o.jumpToFinding(r))}),f(1),E(2,AN,2,1,"span"),p()}if(n&2){let e=d().$implicit;c(),$(" ",e.file),c(),D(e.line?2:-1)}}function FN(n,t){n&1&&(u(0,"span",107),f(1,"Pull request"),p())}function VN(n,t){if(n&1){let e=I();u(0,"article",105)(1,"header")(2,"label",106)(3,"input",103),C("change",function(){let r=g(e).$implicit,o=d(3);return _(o.toggleFinding(r.id))}),p(),u(4,"span"),f(5),p(),u(6,"strong"),f(7),p()(),E(8,LN,3,2,"button",81)(9,FN,2,0,"span",107),p(),j(10,"app-markdown-text",67),p()}if(n&2){let e=t.$implicit,i=d(3);Xe("severity-"+e.severity),c(3),S("checked",i.findingSelected(e.id)),c(),Xe("severity-badge severity-"+e.severity),c(),P(i.severityLabel(e.severity)),c(2),P(e.title),c(),D(e.file?8:9),c(2),S("markdown",e.comment)}}function BN(n,t){n&1&&f(0," Every finding has been posted or dismissed. ")}function jN(n,t){n&1&&f(0," The review found no problems worth a comment. ")}function $N(n,t){if(n&1&&(u(0,"div",80),f(1," Nothing to post. "),E(2,BN,1,0)(3,jN,1,0),p()),n&2){let e=d(4);c(2),D(e.resolvedFindings().length?2:3)}}function HN(n,t){if(n&1&&E(0,$N,4,1,"div",80),n&2){let e=d(3);D(!e.reviewLoading()&&e.review()?0:-1)}}function zN(n,t){if(n&1&&(u(0,"span"),f(1),p()),n&2){let e=d(2).$implicit;c(),$(":",e.line)}}function UN(n,t){if(n&1){let e=I();u(0,"button",87),C("click",function(){g(e);let r=d().$implicit,o=d(4);return _(o.jumpToFinding(r))}),f(1),E(2,zN,2,1,"span"),p()}if(n&2){let e=d().$implicit;c(),$(" ",e.file),c(),D(e.line?2:-1)}}function GN(n,t){if(n&1&&(u(0,"article",108)(1,"header")(2,"span"),f(3),p(),u(4,"strong"),f(5),p(),u(6,"span",109),f(7),p(),E(8,UN,3,2,"button",81),p()()),n&2){let e=t.$implicit,i=d(4);c(2),Xe("severity-badge severity-"+e.severity),c(),P(i.severityLabel(e.severity)),c(2),P(e.title),c(2),P(e.status==="posted"?"Posted":"Dismissed"),c(),D(e.file?8:-1)}}function WN(n,t){if(n&1&&(u(0,"section",98)(1,"h2"),f(2,"Already handled"),p(),Z(3,GN,9,6,"article",108,Xn),p()),n&2){let e=d(3);c(3),Y(e.resolvedFindings())}}function qN(n,t){if(n&1){let e=I();u(0,"div",26)(1,"section",89)(2,"div",90),E(3,wN,2,0,"div",42)(4,TN,7,6)(5,kN,2,0,"p",91),p(),u(6,"div",92)(7,"label",93)(8,"span"),f(9,"Model"),p(),u(10,"select",94),C("change",function(r){g(e);let o=d(2);return _(o.changeReviewModel(r.target))}),Z(11,IN,2,2,"option",83,bm),p()(),u(13,"button",29),C("click",function(){g(e);let r=d(2);return _(r.runReview(!1))}),f(14),p(),E(15,PN,2,1,"button",95),p()(),E(16,ON,1,1,"app-error-banner",22)(17,RN,1,1,"app-error-banner",22),E(18,NN,9,5,"section",96),Z(19,VN,11,9,"article",97,Xn,!1,HN,1,1),E(22,WN,5,0,"section",98),p()}if(n&2){let e,i,r=d(2);c(3),D(r.reviewLoading()?3:(e=r.review())?4:5,e),c(7),S("value",r.reviewModel())("disabled",r.reviewRunning()),c(),Y(r.reviewModelOptions()),c(2),S("disabled",r.reviewRunning()),c(),$(" ",r.reviewRunning()?"Reviewing...":r.review()?"Review new commits":"Review now"," "),c(),D(r.review()?15:-1),c(),D(r.reviewError()?16:((i=r.review())==null?null:i.status)==="error"&&((i=r.review())!=null&&i.error)?17:-1),c(2),D(r.pendingFindings().length?18:-1),c(),Y(r.pendingFindings()),c(3),D(r.resolvedFindings().length?22:-1)}}function ZN(n,t){if(n&1){let e=I();u(0,"div",111)(1,"span"),f(2),p(),u(3,"button",41),C("click",function(){g(e);let r=d(3);return _(r.loadFiles())}),f(4," Retry "),p()()}if(n&2){let e=d(3);c(2),P(e.filesError()),c(),S("disabled",e.filesLoading())}}function YN(n,t){n&1&&(u(0,"div",42),f(1,"Loading changed files..."),p())}function QN(n,t){n&1&&(B(),j(0,"polyline",117))}function KN(n,t){n&1&&(B(),j(0,"polyline",118))}function XN(n,t){if(n&1){let e=I();u(0,"button",115),C("click",function(){g(e);let r=d().$implicit,o=d(4);return _(o.toggleFileDirectory(r.path))}),B(),u(1,"svg",116),E(2,QN,1,0,":svg:polyline",117)(3,KN,1,0,":svg:polyline",118),p(),fe(),u(4,"span"),f(5),p()()}if(n&2){let e=d().$implicit;se("padding-left",e.depth*14+9,"px"),S("title",e.path),K("aria-expanded",!e.collapsed),c(2),D(e.collapsed?2:3),c(3),P(e.name)}}function JN(n,t){if(n&1){let e=I();u(0,"button",119),C("click",function(){g(e);let r=d().$implicit,o=d(4);return _(o.selectFile(r.file))}),u(1,"span"),f(2),p(),u(3,"span"),f(4),p()()}if(n&2){let e,i=d().$implicit,r=d(4);se("padding-left",i.depth*14+9,"px"),te("active",((e=r.selectedFile())==null?null:e.path)===i.file.path),S("title",i.file.path),c(),Xe("file-status status-"+i.file.changeType),c(),P(i.file.changeType[0].toUpperCase()),c(2),P(i.name)}}function eA(n,t){if(n&1&&E(0,XN,6,6,"button",113)(1,JN,5,9,"button",114),n&2){let e=t.$implicit;D(e.kind==="dir"?0:1)}}function tA(n,t){n&1&&(u(0,"div",80),f(1,"No changed files."),p())}function nA(n,t){if(n&1&&Z(0,eA,2,1,null,null,xR,!1,tA,2,0,"div",80),n&2){let e=d(3);Y(e.fileRows())}}function iA(n,t){if(n&1){let e=I();u(0,"div",27)(1,"aside",110),E(2,ZN,5,2,"div",111)(3,YN,2,0,"div",42)(4,nA,3,1),p(),u(5,"app-pr-file-diff",112),C("commentSubmit",function(r){g(e);let o=d(2);return _(o.addInlineComment(r))})("replySubmit",function(r){g(e);let o=d(2);return _(o.replyFromDiff(r))})("statusSubmit",function(r){g(e);let o=d(2);return _(o.setStatusFromDiff(r))}),p()()}if(n&2){let e=d(2);c(2),D(e.filesError()?2:e.filesLoading()?3:4),c(3),S("diff",e.selectedFile()?e.fileDiffs()[e.selectedFile().path]??null:null)("threads",e.selectedFileThreads())("loading",e.fileDiffLoading())("error",e.fileDiffError())("posting",e.busy())("focus",e.fileFocus())}}function rA(n,t){n&1&&(u(0,"span",123),f(1,"Required"),p())}function oA(n,t){if(n&1&&(u(0,"small"),f(1),p()),n&2){let e=d().$implicit;c(),P(e.detail)}}function sA(n,t){if(n&1){let e=I();u(0,"button",41),C("click",function(){g(e);let r=d().$implicit,o=d(2);return _(o.requeueCheck(r))}),f(1),p()}if(n&2){let e=d().$implicit,i=d(2);S("disabled",!!i.requeuing()||i.checksLoading()),c(),$(" ",i.requeuing()===e.evaluationId?"Requeuing...":"Requeue"," ")}}function aA(n,t){if(n&1){let e=I();u(0,"button",57),C("click",function(){g(e);let r=d().$implicit,o=d(2);return _(o.openExternalLink(r.url))}),f(1," Open "),p()}}function lA(n,t){if(n&1&&(u(0,"li",120)(1,"span"),f(2),p(),u(3,"div",121)(4,"div",122),f(5),E(6,rA,2,0,"span",123),p(),E(7,oA,2,1,"small"),p(),E(8,sA,2,2,"button",124),E(9,aA,2,0,"button",45),p()),n&2){let e=t.$implicit,i=d(2);c(),Xe("check-state state-"+e.state),c(),P(i.checkStateLabel(e.state)),c(3),$(" ",e.name," "),c(),D(e.required?6:-1),c(),D(e.detail?7:-1),c(),D(e.evaluationId?8:-1),c(),D(e.url?9:-1)}}function cA(n,t){if(n&1){let e=I();u(0,"div",125),j(1,"app-author-avatar",14),u(2,"div",126)(3,"span"),f(4),p(),u(5,"small"),f(6),p()(),u(7,"button",127),C("click",function(){let r=g(e).$implicit,o=d(2);return _(o.toggleReviewerRequired(r))}),f(8),p(),u(9,"button",128),C("click",function(){let r=g(e).$implicit,o=d(2);return _(o.removeReviewer(r))}),f(10," \xD7 "),p()()}if(n&2){let e=t.$implicit,i=d(2);c(),S("name",e.name)("email",e.email||""),c(3),P(e.name),c(),Xe(i.voteMeta(e.vote).cls),c(),P(i.voteMeta(e.vote).label),c(),te("on",e.isRequired),S("title",e.isRequired?"Make optional":"Make required"),c(),$(" ",e.isRequired?"Required":"Optional"," "),c(),K("aria-label","Remove "+e.name)}}function dA(n,t){if(n&1){let e=I();u(0,"h2"),f(1,"Abandon pull request"),p(),u(2,"p",131),f(3),p(),u(4,"div",65)(5,"button",29),C("click",function(){g(e);let r=d(3);return _(r.abandonOpen.set(!1))}),f(6," Cancel "),p(),u(7,"button",132),C("click",function(){g(e);let r=d(3);return _(r.abandonPr())}),f(8," Abandon "),p()()}if(n&2){let e,i=d(3);c(3),$(" This closes pull request !",(e=i.pr())==null?null:e.id," without merging it. The source branch is kept. "),c(2),S("disabled",i.busy()),c(2),S("disabled",i.busy())}}function uA(n,t){if(n&1&&(u(0,"option",83),f(1),p()),n&2){let e=t.$implicit;S("value",e.value),c(),P(e.label)}}function pA(n,t){n&1&&(u(0,"p",134),f(1," The target branch's policy allows only the listed merge strategies. "),p())}function fA(n,t){if(n&1){let e=I();u(0,"h2"),f(1),p(),u(2,"label"),f(3,"Merge strategy"),u(4,"select",133),C("change",function(r){g(e);let o=d(3);return _(o.mergeStrategy.set(r.target.value))}),Z(5,uA,2,2,"option",83,bm),p()(),E(7,pA,2,0,"p",134),u(8,"label",135)(9,"input",103),C("change",function(r){g(e);let o=d(3);return _(o.deleteSourceBranch.set(r.target.checked))}),p(),f(10,"Delete source branch"),p(),u(11,"label",135)(12,"input",103),C("change",function(r){g(e);let o=d(3);return _(o.completeWorkItems.set(r.target.checked))}),p(),f(13,"Complete associated work items"),p(),u(14,"label",136)(15,"input",137),C("change",function(r){g(e);let o=d(3);return _(o.transitionWorkItems.set(r.target.checked))}),p(),f(16,"Transition linked work items"),p(),u(17,"div",65)(18,"button",17),C("click",function(){g(e);let r=d(3);return r.completeOpen.set(!1),_(r.autoCompleteOpen.set(!1))}),f(19," Cancel"),p(),u(20,"button",28),C("click",function(){g(e);let r=d(3);return _(r.completeOpen()?r.applyComplete():r.applyAutoComplete())}),f(21),p()()}if(n&2){let e=d(3);c(),$(" ",e.completeOpen()?"Complete pull request":"Set auto-complete"," "),c(3),S("value",e.mergeStrategy()),c(),Y(e.mergeStrategies()),c(2),D(e.mergePolicyLimited()?7:-1),c(2),S("checked",e.deleteSourceBranch()),c(3),S("checked",e.completeWorkItems()),c(3),S("checked",e.transitionWorkItems())("disabled",!e.completeWorkItems()),c(5),S("disabled",e.busy()),c(),$(" ",e.completeOpen()?"Complete":"Enable"," ")}}function hA(n,t){if(n&1){let e=I();u(0,"div",129),C("click",function(){g(e);let r=d(2);return r.completeOpen.set(!1),r.autoCompleteOpen.set(!1),_(r.abandonOpen.set(!1))}),p(),u(1,"section",130),E(2,dA,9,3)(3,fA,22,9),p()}if(n&2){let e=d(2);c(),K("aria-label",e.abandonOpen()?"Abandon pull request":e.completeOpen()?"Complete pull request":"Set auto-complete"),c(),D(e.abandonOpen()?2:3)}}function mA(n,t){if(n&1){let e=I();u(0,"header",7)(1,"div",8)(2,"div",9)(3,"span",10),f(4),p(),u(5,"h1"),f(6),p(),u(7,"span",11),f(8),p(),E(9,CR,2,0,"span",12),p(),u(10,"div",13),j(11,"app-author-avatar",14),u(12,"span"),f(13),p(),u(14,"code"),f(15),p(),u(16,"span",15),f(17,"\u2192"),p(),u(18,"code"),f(19),p()()(),u(20,"div",16)(21,"button",17),C("click",function(){g(e);let r=d();return _(r.openInBrowser())}),f(22," Open in Azure DevOps "),p(),E(23,wR,4,2)(24,TR,8,4),u(25,"button",18),C("click",function(){g(e);let r=d();return _(r.closed.emit())}),f(26," \xD7 "),p()()(),u(27,"nav",19)(28,"button",20),C("click",function(){g(e);let r=d();return _(r.tab.set("overview"))}),f(29," Overview "),p(),u(30,"button",20),C("click",function(){g(e);let r=d();return _(r.tab.set("files"))}),f(31," Files "),u(32,"span"),f(33),p()(),u(34,"button",20),C("click",function(){g(e);let r=d();return _(r.tab.set("comments"))}),f(35," Comments "),u(36,"span"),f(37),p()(),u(38,"button",20),C("click",function(){g(e);let r=d();return _(r.tab.set("review"))}),f(39," Review "),E(40,kR,2,1,"span",21)(41,IR,2,0,"span"),p()(),E(42,PR,1,1,"app-error-banner",22),u(43,"div",23),E(44,gN,49,23,"div",24)(45,CN,11,3,"div",25)(46,qN,23,10,"div",26)(47,iA,6,7,"div",27),p(),yt(48,lA,10,8,"ng-template",null,0,Co)(50,cA,11,11,"ng-template",null,1,Co),E(52,hA,4,2)}if(n&2){let e=t,i=d();c(4),$("!",e.id),c(2),P(e.title),c(2),P(e.status),c(),D(e.isDraft?9:-1),c(2),S("name",e.author.name)("email",e.author.email||""),c(2),P(e.author.name),c(2),P(e.sourceBranch),c(4),P(e.targetBranch),c(4),D(e.isDraft?23:24),c(2),S("disabled",i.busy()),c(3),te("active",i.tab()==="overview"),c(2),te("active",i.tab()==="files"),c(3),P(i.files().length),c(),te("active",i.tab()==="comments"),c(3),P(i.threads().length),c(),te("active",i.tab()==="review"),c(2),D(i.pendingFindings().length?40:i.reviewRunning()?41:-1),c(2),D(i.error()?42:-1),c(2),D(i.tab()==="overview"?44:i.tab()==="comments"?45:i.tab()==="review"?46:47),c(8),D(i.completeOpen()||i.autoCompleteOpen()||i.abandonOpen()?52:-1)}}function gA(n,t){if(n&1){let e=I();u(0,"div",6)(1,"div"),f(2),p(),u(3,"button",17),C("click",function(){g(e);let r=d();return _(r.load())}),f(4,"Retry"),p()()}if(n&2){let e=d();c(2),P(e.error()||"Pull request could not be loaded.")}}var _A={blocker:"Blocker",concern:"Concern",suggestion:"Suggestion",nit:"Nit"},Fy={active:"Active",fixed:"Resolved",wontFix:"Won't fix",closed:"Closed",byDesign:"By design",pending:"Pending"},vA={notSet:"Not merged",queued:"Queued for merge",conflicts:"Merge conflicts",succeeded:"Ready to merge",rejectedByPolicy:"Blocked by policy",failure:"Merge failed"},bA={pending:"Pending",succeeded:"Passed",failed:"Failed",notApplicable:"N/A"},Md=class n{git=O(et);vscode=O(sn);destroyRef=O(ot);prId=N.required();settings=N(null);closed=W();changed=W();pr=v(null);threads=v([]);files=v([]);loading=v(!0);error=v("");busy=v(!1);workItems=v([]);workItemsLoading=v(!1);workItemsError=v("");checks=v([]);checksLoading=v(!1);checksError=v("");checksWarnings=v([]);requeuing=v("");requeueError=v("");requiredChecks=R(()=>this.checks().filter(t=>t.required));optionalChecks=R(()=>this.checks().filter(t=>!t.required));filesLoading=v(!1);filesError=v("");tab=v("overview");editing=v(!1);editTitle=v("");editDescription=v("");reviewerQuery=v("");reviewerSuggestions=v([]);reviewersLoading=v(!1);reviewersError=v("");reviewerRequired=v(!1);tagsPickerOpen=v(!1);tagQuery=v("");allTags=v([]);tagsLoading=v(!1);tagSuggestions=R(()=>{let t=this.tagQuery().trim().toLowerCase(),e=this.allTags();return t?e.filter(i=>i.label.toLowerCase().includes(t)):e});workItemPickerOpen=v(!1);workItemQuery=v("");workItemSuggestions=v([]);workItemsSearchLoading=v(!1);workItemsSearchError=v("");reviewMenuOpen=v(!1);completeOpen=v(!1);autoCompleteOpen=v(!1);abandonOpen=v(!1);mergeStrategy=v("noFastForward");deleteSourceBranch=v(!1);completeWorkItems=v(!1);transitionWorkItems=v(!1);newComment=v("");review=v(null);reviewLoading=v(!1);reviewRunning=v(!1);reviewError=v("");selectedFindings=v(new Set);reviewModel=v("");reviewModelPicked=!1;pendingFindings=R(()=>(this.review()?.findings??[]).filter(t=>t.status==="pending"));resolvedFindings=R(()=>(this.review()?.findings??[]).filter(t=>t.status!=="pending"));reviewStale=R(()=>{let t=this.review(),e=this.pr()?.lastMergeSourceCommit??"";return!!(t?.reviewedCommit&&e&&t.reviewedCommit!==e)});selectedFile=v(null);fileDiffs=v({});fileDiffLoading=v(!1);fileDiffError=v("");fileFocus=v(null);collapsedFiles=v(new Set);fileRows=R(()=>{let t=this.files();return this.settings()?.fileListView!=="tree"?t.map(e=>({kind:"file",path:e.path,name:e.path,depth:0,file:e})):To(t,this.collapsedFiles())});mergeStrategies=R(()=>n.allMergeStrategies.filter(t=>{let e=this.pr()?.mergePolicy;if(e&&!e.includes(t.value))return!1;let i=this.settings();return t.value==="noFastForward"||t.value==="rebaseMerge"?i?.allowMerge!==!1:!0}));mergePolicyLimited=R(()=>{let t=this.pr()?.mergePolicy;return!!(t&&t.length<n.allMergeStrategies.length)});static allMergeStrategies=[{value:"noFastForward",label:"No fast-forward (merge commit)"},{value:"squash",label:"Squash changes"},{value:"rebase",label:"Rebase and fast-forward"},{value:"rebaseMerge",label:"Semi-linear merge"}];voteOptions=[{value:"approve",label:"Approve",icon:"approve"},{value:"approveWithSuggestions",label:"Approve with suggestions",icon:"suggestions"},{value:"waitForAuthor",label:"Waiting for author",icon:"waiting"},{value:"reject",label:"Reject",icon:"reject"},{value:"reset",label:"Remove my vote",icon:"none"}];threadStatuses=Object.keys(Fy);requiredReviewers=R(()=>(this.pr()?.reviewers??[]).filter(t=>t.isRequired));otherReviewers=R(()=>(this.pr()?.reviewers??[]).filter(t=>!t.isRequired));generalThreads=R(()=>this.threads().filter(t=>!t.filePath));inlineThreads=R(()=>this.threads().filter(t=>t.filePath));selectedFileThreads=R(()=>{let t=this.selectedFile();return t?this.inlineThreads().filter(e=>e.filePath===t.path||e.filePath===t.oldPath):[]});constructor(){ge(()=>{let t=this.settings()?.aiReview?.model??"";this.reviewModelPicked||this.reviewModel.set(t)}),Dr(this.reviewerQuery).pipe(St(t=>(this.reviewerSuggestions.set([]),this.reviewersError.set(""),this.reviewersLoading.set(t.trim().length>=2),t.trim().length<2?Ee([]):this.git.searchReviewers(t.trim()).pipe(ct(()=>(this.reviewersError.set("Unable to load suggestions."),Ee([])))))),tt(this.destroyRef)).subscribe(t=>{this.reviewerSuggestions.set(t),this.reviewersLoading.set(!1)}),Dr(this.workItemQuery).pipe(St(t=>{let e=t.trim();return this.workItemSuggestions.set([]),this.workItemsSearchError.set(""),this.workItemsSearchLoading.set(e.length>0),e?this.git.searchWorkItems(e).pipe(ct(()=>(this.workItemsSearchError.set("Unable to load suggestions."),Ee([])))):Ee([])}),tt(this.destroyRef)).subscribe(t=>{this.workItemSuggestions.set(t.map(e=>({id:String(e.id),label:`#${e.id} ${e.title}`.trim(),description:e.state}))),this.workItemsSearchLoading.set(!1)})}ngOnInit(){this.load()}load(){this.loading.set(!0),this.error.set(""),this.git.getPrDetail(this.prId()).pipe(St(t=>Vy({detail:Ee(t),threads:this.git.getPrThreads(this.prId()).pipe(ct(()=>Ee([])))})),tt(this.destroyRef)).subscribe({next:({detail:t,threads:e})=>{this.pr.set(t),this.threads.set(e),this.loading.set(!1),this.loadFiles(),this.loadWorkItems(),this.loadChecks(),this.loadReview()},error:t=>{this.loading.set(!1),this.error.set(this.errorMessage(t))}})}loadFiles(){this.filesLoading.set(!0),this.filesError.set(""),this.git.getPrChanges(this.prId()).pipe(tt(this.destroyRef)).subscribe({next:t=>{this.files.set(t),this.filesLoading.set(!1);let e=this.selectedFile();e&&!t.some(i=>i.path===e.path)&&this.selectedFile.set(null),!this.selectedFile()&&t.length&&this.selectFile(t[0])},error:t=>{this.filesLoading.set(!1),this.filesError.set(this.errorMessage(t))}})}loadWorkItems(){this.workItemsLoading.set(!0),this.workItemsError.set(""),this.git.getPrWorkItems(this.prId()).pipe(tt(this.destroyRef)).subscribe({next:t=>{this.workItems.set(t),this.workItemsLoading.set(!1)},error:t=>{this.workItemsLoading.set(!1),this.workItemsError.set(this.errorMessage(t))}})}loadChecks(){this.checksLoading.set(!0),this.checksError.set(""),this.checksWarnings.set([]),this.requeueError.set(""),this.git.getPrChecks(this.prId()).pipe(tt(this.destroyRef)).subscribe({next:t=>{this.checks.set(t.checks),this.checksWarnings.set(t.warnings??[]),this.checksLoading.set(!1)},error:t=>{this.checksLoading.set(!1),this.checksError.set(this.errorMessage(t))}})}requeueCheck(t){let e=t.evaluationId??"";!e||this.requeuing()||(this.requeuing.set(e),this.requeueError.set(""),this.git.requeuePrCheck(this.prId(),e).pipe(tt(this.destroyRef)).subscribe({next:()=>{this.requeuing.set(""),this.loadChecks()},error:i=>{this.requeuing.set(""),this.requeueError.set(this.errorMessage(i))}}))}reload(){Vy({detail:this.git.getPrDetail(this.prId()),threads:this.git.getPrThreads(this.prId()).pipe(ct(()=>Ee([])))}).subscribe({next:({detail:t,threads:e})=>{this.pr.set(t),this.threads.set(e),this.loadChecks()},error:t=>this.error.set(this.errorMessage(t))})}run(t,e){this.busy()||(this.busy.set(!0),this.error.set(""),t().pipe(tt(this.destroyRef)).subscribe({next:()=>{this.busy.set(!1),this.changed.emit(),e?.()},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}}))}vote(t){this.reviewMenuOpen.set(!1),this.run(()=>this.git.votePr(this.prId(),t),()=>this.reload())}startEditing(){this.editing.set(!0),this.editTitle.set(this.pr()?.title??""),this.editDescription.set(this.pr()?.description??"")}saveEdit(){let t=this.editTitle().trim();t&&this.run(()=>this.git.updatePr(this.prId(),{title:t,description:this.editDescription()}),()=>{this.editing.set(!1),this.reload()})}toggleDraft(){let t=this.pr();t&&this.run(()=>this.git.updatePr(this.prId(),{isDraft:!t.isDraft}),()=>this.reload())}addReviewer(t){this.reviewerQuery.set(""),this.reviewerSuggestions.set([]),this.run(()=>this.git.updatePrReviewer(this.prId(),{id:t.id,required:this.reviewerRequired()}),()=>this.reload())}toggleReviewerRequired(t){this.run(()=>this.git.updatePrReviewer(this.prId(),{id:t.id,required:!t.isRequired,vote:t.vote}),()=>this.reload())}removeReviewer(t){this.run(()=>this.git.updatePrReviewer(this.prId(),{id:t.id,remove:!0}),()=>this.reload())}toggleTagsPicker(){let t=!this.tagsPickerOpen();this.tagsPickerOpen.set(t),this.tagQuery.set(""),!(!t||this.allTags().length||this.tagsLoading())&&(this.tagsLoading.set(!0),this.git.getPrTags().pipe(tt(this.destroyRef)).subscribe({next:e=>{this.allTags.set(e.map(i=>({id:i.name,label:i.name}))),this.tagsLoading.set(!1)},error:()=>this.tagsLoading.set(!1)}))}addTag(t){let e=t.label.trim();e&&(this.tagQuery.set(""),!(this.pr()?.labels??[]).some(i=>i.toLowerCase()===e.toLowerCase())&&this.run(()=>this.git.addPrTag(this.prId(),e),()=>this.reload()))}removeTag(t){this.run(()=>this.git.removePrTag(this.prId(),t),()=>this.reload())}toggleWorkItemPicker(){let t=!this.workItemPickerOpen();this.workItemPickerOpen.set(t),this.workItemQuery.set(""),this.workItemSuggestions.set([])}linkWorkItem(t){let e=Number(t.id);!Number.isInteger(e)||e<=0||(this.workItemQuery.set(""),this.workItemSuggestions.set([]),this.run(()=>this.git.linkPrWorkItem(this.prId(),e),()=>this.loadWorkItems()))}unlinkWorkItem(t){this.run(()=>this.git.unlinkPrWorkItem(this.prId(),t),()=>this.loadWorkItems())}openComplete(){this.mergeStrategy.set(this.defaultMergeStrategy()),this.deleteSourceBranch.set(!1),this.completeWorkItems.set(!1),this.transitionWorkItems.set(!1),this.completeOpen.set(!0)}openAutoComplete(){this.mergeStrategy.set(this.defaultMergeStrategy()),this.deleteSourceBranch.set(!1),this.completeWorkItems.set(!1),this.transitionWorkItems.set(!1),this.completeOpen.set(!1),this.autoCompleteOpen.set(!0)}defaultMergeStrategy(){return this.mergeStrategies()[0]?.value??"noFastForward"}completionOptions(){return{mergeStrategy:this.mergeStrategy(),deleteSourceBranch:this.deleteSourceBranch(),completeWorkItems:this.completeWorkItems(),transitionWorkItems:this.completeWorkItems()&&this.transitionWorkItems()}}applyComplete(){this.run(()=>this.git.completePr(this.prId(),this.completionOptions()),()=>{this.completeOpen.set(!1),this.reload()})}applyAutoComplete(){this.run(()=>this.git.setPrAutoComplete(this.prId(),!0,this.completionOptions()),()=>{this.autoCompleteOpen.set(!1),this.reload()})}cancelAutoComplete(){this.run(()=>this.git.setPrAutoComplete(this.prId(),!1),()=>this.reload())}addGeneralComment(){let t=this.newComment().trim();t&&this.run(()=>this.git.addPrComment(this.prId(),{content:t}),()=>{this.newComment.set(""),this.reload()})}replyToThread(t,e){e.trim()&&this.run(()=>this.git.addPrComment(this.prId(),{threadId:t,content:e}),()=>this.reload())}setThreadStatus(t,e){this.run(()=>this.git.setPrThreadStatus(this.prId(),t,e),()=>this.reload())}addInlineComment(t){this.run(()=>this.git.addPrComment(this.prId(),t),()=>this.reload())}replyFromDiff(t){this.replyToThread(t.threadId,t.content)}setStatusFromDiff(t){this.setThreadStatus(t.threadId,t.status)}jumpToThread(t){let e=this.files().find(i=>i.path===t.filePath)??this.files().find(i=>i.oldPath===t.filePath);!e||t.line===null||(this.tab.set("files"),this.selectFile(e),this.fileFocus.set({line:t.line,side:t.side??"right"}))}toggleFileDirectory(t){this.collapsedFiles.update(e=>{let i=new Set(e);return i.has(t)?i.delete(t):i.add(t),i})}selectFile(t){this.selectedFile.set(t),this.fileDiffError.set(""),!(this.fileDiffs()[t.path]||t.changeType==="binary")&&(this.fileDiffLoading.set(!0),this.git.getPrFileDiff(this.prId(),t).pipe(tt(this.destroyRef)).subscribe({next:e=>{this.fileDiffs.update(i=>re(H({},i),{[t.path]:e})),this.fileDiffLoading.set(!1)},error:e=>{this.fileDiffLoading.set(!1),this.fileDiffError.set(this.errorMessage(e))}}))}voteMeta(t){switch(t){case 10:return{label:"Approved",cls:"vote-approve"};case 5:return{label:"Approved with suggestions",cls:"vote-suggestions"};case-5:return{label:"Waiting for author",cls:"vote-waiting"};case-10:return{label:"Rejected",cls:"vote-reject"};default:return{label:"No vote",cls:"vote-none"}}}statusLabel(t){return Fy[t]??t}mergeStatusLabel(t){return vA[t]??t}checkStateLabel(t){return bA[t]??t}loadReview(){this.reviewLoading.set(!0),this.reviewError.set(""),this.git.getAiReview(this.prId()).pipe(tt(this.destroyRef)).subscribe({next:t=>{this.review.set(t),this.reviewLoading.set(!1),this.syncSelection(t)},error:t=>{this.reviewLoading.set(!1),this.reviewError.set(this.errorMessage(t))}})}runReview(t=!1){this.reviewRunning()||(this.reviewRunning.set(!0),this.reviewError.set(""),this.git.runAiReview(this.prId(),t,this.reviewModel().trim()).pipe(tt(this.destroyRef)).subscribe({next:e=>{this.review.set(e),this.reviewRunning.set(!1),this.syncSelection(e)},error:e=>{this.reviewRunning.set(!1),this.reviewError.set(this.errorMessage(e))}}))}syncSelection(t){this.selectedFindings.set(new Set((t?.findings??[]).filter(e=>e.status==="pending").map(e=>e.id)))}findingSelected(t){return this.selectedFindings().has(t)}toggleFinding(t){let e=new Set(this.selectedFindings());e.has(t)?e.delete(t):e.add(t),this.selectedFindings.set(e)}toggleAllFindings(){let t=this.pendingFindings();this.selectedFindings.set(this.selectedFindings().size===t.length?new Set:new Set(t.map(e=>e.id)))}postFindings(){let t=[...this.selectedFindings()];t.length&&(this.reviewRunning.set(!0),this.reviewError.set(""),this.git.postAiReviewFindings(this.prId(),t).pipe(tt(this.destroyRef)).subscribe({next:e=>{this.review.set(e),this.reviewRunning.set(!1),this.syncSelection(e),this.reload()},error:e=>{this.reviewRunning.set(!1),this.reviewError.set(this.errorMessage(e))}}))}dismissFindings(){let t=[...this.selectedFindings()];t.length&&(this.reviewRunning.set(!0),this.reviewError.set(""),this.git.dismissAiReviewFindings(this.prId(),t).pipe(tt(this.destroyRef)).subscribe({next:e=>{this.review.set(e),this.reviewRunning.set(!1),this.syncSelection(e)},error:e=>{this.reviewRunning.set(!1),this.reviewError.set(this.errorMessage(e))}}))}jumpToFinding(t){if(!t.file)return;let e=this.files().find(i=>i.path===t.file);e&&(this.tab.set("files"),this.selectFile(e),t.line&&this.fileFocus.set({line:t.line,side:"right"}))}severityLabel(t){return _A[t]??t}reviewModelOptions=R(()=>{let t=this.reviewModel().trim();return t&&!Ti.some(e=>e.value===t)?[...Ti,{value:t,label:t}]:Ti});changeReviewModel(t){this.reviewModelPicked=!0,this.reviewModel.set(t.value)}formatDate(t){if(!t)return"";let e=new Date(t);return Number.isNaN(e.getTime())?"":e.toLocaleString()}openInBrowser(){let t=this.pr()?.webUrl;t&&this.vscode.openExternal(t)}openExternalLink(t){t&&this.vscode.openExternal(t)}publishPr(){this.run(()=>this.git.updatePr(this.prId(),{isDraft:!1}),()=>this.reload())}openAbandonConfirm(){this.abandonOpen.set(!0)}abandonPr(){this.run(()=>this.git.abandonPr(this.prId()),()=>{this.abandonOpen.set(!1),this.changed.emit(),this.closed.emit()})}onEscape(){if(this.editing()){this.editing.set(!1);return}if(this.reviewMenuOpen()||this.completeOpen()||this.autoCompleteOpen()||this.abandonOpen()){this.reviewMenuOpen.set(!1),this.completeOpen.set(!1),this.autoCompleteOpen.set(!1),this.abandonOpen.set(!1);return}this.busy()||this.closed.emit()}onBackdropClick(){!this.busy()&&!this.editing()&&!this.completeOpen()&&!this.autoCompleteOpen()&&!this.abandonOpen()&&this.closed.emit()}errorMessage(t){let e=t;return e?.status===400&&e.error?.error?e.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-pr-dialog"]],hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},inputs:{prId:[1,"prId"],settings:[1,"settings"]},outputs:{closed:"closed",changed:"changed"},decls:5,vars:1,consts:[["checkRow",""],["reviewerRow",""],["reply",""],[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-label","Pull request details",1,"pr-dialog"],["role","status",1,"state"],[1,"state"],[1,"dialog-header"],[1,"heading"],[1,"title-line"],[1,"pr-number"],[1,"badge","status"],[1,"badge","draft"],[1,"subtitle"],[3,"name","email"],["aria-hidden","true"],[1,"header-actions"],["type","button",1,"btn",3,"click"],["type","button","aria-label","Close pull request","title","Close",1,"icon-btn","close",3,"click","disabled"],["aria-label","Pull request sections",1,"tabs"],["type","button",3,"click"],[1,"badge-pending"],[3,"message"],[1,"dialog-body"],[1,"overview","content-pane"],[1,"comments","content-pane"],[1,"review-pane","content-pane"],[1,"files-pane"],["type","button",1,"btn","primary",3,"click","disabled"],["type","button",1,"btn",3,"click","disabled"],[1,"menu-wrap"],["role","menu",1,"menu"],["type","button",1,"btn",3,"disabled"],["type","button","role","menuitem",3,"current"],["type","button","role","menuitem",3,"click"],[1,"overview-main"],["role","alert",1,"merge-banner","conflict"],["role","alert",1,"merge-banner","blocked"],[1,"merge-banner","queued"],[1,"card","checks-card"],[1,"card-head"],["type","button",1,"btn","small",3,"click","disabled"],["role","status",1,"state","inline"],["role","alert",1,"section-error"],[1,"card","description-card"],["type","button",1,"btn","small"],[1,"reviewers","card"],["placeholder","Add reviewer","trailingIcon","\u2605","trailingLabel","Toggle between adding reviewers as required and optional",3,"trailingAction","queryChange","select","chips","suggestions","loading","query","error","disabled","trailingPressed"],[1,"empty"],["type","button",1,"btn","full",3,"disabled"],[1,"side-head"],["type","button","aria-label","Add tag","title","Add tag",1,"icon-btn","add",3,"click","disabled"],[1,"labels"],["placeholder","Add tag",3,"chips","suggestions","loading","query","disabled","allowFreeText"],["type","button","aria-label","Relate work item","title","Relate work item",1,"icon-btn","add",3,"click","disabled"],[1,"work-item-list"],["placeholder","Search work item by title or ID",3,"chips","suggestions","loading","query","error","disabled"],["type","button",1,"btn","small",3,"click"],[1,"section-warning"],["role","alert",1,"section-warning"],[1,"check-list"],[1,"check-divider"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text",3,"input","value"],["rows","12",3,"input","value"],[1,"form-actions"],[1,"detail-title"],[3,"markdown"],["type","button",1,"btn","full",3,"click","disabled"],[1,"label-chip"],["type","button","title","Remove tag",1,"chip-x",3,"click","disabled"],["placeholder","Add tag",3,"queryChange","select","chips","suggestions","loading","query","disabled","allowFreeText"],["type","button",1,"work-item-link",3,"click"],[1,"work-item-id"],[1,"work-item-title"],["type","button","title","Unlink work item",1,"icon-btn",3,"click","disabled"],["placeholder","Search work item by title or ID",3,"queryChange","select","chips","suggestions","loading","query","error","disabled"],[1,"new-comment","card"],["rows","4","placeholder","Leave a comment (markdown supported)",3,"input","value"],[1,"thread-card","card"],[1,"state","inline"],["type","button",1,"path-chip"],["aria-label","Thread status",3,"change","value","disabled"],[3,"value"],[1,"comment"],[1,"reply"],["type","text","placeholder","Reply...",3,"keydown.enter"],["type","button",1,"path-chip",3,"click"],[1,"comment-meta"],[1,"review-header","card"],[1,"review-summary"],[1,"review-line"],[1,"review-actions"],["title","Which Claude model reviews this pull request; Default uses whatever Claude Code itself is set to",1,"review-model"],[3,"change","value","disabled"],["type","button","title","Review the whole diff again, ignoring what was already reviewed",1,"btn","small",3,"disabled"],[1,"findings-toolbar","card"],[1,"finding-card","card",3,"class"],[1,"resolved-findings"],[1,"review-meta"],[1,"review-stale"],["type","button","title","Review the whole diff again, ignoring what was already reviewed",1,"btn","small",3,"click","disabled"],[1,"select-all"],["type","checkbox",3,"change","checked"],["type","button",1,"btn","primary","small",3,"click","disabled"],[1,"finding-card","card"],[1,"finding-pick"],[1,"path-chip","muted"],[1,"finding-card","card","resolved"],[1,"finding-state"],[1,"file-list"],["role","alert",1,"section-error","block"],[3,"commentSubmit","replySubmit","statusSubmit","diff","threads","loading","error","posting","focus"],["type","button",1,"dir-row",3,"paddingLeft","title"],["type","button",3,"active","paddingLeft","title"],["type","button",1,"dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"file-chevron"],["points","9 6 15 12 9 18"],["points","6 9 12 15 18 9"],["type","button",3,"click","title"],[1,"check-row"],[1,"check-info"],[1,"check-name"],[1,"required-chip"],["type","button",1,"btn","small",3,"disabled"],[1,"reviewer-row"],[1,"reviewer-name"],["type","button",1,"required-toggle",3,"click","title"],["type","button",1,"icon-btn",3,"click"],[1,"sub-backdrop",3,"click"],["role","dialog","aria-modal","true",1,"sub-dialog"],[1,"confirm-text"],["type","button",1,"btn","danger",3,"click","disabled"],[3,"change","value"],[1,"policy-note"],[1,"check"],[1,"check","nested"],["type","checkbox",3,"change","checked","disabled"]],template:function(e,i){if(e&1&&(u(0,"div",3),C("click",function(){return i.onBackdropClick()}),p(),u(1,"section",4),E(2,yR,2,0,"div",5)(3,mA,53,25)(4,gA,5,1,"div",6),p()),e&2){let r;c(2),D(i.loading()?2:(r=i.pr())?3:4,r)}},dependencies:[Fn,Ro,pt,Ii,ia,Sd],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:300;background:#0000009e}.pr-dialog[_ngcontent-%COMP%]{position:fixed;inset:3vh 3vw;z-index:301;display:flex;flex-direction:column;min-width:720px;overflow:hidden;border:1px solid var(--border);border-radius:8px;background:var(--bg);box-shadow:0 18px 60px #000000a6}.dialog-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:24px;min-height:76px;padding:10px 14px;border-bottom:1px solid var(--border);background:var(--bg-alt)}.heading[_ngcontent-%COMP%]{flex:1;min-width:0}.title-line[_ngcontent-%COMP%], .subtitle[_ngcontent-%COMP%], .header-actions[_ngcontent-%COMP%], .card-head[_ngcontent-%COMP%], .form-actions[_ngcontent-%COMP%], .reviewer-row[_ngcontent-%COMP%], .thread-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%], .reply[_ngcontent-%COMP%]{display:flex;align-items:center}.title-line[_ngcontent-%COMP%]{gap:8px}h1[_ngcontent-%COMP%]{min-width:0;margin:0;overflow:hidden;color:var(--text-bright);font-size:18px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}.pr-number[_ngcontent-%COMP%]{color:var(--text-dim);font-family:var(--mono)}.subtitle[_ngcontent-%COMP%]{gap:7px;margin-top:7px;color:var(--text-dim);font-size:12px}.subtitle[_ngcontent-%COMP%] app-author-avatar[_ngcontent-%COMP%]{transform:scale(.8);margin:-2px}code[_ngcontent-%COMP%]{max-width:220px;overflow:hidden;color:var(--text);font-family:var(--mono);text-overflow:ellipsis;white-space:nowrap}.header-actions[_ngcontent-%COMP%]{flex:none;gap:6px}.btn[_ngcontent-%COMP%], .icon-btn[_ngcontent-%COMP%], .tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .file-list[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .required-toggle[_ngcontent-%COMP%], .path-chip[_ngcontent-%COMP%]{border:1px solid var(--border);border-radius:4px;background:var(--bg-alt);color:var(--text);cursor:pointer;font:inherit}.btn[_ngcontent-%COMP%]{height:30px;padding:0 11px}.btn[_ngcontent-%COMP%]:hover:not(:disabled), .icon-btn[_ngcontent-%COMP%]:hover:not(:disabled), .tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .file-list[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.btn.primary[_ngcontent-%COMP%]{border-color:#2580d8;background:#0e639c;color:#fff}.btn.primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#17b}.btn.small[_ngcontent-%COMP%]{height:26px;padding:0 9px;font-size:12px}.btn.full[_ngcontent-%COMP%]{width:100%;margin-top:14px}button[_ngcontent-%COMP%]:disabled{cursor:default;opacity:.55}.icon-btn[_ngcontent-%COMP%]{width:28px;height:28px;padding:0;font-size:18px;line-height:1}.close[_ngcontent-%COMP%]{border-color:transparent;background:transparent;font-size:23px}.badge[_ngcontent-%COMP%], .label-chip[_ngcontent-%COMP%], .thread-status[_ngcontent-%COMP%], .path-chip[_ngcontent-%COMP%], .file-status[_ngcontent-%COMP%]{border-radius:3px;padding:2px 6px;font-size:10px;font-weight:600}.badge[_ngcontent-%COMP%]{text-transform:uppercase}.badge.status[_ngcontent-%COMP%]{background:#3794ff29;color:var(--accent)}.badge.draft[_ngcontent-%COMP%]{border:1px solid var(--border);color:var(--text-dim)}.menu-wrap[_ngcontent-%COMP%]{position:relative}.menu[_ngcontent-%COMP%]{position:absolute;top:35px;right:0;z-index:4;width:210px;padding:4px;border:1px solid var(--border);border-radius:5px;background:var(--bg-alt);box-shadow:0 8px 24px #00000073}.menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;width:100%;padding:7px 8px;border:none;text-align:left}.menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover, .menu[_ngcontent-%COMP%] button.current[_ngcontent-%COMP%]{background:var(--bg-hover)}.vote-dot[_ngcontent-%COMP%]{width:9px;height:9px;border-radius:50%;background:var(--text-dim)}.vote-approve[_ngcontent-%COMP%], .vote-suggestions[_ngcontent-%COMP%]{color:#89d185!important}.vote-waiting[_ngcontent-%COMP%]{color:#dcb67a!important}.vote-reject[_ngcontent-%COMP%]{color:#f48771!important}.vote-dot.vote-approve[_ngcontent-%COMP%], .vote-dot.vote-suggestions[_ngcontent-%COMP%]{background:#89d185}.vote-dot.vote-waiting[_ngcontent-%COMP%]{background:#dcb67a}.vote-dot.vote-reject[_ngcontent-%COMP%]{background:#f48771}.tabs[_ngcontent-%COMP%]{display:flex;flex:none;height:38px;padding-left:14px;border-bottom:1px solid var(--border);background:var(--bg-alt)}.tabs[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:0 15px;border-width:0 0 2px;border-radius:0;background:transparent;color:var(--text-dim)}.tabs[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{border-bottom-color:var(--accent);color:var(--text-bright)}.tabs[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-left:4px;color:var(--text-dim)}.dialog-body[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:hidden}.content-pane[_ngcontent-%COMP%]{height:100%;overflow:auto;padding:18px}.overview[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px}.card[_ngcontent-%COMP%]{border:1px solid var(--border);border-radius:5px;background:var(--bg-alt)}.description-card[_ngcontent-%COMP%], .reviewers[_ngcontent-%COMP%], .new-comment[_ngcontent-%COMP%], .thread-card[_ngcontent-%COMP%]{padding:14px}.card-head[_ngcontent-%COMP%]{justify-content:space-between;margin-bottom:12px}.card[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--text-bright);font-size:14px}.detail-title[_ngcontent-%COMP%]{margin:0 0 12px!important;font-size:16px!important}label[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:5px;margin-bottom:12px;color:var(--text-dim);font-size:12px}input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{border:1px solid var(--border);border-radius:3px;background:var(--bg);color:var(--text);font:inherit}input[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{height:30px;padding:0 8px}textarea[_ngcontent-%COMP%]{width:100%;padding:8px;resize:vertical;font-family:var(--mono)}input[_ngcontent-%COMP%]:focus, textarea[_ngcontent-%COMP%]:focus, select[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--accent)}.form-actions[_ngcontent-%COMP%]{justify-content:flex-end;gap:7px}.empty[_ngcontent-%COMP%]{color:var(--text-dim);font-style:italic}.labels[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:5px;margin-top:2px}.label-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:3px;background:#3794ff24;color:var(--accent)}.label-chip[_ngcontent-%COMP%] .chip-x[_ngcontent-%COMP%]{padding:0;border:none;background:transparent;color:inherit;cursor:pointer;font:inherit;font-size:11px;line-height:1}.label-chip[_ngcontent-%COMP%] .chip-x[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--text-bright)}.reviewers[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:16px 0 5px;color:var(--text-dim);font-size:10px;letter-spacing:.5px;text-transform:uppercase}.side-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin:16px 0 7px}.side-head[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;color:var(--text-dim);font-size:10px;letter-spacing:.5px;text-transform:uppercase}.side-head[_ngcontent-%COMP%] .icon-btn.add[_ngcontent-%COMP%]{flex:none;width:20px;height:20px;margin-left:auto;border-color:transparent;background:transparent;color:var(--text-dim);font-size:15px;font-weight:600}.side-head[_ngcontent-%COMP%] .icon-btn.add[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.reviewer-row[_ngcontent-%COMP%]{gap:8px;min-height:42px;border-bottom:1px solid rgba(255,255,255,.05)}.reviewer-name[_ngcontent-%COMP%]{display:flex;flex:1;min-width:0;flex-direction:column}.reviewer-name[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reviewer-name[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{font-size:10px}.required-toggle[_ngcontent-%COMP%]{padding:2px 5px;color:var(--text-dim);font-size:10px}.required-toggle.on[_ngcontent-%COMP%]{border-color:#dcb67a80;color:#dcb67a}.comments[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;max-width:900px;margin:0 auto}.new-comment[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin-bottom:10px}.thread-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{gap:8px;margin-bottom:12px}.thread-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{margin-left:auto}.thread-status[_ngcontent-%COMP%]{background:#3794ff2e;color:var(--accent);text-transform:uppercase}.status-fixed[_ngcontent-%COMP%]{background:#89d1852e;color:#89d185}.status-wontFix[_ngcontent-%COMP%], .status-closed[_ngcontent-%COMP%], .status-byDesign[_ngcontent-%COMP%], .status-pending[_ngcontent-%COMP%]{background:#dcb67a2e;color:#dcb67a}.path-chip[_ngcontent-%COMP%]{max-width:480px;overflow:hidden;border:none;color:var(--accent);text-overflow:ellipsis;white-space:nowrap}.comment[_ngcontent-%COMP%]{display:flex;gap:9px;padding:8px 0;border-top:1px solid rgba(255,255,255,.05)}.comment[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1;min-width:0}.comment-meta[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.reply[_ngcontent-%COMP%]{gap:7px;margin-top:8px}.reply[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{flex:1}.files-pane[_ngcontent-%COMP%]{display:grid;grid-template-columns:280px minmax(0,1fr);height:100%}.file-list[_ngcontent-%COMP%]{overflow:auto;border-right:1px solid var(--border);background:var(--bg-alt)}.file-list[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;width:100%;padding:7px 9px;overflow:hidden;border-width:0 0 1px;border-radius:0;text-align:left}.file-list[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background:#3794ff24;color:var(--text-bright)}.file-list[_ngcontent-%COMP%] button[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-list[_ngcontent-%COMP%] .dir-row[_ngcontent-%COMP%]{color:var(--text-dim);font-weight:600}.file-chevron[_ngcontent-%COMP%]{flex:none;width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.file-status[_ngcontent-%COMP%]{flex:none;width:19px;padding:1px 0;text-align:center}.file-status.status-added[_ngcontent-%COMP%]{color:#89d185}.file-status.status-deleted[_ngcontent-%COMP%]{color:#f48771}.file-status.status-renamed[_ngcontent-%COMP%]{color:#c586c0}.file-status.status-modified[_ngcontent-%COMP%]{color:var(--accent)}app-pr-file-diff[_ngcontent-%COMP%]{min-width:0;overflow:auto}.state[_ngcontent-%COMP%]{display:flex;height:100%;flex-direction:column;align-items:center;justify-content:center;gap:12px;color:var(--text-dim)}.state.inline[_ngcontent-%COMP%]{min-height:80px;padding:16px}.sub-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:8;background:#0000007a}.sub-dialog[_ngcontent-%COMP%]{position:absolute;z-index:9;top:50%;left:50%;width:min(440px,calc(100% - 40px));padding:18px;transform:translate(-50%,-50%);border:1px solid var(--border);border-radius:6px;background:var(--bg-alt);box-shadow:0 14px 42px #0009}.sub-dialog[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0 0 18px;color:var(--text-bright);font-size:17px}.sub-dialog[_ngcontent-%COMP%] .check[_ngcontent-%COMP%]{flex-direction:row;align-items:center}.check[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:15px;height:15px}.check.nested[_ngcontent-%COMP%]{margin-left:23px}.confirm-text[_ngcontent-%COMP%]{margin:-6px 0 14px;color:var(--text-dim);font-size:12px}.policy-note[_ngcontent-%COMP%]{margin:-10px 0 14px;color:var(--text-dim);font-size:11px}.btn.danger[_ngcontent-%COMP%]{border-color:#f14c4c8c;background:#f14c4c29;color:#f48771}.btn.danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#f14c4c42}.checks-card[_ngcontent-%COMP%]{padding:14px;margin-bottom:16px}.merge-banner[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;margin-bottom:16px;padding:10px 14px;border:1px solid rgba(241,76,76,.45);border-radius:5px;background:#f14c4c1f}.merge-banner[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#f48771;font-size:13px}.merge-banner[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:2px 0 0;color:var(--text-dim);font-size:12px}.merge-banner[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{max-width:none;color:#f48771}.merge-banner.queued[_ngcontent-%COMP%]{border-color:#3794ff66;background:#3794ff1f}.merge-banner.queued[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--accent)}.merge-banner[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{flex:none;margin-left:auto}.check-list[_ngcontent-%COMP%]{margin:0;padding:0;list-style:none}.check-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:9px;min-height:34px;border-bottom:1px solid rgba(255,255,255,.05)}.check-row[_ngcontent-%COMP%]:last-child{border-bottom:none}.check-divider[_ngcontent-%COMP%]{margin:6px 0;border:none;border-top:1px solid rgba(255,255,255,.12)}.check-info[_ngcontent-%COMP%]{flex:1;min-width:0}.check-name[_ngcontent-%COMP%]{color:var(--text);font-size:12px}.check-info[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{display:block;overflow:hidden;color:var(--text-dim);font-size:11px;text-overflow:ellipsis;white-space:nowrap}.check-state[_ngcontent-%COMP%]{flex:none;min-width:52px;padding:2px 6px;border-radius:3px;color:var(--text-dim);font-size:10px;font-weight:600;text-align:center;text-transform:uppercase}.check-state.state-succeeded[_ngcontent-%COMP%]{background:#89d1852e;color:#89d185}.check-state.state-failed[_ngcontent-%COMP%]{background:#f14c4c29;color:#f48771}.check-state.state-pending[_ngcontent-%COMP%]{background:#dcb67a29;color:#dcb67a}.check-state.state-notApplicable[_ngcontent-%COMP%]{background:#80808029;color:var(--text-dim)}.required-chip[_ngcontent-%COMP%]{margin-left:6px;padding:1px 5px;border-radius:3px;background:#dcb67a24;color:#dcb67a;font-size:10px;font-weight:600;text-transform:uppercase}.section-error[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-bottom:8px;padding:8px 10px;border:1px solid rgba(241,76,76,.4);border-radius:4px;background:#f14c4c1a;color:#f48771;font-size:12px}.section-error.block[_ngcontent-%COMP%]{flex-direction:column;align-items:flex-start;margin:10px}.section-warning[_ngcontent-%COMP%]{margin-bottom:8px;padding:6px 10px;border:1px solid rgba(220,182,122,.35);border-radius:4px;background:#dcb67a14;color:#dcb67a;font-size:11px}.work-item-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:0;padding:0;list-style:none}.work-item-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:8px;padding:4px 0;border-bottom:1px solid rgba(255,255,255,.05)}.work-item-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-bottom:none}.work-item-link[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;align-items:baseline;gap:6px;border:none;background:transparent;color:var(--accent);cursor:pointer;font:inherit;font-size:12px;padding:2px 0;text-align:left}.work-item-id[_ngcontent-%COMP%]{flex:none;color:var(--text-dim);font-family:var(--mono);font-size:11px}.work-item-title[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.work-item-link[_ngcontent-%COMP%]:hover .work-item-title[_ngcontent-%COMP%]{text-decoration:underline}.work-item-list[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{flex:none;color:var(--text-dim);font-size:10px;text-transform:uppercase}.work-item-list[_ngcontent-%COMP%] .icon-btn[_ngcontent-%COMP%]{flex:none;width:18px;height:18px;border:none;background:transparent;color:var(--text-dim);font-size:13px}.work-item-list[_ngcontent-%COMP%] .icon-btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}@media(max-width:900px){.pr-dialog[_ngcontent-%COMP%]{inset:1vh 1vw;min-width:620px}.dialog-header[_ngcontent-%COMP%]{align-items:flex-start}.header-actions[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:flex-end}.overview[_ngcontent-%COMP%]{grid-template-columns:1fr}.reviewers[_ngcontent-%COMP%]{order:-1}.files-pane[_ngcontent-%COMP%]{grid-template-columns:220px minmax(0,1fr)}}.tabs[_ngcontent-%COMP%] .badge-pending[_ngcontent-%COMP%]{background:#dcb67a33;color:#dcb67a}.review-pane[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:10px;padding:14px;overflow:auto}.review-header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:14px;padding:12px 14px}.review-summary[_ngcontent-%COMP%]{flex:1;min-width:0}.review-line[_ngcontent-%COMP%]{margin:0;color:var(--text);font-size:13px}.review-meta[_ngcontent-%COMP%]{margin:4px 0 0;color:var(--text-dim);font-size:11px}.review-stale[_ngcontent-%COMP%]{color:#dcb67a}.review-actions[_ngcontent-%COMP%]{display:flex;flex:none;flex-direction:column;gap:6px}.review-model[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:6px}.review-model[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--text-dim);font-size:11px}.review-model[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{max-width:150px;height:26px;padding:0 6px;font-size:12px}.findings-toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:8px 14px}.findings-toolbar[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%]{margin-left:auto}.select-all[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;color:var(--text-dim);font-size:12px}.finding-card[_ngcontent-%COMP%]{padding:10px 14px;border-left:3px solid var(--text-dim)}.finding-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.finding-card[_ngcontent-%COMP%] header[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{overflow:hidden;color:var(--text-bright);font-size:13px;text-overflow:ellipsis;white-space:nowrap}.finding-card[_ngcontent-%COMP%] .path-chip[_ngcontent-%COMP%]{margin-left:auto}.finding-pick[_ngcontent-%COMP%]{display:flex;flex:1;align-items:center;gap:8px;min-width:0;cursor:pointer}.finding-card.severity-blocker[_ngcontent-%COMP%]{border-left-color:#f48771}.finding-card.severity-concern[_ngcontent-%COMP%]{border-left-color:#dcb67a}.finding-card.severity-suggestion[_ngcontent-%COMP%]{border-left-color:var(--accent)}.finding-card.severity-nit[_ngcontent-%COMP%]{border-left-color:var(--text-dim)}.severity-badge[_ngcontent-%COMP%]{flex:none;padding:2px 6px;border-radius:3px;font-size:10px;font-weight:600;text-transform:uppercase}.severity-badge.severity-blocker[_ngcontent-%COMP%]{background:#f14c4c29;color:#f48771}.severity-badge.severity-concern[_ngcontent-%COMP%]{background:#dcb67a29;color:#dcb67a}.severity-badge.severity-suggestion[_ngcontent-%COMP%]{background:#3794ff24;color:var(--accent)}.severity-badge.severity-nit[_ngcontent-%COMP%]{background:#80808029;color:var(--text-dim)}.finding-card.resolved[_ngcontent-%COMP%]{opacity:.65}.finding-card.resolved[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{margin-bottom:0}.finding-state[_ngcontent-%COMP%]{flex:none;color:var(--text-dim);font-size:11px}.resolved-findings[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;margin-top:8px}.resolved-findings[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:6px 0 0;color:var(--text-dim);font-size:11px;font-weight:600;text-transform:uppercase}.path-chip.muted[_ngcontent-%COMP%]{color:var(--text-dim);cursor:default}"],changeDetection:0})};function Vy(n){return new pe(t=>{let e=Object.keys(n),i={},r=e.length,o=!1;if(!r){t.next({}),t.complete();return}for(let s of e)n[s].subscribe({next:a=>{i[s]=a},error:a=>{o||(o=!0,t.error(a))},complete:()=>{--r===0&&!o&&(t.next(i),t.complete())}})})}var By=(n,t)=>n.name.toLowerCase().localeCompare(t.name.toLowerCase());function kd(n,t){let e={name:"",dirs:new Map,refs:[]};for(let o of n){let s=o.name.split("/").filter(Boolean),a=e;for(let l of s.slice(0,-1)){let h=a.dirs.get(l);h||(h={name:l,dirs:new Map,refs:[]},a.dirs.set(l,h)),a=h}a.refs.push(o)}let i=[],r=(o,s,a)=>{for(let l of[...o.dirs.values()].sort(By)){let h=s?`${s}/${l.name}`:l.name,m=t.has(h);i.push({kind:"dir",path:h,name:l.name,depth:a,collapsed:m}),m||r(l,h,a+1)}for(let l of[...o.refs].sort(By))i.push({kind:"ref",path:l.name,name:l.name.split("/").pop()??l.name,depth:a,ref:l})};return r(e,"",0),i}function Ir(n){return n.map(t=>({kind:"ref",path:t.name,name:t.name,depth:0,ref:t}))}function Pi(n,t){return t?n:n.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLocaleLowerCase()}var xA=["panel"],yA=["branchBody"],CA=["tagBody"],wA=(n,t)=>t.index,EA=(n,t)=>t.path,DA=(n,t)=>t.id;function SA(n,t){if(n&1){let e=I();b(0,"button",25),F("click",function(){g(e);let r=d();return _(r.clearFilter())}),B(),b(1,"svg",12),ee(2,"line",26)(3,"line",27),y()()}}function MA(n,t){n&1&&(B(),ee(0,"polyline",28)(1,"polyline",29))}function TA(n,t){n&1&&(B(),ee(0,"polyline",30)(1,"polyline",31))}function kA(n,t){n&1&&(B(),ee(0,"polyline",16))}function IA(n,t){n&1&&(B(),ee(0,"polyline",17))}function PA(n,t){if(n&1&&ee(0,"div",34),n&2){let e=d(2);se("height",e.branchPadTop(),"px")}}function OA(n,t){n&1&&(b(0,"div",35),f(1,"Loading..."),y())}function RA(n,t){if(n&1){let e=I();b(0,"button",38),F("click",function(){g(e);let r=d(3);return _(r.selectAllBranches())}),B(),b(1,"svg",39),ee(2,"line",40)(3,"line",41)(4,"line",42)(5,"circle",43)(6,"circle",44)(7,"circle",45),y(),fe(),b(8,"span",46),f(9,"All Branches"),y()()}if(n&2){let e=d(3);te("selected",e.selectedBranches().length===0)}}function NA(n,t){if(n&1&&(b(0,"div",37),f(1),y()),n&2){let e=d().$implicit;c(),P(e.text)}}function AA(n,t){n&1&&(B(),ee(0,"polyline",17))}function LA(n,t){n&1&&(B(),ee(0,"polyline",16))}function FA(n,t){if(n&1){let e=I();b(0,"button",49),F("click",function(){g(e);let r=d(2).$implicit,o=d(2);return _(o.toggleDir(r.group,r.row.path))}),B(),b(1,"svg",50),E(2,AA,1,0,":svg:polyline",17)(3,LA,1,0,":svg:polyline",16),y(),fe(),b(4,"span",46),f(5),y()()}if(n&2){let e=d(2).$implicit;se("padding-left",e.row.depth*14+8,"px"),G("title",e.row.path),K("aria-expanded",!e.row.collapsed),c(2),D(e.row.collapsed?2:3),c(3),P(e.row.name)}}function VA(n,t){n&1&&(b(0,"span",56),f(1,"current"),y())}function BA(n,t){if(n&1){let e=I();b(0,"button",51),F("click",function(r){g(e);let o=d(2).$implicit,s=d(2);return _(s.selectBranch(o.row.ref.name,r))})("contextmenu",function(r){g(e);let o=d(2).$implicit,s=d(2);return _(s.onContextMenu(r,{kind:"branch",branch:s.badgeOf(o.row.ref)}))}),B(),b(1,"svg",39),ee(2,"line",52)(3,"circle",53)(4,"circle",54)(5,"path",55),y(),fe(),b(6,"span",46),f(7),y(),E(8,VA,2,0,"span",56),y()}if(n&2){let e=d(2).$implicit,i=d(2);se("padding-left",e.row.depth*14+8,"px"),te("selected",i.selectedBranches().includes(e.row.ref.name)),G("title",e.row.ref.name),c(7),P(e.row.name),c(),D(e.row.ref.current?8:-1)}}function jA(n,t){if(n&1&&E(0,FA,6,6,"button",47)(1,BA,9,7,"button",48),n&2){let e=d().$implicit;D(e.row.kind==="dir"?0:1)}}function $A(n,t){if(n&1&&E(0,OA,2,0,"div",35)(1,RA,10,2,"button",36)(2,NA,2,1,"div",37)(3,jA,2,1),n&2){let e,i=t.$implicit;D((e=i.type)==="loading"?0:e==="all"?1:e==="label"?2:3)}}function HA(n,t){if(n&1&&ee(0,"div",34),n&2){let e=d(2);se("height",e.branchPadBottom(),"px")}}function zA(n,t){n&1&&(b(0,"div",33),f(1,"No matching branches"),y())}function UA(n,t){if(n&1&&(b(0,"div",20,1),E(2,PA,1,2,"div",32),Z(3,$A,4,1,null,null,Nc().trackBranchItem,!0),E(5,HA,1,2,"div",32),E(6,zA,2,0,"div",33),y()),n&2){let e=d();c(2),D(e.branchPadTop()>0?2:-1),c(),Y(e.branchSlice()),c(2),D(e.branchPadBottom()>0?5:-1),c(),D(!e.showLoading()&&e.filtering()&&e.branchCount()===0?6:-1)}}function GA(n,t){n&1&&(B(),ee(0,"polyline",16))}function WA(n,t){n&1&&(B(),ee(0,"polyline",17))}function qA(n,t){if(n&1&&ee(0,"div",34),n&2){let e=d(2);se("height",e.tagPadTop(),"px")}}function ZA(n,t){n&1&&(b(0,"div",35),f(1,"Loading..."),y())}function YA(n,t){n&1&&(B(),ee(0,"polyline",17))}function QA(n,t){n&1&&(B(),ee(0,"polyline",16))}function KA(n,t){if(n&1){let e=I();b(0,"button",49),F("click",function(){g(e);let r=d().$implicit,o=d(2);return _(o.toggleDir("tag",r.row.path))}),B(),b(1,"svg",50),E(2,YA,1,0,":svg:polyline",17)(3,QA,1,0,":svg:polyline",16),y(),fe(),b(4,"span",46),f(5),y()()}if(n&2){let e=d().$implicit;se("padding-left",e.row.depth*14+8,"px"),G("title",e.row.path),K("aria-expanded",!e.row.collapsed),c(2),D(e.row.collapsed?2:3),c(3),P(e.row.name)}}function XA(n,t){if(n&1){let e=I();b(0,"button",51),F("click",function(){g(e);let r=d().$implicit,o=d(2);return _(o.selectTag(r.row.ref))})("contextmenu",function(r){g(e);let o=d().$implicit,s=d(2);return _(s.onContextMenu(r,{kind:"tag",branch:{type:"tag",name:o.row.ref.name}}))}),B(),b(1,"svg",39),ee(2,"path",57)(3,"line",58),y(),fe(),b(4,"span",46),f(5),y()()}if(n&2){let e=d().$implicit,i=d(2);se("padding-left",e.row.depth*14+8,"px"),te("selected",i.selectedCommitHash()===e.row.ref.hash),G("title",e.row.ref.name),c(5),P(e.row.name)}}function JA(n,t){if(n&1&&E(0,ZA,2,0,"div",35)(1,KA,6,6,"button",47)(2,XA,6,6,"button",48),n&2){let e=t.$implicit;D(e.type==="loading"?0:e.row.kind==="dir"?1:2)}}function eL(n,t){if(n&1&&(b(0,"div",33),f(1),y()),n&2){let e=d(2);c(),P(e.filtering()?"No matching tags":"No tags")}}function tL(n,t){if(n&1&&ee(0,"div",34),n&2){let e=d(2);se("height",e.tagPadBottom(),"px")}}function nL(n,t){if(n&1&&(b(0,"div",20,2),E(2,qA,1,2,"div",32),Z(3,JA,3,1,null,null,Nc().trackTagItem,!0,eL,2,1,"div",33),E(6,tL,1,2,"div",32),y()),n&2){let e=d();c(2),D(e.tagPadTop()>0?2:-1),c(),Y(e.tagSlice()),c(3),D(e.tagPadBottom()>0?6:-1)}}function iL(n,t){n&1&&(B(),ee(0,"polyline",16))}function rL(n,t){n&1&&(B(),ee(0,"polyline",17))}function oL(n,t){n&1&&(b(0,"div",35),f(1,"Loading..."),y())}function sL(n,t){if(n&1){let e=I();b(0,"button",51),F("click",function(){let r=g(e).$implicit,o=d(2);return _(o.stashSelect.emit(r))})("contextmenu",function(r){let o=g(e).$implicit,s=d(2);return _(s.onContextMenu(r,{kind:"stash",stash:o}))}),B(),b(1,"svg",39),ee(2,"path",60)(3,"line",61),y(),fe(),b(4,"span",46),f(5),y(),b(6,"span",62),f(7),y()()}if(n&2){let e=t.$implicit,i=d(2);te("selected",i.selectedCommitHash()===e.hash),G("title",e.message),c(5),P(i.stashLabel(e)),c(2),P(e.message)}}function aL(n,t){if(n&1&&(b(0,"div",33),f(1),y()),n&2){let e=d(3);c(),P(e.filtering()?"No matching stashes":"No stashes")}}function lL(n,t){if(n&1&&E(0,aL,2,1,"div",33),n&2){let e=d(2);D(e.showLoading()?-1:0)}}function cL(n,t){if(n&1&&(b(0,"div",20),E(1,oL,2,0,"div",35),Z(2,sL,8,5,"button",59,wA,!1,lL,1,1),y()),n&2){let e=d();c(),D(e.showLoading()?1:-1),c(),Y(e.filteredStashes())}}function dL(n,t){n&1&&(B(),ee(0,"polyline",16))}function uL(n,t){n&1&&(B(),ee(0,"polyline",17))}function pL(n,t){n&1&&(b(0,"div",35),f(1,"Loading..."),y())}function fL(n,t){if(n&1&&(b(0,"span",65),f(1),y()),n&2){let e=d().$implicit;c(),P(e.branch)}}function hL(n,t){if(n&1){let e=I();b(0,"button",63),F("dblclick",function(){let r=g(e).$implicit,o=d(2);return _(o.openWorktree(r))})("contextmenu",function(r){let o=g(e).$implicit,s=d(2);return _(s.onContextMenu(r,{kind:"worktree",worktree:o}))}),B(),b(1,"svg",39),ee(2,"path",64),y(),fe(),b(3,"span",46),f(4),y(),E(5,fL,2,1,"span",65),y()}if(n&2){let e=t.$implicit,i=d(2);te("selected",e.current),G("title",e.path),c(4),P(i.worktreeLabel(e)),c(),D(e.branch?5:-1)}}function mL(n,t){if(n&1&&(b(0,"div",33),f(1),y()),n&2){let e=d(3);c(),P(e.filtering()?"No matching worktrees":"No worktrees")}}function gL(n,t){if(n&1&&E(0,mL,2,1,"div",33),n&2){let e=d(2);D(e.showLoading()?-1:0)}}function _L(n,t){if(n&1&&(b(0,"div",20),E(1,pL,2,0,"div",35),Z(2,hL,6,5,"button",59,EA,!1,gL,1,1),y()),n&2){let e=d();c(),D(e.showLoading()?1:-1),c(),Y(e.filteredWorktrees())}}function vL(n,t){n&1&&(B(),ee(0,"polyline",16))}function bL(n,t){n&1&&(B(),ee(0,"polyline",17))}function xL(n,t){if(n&1&&(b(0,"div",69),f(1),y()),n&2){let e=d(3);c(),P(e.prError())}}function yL(n,t){n&1&&(b(0,"div",33),f(1,"Loading pull requests..."),y())}function CL(n,t){n&1&&(B(),ee(0,"polyline",73))}function wL(n,t){n&1&&(B(),ee(0,"polyline",73)(1,"line",81))}function EL(n,t){n&1&&(B(),ee(0,"circle",82)(1,"polyline",83))}function DL(n,t){n&1&&(B(),ee(0,"line",84)(1,"line",85))}function SL(n,t){n&1&&(B(),ee(0,"circle",74))}function ML(n,t){n&1&&(b(0,"span",78),f(1,"Draft"),y())}function TL(n,t){n&1&&(b(0,"span",79),f(1,"Required"),y())}function kL(n,t){if(n&1){let e=I();b(0,"button",71),F("click",function(){let r=g(e).$implicit,o=d(4);return _(o.prSelect.emit(r.id))}),B(),b(1,"svg",72),E(2,CL,1,0,":svg:polyline",73)(3,wL,2,0)(4,EL,2,0)(5,DL,2,0)(6,SL,1,0,":svg:circle",74),y(),fe(),b(7,"span",75)(8,"span",76)(9,"span",77),f(10),y(),E(11,ML,2,0,"span",78),E(12,TL,2,0,"span",79),y(),b(13,"span",80),f(14),y()()()}if(n&2){let e,i=t.$implicit,r=d(4);G("title",r.prTooltip(i)),c(),Xe(r.voteClass(i)),c(),D((e=i.myVote)===10?2:e===5?3:e===-5?4:e===-10?5:6),c(8),P(i.title),c(),D(i.isDraft?11:-1),c(),D(i.requiresMe?12:-1),c(2),xo(" ",i.author.name," \xB7 ",i.sourceBranch," \u2192 ",i.targetBranch," ")}}function IL(n,t){if(n&1&&(b(0,"div",33),f(1),y()),n&2){let e=d(4);c(),P(e.filtering()?"No matching pull requests":"No active pull requests")}}function PL(n,t){if(n&1&&Z(0,kL,15,10,"button",70,DA,!1,IL,2,1,"div",33),n&2){let e=d(3);Y(e.filteredPullRequests())}}function OL(n,t){if(n&1&&(b(0,"div",20),E(1,xL,2,1,"div",69)(2,yL,2,0,"div",33)(3,PL,3,1),y()),n&2){let e=d(2);c(),D(e.prError()?1:e.pullRequests()===null?2:3)}}function RL(n,t){if(n&1){let e=I();b(0,"section",13)(1,"div",21)(2,"button",14),F("click",function(){g(e);let r=d();return _(r.prsOpen.set(!r.prsOpen()))}),B(),b(3,"svg",15),E(4,vL,1,0,":svg:polyline",16)(5,bL,1,0,":svg:polyline",17),y(),fe(),b(6,"span",18),f(7,"Pull Requests"),y(),b(8,"span",19),f(9),y()(),b(10,"button",66),F("click",function(){g(e);let r=d();return _(r.prRefresh.emit())}),B(),b(11,"svg",12),ee(12,"polyline",67)(13,"path",68),y()()(),E(14,OL,4,1,"div",20),y()}if(n&2){let e=d();c(2),K("aria-expanded",e.prsExpanded()),c(2),D(e.prsExpanded()?4:5),c(5),P(e.prCount()),c(5),D(e.prsExpanded()?14:-1)}}var Id=24,jy=10;function $y(n,t,e,i){let r=Math.floor((n-e)/Id)-jy,o=Math.ceil((n+t-e)/Id)+jy,s=Math.max(0,Math.min(r,i)),a=Math.max(s,Math.min(Math.max(o,0),i));return{start:s,end:a,padTop:s*Id,padBottom:(i-a)*Id}}var Pd=class n{branches=N.required();selectedBranches=N.required();showRemote=N.required();stashes=N.required();worktrees=N.required();tags=N.required();refListView=N("flat");searchCaseSensitive=N(!1);sectionsExpandedByDefault=N(!0);selectedCommitHash=N("");loading=N(!1);showLoading=v(!1);azureEnabled=N(!1);pullRequests=N(null);prError=N("");branchChange=W();tagSelect=W();stashSelect=W();contextMenu=W();worktreeCreate=W();worktreeOpen=W();prSelect=W();prRefresh=W();prsOpen=xr(()=>this.sectionsExpandedByDefault());branchesOpen=xr(()=>this.sectionsExpandedByDefault());tagsOpen=xr(()=>this.sectionsExpandedByDefault());stashesOpen=xr(()=>this.sectionsExpandedByDefault());worktreesOpen=xr(()=>this.sectionsExpandedByDefault());filter=v("");filterText=R(()=>Pi(this.filter().trim(),this.searchCaseSensitive()));filtering=R(()=>this.filterText()!=="");onFilterInput(t){this.filter.set(t.target.value)}clearFilter(){this.filter.set("")}branchesExpanded=R(()=>this.filtering()||this.branchesOpen());tagsExpanded=R(()=>this.filtering()||this.tagsOpen());stashesExpanded=R(()=>this.filtering()||this.stashesOpen());worktreesExpanded=R(()=>this.filtering()||this.worktreesOpen());prsExpanded=R(()=>this.filtering()||this.prsOpen());allSectionsOpen=R(()=>this.branchesOpen()&&this.tagsOpen()&&this.stashesOpen()&&this.worktreesOpen()&&(!this.azureEnabled()||this.prsOpen()));toggleAllSections(){let t=!this.allSectionsOpen();this.branchesOpen.set(t),this.tagsOpen.set(t),this.stashesOpen.set(t),this.worktreesOpen.set(t),this.prsOpen.set(t)}localBranches=R(()=>this.branches().filter(t=>!t.remote));remoteBranches=R(()=>this.branches().filter(t=>t.remote));localDirsCollapsed=v(new Set);remoteDirsCollapsed=v(new Set);tagDirsCollapsed=v(new Set);filterRefs(t){return this.filtering()?t.filter(e=>this.matchesFilter(e.name)):t}matchesFilter(t){return Pi(t,this.searchCaseSensitive()).includes(this.filterText())}localBranchRows=R(()=>this.filtering()?Ir(this.filterRefs(this.localBranches())):this.refListView()==="tree"?kd(this.localBranches(),this.localDirsCollapsed()):Ir(this.localBranches()));remoteBranchRows=R(()=>this.filtering()?Ir(this.filterRefs(this.remoteBranches())):this.refListView()==="tree"?kd(this.remoteBranches(),this.remoteDirsCollapsed()):Ir(this.remoteBranches()));tagRows=R(()=>this.filtering()?Ir(this.filterRefs(this.tags())):this.refListView()==="tree"?kd(this.tags(),this.tagDirsCollapsed()):Ir(this.tags()));branchSectionRows=R(()=>{let t=[];this.showLoading()&&t.push({type:"loading"}),t.push({type:"all"});let e=this.localBranchRows();(!this.filtering()||e.length>0)&&t.push({type:"label",text:"Local"});for(let i of e)t.push({type:"row",group:"local",row:i});if(this.showRemote()){let i=this.remoteBranchRows();(!this.filtering()||i.length>0)&&t.push({type:"label",text:"Remote"});for(let r of i)t.push({type:"row",group:"remote",row:r})}return t});tagSectionRows=R(()=>{let t=this.tagRows().map(e=>({type:"row",row:e}));return this.showLoading()?[{type:"loading"},...t]:t});zone=O(we);panelEl=dt.required("panel");branchBodyEl=dt("branchBody");tagBodyEl=dt("tagBody");scrollTop=v(0);panelHeight=v(0);branchBodyTop=v(0);tagBodyTop=v(0);branchWindow=R(()=>$y(this.scrollTop(),this.panelHeight(),this.branchBodyTop(),this.branchSectionRows().length));tagWindow=R(()=>$y(this.scrollTop(),this.panelHeight(),this.tagBodyTop(),this.tagSectionRows().length));branchSlice=R(()=>{let t=this.branchWindow();return this.branchSectionRows().slice(t.start,t.end)});branchPadTop=R(()=>this.branchWindow().padTop);branchPadBottom=R(()=>this.branchWindow().padBottom);tagSlice=R(()=>{let t=this.tagWindow();return this.tagSectionRows().slice(t.start,t.end)});tagPadTop=R(()=>this.tagWindow().padTop);tagPadBottom=R(()=>this.tagWindow().padBottom);constructor(){ge(t=>{if(!this.loading()){this.showLoading.set(!1);return}let e=setTimeout(()=>this.zone.run(()=>this.showLoading.set(!0)),200);t(()=>clearTimeout(e))}),ge(t=>{let e=this.panelEl().nativeElement,i=()=>this.measureScroll(),r=new ResizeObserver(()=>this.zone.run(i));r.observe(e),e.addEventListener("scroll",i,{passive:!0}),t(()=>{r.disconnect(),e.removeEventListener("scroll",i)})}),Qs(()=>{this.branchesExpanded(),this.tagsExpanded(),this.filtering(),this.branchCount(),this.branchSectionRows().length,this.tagSectionRows().length,this.panelHeight(),ze(()=>this.measureOffsets())})}trackBranchItem(t,e){switch(e.type){case"loading":return"loading";case"all":return"all";case"label":return`label:${e.text}`;default:return`${e.group}:${e.row.kind}:${e.row.path}`}}trackTagItem(t,e){return e.type==="loading"?"loading":`${e.row.kind}:${e.row.path}`}measureScroll(){let t=this.panelEl().nativeElement;this.scrollTop.set(t.scrollTop),this.panelHeight.set(t.clientHeight)}measureOffsets(){let t=this.branchBodyEl(),e=this.tagBodyEl();t&&this.branchBodyTop.set(t.nativeElement.offsetTop),e&&this.tagBodyTop.set(e.nativeElement.offsetTop)}branchCount=R(()=>{if(!this.filtering())return this.branches().length;let t=i=>i.filter(r=>r.kind==="ref").length,e=t(this.localBranchRows());return this.showRemote()&&(e+=t(this.remoteBranchRows())),e});tagCount=R(()=>this.filtering()?this.tagRows().length:this.tags().length);filteredStashes=R(()=>{let t=this.stashes();return this.filtering()?t.filter(e=>this.matchesFilter(this.stashLabel(e))||this.matchesFilter(e.message)):t});stashCount=R(()=>this.filtering()?this.filteredStashes().length:this.stashes().length);filteredWorktrees=R(()=>{let t=this.worktrees();return this.filtering()?t.filter(e=>this.matchesFilter(this.worktreeLabel(e))||this.matchesFilter(e.branch??"")||this.matchesFilter(e.path)):t});worktreeCount=R(()=>this.filtering()?this.filteredWorktrees().length:this.worktrees().length);filteredPullRequests=R(()=>{let t=this.pullRequests();return t===null||!this.filtering()?t:t.filter(e=>this.matchesFilter(e.title)||this.matchesFilter(e.sourceBranch)||this.matchesFilter(e.targetBranch)||this.matchesFilter(e.author.name))});prCount=R(()=>this.filtering()?(this.filteredPullRequests()??[]).length:(this.pullRequests()??[]).length);toggleDir(t,e){(t==="local"?this.localDirsCollapsed:t==="remote"?this.remoteDirsCollapsed:this.tagDirsCollapsed).update(r=>{let o=new Set(r);return o.has(e)?o.delete(e):o.add(e),o})}selectionAnchor=null;branchOrder=R(()=>{let t=e=>e.filter(i=>i.kind==="ref").map(i=>i.ref.name);return[...t(this.localBranchRows()),...t(this.remoteBranchRows())]});selectBranch(t,e){let i=this.selectedBranches(),r=this.branchOrder(),o;if(e.shiftKey){let s=this.selectionAnchor??t,a=r.indexOf(s),l=r.indexOf(t);o=a===-1||l===-1?[t]:r.slice(Math.min(a,l),Math.max(a,l)+1)}else e.ctrlKey||e.metaKey?(o=i.includes(t)?i.filter(s=>s!==t):[...i,t],this.selectionAnchor=t):(o=i.length===1&&i[0]===t?[]:[t],this.selectionAnchor=t);this.branchChange.emit(o)}selectAllBranches(){this.selectionAnchor=null,this.branchChange.emit([])}selectTag(t){this.tagSelect.emit(t)}voteClass(t){switch(t.myVote){case 10:return"vote-approve";case 5:return"vote-suggestions";case-5:return"vote-waiting";case-10:return"vote-reject";default:return"vote-none"}}prTooltip(t){let e=t.reviewers.map(i=>`${i.name}${i.isRequired?" (required)":""}`).join(", ");return[`!${t.id} ${t.title}`,`By ${t.author.name}${t.isDraft?" \xB7 draft":""}`,`${t.sourceBranch} \u2192 ${t.targetBranch}`,e?`Reviewers: ${e}`:""].filter(Boolean).join(`
|
|
65
|
-
`)}badgeOf(t){return{type:t.current?"head":t.remote?"remote":"local",name:t.name}}onContextMenu(t,e){t.preventDefault(),this.contextMenu.emit({x:t.clientX,y:t.clientY,target:e})}openWorktree(t){t.bare||this.worktreeOpen.emit(t)}worktreeLabel(t){let e=t.path.split(/[\\/]/).filter(Boolean).pop()??t.path;return t.bare?`${e} (bare)`:t.detached?`${e} (detached)`:e}stashLabel(t){return`stash@{${t.index}}`}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-side-panel"]],viewQuery:function(e,i){e&1&&(st(i.panelEl,xA,5),st(i.branchBodyEl,yA,5),st(i.tagBodyEl,CA,5)),e&2&&Ot(3)},inputs:{branches:[1,"branches"],selectedBranches:[1,"selectedBranches"],showRemote:[1,"showRemote"],stashes:[1,"stashes"],worktrees:[1,"worktrees"],tags:[1,"tags"],refListView:[1,"refListView"],searchCaseSensitive:[1,"searchCaseSensitive"],sectionsExpandedByDefault:[1,"sectionsExpandedByDefault"],selectedCommitHash:[1,"selectedCommitHash"],loading:[1,"loading"],azureEnabled:[1,"azureEnabled"],pullRequests:[1,"pullRequests"],prError:[1,"prError"]},outputs:{branchChange:"branchChange",tagSelect:"tagSelect",stashSelect:"stashSelect",contextMenu:"contextMenu",worktreeCreate:"worktreeCreate",worktreeOpen:"worktreeOpen",prSelect:"prSelect",prRefresh:"prRefresh"},decls:59,vars:24,consts:[["panel",""],["branchBody",""],["tagBody",""],["aria-label","Repository panel",1,"side-panel"],[1,"panel-filter"],["role","search",1,"filter-field"],["viewBox","0 0 24 24","aria-hidden","true",1,"filter-icon"],["cx","11","cy","11","r","7"],["x1","16.25","y1","16.25","x2","21","y2","21"],["type","search","placeholder","Search","aria-label","Search branches, tags, stashes, worktrees and pull requests","autocomplete","off","spellcheck","false",1,"filter-input",3,"input","keydown.escape","value"],["type","button","title","Clear search","aria-label","Clear search",1,"filter-clear"],["type","button",1,"sections-toggle",3,"click","title","disabled"],["viewBox","0 0 24 24","aria-hidden","true"],[1,"tree"],["type","button",1,"tree-head",3,"click"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron"],["points","6 9 12 15 18 9"],["points","9 6 15 12 9 18"],[1,"tree-title"],[1,"tree-count"],[1,"tree-body"],[1,"tree-head-row"],["type","button","title","Create worktree","aria-label","Create worktree",1,"head-action",3,"click"],["x1","12","y1","5","x2","12","y2","19"],["x1","5","y1","12","x2","19","y2","12"],["type","button","title","Clear search","aria-label","Clear search",1,"filter-clear",3,"click"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],["points","7 11 12 6 17 11"],["points","7 18 12 13 17 18"],["points","7 6 12 11 17 6"],["points","7 13 12 18 17 13"],[1,"scroll-pad",3,"height"],[1,"empty"],[1,"scroll-pad"],["role","status",1,"empty","section-loading"],["type","button","title","Show commits from all branches",1,"row",3,"selected"],[1,"group-label"],["type","button","title","Show commits from all branches",1,"row",3,"click"],["viewBox","0 0 24 24","aria-hidden","true",1,"row-icon"],["x1","8","y1","6","x2","21","y2","6"],["x1","8","y1","12","x2","21","y2","12"],["x1","8","y1","18","x2","21","y2","18"],["cx","3.5","cy","6","r","1.5"],["cx","3.5","cy","12","r","1.5"],["cx","3.5","cy","18","r","1.5"],[1,"row-label"],["type","button",1,"row","dir-row",3,"paddingLeft","title"],["type","button",1,"row",3,"selected","paddingLeft","title"],["type","button",1,"row","dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"row-chevron"],["type","button",1,"row",3,"click","contextmenu","title"],["x1","6","y1","3","x2","6","y2","15"],["cx","18","cy","6","r","3"],["cx","6","cy","18","r","3"],["d","M18 9a9 9 0 0 1-9 9"],["title","Current branch",1,"row-tag"],["d","M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.83z"],["x1","7","y1","7","x2","7.01","y2","7"],["type","button",1,"row",3,"selected","title"],["d","M21 8v13H3V8M1 3h22v5H1z"],["x1","10","y1","12","x2","14","y2","12"],[1,"row-tag","stash-message"],["type","button",1,"row",3,"dblclick","contextmenu","title"],["d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"],[1,"row-tag"],["type","button","title","Refresh pull requests","aria-label","Refresh pull requests",1,"head-action",3,"click"],["points","23 4 23 10 17 10"],["d","M20.49 15a9 9 0 1 1-2.12-9.36L23 10"],["role","alert",1,"pr-error"],["type","button",1,"row","pr-row",3,"title"],["type","button",1,"row","pr-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"row-icon","vote-icon"],["points","20 6 9 17 4 12"],["cx","12","cy","12","r","8"],[1,"pr-main"],[1,"pr-line"],[1,"pr-title"],[1,"pr-badge","draft"],[1,"pr-badge","required"],[1,"pr-line","pr-meta"],["x1","20","y1","18","x2","20","y2","12"],["cx","12","cy","12","r","9"],["points","12 7 12 12 15 14"],["x1","5","y1","5","x2","19","y2","19"],["x1","19","y1","5","x2","5","y2","19"]],template:function(e,i){if(e&1){let r=I();b(0,"aside",3,0)(2,"div",4)(3,"div",5),B(),b(4,"svg",6),ee(5,"circle",7)(6,"line",8),y(),fe(),b(7,"input",9),F("input",function(s){return g(r),_(i.onFilterInput(s))})("keydown.escape",function(){return g(r),_(i.clearFilter())}),y(),E(8,SA,4,0,"button",10),y(),b(9,"button",11),F("click",function(){return g(r),_(i.toggleAllSections())}),B(),b(10,"svg",12),E(11,MA,2,0)(12,TA,2,0),y()()(),fe(),b(13,"section",13)(14,"button",14),F("click",function(){return g(r),_(i.branchesOpen.set(!i.branchesOpen()))}),B(),b(15,"svg",15),E(16,kA,1,0,":svg:polyline",16)(17,IA,1,0,":svg:polyline",17),y(),fe(),b(18,"span",18),f(19,"Branches"),y(),b(20,"span",19),f(21),y()(),E(22,UA,7,3,"div",20),y(),b(23,"section",13)(24,"button",14),F("click",function(){return g(r),_(i.tagsOpen.set(!i.tagsOpen()))}),B(),b(25,"svg",15),E(26,GA,1,0,":svg:polyline",16)(27,WA,1,0,":svg:polyline",17),y(),fe(),b(28,"span",18),f(29,"Tags"),y(),b(30,"span",19),f(31),y()(),E(32,nL,7,3,"div",20),y(),b(33,"section",13)(34,"button",14),F("click",function(){return g(r),_(i.stashesOpen.set(!i.stashesOpen()))}),B(),b(35,"svg",15),E(36,iL,1,0,":svg:polyline",16)(37,rL,1,0,":svg:polyline",17),y(),fe(),b(38,"span",18),f(39,"Stashes"),y(),b(40,"span",19),f(41),y()(),E(42,cL,5,2,"div",20),y(),b(43,"section",13)(44,"div",21)(45,"button",14),F("click",function(){return g(r),_(i.worktreesOpen.set(!i.worktreesOpen()))}),B(),b(46,"svg",15),E(47,dL,1,0,":svg:polyline",16)(48,uL,1,0,":svg:polyline",17),y(),fe(),b(49,"span",18),f(50,"Worktrees"),y(),b(51,"span",19),f(52),y()(),b(53,"button",22),F("click",function(){return g(r),_(i.worktreeCreate.emit())}),B(),b(54,"svg",12),ee(55,"line",23)(56,"line",24),y()()(),E(57,_L,5,2,"div",20),y(),E(58,RL,15,4,"section",13),y()}e&2&&(c(7),G("value",i.filter()),c(),D(i.filter()?8:-1),c(),G("title",i.filtering()?"Clear search to collapse or expand all sections":i.allSectionsOpen()?"Collapse all sections":"Expand all sections")("disabled",i.filtering()),K("aria-label",i.allSectionsOpen()?"Collapse all sections":"Expand all sections")("aria-expanded",i.allSectionsOpen()),c(2),D(i.allSectionsOpen()?11:12),c(3),K("aria-expanded",i.branchesExpanded()),c(2),D(i.branchesExpanded()?16:17),c(5),P(i.branchCount()),c(),D(i.branchesExpanded()?22:-1),c(2),K("aria-expanded",i.tagsExpanded()),c(2),D(i.tagsExpanded()?26:27),c(5),P(i.tagCount()),c(),D(i.tagsExpanded()?32:-1),c(2),K("aria-expanded",i.stashesExpanded()),c(2),D(i.stashesExpanded()?36:37),c(5),P(i.stashCount()),c(),D(i.stashesExpanded()?42:-1),c(3),K("aria-expanded",i.worktreesExpanded()),c(2),D(i.worktreesExpanded()?47:48),c(5),P(i.worktreeCount()),c(5),D(i.worktreesExpanded()?57:-1),c(),D(i.azureEnabled()?58:-1))},styles:["[_nghost-%COMP%]{--panel-width: 260px;display:block;position:relative;width:0;flex:none;min-height:0;overflow:hidden;background:var(--bg-alt);transition:width .15s cubic-bezier(.3,0,.8,.15)}[hidden][_nghost-%COMP%]{display:none}.side-panel[_ngcontent-%COMP%]{position:absolute;inset:0 0 0 auto;width:var(--panel-width);overflow-y:auto;border-right:1px solid var(--border)}.panel-open[_nghost-%COMP%]{width:var(--panel-width);transition-duration:.18s;transition-timing-function:cubic-bezier(.05,.7,.1,1)}@media(prefers-reduced-motion:reduce){[_nghost-%COMP%]{transition:none}}.tree[_ngcontent-%COMP%]{border-bottom:1px solid var(--border)}.panel-filter[_ngcontent-%COMP%]{position:sticky;top:0;z-index:2;display:flex;align-items:center;gap:6px;padding:7px 8px 8px;background:var(--bg-alt);border-bottom:1px solid var(--border)}.filter-field[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0;height:30px;border:1px solid var(--border);border-radius:5px;background:var(--bg);transition:border-color .12s ease,box-shadow .12s ease,background-color .12s ease}.filter-field[_ngcontent-%COMP%]:hover{border-color:var(--text-dim)}.filter-field[_ngcontent-%COMP%]:focus-within{border-color:var(--accent);box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 35%,transparent)}.filter-icon[_ngcontent-%COMP%]{width:14px;height:14px;margin-left:8px;fill:none;stroke:var(--text-dim);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none;pointer-events:none;transition:stroke .12s ease}.filter-field[_ngcontent-%COMP%]:focus-within .filter-icon[_ngcontent-%COMP%]{stroke:var(--text)}.filter-input[_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;flex:1;min-width:0;height:100%;padding:0 7px;border:0;outline:0;background:transparent;color:var(--text);font-size:12px}.filter-input[_ngcontent-%COMP%]::placeholder{color:var(--text-dim);opacity:.9}.filter-input[_ngcontent-%COMP%]::-webkit-search-cancel-button{display:none}.filter-clear[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;margin-right:3px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.filter-clear[_ngcontent-%COMP%]:hover{color:var(--text);background:var(--bg-hover)}.filter-clear[_ngcontent-%COMP%]:focus-visible{outline:1px solid var(--accent);outline-offset:-1px}.filter-clear[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.sections-toggle[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border:1px solid var(--border);border-radius:5px;background:var(--bg);color:var(--text-dim);cursor:pointer;flex:none;transition:color .12s ease,border-color .12s ease,background-color .12s ease}.sections-toggle[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--text);border-color:var(--text-dim);background:var(--bg-hover)}.sections-toggle[_ngcontent-%COMP%]:focus-visible{outline:1px solid var(--accent);outline-offset:1px}.sections-toggle[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:default}.sections-toggle[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.group-label[_ngcontent-%COMP%]{height:24px;box-sizing:border-box;padding:0 6px 0 22px;line-height:24px;color:var(--text-dim);font-size:10px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;-webkit-user-select:none;user-select:none}.tree-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;width:100%;height:26px;padding:0 6px;border:none;background:transparent;color:var(--text-bright);font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;cursor:pointer;-webkit-user-select:none;user-select:none}.tree-head[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.chevron[_ngcontent-%COMP%]{width:14px;height:14px;fill:none;stroke:var(--text-dim);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}.tree-title[_ngcontent-%COMP%]{flex:1;text-align:left}.tree-count[_ngcontent-%COMP%]{color:var(--text-dim);font-weight:400}.tree-body[_ngcontent-%COMP%]{padding:0 4px 6px}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;width:100%;height:24px;padding:0 6px 0 8px;border:none;border-left:2px solid transparent;border-radius:3px;background:transparent;color:var(--text);font-size:12px;text-align:left;cursor:pointer;min-width:0}.row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.row[_ngcontent-%COMP%]:focus-visible{outline:1px solid var(--accent)}.row.selected[_ngcontent-%COMP%]{border-left-color:var(--accent);background:#3794ff1f;color:var(--text-bright)}.row-icon[_ngcontent-%COMP%]{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none;opacity:.85}.row.dir-row[_ngcontent-%COMP%]{color:var(--text-bright)}.row[_ngcontent-%COMP%] .row-chevron[_ngcontent-%COMP%]{width:10px;height:10px;fill:none;stroke:var(--text-dim);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;flex:none}.row-label[_ngcontent-%COMP%]{flex:none;max-width:65%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.row-tag[_ngcontent-%COMP%]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-dim);font-size:11px}.row-tag.stash-message[_ngcontent-%COMP%]{direction:rtl;text-align:right}.empty[_ngcontent-%COMP%]{padding:4px 8px 2px 24px;color:var(--text-dim);font-size:12px;font-style:italic}.empty.section-loading[_ngcontent-%COMP%]{height:24px;box-sizing:border-box;padding:0 8px 0 24px;line-height:24px}.scroll-pad[_ngcontent-%COMP%]{width:100%}.tree-head-row[_ngcontent-%COMP%]{display:flex;align-items:center}.tree-head-row[_ngcontent-%COMP%] .tree-head[_ngcontent-%COMP%]{flex:1;min-width:0}.head-action[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:22px;height:22px;margin-right:4px;border:none;border-radius:3px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.head-action[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.head-action[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:12px;height:12px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.pr-row[_ngcontent-%COMP%]{height:auto;min-height:40px;align-items:flex-start;padding:5px 6px 5px 8px}.vote-icon[_ngcontent-%COMP%]{margin-top:2px;opacity:1}.vote-icon.vote-approve[_ngcontent-%COMP%], .vote-icon.vote-suggestions[_ngcontent-%COMP%]{stroke:#89d185}.vote-icon.vote-suggestions[_ngcontent-%COMP%] line[_ngcontent-%COMP%]{stroke-width:2.5}.vote-icon.vote-waiting[_ngcontent-%COMP%]{stroke:#dcb67a}.vote-icon.vote-reject[_ngcontent-%COMP%]{stroke:#f48771}.vote-icon.vote-none[_ngcontent-%COMP%]{stroke:var(--text-dim)}.pr-main[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.pr-line[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;min-width:0}.pr-title[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}.pr-row[_ngcontent-%COMP%]:hover .pr-title[_ngcontent-%COMP%]{color:var(--text-bright)}.pr-badge[_ngcontent-%COMP%]{flex:none;border-radius:3px;font-size:10px;font-weight:600;letter-spacing:.3px;padding:1px 4px;text-transform:uppercase}.pr-badge.draft[_ngcontent-%COMP%]{border:1px solid var(--border);color:var(--text-dim)}.pr-badge.required[_ngcontent-%COMP%]{background:#dcb67a2e;border:1px solid rgba(220,182,122,.5);color:#dcb67a}.pr-meta[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-dim);font-size:11px}.pr-error[_ngcontent-%COMP%]{margin:2px 6px 4px 10px;color:var(--red);font-size:11px;line-height:1.4;word-break:break-word}"],changeDetection:0})};function NL(n,t){n&1&&(u(0,"div",5),f(1,"Loading conflict\u2026"),p())}function AL(n,t){n&1&&(u(0,"p"),f(1,"Binary file"),p())}function LL(n,t){n&1&&(u(0,"p"),f(1,"File deleted"),p())}function FL(n,t){if(n&1&&(u(0,"pre"),f(1),p()),n&2){let e=d();c(),P(e.ours.content)}}function VL(n,t){n&1&&(u(0,"p"),f(1,"Binary file"),p())}function BL(n,t){n&1&&(u(0,"p"),f(1,"File deleted"),p())}function jL(n,t){if(n&1&&(u(0,"pre"),f(1),p()),n&2){let e=d();c(),P(e.theirs.content)}}function $L(n,t){if(n&1){let e=I();u(0,"div",15),f(1,"The resolved change will delete this file. "),u(2,"button",11),C("click",function(){g(e);let r=d(3);return _(r.deleted.set(!1))}),f(3,"Keep file"),p()()}}function HL(n,t){if(n&1){let e=I();u(0,"textarea",17),C("input",function(r){g(e);let o=d(3);return _(o.updateResult(r))}),p()}if(n&2){let e=d(3);S("value",e.result())}}function zL(n,t){if(n&1){let e=I();u(0,"div",9)(1,"div",13)(2,"h3"),f(3,"Result"),p(),u(4,"div",14)(5,"button",8),C("click",function(){g(e);let r=d(2);return _(r.useBoth())}),f(6,"Use both"),p(),u(7,"button",8),C("click",function(){g(e);let r=d(2);return _(r.deleted.set(!0))}),f(8,"Delete file"),p()()(),E(9,$L,4,0,"div",15)(10,HL,1,1,"textarea",16),p()}if(n&2){let e=d(2);c(5),S("disabled",e.saving()),c(2),S("disabled",e.saving()),c(2),D(e.deleted()?9:10)}}function UL(n,t){if(n&1&&j(0,"app-error-banner",10),n&2){let e=d(2);S("message",e.error())}}function GL(n,t){if(n&1){let e=I();u(0,"button",18),C("click",function(){g(e);let r=d(2);return _(r.resolve())}),f(1),p()}if(n&2){let e=d(2);S("disabled",e.saving()),c(),$(" ",e.saving()?"Saving\u2026":"Mark as resolved"," ")}}function WL(n,t){if(n&1){let e=I();u(0,"div",7)(1,"section")(2,"h3"),f(3,"Current (ours)"),p(),E(4,AL,2,0,"p")(5,LL,2,0,"p")(6,FL,2,1,"pre"),u(7,"button",8),C("click",function(){let r=g(e),o=d();return _(r.ours.binary?o.resolve("ours"):o.use("ours"))}),f(8),p()(),u(9,"section")(10,"h3"),f(11,"Incoming (theirs)"),p(),E(12,VL,2,0,"p")(13,BL,2,0,"p")(14,jL,2,1,"pre"),u(15,"button",8),C("click",function(){let r=g(e),o=d();return _(r.theirs.binary?o.resolve("theirs"):o.use("theirs"))}),f(16),p()()(),E(17,zL,11,3,"div",9),E(18,UL,1,1,"app-error-banner",10),u(19,"footer")(20,"button",11),C("click",function(){g(e);let r=d();return _(r.closed.emit())}),f(21,"Cancel"),p(),E(22,GL,2,2,"button",12),p()}if(n&2){let e=t,i=d();c(4),D(e.ours.binary?4:e.ours.content===null?5:6),c(3),S("disabled",i.saving()),c(),$(" ",e.ours.binary?"Resolve with current":"Use current"," "),c(4),D(e.theirs.binary?12:e.theirs.content===null?13:14),c(3),S("disabled",i.saving()),c(),$(" ",e.theirs.binary?"Resolve with incoming":"Use incoming"," "),c(),D(!e.ours.binary&&!e.theirs.binary?17:-1),c(),D(i.error()?18:-1),c(4),D(!e.ours.binary&&!e.theirs.binary?22:-1)}}function qL(n,t){if(n&1){let e=I();u(0,"app-error-banner",19),C("retry",function(){g(e);let r=d();return _(r.load())}),p()}if(n&2){let e=d();S("message",e.error())}}var Od=class n{git=O(et);path=N.required();resolved=W();closed=W();conflict=v(null);result=v("");deleted=v(!1);loading=v(!0);saving=v(!1);error=v("");ngOnInit(){this.load()}load(){this.loading.set(!0),this.error.set(""),this.git.getConflict(this.path()).subscribe({next:t=>{this.conflict.set(t),this.result.set(t.result.content??""),this.deleted.set(t.result.content===null&&!t.result.binary),this.loading.set(!1)},error:t=>{this.error.set(t?.error?.error||"Failed to load the merge conflict."),this.loading.set(!1)}})}use(t){let e=this.conflict()?.[t];!e||e.binary||(this.deleted.set(e.content===null),this.result.set(e.content??""))}useBoth(){let t=this.conflict();if(!t||t.ours.binary||t.theirs.binary)return;this.deleted.set(!1);let e=t.ours.content??"",i=t.theirs.content??"";this.result.set(e&&i&&!e.endsWith(`
|
|
66
|
-
`)?`${e}
|
|
67
|
-
${i}`:`${e}${i}`)}updateResult(t){this.deleted.set(!1),this.result.set(t.target.value)}resolve(t="content"){if(this.saving())return;this.saving.set(!0),this.error.set("");let e=this.deleted()?"delete":t;this.git.resolveConflict(this.path(),e,e==="content"?this.result():void 0).pipe(ci(()=>this.saving.set(!1))).subscribe({next:()=>this.resolved.emit(),error:i=>this.error.set(i?.error?.error||"Failed to save the conflict resolution.")})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-conflict-dialog"]],inputs:{path:[1,"path"]},outputs:{resolved:"resolved",closed:"closed"},decls:13,vars:3,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","conflict-title",1,"dialog"],["id","conflict-title"],[1,"path",3,"title"],["type","button","aria-label","Close conflict resolver",3,"click"],[1,"state"],["retryLabel","Retry",3,"message"],[1,"sources"],["type","button",3,"click","disabled"],[1,"result"],[3,"message"],["type","button",3,"click"],["type","button",1,"primary",3,"disabled"],[1,"result-head"],[1,"actions"],[1,"deleted"],["aria-label","Resolved file content","spellcheck","false",3,"value"],["aria-label","Resolved file content","spellcheck","false",3,"input","value"],["type","button",1,"primary",3,"click","disabled"],["retryLabel","Retry",3,"retry","message"]],template:function(e,i){if(e&1&&(u(0,"div",0),C("click",function(){return i.closed.emit()}),p(),u(1,"div",1)(2,"header")(3,"div")(4,"h2",2),f(5,"Resolve merge conflict"),p(),u(6,"div",3),f(7),p()(),u(8,"button",4),C("click",function(){return i.closed.emit()}),f(9,"\xD7"),p()(),E(10,NL,2,0,"div",5)(11,WL,23,9)(12,qL,1,1,"app-error-banner",6),p()),e&2){let r;c(6),S("title",i.path()),c(),P(i.path()),c(3),D(i.loading()?10:(r=i.conflict())?11:i.error()?12:-1,r)}},dependencies:[pt],styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;background:#00000094;z-index:210}.dialog[_ngcontent-%COMP%]{position:fixed;inset:4vh 4vw;z-index:211;display:flex;flex-direction:column;min-height:0;background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:8px;box-shadow:0 12px 48px #0009;overflow:hidden}header[_ngcontent-%COMP%], footer[_ngcontent-%COMP%], .result-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px}header[_ngcontent-%COMP%]{padding:10px 14px;background:var(--bg-alt);border-bottom:1px solid var(--border)}h2[_ngcontent-%COMP%], h3[_ngcontent-%COMP%]{margin:0}h2[_ngcontent-%COMP%]{font-size:15px}h3[_ngcontent-%COMP%]{font-size:12px}.path[_ngcontent-%COMP%]{margin-top:3px;font:12px var(--mono);color:var(--text-dim)}button[_ngcontent-%COMP%]{font:inherit;color:var(--text);border:1px solid var(--border);border-radius:3px;background:var(--bg);padding:5px 8px;cursor:pointer}button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover)}button[_ngcontent-%COMP%]:disabled{opacity:.5}.sources[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;min-height:0;height:38%;border-bottom:1px solid var(--border)}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0;min-height:0;padding:10px;gap:7px}section[_ngcontent-%COMP%] + section[_ngcontent-%COMP%]{border-left:1px solid var(--border)}pre[_ngcontent-%COMP%]{flex:1;min-height:0;overflow:auto;margin:0;padding:8px;white-space:pre;background:var(--bg-alt);border:1px solid var(--border);font:12px/1.5 var(--mono)}section[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .deleted[_ngcontent-%COMP%]{flex:1;margin:0;display:flex;align-items:center;justify-content:center;color:var(--text-dim);font-size:12px}.result[_ngcontent-%COMP%]{flex:1;min-height:0;display:flex;flex-direction:column;padding:10px;gap:7px}.actions[_ngcontent-%COMP%], footer[_ngcontent-%COMP%]{display:flex;gap:7px}textarea[_ngcontent-%COMP%]{flex:1;min-height:100px;resize:none;padding:8px;box-sizing:border-box;color:var(--text);background:var(--bg-alt);border:1px solid var(--border);border-radius:3px;font:12px/1.5 var(--mono);tab-size:2}.deleted[_ngcontent-%COMP%]{border:1px dashed var(--border);gap:10px}.state[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;justify-content:center;color:var(--text-dim)}footer[_ngcontent-%COMP%]{justify-content:flex-end;padding:10px 14px;border-top:1px solid var(--border);background:var(--bg-alt)}.primary[_ngcontent-%COMP%]{color:#fff;background:var(--accent)}@media(max-width:700px){.sources[_ngcontent-%COMP%]{grid-template-columns:1fr;height:45%;overflow:auto}section[_ngcontent-%COMP%] + section[_ngcontent-%COMP%]{border-left:0;border-top:1px solid var(--border)}}"],changeDetection:0})};var ZL=(n,t)=>t.path;function YL(n,t){if(n&1&&(u(0,"div",4),j(1,"span",14),f(2),p()),n&2){let e=d();c(2),P(e.statusLoading()?"Refreshing changes\u2026":"Updating repository\u2026")}}function QL(n,t){if(n&1){let e=I();u(0,"app-error-banner",25),C("retry",function(){g(e);let r=d();return _(r.retry.emit())}),p()}if(n&2){let e=d();S("message",e.statusError())("busy",e.statusLoading())}}function KL(n,t){if(n&1){let e=I();u(0,"button",29),C("click",function(){let r=g(e).$implicit,o=d(2);return _(o.openConflict(r))}),u(1,"span",30),f(2,"!"),p(),u(3,"span",31),f(4),p(),u(5,"span"),f(6,"Resolve"),p()()}if(n&2){let e=t.$implicit,i=d(2);S("disabled",i.disabled()),c(3),S("title",e),c(),P(e)}}function XL(n,t){if(n&1&&(u(0,"section",7)(1,"h3"),f(2),p(),u(3,"p",26),f(4,"Choose a file to resolve it before committing."),p(),u(5,"div",27),Z(6,KL,7,3,"button",28,Bt),p()()),n&2){let e=d();c(2),$("Merge conflicts (",e.changes().conflicted.length,")"),c(4),Y(e.changes().conflicted)}}function JL(n,t){if(n&1){let e=I();u(0,"button",36),C("click",function(){g(e);let r=d(2);return _(r.discardSelected())}),f(1,"Discard selected"),p(),u(2,"button",36),C("click",function(){g(e);let r=d(2);return _(r.discardAll())}),f(3,"Discard all"),p()}if(n&2){let e=d().$implicit,i=d();S("disabled",i.disabled()||!i.selected()[e].size),c(2),S("disabled",i.disabled()||!i.files(e).length)}}function eF(n,t){n&1&&(B(),j(0,"polyline",41))}function tF(n,t){n&1&&(B(),j(0,"polyline",42))}function nF(n,t){if(n&1){let e=I();u(0,"button",39),C("click",function(){g(e);let r=d().$implicit,o=d(2);return _(o.toggleDir(r.path))}),B(),u(1,"svg",40),E(2,eF,1,0,":svg:polyline",41)(3,tF,1,0,":svg:polyline",42),p(),fe(),u(4,"span",43),f(5),p(),u(6,"span",44)(7,"span",45),f(8),p(),u(9,"span",46),f(10),p()()()}if(n&2){let e=d().$implicit;se("padding-left",e.depth*14+8,"px"),S("title",e.path),K("aria-expanded",!e.collapsed)("aria-label","Directory "+e.path),c(2),D(e.collapsed?2:3),c(3),P(e.name),c(3),$("+",e.additions),c(2),$("\u2212",e.deletions)}}function iF(n,t){if(n&1){let e=I();u(0,"div",47),C("click",function(r){g(e);let o=d().$implicit,s=d().$implicit,a=d();return _(a.select(s,o.file.path,r))})("dblclick",function(){g(e);let r=d().$implicit,o=d().$implicit,s=d();return _(s.openDiff(o,r.file))})("contextmenu",function(r){g(e);let o=d().$implicit,s=d().$implicit,a=d();return _(a.openContextMenu(r,s,o.file))})("keydown",function(r){g(e);let o=d().$implicit,s=d().$implicit,a=d();return _(a.keySelect(s,o.file.path,r))}),u(1,"span",48),f(2),p(),u(3,"span",31),f(4),p(),u(5,"span",44)(6,"span",45),f(7),p(),u(8,"span",46),f(9),p()()()}if(n&2){let e=d().$implicit,i=d().$implicit,r=d();se("padding-left",e.depth*14+4,"px"),te("selected",r.selected()[i].has(e.file.path)),K("role",r.fileListView()==="tree"?"treeitem":"option")("aria-selected",r.selected()[i].has(e.file.path))("aria-label",e.file.path),c(),S("title",e.file.status),c(),P(e.file.status.slice(0,1).toUpperCase()),c(),S("title",e.file.oldPath&&e.file.oldPath!==e.file.path?e.file.oldPath+" \u2192 "+e.file.path:e.file.path),c(),P(e.name),c(3),$("+",e.file.additions),c(2),$("\u2212",e.file.deletions)}}function rF(n,t){if(n&1&&E(0,nF,11,9,"button",37)(1,iF,10,13,"div",38),n&2){let e=t.$implicit;D(e.kind==="dir"?0:1)}}function oF(n,t){if(n&1&&(u(0,"p",35),f(1),p()),n&2){let e=d().$implicit;c(),P(e==="staged"?"No staged changes.":"No unstaged changes.")}}function sF(n,t){if(n&1){let e=I();u(0,"section")(1,"h3"),f(2),p(),u(3,"div",32)(4,"span",33),f(5),p(),u(6,"button",3),C("click",function(){let r=g(e).$implicit,o=d();return _(o.moveSelected(r))}),f(7),p(),u(8,"button",3),C("click",function(){let r=g(e).$implicit,o=d();return _(o.moveAll(r))}),f(9),p(),E(10,JL,4,2),p(),u(11,"div",34),Z(12,rF,2,1,null,null,ZL,!1,oF,2,1,"p",35),p()()}if(n&2){let e=t.$implicit,i=d();K("aria-label",e==="staged"?"Staged changes":"Unstaged changes"),c(2),br("",e==="staged"?"Staged changes":"Unstaged changes"," (",i.files(e).length,")"),c(3),$("",i.selected()[e].size," selected"),c(),S("disabled",i.disabled()||!i.selected()[e].size),c(),P(e==="staged"?"Unstage selected":"Stage selected"),c(),S("disabled",i.disabled()||!i.files(e).length),c(),P(e==="staged"?"Unstage all":"Stage all"),c(),D(e==="unstaged"?10:-1),c(),K("role",i.fileListView()==="tree"?"tree":"listbox")("aria-label",e+" files"),c(),Y(i.rows(e))}}function aF(n,t){n&1&&(u(0,"p",9),f(1,"Resolve conflicts before committing."),p())}function lF(n,t){n&1&&j(0,"span",14)}function cF(n,t){n&1&&(B(),u(0,"svg",15),j(1,"path",49)(2,"path",50),p())}function dF(n,t){if(n&1&&(u(0,"span",19),f(1),p()),n&2){let e=d();c(),P(e.generateError())}}function uF(n,t){if(n&1){let e=I();u(0,"app-diff-dialog",51),C("closed",function(){g(e);let r=d();return _(r.dialog.set(null))}),p()}if(n&2){let e=t;S("file",e.file)("originalRef",e.originalRef)("modifiedRef",e.modifiedRef)("exactOriginal",e.exactOriginal)}}function pF(n,t){if(n&1){let e=I();u(0,"app-conflict-dialog",52),C("resolved",function(){g(e);let r=d();return _(r.onConflictResolved())})("closed",function(){g(e);let r=d();return _(r.selectedConflict.set(null))}),p()}n&2&&S("path",t)}var Rd=class n{vscode=O(sn);changes=N(null);branches=N.required();busy=N(!1);statusLoading=N(!1);statusError=N("");subject=N("");description=N("");fileListView=N("flat");subjectChange=W();descriptionChange=W();generateMessage=W();stageChange=W();stashChange=W();discardRequest=W();commitRequested=W();conflictResolved=W();retry=W();closed=W();groups=["staged","unstaged"];selected=v({staged:new Set,unstaged:new Set});anchors={staged:null,unstaged:null};dialog=v(null);comparePrompt=v(null);compareTarget=null;selectedConflict=v(null);contextMenu=v(null);contextMenuTarget=null;collapsed=v(new Set);disabled=R(()=>this.busy()||!!this.statusError()||!this.changes());generating=N(!1);generateError=N("");canGenerate=R(()=>!this.disabled()&&!this.generating()&&!!this.changes()?.files.length);canCommit=R(()=>!this.disabled()&&!!this.subject().trim()&&!!this.changes()?.staged.length&&!this.changes()?.conflicted.length);constructor(){ge(()=>{let t=this.changes();this.selected.update(e=>{let i=H({},e);for(let r of this.groups){let o=new Set((r==="staged"?t?.stagedFiles:t?.unstagedFiles)?.map(s=>s.path));i[r]=new Set([...e[r]].filter(s=>o.has(s))),this.anchors[r]&&!o.has(this.anchors[r])&&(this.anchors[r]=null)}return i}),this.dialog.set(null),this.closeContextMenu()})}files(t){return(t==="staged"?this.changes()?.stagedFiles:this.changes()?.unstagedFiles)??[]}rows(t){let e=this.files(t);return this.fileListView()!=="tree"?e.map(i=>({kind:"file",path:i.path,name:i.path,depth:0,file:i})):To(e,this.collapsed())}orderedPaths(t){return this.rows(t).filter(e=>e.kind==="file").map(e=>e.path)}toggleDir(t){this.collapsed.update(e=>{let i=new Set(e);return i.has(t)?i.delete(t):i.add(t),i})}openDiff(t,e){if(this.busy())return;let i=t==="staged"?"HEAD":"INDEX",r=t==="staged"?"INDEX":"WORKING";this.vscode.openDiff(e,i,r)||this.dialog.set({file:e,originalRef:i,modifiedRef:r,exactOriginal:!1})}comparisonBranches(){return this.branches().filter(t=>!t.current&&!t.name.endsWith("/HEAD"))}openBranchComparison(t,e){let i=this.comparisonBranches();this.busy()||!i.length||(this.compareTarget={file:e,group:t},this.comparePrompt.set({title:"Compare with Branch",label:`Select the branch version to compare with ${e.path}.`,okLabel:"Compare",searchable:!0,options:i.map(r=>({value:r.name,label:r.name,description:r.remote?"Remote branch":"Local branch"}))}))}compareWithBranch(t){let e=this.compareTarget;if(this.closeComparePrompt(),!e||!this.comparisonBranches().some(r=>r.name===t))return;let i=e.group==="staged"?"INDEX":"WORKING";this.vscode.openDiff(e.file,t,i,!0)||this.dialog.set({file:e.file,originalRef:t,modifiedRef:i,exactOriginal:!0})}closeComparePrompt(){this.comparePrompt.set(null),this.compareTarget=null}openContextMenu(t,e,i){t.preventDefault(),this.contextMenuTarget={file:i,group:e},this.contextMenu.set({x:t.clientX,y:t.clientY,items:[{label:"Open Diff",action:"open-diff",disabled:this.busy()},{label:"Compare with Branch...",action:"compare-branch",disabled:this.busy()||!this.comparisonBranches().length},{label:"Open File",action:"open-file",disabled:!this.vscode.canOpenFile()},{label:"Copy File Path",action:"copy-file-path"}]})}runContextAction(t){let e=this.contextMenuTarget;e&&(t==="open-diff"?this.openDiff(e.group,e.file):t==="compare-branch"?this.openBranchComparison(e.group,e.file):t==="open-file"?this.vscode.openFile(e.file.path):t==="copy-file-path"&&navigator.clipboard?.writeText(e.file.path))}closeContextMenu(){this.contextMenu.set(null),this.contextMenuTarget=null}select(t,e,i){let r=i.ctrlKey||i.metaKey,o=this.orderedPaths(t),s=this.anchors[t],a=i.shiftKey&&s!==null&&o.includes(s),l=r?new Set(this.selected()[t]):new Set;if(a){let h=o.indexOf(s),m=o.indexOf(e);for(let w of o.slice(Math.min(h,m),Math.max(h,m)+1))l.add(w)}else r&&l.has(e)?l.delete(e):l.add(e),this.anchors[t]=e;this.selected.update(h=>re(H({},h),{[t]:l}))}keySelect(t,e,i){if((i.key===" "||i.key==="Enter")&&(i.preventDefault(),this.select(t,e,i)),i.key==="ArrowDown"||i.key==="ArrowUp"){i.preventDefault();let r=Array.from(i.currentTarget.closest(".file-list").querySelectorAll(".file-row")),o=r.indexOf(i.currentTarget),s=Math.max(0,Math.min(r.length-1,o+(i.key==="ArrowDown"?1:-1)));r[s]?.focus(),i.shiftKey&&this.select(t,this.orderedPaths(t)[s],i)}}move(t,e){this.disabled()||!e.length||this.stageChange.emit({staged:t==="staged",files:e})}openConflict(t){this.disabled()||this.vscode.openMergeConflict(t)||this.selectedConflict.set(t)}onConflictResolved(){this.selectedConflict.set(null),this.conflictResolved.emit()}moveSelected(t){this.move(t,[...this.selected()[t]])}moveAll(t){this.move(t,this.files(t).map(e=>e.path))}stash(t){this.disabled()||this.stashChange.emit(t)}discard(t){this.disabled()||!t.length||this.discardRequest.emit(t)}discardSelected(){this.discard([...this.selected().unstaged])}discardAll(){this.discard(this.files("unstaged").map(t=>t.path))}updateSubject(t){this.subjectChange.emit(t.target.value)}updateDescription(t){this.descriptionChange.emit(t.target.value)}generate(){this.canGenerate()&&this.generateMessage.emit()}commit(t){t.preventDefault(),this.canCommit()&&this.commitRequested.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-working-panel"]],inputs:{changes:[1,"changes"],branches:[1,"branches"],busy:[1,"busy"],statusLoading:[1,"statusLoading"],statusError:[1,"statusError"],subject:[1,"subject"],description:[1,"description"],fileListView:[1,"fileListView"],generating:[1,"generating"],generateError:[1,"generateError"]},outputs:{subjectChange:"subjectChange",descriptionChange:"descriptionChange",generateMessage:"generateMessage",stageChange:"stageChange",stashChange:"stashChange",discardRequest:"discardRequest",commitRequested:"commitRequested",conflictResolved:"conflictResolved",retry:"retry",closed:"closed"},decls:40,vars:19,consts:[["aria-label","Uncommitted changes",1,"detail"],["type","button","aria-label","Close changes",3,"click"],["role","group","aria-label","Stash changes",1,"stash-actions"],["type","button",3,"click","disabled"],["role","status",1,"state"],["retryLabel","Retry status",3,"message","busy"],[1,"changes"],["aria-label","Merge conflicts",1,"conflicts"],[3,"submit"],[1,"error"],["for","commit-subject"],[1,"subject-wrap"],["id","commit-subject","placeholder","Summary of your changes","required","",3,"input","value","disabled"],["type","button","title","Generate message","aria-label","Generate message",1,"generate-button",3,"click","disabled"],[1,"spinner"],["viewBox","0 0 24 24","aria-hidden","true"],["for","commit-description"],[1,"optional"],["id","commit-description","rows","3",3,"input","value","disabled"],["role","alert",1,"generate-error"],["type","submit",1,"commit-button",3,"disabled"],[3,"file","originalRef","modifiedRef","exactOriginal"],[3,"select","closed","menu"],[3,"confirmed","cancelled","state"],[3,"path"],["retryLabel","Retry status",3,"retry","message","busy"],[1,"conflict-help"],[1,"file-list"],["type","button",1,"conflict-row",3,"disabled"],["type","button",1,"conflict-row",3,"click","disabled"],[1,"conflict-status"],[1,"file-path",3,"title"],[1,"actions"],["aria-live","polite",1,"selection-count"],["aria-multiselectable","true",1,"file-list"],[1,"empty"],["type","button",1,"danger",3,"click","disabled"],["type","button","role","treeitem",1,"dir-row",3,"title","paddingLeft"],["tabindex","0",1,"file-row",3,"selected","paddingLeft"],["type","button","role","treeitem",1,"dir-row",3,"click","title"],["viewBox","0 0 24 24","aria-hidden","true",1,"chevron"],["points","9 6 15 12 9 18"],["points","6 9 12 15 18 9"],[1,"dir-name"],[1,"counts"],[1,"additions"],[1,"deletions"],["tabindex","0",1,"file-row",3,"click","dblclick","contextmenu","keydown"],[1,"file-status",3,"title"],["d","M12 2c.8 5.5 4.5 9.2 10 10-5.5.8-9.2 4.5-10 10-.8-5.5-4.5-9.2-10-10 5.5-.8 9.2-4.5 10-10Z"],["d","M19 3v3M17.5 4.5h3"],[3,"closed","file","originalRef","modifiedRef","exactOriginal"],[3,"resolved","closed","path"]],template:function(e,i){if(e&1&&(u(0,"aside",0)(1,"header")(2,"h2"),f(3,"Uncommitted changes"),p(),u(4,"button",1),C("click",function(){return i.closed.emit()}),f(5,"\xD7"),p()(),u(6,"div",2)(7,"button",3),C("click",function(){return i.stash("all")}),f(8,"Stash all"),p(),u(9,"button",3),C("click",function(){return i.stash("staged")}),f(10,"Stash staged"),p(),u(11,"button",3),C("click",function(){return i.stash("unstaged")}),f(12,"Stash unstaged"),p()(),E(13,YL,3,1,"div",4),E(14,QL,1,2,"app-error-banner",5),u(15,"div",6),E(16,XL,8,1,"section",7),Z(17,sF,15,12,"section",null,Bt),p(),u(19,"form",8),C("submit",function(o){return i.commit(o)}),E(20,aF,2,0,"p",9),u(21,"label",10),f(22,"Commit message"),p(),u(23,"div",11)(24,"input",12),C("input",function(o){return i.updateSubject(o)}),p(),u(25,"button",13),C("click",function(){return i.generate()}),E(26,lF,1,0,"span",14)(27,cF,3,0,":svg:svg",15),p()(),u(28,"label",16),f(29,"Description "),u(30,"span",17),f(31,"(optional)"),p()(),u(32,"textarea",18),C("input",function(o){return i.updateDescription(o)}),p(),E(33,dF,2,1,"span",19),u(34,"button",20),f(35,"Commit staged changes"),p()()(),E(36,uF,1,4,"app-diff-dialog",21),u(37,"app-context-menu",22),C("select",function(o){return i.runContextAction(o)})("closed",function(){return i.closeContextMenu()}),p(),u(38,"app-prompt-dialog",23),C("confirmed",function(o){return i.compareWithBranch(o)})("cancelled",function(){return i.closeComparePrompt()}),p(),E(39,pF,1,1,"app-conflict-dialog",24)),e&2){let r,o,s,a;c(7),S("disabled",i.disabled()||!i.files("staged").length&&!i.files("unstaged").length),c(2),S("disabled",i.disabled()||!i.files("staged").length),c(2),S("disabled",i.disabled()||!i.files("unstaged").length),c(2),D(i.busy()?13:-1),c(),D(i.statusError()?14:-1),c(2),D(!((r=i.changes())==null||r.conflicted==null)&&r.conflicted.length?16:-1),c(),Y(i.groups),c(3),D(!((o=i.changes())==null||o.conflicted==null)&&o.conflicted.length?20:-1),c(4),S("value",i.subject())("disabled",i.busy()),c(),S("disabled",!i.canGenerate()),c(),D(i.generating()?26:27),c(6),S("value",i.description())("disabled",i.busy()),c(),D(i.generateError()?33:-1),c(),S("disabled",!i.canCommit()),c(2),D((s=i.dialog())?36:-1,s),c(),S("menu",i.contextMenu()),c(),S("state",i.comparePrompt()),c(),D((a=i.selectedConflict())?39:-1,a)}},dependencies:[pt,Oo,Od,Io,Fo],styles:["[_nghost-%COMP%]{--panel-width: max(320px, min(480px, 60vw));display:block;position:relative;flex:none;width:var(--panel-width);min-height:0;overflow:hidden}.detail[_ngcontent-%COMP%]{position:absolute;inset:0 auto 0 0;width:var(--panel-width);display:flex;flex-direction:column;min-height:0;background:var(--bg-alt);border-left:1px solid var(--border);color:var(--text)}@keyframes _ngcontent-%COMP%_panel-enter{0%{width:0}to{width:var(--panel-width)}}@keyframes _ngcontent-%COMP%_panel-leave{0%{width:var(--panel-width)}to{width:0}}.panel-enter[_nghost-%COMP%]{animation:_ngcontent-%COMP%_panel-enter .18s cubic-bezier(.05,.7,.1,1)}.panel-leave[_nghost-%COMP%]{animation:_ngcontent-%COMP%_panel-leave .15s cubic-bezier(.3,0,.8,.15) forwards}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:12px;gap:12px}h2[_ngcontent-%COMP%]{font-size:15px;margin:0}h3[_ngcontent-%COMP%]{font-size:13px;margin:0 0 8px}.stash-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;padding:0 12px 10px;flex-wrap:wrap;font-size:11px}button[_ngcontent-%COMP%], input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%]{font:inherit;color:var(--text);border:1px solid var(--border);border-radius:3px;background:var(--bg)}button[_ngcontent-%COMP%]{cursor:pointer;padding:4px 7px;white-space:nowrap}button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover)}button.danger[_ngcontent-%COMP%]{color:#f48771}button.danger[_ngcontent-%COMP%]:hover:not(:disabled){background:#5a1d1d}button[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:default}button[_ngcontent-%COMP%]:focus-visible, input[_ngcontent-%COMP%]:focus-visible, textarea[_ngcontent-%COMP%]:focus-visible, .file-row[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.changes[_ngcontent-%COMP%]{overflow-y:auto;flex:1;min-height:80px}section[_ngcontent-%COMP%]{padding:10px;border-top:1px solid var(--border)}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:5px;margin-bottom:6px;flex-wrap:wrap;font-size:11px}.selection-count[_ngcontent-%COMP%]{margin-right:auto;color:var(--text-dim)}.file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.conflicts[_ngcontent-%COMP%]{background:#f487710f}.conflict-help[_ngcontent-%COMP%]{margin:0 0 7px;color:var(--text-dim);font-size:12px}.conflict-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:7px;width:100%;border:0;background:transparent;text-align:left}.conflict-status[_ngcontent-%COMP%]{flex:none;color:#f48771;font-weight:700}.dir-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0;gap:7px;width:100%;padding:7px 8px;border:none;background:transparent;font-size:12px;text-align:left}.dir-row[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover)}.dir-row[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.dir-row[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{width:9px;height:9px;flex:none;fill:none;stroke:var(--text-dim);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.dir-name[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;font-weight:600}.file-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0;gap:7px;padding:7px 4px;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:12px}.file-row[_ngcontent-%COMP%]:hover{background:var(--bg-hover)}.file-row.selected[_ngcontent-%COMP%]{background:#04395e}.file-status[_ngcontent-%COMP%]{color:var(--accent);width:12px;flex:none}.file-path[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.counts[_ngcontent-%COMP%]{white-space:nowrap;font-size:11px}.additions[_ngcontent-%COMP%]{color:#89d185}.deletions[_ngcontent-%COMP%], .error[_ngcontent-%COMP%]{color:#f48771}.empty[_ngcontent-%COMP%], .optional[_ngcontent-%COMP%]{color:var(--text-dim);font-size:12px}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;padding:12px;border-top:1px solid var(--border);max-height:50%;overflow-y:auto}label[_ngcontent-%COMP%]{font-size:12px}input[_ngcontent-%COMP%], textarea[_ngcontent-%COMP%]{padding:7px;width:100%;box-sizing:border-box}textarea[_ngcontent-%COMP%]{resize:vertical;min-height:50px}.commit-button[_ngcontent-%COMP%]{background:var(--accent);color:#fff;padding:8px;margin-top:4px}.subject-wrap[_ngcontent-%COMP%]{position:relative}#commit-subject[_ngcontent-%COMP%]{padding-right:30px}.generate-button[_ngcontent-%COMP%]{position:absolute;top:50%;right:4px;transform:translateY(-50%);display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:0;border:none;background:transparent;color:var(--text-dim)}.generate-button[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.generate-button[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.generate-button[_ngcontent-%COMP%] .spinner[_ngcontent-%COMP%]{width:10px;height:10px;margin:0}.generate-error[_ngcontent-%COMP%]{color:#f48771;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.state[_ngcontent-%COMP%], .error[_ngcontent-%COMP%]{padding:8px 12px;font-size:12px}.state[_ngcontent-%COMP%]{display:flex;gap:8px;align-items:center}.spinner[_ngcontent-%COMP%]{width:12px;height:12px;border:2px solid var(--border);border-top-color:var(--accent);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner[_ngcontent-%COMP%]{animation:none}.panel-enter[_nghost-%COMP%], .panel-leave[_nghost-%COMP%]{animation:none}}"],changeDetection:0})};var fF=(n,t)=>t.name;function hF(n,t){if(n&1&&(b(0,"option",10),f(1),y()),n&2){let e=t.$implicit;G("value",e.name),c(),P(e.name)}}function mF(n,t){n&1&&(b(0,"p",11),f(1,"Every local branch is already checked out in a worktree."),y())}function gF(n,t){if(n&1&&(b(0,"p",12),f(1),y()),n&2){let e=d();c(),P(e.error())}}var Nd=class n{vscode=O(sn);branches=N.required();worktrees=N.required();busy=N(!1);error=N("");created=W();closed=W();path=v("");branch=v("");canBrowse=this.vscode.canPickFolder;availableBranches=R(()=>{let t=new Set(this.worktrees().map(e=>e.branch).filter(Boolean));return this.branches().filter(e=>!e.remote&&!t.has(e.name))});constructor(){ge(()=>{let t=this.availableBranches();t.some(e=>e.name===this.branch())||this.branch.set(t[0]?.name??"")})}onEscape(){this.busy()||this.closed.emit()}onPath(t){this.path.set(t.target.value)}onBranch(t){this.branch.set(t.target.value)}browse(){return Mn(this,null,function*(){let t=yield this.vscode.pickFolder();t&&this.path.set(t)})}submit(){let t=this.path().trim(),e=this.branch();t&&e&&!this.busy()&&this.created.emit({path:t,branch:e})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-worktree-dialog"]],hostBindings:function(e,i){e&1&&C("keydown.escape",function(){return i.onEscape()},qe)},inputs:{branches:[1,"branches"],worktrees:[1,"worktrees"],busy:[1,"busy"],error:[1,"error"]},outputs:{created:"created",closed:"closed"},decls:24,vars:11,consts:[[1,"backdrop",3,"click"],["role","dialog","aria-modal","true","aria-labelledby","worktree-title",1,"dialog",3,"submit"],["id","worktree-title",1,"title"],[1,"description"],["for","worktree-folder",1,"field-label"],[1,"folder-row"],["id","worktree-folder","type","text","autocomplete","off","placeholder","Absolute path to an empty or new folder",1,"input",3,"input","value","disabled"],["type","button",1,"btn",3,"click","disabled","title"],["for","worktree-branch",1,"field-label"],["id","worktree-branch",1,"input","select",3,"change","value","disabled"],[3,"value"],[1,"notice"],["role","alert",1,"error"],[1,"actions"],["type","button",1,"btn",3,"click","disabled"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(e,i){e&1&&(b(0,"div",0),F("click",function(){return i.closed.emit()}),y(),b(1,"form",1),F("submit",function(o){return o.preventDefault(),i.submit()}),b(2,"h3",2),f(3,"Create Worktree"),y(),b(4,"p",3),f(5,"Create a linked working folder from an available local branch."),y(),b(6,"label",4),f(7,"Folder"),y(),b(8,"div",5)(9,"input",6),F("input",function(o){return i.onPath(o)}),y(),b(10,"button",7),F("click",function(){return i.browse()}),f(11,"Browse..."),y()(),b(12,"label",8),f(13,"Branch"),y(),b(14,"select",9),F("change",function(o){return i.onBranch(o)}),Z(15,hF,2,2,"option",10,fF),y(),E(17,mF,2,0,"p",11),E(18,gF,2,1,"p",12),b(19,"div",13)(20,"button",14),F("click",function(){return i.closed.emit()}),f(21,"Cancel"),y(),b(22,"button",15),f(23),y()()()),e&2&&(c(9),G("value",i.path())("disabled",i.busy()),c(),G("disabled",i.busy()||!i.canBrowse)("title",i.canBrowse?"Browse for a folder":"Folder browsing is available in the VS Code extension"),c(4),G("value",i.branch())("disabled",i.busy()),c(),Y(i.availableBranches()),c(2),D(i.availableBranches().length===0?17:-1),c(),D(i.error()?18:-1),c(2),G("disabled",i.busy()),c(2),G("disabled",i.busy()||!i.path().trim()||!i.branch()),c(),$(" ",i.busy()?"Creating...":"Create Worktree"," "))},styles:[".backdrop[_ngcontent-%COMP%]{position:fixed;inset:0;z-index:400;background:#00000080}.dialog[_ngcontent-%COMP%]{position:fixed;top:50%;left:50%;z-index:401;width:min(500px,calc(100vw - 48px));transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:9px;padding:18px;border:1px solid var(--border);border-radius:8px;background:var(--bg-alt);box-shadow:0 10px 36px #0009}.title[_ngcontent-%COMP%]{margin:0;color:var(--text-bright);font-size:14px;font-weight:600}.description[_ngcontent-%COMP%], .notice[_ngcontent-%COMP%]{margin:0 0 4px;color:var(--text-dim);font-size:12px}.notice[_ngcontent-%COMP%]{color:#dcb67a}.error[_ngcontent-%COMP%]{margin:0;color:var(--red);font-size:12px;line-height:1.4}.field-label[_ngcontent-%COMP%]{color:var(--text);font-size:12px;font-weight:600}.folder-row[_ngcontent-%COMP%]{display:flex;gap:8px}.input[_ngcontent-%COMP%]{min-width:0;padding:7px 10px;border:1px solid var(--border);border-radius:4px;outline:none;background:var(--bg);color:var(--text);font:13px inherit}.folder-row[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{flex:1}.input[_ngcontent-%COMP%]:focus{border-color:var(--accent)}.select[_ngcontent-%COMP%]{width:100%}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:7px}.btn[_ngcontent-%COMP%]{padding:6px 14px;border:1px solid var(--border);border-radius:4px;background:transparent;color:var(--text);font:12px inherit;cursor:pointer}.btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--bg-hover);color:var(--text-bright)}.btn-primary[_ngcontent-%COMP%]{border-color:var(--accent);background:var(--accent);color:#fff}.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled){background:#2b7cd3}.btn[_ngcontent-%COMP%]:disabled, .input[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:default}"],changeDetection:0})};var _F=["searchInput"];function vF(n,t){if(n&1){let e=I();b(0,"button",10),F("click",function(){g(e);let r=d(2);return _(r.searchNavigate.emit("prev"))}),B(),b(1,"svg",2),ee(2,"polyline",11),y()(),fe(),b(3,"button",12),F("click",function(){g(e);let r=d(2);return _(r.searchNavigate.emit("next"))}),B(),b(4,"svg",2),ee(5,"polyline",13),y()()}if(n&2){let e=d(2);G("disabled",e.matchCount()===0),c(3),G("disabled",e.matchCount()===0)}}function bF(n,t){if(n&1){let e=I();E(0,vF,6,2),b(1,"button",6),F("click",function(){g(e);let r=d();return _(r.clearSearch())}),B(),b(2,"svg",2),ee(3,"line",7)(4,"line",8),y()(),fe(),b(5,"span",9),f(6),y()}if(n&2){let e=d();D(e.filterMode()?-1:0),c(6),P(e.badgeText())}}var xF=300,Ad=class n{matchIndex=N(-1);matchCount=N(0);filterMode=N(!1);searchChange=W();searchNavigate=W();searchValue=v("");badgeText=R(()=>{let t=this.matchCount(),e=t>99?"99+":String(t);return!this.filterMode()&&this.matchIndex()>=0?`${this.matchIndex()+1}/${e}`:e});searchInput=dt("searchInput");constructor(){Dr(this.searchValue).pipe(Eu(xF),is(),tt()).subscribe(t=>this.searchChange.emit(t))}onSearch(t){this.searchValue.set(t.target.value)}onSearchKeydown(t){t.key==="Enter"&&!this.filterMode()&&(t.preventDefault(),this.searchNavigate.emit(t.shiftKey?"prev":"next"))}clearSearch(){this.searchValue.set(""),this.searchInput()?.nativeElement.focus()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-search-box"]],viewQuery:function(e,i){e&1&&st(i.searchInput,_F,5),e&2&&Ot()},inputs:{matchIndex:[1,"matchIndex"],matchCount:[1,"matchCount"],filterMode:[1,"filterMode"]},outputs:{searchChange:"searchChange",searchNavigate:"searchNavigate"},decls:7,vars:2,consts:[["searchInput",""],[1,"search"],["viewBox","0 0 24 24","aria-hidden","true"],["cx","11","cy","11","r","8"],["x1","21","y1","21","x2","16.65","y2","16.65"],["type","text","placeholder","Search commits",3,"input","keydown","value"],["type","button","title","Clear search","aria-label","Clear search",1,"clear-btn",3,"click"],["x1","18","y1","6","x2","6","y2","18"],["x1","6","y1","6","x2","18","y2","18"],[1,"count-badge"],["type","button","title","Previous match (Shift+Enter)","aria-label","Previous match",1,"nav-btn",3,"click","disabled"],["points","18 15 12 9 6 15"],["type","button","title","Next match (Enter)","aria-label","Next match",1,"nav-btn",3,"click","disabled"],["points","6 9 12 15 18 9"]],template:function(e,i){if(e&1){let r=I();b(0,"div",1),B(),b(1,"svg",2),ee(2,"circle",3)(3,"line",4),y(),fe(),b(4,"input",5,0),F("input",function(s){return g(r),_(i.onSearch(s))})("keydown",function(s){return g(r),_(i.onSearchKeydown(s))}),y(),E(6,bF,7,2),y()}e&2&&(c(4),G("value",i.searchValue()),c(2),D(i.searchValue()?6:-1))},styles:["[_nghost-%COMP%]{display:flex;align-items:center;gap:8px}.search[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;gap:6px;height:26px;padding:0 8px;border:1px solid var(--border);border-radius:4px;background:#2d2d2d;color:var(--text-dim)}.search[_ngcontent-%COMP%]:focus-within{border-color:var(--accent)}.search[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:170px;border:none;outline:none;background:transparent;color:var(--text);font-size:12px}.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::placeholder{color:#777}@media(max-width:720px){.search[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100px}}.clear-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:3px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.clear-btn[_ngcontent-%COMP%]:hover{color:var(--text);background:#3a3a3a}.clear-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}.count-badge[_ngcontent-%COMP%]{position:absolute;z-index:1;top:-8px;right:-8px;min-width:14px;padding:1px 5px;border:1px solid color-mix(in srgb,var(--accent) 55%,var(--border));border-radius:999px;background:color-mix(in srgb,var(--accent) 25%,var(--bg-alt));color:var(--text-bright);font-size:10px;line-height:14px;text-align:center;white-space:nowrap;pointer-events:none;-webkit-user-select:none;user-select:none}.nav-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;padding:0;border:none;border-radius:3px;background:transparent;color:var(--text-dim);cursor:pointer;flex:none}.nav-btn[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--text-bright);background:#3a3a3a}.nav-btn[_ngcontent-%COMP%]:disabled{opacity:.4;cursor:default}.nav-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}"],changeDetection:0})};function yF(n,t){if(n&1){let e=I();u(0,"div",13)(1,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("fetch"))}),f(2,"Fetch"),p(),u(3,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("fetch-prune"))}),f(4," Fetch (prune) "),p()()}}function CF(n,t){if(n&1){let e=I();u(0,"div",13)(1,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("pull"))}),f(2,"Pull"),p(),u(3,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("pull-rebase"))}),f(4,"Pull (rebase)"),p(),u(5,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("rebase-from"))}),f(6,"Rebase (from)..."),p()()}}function wF(n,t){if(n&1){let e=I();u(0,"button",34),C("click",function(){g(e);let r=d(2);return _(r.chooseRemoteAction("create-pr"))}),f(1," Create Pull Request... "),p()}}function EF(n,t){if(n&1){let e=I();u(0,"div",13)(1,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("push"))}),f(2,"Push"),p(),u(3,"button",35),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("push-force"))}),f(4," Push (force) "),p(),u(5,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("sync"))}),f(6,"Sync"),p(),E(7,wF,2,0,"button",36),p()}if(n&2){let e=d();c(7),D(e.prEnabled()?7:-1)}}function DF(n,t){if(n&1){let e=I();u(0,"button",34),C("click",function(){g(e);let r=d(2);return _(r.chooseRemoteAction("create-pr"))}),f(1," Create Pull Request... "),p()}}function SF(n,t){if(n&1){let e=I();u(0,"div",33)(1,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("fetch"))}),f(2,"Fetch"),p(),u(3,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("fetch-prune"))}),f(4," Fetch (prune) "),p(),j(5,"div",37),u(6,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("pull"))}),f(7,"Pull"),p(),u(8,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("pull-rebase"))}),f(9," Pull (rebase) "),p(),u(10,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("rebase-from"))}),f(11," Rebase (from)... "),p(),j(12,"div",37),u(13,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("push"))}),f(14,"Push"),p(),u(15,"button",35),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("push-force"))}),f(16," Push (force) "),p(),u(17,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRemoteAction("sync"))}),f(18,"Sync"),p(),E(19,DF,2,0,"button",36),j(20,"div",37),u(21,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseRefresh())}),f(22,"Refresh"),p(),j(23,"div",37),u(24,"button",34),C("click",function(){g(e);let r=d();return _(r.chooseSettings())}),f(25,"Settings..."),p()()}if(n&2){let e=d();c(19),D(e.prEnabled()?19:-1)}}var Ld=class n{busy=N.required();prEnabled=N(!1);panelOpen=N(!1);matchIndex=N(-1);matchCount=N(0);filterMode=N(!1);menuToggle=W();refresh=W();remoteAction=W();settingsClick=W();searchChange=W();searchNavigate=W();openMenu=v(null);toggleMenu(t,e){e.stopPropagation(),this.openMenu.update(i=>i===t?null:t)}chooseRemoteAction(t){this.openMenu.set(null),this.remoteAction.emit(t)}chooseRefresh(){this.openMenu.set(null),this.refresh.emit()}chooseSettings(){this.openMenu.set(null),this.settingsClick.emit()}closeMenu(){this.openMenu.set(null)}closeMenuOnEscape(){this.openMenu.set(null)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-toolbar"]],hostBindings:function(e,i){e&1&&C("click",function(){return i.closeMenu()},qe)("keydown.escape",function(){return i.closeMenuOnEscape()},qe)},inputs:{busy:[1,"busy"],prEnabled:[1,"prEnabled"],panelOpen:[1,"panelOpen"],matchIndex:[1,"matchIndex"],matchCount:[1,"matchCount"],filterMode:[1,"filterMode"]},outputs:{menuToggle:"menuToggle",refresh:"refresh",remoteAction:"remoteAction",settingsClick:"settingsClick",searchChange:"searchChange",searchNavigate:"searchNavigate"},decls:46,vars:15,consts:[[1,"toolbar"],[1,"group"],["type","button","title","Toggle Branches, Stashes and Worktrees panel","aria-label","Toggle repository panel",1,"icon-btn",3,"click"],["viewBox","0 0 24 24","aria-hidden","true"],["x1","3","y1","6","x2","21","y2","6"],["x1","3","y1","12","x2","21","y2","12"],["x1","3","y1","18","x2","21","y2","18"],[1,"app-title"],[1,"group","actions"],[3,"searchChange","searchNavigate","matchIndex","matchCount","filterMode"],[1,"action-menu"],["title","Fetch",1,"icon-btn",3,"click","disabled"],["d","M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"],["role","menu",1,"remote-menu"],["title","Pull",1,"icon-btn",3,"click","disabled"],["cx","12","cy","12","r","10"],["points","8 12 12 16 16 12"],["x1","12","y1","8","x2","12","y2","16"],["title","Push",1,"icon-btn",3,"click","disabled"],["points","16 12 12 8 8 12"],["x1","12","y1","16","x2","12","y2","8"],["title","Refresh",1,"icon-btn",3,"click"],["points","23 4 23 10 17 10"],["points","1 20 1 14 7 14"],["d","M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"],["title","Settings","aria-label","Settings",1,"icon-btn",3,"click"],["cx","12","cy","12","r","3"],["d","M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"],[1,"overflow-anchor"],["type","button","title","More actions","aria-label","More actions","aria-haspopup","menu",1,"icon-btn","overflow-btn",3,"click"],["cx","5","cy","12","r","2.1"],["cx","12","cy","12","r","2.1"],["cx","19","cy","12","r","2.1"],["role","menu",1,"remote-menu","overflow-menu"],["type","button","role","menuitem",3,"click"],["type","button","role","menuitem",1,"danger",3,"click"],["type","button","role","menuitem"],[1,"menu-sep"]],template:function(e,i){e&1&&(u(0,"div",0)(1,"div",1)(2,"button",2),C("click",function(){return i.menuToggle.emit()}),B(),u(3,"svg",3),j(4,"line",4)(5,"line",5)(6,"line",6),p()(),fe(),u(7,"span",7),f(8,"Guito"),p()(),u(9,"div",8)(10,"app-search-box",9),C("searchChange",function(o){return i.searchChange.emit(o)})("searchNavigate",function(o){return i.searchNavigate.emit(o)}),p(),u(11,"div",10)(12,"button",11),C("click",function(o){return i.toggleMenu("fetch",o)}),B(),u(13,"svg",3),j(14,"path",12),p()(),E(15,yF,5,0,"div",13),p(),fe(),u(16,"div",10)(17,"button",14),C("click",function(o){return i.toggleMenu("pull",o)}),B(),u(18,"svg",3),j(19,"circle",15)(20,"polyline",16)(21,"line",17),p()(),E(22,CF,7,0,"div",13),p(),fe(),u(23,"div",10)(24,"button",18),C("click",function(o){return i.toggleMenu("push",o)}),B(),u(25,"svg",3),j(26,"circle",15)(27,"polyline",19)(28,"line",20),p()(),E(29,EF,8,1,"div",13),p(),fe(),u(30,"button",21),C("click",function(){return i.refresh.emit()}),B(),u(31,"svg",3),j(32,"polyline",22)(33,"polyline",23)(34,"path",24),p()(),fe(),u(35,"button",25),C("click",function(){return i.settingsClick.emit()}),B(),u(36,"svg",3),j(37,"circle",26)(38,"path",27),p()(),fe(),u(39,"div",28)(40,"button",29),C("click",function(o){return i.toggleMenu("overflow",o)}),B(),u(41,"svg",3),j(42,"circle",30)(43,"circle",31)(44,"circle",32),p()(),E(45,SF,26,1,"div",33),p()()()),e&2&&(c(2),K("aria-expanded",i.panelOpen()),c(8),S("matchIndex",i.matchIndex())("matchCount",i.matchCount())("filterMode",i.filterMode()),c(2),S("disabled",i.busy()),K("aria-expanded",i.openMenu()==="fetch"),c(3),D(i.openMenu()==="fetch"?15:-1),c(2),S("disabled",i.busy()),K("aria-expanded",i.openMenu()==="pull"),c(5),D(i.openMenu()==="pull"?22:-1),c(2),S("disabled",i.busy()),K("aria-expanded",i.openMenu()==="push"),c(5),D(i.openMenu()==="push"?29:-1),c(11),K("aria-expanded",i.openMenu()==="overflow"),c(5),D(i.openMenu()==="overflow"?45:-1))},dependencies:[Ad],styles:[".toolbar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;height:42px;padding:0 12px;background:var(--bg-alt);border-bottom:1px solid var(--border)}.group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;min-width:0}.icon-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:none;border-radius:4px;background:transparent;color:var(--text);cursor:pointer;flex:none}.action-menu[_ngcontent-%COMP%]{position:relative;display:inline-flex}.remote-menu[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 4px);right:0;z-index:20;min-width:132px;padding:4px;background:var(--bg-alt);border:1px solid var(--border);border-radius:4px;box-shadow:0 6px 18px #00000073}.remote-menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:block;width:100%;padding:6px 10px;border:none;border-radius:3px;background:transparent;color:var(--text);font:inherit;text-align:left;white-space:nowrap;cursor:pointer}.remote-menu[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.remote-menu[_ngcontent-%COMP%] button.danger[_ngcontent-%COMP%]{color:var(--red)}.remote-menu[_ngcontent-%COMP%] button.danger[_ngcontent-%COMP%]:hover{background:#f487711f;color:#f48771}.icon-btn[_ngcontent-%COMP%]:hover{background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:default}.icon-btn[aria-expanded=true][_ngcontent-%COMP%]{background:var(--bg-hover);color:var(--text-bright)}.icon-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.app-title[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--text-bright);letter-spacing:.2px;-webkit-user-select:none;user-select:none}.overflow-anchor[_ngcontent-%COMP%]{position:relative;display:inline-flex}.overflow-btn[_ngcontent-%COMP%]{display:none}.overflow-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{fill:currentColor;stroke:none}.menu-sep[_ngcontent-%COMP%]{height:1px;margin:4px 0;background:var(--border)}.overflow-menu[_ngcontent-%COMP%]{max-height:min(60vh,420px);overflow-y:auto}@media(max-width:640px){.actions[_ngcontent-%COMP%] > .action-menu[_ngcontent-%COMP%], .actions[_ngcontent-%COMP%] > button.icon-btn[_ngcontent-%COMP%]{display:none}.overflow-btn[_ngcontent-%COMP%]{display:inline-flex}}"],changeDetection:0})};var MF=n=>[n];function TF(n,t){if(n&1){let e=I();u(0,"app-error-banner",14),C("retry",function(){g(e);let r=d();return _(r.refresh())}),p()}if(n&2){let e=d();S("message",e.error())("busy",e.loading())}}function kF(n,t){if(n&1){let e=I();u(0,"app-error-banner",15),C("retry",function(){g(e);let r=d();return _(r.refreshWorking())}),p()}if(n&2){let e=d();S("message",e.statusError())("busy",e.statusLoading())}}function IF(n,t){if(n&1){let e=I();u(0,"app-side-panel",17),C("transitionend",function(r){g(e);let o=d(2);return _(o.onPanelTransitionEnd(r))})("transitioncancel",function(r){g(e);let o=d(2);return _(o.onPanelTransitionEnd(r))})("branchChange",function(r){g(e);let o=d(2);return _(o.selectedBranches.set(r))})("tagSelect",function(r){g(e);let o=d(2);return _(o.selectTag(r))})("stashSelect",function(r){g(e);let o=d(2);return _(o.selectStash(r))})("contextMenu",function(r){g(e);let o=d(2);return _(o.onContextMenu(r))})("worktreeCreate",function(){g(e);let r=d(2);return _(r.openWorktreeDialog())})("worktreeOpen",function(r){g(e);let o=d(2);return _(o.openWorktree(r))})("prSelect",function(r){g(e);let o=d(2);return _(o.openPrDetail(r))})("prRefresh",function(){g(e);let r=d(2);return _(r.loadPullRequests())}),p()}if(n&2){let e,i=d(2);te("panel-open",i.panelExpanded()),S("hidden",!i.panelRendered())("branches",i.branches())("selectedBranches",i.selectedBranches())("showRemote",i.showRemote())("stashes",i.stashes())("worktrees",i.worktrees())("tags",i.tags())("refListView",i.refListView())("sectionsExpandedByDefault",i.sidePanelSectionsExpanded())("searchCaseSensitive",i.searchCaseSensitive())("selectedCommitHash",((e=i.selectedCommit())==null?null:e.hash)??"")("loading",i.panelLoading())("azureEnabled",i.hasAzureUrl())("pullRequests",i.pullRequests())("prError",i.pullRequestsError())}}function PF(n,t){if(n&1&&Z(0,IF,1,17,"app-side-panel",16,Bt),n&2){let e=d();Y(Di(0,MF,e.panelRenderVersion()))}}function OF(n,t){if(n&1){let e=I();u(0,"app-working-panel",20),fr("panel-leave"),pr("panel-enter"),C("subjectChange",function(r){g(e);let o=d(2);return _(o.commitSubject.set(r))})("descriptionChange",function(r){g(e);let o=d(2);return _(o.commitDescription.set(r))})("generateMessage",function(){g(e);let r=d(2);return _(r.generateCommitMessage())})("stageChange",function(r){g(e);let o=d(2);return _(o.changeStage(r))})("stashChange",function(r){g(e);let o=d(2);return _(o.stashChanges(r))})("discardRequest",function(r){g(e);let o=d(2);return _(o.discardUnstaged(r))})("commitRequested",function(){g(e);let r=d(2);return _(r.commitChanges())})("conflictResolved",function(){g(e);let r=d(2);return _(r.refreshWorking())})("retry",function(){g(e);let r=d(2);return _(r.refreshWorking())})("closed",function(){g(e);let r=d(2);return _(r.selectedCommit.set(null))}),p()}if(n&2){let e=d(2);S("changes",e.workingChanges())("branches",e.branches())("busy",e.busy()||e.mutationBusy()||e.statusLoading())("statusLoading",e.statusLoading())("statusError",e.statusError())("subject",e.commitSubject())("description",e.commitDescription())("fileListView",e.fileListView())("generating",e.generatingMessage())("generateError",e.messageError())}}function RF(n,t){if(n&1){let e=I();u(0,"app-commit-detail",21),fr("panel-leave"),pr("panel-enter"),C("closed",function(){g(e);let r=d(2);return _(r.selectedCommit.set(null))}),p()}if(n&2){let e=d(),i=d();S("commit",e)("fileListView",i.fileListView())("issueLinking",i.issueLinking())}}function NF(n,t){if(n&1&&E(0,OF,1,10,"app-working-panel",18)(1,RF,1,3,"app-commit-detail",19),n&2){let e=d();D(t.hash===e.workingHash?0:1)}}function AF(n,t){if(n&1){let e=I();u(0,"app-git-operation-dialog",22),C("confirmed",function(r){g(e);let o=d();return _(o.onGitOperationConfirm(r))})("closed",function(){g(e);let r=d();return _(r.closeGitOperation())}),p()}if(n&2){let e=d();S("state",t)("busy",e.mutationBusy())("error",e.gitOperationError())}}function LF(n,t){if(n&1){let e=I();u(0,"app-worktree-dialog",23),C("created",function(r){g(e);let o=d();return _(o.createWorktree(r))})("closed",function(){g(e);let r=d();return _(r.worktreeDialogOpen.set(!1))}),p()}if(n&2){let e=d();S("branches",e.branches())("worktrees",e.worktrees())("busy",e.mutationBusy())("error",e.worktreeDialogError())}}function FF(n,t){if(n&1){let e=I();u(0,"app-create-pr-dialog",24),C("closed",function(){g(e);let r=d();return _(r.prDialogOpen.set(!1))})("created",function(){g(e);let r=d();return _(r.onPrCreated())}),p()}if(n&2){let e=d();S("branches",e.branches())}}function VF(n,t){if(n&1){let e=I();u(0,"app-pr-dialog",25),C("changed",function(){g(e);let r=d();return _(r.loadPullRequests())})("closed",function(){g(e);let r=d();return _(r.closePrDetail())}),p()}if(n&2){let e=d();S("prId",t)("settings",e.azureSettings())}}function BF(n,t){if(n&1){let e=I();u(0,"app-settings-dialog",26),C("saved",function(r){g(e);let o=d();return _(o.saveSettings(r))})("settingsUpdated",function(r){g(e);let o=d();return _(o.applySettings(r))})("identityChanged",function(r){g(e);let o=d();return _(o.identity.set(r))})("repositoryChanged",function(){g(e);let r=d();return _(r.refresh())})("closed",function(){g(e);let r=d();return _(r.settingsDialogOpen.set(!1))}),p()}if(n&2){let e=d();S("settings",t)("identity",e.identity())("saving",e.settingsSaving())}}var Ea=500,Hy="guito.commitDraft";function jF(){let n=pd(Hy,{});return{subject:typeof n.subject=="string"?n.subject:"",description:typeof n.description=="string"?n.description:""}}var Fd=class n{git=O(et);vscode=O(sn);workingHash=Cn;mutationBusy=this.git.mutating;statusLoading=v(!1);statusError=v("");commitDraft=jF();commitSubject=v(this.commitDraft.subject);commitDescription=v(this.commitDraft.description);generatingMessage=v(!1);messageError=v("");displayedCommits=v([]);searchLoading=v(!1);historyGeneration=v(0);filterFailed=v(!1);tableLoading=R(()=>this.loading()?"Refreshing commits...":this.searchLoading()||this.search().trim()&&this.historyLoading()?"Searching commits...":this.historyLoading()?"Loading history...":"");commits=v([]);branches=v([]);selectedBranches=v([]);showRemote=v(!0);search=v("");selectedCommit=v(null);loading=v(!1);busy=v(!1);error=v("");repoName=v("");identity=v({name:"",email:""});lastRepositoryState=null;stateSub=null;refreshTimer=window.setInterval(()=>this.checkRepository(),3e3);workingChanges=v(null);totalCommits=v(0);historyLoading=v(!1);contextMenuState=v(null);contextMenuTarget=v(null);promptState=v(null);gitOperationState=v(null);gitOperationError=v("");azureSettings=v(null);hasAzureUrl=R(()=>!!this.azureSettings()?.azureDevOpsUrl);autoReload=R(()=>this.azureSettings()?.autoReload!==!1);showGraph=R(()=>this.azureSettings()?.showGraph!==!1);showStashes=R(()=>this.azureSettings()?.showStashes===!0);showTags=R(()=>this.azureSettings()?.showTags!==!1);issueLinking=R(()=>this.azureSettings()?.issueLinking??null);fileListView=R(()=>this.azureSettings()?.fileListView==="tree"?"tree":"flat");refListView=R(()=>this.azureSettings()?.refListView==="tree"?"tree":"flat");sidePanelSectionsExpanded=R(()=>this.azureSettings()?.sidePanelSectionsExpanded!==!1);filterSearch=R(()=>this.azureSettings()?.searchMode==="filter");searchCaseSensitive=R(()=>this.azureSettings()?.searchCaseSensitive===!0);prDialogOpen=v(!1);settingsDialogOpen=v(!1);settingsSaving=v(!1);pendingDiscard=v(null);panelOpen=v(!1);panelInitialized=v(!1);panelRenderVersion=v(0);panelRendered=v(!1);panelExpanded=v(!1);panelOpenFrame=null;panelLoading=v(!1);stashes=v([]);worktrees=v([]);worktreeDialogOpen=v(!1);worktreeDialogError=v("");tags=v([]);pullRequests=v(null);pullRequestsError=v("");prDetailId=v(null);searchFocusHash=v("");pendingSearchHash=v("");scrollRequest=v(null);scrollRequestCounter=0;bodyMatches=v([]);searchHistoryIndices=v({});refreshSub=null;historySub=null;workingSub=null;searchSub=null;panelSub=null;prListSub=null;unloadedCommits=R(()=>Math.max(0,this.totalCommits()-this.commits().length));commitIndex=R(()=>{let t=new Map;for(let e of this.commits())t.set(e.hash,e);return t});filteredCommits=R(()=>{let t=this.commits(),e=this.selectedBranches(),i=this.branches().filter(s=>this.showRemote()||!s.remote),r=new Set(e),o=e.length?i.filter(s=>r.has(s.name)):i;if(o.length>0){let s=new Set;for(let a of o)for(let l of this.ancestorsOf(a.commit))s.add(l);t=t.filter(a=>s.has(a.hash))}else t=[];return t});searchMatches=R(()=>{let t=this.search().trim(),e=this.searchCaseSensitive(),i=Pi(t,e);if(!i)return[];let r=new Set(this.bodyMatches()),o=this.filteredCommits().filter(l=>Pi(l.message,e).includes(i)||Pi(l.author_name,e).includes(i)||Pi(l.hash,e).startsWith(i)||r.has(l.hash)).map(l=>l.hash),s=new Set(o),a=this.bodyMatches().filter(l=>!s.has(l));return[...o,...a]});searchIndex=R(()=>{let t=this.searchFocusHash();return t?this.searchMatches().indexOf(t):-1});constructor(){this.refresh(),ge(()=>{let t=this.search().trim();this.selectedBranches(),this.historyGeneration(),this.filterSearch();let e=this.searchCaseSensitive();ze(()=>{this.searchSub?.unsubscribe(),this.searchLoading.set(!1),this.bodyMatches.set([]),this.searchHistoryIndices.set({}),this.filterFailed.set(!1),this.error.set(""),this.searchFocusHash.set(""),this.pendingSearchHash.set(""),!this.loading()&&((this.selectedBranches().length||t&&this.filterSearch())&&this.unloadedCommits()>0&&this.loadAllCommits(),t&&this.fetchBodyMatches(t,e))})}),ge(()=>{if(!this.loading()&&!this.searchLoading()&&!this.historyLoading()&&!this.filterFailed()){let t=new Set(this.searchMatches());this.displayedCommits.set(this.filterSearch()&&this.search().trim()?this.filteredCommits().filter(e=>t.has(e.hash)):this.filteredCommits())}}),ge(()=>{let t=this.pendingSearchHash();if(!t||this.filterFailed())return;let e=this.displayedCommits().find(i=>i.hash===t);if(e)ze(()=>{this.selectedCommit.set(e),this.scrollRequestCounter+=1,this.scrollRequest.set({hash:t,id:this.scrollRequestCounter}),this.pendingSearchHash.set("")});else if(this.unloadedCommits()>0&&!this.historyLoading()&&!this.loading()){let i=this.searchHistoryIndices()[t],r=this.commits().length;if(i!==void 0&&i<r){this.pendingSearchHash.set("");return}let o=i===void 0?void 0:Math.ceil((i+1-r)/Ea)*Ea;ze(()=>this.loadHistory(this.git.getCommits(o,r)))}else!this.historyLoading()&&!this.loading()&&this.pendingSearchHash.set("")}),ge(()=>{fd(Hy,{subject:this.commitSubject(),description:this.commitDescription()})}),ge(()=>{this.vscode.settingsVersion()!==0&&ze(()=>{this.git.getSettings().subscribe({next:t=>this.applySettings(t),error:t=>this.error.set(this.errorMessage(t))})})})}ngOnDestroy(){window.clearInterval(this.refreshTimer),this.panelOpenFrame!==null&&window.cancelAnimationFrame(this.panelOpenFrame),this.stateSub?.unsubscribe(),this.refreshSub?.unsubscribe(),this.historySub?.unsubscribe(),this.workingSub?.unsubscribe(),this.searchSub?.unsubscribe(),this.panelSub?.unsubscribe(),this.prListSub?.unsubscribe()}checkRepository(){!this.autoReload()||document.hidden||this.loading()||this.historyLoading()||this.statusLoading()||this.busy()||this.mutationBusy()||this.stateSub&&!this.stateSub.closed||(this.stateSub=this.git.getRepositoryState().subscribe({next:t=>{if(this.loading()||this.historyLoading()||this.statusLoading()||this.busy()||this.mutationBusy())return;let e=this.lastRepositoryState;this.lastRepositoryState=t,!e||e.history!==t.history?this.refresh(!0):e.working!==t.working&&this.refreshWorking()},error:()=>{}}))}toggleSidePanel(){let t=!this.panelOpen();if(this.panelOpen.set(t),t){this.panelInitialized.set(!0);let e=this.panelRendered();if(this.panelRendered.set(!0),e)this.panelExpanded.set(!0);else if(this.panelAnimationsEnabled()){let i=()=>{if(this.panelOpenFrame=null,!this.panelOpen()||!this.panelRendered())return;let r=document.querySelector("app-side-panel");if(!r||r.hidden){this.panelOpenFrame=window.requestAnimationFrame(i);return}r.offsetWidth,this.panelExpanded.set(!0)};this.panelOpenFrame=window.requestAnimationFrame(i)}else this.panelExpanded.set(!0);this.loadSidePanelData()}else if(this.panelInitialized()){this.panelOpenFrame!==null&&(window.cancelAnimationFrame(this.panelOpenFrame),this.panelOpenFrame=null);let e=this.panelExpanded();this.panelExpanded.set(!1),(!e||!this.panelAnimationsEnabled())&&this.panelRendered.set(!1)}}onPanelTransitionEnd(t){t.target!==t.currentTarget||t.propertyName!=="width"||this.panelOpen()||this.panelRendered.set(!1)}panelAnimationsEnabled(){return typeof matchMedia>"u"||!matchMedia("(prefers-reduced-motion: reduce)").matches}loadSidePanelData(){this.panelSub?.unsubscribe(),this.panelLoading.set(!0),this.panelSub=fl({stashes:this.git.getStashes(),worktrees:this.git.getWorktrees(),tags:this.git.getTags().pipe(ct(()=>Ee([])))}).subscribe({next:({stashes:t,worktrees:e,tags:i})=>{this.stashes.set(t),this.worktrees.set(e),this.tags.set(i),this.panelLoading.set(!1)},error:t=>{this.panelLoading.set(!1),this.error.set(this.errorMessage(t))}}),this.loadPullRequests()}loadPullRequests(){if(!this.hasAzureUrl()){this.pullRequests.set(null),this.pullRequestsError.set("");return}this.prListSub?.unsubscribe(),this.prListSub=this.git.getMyPullRequests().subscribe({next:t=>{this.pullRequests.set(t),this.pullRequestsError.set("")},error:t=>{this.pullRequests()===null&&this.pullRequests.set([]),this.pullRequestsError.set(this.errorMessage(t))}})}openPrDetail(t){this.prDetailId.set(t)}closePrDetail(){this.prDetailId.set(null),this.loadPullRequests()}refresh(t=!1){this.historySub?.unsubscribe(),this.workingSub?.unsubscribe(),this.searchSub?.unsubscribe(),this.searchLoading.set(!1),this.filterFailed.set(!1),this.statusLoading.set(!0),this.historyLoading.set(!1),this.loading.set(!0),this.error.set(""),this.refreshSub?.unsubscribe(),this.refreshSub=fl({history:this.git.getCommits(t?Math.max(Ea,this.commits().length):Ea),repositoryState:this.git.getRepositoryState().pipe(ct(()=>Ee(null))),branches:this.git.getAllBranches(),repo:this.git.getRepoInfo(),settings:this.git.getSettings().pipe(ct(()=>Ee(null))),stashes:this.git.getStashes().pipe(ct(()=>Ee([]))),working:this.git.getWorkingChanges().pipe(ct(e=>(this.lastRepositoryState=null,this.statusError.set(this.errorMessage(e)),Ee(null))))}).subscribe({next:({history:e,repositoryState:i,branches:r,repo:o,settings:s,stashes:a,working:l})=>{this.commits.set(e.commits),this.totalCommits.set(Math.max(e.total,e.commits.length)),i&&(this.lastRepositoryState=i),this.branches.set(r),this.repoName.set(o.name),this.identity.set(o.identity??{name:"",email:""}),this.stashes.set(a);let h=this.selectedBranches();if(h.length){let w=new Set(r.map(T=>T.name)),M=h.filter(T=>w.has(T));M.length!==h.length&&this.selectedBranches.set(M)}let m=this.selectedCommit();if(m&&m.hash!==Cn){let w=e.commits.find(M=>M.hash===m.hash);w&&this.selectedCommit.set(H(H({},m),w))}s&&this.applySettings(s,!1),l&&(this.workingChanges.set(l),this.statusError.set("")),this.statusLoading.set(!1),this.loading.set(!1),this.historyGeneration.update(w=>w+1),this.panelOpen()&&this.loadSidePanelData()},error:e=>{this.lastRepositoryState=null,this.error.set(this.errorMessage(e)),this.filterFailed.set(!0),this.statusError.set(this.errorMessage(e)),this.statusLoading.set(!1),this.loading.set(!1)}})}refreshWorking(){this.workingSub?.unsubscribe(),this.statusLoading.set(!0),this.workingSub=this.git.getWorkingChanges().subscribe({next:t=>{this.workingChanges.set(t),this.statusError.set(""),this.statusLoading.set(!1)},error:t=>{this.lastRepositoryState=null,this.statusError.set(this.errorMessage(t)),this.statusLoading.set(!1)}})}changeStage(t){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||(this.busy.set(!0),this.error.set(""),(t.staged?this.git.unstage(t.files):this.git.stage(t.files)).subscribe({next:()=>{this.refreshWorking(),this.busy.set(!1)},error:e=>{this.error.set(this.errorMessage(e)),this.refreshWorking(),this.busy.set(!1)}}))}stashChanges(t){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||this.openGitOperation({action:"stash-save",stashScope:t,currentBranch:this.currentBranchName()})}discardUnstaged(t){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||t.length&&(this.pendingDiscard.set(t),this.promptState.set({title:"Discard unstaged changes?",label:t.length===1?`${t[0]} will be discarded. This cannot be undone.`:`${t.length} files will be discarded. This cannot be undone.`,confirmOnly:!0,okLabel:"Discard",danger:!0}))}onPromptCancel(){this.pendingDiscard.set(null),this.promptState.set(null)}commitChanges(){this.busy()||this.mutationBusy()||this.statusLoading()||this.statusError()||!this.commitSubject().trim()||!this.workingChanges()?.staged.length||this.workingChanges()?.conflicted.length||(this.busy.set(!0),this.error.set(""),this.git.commit(this.commitSubject(),this.commitDescription()).subscribe({next:()=>{this.commitSubject.set(""),this.commitDescription.set(""),this.refresh(),this.busy.set(!1)},error:t=>{this.error.set(this.errorMessage(t)),this.refreshWorking(),this.busy.set(!1)}}))}generateCommitMessage(){this.generatingMessage()||this.busy()||this.mutationBusy()||(this.generatingMessage.set(!0),this.messageError.set(""),this.git.generateCommitMessage().subscribe({next:t=>{this.commitSubject.set(t.subject),this.commitDescription.set(t.description),this.generatingMessage.set(!1)},error:t=>{this.messageError.set(this.errorMessage(t)),this.generatingMessage.set(!1)}}))}loadMoreCommits(){this.loadHistory(this.git.getCommits(Ea,this.commits().length))}loadAllCommits(){this.loadHistory(this.git.getCommits(void 0,this.commits().length))}loadHistory(t){if(this.historyLoading()||this.loading())return;let e=this.commits().length;this.filterFailed.set(!1),this.historyLoading.set(!0),this.historySub?.unsubscribe(),this.historySub=t.subscribe({next:({commits:i,total:r})=>{this.commits().length===e&&(this.commits.update(o=>[...o,...i]),this.totalCommits.set(i.length>0?Math.max(r,this.commits().length):this.commits().length)),this.historyLoading.set(!1)},error:i=>{this.error.set(this.errorMessage(i)),this.filterFailed.set(!0),this.historyLoading.set(!1)}})}fetchBodyMatches(t,e){this.searchSub?.unsubscribe(),this.searchLoading.set(!0),this.searchSub=this.git.searchCommits(t,e).subscribe({next:i=>{this.bodyMatches.set(i.hashes),this.searchHistoryIndices.set(i.indices??{}),this.searchLoading.set(!1)},error:i=>{this.filterFailed.set(!0),this.error.set(this.errorMessage(i)),this.searchLoading.set(!1)}})}navigateSearch(t){let e=this.searchMatches();if(e.length===0)return;let i=this.searchIndex(),r=i<0?t==="next"?0:e.length-1:t==="next"?(i+1)%e.length:(i-1+e.length)%e.length,o=e[r];this.searchFocusHash.set(o),this.pendingSearchHash.set(o)}runRemoteAction(t){if(this.busy()||this.mutationBusy()||this.statusLoading())return;if(t==="rebase-from"){this.openRebaseFromDialog();return}if(t==="create-pr"){this.prDialogOpen.set(!0);return}if(t==="push-force"){this.promptState.set({title:"Force push?",label:"This will overwrite the remote branch with your local history. Remote commits missing locally may be lost.",confirmOnly:!0,okLabel:"Force Push",danger:!0});return}this.busy.set(!0),this.error.set(""),(t==="fetch"||t==="fetch-prune"?this.git.fetch(t==="fetch-prune"):t==="pull"?this.git.pull():t==="pull-rebase"?this.git.pull({mode:"rebase"}):t==="push"?this.git.push():this.git.sync()).subscribe({next:()=>{this.busy.set(!1),this.refresh()},error:i=>{this.busy.set(!1),this.error.set(this.errorMessage(i))}})}openRebaseFromDialog(){let t=new Set(this.branches().map(r=>r.name)),e=["origin/main","origin/master"].filter(r=>t.has(r));e.forEach(r=>t.delete(r));let i=[...e,...t];i.length===0&&i.push("origin/main","origin/master"),this.promptState.set({title:"Rebase from branch",label:"Rebase the current branch onto:",options:i.map(r=>({value:r,label:r})),okLabel:"Rebase",searchable:!0})}openSettings(){this.vscode.openSettings()||this.settingsDialogOpen.set(!0)}saveSettings(t){this.settingsSaving.set(!0),this.git.saveSettings(t).subscribe({next:e=>{this.applySettings(e),this.settingsSaving.set(!1),this.settingsDialogOpen.set(!1)},error:e=>{this.settingsSaving.set(!1),this.error.set(this.errorMessage(e))}})}applySettings(t,e=!0){let i=this.azureSettings(),r=i?.refListView==="tree"?"tree":"flat",o=t.refListView==="tree"?"tree":"flat",s=i?.sidePanelSectionsExpanded!==!1,a=t.sidePanelSectionsExpanded!==!1;this.azureSettings.set(t),this.showRemote.set(t.showRemoteBranches!==!1),e&&i!==null&&(r!==o||s!==a)&&(this.panelInitialized()&&this.panelRenderVersion.update(l=>l+1),this.panelOpen()&&this.loadSidePanelData())}onPrCreated(){this.refresh()}onContextMenu(t){if(t.target.kind==="tag"&&!t.target.commit){let i=this.taggedCommit(t.target.branch?.name??"");i&&(t.target=re(H({},t.target),{commit:i}))}let e=[];if(t.target.kind==="commit")e.push({label:"Add Tag...",action:"add-tag"}),e.push({label:"Create Branch...",action:"create-branch"}),e.push({separator:!0}),e.push({label:"Checkout...",action:"checkout-commit"}),e.push({label:"Cherry Pick...",action:"cherry-pick"}),e.push({label:"Revert...",action:"revert-commit",danger:!0}),e.push({label:"Drop...",action:"drop-commit",danger:!0}),e.push({separator:!0}),e.push({label:"Merge into current branch...",action:"merge-commit"}),e.push({label:"Rebase current branch on this Commit...",action:"rebase-commit"}),e.push({label:"Reset current branch to this Commit...",action:"reset-commit",danger:!0}),e.push({separator:!0}),e.push({label:"Copy Commit Hash to Clipboard",action:"copy-hash"}),e.push({label:"Copy Commit Subject to Clipboard",action:"copy-subject"});else if(t.target.kind==="tag")e.push({label:"View Details",action:"tag-details"}),e.push({separator:!0}),e.push({label:"Delete Tag...",action:"tag-delete",danger:!0}),e.push({label:"Push Tag...",action:"tag-push"}),e.push({separator:!0}),e.push({label:"Create Archive",action:"create-archive"}),e.push({label:"Copy Tag Name to Clipboard",action:"copy-tag-name"});else if(t.target.kind==="branch"){let i=t.target.branch.type,r=i==="head"||i==="local",o=i==="remote";e.push({label:"Checkout Branch...",action:"checkout-branch"}),r&&(e.push({label:"Rename Branch...",action:"rename-branch"}),e.push({label:"Delete Branch...",action:"delete-branch",danger:!0,disabled:i==="head"})),o&&e.push({label:"Delete Remote Branch...",action:"delete-remote-branch",danger:!0}),e.push({label:"Merge into current branch...",action:"merge-branch"}),o&&e.push({label:"Pull into current branch...",action:"pull-branch"}),e.push({separator:!0}),e.push({label:"Create Archive",action:"create-archive"}),e.push({label:"Unselect in Branches Dropdown",action:"unselect-branch"}),e.push({separator:!0}),e.push({label:"Copy Branch Name to Clipboard",action:"copy-branch-name"})}else t.target.kind==="stash"?(e.push({label:"Apply Stash...",action:"stash-apply"}),e.push({label:"Pop Stash...",action:"stash-pop"}),e.push({separator:!0}),e.push({label:"Drop Stash...",action:"stash-drop",danger:!0}),e.push({separator:!0}),e.push({label:"Copy Stash Name to Clipboard",action:"copy-stash-name"})):t.target.kind==="worktree"?(e.push({label:"Switch Current Tab",action:"switch-worktree",disabled:t.target.worktree?.current||t.target.worktree?.bare||!this.vscode.canOpenRepository()}),e.push({label:"Open as New Tab",action:"open-worktree-tab",disabled:t.target.worktree?.bare||!this.vscode.canOpenRepository()}),e.push({label:"Open in New VS Code Window",action:"open-worktree-window",disabled:t.target.worktree?.bare||!this.vscode.canOpenRepository()}),e.push({separator:!0}),e.push({label:"Delete Worktree...",action:"delete-worktree",danger:!0,disabled:t.target.worktree?.current||t.target.worktree?.bare}),e.push({separator:!0}),e.push({label:"Copy Worktree Path to Clipboard",action:"copy-worktree-path"})):(e.push({label:"Stash uncommitted changes...",action:"stash-working"}),e.push({label:"Reset uncommitted changes...",action:"reset-working",danger:!0}),e.push({label:"Clean untracked files...",action:"clean-untracked",danger:!0}),e.push({separator:!0}),e.push({label:"Open Source Control View",action:"open-source-control"}));this.contextMenuTarget.set(t.target),this.contextMenuState.set({x:t.x,y:t.y,items:e})}taggedCommit(t){if(!t)return;let e=this.tags().find(i=>i.name===t);return e?this.commitIndex().get(e.hash):void 0}selectTag(t){this.pendingSearchHash.set(t.hash)}selectStash(t){this.selectedCommit.set({hash:t.hash,date:t.date??"",message:t.message,refs:"",author_name:t.author_name??"",author_email:t.author_email??"",parents:[]})}openWorktreeDialog(){this.worktreeDialogError.set(""),this.worktreeDialogOpen.set(!0)}currentBranchName(){return this.branches().find(t=>t.current)?.name??""}openGitOperation(t){this.gitOperationError.set(""),this.gitOperationState.set(t)}closeGitOperation(){this.mutationBusy()||(this.gitOperationState.set(null),this.gitOperationError.set(""))}onGitOperationConfirm(t){if(this.busy()||this.mutationBusy()||this.statusLoading())return;this.gitOperationError.set("");let e=r=>{this.gitOperationState.set(null),r?.warnings?.length&&this.error.set(r.warnings.join(" ")),this.refresh()},i=r=>{this.gitOperationError.set(this.errorMessage(r)),this.refreshWorking()};switch(t.action){case"add-tag":this.git.createTag(re(H(re(H({name:t.name},t.commit?{commit:t.commit}:{}),{annotate:t.annotate}),t.annotate?{message:t.message}:{}),{push:t.push,remote:t.remote})).subscribe({next:e,error:i});return;case"create-branch":this.git.createBranch(re(H({name:t.name},t.commit?{startPoint:t.commit}:{}),{checkout:t.checkout,publish:t.publish,remote:t.remote})).subscribe({next:e,error:i});return;case"checkout-commit":this.git.checkoutRef(H({ref:t.hash},t.mode==="branch"?{newBranch:t.branchName,publish:t.publish,remote:t.remote}:{detach:!0})).subscribe({next:e,error:i});return;case"checkout-branch":t.isRemote?this.git.checkoutRef(t.mode==="track"?{ref:t.branch,newBranch:t.branchName,track:!0}:{ref:t.branch,detach:!0}).subscribe({next:e,error:i}):this.git.checkoutRef({ref:t.branch}).subscribe({next:e,error:i});return;case"cherry-pick":this.git.cherryPick(H({commit:t.hash,noCommit:t.noCommit,recordSource:t.recordSource,signoff:t.signoff},t.mainline!==void 0?{mainline:t.mainline}:{})).subscribe({next:e,error:i});return;case"revert":this.git.revertCommit(H({commit:t.hash,noCommit:t.noCommit,signoff:t.signoff},t.mainline!==void 0?{mainline:t.mainline}:{})).subscribe({next:e,error:i});return;case"drop-commit":this.git.dropCommit(t.hash).subscribe({next:e,error:i});return;case"merge":this.git.mergeRef({branch:t.source,mode:t.mode,noCommit:t.noCommit,autostash:t.autostash}).subscribe({next:e,error:i});return;case"rebase":this.git.rebaseRef({branch:t.onto,autostash:t.autostash,preserveMerges:t.preserveMerges}).subscribe({next:e,error:i});return;case"reset-commit":this.git.resetToCommit(t.hash,t.mode).subscribe({next:e,error:i});return;case"push-tag":this.git.pushTag({name:t.name,remote:t.remote,force:t.force}).subscribe({next:e,error:i});return;case"delete-tag":this.git.deleteTag({name:t.name,deleteRemote:t.deleteRemote,remote:t.remote}).subscribe({next:e,error:i});return;case"rename-branch":this.git.renameBranch({oldName:t.oldName,newName:t.newName,publish:t.publish,deleteRemoteOld:t.deleteRemoteOld,remote:t.remote}).subscribe({next:r=>{this.selectedBranches.update(o=>o.map(s=>s===t.oldName?t.newName:s)),e(r)},error:i});return;case"delete-branch":this.git.deleteBranch({name:t.name,force:t.force,deleteRemote:t.deleteRemote,remote:t.remote}).subscribe({next:r=>{this.selectedBranches.update(o=>o.filter(s=>s!==t.name)),e(r)},error:i});return;case"delete-remote-branch":this.git.deleteRemoteBranch(t.remote,t.branch).subscribe({next:e,error:i});return;case"pull-branch":this.git.pull({remote:t.remote,branch:t.branch,mode:t.mode}).subscribe({next:e,error:i});return;case"stash-save":this.git.stashSave(re(H({},t.message?{message:t.message}:{}),{scope:t.scope,includeUntracked:t.includeUntracked})).subscribe({next:e,error:i});return;case"stash-apply":this.git.stashApply(t.index,t.restoreIndex).subscribe({next:e,error:i});return;case"stash-pop":this.git.stashPop(t.index,t.restoreIndex).subscribe({next:e,error:i});return}}createWorktree(t){this.busy()||this.mutationBusy()||this.statusLoading()||(this.worktreeDialogError.set(""),this.git.createWorktree(t.path,t.branch).subscribe({next:()=>{this.worktreeDialogOpen.set(!1),this.loadSidePanelData()},error:e=>this.worktreeDialogError.set(this.errorMessage(e))}))}onContextAction(t){if(this.busy()||this.mutationBusy()||this.statusLoading())return;let e=this.contextMenuTarget()?.commit??this.selectedCommit();switch(t){case"add-tag":this.openGitOperation({action:"add-tag",commit:e??void 0,currentBranch:this.currentBranchName()});break;case"create-branch":this.openGitOperation({action:"create-branch",commit:e??void 0,currentBranch:this.currentBranchName()});break;case"checkout-commit":e&&this.openGitOperation({action:"checkout-commit",commit:e,currentBranch:this.currentBranchName()});break;case"cherry-pick":e&&this.openGitOperation({action:"cherry-pick",commit:e,currentBranch:this.currentBranchName()});break;case"open-commit":this.selectedCommit()===null&&this.selectedCommit.set(this.commits()[0]??null);break;case"copy-hash":e&&navigator.clipboard?.writeText(e.hash);break;case"copy-subject":e&&navigator.clipboard?.writeText(e.message);break;case"view-commit-diff":e&&this.selectedCommit.set(e);break;case"revert-commit":e&&this.openGitOperation({action:"revert",commit:e,currentBranch:this.currentBranchName()});break;case"drop-commit":e&&this.openGitOperation({action:"drop-commit",commit:e,currentBranch:this.currentBranchName()});break;case"merge-commit":e&&this.openGitOperation({action:"merge",commit:e,currentBranch:this.currentBranchName()});break;case"rebase-commit":e&&this.openGitOperation({action:"rebase",commit:e,currentBranch:this.currentBranchName()});break;case"reset-commit":e&&this.openGitOperation({action:"reset-commit",commit:e,currentBranch:this.currentBranchName()});break;case"checkout-branch":{let i=this.contextMenuTarget()?.branch;if(i){let r=i.type==="remote",o=i.name.indexOf("/");this.openGitOperation({action:"checkout-branch",ref:i.name,isRemote:r,remote:r&&o>0?i.name.slice(0,o):void 0,currentBranch:this.currentBranchName()})}break}case"delete-remote-branch":{let i=this.contextMenuTarget()?.branch?.name??"",r=i.indexOf("/");r>0&&this.openGitOperation({action:"delete-remote-branch",ref:i,isRemote:!0,remote:i.slice(0,r),currentBranch:this.currentBranchName()});break}case"merge-branch":{let i=this.contextMenuTarget()?.branch;i&&this.openGitOperation({action:"merge",ref:i.name,currentBranch:this.currentBranchName()});break}case"pull-branch":{let i=this.contextMenuTarget()?.branch;if(i&&i.type==="remote"){let r=i.name.indexOf("/");this.openGitOperation({action:"pull-branch",ref:i.name,isRemote:!0,remote:r>0?i.name.slice(0,r):void 0,currentBranch:this.currentBranchName()})}break}case"create-archive":{let i=this.contextMenuTarget(),r=i?.kind==="tag"?i.branch?.name:i?.commit?.hash;r&&window.open(Px(`/api/archive?ref=${encodeURIComponent(r)}`),"_blank");break}case"tag-details":this.contextMenuTarget()?.commit&&this.selectedCommit.set(this.contextMenuTarget().commit);break;case"tag-delete":{let i=this.contextMenuTarget()?.branch?.name??"";this.openGitOperation({action:"delete-tag",ref:i,currentBranch:this.currentBranchName()});break}case"tag-push":{let i=this.contextMenuTarget()?.branch?.name??"";this.openGitOperation({action:"push-tag",ref:i,currentBranch:this.currentBranchName()});break}case"copy-tag-name":this.contextMenuTarget()?.branch?.name&&navigator.clipboard?.writeText(this.contextMenuTarget().branch.name);break;case"unselect-branch":this.selectedBranches.set([]);break;case"stash-apply":{let i=this.contextMenuTarget()?.stash;i&&this.openGitOperation({action:"stash-apply",stash:i,currentBranch:this.currentBranchName()});break}case"stash-pop":{let i=this.contextMenuTarget()?.stash;i&&this.openGitOperation({action:"stash-pop",stash:i,currentBranch:this.currentBranchName()});break}case"stash-drop":{let i=this.contextMenuTarget()?.stash;i&&this.promptState.set({title:"Drop stash?",label:`This will permanently drop stash@{${i.index}}.`,confirmOnly:!0,okLabel:"Drop",danger:!0});break}case"copy-stash-name":{let i=this.contextMenuTarget()?.stash;i&&navigator.clipboard?.writeText(`stash@{${i.index}}`);break}case"copy-worktree-path":{let i=this.contextMenuTarget()?.worktree?.path;i&&navigator.clipboard?.writeText(i);break}case"switch-worktree":{let i=this.contextMenuTarget()?.worktree;i&&this.openWorktree(i);break}case"open-worktree-tab":{let i=this.contextMenuTarget()?.worktree;i&&!i.bare&&this.vscode.openRepository(i.path);break}case"open-worktree-window":{let i=this.contextMenuTarget()?.worktree;i&&!i.bare&&this.vscode.openRepositoryWindow(i.path);break}case"delete-worktree":{let i=this.contextMenuTarget()?.worktree;i&&!i.current&&!i.bare&&this.promptState.set({title:"Delete worktree?",label:`This will remove the worktree folder "${i.path}". Git will refuse if it contains uncommitted changes.`,confirmOnly:!0,okLabel:"Delete",danger:!0});break}case"copy-branch-name":this.contextMenuTarget()?.branch?.name&&navigator.clipboard?.writeText(this.contextMenuTarget().branch.name);break;case"rename-branch":{let i=this.contextMenuTarget()?.branch?.name??"";this.openGitOperation({action:"rename-branch",ref:i,currentBranch:this.currentBranchName()});break}case"delete-branch":{let i=this.contextMenuTarget()?.branch?.name??"";this.openGitOperation({action:"delete-branch",ref:i,currentBranch:this.currentBranchName()});break}case"open-working":this.selectedCommit.set({hash:Cn,date:new Date().toISOString(),message:"Uncommitted changes",refs:"",body:"",author_name:this.identity().name||"You",author_email:this.identity().email,parents:[]});break;case"stash-working":this.openGitOperation({action:"stash-save",currentBranch:this.currentBranchName()});break;case"reset-working":{let i=this.workingChanges(),r=(i?.staged.length??0)+(i?.unstaged.length??0);this.promptState.set({title:"Reset uncommitted changes?",label:`${r===1?"1 tracked file will be":`${r} tracked files will be`} discarded. Untracked files will remain. This cannot be undone.`,confirmOnly:!0,okLabel:"Reset",danger:!0});break}case"clean-untracked":{let i=this.workingChanges()?.untracked.length??0;this.promptState.set({title:"Clean untracked files?",label:`${i===1?"1 untracked file will be":`${i} untracked files will be`} permanently deleted. This cannot be undone.`,confirmOnly:!0,okLabel:"Clean",danger:!0});break}case"discard-working":this.git.getWorkingChanges().subscribe({next:i=>{let r=[...i.files.map(o=>o.path),...i.untracked];r.length>0&&this.git.discard(r).subscribe({next:()=>this.refreshWorking(),error:o=>this.error.set(this.errorMessage(o))})},error:i=>this.error.set(this.errorMessage(i))});break;case"refresh-status":this.refresh();break;case"open-source-control":window.open("vscode://command/workbench.view.scm","_blank");break;default:break}this.contextMenuState.set(null)}openWorktree(t){t.bare||this.vscode.switchRepository(t.path)}onPromptConfirm(t){if(this.busy()||this.mutationBusy()||this.statusLoading())return;let e=this.promptState();if(!e)return;this.promptState.set(null);let i=this.contextMenuTarget()?.commit;if(e.title==="Delete worktree?"){let r=this.contextMenuTarget()?.worktree;r&&!r.current&&!r.bare&&this.git.removeWorktree(r.path).subscribe({next:()=>this.loadSidePanelData(),error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Push tag?"){let r=this.contextMenuTarget()?.branch?.name;r&&this.git.pushTag({name:r}).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Force push?"){this.git.push(!0).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Discard unstaged changes?"){let r=this.pendingDiscard();this.pendingDiscard.set(null),r?.length&&this.git.discard(r,"unstaged").subscribe({next:()=>this.refreshWorking(),error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Stash uncommitted changes"){this.git.stashSave(t?{message:t}:{}).subscribe({next:()=>this.refresh(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Reset uncommitted changes?"){this.git.resetWorking().subscribe({next:()=>this.refreshWorking(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Clean untracked files?"){this.git.cleanUntracked().subscribe({next:()=>this.refreshWorking(),error:r=>this.error.set(this.errorMessage(r))});return}if(e.title==="Rename branch"){let r=this.contextMenuTarget()?.branch?.name,o=t.trim();r&&o&&o!==r&&this.git.renameBranch({oldName:r,newName:o}).subscribe({next:()=>{this.selectedBranches.update(s=>s.map(a=>a===r?o:a)),this.refresh()},error:s=>this.error.set(this.errorMessage(s))});return}if(e.title==="Delete branch?"){let r=this.contextMenuTarget()?.branch?.name;r&&this.git.deleteBranch({name:r}).subscribe({next:()=>{this.selectedBranches.update(o=>o.filter(s=>s!==r)),this.refresh()},error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Drop stash?"){let r=this.contextMenuTarget()?.stash?.index;r!==void 0&&this.git.stashDrop(r).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}if(e.title==="Rebase from branch"){let r=t.trim();r&&this.git.rebaseRef({branch:r}).subscribe({next:()=>this.refresh(),error:o=>this.error.set(this.errorMessage(o))});return}}ancestorsOf(t){let e=this.commitIndex(),i=new Set,r=[t];for(;r.length;){let o=r.pop();if(i.has(o))continue;i.add(o);let s=e.get(o);s&&r.push(...s.parents)}return i}errorMessage(t){let e=t;return e?.status===400&&e.error?.error?e.error.error:"Failed to communicate with the Guito server."}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ue({type:n,selectors:[["app-root"]],hostBindings:function(e,i){e&1&&C("focus",function(){return i.checkRepository()},Mf)("visibilitychange",function(){return i.checkRepository()},qe)},decls:16,vars:33,consts:[[1,"app"],[3,"menuToggle","refresh","remoteAction","settingsClick","searchChange","searchNavigate","busy","prEnabled","panelOpen","matchIndex","matchCount","filterMode"],["retryLabel","Retry",3,"message","busy"],["retryLabel","Retry status",3,"message","busy"],[1,"content-row"],[1,"content"],[3,"commitClick","contextMenu","loadMoreRequested","loadAllRequested","identity","commits","loadingLabel","selectedHash","search","showGraph","selectedBranches","showRemote","workingChanges","stashes","showStashes","showTags","issueLinking","unloaded","historyLoading","scrollToHash"],[3,"select","closed","menu"],[3,"confirmed","cancelled","state"],[3,"state","busy","error"],[3,"branches","worktrees","busy","error"],[3,"branches"],[3,"prId","settings"],[3,"settings","identity","saving"],["retryLabel","Retry",3,"retry","message","busy"],["retryLabel","Retry status",3,"retry","message","busy"],[3,"panel-open","hidden","branches","selectedBranches","showRemote","stashes","worktrees","tags","refListView","sectionsExpandedByDefault","searchCaseSensitive","selectedCommitHash","loading","azureEnabled","pullRequests","prError"],[3,"transitionend","transitioncancel","branchChange","tagSelect","stashSelect","contextMenu","worktreeCreate","worktreeOpen","prSelect","prRefresh","hidden","branches","selectedBranches","showRemote","stashes","worktrees","tags","refListView","sectionsExpandedByDefault","searchCaseSensitive","selectedCommitHash","loading","azureEnabled","pullRequests","prError"],[3,"changes","branches","busy","statusLoading","statusError","subject","description","fileListView","generating","generateError"],[3,"commit","fileListView","issueLinking"],[3,"subjectChange","descriptionChange","generateMessage","stageChange","stashChange","discardRequest","commitRequested","conflictResolved","retry","closed","changes","branches","busy","statusLoading","statusError","subject","description","fileListView","generating","generateError"],[3,"closed","commit","fileListView","issueLinking"],[3,"confirmed","closed","state","busy","error"],[3,"created","closed","branches","worktrees","busy","error"],[3,"closed","created","branches"],[3,"changed","closed","prId","settings"],[3,"saved","settingsUpdated","identityChanged","repositoryChanged","closed","settings","identity","saving"]],template:function(e,i){if(e&1&&(u(0,"div",0)(1,"app-toolbar",1),C("menuToggle",function(){return i.toggleSidePanel()})("refresh",function(){return i.refresh()})("remoteAction",function(o){return i.runRemoteAction(o)})("settingsClick",function(){return i.openSettings()})("searchChange",function(o){return i.search.set(o)})("searchNavigate",function(o){return i.navigateSearch(o)}),p(),E(2,TF,1,2,"app-error-banner",2),E(3,kF,1,2,"app-error-banner",3),u(4,"div",4),E(5,PF,2,2),u(6,"main",5)(7,"app-commit-table",6),C("commitClick",function(o){return i.selectedCommit.set(o)})("contextMenu",function(o){return i.onContextMenu(o)})("loadMoreRequested",function(){return i.loadMoreCommits()})("loadAllRequested",function(){return i.loadAllCommits()}),p(),E(8,NF,2,1),p()(),u(9,"app-context-menu",7),C("select",function(o){return i.onContextAction(o)})("closed",function(){return i.contextMenuState.set(null)}),p(),u(10,"app-prompt-dialog",8),C("confirmed",function(o){return i.onPromptConfirm(o)})("cancelled",function(){return i.onPromptCancel()}),p(),E(11,AF,1,3,"app-git-operation-dialog",9),E(12,LF,1,4,"app-worktree-dialog",10),E(13,FF,1,1,"app-create-pr-dialog",11),E(14,VF,1,2,"app-pr-dialog",12),E(15,BF,1,3,"app-settings-dialog",13),p()),e&2){let r,o,s,a,l,h;c(),S("busy",i.busy()||i.mutationBusy()||i.statusLoading())("prEnabled",i.hasAzureUrl())("panelOpen",i.panelOpen())("matchIndex",i.searchIndex())("matchCount",i.searchMatches().length)("filterMode",i.filterSearch()),c(),D(i.error()?2:-1),c(),D(i.statusError()&&((r=i.selectedCommit())==null?null:r.hash)!==i.workingHash?3:-1),c(2),D(i.panelInitialized()?5:-1),c(2),S("identity",i.identity())("commits",i.displayedCommits())("loadingLabel",i.tableLoading())("selectedHash",((o=i.selectedCommit())==null?null:o.hash)??"")("search",i.search())("showGraph",i.showGraph()&&!i.filterSearch())("selectedBranches",i.selectedBranches())("showRemote",i.showRemote())("workingChanges",i.workingChanges())("stashes",i.stashes())("showStashes",i.showStashes())("showTags",i.showTags())("issueLinking",i.issueLinking())("unloaded",i.unloadedCommits())("historyLoading",i.historyLoading())("scrollToHash",i.scrollRequest()),c(),D((s=i.selectedCommit())?8:-1,s),c(),S("menu",i.contextMenuState()),c(),S("state",i.promptState()),c(),D((a=i.gitOperationState())?11:-1,a),c(),D(i.worktreeDialogOpen()?12:-1),c(),D(i.prDialogOpen()?13:-1),c(),D((l=i.prDetailId())?14:-1,l),c(),D((h=i.settingsDialogOpen()&&i.azureSettings())?15:-1,h)}},dependencies:[pt,Ld,Pd,hd,rd,Oo,Fo,Ed,Rd,wd,Dd,Md,Nd],styles:[".app[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100vh;overflow:hidden}.content-row[_ngcontent-%COMP%]{display:flex;flex:1;min-height:0}.content[_ngcontent-%COMP%]{display:flex;flex:1;min-width:0;min-height:0}.loading-overlay[_ngcontent-%COMP%]{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:#1e1e1e8c;z-index:100}.spinner[_ngcontent-%COMP%]{width:28px;height:28px;border:3px solid rgba(255,255,255,.15);border-top-color:var(--accent);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}"],changeDetection:0})};Vh(Fd,Ox).catch(n=>console.error(n));
|